Version Description
- New option in "Settings" -> "Combine loaded JS (JavaScript) into fewer files" -> "Wrap each JavaScript file included in the combined group in its own try {} catch(e) {} statement in case it has an error and it would affect the execution of the other included files"
- Changed the way hardcoded assets are printed to ensure they are retrieved with higher accuracy (the retrieval is made via AJAX calls) so the same list will also show in the Pro version
- Added debugger for preloaded CSS/JS to load the page as if the preloading is not enabled (/?wpacu_no_css_preload_basic & /?wpacu_no_js_preload_basic)
- Prevent the plugin from triggering on certain situations (e.g. for "Contact Form X" AJAX call and "Lumise" plugin, in edit mode)
- Check if a directory is empty before using rmdir() to avoid any errors printed (e.g. even if @ was appended in front of the function, the irrelevant errors were still logged in some environments)
- Higher accuracy in detecting older cached files to be marked for deletion (making sure older files are cleared)
- Fix: Make sure /wp-content/cache/asset-cleanup/(css|js) directories are re-created if necessary, in case they were removed (e.g. for being empty or by mistake)
- Fix: Basic preloading was not triggering anymore for LINK tags
Download this release
Release Info
Developer | gabelivan |
Plugin | Asset CleanUp: Page Speed Booster |
Version | 1.3.7.1 |
Comparing to | |
See all releases |
Code changes from version 1.3.7.0 to 1.3.7.1
- assets/script.min.js +1 -1
- assets/style.min.css +1 -1
- assets/sweetalert/README.md +0 -220
- assets/sweetalert/dist/sweetalert.min.js +0 -1
- assets/sweetalert/package.json +0 -138
- assets/sweetalert/typings/core.d.ts +0 -13
- assets/sweetalert/typings/modules/actions.d.ts +0 -5
- assets/sweetalert/typings/modules/class-list/index.d.ts +0 -5
- assets/sweetalert/typings/modules/event-listeners.d.ts +0 -3
- assets/sweetalert/typings/modules/init/buttons.d.ts +0 -3
- assets/sweetalert/typings/modules/init/content.d.ts +0 -3
- assets/sweetalert/typings/modules/init/icon.d.ts +0 -2
- assets/sweetalert/typings/modules/init/index.d.ts +0 -3
- assets/sweetalert/typings/modules/init/modal.d.ts +0 -5
- assets/sweetalert/typings/modules/init/overlay.d.ts +0 -2
- assets/sweetalert/typings/modules/init/text.d.ts +0 -2
- assets/sweetalert/typings/modules/markup/buttons.d.ts +0 -1
- assets/sweetalert/typings/modules/markup/content.d.ts +0 -1
- assets/sweetalert/typings/modules/markup/icons.d.ts +0 -3
- assets/sweetalert/typings/modules/markup/index.d.ts +0 -9
- assets/sweetalert/typings/modules/markup/modal.d.ts +0 -2
- assets/sweetalert/typings/modules/markup/overlay.d.ts +0 -2
- assets/sweetalert/typings/modules/options/buttons.d.ts +0 -14
- assets/sweetalert/typings/modules/options/content.d.ts +0 -5
- assets/sweetalert/typings/modules/options/deprecations.d.ts +0 -11
- assets/sweetalert/typings/modules/options/index.d.ts +0 -16
- assets/sweetalert/typings/modules/state.d.ts +0 -27
- assets/sweetalert/typings/modules/utils.d.ts +0 -7
- assets/sweetalert/typings/sweetalert.d.ts +0 -9
- assets/sweetalert2/CHANGELOG.md +1628 -0
- assets/{sweetalert/LICENSE.md → sweetalert2/LICENSE} +1 -1
- assets/sweetalert2/README.md +263 -0
- assets/sweetalert2/dist/sweetalert2.all.js +3371 -0
- assets/sweetalert2/dist/sweetalert2.all.min.js +2 -0
- assets/sweetalert2/dist/sweetalert2.css +1372 -0
- assets/sweetalert2/dist/sweetalert2.js +3369 -0
- assets/sweetalert2/dist/sweetalert2.min.css +1 -0
- assets/sweetalert2/dist/sweetalert2.min.js +1 -0
- assets/sweetalert2/package.json +162 -0
- assets/sweetalert2/src/SweetAlert.js +69 -0
- assets/sweetalert2/src/constants.js +1 -0
- assets/sweetalert2/src/globalState.js +30 -0
- assets/sweetalert2/src/instanceMethods.js +9 -0
- assets/sweetalert2/src/instanceMethods/_destroy.js +53 -0
- assets/sweetalert2/src/instanceMethods/_main.js +179 -0
- assets/sweetalert2/src/instanceMethods/buttons-handlers.js +94 -0
- assets/sweetalert2/src/instanceMethods/close.js +147 -0
- assets/sweetalert2/src/instanceMethods/enable-disable-elements.js +39 -0
- assets/sweetalert2/src/instanceMethods/getInput.js +12 -0
- assets/sweetalert2/src/instanceMethods/hideLoading.js +32 -0
- assets/sweetalert2/src/instanceMethods/keydown-handler.js +142 -0
- assets/sweetalert2/src/instanceMethods/popup-click-handler.js +76 -0
- assets/sweetalert2/src/instanceMethods/progress-steps.js +6 -0
- assets/sweetalert2/src/instanceMethods/update.js +40 -0
- assets/sweetalert2/src/instanceMethods/validation-message.js +38 -0
- assets/sweetalert2/src/privateMethods.js +13 -0
- assets/sweetalert2/src/privateProps.js +15 -0
- assets/sweetalert2/src/scss/_animations.scss +158 -0
- assets/sweetalert2/src/scss/_body.scss +100 -0
- assets/sweetalert2/src/scss/_core.scss +780 -0
- assets/sweetalert2/src/scss/_mixins.scss +22 -0
- assets/sweetalert2/src/scss/_polyfills.scss +37 -0
- assets/sweetalert2/src/scss/_theming.scss +8 -0
- assets/sweetalert2/src/scss/_toasts-animations.scss +83 -0
- assets/sweetalert2/src/scss/_toasts-body.scss +109 -0
- assets/sweetalert2/src/scss/_toasts.scss +175 -0
- assets/sweetalert2/src/staticMethods.js +12 -0
- assets/sweetalert2/src/staticMethods/argsToParams.js +21 -0
- assets/sweetalert2/src/staticMethods/dom.js +47 -0
- assets/sweetalert2/src/staticMethods/fire.js +4 -0
- assets/sweetalert2/src/staticMethods/mixin.js +27 -0
- assets/sweetalert2/src/staticMethods/queue.js +60 -0
- assets/sweetalert2/src/staticMethods/showLoading.js +32 -0
- assets/sweetalert2/src/staticMethods/timer.js +63 -0
- assets/sweetalert2/src/sweetalert2.js +6 -0
- assets/sweetalert2/src/sweetalert2.scss +11 -0
- assets/sweetalert2/src/utils/DismissReason.js +7 -0
- assets/sweetalert2/src/utils/Timer.js +51 -0
- assets/sweetalert2/src/utils/aria.js +34 -0
- assets/sweetalert2/src/utils/classes.js +91 -0
- assets/sweetalert2/src/utils/defaultInputValidators.js +13 -0
- assets/sweetalert2/src/utils/dom/animationEndEvent.js +23 -0
- assets/sweetalert2/src/utils/dom/domUtils.js +200 -0
- assets/sweetalert2/src/utils/dom/getters.js +111 -0
- assets/sweetalert2/src/utils/dom/index.js +7 -0
- assets/sweetalert2/src/utils/dom/init.js +150 -0
- assets/sweetalert2/src/utils/dom/inputUtils.js +156 -0
- assets/sweetalert2/src/utils/dom/measureScrollbar.js +12 -0
- assets/sweetalert2/src/utils/dom/parseHtmlToContainer.js +38 -0
- assets/sweetalert2/src/utils/dom/renderers/render.js +23 -0
- assets/sweetalert2/src/utils/dom/renderers/renderActions.js +65 -0
- assets/sweetalert2/src/utils/dom/renderers/renderCloseButton.js +13 -0
- assets/sweetalert2/src/utils/dom/renderers/renderContainer.js +56 -0
- assets/sweetalert2/src/utils/dom/renderers/renderContent.js +27 -0
- assets/sweetalert2/src/utils/dom/renderers/renderFooter.js +14 -0
- assets/sweetalert2/src/utils/dom/renderers/renderHeader.js +28 -0
- assets/sweetalert2/src/utils/dom/renderers/renderIcon.js +106 -0
- assets/sweetalert2/src/utils/dom/renderers/renderImage.js +24 -0
- assets/sweetalert2/src/utils/dom/renderers/renderInput.js +196 -0
- assets/sweetalert2/src/utils/dom/renderers/renderPopup.js +43 -0
- assets/sweetalert2/src/utils/dom/renderers/renderProgressSteps.js +50 -0
- assets/sweetalert2/src/utils/dom/renderers/renderTitle.js +18 -0
- assets/sweetalert2/src/utils/ieFix.js +29 -0
- assets/sweetalert2/src/utils/iosFix.js +71 -0
- assets/sweetalert2/src/utils/isNodeEnv.js +2 -0
- assets/sweetalert2/src/utils/openPopup.js +106 -0
- assets/sweetalert2/src/utils/params.js +219 -0
- assets/sweetalert2/src/utils/scrollbarFix.js +21 -0
- assets/sweetalert2/src/utils/setParameters.js +60 -0
- assets/sweetalert2/src/utils/utils.js +87 -0
- assets/sweetalert2/src/variables.scss +224 -0
- assets/sweetalert2/sweetalert2.d.ts +1152 -0
- classes/Debug.php +15 -9
- classes/FileSystem.php +9 -0
- classes/HardcodedAssets.php +78 -37
- classes/Main.php +92 -24
- classes/Maintenance.php +13 -1
- classes/Misc.php +70 -0
- classes/OptimiseAssets/CombineCss.php +3 -3
- classes/OptimiseAssets/CombineJs.php +35 -8
- classes/OptimiseAssets/FontsGoogle.php +45 -45
assets/script.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function wpacuTabOpenSettingsArea(a,b){a.preventDefault();var c,d,e;for(d=document.getElementsByClassName("wpacu-settings-tab-content"),c=0;c<d.length;c++)d[c].style.display="none";for(e=document.getElementsByClassName("wpacu-settings-tab-link"),c=0;c<e.length;c++)e[c].className=e[c].className.replace(" active","");document.getElementById(b).style.display="table-cell",jQuery('a[href="#'+b+'"]').addClass("active"),jQuery("#wpacu-selected-tab-area").val(b)}function wpacuBytesToSize(a){return 0===a?"N/A":(a/1024).toFixed(4)+" KB"}function wpacuAjaxClearCache(){jQuery.post(wpacu_object.ajax_url+"?wpacu_clear_cache",{action:wpacu_object.plugin_id+"_clear_cache",time_r:(new Date).getTime()},function(a){setTimeout(function(){wpacuClearAutoptimizeCache(),wpacu_object.is_frontend_view?jQuery.post(wpacu_object.ajax_url+"?wpacu_preload_guest",{action:wpacu_object.plugin_id+"_preload",page_url:wpacu_object.page_url,time_r:(new Date).getTime()}):jQuery.get(wpacu_object.page_url,{wpacu_preload:1,wpacu_no_frontend_show:1,time_r:(new Date).getTime()},function(){jQuery.post(wpacu_object.ajax_url+"?wpacu_preload_guest",{action:wpacu_object.plugin_id+"_preload",page_url:wpacu_object.page_url,time_r:(new Date).getTime()})})},150)})}function wpacuClearAutoptimizeCache(){jQuery("#wp-admin-bar-autoptimize-default li").length>0&&void 0!==autoptimize_ajax_object.ajaxurl&&void 0!==autoptimize_ajax_object.nonce&&jQuery.ajax({type:"GET",url:autoptimize_ajax_object.ajaxurl,data:{action:"autoptimize_delete_cache",nonce:autoptimize_ajax_object.nonce},dataType:"json",cache:!1,timeout:9e3,success:function(a){},error:function(a,b){}})}jQuery(document).ready(function(a){function b(){if(!a("#wpacu_ajax_fetch_assets_list_dashboard_view").length)return!1;var b={};if("direct"===wpacu_object.dom_get_type)b[wpacu_object.plugin_name+"_load"]=1,b[wpacu_object.plugin_name+"_time_r"]=(new Date).getTime(),a.ajax({method:"GET",url:wpacu_object.page_url,data:b,cache:!1,complete:function(b,d){if("error"===b.statusText){if(404===b.status)return void c(b.responseText,b.status);var e=b.responseText.replace(/(<([^>]+)>)/gi,"");try{e=String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}catch(a){console.log(a)}var f=wpacu_object.ajax_direct_fetch_error;f=f.replace(/{wpacu_output}/,e),f=f.replace(/{wpacu_status_code_error}/,b.status),a("#wpacu_meta_box_content").html(f)}}}).done(function(b){a("#wpacu-fetch-list-step-1-wrap").addClass("wpacu-completed"),a("#wpacu-fetch-list-step-1-status").html(a("#wpacu-list-step-completed-status").html()),a("#wpacu-fetch-list-step-2-status").html(a("#wpacu-list-step-default-status").html()),c(b)});else if("wp_remote_post"===wpacu_object.dom_get_type){var d={action:wpacu_object.plugin_name+"_get_loaded_assets",post_id:wpacu_object.post_id,page_url:wpacu_object.page_url,tag_id:wpacu_object.tag_id,wpacu_taxonomy:wpacu_object.wpacu_taxonomy,time_r:(new Date).getTime(),force_manage_dash:wpacu_object.force_manage_dash};a.post(wpacu_object.ajax_url,d,function(b){if(!b)return!1;a("#wpacu_meta_box_content").html(b),a("#wpacu_home_page_form").length>0&&a("#submit").show(),setTimeout(function(){f.load(),setTimeout(function(){f.checkSourcesFor404Errors()},100)},200)})}}function c(b,c){if(b.lastIndexOf(wpacu_object.start_del_e)<0||b.lastIndexOf(wpacu_object.end_del_e)<0||b.lastIndexOf(wpacu_object.start_del_h)<0||b.lastIndexOf(wpacu_object.end_del_h)<0){var d=wpacu_object.ajax_direct_fetch_error_with_success_response;d=d.replace(/{wpacu_output}/,xhr.responseText.replace(/(<([^>]+)>)/gi,""));try{d=String(d).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}catch(a){console.log(a)}return void a("#wpacu_meta_box_content").html(d)}var e=b.substring(b.lastIndexOf(wpacu_object.start_del_e)+wpacu_object.start_del_e.length,b.lastIndexOf(wpacu_object.end_del_e)),g=b.substring(b.lastIndexOf(wpacu_object.start_del_h)+wpacu_object.start_del_h.length,b.lastIndexOf(wpacu_object.end_del_h)),h={action:wpacu_object.plugin_name+"_get_loaded_assets",wpacu_list_e:e,wpacu_list_h:g,post_id:wpacu_object.post_id,page_url:wpacu_object.page_url,tag_id:wpacu_object.tag_id,wpacu_taxonomy:wpacu_object.wpacu_taxonomy,force_manage_dash:wpacu_object.force_manage_dash,time_r:(new Date).getTime()};a.post(wpacu_object.ajax_url,h,function(b){b&&(a("#wpacu_meta_box_content").html(b),404===c&&a("#wpacu_meta_box_content").prepend('<p><span class="dashicons dashicons-warning"></span> '+wpacu_object.server_returned_404_not_found+"</p><hr />"),a("#wpacu_home_page_form").length>0&&a("#submit").show(),setTimeout(function(){f.load(),a(".wpacu_asset_row").removeClass("wpacu-loading"),a("#wpacu-assets-reloading").remove(),f.checkSourcesFor404Errors()},200))})}a('input[name="wpacu_sub_tab_area"]').click(function(){a(this).prop("checked")&&a("#wpacu-selected-sub-tab-area").val(a(this).val())}),a("#wpacu_minify_css_enable, #wpacu_combine_loaded_css_enable, #wpacu_minify_js_enable, #wpacu_combine_loaded_js_enable, #wpacu_cdn_rewrite_enable, #wpacu_enable_test_mode").click(function(){a(this).prop("checked")?a('[data-linked-to="'+a(this).attr("id")+'"]').find(".wpacu-circle-status").addClass("wpacu-on").removeClass("wpacu-off"):a('[data-linked-to="'+a(this).attr("id")+'"]').find(".wpacu-circle-status").addClass("wpacu-off").removeClass("wpacu-on")}),a(document).on("click","#wpacu_inline_css_files_below_size_checkbox",function(){a(this).is(":checked")?a("#wpacu_inline_css_files_enable").prop("checked",!0).trigger("tick"):""===a("#wpacu_inline_css_files_list").val()&&a("#wpacu_inline_css_files_enable").prop("checked",!1).trigger("tick")}),a(document).on("click","#wpacu_inline_js_files_below_size_checkbox",function(){if(a(this).is(":checked")){if(!confirm(wpacu_object.inline_auto_js_files_confirm_msg))return!1;a("#wpacu_inline_js_files_enable").prop("checked",!0).trigger("tick")}else""===a("#wpacu_inline_js_files_list").val()&&a("#wpacu_inline_js_files_enable").prop("checked",!1).trigger("tick")}),a("#wpacu-mark-license-valid-button").click(function(){return confirm(wpacu_object.mark_license_valid_confirm)}),a("#wpacu-license-form").submit(function(){a("#edd_license_activate_btn").attr("disabled","disabled"),a("#edd_license_deactivate_btn").attr("disabled","disabled"),a(".wpacu-license-spinner").show()});var d,e;a("#wpacu-reset-drop-down").on("change keyup keydown mouseup mousedown click",function(){""===a(this).val()?(a("#wpacu-warning-read").removeClass("wpacu-visible"),a("#wpacu-reset-submit-btn").attr("disabled","disabled").removeClass("button-primary").addClass("button-secondary")):("reset_everything"===a(this).val()?a("#wpacu-license-data-remove-area, #wpacu-cache-assets-remove-area").addClass("wpacu-visible"):a("#wpacu-license-data-remove-area, #wpacu-cache-assets-remove-area").removeClass("wpacu-visible"),a("#wpacu-warning-read").addClass("wpacu-visible"),a("#wpacu-reset-submit-btn").removeAttr("disabled").removeClass("button-secondary").addClass("button-primary")),a(".wpacu-tools-area .wpacu-warning").hide(),d=a(this).find("option:selected"),a("#"+d.attr("data-id")).show()}),a("#wpacu-reset-submit-btn").on("click",function(){if("reset_settings"===a("#wpacu-reset-drop-down").val()?e=wpacu_object.reset_settings_confirm_msg:"reset_everything_except_settings"===a("#wpacu-reset-drop-down").val()?e=wpacu_object.reset_everything_except_settings_confirm_msg:"reset_everything"===a("#wpacu-reset-drop-down").val()&&(e=wpacu_object.reset_everything_confirm_msg),!confirm(e))return!1;a("#wpacu-action-confirmed").val("yes"),setTimeout(function(){"yes"===a("#wpacu-action-confirmed").val()&&a("#wpacu-tools-form").submit()},1e3)}),a("#wpacu-import-form").submit(function(){if(!confirm(wpacu_object.import_confirm_msg))return!1;a(this).find("button").addClass("wpacu-importing").prop("disabled",!0)});var f={load:function(){var b,c,d,e=".input-unload-on-this-page.wpacu-not-locked";a(".input-unload-on-this-page").on("click change",function(e){if(b=a(this).attr("data-handle"),c=a(this).hasClass("wpacu_unload_rule_for_style")?"style":"script",a(this).prop("checked")){if("click"===e.type&&!f.triggerAlertWhenAnyUnloadRuleIsChosen(b,c))return!1;f.uncheckAllOtherBulkUnloadRules(a(this),!1),f.showHandleLoadExceptionArea(c,b),a(this).closest("tr").addClass("wpacu_not_load")}else a(this).closest("tr").removeClass("wpacu_not_load"),d=a(this).parents(".wpacu_asset_row"),f.hideHandleLoadExceptionArea(d,b,c)}),a(".wpacu-plugin-check-all").on("click",function(b){b.preventDefault();var c=a(this).attr("data-wpacu-plugin");a('table.wpacu_list_by_location[data-wpacu-plugin="'+c+'"]').find(e).prop("checked",!0).closest("tr").addClass("wpacu_not_load")}),a(".wpacu-plugin-uncheck-all").on("click",function(b){b.preventDefault();var c=a(this).attr("data-wpacu-plugin");a('table.wpacu_list_by_location[data-wpacu-plugin="'+c+'"]').find(e).prop("checked",!1).closest("tr").removeClass("wpacu_not_load")}),a(".wpacu-plugin-check-load-all").on("click change",function(b){b.preventDefault();var c=a(this).attr("data-wpacu-plugin"),d=a('table.wpacu_list_by_location[data-wpacu-plugin="'+c+'"]');d.find(".wpacu_load_it_option_one.wpacu_load_exception").prop("checked",!0).closest("tr.wpacu_is_bulk_unloaded").removeClass("wpacu_not_load"),d.find(e).prop("checked",!1).trigger("change")}),a(".wpacu-plugin-uncheck-load-all").on("click change",function(b){b.preventDefault();var c=a(this).attr("data-wpacu-plugin"),d=a('table.wpacu_list_by_location[data-wpacu-plugin="'+c+'"]');d.find(".wpacu_load_it_option_one.wpacu_load_exception").prop("checked",!1).closest("tr.wpacu_is_bulk_unloaded").addClass("wpacu_not_load"),d.find(e).prop("checked",!1).trigger("change")}),a(".wpacu_keep_bulk_rule").click(function(){a(this).prop("checked")&&a(this).parents("li").next().removeClass("remove_rule")}),a(".wpacu_remove_bulk_rule").click(function(){a(this).prop("checked")&&a(this).parents("li").addClass("remove_rule")}),a(".wpacu_bulk_unload").on("click change",function(e){b=a(this).attr("data-handle"),c=a(this).attr("data-handle-for"),d=a("[data-"+c+'-handle-row="'+b+'"]');var g=a(this).parents("li");if(a(this).prop("checked")){if("click"===e.type&&!f.triggerAlertWhenAnyUnloadRuleIsChosen(b,c))return!1;a(this).hasClass("wpacu_unload_it_regex_checkbox")?(g.find("label").addClass("wpacu_unload_checked"),g.find("textarea").prop("disabled",!1).focus().removeClass("wpacu_disabled"),g.find(".wpacu_handle_unload_regex_input_wrap").removeClass("wpacu_hide")):(a(this).parent("label").addClass("wpacu_input_load_checked"),a(this).closest("tr").addClass("wpacu_not_load")),f.showHandleLoadExceptionArea(c,b),a(this).hasClass("wpacu_global_unload")?(f.uncheckAllOtherBulkUnloadRules(a(this),!0),a('.input-unload-on-this-page[data-handle-for="'+c+'"][data-handle="'+b+'"]').prop("checked",!1)):a(this).hasClass("wpacu_post_type_unload")&&(f.uncheckAllOtherBulkUnloadRules(a(this),!1),a('.input-unload-on-this-page[data-handle-for="'+c+'"][data-handle="'+b+'"]').prop("checked",!1))}else a(this).hasClass("wpacu_unload_it_regex_checkbox")?(g.find("label").removeClass("wpacu_unload_checked"),g.find("textarea").blur().addClass("wpacu_disabled"),""===g.find("textarea").val().trim()&&(g.find("textarea").prop("disabled",!0).val(""),g.find(".wpacu_handle_unload_regex_input_wrap").addClass("wpacu_hide"))):(a(this).parent("label").removeClass("wpacu_input_load_checked"),a(this).closest("tr").removeClass("wpacu_not_load")),f.hideHandleLoadExceptionArea(d,b,c);d.hasClass("wpacu_is_bulk_unloaded")||a(".wpacu_bulk_unload:not(.wpacu_unload_it_regex_checkbox)").is(":checked")||a(this).closest("tr").removeClass("wpacu_not_load")}),a(".wpacu_load_it_option_one.wpacu_load_exception").on("click change",function(){var b=a(this).attr("data-handle");if(a(this).prop("checked")){a(this).parent("label").addClass("wpacu_global_unload_exception");var c="";a(this).hasClass("wpacu_style")?c="style":a(this).hasClass("wpacu_script")&&(c="script"),a("#"+c+"_"+b).prop("checked",!1).trigger("change")}else a(this).parent("label").removeClass("wpacu_global_unload_exception")}),a(".wpacu_load_it_option_two").on("click change",function(){var b=a(this).parents("li");a(this).prop("checked")?(b.find("label").addClass("wpacu_bold"),b.find("textarea").prop("disabled",!1).focus().removeClass("wpacu_disabled"),b.find(".wpacu_load_regex_input_wrap").removeClass("wpacu_hide")):(b.find("label").removeClass("wpacu_bold"),b.find("textarea").blur().addClass("wpacu_disabled"),""===b.find("textarea").val().trim()&&(b.find("textarea").prop("disabled",!0).val(""),b.find(".wpacu_load_regex_input_wrap").addClass("wpacu_hide")))}),a(".wpacu_script_attr_rule_input").on("click change",function(b){if(a(this).is(":checked")){if("click"===b.type){var c=a(this).parents("tr.wpacu_asset_row").attr("data-script-child-handles"),d=wpacu_object.script_is_parent_alert;if(void 0!==c&&""!==c&&(d=d.replace("{wpacu_script_child_handles}",c),!confirm(d)))return!1}a(this).parents("ul").find(".wpacu_script_attr_rule_input").not(a(this)).prop("checked",!1),a(this).hasClass("wpacu_script_attr_rule_global")&&a(this).parents("ul").find(".wpacu-script-attr-make-exception").removeClass("wpacu_hide")}a(this).parents("ul").find(".wpacu_script_attr_rule_global").is(":checked")||a(this).parents("ul").find(".wpacu-script-attr-make-exception").addClass("wpacu_hide")}),a(".wpacu-add-handle-note").on("click",function(b){b.preventDefault();var c,d,e=a(this).attr("data-handle");a(this).hasClass("wpacu-for-script")?c=a('.wpacu-handle-notes-field[data-script-handle="'+e+'"]'):a(this).hasClass("wpacu-for-style")&&(c=a('.wpacu-handle-notes-field[data-style-handle="'+e+'"]')),c.length<1||(d=c.find(":input"),c.is(":hidden")?(c.show(),d.prop("disabled",!1)):(c.hide(),""===d.val().trim()&&"true"===d.attr("data-wpacu-is-empty-on-page-load")&&d.prop("disabled",!0).val("")))}),a(".wpacu-external-file-size").on("click",function(b){b.preventDefault();var c,d=a(this),e=d.attr("data-src");d.hide(),c=d.next(),c.show(),e.includes("/?")?a.get(e,{},function(a,b,d){if("success"!==b)return"N/A";c.html(wpacuBytesToSize(a.length))}):a.post(wpacu_object.ajax_url,{action:wpacu_object.plugin_id+"_get_external_file_size",wpacu_remote_file:e},function(a){c.html(a)})}),a(".wpacu_handle_row_expand_contract").on("click",function(b){b.preventDefault();var c=a(this).attr("data-wpacu-handle"),d=a(this).attr("data-wpacu-handle-for");a(this).find("span").hasClass("dashicons-minus")?(a(this).parents("td").attr("data-wpacu-row-status","contracted").find(".wpacu_handle_row_expanded_area").addClass("wpacu_hide"),a(this).find("span").removeClass("dashicons-minus").addClass("dashicons-plus"),a("#wpacu_"+d+"_"+c+"_row_contracted_area").val("1")):a(this).find("span").hasClass("dashicons-plus")&&(a(this).parents("td").attr("data-wpacu-row-status","expanded").find(".wpacu_handle_row_expanded_area").removeClass("wpacu_hide"),a(this).find("span").removeClass("dashicons-plus").addClass("dashicons-minus"),a("#wpacu_"+d+"_"+c+"_row_contracted_area").val(""))});a('[data-is-hardcoded-asset="true"]').length>0&&(a.each(a('[data-is-hardcoded-asset="true"]'),function(b,c){f.updateHardcodedDataHiddenFieldStatus(a(this))}),a('[data-is-hardcoded-asset="true"]').on("click",".wpacu_unload_rule_input",function(){f.updateHardcodedDataHiddenFieldStatus(a(this).parents("[data-is-hardcoded-asset]"))}))},updateHardcodedDataHiddenFieldStatus:function(b){var c=!1;b.is("[data-style-handle-row]")?c=b.attr("data-style-handle-row"):b.is("[data-script-handle-row]")&&(c=b.attr("data-script-handle-row")),c&&(b.find(".wpacu_unload_rule_input:checked").length>0||b.hasClass("wpacu_not_load")?a("#"+c+"_hardcoded_data").prop("disabled",!1):a("#"+c+"_hardcoded_data").prop("disabled",!0))},triggerAlertWhenAnyUnloadRuleIsChosen:function(b,c){if("dashicons"===b&&"style"===c&&a('input[name="wpacu_ignore_child[styles][nf-display]').length>0&&!confirm(wpacu_object.dashicons_unload_alert_ninja_forms))return!1;if("script"===c){if(("jquery"===b||"jquery-core"===b)&&a("#script_jquery_ignore_children").length>0&&!confirm(wpacu_object.jquery_unload_alert))return!1;if("js-cookie"===b&&!confirm(wpacu_object.woo_js_cookie_unload_alert))return!1;if("wc-cart-fragments"===b&&!confirm(wpacu_object.woo_wc_cart_fragments_unload_alert))return!1;if(("backbone"===b||"underscore"===b)&&!confirm(wpacu_object.sensitive_library_unload_alert))return!1}return!0},pluginLoadManager:function(){a(".wpacu_plugin_load_it").on("click",function(){var b=a(this).attr("data-wpacu-plugin-path");a(this).prop("checked")&&(f.hidePluginLoadExceptionArea(b),a('.wpacu_plugin_unload_regex_input_wrap[data-wpacu-plugin-path="'+b+'"]').addClass("wpacu_hide"),a('.wpacu_plugin_unload_site_wide[data-wpacu-plugin-path="'+b+'"]').parent("label").removeClass("wpacu_plugin_unload_rule_input_checked"),a('.wpacu_plugin_unload_regex_radio[data-wpacu-plugin-path="'+b+'"]').parent("label").removeClass("wpacu_plugin_unload_rule_input_checked"))}),a(".wpacu_plugin_unload_site_wide").on("click",function(){var b=a(this).attr("data-wpacu-plugin-path");a(this).prop("checked")?(a(this).parent("label").addClass("wpacu_plugin_unload_rule_input_checked"),a('.wpacu_plugin_unload_regex_radio[data-wpacu-plugin-path="'+b+'"]').parent("label").removeClass("wpacu_plugin_unload_rule_input_checked"),a('.wpacu_plugin_unload_regex_input_wrap[data-wpacu-plugin-path="'+b+'"]').addClass("wpacu_hide"),f.showPluginLoadExceptionArea(b)):(a(this).parent("label").removeClass("wpacu_plugin_unload_rule_input_checked"),a('.wrap_plugin_load_exception_options[data-wpacu-plugin-path="'+b+'"]').addClass("wpacu_hide").find('input[type="checkbox"]').prop("disabled",!0))}),a(".wpacu_plugin_unload_regex_radio").on("click",function(){var b=a(this).attr("data-wpacu-plugin-path");a(this).prop("checked")?(a(this).parent("label").addClass("wpacu_plugin_unload_rule_input_checked"),a('.wpacu_plugin_unload_regex_input_wrap[data-wpacu-plugin-path="'+b+'"]').removeClass("wpacu_hide"),f.showPluginLoadExceptionArea(b),a('.wpacu_plugin_unload_site_wide[data-wpacu-plugin-path="'+b+'"]').prop("checked",!1).parent("label").removeClass("wpacu_plugin_unload_rule_input_checked")):(a('.wpacu_plugin_unload_regex_input_wrap[data-wpacu-plugin-path="'+b+'"]').addClass("wpacu_hide"),a(this).parent("label").removeClass("wpacu_plugin_unload_rule_input_checked"),a('.wrap_plugin_load_exception_options[data-wpacu-plugin-path="'+b+'"]').addClass("wpacu_hide"))}),a(".wpacu_plugin_load_exception_regex").on("click",function(){var b=a(this).attr("data-wpacu-plugin-path");a(this).prop("checked")?a('.wpacu_load_regex_input_wrap[data-wpacu-plugin-path="'+b+'"]').removeClass("wpacu_hide"):a('.wpacu_load_regex_input_wrap[data-wpacu-plugin-path="'+b+'"]').addClass("wpacu_hide")})},showPluginLoadExceptionArea:function(b){a('.wrap_plugin_load_exception_options[data-wpacu-plugin-path="'+b+'"]').removeClass("wpacu_hide").find('input[type="checkbox"]').prop("disabled",!1)},hidePluginLoadExceptionArea:function(b){a('.wrap_plugin_load_exception_options[data-wpacu-plugin-path="'+b+'"]').addClass("wpacu_hide").find('input[type="checkbox"]').prop("disabled",!0)},showHandleLoadExceptionArea:function(b,c){var d=a("div.wpacu_exception_options_area_wrap[data-"+b+'-handle="'+c+'"]');d.parent("div").removeClass("wpacu_hide"),d.find('input[type="checkbox"]').prop("disabled",!1)},hideHandleLoadExceptionArea:function(b,c,d){if(!b.hasClass("wpacu_is_bulk_unloaded")&&!b.find(".wpacu_bulk_unload").is(":checked")){var e=a("div.wpacu_exception_options_area_wrap[data-"+d+'-handle="'+c+'"]');e.parent("div").addClass("wpacu_hide"),e.find('input[type="checkbox"]').prop("disabled",!0)}},uncheckAllOtherBulkUnloadRules:function(a,b){var c=".wpacu_bulk_unload";!1===b&&(c=".wpacu_bulk_unload:not(.wpacu_unload_it_regex_checkbox)"),a.closest("tr").find(c).not(a).prop("checked",!1).parent("label").removeClass("wpacu_input_load_checked").removeClass("wpacu_unload_checked")},checkSourcesFor404Errors:function(){var b=a("[data-wpacu-external-source]");if(!(b.length<1)){var c=b.length,d="";b.each(function(b){var e=a(this),f=e.attr("data-wpacu-external-source");d+=f+"-at-wpacu-at-",b===c-1&&jQuery.post(wpacu_object.ajax_url+"?wpacu_check_external_url",{action:wpacu_object.plugin_id+"_check_external_urls_for_status_code",wpacu_check_urls:d},function(b){var c=jQuery.parseJSON(b);a.each(c,function(b,c){a('[data-wpacu-external-source="'+c+'"]').css({color:"#cc0000"}).parent("div").find("[data-wpacu-external-source-status]").html('<small>* <em style="font-weight: 600;">'+wpacu_object.source_load_error_msg+"</em></small>")})})})}}};a(window).on("load",function(){f.checkSourcesFor404Errors()}),a("#wpacu_post_type_select").change(function(){a("#wpacu_post_type_form").submit()}),a("#wpacu_taxonomy_select").change(function(){a("#wpacu_taxonomy_form").submit()}),a("#wpacu_dashboard").click(function(){a(this).prop("checked")?a("#wpacu-settings-assets-retrieval-mode").show():a("#wpacu-settings-assets-retrieval-mode").hide()}),a(".wpacu-dom-get-type-selection").change(function(){a(this).is(":checked")&&(a(".wpacu-dom-get-type-info").hide(),a("#"+a(this).attr("data-target")).fadeIn("fast"))}),a("#wpacu_frontend").click(function(){a(this).prop("checked")?a("#wpacu-settings-frontend-exceptions").show():a("#wpacu-settings-frontend-exceptions").hide()}),a(".google_fonts_combine_type").change(function(){a(".wpacu_google_fonts_combine_type_area").hide(),"async"===a(this).val()?a("#wpacu_google_fonts_combine_type_async_info_area").fadeIn():"async_preload"===a(this).val()?a("#wpacu_google_fonts_combine_type_async_preload_info_area").fadeIn():a("#wpacu_google_fonts_combine_type_rb_info_area").fadeIn()}),a("#wpacu_assets_list_layout").on("click change",function(){"by-location"===a(this).val()?a("#wpacu-assets-list-by-location-selected").fadeIn("fast"):a("#wpacu-assets-list-by-location-selected").fadeOut("fast")}),a("#wpacu_disable_jquery_migrate").on("click",function(){return!a(this).is(":checked")||(!(!a(this).is(":checked")||!confirm(wpacu_object.jquery_migration_disable_confirm_msg))||(a(this).prop("checked",!1),!1))}),a("#wpacu_disable_comment_reply").on("click",function(){return!a(this).is(":checked")||(!(!a(this).is(":checked")||!confirm(wpacu_object.comment_reply_disable_confirm_msg))||(a(this).prop("checked",!1),!1))}),a("[data-target-opacity]").on("click change tick",function(){a(this).prop("checked")?a("#"+a(this).attr("data-target-opacity")).css({opacity:1}):a("#"+a(this).attr("data-target-opacity")).css({opacity:.4})}),a(".wpacu-combine-loaded-js-level").change(function(){a(this).is(":checked")&&(a(".wpacu_combine_loaded_js_level_area").removeClass("wpacu_active"),a("#"+a(this).attr("data-target")).addClass("wpacu_active"))});var g=a('#wpacu-update-button-area input[type="submit"]');g.parents("form").submit(function(){g.attr("disabled",!0),a("#wpacu-updating-settings").show()});var h=a("#wpacu-update-front-settings-area .wpacu_update_btn");if(h.parents("form").submit(function(){return h.attr("disabled",!0).addClass("wpacu_submitting"),a("#wpacu-updating-front-settings").show(),!0}),a("form#wpacu-settings-form, form#wpacu_home_page_form").submit(function(){return g.attr("disabled",!0),!0}),a(".wpacu_bulk_rule_checkbox, .wpacu_remove_preload").click(function(){var b=a(this).parents(".wpacu_bulk_change_row");a(this).prop("checked")?b.addClass("wpacu_selected"):b.removeClass("wpacu_selected")}),a(".wpacu_remove_regex").click(function(){var b=a(this).parents(".wpacu_regex_rule_row");a(this).prop("checked")?b.addClass("wpacu_enabled"):b.removeClass("wpacu_enabled")}),a(".wpacu_restore_position").click(function(){var b=a(this).parents(".wpacu_restore_position_row");a(this).prop("checked")?b.addClass("wpacu_selected"):b.removeClass("wpacu_selected")}),a(".wpacu_remove_global_attr").click(function(){var b=a(this).parents(".wpacu_remove_global_attr_row");a(this).prop("checked")?b.addClass("wpacu_selected"):b.removeClass("wpacu_selected")}),a("#wpacu_wrap_assets").length>0&&setTimeout(function(){f.load()},200),a("#wpacu-plugins-load-manager-wrap").length>0&&setTimeout(function(){f.pluginLoadManager()},200),"undefined"==typeof wpacu_object||a("#wpacu_meta_box_content").length<1)return!1;("default"===wpacu_object.list_show_status||""===wpacu_object.list_show_status||wpacu_object.override_assets_list_load)&&b(),"fetch_on_click"===wpacu_object.list_show_status&&a("#wpacu_ajax_fetch_on_click_btn").click(function(c){c.preventDefault(),a(this).hide(),a("#wpacu_fetching_assets_list_wrap").show(),b()}),a(document).on("click",".wp-admin.post-php .edit-post-header__settings button.is-primary",function(){var c=function(){if(0===a(".edit-post-header__settings .is-saving").length){if(a("#wpacu_unload_assets_area_loaded").length>0&&a("#wpacu_unload_assets_area_loaded").val()){a("#wpacu-assets-reloading").remove();var c='<span id="wpacu-assets-reloading" class="editor-post-saved-state is-wpacu-reloading">'+wpacu_object.reload_icon+wpacu_object.reload_msg+"</span>";a(".wp-admin.post-php .edit-post-header__settings").prepend(c)}a(".wpacu_asset_row").addClass("wpacu-loading"),b(),wpacuAjaxClearCache(),clearInterval(d)}},d=setInterval(c,900)})}),""!==wpacu_object.clear_cache_on_page_load&&wpacuAjaxClearCache(),""!==wpacu_object.clear_other_caches&&setTimeout(function(){wpacuClearAutoptimizeCache()},150),jQuery(document).ready(function(a){try{var b;a('input[type="hidden"][name="_wp_http_referer"]').length>0&&(b=a('input[type="hidden"][name="_wp_http_referer"]').val(),b.includes("term.php?taxonomy=")&&b.includes("message=")&&wpacuAjaxClearCache(),b.includes("post.php?post=")&&b.includes("message=")&&wpacuAjaxClearCache())}catch(a){console.log(a)}});
|
1 |
+
function wpacuTabOpenSettingsArea(a,b){a.preventDefault();var c,d,e;for(d=document.getElementsByClassName("wpacu-settings-tab-content"),c=0;c<d.length;c++)d[c].style.display="none";for(e=document.getElementsByClassName("wpacu-settings-tab-link"),c=0;c<e.length;c++)e[c].className=e[c].className.replace(" active","");document.getElementById(b).style.display="table-cell",jQuery('a[href="#'+b+'"]').addClass("active"),jQuery("#wpacu-selected-tab-area").val(b)}function wpacuBytesToSize(a){return 0===a?"N/A":(a/1024).toFixed(4)+" KB"}function wpacuAjaxClearCache(){jQuery.post(wpacu_object.ajax_url+"?wpacu_clear_cache",{action:wpacu_object.plugin_id+"_clear_cache",time_r:(new Date).getTime()},function(a){setTimeout(function(){wpacuClearAutoptimizeCache(),wpacu_object.is_frontend_view?jQuery.post(wpacu_object.ajax_url+"?wpacu_preload_guest",{action:wpacu_object.plugin_id+"_preload",page_url:wpacu_object.page_url,time_r:(new Date).getTime()}):jQuery.get(wpacu_object.page_url,{wpacu_preload:1,wpacu_no_frontend_show:1,time_r:(new Date).getTime()},function(){jQuery.post(wpacu_object.ajax_url+"?wpacu_preload_guest",{action:wpacu_object.plugin_id+"_preload",page_url:wpacu_object.page_url,time_r:(new Date).getTime()})})},150)})}function wpacuClearAutoptimizeCache(){jQuery("#wp-admin-bar-autoptimize-default li").length>0&&void 0!==autoptimize_ajax_object.ajaxurl&&void 0!==autoptimize_ajax_object.nonce&&jQuery.ajax({type:"GET",url:autoptimize_ajax_object.ajaxurl,data:{action:"autoptimize_delete_cache",nonce:autoptimize_ajax_object.nonce},dataType:"json",cache:!1,timeout:9e3,success:function(a){},error:function(a,b){}})}jQuery(document).ready(function(a){function b(b){b.lastIndexOf(wpacu_object.start_del_h)<0||b.lastIndexOf(wpacu_object.end_del_h);var c=b.substring(b.lastIndexOf(wpacu_object.start_del_h)+wpacu_object.start_del_h.length,b.lastIndexOf(wpacu_object.end_del_h)),d=a("#wpacu-assets-collapsible-wrap-hardcoded-list").attr("data-wpacu-settings-frontend"),e={action:wpacu_object.plugin_name+"_print_loaded_hardcoded_assets",wpacu_list_h:c,wpacu_settings:d,time_r:(new Date).getTime()};a.post(wpacu_object.ajax_url,e,function(b){if(b){var c=JSON.parse(b);a("#wpacu-assets-collapsible-wrap-hardcoded-list").find("> .wpacu-assets-collapsible-content").html(c.output),a("#wpacu-assets-collapsible-wrap-hardcoded-list").find("a.wpacu-assets-collapsible").append(" ➝ Total: "+parseInt(c.total_hardcoded_assets)),g.triggerForHardcodedAssets()}})}function c(){if(!a("#wpacu_ajax_fetch_assets_list_dashboard_view").length)return!1;var b={};if("direct"===wpacu_object.dom_get_type)b[wpacu_object.plugin_name+"_load"]=1,b[wpacu_object.plugin_name+"_time_r"]=(new Date).getTime(),a.ajax({method:"GET",url:wpacu_object.page_url,data:b,cache:!1,complete:function(b,c){if("error"===b.statusText){if(404===b.status)return void d(b.responseText,b.status);var e=b.responseText.replace(/(<([^>]+)>)/gi,"");try{e=String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}catch(a){console.log(a)}var f=wpacu_object.ajax_direct_fetch_error;f=f.replace(/{wpacu_output}/,e),f=f.replace(/{wpacu_status_code_error}/,b.status),a("#wpacu_meta_box_content").html(f)}}}).done(function(b){a("#wpacu-fetch-list-step-1-wrap").addClass("wpacu-completed"),a("#wpacu-fetch-list-step-1-status").html(a("#wpacu-list-step-completed-status").html()),a("#wpacu-fetch-list-step-2-status").html(a("#wpacu-list-step-default-status").html()),d(b)});else if("wp_remote_post"===wpacu_object.dom_get_type){var c={action:wpacu_object.plugin_name+"_get_loaded_assets",post_id:wpacu_object.post_id,page_url:wpacu_object.page_url,tag_id:wpacu_object.tag_id,wpacu_taxonomy:wpacu_object.wpacu_taxonomy,time_r:(new Date).getTime(),force_manage_dash:wpacu_object.force_manage_dash};a.post(wpacu_object.ajax_url,c,function(b){if(!b)return!1;a("#wpacu_meta_box_content").html(b),a("#wpacu_home_page_form").length>0&&a("#submit").show(),setTimeout(function(){g.load(),setTimeout(function(){g.checkSourcesFor404Errors()},100)},200)})}}function d(b,c){if(b.lastIndexOf(wpacu_object.start_del_e)<0||b.lastIndexOf(wpacu_object.end_del_e)<0||b.lastIndexOf(wpacu_object.start_del_h)<0||b.lastIndexOf(wpacu_object.end_del_h)<0){var d=wpacu_object.ajax_direct_fetch_error_with_success_response;d=d.replace(/{wpacu_output}/,xhr.responseText.replace(/(<([^>]+)>)/gi,""));try{d=String(d).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}catch(a){console.log(a)}return void a("#wpacu_meta_box_content").html(d)}var e=b.substring(b.lastIndexOf(wpacu_object.start_del_e)+wpacu_object.start_del_e.length,b.lastIndexOf(wpacu_object.end_del_e)),f=b.substring(b.lastIndexOf(wpacu_object.start_del_h)+wpacu_object.start_del_h.length,b.lastIndexOf(wpacu_object.end_del_h)),h={action:wpacu_object.plugin_name+"_get_loaded_assets",wpacu_list_e:e,wpacu_list_h:f,post_id:wpacu_object.post_id,page_url:wpacu_object.page_url,tag_id:wpacu_object.tag_id,wpacu_taxonomy:wpacu_object.wpacu_taxonomy,force_manage_dash:wpacu_object.force_manage_dash,time_r:(new Date).getTime()};a.post(wpacu_object.ajax_url,h,function(b){b&&(a("#wpacu_meta_box_content").html(b),404===c&&a("#wpacu_meta_box_content").prepend('<p><span class="dashicons dashicons-warning"></span> '+wpacu_object.server_returned_404_not_found+"</p><hr />"),a("#wpacu_home_page_form").length>0&&a("#submit").show(),setTimeout(function(){g.load(),a(".wpacu_asset_row").removeClass("wpacu-loading"),a("#wpacu-assets-reloading").remove(),g.checkSourcesFor404Errors()},200))})}a('input[name="wpacu_sub_tab_area"]').click(function(){a(this).prop("checked")&&a("#wpacu-selected-sub-tab-area").val(a(this).val())}),a("#wpacu_minify_css_enable, #wpacu_combine_loaded_css_enable, #wpacu_minify_js_enable, #wpacu_combine_loaded_js_enable, #wpacu_cdn_rewrite_enable, #wpacu_enable_test_mode").click(function(){a(this).prop("checked")?a('[data-linked-to="'+a(this).attr("id")+'"]').find(".wpacu-circle-status").addClass("wpacu-on").removeClass("wpacu-off"):a('[data-linked-to="'+a(this).attr("id")+'"]').find(".wpacu-circle-status").addClass("wpacu-off").removeClass("wpacu-on")}),a(document).on("click","#wpacu_inline_css_files_below_size_checkbox",function(){a(this).is(":checked")?a("#wpacu_inline_css_files_enable").prop("checked",!0).trigger("tick"):""===a("#wpacu_inline_css_files_list").val()&&a("#wpacu_inline_css_files_enable").prop("checked",!1).trigger("tick")}),a(document).on("click","#wpacu_inline_js_files_below_size_checkbox",function(){if(a(this).is(":checked")){if(!confirm(wpacu_object.inline_auto_js_files_confirm_msg))return!1;a("#wpacu_inline_js_files_enable").prop("checked",!0).trigger("tick")}else""===a("#wpacu_inline_js_files_list").val()&&a("#wpacu_inline_js_files_enable").prop("checked",!1).trigger("tick")}),a("#wpacu-mark-license-valid-button").click(function(){return confirm(wpacu_object.mark_license_valid_confirm)}),a("#wpacu-license-form").submit(function(){a("#edd_license_activate_btn").attr("disabled","disabled"),a("#edd_license_deactivate_btn").attr("disabled","disabled"),a(".wpacu-license-spinner").show()});var e,f;a("#wpacu-reset-drop-down").on("change keyup keydown mouseup mousedown click",function(){""===a(this).val()?(a("#wpacu-warning-read").removeClass("wpacu-visible"),a("#wpacu-reset-submit-btn").attr("disabled","disabled").removeClass("button-primary").addClass("button-secondary")):("reset_everything"===a(this).val()?a("#wpacu-license-data-remove-area, #wpacu-cache-assets-remove-area").addClass("wpacu-visible"):a("#wpacu-license-data-remove-area, #wpacu-cache-assets-remove-area").removeClass("wpacu-visible"),a("#wpacu-warning-read").addClass("wpacu-visible"),a("#wpacu-reset-submit-btn").removeAttr("disabled").removeClass("button-secondary").addClass("button-primary")),a(".wpacu-tools-area .wpacu-warning").hide(),e=a(this).find("option:selected"),a("#"+e.attr("data-id")).show()}),a("#wpacu-reset-submit-btn").on("click",function(){if("reset_settings"===a("#wpacu-reset-drop-down").val()?f=wpacu_object.reset_settings_confirm_msg:"reset_everything_except_settings"===a("#wpacu-reset-drop-down").val()?f=wpacu_object.reset_everything_except_settings_confirm_msg:"reset_everything"===a("#wpacu-reset-drop-down").val()&&(f=wpacu_object.reset_everything_confirm_msg),!confirm(f))return!1;a("#wpacu-action-confirmed").val("yes"),setTimeout(function(){"yes"===a("#wpacu-action-confirmed").val()&&a("#wpacu-tools-form").submit()},1e3)}),a("#wpacu-import-form").submit(function(){if(!confirm(wpacu_object.import_confirm_msg))return!1;a(this).find("button").addClass("wpacu-importing").prop("disabled",!0)});var g={load:function(){var b,c,d,e=".input-unload-on-this-page.wpacu-not-locked";a(document).on("click change",".input-unload-on-this-page",function(e){if(b=a(this).attr("data-handle"),c=a(this).hasClass("wpacu_unload_rule_for_style")?"style":"script",a(this).prop("checked")){if("click"===e.type&&!g.triggerAlertWhenAnyUnloadRuleIsChosen(b,c))return!1;g.uncheckAllOtherBulkUnloadRules(a(this),!1),g.showHandleLoadExceptionArea(c,b),a(this).closest("tr").addClass("wpacu_not_load")}else a(this).closest("tr").removeClass("wpacu_not_load"),d=a(this).parents(".wpacu_asset_row"),g.hideHandleLoadExceptionArea(d,b,c)}),a(".wpacu-plugin-check-all").on("click",function(b){b.preventDefault();var c=a(this).attr("data-wpacu-plugin");a('table.wpacu_list_by_location[data-wpacu-plugin="'+c+'"]').find(e).prop("checked",!0).closest("tr").addClass("wpacu_not_load")}),a(".wpacu-plugin-uncheck-all").on("click",function(b){b.preventDefault();var c=a(this).attr("data-wpacu-plugin");a('table.wpacu_list_by_location[data-wpacu-plugin="'+c+'"]').find(e).prop("checked",!1).closest("tr").removeClass("wpacu_not_load")}),a(".wpacu-plugin-check-load-all").on("click change",function(b){b.preventDefault();var c=a(this).attr("data-wpacu-plugin"),d=a('table.wpacu_list_by_location[data-wpacu-plugin="'+c+'"]');d.find(".wpacu_load_it_option_one.wpacu_load_exception").prop("checked",!0).closest("tr.wpacu_is_bulk_unloaded").removeClass("wpacu_not_load"),d.find(e).prop("checked",!1).trigger("change")}),a(".wpacu-plugin-uncheck-load-all").on("click change",function(b){b.preventDefault();var c=a(this).attr("data-wpacu-plugin"),d=a('table.wpacu_list_by_location[data-wpacu-plugin="'+c+'"]');d.find(".wpacu_load_it_option_one.wpacu_load_exception").prop("checked",!1).closest("tr.wpacu_is_bulk_unloaded").addClass("wpacu_not_load"),d.find(e).prop("checked",!1).trigger("change")}),a(".wpacu_keep_bulk_rule").click(function(){a(this).prop("checked")&&a(this).parents("li").next().removeClass("remove_rule")}),a(".wpacu_remove_bulk_rule").click(function(){a(this).prop("checked")&&a(this).parents("li").addClass("remove_rule")}),a(document).on("click change",".wpacu_bulk_unload",function(e){b=a(this).attr("data-handle"),c=a(this).attr("data-handle-for"),d=a("[data-"+c+'-handle-row="'+b+'"]');var f=a(this).parents("li");if(a(this).prop("checked")){if("click"===e.type&&!g.triggerAlertWhenAnyUnloadRuleIsChosen(b,c))return!1;a(this).hasClass("wpacu_unload_it_regex_checkbox")?(f.find("label").addClass("wpacu_unload_checked"),f.find("textarea").prop("disabled",!1).focus().removeClass("wpacu_disabled"),f.find(".wpacu_handle_unload_regex_input_wrap").removeClass("wpacu_hide")):(a(this).parent("label").addClass("wpacu_input_load_checked"),a(this).closest("tr").addClass("wpacu_not_load")),g.showHandleLoadExceptionArea(c,b),a(this).hasClass("wpacu_global_unload")?(g.uncheckAllOtherBulkUnloadRules(a(this),!0),a('.input-unload-on-this-page[data-handle-for="'+c+'"][data-handle="'+b+'"]').prop("checked",!1)):a(this).hasClass("wpacu_post_type_unload")&&(g.uncheckAllOtherBulkUnloadRules(a(this),!1),a('.input-unload-on-this-page[data-handle-for="'+c+'"][data-handle="'+b+'"]').prop("checked",!1))}else a(this).hasClass("wpacu_unload_it_regex_checkbox")?(f.find("label").removeClass("wpacu_unload_checked"),f.find("textarea").blur().addClass("wpacu_disabled"),""===f.find("textarea").val().trim()&&(f.find("textarea").prop("disabled",!0).val(""),f.find(".wpacu_handle_unload_regex_input_wrap").addClass("wpacu_hide"))):(a(this).parent("label").removeClass("wpacu_input_load_checked"),a(this).closest("tr").removeClass("wpacu_not_load")),g.hideHandleLoadExceptionArea(d,b,c);d.hasClass("wpacu_is_bulk_unloaded")||a(".wpacu_bulk_unload:not(.wpacu_unload_it_regex_checkbox)").is(":checked")||a(this).closest("tr").removeClass("wpacu_not_load")}),a(document).on("click change",".wpacu_load_it_option_one.wpacu_load_exception",function(){var b=a(this).attr("data-handle");if(a(this).prop("checked")){a(this).parent("label").addClass("wpacu_global_unload_exception");var c="";a(this).hasClass("wpacu_style")?c="style":a(this).hasClass("wpacu_script")&&(c="script"),a("#"+c+"_"+b).prop("checked",!1).trigger("change")}else a(this).parent("label").removeClass("wpacu_global_unload_exception")}),a(document).on("click change",".wpacu_load_it_option_two",function(){var b=a(this).parents("li");a(this).prop("checked")?(b.find("label").addClass("wpacu_bold"),b.find("textarea").prop("disabled",!1).focus().removeClass("wpacu_disabled"),b.find(".wpacu_load_regex_input_wrap").removeClass("wpacu_hide")):(b.find("label").removeClass("wpacu_bold"),b.find("textarea").blur().addClass("wpacu_disabled"),""===b.find("textarea").val().trim()&&(b.find("textarea").prop("disabled",!0).val(""),b.find(".wpacu_load_regex_input_wrap").addClass("wpacu_hide")))}),a(document).on("click change",".wpacu_script_attr_rule_input",function(b){if(a(this).is(":checked")){if("click"===b.type){var c=a(this).parents("tr.wpacu_asset_row").attr("data-script-child-handles"),d=wpacu_object.script_is_parent_alert;if(void 0!==c&&""!==c&&(d=d.replace("{wpacu_script_child_handles}",c),!confirm(d)))return!1}a(this).parents("ul").find(".wpacu_script_attr_rule_input").not(a(this)).prop("checked",!1),a(this).hasClass("wpacu_script_attr_rule_global")&&a(this).parents("ul").find(".wpacu-script-attr-make-exception").removeClass("wpacu_hide")}a(this).parents("ul").find(".wpacu_script_attr_rule_global").is(":checked")||a(this).parents("ul").find(".wpacu-script-attr-make-exception").addClass("wpacu_hide")}),a(document).on("change",".wpacu-screen-size-load",function(b){var c,d,e=a(this).val(),f=a(this).attr("data-handle");a(this).hasClass("wpacu-for-script")?c=a('.wpacu-handle-media-queries-load-field[data-script-handle="'+f+'"]'):a(this).hasClass("wpacu-for-style")&&(c=a('.wpacu-handle-media-queries-load-field[data-style-handle="'+f+'"]')),c.length<1||(d=c.find(":input"),e?(c.addClass("wpacu-is-visible"),d.prop("disabled",!1)):(c.removeClass("wpacu-is-visible"),""===d.val().trim()&&"true"===d.attr("data-wpacu-is-empty-on-page-load")&&d.prop("disabled",!0).val("")))}),a(document).on("click",".wpacu-add-handle-note",function(b){b.preventDefault();var c,d,e=a(this).attr("data-handle");a(this).hasClass("wpacu-for-script")?c=a('.wpacu-handle-notes-field[data-script-handle="'+e+'"]'):a(this).hasClass("wpacu-for-style")&&(c=a('.wpacu-handle-notes-field[data-style-handle="'+e+'"]')),c.length<1||(d=c.find(":input"),c.is(":hidden")?(c.show(),d.prop("disabled",!1)):(c.hide(),""===d.val().trim()&&"true"===d.attr("data-wpacu-is-empty-on-page-load")&&d.prop("disabled",!0).val("")))}),a(document).on("click",".wpacu-external-file-size",function(b){b.preventDefault();var c,d=a(this),e=d.attr("data-src");d.hide(),c=d.next(),c.show(),e.includes("/?")?a.get(e,{},function(a,b,d){if("success"!==b)return"N/A";c.html(wpacuBytesToSize(a.length))}):a.post(wpacu_object.ajax_url,{action:wpacu_object.plugin_id+"_get_external_file_size",wpacu_remote_file:e},function(a){c.html(a)})}),a(document).on("click",".wpacu_handle_row_expand_contract",function(b){b.preventDefault();var c=a(this).attr("data-wpacu-handle"),d=a(this).attr("data-wpacu-handle-for");a(this).find("span").hasClass("dashicons-minus")?(a(this).parents("td").attr("data-wpacu-row-status","contracted").find(".wpacu_handle_row_expanded_area").addClass("wpacu_hide"),a(this).find("span").removeClass("dashicons-minus").addClass("dashicons-plus"),a("#wpacu_"+d+"_"+c+"_row_contracted_area").val("1")):a(this).find("span").hasClass("dashicons-plus")&&(a(this).parents("td").attr("data-wpacu-row-status","expanded").find(".wpacu_handle_row_expanded_area").removeClass("wpacu_hide"),a(this).find("span").removeClass("dashicons-plus").addClass("dashicons-minus"),a("#wpacu_"+d+"_"+c+"_row_contracted_area").val(""))})},triggerForHardcodedAssets:function(){a('[data-is-hardcoded-asset="true"]').length>0&&(a.each(a('[data-is-hardcoded-asset="true"]'),function(b,c){g.updateHardcodedDataHiddenFieldStatus(a(this))}),a('[data-is-hardcoded-asset="true"]').on("click",".wpacu_unload_rule_input",function(){g.updateHardcodedDataHiddenFieldStatus(a(this).parents("[data-is-hardcoded-asset]"))}))},updateHardcodedDataHiddenFieldStatus:function(b){var c=!1;b.is("[data-style-handle-row]")?c=b.attr("data-style-handle-row"):b.is("[data-script-handle-row]")&&(c=b.attr("data-script-handle-row")),c&&(b.find(".wpacu_unload_rule_input:checked").length>0||b.hasClass("wpacu_not_load")?a("#"+c+"_hardcoded_data").prop("disabled",!1):a("#"+c+"_hardcoded_data").prop("disabled",!0))},triggerAlertWhenAnyUnloadRuleIsChosen:function(b,c){if("dashicons"===b&&"style"===c&&a('input[name="wpacu_ignore_child[styles][nf-display]').length>0&&!confirm(wpacu_object.dashicons_unload_alert_ninja_forms))return!1;if("script"===c){if(("jquery"===b||"jquery-core"===b)&&a("#script_jquery_ignore_children").length>0&&!confirm(wpacu_object.jquery_unload_alert))return!1;if("js-cookie"===b&&!confirm(wpacu_object.woo_js_cookie_unload_alert))return!1;if("wc-cart-fragments"===b&&!confirm(wpacu_object.woo_wc_cart_fragments_unload_alert))return!1;if(("backbone"===b||"underscore"===b)&&!confirm(wpacu_object.sensitive_library_unload_alert))return!1}return!0},pluginLoadManager:function(){a(".wpacu_plugin_load_it").on("click",function(){var b=a(this).attr("data-wpacu-plugin-path");a(this).prop("checked")&&(g.hidePluginLoadExceptionArea(b),a('.wpacu_plugin_unload_regex_input_wrap[data-wpacu-plugin-path="'+b+'"]').addClass("wpacu_hide"),a('.wpacu_plugin_unload_site_wide[data-wpacu-plugin-path="'+b+'"]').parent("label").removeClass("wpacu_plugin_unload_rule_input_checked"),a('.wpacu_plugin_unload_regex_radio[data-wpacu-plugin-path="'+b+'"]').parent("label").removeClass("wpacu_plugin_unload_rule_input_checked"))}),a(".wpacu_plugin_unload_site_wide").on("click",function(){var b=a(this).attr("data-wpacu-plugin-path");a(this).prop("checked")?(a(this).parent("label").addClass("wpacu_plugin_unload_rule_input_checked"),a('.wpacu_plugin_unload_regex_radio[data-wpacu-plugin-path="'+b+'"]').parent("label").removeClass("wpacu_plugin_unload_rule_input_checked"),a('.wpacu_plugin_unload_regex_input_wrap[data-wpacu-plugin-path="'+b+'"]').addClass("wpacu_hide"),g.showPluginLoadExceptionArea(b)):(a(this).parent("label").removeClass("wpacu_plugin_unload_rule_input_checked"),a('.wrap_plugin_load_exception_options[data-wpacu-plugin-path="'+b+'"]').addClass("wpacu_hide").find('input[type="checkbox"]').prop("disabled",!0))}),a(".wpacu_plugin_unload_regex_radio").on("click",function(){var b=a(this).attr("data-wpacu-plugin-path");a(this).prop("checked")?(a(this).parent("label").addClass("wpacu_plugin_unload_rule_input_checked"),a('.wpacu_plugin_unload_regex_input_wrap[data-wpacu-plugin-path="'+b+'"]').removeClass("wpacu_hide"),g.showPluginLoadExceptionArea(b),a('.wpacu_plugin_unload_site_wide[data-wpacu-plugin-path="'+b+'"]').prop("checked",!1).parent("label").removeClass("wpacu_plugin_unload_rule_input_checked")):(a('.wpacu_plugin_unload_regex_input_wrap[data-wpacu-plugin-path="'+b+'"]').addClass("wpacu_hide"),a(this).parent("label").removeClass("wpacu_plugin_unload_rule_input_checked"),a('.wrap_plugin_load_exception_options[data-wpacu-plugin-path="'+b+'"]').addClass("wpacu_hide"))}),a(".wpacu_plugin_load_exception_regex").on("click",function(){var b=a(this).attr("data-wpacu-plugin-path");a(this).prop("checked")?a('.wpacu_load_regex_input_wrap[data-wpacu-plugin-path="'+b+'"]').removeClass("wpacu_hide"):a('.wpacu_load_regex_input_wrap[data-wpacu-plugin-path="'+b+'"]').addClass("wpacu_hide")})},showPluginLoadExceptionArea:function(b){a('.wrap_plugin_load_exception_options[data-wpacu-plugin-path="'+b+'"]').removeClass("wpacu_hide").find('input[type="checkbox"]').prop("disabled",!1)},hidePluginLoadExceptionArea:function(b){a('.wrap_plugin_load_exception_options[data-wpacu-plugin-path="'+b+'"]').addClass("wpacu_hide").find('input[type="checkbox"]').prop("disabled",!0)},showHandleLoadExceptionArea:function(b,c){var d=a("div.wpacu_exception_options_area_wrap[data-"+b+'-handle="'+c+'"]');d.parent("div").removeClass("wpacu_hide"),d.find('input[type="checkbox"]').prop("disabled",!1)},hideHandleLoadExceptionArea:function(b,c,d){if(!b.hasClass("wpacu_is_bulk_unloaded")&&!b.find(".wpacu_bulk_unload").is(":checked")){var e=a("div.wpacu_exception_options_area_wrap[data-"+d+'-handle="'+c+'"]');e.parent("div").addClass("wpacu_hide"),e.find('input[type="checkbox"]').prop("disabled",!0)}},uncheckAllOtherBulkUnloadRules:function(a,b){var c=".wpacu_bulk_unload";!1===b&&(c=".wpacu_bulk_unload:not(.wpacu_unload_it_regex_checkbox)"),a.closest("tr").find(c).not(a).prop("checked",!1).parent("label").removeClass("wpacu_input_load_checked").removeClass("wpacu_unload_checked")},checkSourcesFor404Errors:function(){var b=a("[data-wpacu-external-source]");if(!(b.length<1)){var c=b.length,d="";b.each(function(b){var e=a(this),f=e.attr("data-wpacu-external-source");d+=f+"-at-wpacu-at-",b===c-1&&jQuery.post(wpacu_object.ajax_url+"?wpacu_check_external_url",{action:wpacu_object.plugin_id+"_check_external_urls_for_status_code",wpacu_check_urls:d},function(b){var c=jQuery.parseJSON(b);a.each(c,function(b,c){a('[data-wpacu-external-source="'+c+'"]').css({color:"#cc0000"}).parent("div").find("[data-wpacu-external-source-status]").html('<small>* <em style="font-weight: 600;">'+wpacu_object.source_load_error_msg+"</em></small>")})})})}}};a(window).on("load",function(){g.checkSourcesFor404Errors()}),a("#wpacu_post_type_select").change(function(){a("#wpacu_post_type_form").submit()}),a("#wpacu_taxonomy_select").change(function(){a("#wpacu_taxonomy_form").submit()}),a("#wpacu_dashboard").click(function(){a(this).prop("checked")?a("#wpacu-settings-assets-retrieval-mode").show():a("#wpacu-settings-assets-retrieval-mode").hide()}),a(".wpacu-dom-get-type-selection").change(function(){a(this).is(":checked")&&(a(".wpacu-dom-get-type-info").hide(),a("#"+a(this).attr("data-target")).fadeIn("fast"))}),a("#wpacu_frontend").click(function(){a(this).prop("checked")?a("#wpacu-settings-frontend-exceptions").show():a("#wpacu-settings-frontend-exceptions").hide()}),a(".google_fonts_combine_type").change(function(){a(".wpacu_google_fonts_combine_type_area").hide(),"async"===a(this).val()?a("#wpacu_google_fonts_combine_type_async_info_area").fadeIn():"async_preload"===a(this).val()?a("#wpacu_google_fonts_combine_type_async_preload_info_area").fadeIn():a("#wpacu_google_fonts_combine_type_rb_info_area").fadeIn()}),a("#wpacu_assets_list_layout").on("click change",function(){"by-location"===a(this).val()?a("#wpacu-assets-list-by-location-selected").fadeIn("fast"):a("#wpacu-assets-list-by-location-selected").fadeOut("fast")}),a("#wpacu_disable_jquery_migrate").on("click",function(){return!a(this).is(":checked")||(!(!a(this).is(":checked")||!confirm(wpacu_object.jquery_migration_disable_confirm_msg))||(a(this).prop("checked",!1),!1))}),a("#wpacu_disable_comment_reply").on("click",function(){return!a(this).is(":checked")||(!(!a(this).is(":checked")||!confirm(wpacu_object.comment_reply_disable_confirm_msg))||(a(this).prop("checked",!1),!1))}),a("[data-target-opacity]").on("click change tick",function(){a(this).prop("checked")?a("#"+a(this).attr("data-target-opacity")).css({opacity:1}):a("#"+a(this).attr("data-target-opacity")).css({opacity:.4})}),a(".wpacu-combine-loaded-js-level").change(function(){a(this).is(":checked")&&(a(".wpacu_combine_loaded_js_level_area").removeClass("wpacu_active"),a("#"+a(this).attr("data-target")).addClass("wpacu_active"))});var h=a('#wpacu-update-button-area input[type="submit"]');h.parents("form").submit(function(){h.attr("disabled",!0),a("#wpacu-updating-settings").show()});var i=a("#wpacu-update-front-settings-area .wpacu_update_btn");if(i.parents("form").submit(function(){return i.attr("disabled",!0).addClass("wpacu_submitting"),a("#wpacu-updating-front-settings").show(),!0}),a("form#wpacu-settings-form, form#wpacu_home_page_form").submit(function(){return h.attr("disabled",!0),!0}),a(".wpacu_bulk_rule_checkbox, .wpacu_remove_preload").click(function(){var b=a(this).parents(".wpacu_bulk_change_row");a(this).prop("checked")?b.addClass("wpacu_selected"):b.removeClass("wpacu_selected")}),a(".wpacu_remove_regex").click(function(){var b=a(this).parents(".wpacu_regex_rule_row");a(this).prop("checked")?b.addClass("wpacu_enabled"):b.removeClass("wpacu_enabled")}),a(".wpacu_restore_position").click(function(){var b=a(this).parents(".wpacu_restore_position_row");a(this).prop("checked")?b.addClass("wpacu_selected"):b.removeClass("wpacu_selected")}),a(".wpacu_remove_global_attr").click(function(){var b=a(this).parents(".wpacu_remove_global_attr_row");a(this).prop("checked")?b.addClass("wpacu_selected"):b.removeClass("wpacu_selected")}),a("#wpacu_wrap_assets").length>0&&setTimeout(function(){g.load()},200),a("#wpacu-plugins-load-manager-wrap").length>0&&setTimeout(function(){g.pluginLoadManager()},200),a("#wpacu-assets-collapsible-wrap-hardcoded-list").length>0){var j={};j[wpacu_object.plugin_name+"_load"]=1,j[wpacu_object.plugin_name+"_time_r"]=(new Date).getTime(),j.wpacu_just_hardcoded=1,a.ajax({method:"GET",url:wpacu_object.page_url,data:j,cache:!1,complete:function(a,c){"error"===a.statusText&&b(a.responseText)}}).done(function(a){b(a)})}if("undefined"==typeof wpacu_object||a("#wpacu_meta_box_content").length<1)return!1;("default"===wpacu_object.list_show_status||""===wpacu_object.list_show_status||wpacu_object.override_assets_list_load)&&c(),"fetch_on_click"===wpacu_object.list_show_status&&a("#wpacu_ajax_fetch_on_click_btn").click(function(b){b.preventDefault(),a(this).hide(),a("#wpacu_fetching_assets_list_wrap").show(),c()}),a(document).on("click",".wp-admin.post-php .edit-post-header__settings button.is-primary",function(){var b=function(){if(0===a(".edit-post-header__settings .is-saving").length){if(a("#wpacu_unload_assets_area_loaded").length>0&&a("#wpacu_unload_assets_area_loaded").val()){a("#wpacu-assets-reloading").remove();var b='<span id="wpacu-assets-reloading" class="editor-post-saved-state is-wpacu-reloading">'+wpacu_object.reload_icon+wpacu_object.reload_msg+"</span>";a(".wp-admin.post-php .edit-post-header__settings").prepend(b)}a(".wpacu_asset_row").addClass("wpacu-loading"),c(),wpacuAjaxClearCache(),clearInterval(d)}},d=setInterval(b,900)})}),""!==wpacu_object.clear_cache_on_page_load&&wpacuAjaxClearCache(),""!==wpacu_object.clear_other_caches&&setTimeout(function(){wpacuClearAutoptimizeCache()},150),jQuery(document).ready(function(a){try{var b;a('input[type="hidden"][name="_wp_http_referer"]').length>0&&(b=a('input[type="hidden"][name="_wp_http_referer"]').val(),b.includes("term.php?taxonomy=")&&b.includes("message=")&&wpacuAjaxClearCache(),b.includes("post.php?post=")&&b.includes("message=")&&wpacuAjaxClearCache())}catch(a){console.log(a)}});
|
assets/style.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
@charset "UTF-8";#wpacu-pages-info-area{width:98%}#wpacu-top-area{margin:15px 0;padding:0 10px}#wpacu-quick-actions{color:#74777b;float:right;width:auto;margin-right:30px;background:rgba(40,44,42,.05);border-radius:10px;padding:6px 12px}#wpacu-quick-actions .wpacu-actions-title{font-weight:200;letter-spacing:.5px}#wpacu-quick-actions a{color:#004567;text-decoration:none}#wpacu-quick-actions a:hover{color:#0073aa}#wpacu-logo-wrap{width:auto;display:inline-block;position:relative}#wpacu-logo-wrap a{display:block}#wpacu-logo-wrap img{width:352px;height:79px}#wpacu-logo-wrap .wpacu-pro-sign{position:absolute;height:auto;font-family:FiraSans-Medium,proxima-nova-1,Montserrat,Helvetica,sans-serif;font-size:13px;font-weight:600;letter-spacing:1px;padding:5px 11px;border-radius:15px;right:-60px;top:30px;width:auto;display:inline-block;text-align:center}#wpacu-logo-wrap .wpacu-pro-sign.wpacu-lite{color:#74777b;background:rgba(40,44,42,.05)}#wpacu-logo-wrap .wpacu-pro-sign.wpacu-pro{color:#004567;background-color:rgba(40,44,42,.05)}.wpacu-tabs{position:relative;overflow:hidden;margin:0 auto 20px;width:100%;font-weight:300;font-size:20px}.wpacu-tabs nav{text-align:center}.wpacu-tabs nav ul{position:relative;display:-ms-flexbox;display:-webkit-flex;display:-moz-flex;display:-ms-flex;display:flex;padding:0;list-style:none;-ms-box-orient:horizontal;-ms-box-pack:center;-webkit-flex-flow:row wrap;-moz-flex-flow:row wrap;-ms-flex-flow:row wrap;flex-flow:row wrap;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;justify-content:center}.wpacu-tabs nav ul li{position:relative;z-index:1;display:block;margin:0;text-align:center;-webkit-flex:1;-moz-flex:1;-ms-flex:1;flex:1}.wpacu-tabs nav ul li span.extra-info{position:absolute;font-size:12px;left:-50%;right:50%;bottom:12px;-webkit-transform:translate(50%,50%);transform:translate(50%,50%);white-space:nowrap}.wpacu-tabs nav ul li span.extra-info.has-bulk-unloads{right:48%}.wpacu-tabs nav ul li span.extra-info.no-bulk-unloads{left:0;right:2px;bottom:2px;-webkit-transform:inherit;transform:inherit}.wpacu-tabs nav ul li span.extra-info .dashicons{font-size:16px;margin-right:-3px;margin-top:1px}.wpacu-tabs nav ul li span.extra-info.license-status.inactive{color:#c00}.wpacu-tabs nav ul li span.extra-info.license-status.active{color:green}.wpacu-tabs nav ul li span.extra-info.assets-unloaded-false{color:#004567}.wpacu-tabs nav ul li span.extra-info.assets-unloaded-true,.wpacu-tabs nav ul li span.extra-info.bulk-unloads-true{color:green}.wpacu-tabs nav a{position:relative;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:2.5}.wpacu-tabs nav a span{vertical-align:middle;font-size:14px}.wpacu-tabs nav li.wpacu-tab-current a{color:#74777b}.wpacu-tabs nav a:focus{outline:0}.wpacu-tabs .dashicons{font-size:20px}.no-js .wpacu-content-wrap section{display:block;padding-bottom:2em;border-bottom:1px solid rgba(255,255,255,.6)}.no-flexbox nav ul{display:block}.no-flexbox nav ul li{min-width:15%;display:inline-block}@media screen and (max-width:58em){.wpacu-tabs nav a.icon span{display:none}.wpacu-tabs nav a:before{margin-right:0}}.wpacu-tabs-style-underline nav{background:#fff}.wpacu-tabs-style-underline nav a{color:#74777b;font-size:18px;text-transform:uppercase;text-decoration:none;padding:.25em 0 .5em;border-left:1px solid #e7ecea;-webkit-transition:color .2s;transition:color .2s}.wpacu-tabs-style-underline nav li:last-child a{border-right:1px solid #e7ecea}.wpacu-tabs-style-underline nav li a::after{position:absolute;bottom:0;left:0;width:100%;height:6px;background:#2CC185;content:"";-webkit-transition:-webkit-transform .3s;transition:transform .3s;-webkit-transform:translate3d(0,150%,0);transform:translate3d(0,150%,0)}.wpacu-tabs-style-underline nav li.wpacu-tab-current a::after{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.wpacu-tabs-style-underline nav a span{font-weight:700}.wpacu-tabs-style-topline{max-width:1800px;margin:20px auto 22px 0;width:98%;font-weight:300;text-decoration:none}.wpacu-tabs-style-topline nav li{border:1px solid rgba(40,44,42,.1)}.wpacu-tabs-style-topline nav li:not(:last-child){border-right:none}.wpacu-tabs-style-topline nav li.wpacu-tab-current{border-top-color:#008f9c;border-bottom:none}.wpacu-tabs-style-topline nav a{padding:20px 18px;background:rgba(40,44,42,.05);color:#74777b;line-height:1;-webkit-transition:color .2s;transition:color .2s;text-decoration:none}.wpacu-tabs-style-topline nav a:focus,.wpacu-tabs-style-topline nav a:hover{background:0 0;color:#008f9c}.wpacu-tabs-style-topline nav li.wpacu-tab-current a{background:0 0;box-shadow:inset 0 3px 0 #008f9c;color:#008f9c}.wpacu-tabs-style-topline nav li.wpacu-tab-current a span:not(.dashicons){font-weight:600}.wpacu-tabs-style-topline nav a span{text-transform:uppercase;font-weight:400}.wpacu-tab-nav-wrapper{border-bottom:none!important}.wpacu-tab-nav-wrapper .nav-tab.nav-tab-active{background:#fff;position:relative}.wpacu-tab-nav-wrapper .nav-tab.nav-tab-active:after{content:"";width:100%;bottom:-2px;left:0;position:absolute;border-bottom:2px solid #fff}.wpacu_hide{display:none!important}.wpacu-script-attributes-area{display:block;margin-bottom:12px}.wpacu-script-attributes-area>div:first-of-type{display:inline-block;float:left;margin-right:15px;line-height:30px;vertical-align:middle}.wpacu-script-attributes-area ul.wpacu-script-attributes-settings{display:inline-block;float:left;padding:5px 7px!important}.wpacu-script-attributes-area ul.wpacu-script-attributes-settings.wpacu-first{margin:0 15px 0 0!important}.wpacu-script-attributes-area ul.wpacu-script-attributes-settings label{margin:0!important}.wpacu-script-attributes-area ul.wpacu-script-attributes-settings li{display:inline-block;margin:0 16px 0 0!important}.wpacu-script-attributes-area ul.wpacu-script-attributes-settings li:first-child{margin:0 10px 0 0!important}.wpacu-script-attributes-area ul.wpacu-script-attributes-settings li:last-child{margin:0 2px 0 0!important}.wpacu-script-attributes-area .wpacu-script-attributes-settings{background:#fff!important;border:1px solid #eee!important;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;padding:5px 10px!important;list-style:none;display:inline-block;margin:0}.wpacu-script-attributes-area .wpacu-script-attributes-settings input[type=radio]{width:auto;padding:0;margin:0 5px 0 0}.wpacu-script-attributes-area .wpacu-script-attributes-settings:hover{background:#f2faf2}tr.wpacu_location_changed>td{border-left:#004567 4px solid}tr.wpacu_not_load td,tr.wpacu_not_load th{background:#FFE1E1!important}tr.wpacu_not_load td .wpacu-assets-inline-code-wrap,tr.wpacu_not_load td .wpacu-script-attributes-area,tr.wpacu_not_load th .wpacu-assets-inline-code-wrap,tr.wpacu_not_load th .wpacu-script-attributes-area{filter:alpha(opacity=45);opacity:.45}.dashicons-wpacu{width:17px;height:17px;margin:2px 0 0;font-size:16px;text-decoration:none;color:inherit!important}#wpacu_meta_box_content #wpacu-fetch-list-step-1-wrap.wpacu-completed,.wpacu-license-area .notice .dashicons,.wpacu-settings-area .notice .dashicons{color:green}.wpacu_widefat .check-column.wpacu_check{padding:10px}body[class*=wpassetcleanup] #footer-left{border-left:2px solid green;padding-left:10px}#wpassetcleanup_asset_list small{width:auto;float:none;display:inline}#wpacu_meta_box_content{width:99%}#wpacu_meta_box_content div.select select{max-width:inherit}#wpacu_meta_box_content .emoji{font-size:18px}#wpacu_meta_box_content h3{margin-left:0;padding-left:0}#wpacu_meta_box_content div.wpacu_note{padding:10px;background-color:#f5f5f5}#wpacu_meta_box_content .dashicons.dashicons-warning,#wpacu_meta_box_content .dashicons.dashicons-wordpress-alt{color:#c00}#wpacu_meta_box_content .wpacu_verified{padding:10px;background-color:#f5f5f5;border-left:1px solid #ddd}#wpacu_meta_box_content .wpacu_verified span{color:#0073aa;font-weight:700}#wpacu_meta_box_content div.wpacu_warning{border:1px solid #c00}#wpacu_meta_box_content ul.wpacu_asset_options{margin:0;padding:0}#wpacu_meta_box_content ul.wpacu_asset_options li{list-style:none;display:inline-block}#wpacu_meta_box_content ul.wpacu_asset_options label{font-weight:400;margin-right:5px;margin-top:5px;margin-bottom:5px}.wpacu-updated-frontend{font-weight:400;background-color:#fff;border-left:4px solid #46b450;border-top:1px solid #46b450;border-right:1px solid #46b450;border-bottom:1px solid #46b450;padding:9px 14px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.wpacu_exception_options_area_wrap label.wpacu_bold span,.wpacu_load_regex_area_wrap label.wpacu_bold span,.wpacu_unload_regex_area_wrap label.wpacu_bold span{font-weight:600!important}.wpacu-updated-frontend span.dashicons-yes{color:#46b450;font-size:26px}#wpacu-update-front-settings-area{margin:10px 0;display:inline-block;position:relative}@media only screen and (min-width:768px){#wpacu-update-front-settings-area{position:-webkit-sticky;position:sticky;bottom:0;display:block;padding:15px 0;z-index:1000000;border-top:1px solid #cdcdcd;background:#fff}}#wpacu-updating-front-settings{display:none;position:absolute;top:20px;left:142px}.wpacu_load_regex_area_wrap label.wpacu_unload_checked span,.wpacu_unload_regex_area_wrap label.wpacu_unload_checked span{color:#d54e21}.wpacu_load_regex_area_wrap .wpacu_handle_unload_regex_input_wrap,.wpacu_unload_regex_area_wrap .wpacu_handle_unload_regex_input_wrap{margin:4px 0 0}.wpacu_load_regex_area_wrap .wpacu_handle_unload_regex_input_wrap input[type=text],.wpacu_unload_regex_area_wrap .wpacu_handle_unload_regex_input_wrap input[type=text]{line-height:normal;min-height:20px;min-width:300px;max-width:400px;display:inline-block;padding:4px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.wpacu_load_regex_area_wrap .wpacu_handle_unload_regex_input_wrap input[type=text].wpacu_disabled,.wpacu_unload_regex_area_wrap .wpacu_handle_unload_regex_input_wrap input[type=text].wpacu_disabled{background:#fbfafa!important;color:inherit}.wpacu_is_global_unloaded .wpacu_exception_options_area_wrap{display:inline-block}.wpacu_is_global_unloaded .wpacu_exception_options_area_wrap .wpacu_area_one,.wpacu_is_global_unloaded .wpacu_exception_options_area_wrap .wpacu_area_two,.wpacu_is_global_unloaded .wpacu_exception_options_area_wrap .wpacu_load_regex_input_wrap{display:block}.wpacu_exception_options_area_wrap{display:table;background:#fff!important}.wpacu_exception_options_area_wrap textarea{line-height:normal;min-height:20px;min-width:300px;max-width:400px;display:inline-block;padding:2px 4px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.wpacu_exception_options_area_wrap textarea:focus{width:100%}.wpacu_exception_options_area_wrap textarea.wpacu_disabled{background:#fbfafa!important;color:inherit}.wpacu_exception_options_area_wrap p:first-of-type{margin-top:0}.wpacu_exception_options_area_wrap .wpacu_area_one{display:table-cell;vertical-align:top;padding-right:10px}.wpacu_exception_options_area_wrap .wpacu_area_two{display:table-cell}@media only screen and (max-width:1199px){.wpacu_exception_options_area_wrap,.wpacu_exception_options_area_wrap .wpacu_area_one,.wpacu_exception_options_area_wrap .wpacu_area_two{display:block}}#wpacu_meta_box_content .wpacu_widefat{width:100%}#wpacu_meta_box_content .wpacu-assets-collapsible-content{padding:0 10px!important}#wpacu_meta_box_content ul.wpacu_asset_options{vertical-align:middle}#wpacu_meta_box_content ul.wpacu_asset_options.wpacu_exception_options_area li{display:inline-block;float:left;margin:1px 25px 1px 0;line-height:20px}#wpacu_meta_box_content ul.wpacu_asset_options.wpacu_exception_options_area li:last-of-type{margin:1px 0}#wpacu_meta_box_content ul.wpacu_asset_options.wpacu_exception_options_area li input[type=text]{margin-left:5px;border:1px solid #e7e7e7;background:#fff}body.wp-admin #wpacu_wrap_assets code{display:inline-block!important}body:not(.wp-admin) #wpacu_wrap_assets code{display:block!important}#wpacu_wrap_assets{color:#000!important;text-align:left!important;clear:both!important;width:90%!important;padding:20px!important;margin:30px 0 0 15px!important;border:1px solid #cdcdcd;z-index:10000!important;position:relative!important;background-color:#fff!important}#wpacu_wrap_assets div.wpacu_warning{border:1px solid #c00;padding:5px 10px}#wpacu_wrap_assets small{display:inline!important;margin:0!important;letter-spacing:normal!important}#wpacu_wrap_assets input[type=checkbox]{width:auto!important;margin-right:4px!important}#wpacu_wrap_assets img:not(.wpacu-ajax-loader){display:inline-block!important}#wpacu_wrap_assets p{line-height:22px!important;margin:10px 0!important;text-align:left!important;font-weight:400!important}#wpacu_wrap_assets p:first-child{margin:0 0 10px!important}#wpacu_wrap_assets h1{margin:0 0 20px!important;font-size:160%!important;text-align:left!important}#wpacu_wrap_assets h3{margin:20px 0;font-size:130%}#wpacu_wrap_assets ul.wpacu_asset_options.wpacu_exception_options_area li{display:inline-block;float:left;margin:1px 25px 1px 0;line-height:30px}#wpacu_wrap_assets ul.wpacu_asset_options.wpacu_exception_options_area li:last-of-type{margin:1px 0}.wpacu_verified{margin:0 0 10px!important}.wpacu_asset_row div.select{display:inline-block;width:auto}.wpacu_asset_row:first-child td{border-top:1px solid #cdcdcd}.wpacu_asset_row td{border-left:1px solid #cdcdcd;border-right:1px solid #cdcdcd;border-bottom:1px solid #cdcdcd}.wpacu_asset_row.wpacu_notice_row td{position:relative;padding:5px;border-bottom:1px solid transparent}.wpacu_asset_row.wpacu_notice_row td div.wpacu-warning{width:auto;margin:5px;font-style:italic}.wpacu_asset_row:not(.wpacu_notice_row) td{padding:18px!important;position:relative}.wpacu_asset_row:not(.wpacu_notice_row) td[data-wpacu-row-status=contracted]{padding:18px 18px 8px!important}.wpacu_asset_row:not(.wpacu_notice_row) td.wpacu_selected,.wpacu_asset_row:not(.wpacu_notice_row) td:hover{-moz-box-shadow:inset 0 0 12px #cdcdcd;-webkit-box-shadow:inset 0 0 12px #cdcdcd;box-shadow:inset 0 0 12px #cdcdcd}.wpacu_asset_row:not(.wpacu_notice_row) td p{padding:0!important;margin-bottom:8px!important;word-wrap:break-word!important;-ms-word-break:break-all;word-break:break-word}.wpacu_asset_row:not(.wpacu_notice_row) td label{width:auto!important;margin:0!important;cursor:pointer!important;display:inline-block!important;font-size:100%!important;font-weight:400!important}.wpacu_asset_row:not(.wpacu_notice_row) td label span:not(.dashicons){font-size:100%!important}.wpacu_asset_row:not(.wpacu_notice_row) td.wpacu_check{width:50px!important}.asset-table-extra-info td{padding:5px!important}body.wp-admin .wpacu_asset_row td.wpacu_check{width:25px!important}.wpacu_asset_row .dashicons-warning,.wpacu_asset_row .dashicons-wordpress-alt{color:red!important}.wpacu_asset_row .dashicons-wordpress-alt{font-size:17px;vertical-align:middle}label.wpacu_add_global{cursor:pointer!important}label.wpacu_input_load_checked{font-weight:700;color:#d54e21}label.wpacu_global_unload_exception{font-weight:700!important}tr.wpacu_bulk_change_row.wpacu_selected,tr.wpacu_global_rule_row.wpacu_selected,tr.wpacu_remove_preload_row.wpacu_selected{background:#e7e7e7}.nav-tab-wrapper{border-bottom:1px solid #ccc;width:95%}.nav-tab-wrapper.nav-assets-manager .nav-tab{font-size:13px;font-weight:500;padding:6px 10px}.nav-tab-wrapper.nav-assets-manager .nav-tab.for-pro{padding:6px 8px 6px 3px}ul.wpacu_asset_options{margin:0 10px 0 0;padding:0}ul.wpacu_asset_options li{margin:0 10px 0 0;list-style:none;display:inline-block;line-height:normal}ul.wpacu_asset_options li.remove_rule label{font-weight:700}ul.wpacu_asset_options label{margin-right:20px;font-weight:400}ul.wpacu_asset_options label input{margin-right:4px}.wpacu_list_table{width:100%;font-weight:400}.wpacu_list_table div,.wpacu_list_table li,.wpacu_list_table p{font-weight:400}.wpacu_widefat{width:99%}.wpacu_striped>tbody>:nth-child(even),ul.wpacu_striped>:nth-child(even){background-color:#fff!important}.wpacu_striped>tbody>:nth-child(odd),ul.wpacu_striped>:nth-child(odd){background-color:#f9f9f9!important}.wpacu_update_btn{width:auto;-moz-box-shadow:inset 0 1px 0 0 #54a3f7!important;-webkit-box-shadow:inset 0 1px 0 0 #54a3f7!important;box-shadow:inset 0 1px 0 0 #54a3f7!important;background:-webkit-gradient(linear,left top,left bottom,color-stop(.05,#007dc1),color-stop(1,#0061a7))!important;background:-moz-linear-gradient(top,#007dc1 5%,#0061a7 100%)!important;background:-webkit-linear-gradient(top,#007dc1 5%,#0061a7 100%)!important;background:-o-linear-gradient(top,#007dc1 5%,#0061a7 100%)!important;background:-ms-linear-gradient(top,#007dc1 5%,#0061a7 100%)!important;background:linear-gradient(to bottom,#007dc1 5%,#0061a7 100%)!important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#007dc1", endColorstr="#0061a7", GradientType=0)!important;background-color:#007dc1!important;-moz-border-radius:3px!important;-webkit-border-radius:3px!important;border-radius:3px!important;border:1px solid #124d77!important;display:inline-block!important;cursor:pointer!important;color:#fff!important;font-size:15px!important;padding:10px 24px!important;text-decoration:none!important;text-shadow:0 1px 0 #154682!important;height:auto!important;line-height:normal!important}.wpacu-btns .btn:focus,.wpacu-btns .btn:hover,.wpacu-btns a{text-decoration:none}.wpacu_update_btn.wpacu_submitting,.wpacu_update_btn:hover{background:-webkit-gradient(linear,left top,left bottom,color-stop(.05,#0061a7),color-stop(1,#007dc1))!important;background:-moz-linear-gradient(top,#0061a7 5%,#007dc1 100%)!important;background:-webkit-linear-gradient(top,#0061a7 5%,#007dc1 100%)!important;background:-o-linear-gradient(top,#0061a7 5%,#007dc1 100%)!important;background:-ms-linear-gradient(top,#0061a7 5%,#007dc1 100%)!important;background:linear-gradient(to bottom,#0061a7 5%,#007dc1 100%)!important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#0061a7", endColorstr="#007dc1", GradientType=0)!important;background-color:#0061a7!important}.wpacu_update_btn.wpacu_submitting{cursor:default!important}.wpacu_update_btn:active{position:relative!important;top:1px!important}.wpacu-btns .btn{display:inline-block;font-weight:400;line-height:1.25;text-align:center;white-space:nowrap;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:1px solid transparent;padding:.5rem 1rem;font-size:1rem;-webkit-border-radius:.25rem;-moz-border-radius:.25rem;border-radius:.25rem;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.wpacu-btns .btn.focus,.wpacu-btns .btn:focus{outline:0;-webkit-box-shadow:0 0 0 2px rgba(2,117,216,.25);box-shadow:0 0 0 2px rgba(2,117,216,.25)}.wpacu-btns .btn.disabled,.wpacu-btns .btn:disabled{cursor:not-allowed;opacity:.65}.wpacu-btns .btn.active,.wpacu-btns .btn:active{background-image:none}.wpacu-btns a.btn.disabled,.wpacu-btns fieldset[disabled] a.btn{pointer-events:none}.wpacu-btns .btn-primary{color:#fff;background-color:#0275d8;border-color:#0275d8}.wpacu-btns .btn-primary:hover{color:#fff;background-color:#025aa5;border-color:#01549b}.wpacu-btns .btn-primary.focus,.wpacu-btns .btn-primary:focus{-webkit-box-shadow:0 0 0 2px rgba(2,117,216,.5);box-shadow:0 0 0 2px rgba(2,117,216,.5)}.wpacu-btns .btn-primary.disabled,.wpacu-btns .btn-primary:disabled{background-color:#0275d8;border-color:#0275d8}.wpacu-btns .btn-primary.active,.wpacu-btns .btn-primary:active,.wpacu-btns .show>.btn-primary.dropdown-toggle{color:#fff;background-color:#025aa5;background-image:none;border-color:#01549b}.wpacu-btns .btn-secondary{color:#292b2c;background-color:#fff;border-color:#ccc}.wpacu-btns .btn-secondary:hover{color:#292b2c;background-color:#e6e6e6;border-color:#adadad}.wpacu-btns .btn-secondary.focus,.wpacu-btns .btn-secondary:focus{-webkit-box-shadow:0 0 0 2px rgba(204,204,204,.5);box-shadow:0 0 0 2px rgba(204,204,204,.5)}.wpacu-btns .btn-secondary.disabled,.wpacu-btns .btn-secondary:disabled{background-color:#fff;border-color:#ccc}.wpacu-btns .btn-secondary.active,.wpacu-btns .btn-secondary:active,.wpacu-btns .show>.btn-secondary.dropdown-toggle{color:#292b2c;background-color:#e6e6e6;background-image:none;border-color:#adadad}.wpacu-btns .btn-info{color:#fff;background-color:#5bc0de;border-color:#5bc0de}.wpacu-btns .btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#2aabd2}.wpacu-btns .btn-info.focus,.wpacu-btns .btn-info:focus{-webkit-box-shadow:0 0 0 2px rgba(91,192,222,.5);box-shadow:0 0 0 2px rgba(91,192,222,.5)}.wpacu-btns .btn-info.disabled,.wpacu-btns .btn-info:disabled{background-color:#5bc0de;border-color:#5bc0de}.wpacu-btns .btn-info.active,.wpacu-btns .btn-info:active,.wpacu-btns .show>.btn-info.dropdown-toggle{color:#fff;background-color:#31b0d5;background-image:none;border-color:#2aabd2}.wpacu-btns .btn-success{color:#fff;background-color:#5cb85c;border-color:#5cb85c}.wpacu-btns .btn-success:hover{color:#fff;background-color:#449d44;border-color:#419641}.wpacu-btns .btn-success.focus,.wpacu-btns .btn-success:focus{-webkit-box-shadow:0 0 0 2px rgba(92,184,92,.5);box-shadow:0 0 0 2px rgba(92,184,92,.5)}.wpacu-btns .btn-success.disabled,.wpacu-btns .btn-success:disabled{background-color:#5cb85c;border-color:#5cb85c}.wpacu-btns .btn-success.active,.wpacu-btns .btn-success:active,.wpacu-btns .show>.btn-success.dropdown-toggle{color:#fff;background-color:#449d44;background-image:none;border-color:#419641}.wpacu-btns .btn-warning{color:#fff;background-color:#f0ad4e;border-color:#f0ad4e}.wpacu-btns .btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#eb9316}.wpacu-btns .btn-warning.focus,.wpacu-btns .btn-warning:focus{-webkit-box-shadow:0 0 0 2px rgba(240,173,78,.5);box-shadow:0 0 0 2px rgba(240,173,78,.5)}.wpacu-btns .btn-warning.disabled,.wpacu-btns .btn-warning:disabled{background-color:#f0ad4e;border-color:#f0ad4e}.wpacu-btns .btn-warning.active,.wpacu-btns .btn-warning:active,.wpacu-btns .show>.btn-warning.dropdown-toggle{color:#fff;background-color:#ec971f;background-image:none;border-color:#eb9316}.wpacu-btns .btn-danger{color:#fff;background-color:#d9534f;border-color:#d9534f}.wpacu-btns .btn-danger:hover{color:#fff;background-color:#c9302c;border-color:#c12e2a}.wpacu-btns .btn-danger.focus,.wpacu-btns .btn-danger:focus{-webkit-box-shadow:0 0 0 2px rgba(217,83,79,.5);box-shadow:0 0 0 2px rgba(217,83,79,.5)}.wpacu-btns .btn-danger.disabled,.wpacu-btns .btn-danger:disabled{background-color:#d9534f;border-color:#d9534f}.wpacu-btns .btn-danger.active,.wpacu-btns .btn-danger:active,.wpacu-btns .show>.btn-danger.dropdown-toggle{color:#fff;background-color:#c9302c;background-image:none;border-color:#c12e2a}.wpacu-btns .btn-outline-primary{color:#0275d8;background-image:none;background-color:transparent;border-color:#0275d8}.wpacu-btns .btn-outline-primary:hover{color:#fff;background-color:#0275d8;border-color:#0275d8}.wpacu-btns .btn-outline-primary.focus,.wpacu-btns .btn-outline-primary:focus{-webkit-box-shadow:0 0 0 2px rgba(2,117,216,.5);box-shadow:0 0 0 2px rgba(2,117,216,.5)}.wpacu-btns .btn-outline-primary.disabled,.wpacu-btns .btn-outline-primary:disabled{color:#0275d8;background-color:transparent}.wpacu-btns .btn-outline-primary.active,.wpacu-btns .btn-outline-primary:active,.wpacu-btns .show>.btn-outline-primary.dropdown-toggle{color:#fff;background-color:#0275d8;border-color:#0275d8}.wpacu-btns .btn-outline-secondary{color:#ccc;background-image:none;background-color:transparent;border-color:#ccc}.wpacu-btns .btn-outline-secondary:hover{color:#fff;background-color:#ccc;border-color:#ccc}.wpacu-btns .btn-outline-secondary.focus,.wpacu-btns .btn-outline-secondary:focus{-webkit-box-shadow:0 0 0 2px rgba(204,204,204,.5);box-shadow:0 0 0 2px rgba(204,204,204,.5)}.wpacu-btns .btn-outline-secondary.disabled,.wpacu-btns .btn-outline-secondary:disabled{color:#ccc;background-color:transparent}.wpacu-btns .btn-outline-secondary.active,.wpacu-btns .btn-outline-secondary:active,.wpacu-btns .show>.btn-outline-secondary.dropdown-toggle{color:#fff;background-color:#ccc;border-color:#ccc}.wpacu-btns .btn-outline-info{color:#5bc0de;background-image:none;background-color:transparent;border-color:#5bc0de}.wpacu-btns .btn-outline-info:hover{color:#fff;background-color:#5bc0de;border-color:#5bc0de}.wpacu-btns .btn-outline-info.focus,.wpacu-btns .btn-outline-info:focus{-webkit-box-shadow:0 0 0 2px rgba(91,192,222,.5);box-shadow:0 0 0 2px rgba(91,192,222,.5)}.wpacu-btns .btn-outline-info.disabled,.wpacu-btns .btn-outline-info:disabled{color:#5bc0de;background-color:transparent}.wpacu-btns .btn-outline-info.active,.wpacu-btns .btn-outline-info:active,.wpacu-btns .show>.btn-outline-info.dropdown-toggle{color:#fff;background-color:#5bc0de;border-color:#5bc0de}.wpacu-btns .btn-outline-success{color:#5cb85c;background-image:none;background-color:transparent;border-color:#5cb85c}.wpacu-btns .btn-outline-success:hover{color:#fff;background-color:#5cb85c;border-color:#5cb85c}.wpacu-btns .btn-outline-success.focus,.wpacu-btns .btn-outline-success:focus{-webkit-box-shadow:0 0 0 2px rgba(92,184,92,.5);box-shadow:0 0 0 2px rgba(92,184,92,.5)}.wpacu-btns .btn-outline-success.disabled,.wpacu-btns .btn-outline-success:disabled{color:#5cb85c;background-color:transparent}.wpacu-btns .btn-outline-success.active,.wpacu-btns .btn-outline-success:active,.wpacu-btns .show>.btn-outline-success.dropdown-toggle{color:#fff;background-color:#5cb85c;border-color:#5cb85c}.wpacu-btns .btn-outline-warning{color:#f0ad4e;background-image:none;background-color:transparent;border-color:#f0ad4e}.wpacu-btns .btn-outline-warning:hover{color:#fff;background-color:#f0ad4e;border-color:#f0ad4e}.wpacu-btns .btn-outline-warning.focus,.wpacu-btns .btn-outline-warning:focus{-webkit-box-shadow:0 0 0 2px rgba(240,173,78,.5);box-shadow:0 0 0 2px rgba(240,173,78,.5)}.wpacu-btns .btn-outline-warning.disabled,.wpacu-btns .btn-outline-warning:disabled{color:#f0ad4e;background-color:transparent}.wpacu-btns .btn-outline-warning.active,.wpacu-btns .btn-outline-warning:active,.wpacu-btns .show>.btn-outline-warning.dropdown-toggle{color:#fff;background-color:#f0ad4e;border-color:#f0ad4e}.wpacu-btns .btn-outline-danger{color:#d9534f;background-image:none;background-color:transparent;border-color:#d9534f}.wpacu-btns .btn-outline-danger:hover{color:#fff;background-color:#d9534f;border-color:#d9534f}.wpacu-btns .btn-outline-danger.focus,.wpacu-btns .btn-outline-danger:focus{-webkit-box-shadow:0 0 0 2px rgba(217,83,79,.5);box-shadow:0 0 0 2px rgba(217,83,79,.5)}.wpacu-btns .btn-outline-danger.disabled,.wpacu-btns .btn-outline-danger:disabled{color:#d9534f;background-color:transparent}.wpacu-btns .btn-outline-danger.active,.wpacu-btns .btn-outline-danger:active,.wpacu-btns .show>.btn-outline-danger.dropdown-toggle{color:#fff;background-color:#d9534f;border-color:#d9534f}.wpacu-btns .btn-link{font-weight:400;color:#0275d8;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.wpacu-btns .btn-link,.wpacu-btns .btn-link.active,.wpacu-btns .btn-link:active,.wpacu-btns .btn-link:disabled{background-color:transparent}.wpacu-btns .btn-link,.wpacu-btns .btn-link:active,.wpacu-btns .btn-link:focus,.wpacu-btns .btn-link:hover{border-color:transparent}.wpacu-btns .btn-link:focus,.wpacu-btns .btn-link:hover{color:#014c8c;text-decoration:underline;background-color:transparent}.wpacu-btns .btn-link:disabled{color:#636c72}.wpacu-btns .btn-link:disabled:focus,.wpacu-btns .btn-link:disabled:hover{text-decoration:none}.wpacu-btns .btn-group-lg>.btn,.wpacu-btns .btn-lg{padding:.75rem 1.5rem;font-size:1.25rem;-webkit-border-radius:.3rem;-moz-border-radius:.3rem;border-radius:.3rem}.wpacu-btns .btn-group-sm>.btn,.wpacu-btns .btn-sm{padding:.25rem .5rem;font-size:.875rem;-webkit-border-radius:.2rem;-moz-border-radius:.2rem;border-radius:.2rem}.wpacu-btns .btn-block{display:block;width:100%}.go-pro-button,.go-pro-link-no-style,.wordpress-core-file{display:inline-block;text-decoration:none}.wpacu-btns .btn-block+.btn-block{margin-top:.5rem}.wpacu-btns input[type=button].btn-block,.wpacu-btns input[type=reset].btn-block,.wpacu-btns input[type=submit].btn-block{width:100%}.wpacu-btns .fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.go-pro-button{background-color:#4CAF50;border:2px solid #4CAF50;color:#fff;padding:12px 18px;text-align:center;font-size:16px;margin:4px 2px;cursor:pointer;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;-webkit-transition-duration:.4s;transition-duration:.4s}.go-pro-button:hover{background-color:#fff;color:#000;border:2px solid #4CAF50;text-decoration:none}.wpacu-restore-pos-btn{font-size:14px!important;line-height:normal!important;height:42px!important;padding:0 18px!important;margin-top:10px!important}body.wp-admin .wpacu_asset_row .go-pro-link-no-style .wpacu-tooltip{padding:8px 2px}body.wp-admin .go-pro-link-no-style .wpacu-tooltip{text-shadow:none;font-weight:400;font-size:12px;line-height:16px;padding:8px 11px}.go-pro-link-no-style{position:relative;color:inherit}.go-pro-link-no-style:not(.nav-tab){font-style:italic}.go-pro-link-no-style.no-transition .wpacu-tooltip{-webkit-transition:0s all ease;transition:0s all ease;-webkit-transition-delay:0s;transition-delay:0s}.go-pro-link-no-style .wpacu-tooltip,.wordpress-core-file .wpacu-tooltip{line-height:18px;visibility:hidden;text-align:center;-webkit-transition:.1s all ease;font-size:14px}.go-pro-link-no-style>img{max-width:20px;max-height:20px}.go-pro-link-no-style .wpacu-tooltip{position:absolute;z-index:1;width:160px;background-color:#00a7a7;color:#fff;padding:8px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;bottom:100%;bottom:calc(100% + 15px);left:50%;margin-left:-65px;transition:.1s all ease;-webkit-transition-delay:0s;transition-delay:0s}.go-pro-link-no-style .wpacu-tooltip:after{content:"";position:absolute;border-width:10px;border-style:solid;top:100%;left:50%;left:calc(50% - 10px);border-color:#00a7a7 transparent transparent}.go-pro-link-no-style .wpacu-tooltip.wpacu-on-pages-btn{cursor:pointer;margin-left:-77px;width:130px}.go-pro-link-no-style .wpacu-tooltip.wpacu-larger{width:240px}.go-pro-link-no-style:hover .wpacu-tooltip{visibility:visible}.wpacu_list_table tr:first-child .wordpress-core-file .wpacu-tooltip{bottom:-40px;left:120px;margin-left:-86px}.wpacu_list_table tr:first-child .wordpress-core-file .wpacu-tooltip:after{top:41px;left:-20px;border-color:transparent #c00 transparent transparent}.wordpress-core-file{position:relative;font-style:normal;color:inherit}.wordpress-core-file .wpacu-tooltip{position:absolute;z-index:1;width:160px;background-color:#c00;color:#fff;padding:6px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;bottom:100%;bottom:calc(100% + 15px);left:50%;margin-left:-86px;transition:.1s all ease;-webkit-transition-delay:0s;transition-delay:0s}.wordpress-core-file .wpacu-tooltip:after{content:"";position:absolute;border-width:10px;border-style:solid;top:100%;left:50%;left:calc(50% - 10px);border-color:#c00 transparent transparent}.wordpress-core-file:hover .wpacu-tooltip{visibility:visible}.ajax-direct-call-error-area{background:#fff;padding:10px;border:1px solid #c00;-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px}.ajax-direct-call-error-area td{padding:6px}.ajax-direct-call-error-area .note{margin-top:0;padding-top:0}.ajax-direct-call-error-area .error-code{color:#c00;font-weight:700}.ajax-wp-remote-post-call-error-area{background:#fff;padding:20px}.ajax-wp-remote-post-call-error-area .table-data{background:0 0;border:1px solid #c66;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px}.ajax-wp-remote-post-call-error-area .table-data td{padding:10px}.wrap-upgrade-info{background:#fff;padding:0 15px;border:1px solid #cdcdcd;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px}.wpacu-notice{margin:20px 20px 0 0!important}.wpacu-notice p{font-weight:600!important;font-style:italic}.wpacu-notice .dashicons{font-weight:inherit!important;color:#46b450!important;margin-right:4px;vertical-align:text-bottom;font-size:27px}.wpacu-notice-info{padding:12px 12px 12px 16px;background:#fff;border-left:4px solid #008f9c}.wpacu-notice-info p{margin-top:8px}.wpacu-notice-info p:first-child{margin-top:0}.wpacu-notice-info p:last-child{margin-bottom:0}.wpacu-warning{font-size:15px;padding:10px;background:#fffcec;border:1px solid #fdd5c9;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;margin:0 0 5px;width:100%}.pro-page-unlock-notice{-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;padding:10px;background:#f2faf2;border:1px solid #c0e8c0;width:auto;display:block}.wpacu-license-area .notice,.wpacu-settings-area .notice{margin-left:0;padding:10px!important;width:97%;box-sizing:border-box;font-weight:600;font-style:italic}#wpacu-dom-get-type-selections,.wpacu-radio-selections{float:none;clear:both;width:auto;display:inline-block;margin-bottom:0;margin-top:0}#wpacu-dom-get-type-selections.wpacu-vertical,.wpacu-radio-selections.wpacu-vertical{display:block;margin-top:15px;margin-bottom:18px}#wpacu-dom-get-type-selections.wpacu-vertical li,.wpacu-radio-selections.wpacu-vertical li{float:none;margin-bottom:12px}#wpacu-dom-get-type-selections.wpacu-vertical li:last-child,.wpacu-radio-selections.wpacu-vertical li:last-child{margin-bottom:0}#wpacu-dom-get-type-selections li,.wpacu-radio-selections li{margin-right:30px;float:left;margin-bottom:0}#wpacu-dom-get-type-selections li:first-child,.wpacu-radio-selections li:first-child{margin-right:15px}#wpacu-dom-get-type-selections li:last-child,.wpacu-radio-selections li:last-child{margin-right:0}.wpacu_combine_loaded_js_level_area{display:none;background:0 0;border-left:2px solid #008f9c;padding-top:8px;padding-bottom:8px;padding-right:10px;padding-left:10px;margin:20px 0 15px}.wpacu_combine_loaded_js_level_area.wpacu_active{display:block}#wpacu-dom-get-type-infos{margin-bottom:0}#wpacu-dom-get-type-infos li{margin-bottom:0;line-height:20px}.wpacu-wrap li,.wpacu-wrap p,.wpacu-wrap td{font-weight:400}.wpacu-wrap small{width:auto;float:none;display:inline}.wpacu-wrap small code{font-size:inherit!important}.wpacu-wrap.wpacu-settings-show-all .wpacu-settings-tab-content{display:block;width:100%}.wpacu-wrap.wpacu-settings-show-all .wpacu-settings-area-title{color:#004567;padding:16px 15px;background:#f8f8f8;border-left:5px solid #004567b0;border-top:1px solid #e7e7e7;border-right:1px solid #e7e7e7;border-bottom:1px solid #e7e7e7;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;font-size:1.45em;font-weight:500}.wpacu-switch-enhanced .wpacu_asset_row .wpacu_switch .wpacu_slider.wpacu_round,.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch .wpacu_slider.wpacu_round{border-radius:29px}.wpacu-wrap.wpacu-settings-show-all #wpacu-update-button-area,.wpacu-wrap.wpacu-settings-show-all #wpacu-update-button-area .submit{margin:0}.wpacu-wrap.wpacu-settings-show-all #wpacu-update-button-area .button{padding:11px 28px;height:38px;font-size:18px}.wpacu-wrap.wpacu-settings-show-all #wpacu-updating-settings{margin-left:224px;top:35px;left:3px}.wpacu-wrap.wpacu-switch-standard .asset-cleanup-pro_page_wpassetcleanup_settings .wpacu_switch,.wpacu-wrap.wpacu-switch-standard .asset-cleanup_page_wpassetcleanup_settings .wpacu_switch{width:auto;height:auto}.wpacu-wrap.wpacu-switch-standard .asset-cleanup-pro_page_wpassetcleanup_settings .wpacu_switch input,.wpacu-wrap.wpacu-switch-standard .asset-cleanup_page_wpassetcleanup_settings .wpacu_switch input{display:block}.wpacu-wrap.wpacu-switch-standard .asset-cleanup-pro_page_wpassetcleanup_settings .wpacu_switch input[type=checkbox],.wpacu-wrap.wpacu-switch-standard .asset-cleanup_page_wpassetcleanup_settings .wpacu_switch input[type=checkbox]{margin:0 0 3px}.wpacu-wrap.wpacu-switch-standard .asset-cleanup-pro_page_wpassetcleanup_settings .wpacu_switch .wpacu_slider,.wpacu-wrap.wpacu-switch-standard .asset-cleanup_page_wpassetcleanup_settings .wpacu_switch .wpacu_slider{display:none}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch{position:relative;display:inline-block;width:52px;height:29px}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch input{display:none}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch:not(.wpacu_switch_standard) .wpacu_slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.2s;transition:.2s}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch:not(.wpacu_switch_standard) .wpacu_slider:before{position:absolute;content:"";height:22px;width:22px;left:4px;bottom:4px;background-color:#fff;-webkit-transition:.2s;transition:.2s}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch input:checked+.wpacu_slider{background-color:#52af00}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch input:focus+.wpacu_slider{box-shadow:0 0 1px #52af00}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch input:checked+.wpacu_slider:before{-webkit-transform:translateX(22px);-ms-transform:translateX(22px);transform:translateX(22px)}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch .wpacu_slider.wpacu_round:before{border-radius:50%}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch.wpacu_disabled,.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch.wpacu_locked_for_pro{opacity:.3}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch.wpacu_disabled:before{content:"";font-family:Dashicons,Arial,"Times New Roman","Bitstream Charter",Times,serif;position:absolute;font-size:23px;top:5px;right:2px;z-index:1000}.asset-cleanup-pro_page_wpassetcleanup_settings .setting_title p.wpacu_subtitle,.asset-cleanup_page_wpassetcleanup_settings .setting_title p.wpacu_subtitle{margin-top:4px;line-height:1.4}.asset-cleanup-pro_page_wpassetcleanup_settings .setting_title p.wpacu_subtitle em,.asset-cleanup_page_wpassetcleanup_settings .setting_title p.wpacu_subtitle em{font-weight:200}.asset-cleanup-pro_page_wpassetcleanup_settings .setting_title p.wpacu_read_more,.asset-cleanup_page_wpassetcleanup_settings .setting_title p.wpacu_read_more{margin-top:-10px;font-style:italic;font-size:12px}.asset-cleanup-pro_page_wpassetcleanup_settings .assets_list_inline_code_status_choices,.asset-cleanup-pro_page_wpassetcleanup_settings .assets_list_layout_areas_status_choices,.asset-cleanup-pro_page_wpassetcleanup_settings .input_style_choices,.asset-cleanup_page_wpassetcleanup_settings .assets_list_inline_code_status_choices,.asset-cleanup_page_wpassetcleanup_settings .assets_list_layout_areas_status_choices,.asset-cleanup_page_wpassetcleanup_settings .input_style_choices{list-style:none;margin:0}.asset-cleanup-pro_page_wpassetcleanup_settings .assets_list_inline_code_status_choices li,.asset-cleanup-pro_page_wpassetcleanup_settings .assets_list_layout_areas_status_choices li,.asset-cleanup-pro_page_wpassetcleanup_settings .input_style_choices li,.asset-cleanup_page_wpassetcleanup_settings .assets_list_inline_code_status_choices li,.asset-cleanup_page_wpassetcleanup_settings .assets_list_layout_areas_status_choices li,.asset-cleanup_page_wpassetcleanup_settings .input_style_choices li{float:left;margin-right:30px}.asset-cleanup-pro_page_wpassetcleanup_settings .assets_list_inline_code_status_choices li:last-child,.asset-cleanup-pro_page_wpassetcleanup_settings .assets_list_layout_areas_status_choices li:last-child,.asset-cleanup-pro_page_wpassetcleanup_settings .input_style_choices li:last-child,.asset-cleanup_page_wpassetcleanup_settings .assets_list_inline_code_status_choices li:last-child,.asset-cleanup_page_wpassetcleanup_settings .assets_list_layout_areas_status_choices li:last-child,.asset-cleanup_page_wpassetcleanup_settings .input_style_choices li:last-child{margin-right:0}#wpacu-assets-list-by-location-selected{background:0 0;border:1px solid #e7e7e7;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;padding:8px;clear:both}.notice.notice-success+.wpacu-wrap.wpacu-settings-area{margin-top:20px}.wpacu-license-action-btn-area{margin-top:0;position:relative;display:inline-block}.wpacu-license-spinner{display:none;position:absolute;right:-30px;top:4px}.wpacu-license-spinner img{width:20px;height:20px}#wpacu-activation-issues-info{border-radius:10px;width:90%;margin-top:20px;font-size:14px;padding:6px 20px;background:#fff;border:1px solid #e7e7e7}#wpacu-activation-issues-info ol li{font-size:13px;margin-bottom:10px}#wpacu-mark-license-area-wrap{margin:15px 0}.wpacu-form-table.wpacu-license th{width:120px}.wpacu-form-table th{vertical-align:top;text-align:left;padding:5px 20px 20px 0;width:200px;line-height:1.3;font-weight:600}.wpacu-form-table th label{color:#23282d;font-weight:600;font-size:14px;text-shadow:none;vertical-align:middle;cursor:pointer}.wpacu-form-table td{padding-bottom:25px}.wpacu-form-table td:last-child p:last-child{margin:0}.wpacu-form-table .wpacu-fancy-checkbox input[type=checkbox],.wpacu-form-table label input[type=checkbox]{height:20px;width:20px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.wpacu-form-table .wpacu-fancy-checkbox input[type=checkbox]:checked,.wpacu-form-table .wpacu-fancy-checkbox input[type=checkbox]:hover,.wpacu-form-table label input[type=checkbox]:checked,.wpacu-form-table label input[type=checkbox]:hover{border:1px solid green}.wpacu-form-table .wpacu-fancy-checkbox input[type=checkbox]:disabled,.wpacu-form-table label input[type=checkbox]:disabled{border:none}.wpacu-form-table .wpacu-fancy-checkbox input[type=checkbox]:disabled:checked,.wpacu-form-table label input[type=checkbox]:disabled:checked{opacity:.3}.wpacu-form-table .wpacu-fancy-checkbox input[type=checkbox]:checked:before,.wpacu-form-table label input[type=checkbox]:checked:before{color:#52af00;font:400 24px/1 dashicons}.wpacu-form-table .wpacu-fancy-radio input[type=radio]{-webkit-border-radius:50%;-moz-border-radius:50%;border-radius:50%;position:relative;height:20px;width:20px;margin:2px 0 0}.wpacu-form-table .wpacu-fancy-radio input[type=radio]:checked,.wpacu-form-table .wpacu-fancy-radio input[type=radio]:hover{border:1px solid green}.wpacu-form-table .wpacu-fancy-radio input[type=radio]:checked:before{margin:0;line-height:inherit;text-indent:inherit;content:"";position:absolute;top:4px;left:4px;width:10px;height:10px;border-radius:50%;background:#52af00;color:#52af00;font:400 24px/1 dashicons}#wpacu-settings-vertical-tab-wrap{display:table;width:100%}#wpacu-settings-vertical-tab-wrap .wpacu-tab-extra-text{margin:4px 0 0}#wpacu-settings-vertical-tab-wrap .wpacu-tab-extra-text small{font-weight:lighter}#wpacu-settings-vertical-tab-wrap .wpacu-tab-extra-text small span.wpacu-status-wrap{position:relative;padding-left:14px}#wpacu-settings-vertical-tab-wrap .wpacu-tab-extra-text small span.wpacu-status-wrap span.wpacu-circle-status{position:absolute;left:0;top:2px;height:10px;width:10px;border-radius:50%;display:inline-block;opacity:.75}#wpacu-settings-vertical-tab-wrap .wpacu-tab-extra-text small span.wpacu-status-wrap span.wpacu-circle-status.wpacu-on{background:#52af00}#wpacu-settings-vertical-tab-wrap .wpacu-tab-extra-text small span.wpacu-status-wrap span.wpacu-circle-status.wpacu-off{background:#ccc}#wpacu-settings-vertical-tab-wrap *{box-sizing:border-box}.wpacu-settings-tab{display:table-cell;width:20%;height:100%;vertical-align:top}.wpacu-settings-tab a{text-decoration:none;border-left:3px solid transparent;display:block;background-color:#f1f1f1;color:#004567;padding:17px 16px;width:100%;outline:0;text-align:left;cursor:pointer;font-size:14px;font-weight:600;border-bottom:1px solid #ccc}.wpacu-settings-tab a:first-child{border-top:1px solid transparent!important}.wpacu-settings-tab a:last-child{border-bottom:1px solid transparent!important}.wpacu-settings-tab a:hover{background-color:#fff;border-left:3px solid #004567;position:relative}.wpacu-settings-tab a.active{color:#004567;background-color:#fff;border-left:3px solid #004567;position:relative;border-bottom:1px solid #ccc}.wpacu-settings-tab a.active:after{content:"";position:absolute;height:100%;width:1px;top:0;right:-1px;background-color:#fff}.wpacu-settings-tab-content{background-color:#fff;display:none;padding:12px 18px;width:79%;border-left:none;height:100%;border-top-right-radius:10px;border-bottom-right-radius:10px}.wpacu-settings-tab-content h2{padding:0 0 15px;border-bottom:1px solid #e7e7e7}.wpacu-settings-tab-content.active{display:table-cell}#wpacu_minify_css_exceptions_area,#wpacu_minify_js_exceptions_area{margin:16px 0 0}@media only screen and (min-width:768px){body.asset-cleanup-pro_page_wpassetcleanup_assets_manager #wpacu-update-button-area,body.asset-cleanup_page_wpassetcleanup_assets_manager #wpacu-update-button-area{position:-webkit-sticky;position:sticky;bottom:0;padding:0;z-index:1000000;border-top:1px solid #cdcdcd;background:#f1f1f1}.wpacu-get-help-wrap .help-content-wrap{-webkit-box-align:start;-ms-flex-align:start;-ms-grid-row-align:flex-start;align-items:flex-start}}body[class*=version-5-3] #wpacu-update-button-area .button{height:auto;padding:4px 18px 6px;font-size:15px}body[class*=version-5-3] #wpacu-updating-settings{margin-left:178px}#wpacu-update-button-area{position:relative;margin-left:20%}#wpacu-update-button-area.no-left-margin{margin-left:0}#wpacu-update-button-area .submit{margin:0;padding:19px 0}#wpacu-update-button-area .button{padding:5px 18px;height:38px;font-size:15px}#wpacu-updating-settings{position:absolute;margin-left:183px;top:28px;display:none}#combine_loaded_js_info_area{position:relative}#combine_loaded_js_info_area.locked-for-pro:before{position:absolute;content:"";height:100%;width:100%;background:#fff;opacity:.5;z-index:10000}.google_fonts_load_types{clear:both;margin:20px 0 15px;display:flex}.google_fonts_load_types>div{text-align:left}.google_fonts_load_types>div input{float:left;margin:0 7px 20px 0!important}.wpacu-sub-tabs-wrap{min-width:320px;margin:0 auto}.wpacu-sub-tabs-wrap input.wpacu-nav-input{display:none}.wpacu-sub-tabs-wrap label.wpacu-nav-label{display:inline-block;margin:0 0 -1px;padding:15px 25px;font-weight:600;text-align:center;color:#74777b;border-left:1px solid transparent;border-right:1px solid transparent;border-top:3px solid transparent;border-bottom:0}.wpacu-sub-tabs-wrap label.wpacu-nav-label:hover{cursor:pointer}.wpacu-sub-tabs-wrap input.wpacu-nav-input:checked+label.wpacu-nav-label{color:#004567;border-left:1px solid #ccc;border-right:1px solid #ccc;border-top:3px solid #004567;border-bottom:1px solid #fff}.wpacu-sub-tabs-wrap section{display:none;padding:20px 0 0;border-top:1px solid #ccc}#wpacu-google-fonts-optimize-tab-item:checked~#wpacu-google-fonts-optimize-tab-item-area,#wpacu-google-fonts-remove-tab-item:checked~#wpacu-google-fonts-remove-tab-item-area{display:block}body.wp-admin .wpacu-handle-notes p{margin-top:0!important}body.wp-admin .wpacu-handle-notes p a{font-size:inherit}body.wp-admin .wpacu-handle-notes p a span.dashicons{font-size:19px;width:19px;height:19px;vertical-align:bottom;text-decoration:none}.wpacu-handle-notes{padding-top:5px;margin-bottom:-10px;border-top:1px solid #e7e7e7}.wpacu-handle-notes .wpacu-handle-notes-field{display:none}.wpacu-handle-notes .wpacu-handle-notes-field>textarea{font-size:85%;padding:6px;width:320px;max-width:100%}.wpacu-handle-notes p{margin:10px 0 0!important}.wpacu-handle-notes p a.wpacu-add-handle-note{text-decoration:none;font-size:80%;display:inline-block;color:inherit}.wpacu-handle-notes p a.wpacu-add-handle-note span.dashicons{font-size:18px;width:18px;height:18px}.wrap_bulk_unload_options{width:auto;display:block;clear:both}.wrap_bulk_unload_options .wpacu_asset_options_wrap{display:inline-block;float:left;margin:5px 10px 14px 0!important;padding:8px 10px 12px!important}.wrap_bulk_unload_options .wpacu_asset_options_wrap .wpacu_slider_text{position:relative!important;vertical-align:top;left:inherit!important;top:inherit!important}.wpacu-switch-enhanced .wpacu_asset_row .wpacu_switch{position:relative;display:inline-block;min-width:52px;width:52px;height:29px;margin-right:5px!important}.wpacu-switch-enhanced .wpacu_asset_row .wpacu_switch input{display:none}.wpacu-switch-enhanced .wpacu_asset_row .wpacu_switch .wpacu_slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.15s;transition:.15s}.wpacu-switch-enhanced .wpacu_asset_row .wpacu_switch .wpacu_slider:before{position:absolute;content:"";height:22px;width:22px;left:4px;bottom:4px;background-color:#fff;-webkit-transition:.15s;transition:.15s}.wpacu-switch-enhanced .wpacu_asset_row .wpacu_switch input:checked+.wpacu_slider{background-color:#C00}.wpacu-switch-enhanced .wpacu_asset_row .wpacu_switch input:focus+.wpacu_slider{box-shadow:0 0 1px #C00}.wpacu-switch-enhanced .wpacu_asset_row .wpacu_switch input:checked+.wpacu_slider:before{-webkit-transform:translateX(22px);-ms-transform:translateX(22px);transform:translateX(22px)}.wpacu-switch-enhanced .wpacu_asset_row .wpacu_switch .wpacu_slider.wpacu_round:before{border-radius:50%}.wpacu-switch-enhanced .wpacu_asset_row .wpacu_switch.wpacu_disabled{opacity:.3}.wpacu-switch-enhanced .wpacu_asset_row .wpacu_switch.wpacu_disabled:before{content:"";font-family:Dashicons,Arial,"Times New Roman","Bitstream Charter",Times,serif;position:absolute;font-size:23px;top:1px;right:2px;z-index:1000}.wpacu-switch-enhanced .wpacu_asset_row .wpacu_slider_text{position:absolute;left:62px;top:3px}.wpacu-wrap{width:98%}.wpacu-wrap tr.wpacu_regex_rule_row{opacity:.45}.wpacu-wrap tr.wpacu_regex_rule_row textarea{line-height:normal;min-height:20px;min-width:400px;display:inline-block;padding:2px 4px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.wpacu-wrap tr.wpacu_regex_rule_row textarea:focus{width:100%}.wpacu-wrap tr.wpacu_regex_rule_row.wpacu_enabled{opacity:1}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch_small{position:relative;display:inline-block;min-width:30px;width:30px;height:17px;margin-right:5px!important}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch_small input{display:none}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch_small .wpacu_slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.15s;transition:.15s}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch_small .wpacu_slider:before{position:absolute;content:"";height:13px;width:13px;left:2px;bottom:2px;background-color:#fff;-webkit-transition:.15s;transition:.15s}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch_small input:checked+.wpacu_slider{background-color:#52af00}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch_small input:focus+.wpacu_slider{box-shadow:0 0 1px #52af00}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch_small input:checked+.wpacu_slider:before{-webkit-transform:translateX(13px);-ms-transform:translateX(13px);transform:translateX(13px)}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch_small .wpacu_slider.wpacu_round{border-radius:17px}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch_small .wpacu_slider.wpacu_round:before{border-radius:50%}.editor-post-saved-state.is-wpacu-reloading{animation:edit-post__loading-fade-animation .5s infinite}body.wp-admin tr.wpacu_asset_row>td[data-wpacu-row-status=contracted] .wpacu_handle_row_expand_contract_area a.wpacu_handle_row_expand_contract .dashicons{width:19px;height:19px;font-size:19px}body.wp-admin tr.wpacu_asset_row>td[data-wpacu-row-status=contracted] .wpacu_handle_row_expand_contract_area a.wpacu_handle_row_expand_contract:before{right:20px;top:-2px}body.wp-admin tr.wpacu_asset_row>td[data-wpacu-row-status=contracted] .wpacu_handle_row_expand_contract_area a.wpacu_handle_row_expand_contract:after{left:20px;top:-2px}body.wp-admin tr.wpacu_asset_row.wpacu-loading{position:relative}body.wp-admin tr.wpacu_asset_row.wpacu-loading .wpacu-ajax-loader{display:block!important}body.wp-admin tr.wpacu_asset_row .wpacu-ajax-loader{display:none;width:58px;height:58px;position:absolute;bottom:0;right:0;opacity:.75}.wpacu_asset_row.wpacu_not_load .wpacu_dependency_notice_area em{color:#c00}.wpacu_asset_row .wpacu-hardcoded-code-area{margin:0}.wpacu_asset_row .wpacu-hardcoded-code-area span.wpacu_inside_cond_comm{display:block;margin-bottom:8px}.wpacu_asset_row .wpacu-hardcoded-code-area .wpacu-has-view-more{max-height:300px;position:relative;overflow:hidden}.wpacu_asset_row .wpacu-hardcoded-code-area .wpacu-has-view-more p.wpacu-view-more-link-area{position:absolute;bottom:0;left:0;width:100%;margin:0;padding:20px 0 15px 15px;background:linear-gradient(to bottom,rgba(255,255,255,0) 0,#fbfbfb8c 100%);background:-webkit-linear-gradient(top,rgba(255,255,255,0) 0,#fbfbfb8c 100%)}.wpacu_asset_row .wpacu-hardcoded-code-area pre{margin:0;padding:0 0 8px;white-space:pre-wrap;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.wpacu_asset_row .wpacu-hardcoded-code-area code{color:inherit;font-style:italic;margin-left:2px;word-break:break-word}.wpacu_asset_row[data-is-hardcoded-asset=true] .wpacu-source-row{margin-top:0}.wpacu_asset_row[data-is-hardcoded-asset=true] .wpacu_handle_row_expand_contract_area{right:18px;top:18px;background:inherit;z-index:100}.wpacu_asset_row>td{overflow-wrap:break-word;word-wrap:break-word;-ms-word-break:break-all;word-break:break-all}.wpacu_asset_row>td[data-wpacu-row-status=expanded] .wpacu_file_size_area{margin:10px 0}.wpacu_asset_row>td[data-wpacu-row-status=expanded] .wpacu_hardcoded_part_if_contracted{display:none}.wpacu_asset_row>td[data-wpacu-row-status=contracted] .wpacu_hardcoded_part_if_contracted,.wpacu_asset_row>td[data-wpacu-row-status=expanded] .wpacu_hardcoded_part_if_expanded{display:block}.wpacu_asset_row>td[data-wpacu-row-status=contracted] .wpacu_file_size_area{margin:0}.wpacu_asset_row>td[data-wpacu-row-status=contracted] .wpacu_hardcoded_part_if_contracted code{width:100%}.wpacu_asset_row>td[data-wpacu-row-status=contracted] .wpacu_hardcoded_part_if_expanded{display:none}.wpacu_asset_row>td div.wpacu_dependency_notice_area{line-height:22px;margin:10px 0;text-align:left!important;font-weight:400!important}.wpacu_asset_row>td div.wpacu-source-row{margin-top:12px}.wpacu_asset_row>td .wpacu_hide_if_handle_row_contracted{display:inline-block}.wpacu_asset_row>td[data-wpacu-row-status=contracted]>div{float:left;margin-top:0;margin-right:20px;margin-bottom:10px}.wpacu_asset_row>td[data-wpacu-row-status=contracted] .wpacu_hide_if_handle_row_contracted{display:none}.wpacu_asset_row>td[data-wpacu-row-status=contracted] .wpacu_handle_row_expand_contract_area a.wpacu_handle_row_expand_contract{transition:none}.wpacu_asset_row>td[data-wpacu-row-status=contracted] .wpacu_handle_row_expand_contract_area a.wpacu_handle_row_expand_contract:focus,.wpacu_asset_row>td[data-wpacu-row-status=contracted] .wpacu_handle_row_expand_contract_area a.wpacu_handle_row_expand_contract:focus-visible,.wpacu_asset_row>td[data-wpacu-row-status=contracted] .wpacu_handle_row_expand_contract_area a.wpacu_handle_row_expand_contract:visited{text-decoration:none;border:none}.wpacu_asset_row>td[data-wpacu-row-status=contracted] .wpacu_handle_row_expand_contract_area a.wpacu_handle_row_expand_contract:after,.wpacu_asset_row>td[data-wpacu-row-status=contracted] .wpacu_handle_row_expand_contract_area a.wpacu_handle_row_expand_contract:before{opacity:0;-webkit-transition:-webkit-transform .3s,opacity .2s;-moz-transition:-moz-transform .3s,opacity .2s;transition:transform .3s,opacity .2s}.wpacu_asset_row>td[data-wpacu-row-status=contracted] .wpacu_handle_row_expand_contract_area a.wpacu_handle_row_expand_contract:before{position:absolute;right:20px;top:-4px;content:"[";-webkit-transform:translateX(20px);-moz-transform:translateX(20px);transform:translateX(20px)}.wpacu_asset_row>td[data-wpacu-row-status=contracted] .wpacu_handle_row_expand_contract_area a.wpacu_handle_row_expand_contract:after{position:absolute;left:20px;top:-4px;content:"]";-webkit-transform:translateX(-20px);-moz-transform:translateX(-20px);transform:translateX(-20px)}.wpacu_asset_row>td[data-wpacu-row-status=contracted].wpacu_hovered .wpacu_handle_row_expand_contract_area a.wpacu_handle_row_expand_contract,.wpacu_asset_row>td[data-wpacu-row-status=contracted]:focus .wpacu_handle_row_expand_contract_area a.wpacu_handle_row_expand_contract,.wpacu_asset_row>td[data-wpacu-row-status=contracted]:hover .wpacu_handle_row_expand_contract_area a.wpacu_handle_row_expand_contract{transition:none}.wpacu_asset_row>td[data-wpacu-row-status=contracted].wpacu_hovered .wpacu_handle_row_expand_contract_area a.wpacu_handle_row_expand_contract:hover,.wpacu_asset_row>td[data-wpacu-row-status=contracted]:focus .wpacu_handle_row_expand_contract_area a.wpacu_handle_row_expand_contract:hover,.wpacu_asset_row>td[data-wpacu-row-status=contracted]:hover .wpacu_handle_row_expand_contract_area a.wpacu_handle_row_expand_contract:hover{color:green}.wpacu_asset_row .wpacu_handle_row_expand_contract_area a.wpacu_handle_row_expand_contract,a.wpacu-assets-collapsible{color:#000;text-decoration:none}.wpacu_asset_row>td[data-wpacu-row-status=contracted].wpacu_hovered .wpacu_handle_row_expand_contract_area a.wpacu_handle_row_expand_contract:after,.wpacu_asset_row>td[data-wpacu-row-status=contracted].wpacu_hovered .wpacu_handle_row_expand_contract_area a.wpacu_handle_row_expand_contract:before,.wpacu_asset_row>td[data-wpacu-row-status=contracted]:focus .wpacu_handle_row_expand_contract_area a.wpacu_handle_row_expand_contract:after,.wpacu_asset_row>td[data-wpacu-row-status=contracted]:focus .wpacu_handle_row_expand_contract_area a.wpacu_handle_row_expand_contract:before,.wpacu_asset_row>td[data-wpacu-row-status=contracted]:hover .wpacu_handle_row_expand_contract_area a.wpacu_handle_row_expand_contract:after,.wpacu_asset_row>td[data-wpacu-row-status=contracted]:hover .wpacu_handle_row_expand_contract_area a.wpacu_handle_row_expand_contract:before{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);transform:translateX(0)}.wpacu_asset_row .wpacu_handle_row_expand_contract_area{position:absolute;right:20px;top:20px;float:none!important;margin:0!important}.wpacu_asset_row .wpacu_handle_row_expand_contract_area a.wpacu_handle_row_expand_contract:hover{text-decoration:none}.wpacu_asset_row input{width:auto;height:auto;min-height:16px}.wpacu_asset_row .tip{background:inherit;border-left:4px solid #e7e7e7;margin:10px 0;padding:7px;font-style:italic;font-size:small;line-height:1.4}.wpacu_asset_row td{width:100%;text-align:left}.wpacu_asset_row td p:last-child{margin-bottom:0!important}.wpacu_asset_row td .wpacu_asset_options_wrap{padding:8px 10px;margin:15px 0;background:#fff;border:1px solid #eee;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.wpacu_asset_row td .wpacu_asset_options_wrap p:first-child{margin-top:0;margin-bottom:8px!important}.wpacu_asset_row div.wpacu_handle{margin:0 0 -8px}.wpacu_asset_row p.wpacu_handle{margin-top:0}.wpacu_asset_row li.wpacu_unload_this_page{display:block!important;position:relative}.wpacu-clearfix:after,.wpacu-clearfix:before{display:table;content:""}.wpacu-contract-expand-area{width:100%;margin:20px 0 0}.wpacu-contract-expand-area .col-left{float:left}.wpacu-contract-expand-area .col-left h4{margin-bottom:0}.wpacu-contract-expand-area .col-right{float:right}.wpacu-clearfix{clear:both;height:0}.wpacu-clearfix:after{clear:both}.wpacu-wp-button{color:#555;border-color:#ccc;background:#f7f7f7;box-shadow:0 1px 0 #ccc;vertical-align:top}body.wp-admin .wpacu-wp-button{font-size:13px;line-height:26px;height:28px}.wpacu-wp-button.wpacu-wp-button-secondary{display:inline-block;text-decoration:none;height:auto;margin:0 5px 0 0;padding:0 10px 1px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;border-radius:3px;white-space:nowrap;box-sizing:border-box}.wpacu-wp-button:hover{background:#fafafa;border-color:#999;color:#23282d}.distinguish-asset-list{list-style:none;margin-left:0;margin-bottom:5px;display:inline-block}.distinguish-asset-list li{float:left;margin-right:20px}.distinguish-asset-list li:last-child{margin-right:0}body[class*=asset-cleanup-pro] a.wpacu-plugin-contracted-wrap-link{padding:16px 6px 16px 41px!important}body[class*=asset-cleanup-pro] .wpacu-area-open .wpacu-plugin-toggle-all{font-size:12px!important;width:calc(100% - 26px)!important}body.wp-admin .wpacu-area-expanded .wpacu-plugin-toggle-all{top:5px}body.wp-admin .wpacu-area-expanded .wpacu-plugin-toggle-all ul li{font-size:12px!important}.wpacu-assets-collapsible-wrap{border:1px solid #cdcdcd}.wpacu-assets-collapsible-wrap.wpacu-by-location{margin-bottom:15px}.wpacu-assets-collapsible-wrap.wpacu-wrap-all{margin-top:20px}.wpacu-assets-collapsible-wrap.wpacu-wrap-area{margin-top:10px}.wpacu-assets-collapsible-wrap.wpacu-by-location>a.wpacu-assets-collapsible{padding:15px 15px 15px 43px}.wpacu-assets-collapsible-wrap.wpacu-by-location .wpacu_list_table{border-width:0;margin:0;border-spacing:inherit;width:100%;box-shadow:3px 3px 2px #ddd;border-bottom-right-radius:5px;border-top-right-radius:5px}.wpacu-assets-collapsible-wrap.wpacu-by-location span.wpacu-child-location-name{font-weight:600}.wpacu-assets-collapsible-wrap.wpacu-by-location span.wpacu-child-location-version{font-weight:200}.wpacu-assets-collapsible-wrap.wpacu-by-location .wpacu-location-child-area[data-wpacu-plugin=oxygen] .icon-area{border-radius:50%}.wpacu-assets-collapsible-wrap.wpacu-by-location .wpacu-location-child-area .wpacu-plugin-toggle-all-wrap .wpacu-plugin-toggle-all{display:inline-block;padding:0;font-size:13px;width:100%;width:calc(100% + 46px);min-width:250px;position:absolute;left:100%;left:calc(100% + 6px);margin:0;top:4px}.wpacu-assets-collapsible-wrap.wpacu-by-location .wpacu-location-child-area .wpacu-plugin-toggle-all-wrap .wpacu-plugin-toggle-all ul{display:inline-block;margin:0;list-style:none;padding-left:13px;padding-top:0}.wpacu-assets-collapsible-wrap.wpacu-by-location .wpacu-location-child-area .wpacu-plugin-toggle-all-wrap .wpacu-plugin-toggle-all ul li{padding:0;margin:0;line-height:normal;font-size:14px}.wpacu-assets-collapsible-wrap.wpacu-by-location .wpacu-location-child-area .wpacu-plugin-toggle-all-wrap .wpacu-plugin-toggle-all ul li:first-child{font-style:italic;margin-bottom:5px}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-themes .wpacu-assets-collapsible-content>table:last-child{margin-bottom:20px}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-themes .wpacu-assets-collapsible-content .wpacu-location-child-area .wpacu-area-title{display:inline;position:relative;z-index:1}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-themes .wpacu-assets-collapsible-content .wpacu-location-child-area .wpacu-area-title:after{content:"";position:absolute;width:100%;left:0;bottom:0;height:1px;background-color:#fdfdfd}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content .wpacu-plugin-assets-wrap{padding:0 0 10px}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content .wpacu-plugin-assets-wrap.wpacu-area-open.wpacu-plugin-assets-last{margin-bottom:18px}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content .wpacu-plugin-assets-wrap.wpacu-area-open .wpacu-plugin-toggle-all-wrap .wpacu-plugin-toggle-all{display:inline-block;padding:7px 12px 8px;font-size:14px;width:100%;text-align:left;border-left:1px solid #cdcdcd;border-right:1px solid #cdcdcd}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content .wpacu-plugin-assets-wrap.wpacu-area-open .wpacu-plugin-toggle-all-wrap .wpacu-plugin-toggle-all+.wpacu-plugin-toggle-all{padding:2px 12px 10px}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link{color:inherit;text-decoration:none;font-weight:inherit;font-style:inherit;font-size:105%;line-height:initial;height:auto;margin:14px 0 0;padding:13px 6px 14px 39px;position:relative;display:block}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link:after{position:absolute;font-size:18px;font-family:Dashicons;right:12px;top:14px;content:""}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link.wpacu-link-open:after{content:""}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link.wpacu-link-closed{border:1px solid #cdcdcd}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link:hover{border:1px solid #878787;background:#f9f9f9}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link:hover.wpacu-link-closed{box-shadow:3px 3px 2px #ddd}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link.wpacu-link-open{border-top:1px solid #cdcdcd;border-left:1px solid #cdcdcd;border-right:1px solid #cdcdcd;border-bottom:none}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link.wpacu-link-closed.wpacu-last-wrap-link{margin-bottom:20px}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link .icon-plugin-default{top:10px;left:10px;width:30px;height:30px}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link .icon-plugin-default .icon-area{width:30px;height:30px}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link .icon-plugin-default .icon-area:before{font-size:22px;line-height:22px;top:4px;left:5px}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link .wpacu-area-title{position:relative;padding:17px 10px 16px 46px;z-index:1}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link .wpacu-area-title:after{content:"";position:absolute;width:100%;left:0;bottom:0;height:1px;background-color:#fdfdfd}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link.wpacu-area-last{margin-bottom:18px}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content .wpacu-area-open{padding:0;max-height:100%}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content .wpacu-area-closed{padding:0;overflow:hidden;max-height:0}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content>table:last-child{margin-bottom:20px}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-themes .wpacu-assets-collapsible-content .wpacu-location-child-area .wpacu-area-title{margin-top:0;margin-bottom:-1px;padding:14px 10px 16px 12px!important}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-themes .wpacu-assets-collapsible-content .wpacu-location-child-area .wpacu-area-title.wpacu-theme-has-icon{padding:18px 10px 16px 58px!important}.wpacu-assets-collapsible-wrap.wpacu-by-location .wpacu-assets-collapsible-content .wpacu-location-child-area{margin-top:22px;margin-bottom:-1px;font-size:110%;line-height:initial}.wpacu-assets-collapsible-wrap.wpacu-by-location .wpacu-assets-collapsible-content .wpacu-location-child-area.wpacu-location-child-area-first{margin-top:2px}.wpacu-assets-collapsible-wrap.wpacu-by-location .wpacu-assets-collapsible-content .wpacu-location-child-area.wpacu-area-expanded .wpacu-area-title{display:inline-block;z-index:1;padding:17px 10px 16px 46px}.wpacu-assets-collapsible-wrap.wpacu-by-location .wpacu-assets-collapsible-content .wpacu-location-child-area .wpacu-area-title{display:inline;border-top-right-radius:8px;border-top-left-radius:8px;background-color:#f9f9f9;border-left:1px solid #cdcdcd;border-top:1px solid #cdcdcd;border-bottom:1px solid transparent;border-right:1px solid #cdcdcd;position:relative}.wpacu-assets-collapsible-wrap.wpacu-by-location .icon-plugin-default{position:absolute;padding:0;top:10px;left:10px;width:37px;height:37px}.wpacu-assets-collapsible-wrap.wpacu-by-location .icon-plugin-default:not(.has-icon){color:#b4b9be;background-color:#eee;box-shadow:inset 0 0 10px rgba(160,165,170,.15);-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.wpacu-assets-collapsible-wrap.wpacu-by-location .icon-plugin-default:not(.has-icon) .icon-area:before{content:"";font-family:Dashicons;position:absolute;font-size:28px;line-height:28px;top:5px;left:5px}.wpacu-assets-collapsible-wrap.wpacu-by-location .icon-plugin-default .icon-area{position:relative;width:37px;height:37px}.wpacu-assets-collapsible-wrap.wpacu-by-location .icon-theme{position:absolute;padding:0;top:10px;left:10px;width:37px;height:37px}.wpacu-assets-collapsible-wrap.wpacu-by-location .icon-theme .icon-area{position:relative;width:37px;height:37px}.wpacu-assets-collapsible-wrap.wpacu-wp_core{border:1px solid #c00}.wpacu-assets-collapsible-wrap.wpacu-external .wpacu-assets-collapsible-content,.wpacu-assets-collapsible-wrap.wpacu-wp_core .wpacu-assets-collapsible-content{padding:0}.wpacu-assets-collapsible-wrap.wpacu-external .wpacu-assets-collapsible-content .wpacu_list_table,.wpacu-assets-collapsible-wrap.wpacu-wp_core .wpacu-assets-collapsible-content .wpacu_list_table{width:100%;margin:0}.wpacu-assets-collapsible-wrap.wpacu-external .wpacu-assets-collapsible-content .wpacu_list_table .wpacu_asset_row td,.wpacu-assets-collapsible-wrap.wpacu-wp_core .wpacu-assets-collapsible-content .wpacu_list_table .wpacu_asset_row td{border-left:hidden;border-right:hidden;border-bottom:1px solid #cdcdcd}.wpacu-assets-collapsible-wrap.wpacu-external .wpacu-assets-collapsible-content .wpacu_list_table .wpacu_asset_row:last-child,.wpacu-assets-collapsible-wrap.wpacu-wp_core .wpacu-assets-collapsible-content .wpacu_list_table .wpacu_asset_row:last-child{margin-bottom:0!important}.wpacu-assets-collapsible-wrap.wpacu-external .wpacu-assets-collapsible-content .wpacu_list_table .wpacu_asset_row:last-child td:last-child,.wpacu-assets-collapsible-wrap.wpacu-wp_core .wpacu-assets-collapsible-content .wpacu_list_table .wpacu_asset_row:last-child td:last-child{border-bottom:hidden}a.wpacu-assets-collapsible{font-size:20px;display:block;position:relative;background-color:#f1f3f8;cursor:pointer;padding:15px 15px 15px 36px;width:auto;border:none;text-align:left;outline:0}a.wpacu-assets-collapsible>span.dashicons{font-size:25px;line-height:normal;position:absolute;top:15px;top:calc(50% - 21px);left:22px;-webkit-transform:translate(-50%,50%);transform:translate(-50%,50%)}a.wpacu-assets-collapsible:hover{background-color:#f1f3f8;text-decoration:none}a.wpacu-assets-collapsible:after{position:absolute;font-size:22px;font-family:Dashicons;right:14px;top:16px}a.wpacu-assets-collapsible:not(.wpacu-assets-collapsible-active):after{content:""}a.wpacu-assets-collapsible.wpacu-assets-collapsible-active{background-color:#f1f3f8}a.wpacu-assets-collapsible.wpacu-assets-collapsible-active:after{content:""}.wpacu-assets-collapsible-content{padding:0 16px;max-height:0;overflow:hidden;background-color:#fbfbfb8c}.wpacu-assets-collapsible-content .wpacu-assets-note{margin:0;padding:15px 15px 10px}.wpacu-assets-collapsible-content>div:not(.wpacu-assets-table-list-wrap){padding:16px 0 0}.wpacu-assets-collapsible-content>div>p:first-child{margin-top:0}.wpacu-assets-collapsible-content.wpacu-open{max-height:100%}a.wpacu-assets-inline-code-collapsible{color:inherit;font-size:14px;text-decoration:none;display:inline-block;position:relative;cursor:pointer;width:auto;outline:0;background:#f1f3f8;border:1px solid #cdcdcd;padding:4px 21px 4px 8px;margin:0 0 0 6px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}a.wpacu-assets-inline-code-collapsible:hover{border:1px solid #5c5c5c}a.wpacu-assets-inline-code-collapsible:after{position:absolute;font-size:15px;font-family:Dashicons;right:-3px;top:-1px;width:14px;height:14px;-webkit-transform:translate(-50%,50%);transform:translate(-50%,50%)}a.wpacu-assets-inline-code-collapsible:not(.wpacu-assets-inline-code-collapsible-active):after{content:""}a.wpacu-assets-inline-code-collapsible.wpacu-assets-inline-code-collapsible-active:after{content:""}.wpacu-assets-inline-code-collapsible-content{padding:0 8px 2px 0;max-height:0;overflow:hidden;background-color:#fbfbfb8c}.wpacu-assets-inline-code-collapsible-content>div{padding:7px 8px 0}.wpacu-assets-inline-code-collapsible-content>div>p{line-height:normal!important}.wpacu-assets-inline-code-collapsible-content>div>p:first-child{margin-top:0}.wpacu-assets-inline-code-collapsible-content.wpacu-open{max-height:100%}.wpacu_asset_row p div.select{display:inline-block}.wpacu-wrap-choose-position{display:inline}.wpacu-wrap-choose-position>div{display:inline-block}.wpacu-wrap-choose-position select{width:auto;font-size:inherit;display:inline;margin-left:6px;margin-right:4px}.wpacu-wrap-choose-position>.select>.select{display:inline}.wpacu-wrap-choose-position>.select>.select select{padding-right:30px}.wpacu-wrap-choose-position>.select>.select:after{right:15px;top:-4px}.wpacu_handle_unload_regex_input_wrap,.wpacu_load_regex_input_wrap{display:block;width:100%}.wpacu_handle_unload_regex_input_wrap .wpacu_regex_rule_area .wpacu_regex_rule_textarea,.wpacu_load_regex_input_wrap .wpacu_regex_rule_area .wpacu_regex_rule_textarea{line-height:normal;min-height:20px;min-width:300px;max-width:400px;display:inline-block;padding:2px 4px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.wpacu_handle_unload_regex_input_wrap .wpacu_regex_rule_area .wpacu_regex_rule_textarea:focus,.wpacu_load_regex_input_wrap .wpacu_regex_rule_area .wpacu_regex_rule_textarea:focus{width:100%}body.logged-in:not(.wp-admin) .wpacu-view-more-code{box-shadow:inset 0 1px 0 0 #fff;background:linear-gradient(to bottom,#f9f9f9 5%,#e9e9e9 100%);background-color:#f9f9f9;border-radius:6px;border:1px solid #dcdcdc;display:inline-block;cursor:pointer;color:#666;font-size:inherit;font-weight:700;padding:6px 24px;text-decoration:none;text-shadow:0 1px 0 #fff}body.logged-in:not(.wp-admin) .wpacu-view-more-code:hover{background:linear-gradient(to bottom,#e9e9e9 5%,#f9f9f9 100%);background-color:#e9e9e9}body.logged-in:not(.wp-admin) .wpacu-view-more-code:active{position:relative;top:1px}.wpacu_table_wrap{margin:20px 0 0}.wpacu_table_wrap>table{border:1px solid #cdcdcd}.wpacu_table_wrap .table{width:100%;max-width:100%;margin-bottom:1rem;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px}.wpacu_table_wrap .table td,.wpacu_table_wrap .table th{padding:.75rem;vertical-align:top;border-top:1px solid #eceeef}.wpacu_table_wrap .table thead th{vertical-align:bottom;border-bottom:2px solid #eceeef}.wpacu_table_wrap .table tbody+tbody{border-top:2px solid #eceeef}.wpacu_table_wrap .table .table{background-color:#fff}.wpacu_table_wrap .table-sm td,.wpacu_table_wrap .table-sm th{padding:.3rem}.wpacu_table_wrap .table-bordered,.wpacu_table_wrap .table-bordered td,.wpacu_table_wrap .table-bordered th{border:1px solid #eceeef}.wpacu_table_wrap .table-bordered thead td,.wpacu_table_wrap .table-bordered thead th{border-bottom-width:2px}.wpacu_table_wrap .table-striped tbody tr:nth-of-type(even){background-color:#f9f9f9}.wpacu_table_wrap .table-striped tbody tr:nth-of-type(odd){background-color:#fff}.wpacu_table_wrap .table-active,.wpacu_table_wrap .table-active>td,.wpacu_table_wrap .table-active>th,.wpacu_table_wrap .table-hover .table-active:hover,.wpacu_table_wrap .table-hover .table-active:hover>td,.wpacu_table_wrap .table-hover .table-active:hover>th,.wpacu_table_wrap .table-hover tbody tr:hover{background-color:rgba(0,0,0,.075)}.wpacu_table_wrap .table-success,.wpacu_table_wrap .table-success>td,.wpacu_table_wrap .table-success>th{background-color:#dff0d8}.wpacu_table_wrap .table-hover .table-success:hover,.wpacu_table_wrap .table-hover .table-success:hover>td,.wpacu_table_wrap .table-hover .table-success:hover>th{background-color:#d0e9c6}.wpacu_table_wrap .table-info,.wpacu_table_wrap .table-info>td,.wpacu_table_wrap .table-info>th{background-color:#d9edf7}.wpacu_table_wrap .table-hover .table-info:hover,.wpacu_table_wrap .table-hover .table-info:hover>td,.wpacu_table_wrap .table-hover .table-info:hover>th{background-color:#c4e3f3}.wpacu_table_wrap .table-warning,.wpacu_table_wrap .table-warning>td,.wpacu_table_wrap .table-warning>th{background-color:#fcf8e3}.wpacu_table_wrap .table-hover .table-warning:hover,.wpacu_table_wrap .table-hover .table-warning:hover>td,.wpacu_table_wrap .table-hover .table-warning:hover>th{background-color:#faf2cc}.wpacu_table_wrap .table-danger,.wpacu_table_wrap .table-danger>td,.wpacu_table_wrap .table-danger>th{background-color:#f2dede}.wpacu_table_wrap .table-hover .table-danger:hover,.wpacu_table_wrap .table-hover .table-danger:hover>td,.wpacu_table_wrap .table-hover .table-danger:hover>th{background-color:#ebcccc}.wpacu_table_wrap .thead-inverse th{color:#fff;background-color:#292b2c}.wpacu_table_wrap .thead-default th{color:#464a4c;background-color:#eceeef}.wpacu_table_wrap .table-inverse{color:#fff;background-color:#292b2c}.wpacu_table_wrap .table-inverse td,.wpacu_table_wrap .table-inverse th,.wpacu_table_wrap .table-inverse thead th{border-color:#fff}.wpacu_table_wrap .table-inverse.table-bordered,.wpacu_table_wrap .table-responsive.table-bordered{border:0}.wpacu_table_wrap .table-responsive{display:block;width:100%;overflow-x:auto;-ms-overflow-style:-ms-autohiding-scrollbar}body.wp-admin[class*=asset-cleanup] .wpacu-overview-wrap .wpacu-overview-list-table tr:not(.wpacu-top):hover td{border-top:1px solid #ccd0d4;border-bottom:1px solid #ccd0d4}body.wp-admin[class*=asset-cleanup] .wpacu-overview-wrap .wpacu-overview-list-table tr:not(.wpacu-top):hover td:first-of-type{border-left:1px solid #ccd0d4}body.wp-admin[class*=asset-cleanup] .wpacu-overview-wrap .wpacu-overview-list-table tr:not(.wpacu-top):hover td:last-of-type{border-right:1px solid #ccd0d4}body.wp-admin[class*=asset-cleanup] .wpacu-overview-wrap .wpacu-overview-list-table tr td{font-size:14px;border-top:1px solid transparent;border-bottom:1px solid transparent}body.wp-admin[class*=asset-cleanup] .wpacu-overview-wrap .wpacu-overview-list-table tr td:first-of-type{border-left:1px solid transparent}body.wp-admin[class*=asset-cleanup] .wpacu-overview-wrap .wpacu-overview-list-table tr td:last-of-type{border-right:1px solid transparent}body.wp-admin[class*=asset-cleanup] table.wp-list-table:not(.wpacu-overview-list-table) tr:not(:first-of-type):not(.wpacu_selected):hover,body.wp-admin[class*=asset-cleanup] table.wp-list-table:not(.wpacu-overview-list-table).wpacu-list-table tr:not(.wpacu_selected):hover{-moz-box-shadow:inset 0 0 2px 1px #b3b3b3;-webkit-box-shadow:inset 0 0 2px 1px #B3B3B3;box-shadow:inset 0 0 2px 1px #B3B3B3}.wp-list-table .wpacu_remove_global_attr_row.wpacu_selected,.wp-list-table .wpacu_restore_position_row.wpacu_selected{background:#e7e7e7!important}ul.hire-reasons{margin-bottom:20px}ul.hire-reasons li{font-size:14px;line-height:22px;margin-bottom:12px}ul.hire-reasons li .dashicons{font-size:23px;line-height:23px}ul.hire-reasons li .dashicons.dashicons-yes{color:green}#wpacu-plugins-load-manager-wrap .wrap_plugin_unload_rules_options .wpacu_plugin_rules_wrap ul.wpacu_plugin_rules label.wpacu_plugin_unload_rule_input_checked,#wpacu-warning-read span.dashicons-warning,#wpacu-warning-read span.dashicons-wordpress-alt{color:#c00}ol.getting-started li{font-size:14px;line-height:22px;margin-bottom:8px}.wpacu-get-help-wrap p{font-size:14px}.wpacu-get-help-wrap .help-content-wrap{margin:20px 0 25px;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-moz-flex;display:-webkit-flex;display:flex;width:100%}@media only screen and (max-width:767px){.wpacu-get-help-wrap .help-content-wrap{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}}.wpacu-get-help-wrap .help-content-wrap .help-content{padding:15px;background:#fff;border:1px solid #E0E0E0;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;box-shadow:2px 3px 8px 0 #231f2038;flex:1 1 50%;margin-bottom:10px}.wpacu-get-help-wrap .help-content-wrap .help-content .content-title{margin:5px 0 15px;line-height:24px}.wpacu-get-help-wrap .help-content-wrap .help-content .cols-wrap{width:100%;margin:0 auto;display:table}.wpacu-get-help-wrap .help-content-wrap .help-content .wpacu-image-area{margin:5px 0 0;position:relative}.wpacu-get-help-wrap .help-content-wrap .help-content .wpacu-image-area.col-left{float:left;width:48%}.wpacu-get-help-wrap .help-content-wrap .help-content .wpacu-image-area.col-right{float:right;width:48%}.wpacu-get-help-wrap .help-content-wrap .help-content .wpacu-image-area.activate-plugin img{max-width:320px}.wpacu-get-help-wrap .help-content-wrap .help-content .wpacu-image-area img{width:99%;margin:8px 0;border:1px solid #cdcdcd;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px}.wpacu-get-help-wrap .help-content-wrap .help-content.upgrade-help{order:2}@media only screen and (min-width:768px){.wpacu-get-help-wrap .help-content-wrap .help-content{margin-right:24px}.wpacu-get-help-wrap .help-content-wrap .help-content.upgrade-help{margin-right:0}}.wpacu-get-help-wrap .help-content-wrap .help-content.tech-help{order:1}@media only screen and (max-width:767px){.wpacu-get-help-wrap .help-content-wrap .help-content.tech-help{margin-bottom:30px}}.wpacu-get-help-wrap .help-content-wrap .help-content ul{list-style:none;padding-left:0}.wpacu-get-help-wrap .help-content-wrap .help-content ul li{font-size:14px;line-height:22px;margin-bottom:15px}.wpacu-get-help-wrap .help-content-wrap .help-content p:last-child,.wpacu-get-help-wrap .help-content-wrap .help-content ul li:last-child{margin-bottom:0}select#wpacu-reset-drop-down{max-width:100%}#wpacu-license-data-remove-area{display:none;margin:14px 0 12px}#wpacu-license-data-remove-area.wpacu-visible{display:block}#wpacu-cache-assets-remove-area{display:none;margin:12px 0 25px}#wpacu-cache-assets-remove-area.wpacu-visible{display:block}#wpacu-cached-assets-removed-msg,span#wpacu-license-data-removed-msg{display:block;padding-left:26px}#wpacu-warning-read{display:none;margin:10px 0}#wpacu-warning-read.wpacu-visible{display:block}#wpacu-reset-submit-area{margin:10px 0;clear:both}#wpacu-reset-submit-btn{margin:10px 0 0}.wpacu-tools-area{margin:10px 20px 0 2px}.wpacu-tools-area .wpacu-tools-container{background:#fff;padding:15px;border:1px solid #cdcdcd;width:96%}.wpacu-tools-area .wpacu-tools-container form>div:first-child{margin:0 0 10px}.wpacu-tools-area .wpacu-tools-container form .wpacu-warning{display:none;box-sizing:border-box;margin-top:10px}.wpacu-tools-area .wpacu-tools-container form .wpacu-warning p{margin:0 0 10px;line-height:22px}.wpacu-tools-area .wpacu-tools-container form .wpacu-warning p:only-child{margin:0}.wpacu-tools-area .wpacu-tools-container form .wpacu-warning ul{font-size:13px;list-style-type:disc;padding-left:30px}.wpacu-tools-area .wpacu-tools-container form .wpacu-warning.wpacu-visible{display:block}.wpacu-tools-area .wpacu-export-import-area{padding:10px}.wpacu-tools-area .wpacu-export-import-area form>p:first-of-type{margin-top:0}.wpacu-tools-area .wpacu-export-import-area form>p:last-of-type{margin-bottom:0}.wpacu-tools-area .wpacu-export-import-area:hover{background:rgba(40,44,42,.05);box-shadow:inset 0 0 10px rgba(160,165,170,.15)}.wpacu-tools-area .wpacu-export-import-area+hr{display:block;height:1px;border:0;border-top:1px solid #cdcdcd;margin:10px 0;padding:0}#wpacu-import-form button.wpacu-importing img.wpacu-spinner{display:inline-block}#wpacu-import-form button img.wpacu-spinner{display:none;margin:0 0 0 5px;height:16px;width:16px;vertical-align:middle}.wpacu-about-wrap .wpacu-about-text img{width:auto;height:150px;position:absolute;top:20px;right:-20px}@media only screen and (max-width:767px){.wpacu-about-wrap h1{margin:20px}.wpacu-about-wrap .wpacu-about-text img{display:none}.wpacu-about-wrap .wpacu-about-text{margin:20px}}.wpacu-about-wrap .about-wrap-content .area-title{font-size:19px;line-height:19px;margin-bottom:0}.wpacu-about-wrap hr{margin:10px 0}.wpacu-lite-vs-pro-wrap ul{display:flex;top:0;z-index:10;padding-bottom:14px}.wpacu-lite-vs-pro-wrap li{list-style:none;flex:1}.wpacu-lite-vs-pro-wrap li:last-child{border-right:1px solid #DDD}.wpacu-lite-vs-pro-wrap button{width:100%;border:1px solid #DDD;border-right:0;border-top:0;padding:10px;background:#FFF;font-size:14px;font-weight:700;height:60px;color:#999}.wpacu-lite-vs-pro-wrap li.active button{background:#F5F5F5;color:#000}.wpacu-lite-vs-pro-wrap table{border-collapse:collapse;table-layout:fixed;width:100%}.wpacu-lite-vs-pro-wrap th{background:inherit}.wpacu-lite-vs-pro-wrap tr.first{background:inherit;font-size:18px}.wpacu-lite-vs-pro-wrap tr.first .bg-lite{border-top:4px solid #6d6e70;background:#fff;color:#6d6e70}.wpacu-lite-vs-pro-wrap tr.first .bg-pro{border-top:4px solid green;background:#fff;color:green}.wpacu-lite-vs-pro-wrap tr:not(.first){background:#fff}.wpacu-lite-vs-pro-wrap tr:not(:last-child):hover{background:#f8f8f8}.wpacu-lite-vs-pro-wrap td,.wpacu-lite-vs-pro-wrap th{height:53px;line-height:22px;border:1px solid #DDD;padding:10px 16px;empty-cells:show;text-align:left}@media only screen and (max-width:767px){.wpacu-lite-vs-pro-wrap td,.wpacu-lite-vs-pro-wrap th{font-size:14px}}.wpacu-lite-vs-pro-wrap td+td,.wpacu-lite-vs-pro-wrap th+th{text-align:center;display:none}.wpacu-lite-vs-pro-wrap td.default{display:table-cell}.wpacu-lite-vs-pro-wrap .txt-l{font-size:28px;font-weight:700}.wpacu-lite-vs-pro-wrap .txt-top{position:relative;top:-9px;left:-2px}.wpacu-lite-vs-pro-wrap svg{width:18px;height:18px}.wpacu-lite-vs-pro-wrap svg path{fill:green}.wpacu-lite-vs-pro-wrap .tick{color:#2CA01C}.wpacu-lite-vs-pro-wrap .tick img{fill:#2CA01C}@media only screen and (max-width:767px){.wpacu-lite-vs-pro-wrap .txt-l{font-size:20px}.wpacu-lite-vs-pro-wrap .tick{font-size:15px}}.wpacu-lite-vs-pro-wrap .na{font-size:18px;opacity:.3;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=30)"}.wpacu-lite-vs-pro-wrap .hide{border:0;background:0 0}.wpacu-lite-vs-pro-wrap td,.wpacu-lite-vs-pro-wrap th{display:table-cell!important;width:auto}.wpacu-lite-vs-pro-wrap td+td,.wpacu-lite-vs-pro-wrap th+th{width:130px}@media only screen and (max-width:767px){.wpacu-lite-vs-pro-wrap .na{font-size:15px}.wpacu-lite-vs-pro-wrap td+td,.wpacu-lite-vs-pro-wrap th+th{width:42px}}@media only screen and (min-width:768px){.wpacu-lite-vs-pro-wrap td .button{font-size:16px!important}}@media only screen and (max-width:767px){.wpacu-lite-vs-pro-wrap td .button{font-size:14px!important;padding:0 20px!important}.wpacu-lite-vs-pro-wrap td .button.button-primary{margin-top:6px;margin-bottom:14px}}@media only screen and (min-width:768px){.wpacu-lite-vs-pro-wrap{margin-bottom:40px;clear:both}}.wpacu-video-areas>div{padding:20px;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px}.wpacu-video-areas>div:nth-child(odd){background:#fff}.wpacu-video-areas>div:nth-child(even){background:inherit}@media only screen and (min-width:1200px){.wpacu-video-areas .wpacu-video-area-wrapper{margin:0 0 15px;display:flex}.wpacu-video-areas .wpacu-video-area-wrapper .wpacu-col-right{padding:0 20px 0 25px}}@media only screen and (min-width:992px) and (max-width:1199px){.wpacu-video-areas .wpacu-video-area-wrapper{margin:0 0 40px}}.wpacu-video-areas .wpacu-video-area-wrapper ol{font-size:14px}.wpacu-video-areas .wpacu-video-area-wrapper ul{font-size:14px;list-style:disc;margin-left:22px}@media only screen and (min-width:1200px){.wpacu-video-areas .wpacu-video-area-wrapper .wpacu-col-right p:first-child{margin-top:0}.wpacu-video-areas .wpacu-video-area-wrapper .wpacu-col-right p:last-child{margin-bottom:0}}@media only screen and (max-width:1199px){.wpacu-video-areas .wpacu-video-area-wrapper .wpacu-video-wrapper{position:relative;padding-bottom:56.25%;padding-top:30px;height:0;overflow:hidden}}.wpacu-video-areas .wpacu-video-area-wrapper .wpacu-video-wrapper iframe{width:560px;height:315px}@media only screen and (max-width:1199px){.wpacu-video-areas .wpacu-video-area-wrapper .wpacu-video-wrapper iframe{position:absolute;top:0;left:0;width:100%;height:100%}}#wpassetcleanup_asset_list.postbox h2{padding-left:52px!important;position:relative}#wpassetcleanup_asset_list.postbox h2:before{content:"";position:absolute;background-image:url(images/wpacu-logo-transparent-bg-v1.png);background-size:cover;top:6px;left:13px;width:33px;height:26px;opacity:.8;-webkit-filter:grayscale(100%);filter:grayscale(100%)}body.wp-admin .wpacu-modal{display:none;position:fixed;z-index:1000000;padding-top:15%;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:#000;background-color:rgba(0,0,0,.4)}body.wp-admin .wpacu-modal pre{white-space:normal}body.wp-admin .wpacu-modal-content{background-color:#fefefe;margin:auto;padding:20px;border:1px solid #888;width:80%;max-width:600px;border-radius:10px}body.wp-admin .wpacu-modal-content pre{white-space:normal}body.wp-admin .wpacu-close{color:#aaa;float:right;font-size:28px;font-weight:700}body.wp-admin .wpacu-close:focus,body.wp-admin .wpacu-close:hover{color:#000;text-decoration:none;cursor:pointer}.wpacu-bulk-changes-tabs{display:table;position:relative;overflow:hidden;margin:0;width:100%}.wpacu-bulk-changes-tabs li{border-top:1px solid rgba(40,44,42,.1);border-left:1px solid rgba(40,44,42,.1);border-bottom:1px solid rgba(40,44,42,.1);float:left;line-height:38px;padding:0;position:relative;margin-bottom:12px}.wpacu-bulk-changes-tabs li:last-child{border-right:1px solid rgba(40,44,42,.1)}.wpacu-bulk-changes-tabs a{position:relative;background:rgba(40,44,42,.05);color:#004567;font-size:14px;font-weight:500;display:block;letter-spacing:0;outline:0;padding:6px 20px;text-decoration:none;border-top:3px solid transparent}.wpacu-bulk-changes-tabs a:hover{background:#f1f1f1;border-top:3px solid transparent}.wpacu-bulk-changes-tabs .current a{background:#fff;border-top:3px solid #004567}.wpacu-bulk-changes-tabs .current a:hover{background:#fff}.wpacu-bulk-changes-tabs .current a:after,.wpacu-bulk-changes-tabs .current a:before{top:100%;left:50%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}.wpacu-bulk-changes-tabs .current a:after{border-color:rgba(136,183,213,0);border-top-color:#fff;border-width:12px;margin-left:-12px}.wpacu-bulk-changes-tabs .current a:before{border-color:rgba(194,225,245,0);border-top-color:rgba(40,44,42,.1);border-width:13px;margin-left:-13px}img.wpacu-emoji{display:inline!important;border:none!important;height:1em!important;width:1em!important;margin:0 .07em!important;vertical-align:-.1em!important;background:0 0!important;padding:0!important;box-shadow:none!important}#wpacu-plugins-load-manager-wrap table td{border-bottom:1px solid #e7e7e7}#wpacu-plugins-load-manager-wrap table td.wpacu_plugin_icon{padding:14px 10px}#wpacu-plugins-load-manager-wrap table td.wpacu_plugin_details{vertical-align:middle;padding:10px 0 10px 8px}#wpacu-plugins-load-manager-wrap table td.wpacu_plugin_details .wpacu_plugin_title{font-weight:600}#wpacu-plugins-load-manager-wrap .wrap_plugin_unload_rules_options{width:auto;display:inline-flex;-webkit-flex-wrap:wrap;flex-wrap:wrap}#wpacu-plugins-load-manager-wrap .wrap_plugin_unload_rules_options .wpacu_plugin_rules_wrap{flex-grow:1;margin:0 16px 0 0!important;padding:8px 10px 6px 0!important}#wpacu-plugins-load-manager-wrap .wrap_plugin_unload_rules_options .wpacu_plugin_rules_wrap ul.wpacu_plugin_rules{margin:0;vertical-align:middle}#wpacu-plugins-load-manager-wrap .wrap_plugin_unload_rules_options .wpacu_plugin_rules_wrap ul.wpacu_plugin_rules label{vertical-align:top}#wpacu-plugins-load-manager-wrap .wrap_plugin_unload_rules_options .wpacu_plugin_rules_wrap ul.wpacu_plugin_rules label input[type=radio].wpacu_plugin_load_it:before{background-color:green}#wpacu-plugins-load-manager-wrap .wrap_plugin_unload_rules_options .wpacu_plugin_rules_wrap ul.wpacu_plugin_rules label input[type=radio].wpacu_plugin_unload_rule_input:before{background-color:#c00}#wpacu-plugins-load-manager-wrap .wrap_plugin_load_exception_options{padding-top:5px;border-top:1px solid #e7e7e7;width:auto;display:inline-flex;-webkit-flex-wrap:wrap;flex-wrap:wrap}#wpacu-plugins-load-manager-wrap .wrap_plugin_load_exception_options .wpacu_plugin_rules_wrap{flex-grow:1;margin:0 16px 0 0!important;padding:6px 10px 6px 0!important}#wpacu-plugins-load-manager-wrap .wrap_plugin_load_exception_options .wpacu_plugin_rules_wrap ul.wpacu_plugin_rules{margin:0;vertical-align:middle}#wpacu-plugins-load-manager-wrap .wrap_plugin_load_exception_options .wpacu_plugin_rules_wrap ul.wpacu_plugin_rules label{vertical-align:top}#wpacu-plugins-load-manager-wrap .wrap_plugin_load_exception_options .wpacu_plugin_rules_wrap ul.wpacu_plugin_rules.wpacu_exception_options_area li{display:inline-block;float:left;margin:1px 25px 1px 0;line-height:20px}#wpacu-plugins-load-manager-wrap .wrap_plugin_load_exception_options .wpacu_plugin_rules_wrap ul.wpacu_plugin_rules.wpacu_exception_options_area li:last-of-type{margin:1px 0}.wpacu-list-table.plugins{width:98%;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}#wpacu-plugins-load-manager-wrap .help_link{text-decoration:none;color:inherit;vertical-align:middle}#wpacu-plugins-load-manager-wrap .help_link.unload_it_regex{vertical-align:top}#wpacu-plugins-load-manager-wrap .wpacu_plugin_details .wpacu_plugin_path{font-style:italic;color:grey}#wpacu-plugins-load-manager-wrap .wpacu_plugin_icon>img{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}#wpacu-plugins-load-manager-wrap .wpacu_plugin_icon>div{background:#efefef;border:#cdcdcd;border-radius:3px;width:40px;height:40px;vertical-align:middle;position:relative;text-align:center}#wpacu-plugins-load-manager-wrap .wpacu_plugin_icon>div>span{font-size:30px;color:#b3b3b3;top:50%;vertical-align:middle;left:50%;transform:translate(-50%,-50%);width:30px;height:30px;position:absolute}#wpacu-plugins-load-manager-wrap .wpacu_exception_options_area textarea,#wpacu-plugins-load-manager-wrap textarea:focus{width:100%}#wpacu-plugins-load-manager-wrap .wpacu_plugin_unload_regex_input_wrap{display:block}#wpacu-plugins-load-manager-wrap .wpacu_plugin_unload_regex_input_wrap textarea{margin-top:6px;min-width:400px}#wpacu-plugins-load-manager-wrap textarea{line-height:normal;min-height:20px;min-width:300px;display:inline-block;padding:2px 4px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}#wpacu-plugins-load-manager-wrap textarea.wpacu_disabled{background:#fbfafa!important;color:inherit}
|
1 |
+
@charset "UTF-8";#wpacu-pages-info-area{width:98%}#wpacu-top-area{margin:15px 0;padding:0 10px}#wpacu-quick-actions{color:#74777b;float:right;width:auto;margin-right:30px;background:rgba(40,44,42,.05);border-radius:10px;padding:6px 12px}#wpacu-quick-actions .wpacu-actions-title{font-weight:200;letter-spacing:.5px}#wpacu-quick-actions a{color:#004567;text-decoration:none}#wpacu-quick-actions a:hover{color:#0073aa}#wpacu-logo-wrap{width:auto;display:inline-block;position:relative}#wpacu-logo-wrap a{display:block}#wpacu-logo-wrap img{width:352px;height:79px}#wpacu-logo-wrap .wpacu-pro-sign{position:absolute;height:auto;font-family:FiraSans-Medium,proxima-nova-1,Montserrat,Helvetica,sans-serif;font-size:13px;font-weight:600;letter-spacing:1px;padding:5px 11px;border-radius:15px;right:-60px;top:30px;width:auto;display:inline-block;text-align:center}#wpacu-logo-wrap .wpacu-pro-sign.wpacu-lite{color:#74777b;background:rgba(40,44,42,.05)}#wpacu-logo-wrap .wpacu-pro-sign.wpacu-pro{color:#004567;background-color:rgba(40,44,42,.05)}.wpacu-tabs{position:relative;overflow:hidden;margin:0 auto 20px;width:100%;font-weight:300;font-size:20px}.wpacu-tabs nav{text-align:center}.wpacu-tabs nav ul{position:relative;display:-ms-flexbox;display:-webkit-flex;display:-moz-flex;display:-ms-flex;display:flex;padding:0;list-style:none;-ms-box-orient:horizontal;-ms-box-pack:center;-webkit-flex-flow:row wrap;-moz-flex-flow:row wrap;-ms-flex-flow:row wrap;flex-flow:row wrap;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;justify-content:center}.wpacu-tabs nav ul li{position:relative;z-index:1;display:block;margin:0;text-align:center;-webkit-flex:1;-moz-flex:1;-ms-flex:1;flex:1}.wpacu-tabs nav ul li span.extra-info{position:absolute;font-size:12px;left:-50%;right:50%;bottom:12px;-webkit-transform:translate(50%,50%);transform:translate(50%,50%);white-space:nowrap}.wpacu-tabs nav ul li span.extra-info.has-bulk-unloads{right:48%}.wpacu-tabs nav ul li span.extra-info.no-bulk-unloads{left:0;right:2px;bottom:2px;-webkit-transform:inherit;transform:inherit}.wpacu-tabs nav ul li span.extra-info .dashicons{font-size:16px;margin-right:-3px;margin-top:1px}.wpacu-tabs nav ul li span.extra-info.license-status.inactive{color:#c00}.wpacu-tabs nav ul li span.extra-info.license-status.active{color:green}.wpacu-tabs nav ul li span.extra-info.assets-unloaded-false{color:#004567}.wpacu-tabs nav ul li span.extra-info.assets-unloaded-true,.wpacu-tabs nav ul li span.extra-info.bulk-unloads-true{color:green}.wpacu-tabs nav a{position:relative;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:2.5}.wpacu-tabs nav a span{vertical-align:middle;font-size:14px}.wpacu-tabs nav li.wpacu-tab-current a{color:#74777b}.wpacu-tabs nav a:focus{outline:0}.wpacu-tabs .dashicons{font-size:20px}.no-js .wpacu-content-wrap section{display:block;padding-bottom:2em;border-bottom:1px solid rgba(255,255,255,.6)}.no-flexbox nav ul{display:block}.no-flexbox nav ul li{min-width:15%;display:inline-block}@media screen and (max-width:58em){.wpacu-tabs nav a.icon span{display:none}.wpacu-tabs nav a:before{margin-right:0}}.wpacu-tabs-style-underline nav{background:#fff}.wpacu-tabs-style-underline nav a{color:#74777b;font-size:18px;text-transform:uppercase;text-decoration:none;padding:.25em 0 .5em;border-left:1px solid #e7ecea;-webkit-transition:color .2s;transition:color .2s}.wpacu-tabs-style-underline nav li:last-child a{border-right:1px solid #e7ecea}.wpacu-tabs-style-underline nav li a::after{position:absolute;bottom:0;left:0;width:100%;height:6px;background:#2CC185;content:"";-webkit-transition:-webkit-transform .3s;transition:transform .3s;-webkit-transform:translate3d(0,150%,0);transform:translate3d(0,150%,0)}.wpacu-tabs-style-underline nav li.wpacu-tab-current a::after{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.wpacu-tabs-style-underline nav a span{font-weight:700}.wpacu-tabs-style-topline{max-width:1800px;margin:20px auto 22px 0;width:98%;font-weight:300;text-decoration:none}.wpacu-tabs-style-topline nav li{border:1px solid rgba(40,44,42,.1)}.wpacu-tabs-style-topline nav li:not(:last-child){border-right:none}.wpacu-tabs-style-topline nav li.wpacu-tab-current{border-top-color:#008f9c;border-bottom:none}.wpacu-tabs-style-topline nav a{padding:20px 18px;background:rgba(40,44,42,.05);color:#74777b;line-height:1;-webkit-transition:color .2s;transition:color .2s;text-decoration:none}.wpacu-tabs-style-topline nav a:focus,.wpacu-tabs-style-topline nav a:hover{background:0 0;color:#008f9c}.wpacu-tabs-style-topline nav li.wpacu-tab-current a{background:0 0;box-shadow:inset 0 3px 0 #008f9c;color:#008f9c}.wpacu-tabs-style-topline nav li.wpacu-tab-current a span:not(.dashicons){font-weight:600}.wpacu-tabs-style-topline nav a span{text-transform:uppercase;font-weight:400}.wpacu-tab-nav-wrapper{border-bottom:none!important}.wpacu-tab-nav-wrapper .nav-tab.nav-tab-active{background:#fff;position:relative}.wpacu-tab-nav-wrapper .nav-tab.nav-tab-active:after{content:"";width:100%;bottom:-2px;left:0;position:absolute;border-bottom:2px solid #fff}.wpacu_hide{display:none!important}.wpacu-script-attributes-area{display:block;margin-bottom:12px}.wpacu-script-attributes-area>div:first-of-type{display:inline-block;float:left;margin-right:15px;line-height:30px;vertical-align:middle}.wpacu-script-attributes-area ul.wpacu-script-attributes-settings{display:inline-block;float:left;padding:5px 7px!important}.wpacu-script-attributes-area ul.wpacu-script-attributes-settings.wpacu-first{margin:0 15px 0 0!important}.wpacu-script-attributes-area ul.wpacu-script-attributes-settings label{margin:0!important}.wpacu-script-attributes-area ul.wpacu-script-attributes-settings li{display:inline-block;margin:0 16px 0 0!important}.wpacu-script-attributes-area ul.wpacu-script-attributes-settings li:first-child{margin:0 10px 0 0!important}.wpacu-script-attributes-area ul.wpacu-script-attributes-settings li:last-child{margin:0 2px 0 0!important}.wpacu-script-attributes-area .wpacu-script-attributes-settings{background:#fff!important;border:1px solid #eee!important;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;padding:5px 10px!important;list-style:none;display:inline-block;margin:0}.wpacu-script-attributes-area .wpacu-script-attributes-settings input[type=radio]{width:auto;padding:0;margin:0 5px 0 0}.wpacu-script-attributes-area .wpacu-script-attributes-settings:hover{background:#f2faf2}tr.wpacu_location_changed>td{border-left:#004567 4px solid}tr.wpacu_not_load td,tr.wpacu_not_load th{background:#FFE1E1!important}tr.wpacu_not_load td .wpacu-assets-inline-code-wrap,tr.wpacu_not_load td .wpacu-only-when-kept-loaded,tr.wpacu_not_load th .wpacu-assets-inline-code-wrap,tr.wpacu_not_load th .wpacu-only-when-kept-loaded{filter:alpha(opacity=45);opacity:.45}.dashicons-wpacu{width:17px;height:17px;margin:2px 0 0;font-size:16px;text-decoration:none;color:inherit!important}#wpacu_meta_box_content #wpacu-fetch-list-step-1-wrap.wpacu-completed,.wpacu-license-area .notice .dashicons,.wpacu-settings-area .notice .dashicons{color:green}.wpacu_widefat .check-column.wpacu_check{padding:10px}body[class*=wpassetcleanup] #footer-left{border-left:2px solid green;padding-left:10px}#wpassetcleanup_asset_list small{width:auto;float:none;display:inline}#wpacu_meta_box_content{width:99%}#wpacu_meta_box_content div.select select{max-width:inherit}#wpacu_meta_box_content .emoji{font-size:18px}#wpacu_meta_box_content h3{margin-left:0;padding-left:0}#wpacu_meta_box_content div.wpacu_note{padding:10px;background-color:#f5f5f5}#wpacu_meta_box_content .dashicons.dashicons-warning,#wpacu_meta_box_content .dashicons.dashicons-wordpress-alt{color:#c00}#wpacu_meta_box_content .wpacu_verified{padding:10px;background-color:#f5f5f5;border-left:1px solid #ddd}#wpacu_meta_box_content .wpacu_verified span{color:#0073aa;font-weight:700}#wpacu_meta_box_content div.wpacu_warning{border:1px solid #c00}#wpacu_meta_box_content ul.wpacu_asset_options{margin:0;padding:0}#wpacu_meta_box_content ul.wpacu_asset_options li{list-style:none;display:inline-block}#wpacu_meta_box_content ul.wpacu_asset_options label{font-weight:400;margin-right:5px;margin-top:5px;margin-bottom:5px}.wpacu-updated-frontend{font-weight:400;background-color:#fff;border-left:4px solid #46b450;border-top:1px solid #46b450;border-right:1px solid #46b450;border-bottom:1px solid #46b450;padding:9px 14px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.wpacu_exception_options_area_wrap label.wpacu_bold span,.wpacu_load_regex_area_wrap label.wpacu_bold span,.wpacu_unload_regex_area_wrap label.wpacu_bold span{font-weight:600!important}.wpacu-updated-frontend span.dashicons-yes{color:#46b450;font-size:26px}#wpacu-update-front-settings-area{margin:10px 0;display:inline-block;position:relative}@media only screen and (min-width:768px){#wpacu-update-front-settings-area{position:-webkit-sticky;position:sticky;bottom:0;display:block;padding:15px 0;z-index:1000000;border-top:1px solid #cdcdcd;background:#fff}}#wpacu-updating-front-settings{display:none;position:absolute;top:20px;left:142px}.wpacu_load_regex_area_wrap label.wpacu_unload_checked span,.wpacu_unload_regex_area_wrap label.wpacu_unload_checked span{color:#d54e21}.wpacu_load_regex_area_wrap .wpacu_handle_unload_regex_input_wrap,.wpacu_unload_regex_area_wrap .wpacu_handle_unload_regex_input_wrap{margin:4px 0 0}.wpacu_load_regex_area_wrap .wpacu_handle_unload_regex_input_wrap input[type=text],.wpacu_unload_regex_area_wrap .wpacu_handle_unload_regex_input_wrap input[type=text]{line-height:normal;min-height:20px;min-width:300px;max-width:400px;display:inline-block;padding:4px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.wpacu_load_regex_area_wrap .wpacu_handle_unload_regex_input_wrap input[type=text].wpacu_disabled,.wpacu_unload_regex_area_wrap .wpacu_handle_unload_regex_input_wrap input[type=text].wpacu_disabled{background:#fbfafa!important;color:inherit}.wpacu_is_global_unloaded .wpacu_exception_options_area_wrap{display:inline-block}.wpacu_is_global_unloaded .wpacu_exception_options_area_wrap .wpacu_area_one,.wpacu_is_global_unloaded .wpacu_exception_options_area_wrap .wpacu_area_two,.wpacu_is_global_unloaded .wpacu_exception_options_area_wrap .wpacu_load_regex_input_wrap{display:block}.wpacu_exception_options_area_wrap{display:table;background:#fff!important}.wpacu_exception_options_area_wrap textarea{line-height:normal;min-height:20px;min-width:300px;max-width:400px;display:inline-block;padding:2px 4px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.wpacu_exception_options_area_wrap textarea:focus{width:100%}.wpacu_exception_options_area_wrap textarea.wpacu_disabled{background:#fbfafa!important;color:inherit}.wpacu_exception_options_area_wrap p:first-of-type{margin-top:0}.wpacu_exception_options_area_wrap .wpacu_area_one{display:table-cell;vertical-align:top;padding-right:10px}.wpacu_exception_options_area_wrap .wpacu_area_two{display:table-cell}@media only screen and (max-width:1199px){.wpacu_exception_options_area_wrap,.wpacu_exception_options_area_wrap .wpacu_area_one,.wpacu_exception_options_area_wrap .wpacu_area_two{display:block}}#wpacu_meta_box_content .wpacu_widefat{width:100%}#wpacu_meta_box_content .wpacu-assets-collapsible-content{padding:0 10px!important}#wpacu_meta_box_content ul.wpacu_asset_options{vertical-align:middle}#wpacu_meta_box_content ul.wpacu_asset_options.wpacu_exception_options_area li{display:inline-block;float:left;margin:1px 25px 1px 0;line-height:20px}#wpacu_meta_box_content ul.wpacu_asset_options.wpacu_exception_options_area li:last-of-type{margin:1px 0}#wpacu_meta_box_content ul.wpacu_asset_options.wpacu_exception_options_area li input[type=text]{margin-left:5px;border:1px solid #e7e7e7;background:#fff}body.wp-admin #wpacu_wrap_assets code{display:inline-block!important}body:not(.wp-admin) #wpacu_wrap_assets code{display:block!important}#wpacu_wrap_assets{color:#000!important;text-align:left!important;clear:both!important;width:90%!important;padding:20px!important;margin:30px 0 0 15px!important;border:1px solid #cdcdcd;z-index:10000!important;position:relative!important;background-color:#fff!important}#wpacu_wrap_assets div.wpacu_warning{border:1px solid #c00;padding:5px 10px}#wpacu_wrap_assets small{display:inline!important;margin:0!important;letter-spacing:normal!important}#wpacu_wrap_assets input[type=checkbox]{width:auto!important;margin-right:4px!important}#wpacu_wrap_assets img:not(.wpacu-ajax-loader){display:inline-block!important}#wpacu_wrap_assets p{line-height:22px!important;margin:10px 0!important;text-align:left!important;font-weight:400!important}#wpacu_wrap_assets p:first-child{margin:0 0 10px!important}#wpacu_wrap_assets h1{margin:0 0 20px!important;font-size:160%!important;text-align:left!important}#wpacu_wrap_assets h3{margin:20px 0;font-size:130%}#wpacu_wrap_assets ul.wpacu_asset_options.wpacu_exception_options_area li{display:inline-block;float:left;margin:1px 25px 1px 0;line-height:30px}#wpacu_wrap_assets ul.wpacu_asset_options.wpacu_exception_options_area li:last-of-type{margin:1px 0}.wpacu_verified{margin:0 0 10px!important}.wpacu_asset_row div.select{display:inline-block;width:auto}.wpacu_asset_row:first-child td{border-top:1px solid #cdcdcd}.wpacu_asset_row td{border-left:1px solid #cdcdcd;border-right:1px solid #cdcdcd;border-bottom:1px solid #cdcdcd}.wpacu_asset_row.wpacu_notice_row td{position:relative;padding:5px;border-bottom:1px solid transparent}.wpacu_asset_row.wpacu_notice_row td div.wpacu-warning{width:auto;margin:5px;font-style:italic}.wpacu_asset_row:not(.wpacu_notice_row) td{padding:18px!important;position:relative}.wpacu_asset_row:not(.wpacu_notice_row) td[data-wpacu-row-status=contracted]{padding:18px 18px 8px!important}.wpacu_asset_row:not(.wpacu_notice_row) td.wpacu_selected,.wpacu_asset_row:not(.wpacu_notice_row) td:hover{-moz-box-shadow:inset 0 0 12px #cdcdcd;-webkit-box-shadow:inset 0 0 12px #cdcdcd;box-shadow:inset 0 0 12px #cdcdcd}.wpacu_asset_row:not(.wpacu_notice_row) td p{padding:0!important;margin-bottom:8px!important;word-wrap:break-word!important;-ms-word-break:break-all;word-break:break-word}.wpacu_asset_row:not(.wpacu_notice_row) td label{width:auto!important;margin:0!important;cursor:pointer!important;display:inline-block!important;font-size:100%!important;font-weight:400!important}.wpacu_asset_row:not(.wpacu_notice_row) td label span:not(.dashicons){font-size:100%!important}.wpacu_asset_row:not(.wpacu_notice_row) td.wpacu_check{width:50px!important}.asset-table-extra-info td{padding:5px!important}body.wp-admin .wpacu_asset_row td.wpacu_check{width:25px!important}.wpacu_asset_row .dashicons-warning,.wpacu_asset_row .dashicons-wordpress-alt{color:red!important}.wpacu_asset_row .dashicons-wordpress-alt{font-size:17px;vertical-align:middle}label.wpacu_add_global{cursor:pointer!important}label.wpacu_input_load_checked{font-weight:700;color:#d54e21}label.wpacu_global_unload_exception{font-weight:700!important}tr.wpacu_bulk_change_row.wpacu_selected,tr.wpacu_global_rule_row.wpacu_selected,tr.wpacu_remove_preload_row.wpacu_selected{background:#e7e7e7}.nav-tab-wrapper{border-bottom:1px solid #ccc;width:95%}.nav-tab-wrapper.nav-assets-manager .nav-tab{font-size:13px;font-weight:500;padding:6px 10px}.nav-tab-wrapper.nav-assets-manager .nav-tab.for-pro{padding:6px 8px 6px 3px}ul.wpacu_asset_options{margin:0 10px 0 0;padding:0}ul.wpacu_asset_options li{margin:0 10px 0 0;list-style:none;display:inline-block;line-height:normal}ul.wpacu_asset_options li.remove_rule label{font-weight:700}ul.wpacu_asset_options label{margin-right:20px;font-weight:400}ul.wpacu_asset_options label input{margin-right:4px}.wpacu_list_table{width:100%;font-weight:400}.wpacu_list_table div,.wpacu_list_table li,.wpacu_list_table p{font-weight:400}.wpacu_widefat{width:99%}.wpacu_striped>tbody>:nth-child(even),ul.wpacu_striped>:nth-child(even){background-color:#fff!important}.wpacu_striped>tbody>:nth-child(odd),ul.wpacu_striped>:nth-child(odd){background-color:#f9f9f9!important}.wpacu_update_btn{width:auto;-moz-box-shadow:inset 0 1px 0 0 #54a3f7!important;-webkit-box-shadow:inset 0 1px 0 0 #54a3f7!important;box-shadow:inset 0 1px 0 0 #54a3f7!important;background:-webkit-gradient(linear,left top,left bottom,color-stop(.05,#007dc1),color-stop(1,#0061a7))!important;background:-moz-linear-gradient(top,#007dc1 5%,#0061a7 100%)!important;background:-webkit-linear-gradient(top,#007dc1 5%,#0061a7 100%)!important;background:-o-linear-gradient(top,#007dc1 5%,#0061a7 100%)!important;background:-ms-linear-gradient(top,#007dc1 5%,#0061a7 100%)!important;background:linear-gradient(to bottom,#007dc1 5%,#0061a7 100%)!important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#007dc1", endColorstr="#0061a7", GradientType=0)!important;background-color:#007dc1!important;-moz-border-radius:3px!important;-webkit-border-radius:3px!important;border-radius:3px!important;border:1px solid #124d77!important;display:inline-block!important;cursor:pointer!important;color:#fff!important;font-size:15px!important;padding:10px 24px!important;text-decoration:none!important;text-shadow:0 1px 0 #154682!important;height:auto!important;line-height:normal!important}.wpacu-btns .btn:focus,.wpacu-btns .btn:hover,.wpacu-btns a{text-decoration:none}.wpacu_update_btn.wpacu_submitting,.wpacu_update_btn:hover{background:-webkit-gradient(linear,left top,left bottom,color-stop(.05,#0061a7),color-stop(1,#007dc1))!important;background:-moz-linear-gradient(top,#0061a7 5%,#007dc1 100%)!important;background:-webkit-linear-gradient(top,#0061a7 5%,#007dc1 100%)!important;background:-o-linear-gradient(top,#0061a7 5%,#007dc1 100%)!important;background:-ms-linear-gradient(top,#0061a7 5%,#007dc1 100%)!important;background:linear-gradient(to bottom,#0061a7 5%,#007dc1 100%)!important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#0061a7", endColorstr="#007dc1", GradientType=0)!important;background-color:#0061a7!important}.wpacu_update_btn.wpacu_submitting{cursor:default!important}.wpacu_update_btn:active{position:relative!important;top:1px!important}.wpacu-btns .btn{display:inline-block;font-weight:400;line-height:1.25;text-align:center;white-space:nowrap;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:1px solid transparent;padding:.5rem 1rem;font-size:1rem;-webkit-border-radius:.25rem;-moz-border-radius:.25rem;border-radius:.25rem;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.wpacu-btns .btn.focus,.wpacu-btns .btn:focus{outline:0;-webkit-box-shadow:0 0 0 2px rgba(2,117,216,.25);box-shadow:0 0 0 2px rgba(2,117,216,.25)}.wpacu-btns .btn.disabled,.wpacu-btns .btn:disabled{cursor:not-allowed;opacity:.65}.wpacu-btns .btn.active,.wpacu-btns .btn:active{background-image:none}.wpacu-btns a.btn.disabled,.wpacu-btns fieldset[disabled] a.btn{pointer-events:none}.wpacu-btns .btn-primary{color:#fff;background-color:#0275d8;border-color:#0275d8}.wpacu-btns .btn-primary:hover{color:#fff;background-color:#025aa5;border-color:#01549b}.wpacu-btns .btn-primary.focus,.wpacu-btns .btn-primary:focus{-webkit-box-shadow:0 0 0 2px rgba(2,117,216,.5);box-shadow:0 0 0 2px rgba(2,117,216,.5)}.wpacu-btns .btn-primary.disabled,.wpacu-btns .btn-primary:disabled{background-color:#0275d8;border-color:#0275d8}.wpacu-btns .btn-primary.active,.wpacu-btns .btn-primary:active,.wpacu-btns .show>.btn-primary.dropdown-toggle{color:#fff;background-color:#025aa5;background-image:none;border-color:#01549b}.wpacu-btns .btn-secondary{color:#292b2c;background-color:#fff;border-color:#ccc}.wpacu-btns .btn-secondary:hover{color:#292b2c;background-color:#e6e6e6;border-color:#adadad}.wpacu-btns .btn-secondary.focus,.wpacu-btns .btn-secondary:focus{-webkit-box-shadow:0 0 0 2px rgba(204,204,204,.5);box-shadow:0 0 0 2px rgba(204,204,204,.5)}.wpacu-btns .btn-secondary.disabled,.wpacu-btns .btn-secondary:disabled{background-color:#fff;border-color:#ccc}.wpacu-btns .btn-secondary.active,.wpacu-btns .btn-secondary:active,.wpacu-btns .show>.btn-secondary.dropdown-toggle{color:#292b2c;background-color:#e6e6e6;background-image:none;border-color:#adadad}.wpacu-btns .btn-info{color:#fff;background-color:#5bc0de;border-color:#5bc0de}.wpacu-btns .btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#2aabd2}.wpacu-btns .btn-info.focus,.wpacu-btns .btn-info:focus{-webkit-box-shadow:0 0 0 2px rgba(91,192,222,.5);box-shadow:0 0 0 2px rgba(91,192,222,.5)}.wpacu-btns .btn-info.disabled,.wpacu-btns .btn-info:disabled{background-color:#5bc0de;border-color:#5bc0de}.wpacu-btns .btn-info.active,.wpacu-btns .btn-info:active,.wpacu-btns .show>.btn-info.dropdown-toggle{color:#fff;background-color:#31b0d5;background-image:none;border-color:#2aabd2}.wpacu-btns .btn-success{color:#fff;background-color:#5cb85c;border-color:#5cb85c}.wpacu-btns .btn-success:hover{color:#fff;background-color:#449d44;border-color:#419641}.wpacu-btns .btn-success.focus,.wpacu-btns .btn-success:focus{-webkit-box-shadow:0 0 0 2px rgba(92,184,92,.5);box-shadow:0 0 0 2px rgba(92,184,92,.5)}.wpacu-btns .btn-success.disabled,.wpacu-btns .btn-success:disabled{background-color:#5cb85c;border-color:#5cb85c}.wpacu-btns .btn-success.active,.wpacu-btns .btn-success:active,.wpacu-btns .show>.btn-success.dropdown-toggle{color:#fff;background-color:#449d44;background-image:none;border-color:#419641}.wpacu-btns .btn-warning{color:#fff;background-color:#f0ad4e;border-color:#f0ad4e}.wpacu-btns .btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#eb9316}.wpacu-btns .btn-warning.focus,.wpacu-btns .btn-warning:focus{-webkit-box-shadow:0 0 0 2px rgba(240,173,78,.5);box-shadow:0 0 0 2px rgba(240,173,78,.5)}.wpacu-btns .btn-warning.disabled,.wpacu-btns .btn-warning:disabled{background-color:#f0ad4e;border-color:#f0ad4e}.wpacu-btns .btn-warning.active,.wpacu-btns .btn-warning:active,.wpacu-btns .show>.btn-warning.dropdown-toggle{color:#fff;background-color:#ec971f;background-image:none;border-color:#eb9316}.wpacu-btns .btn-danger{color:#fff;background-color:#d9534f;border-color:#d9534f}.wpacu-btns .btn-danger:hover{color:#fff;background-color:#c9302c;border-color:#c12e2a}.wpacu-btns .btn-danger.focus,.wpacu-btns .btn-danger:focus{-webkit-box-shadow:0 0 0 2px rgba(217,83,79,.5);box-shadow:0 0 0 2px rgba(217,83,79,.5)}.wpacu-btns .btn-danger.disabled,.wpacu-btns .btn-danger:disabled{background-color:#d9534f;border-color:#d9534f}.wpacu-btns .btn-danger.active,.wpacu-btns .btn-danger:active,.wpacu-btns .show>.btn-danger.dropdown-toggle{color:#fff;background-color:#c9302c;background-image:none;border-color:#c12e2a}.wpacu-btns .btn-outline-primary{color:#0275d8;background-image:none;background-color:transparent;border-color:#0275d8}.wpacu-btns .btn-outline-primary:hover{color:#fff;background-color:#0275d8;border-color:#0275d8}.wpacu-btns .btn-outline-primary.focus,.wpacu-btns .btn-outline-primary:focus{-webkit-box-shadow:0 0 0 2px rgba(2,117,216,.5);box-shadow:0 0 0 2px rgba(2,117,216,.5)}.wpacu-btns .btn-outline-primary.disabled,.wpacu-btns .btn-outline-primary:disabled{color:#0275d8;background-color:transparent}.wpacu-btns .btn-outline-primary.active,.wpacu-btns .btn-outline-primary:active,.wpacu-btns .show>.btn-outline-primary.dropdown-toggle{color:#fff;background-color:#0275d8;border-color:#0275d8}.wpacu-btns .btn-outline-secondary{color:#ccc;background-image:none;background-color:transparent;border-color:#ccc}.wpacu-btns .btn-outline-secondary:hover{color:#fff;background-color:#ccc;border-color:#ccc}.wpacu-btns .btn-outline-secondary.focus,.wpacu-btns .btn-outline-secondary:focus{-webkit-box-shadow:0 0 0 2px rgba(204,204,204,.5);box-shadow:0 0 0 2px rgba(204,204,204,.5)}.wpacu-btns .btn-outline-secondary.disabled,.wpacu-btns .btn-outline-secondary:disabled{color:#ccc;background-color:transparent}.wpacu-btns .btn-outline-secondary.active,.wpacu-btns .btn-outline-secondary:active,.wpacu-btns .show>.btn-outline-secondary.dropdown-toggle{color:#fff;background-color:#ccc;border-color:#ccc}.wpacu-btns .btn-outline-info{color:#5bc0de;background-image:none;background-color:transparent;border-color:#5bc0de}.wpacu-btns .btn-outline-info:hover{color:#fff;background-color:#5bc0de;border-color:#5bc0de}.wpacu-btns .btn-outline-info.focus,.wpacu-btns .btn-outline-info:focus{-webkit-box-shadow:0 0 0 2px rgba(91,192,222,.5);box-shadow:0 0 0 2px rgba(91,192,222,.5)}.wpacu-btns .btn-outline-info.disabled,.wpacu-btns .btn-outline-info:disabled{color:#5bc0de;background-color:transparent}.wpacu-btns .btn-outline-info.active,.wpacu-btns .btn-outline-info:active,.wpacu-btns .show>.btn-outline-info.dropdown-toggle{color:#fff;background-color:#5bc0de;border-color:#5bc0de}.wpacu-btns .btn-outline-success{color:#5cb85c;background-image:none;background-color:transparent;border-color:#5cb85c}.wpacu-btns .btn-outline-success:hover{color:#fff;background-color:#5cb85c;border-color:#5cb85c}.wpacu-btns .btn-outline-success.focus,.wpacu-btns .btn-outline-success:focus{-webkit-box-shadow:0 0 0 2px rgba(92,184,92,.5);box-shadow:0 0 0 2px rgba(92,184,92,.5)}.wpacu-btns .btn-outline-success.disabled,.wpacu-btns .btn-outline-success:disabled{color:#5cb85c;background-color:transparent}.wpacu-btns .btn-outline-success.active,.wpacu-btns .btn-outline-success:active,.wpacu-btns .show>.btn-outline-success.dropdown-toggle{color:#fff;background-color:#5cb85c;border-color:#5cb85c}.wpacu-btns .btn-outline-warning{color:#f0ad4e;background-image:none;background-color:transparent;border-color:#f0ad4e}.wpacu-btns .btn-outline-warning:hover{color:#fff;background-color:#f0ad4e;border-color:#f0ad4e}.wpacu-btns .btn-outline-warning.focus,.wpacu-btns .btn-outline-warning:focus{-webkit-box-shadow:0 0 0 2px rgba(240,173,78,.5);box-shadow:0 0 0 2px rgba(240,173,78,.5)}.wpacu-btns .btn-outline-warning.disabled,.wpacu-btns .btn-outline-warning:disabled{color:#f0ad4e;background-color:transparent}.wpacu-btns .btn-outline-warning.active,.wpacu-btns .btn-outline-warning:active,.wpacu-btns .show>.btn-outline-warning.dropdown-toggle{color:#fff;background-color:#f0ad4e;border-color:#f0ad4e}.wpacu-btns .btn-outline-danger{color:#d9534f;background-image:none;background-color:transparent;border-color:#d9534f}.wpacu-btns .btn-outline-danger:hover{color:#fff;background-color:#d9534f;border-color:#d9534f}.wpacu-btns .btn-outline-danger.focus,.wpacu-btns .btn-outline-danger:focus{-webkit-box-shadow:0 0 0 2px rgba(217,83,79,.5);box-shadow:0 0 0 2px rgba(217,83,79,.5)}.wpacu-btns .btn-outline-danger.disabled,.wpacu-btns .btn-outline-danger:disabled{color:#d9534f;background-color:transparent}.wpacu-btns .btn-outline-danger.active,.wpacu-btns .btn-outline-danger:active,.wpacu-btns .show>.btn-outline-danger.dropdown-toggle{color:#fff;background-color:#d9534f;border-color:#d9534f}.wpacu-btns .btn-link{font-weight:400;color:#0275d8;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.wpacu-btns .btn-link,.wpacu-btns .btn-link.active,.wpacu-btns .btn-link:active,.wpacu-btns .btn-link:disabled{background-color:transparent}.wpacu-btns .btn-link,.wpacu-btns .btn-link:active,.wpacu-btns .btn-link:focus,.wpacu-btns .btn-link:hover{border-color:transparent}.wpacu-btns .btn-link:focus,.wpacu-btns .btn-link:hover{color:#014c8c;text-decoration:underline;background-color:transparent}.wpacu-btns .btn-link:disabled{color:#636c72}.wpacu-btns .btn-link:disabled:focus,.wpacu-btns .btn-link:disabled:hover{text-decoration:none}.wpacu-btns .btn-group-lg>.btn,.wpacu-btns .btn-lg{padding:.75rem 1.5rem;font-size:1.25rem;-webkit-border-radius:.3rem;-moz-border-radius:.3rem;border-radius:.3rem}.wpacu-btns .btn-group-sm>.btn,.wpacu-btns .btn-sm{padding:.25rem .5rem;font-size:.875rem;-webkit-border-radius:.2rem;-moz-border-radius:.2rem;border-radius:.2rem}.wpacu-btns .btn-block{display:block;width:100%}.go-pro-button,.go-pro-link-no-style,.wordpress-core-file{display:inline-block;text-decoration:none}.wpacu-btns .btn-block+.btn-block{margin-top:.5rem}.wpacu-btns input[type=button].btn-block,.wpacu-btns input[type=reset].btn-block,.wpacu-btns input[type=submit].btn-block{width:100%}.wpacu-btns .fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.go-pro-button{background-color:#4CAF50;border:2px solid #4CAF50;color:#fff;padding:12px 18px;text-align:center;font-size:16px;margin:4px 2px;cursor:pointer;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;-webkit-transition-duration:.4s;transition-duration:.4s}.go-pro-button:hover{background-color:#fff;color:#000;border:2px solid #4CAF50;text-decoration:none}.wpacu-restore-pos-btn{font-size:14px!important;line-height:normal!important;height:42px!important;padding:0 18px!important;margin-top:10px!important}body.wp-admin .wpacu_asset_row .go-pro-link-no-style .wpacu-tooltip{padding:8px 2px}body.wp-admin .go-pro-link-no-style .wpacu-tooltip{text-shadow:none;font-weight:400;font-size:12px;line-height:16px;padding:8px 11px}.go-pro-link-no-style{position:relative;color:inherit}.go-pro-link-no-style:not(.nav-tab){font-style:italic}.go-pro-link-no-style.no-transition .wpacu-tooltip{-webkit-transition:0s all ease;transition:0s all ease;-webkit-transition-delay:0s;transition-delay:0s}.go-pro-link-no-style>img{max-width:20px;max-height:20px}.go-pro-link-no-style .wpacu-tooltip{font-size:14px;line-height:18px;position:absolute;z-index:1;visibility:hidden;width:160px;background-color:#00a7a7;color:#fff;text-align:center;padding:8px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;bottom:100%;bottom:calc(100% + 15px);left:50%;margin-left:-65px;-webkit-transition:.1s all ease;transition:.1s all ease;-webkit-transition-delay:0s;transition-delay:0s}.go-pro-link-no-style .wpacu-tooltip:after{content:"";position:absolute;border-width:10px;border-style:solid;top:100%;left:50%;left:calc(50% - 10px);border-color:#00a7a7 transparent transparent}.go-pro-link-no-style .wpacu-tooltip.wpacu-on-pages-btn{cursor:pointer;margin-left:-77px;width:130px}.go-pro-link-no-style .wpacu-tooltip.wpacu-larger{width:240px}.go-pro-link-no-style:hover .wpacu-tooltip{visibility:visible}.wpacu_list_table tr:first-child .wordpress-core-file .wpacu-tooltip{bottom:-40px;left:120px;margin-left:-86px}.wpacu_list_table tr:first-child .wordpress-core-file .wpacu-tooltip:after{top:41px;left:-20px;border-color:transparent #c00 transparent transparent}.wordpress-core-file{position:relative;font-style:normal;color:inherit}.wordpress-core-file .wpacu-tooltip{font-size:14px;line-height:18px;position:absolute;z-index:1;visibility:hidden;width:160px;background-color:#c00;color:#fff;text-align:center;padding:6px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;bottom:100%;bottom:calc(100% + 15px);left:50%;margin-left:-86px;-webkit-transition:.1s all ease;transition:.1s all ease;-webkit-transition-delay:0s;transition-delay:0s}.wordpress-core-file .wpacu-tooltip:after{content:"";position:absolute;border-width:10px;border-style:solid;top:100%;left:50%;left:calc(50% - 10px);border-color:#c00 transparent transparent}.wordpress-core-file:hover .wpacu-tooltip{visibility:visible}.ajax-direct-call-error-area{background:#fff;padding:10px;border:1px solid #c00;-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px}.ajax-direct-call-error-area td{padding:6px}.ajax-direct-call-error-area .note{margin-top:0;padding-top:0}.ajax-direct-call-error-area .error-code{color:#c00;font-weight:700}.ajax-wp-remote-post-call-error-area{background:#fff;padding:20px}.ajax-wp-remote-post-call-error-area .table-data{background:0 0;border:1px solid #c66;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px}.ajax-wp-remote-post-call-error-area .table-data td{padding:10px}.wrap-upgrade-info{background:#fff;padding:0 15px;border:1px solid #cdcdcd;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px}.wpacu-notice{margin:20px 20px 0 0!important}.wpacu-notice p{font-weight:600!important;font-style:italic}.wpacu-notice .dashicons{font-weight:inherit!important;color:#46b450!important;margin-right:4px;vertical-align:text-bottom;font-size:27px}.wpacu-notice-info{padding:12px 12px 12px 16px;background:#fff;border-left:4px solid #008f9c}.wpacu-notice-info p{margin-top:8px}.wpacu-notice-info p:first-child{margin-top:0}.wpacu-notice-info p:last-child{margin-bottom:0}.wpacu-warning{font-size:15px;padding:10px;background:#fffcec;border:1px solid #fdd5c9;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;margin:0 0 5px;width:100%}.pro-page-unlock-notice{-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;padding:10px;background:#f2faf2;border:1px solid #c0e8c0;width:auto;display:block}.wpacu-license-area .notice,.wpacu-settings-area .notice{margin-left:0;padding:10px!important;width:97%;box-sizing:border-box;font-weight:600;font-style:italic}#wpacu-dom-get-type-selections,.wpacu-radio-selections{float:none;clear:both;width:auto;display:inline-block;margin-bottom:0;margin-top:0}#wpacu-dom-get-type-selections.wpacu-vertical,.wpacu-radio-selections.wpacu-vertical{display:block;margin-top:15px;margin-bottom:18px}#wpacu-dom-get-type-selections.wpacu-vertical li,.wpacu-radio-selections.wpacu-vertical li{float:none;margin-bottom:12px}#wpacu-dom-get-type-selections.wpacu-vertical li:last-child,.wpacu-radio-selections.wpacu-vertical li:last-child{margin-bottom:0}#wpacu-dom-get-type-selections li,.wpacu-radio-selections li{margin-right:30px;float:left;margin-bottom:0}#wpacu-dom-get-type-selections li:first-child,.wpacu-radio-selections li:first-child{margin-right:15px}#wpacu-dom-get-type-selections li:last-child,.wpacu-radio-selections li:last-child{margin-right:0}.wpacu_combine_loaded_js_level_area{display:none;background:0 0;border-left:2px solid #008f9c;padding-top:8px;padding-bottom:8px;padding-right:10px;padding-left:10px;margin:20px 0 15px}.wpacu_combine_loaded_js_level_area.wpacu_active{display:block}#wpacu-dom-get-type-infos{margin-bottom:0}#wpacu-dom-get-type-infos li{margin-bottom:0;line-height:20px}.wpacu-wrap li,.wpacu-wrap p,.wpacu-wrap td{font-weight:400}.wpacu-wrap small{width:auto;float:none;display:inline}.wpacu-wrap small code{font-size:inherit!important}.wpacu-wrap.wpacu-settings-show-all .wpacu-settings-tab-content{display:block;width:100%}.wpacu-wrap.wpacu-settings-show-all .wpacu-settings-area-title{color:#004567;padding:16px 15px;background:#f8f8f8;border-left:5px solid #004567b0;border-top:1px solid #e7e7e7;border-right:1px solid #e7e7e7;border-bottom:1px solid #e7e7e7;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;font-size:1.45em;font-weight:500}.wpacu-wrap.wpacu-settings-show-all #wpacu-update-button-area,.wpacu-wrap.wpacu-settings-show-all #wpacu-update-button-area .submit{margin:0}.wpacu-wrap.wpacu-settings-show-all #wpacu-update-button-area .button{padding:11px 28px;height:38px;font-size:18px}.wpacu-wrap.wpacu-settings-show-all #wpacu-updating-settings{margin-left:224px;top:35px;left:3px}.wpacu-wrap.wpacu-switch-standard .asset-cleanup-pro_page_wpassetcleanup_settings .wpacu_switch,.wpacu-wrap.wpacu-switch-standard .asset-cleanup_page_wpassetcleanup_settings .wpacu_switch{width:auto;height:auto}.wpacu-wrap.wpacu-switch-standard .asset-cleanup-pro_page_wpassetcleanup_settings .wpacu_switch input,.wpacu-wrap.wpacu-switch-standard .asset-cleanup_page_wpassetcleanup_settings .wpacu_switch input{display:block}.wpacu-wrap.wpacu-switch-standard .asset-cleanup-pro_page_wpassetcleanup_settings .wpacu_switch input[type=checkbox],.wpacu-wrap.wpacu-switch-standard .asset-cleanup_page_wpassetcleanup_settings .wpacu_switch input[type=checkbox]{margin:0 0 3px}.wpacu-wrap.wpacu-switch-standard .asset-cleanup-pro_page_wpassetcleanup_settings .wpacu_switch .wpacu_slider,.wpacu-wrap.wpacu-switch-standard .asset-cleanup_page_wpassetcleanup_settings .wpacu_switch .wpacu_slider{display:none}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch{position:relative;display:inline-block;width:52px;height:29px}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch input{display:none}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch:not(.wpacu_switch_standard) .wpacu_slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.2s;transition:.2s}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch:not(.wpacu_switch_standard) .wpacu_slider:before{position:absolute;content:"";height:22px;width:22px;left:4px;bottom:4px;background-color:#fff;-webkit-transition:.2s;transition:.2s}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch input:checked+.wpacu_slider{background-color:#52af00}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch input:focus+.wpacu_slider{box-shadow:0 0 1px #52af00}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch input:checked+.wpacu_slider:before{-webkit-transform:translateX(22px);-ms-transform:translateX(22px);transform:translateX(22px)}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch .wpacu_slider.wpacu_round{border-radius:29px}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch .wpacu_slider.wpacu_round:before{border-radius:50%}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch.wpacu_disabled,.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch.wpacu_locked_for_pro{opacity:.3}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch.wpacu_disabled:before{content:"";font-family:Dashicons,Arial,"Times New Roman","Bitstream Charter",Times,serif;position:absolute;font-size:23px;top:5px;right:2px;z-index:1000}.asset-cleanup-pro_page_wpassetcleanup_settings .setting_title p.wpacu_subtitle,.asset-cleanup_page_wpassetcleanup_settings .setting_title p.wpacu_subtitle{margin-top:4px;line-height:1.4}.asset-cleanup-pro_page_wpassetcleanup_settings .setting_title p.wpacu_subtitle em,.asset-cleanup_page_wpassetcleanup_settings .setting_title p.wpacu_subtitle em{font-weight:200}.asset-cleanup-pro_page_wpassetcleanup_settings .setting_title p.wpacu_read_more,.asset-cleanup_page_wpassetcleanup_settings .setting_title p.wpacu_read_more{margin-top:-10px;font-style:italic;font-size:12px}.asset-cleanup-pro_page_wpassetcleanup_settings .assets_list_inline_code_status_choices,.asset-cleanup-pro_page_wpassetcleanup_settings .assets_list_layout_areas_status_choices,.asset-cleanup-pro_page_wpassetcleanup_settings .input_style_choices,.asset-cleanup_page_wpassetcleanup_settings .assets_list_inline_code_status_choices,.asset-cleanup_page_wpassetcleanup_settings .assets_list_layout_areas_status_choices,.asset-cleanup_page_wpassetcleanup_settings .input_style_choices{list-style:none;margin:0}.asset-cleanup-pro_page_wpassetcleanup_settings .assets_list_inline_code_status_choices li,.asset-cleanup-pro_page_wpassetcleanup_settings .assets_list_layout_areas_status_choices li,.asset-cleanup-pro_page_wpassetcleanup_settings .input_style_choices li,.asset-cleanup_page_wpassetcleanup_settings .assets_list_inline_code_status_choices li,.asset-cleanup_page_wpassetcleanup_settings .assets_list_layout_areas_status_choices li,.asset-cleanup_page_wpassetcleanup_settings .input_style_choices li{float:left;margin-right:30px}.asset-cleanup-pro_page_wpassetcleanup_settings .assets_list_inline_code_status_choices li:last-child,.asset-cleanup-pro_page_wpassetcleanup_settings .assets_list_layout_areas_status_choices li:last-child,.asset-cleanup-pro_page_wpassetcleanup_settings .input_style_choices li:last-child,.asset-cleanup_page_wpassetcleanup_settings .assets_list_inline_code_status_choices li:last-child,.asset-cleanup_page_wpassetcleanup_settings .assets_list_layout_areas_status_choices li:last-child,.asset-cleanup_page_wpassetcleanup_settings .input_style_choices li:last-child{margin-right:0}#wpacu-assets-list-by-location-selected{background:0 0;border:1px solid #e7e7e7;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;padding:8px;clear:both}.notice.notice-success+.wpacu-wrap.wpacu-settings-area{margin-top:20px}.wpacu-license-action-btn-area{margin-top:0;position:relative;display:inline-block}.wpacu-license-spinner{display:none;position:absolute;right:-30px;top:4px}.wpacu-license-spinner img{width:20px;height:20px}#wpacu-activation-issues-info{border-radius:10px;width:90%;margin-top:20px;font-size:14px;padding:6px 20px;background:#fff;border:1px solid #e7e7e7}#wpacu-activation-issues-info ol li{font-size:13px;margin-bottom:10px}#wpacu-mark-license-area-wrap{margin:15px 0}.wpacu-form-table.wpacu-license th{width:120px}.wpacu-form-table th{vertical-align:top;text-align:left;padding:5px 20px 20px 0;width:200px;line-height:1.3;font-weight:600}.wpacu-form-table th label{color:#23282d;font-weight:600;font-size:14px;text-shadow:none;vertical-align:middle;cursor:pointer}.wpacu-form-table td{padding-bottom:25px}.wpacu-form-table td:last-child p:last-child{margin:0}.wpacu-form-table .wpacu-fancy-checkbox input[type=checkbox],.wpacu-form-table label input[type=checkbox]{height:20px;width:20px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.wpacu-form-table .wpacu-fancy-checkbox input[type=checkbox]:checked,.wpacu-form-table .wpacu-fancy-checkbox input[type=checkbox]:hover,.wpacu-form-table label input[type=checkbox]:checked,.wpacu-form-table label input[type=checkbox]:hover{border:1px solid green}.wpacu-form-table .wpacu-fancy-checkbox input[type=checkbox]:disabled,.wpacu-form-table label input[type=checkbox]:disabled{border:none}.wpacu-form-table .wpacu-fancy-checkbox input[type=checkbox]:disabled:checked,.wpacu-form-table label input[type=checkbox]:disabled:checked{opacity:.3}.wpacu-form-table .wpacu-fancy-checkbox input[type=checkbox]:checked:before,.wpacu-form-table label input[type=checkbox]:checked:before{color:#52af00;font:400 24px/1 dashicons}.wpacu-form-table .wpacu-fancy-radio input[type=radio]{-webkit-border-radius:50%;-moz-border-radius:50%;border-radius:50%;position:relative;height:20px;width:20px;margin:2px 0 0}.wpacu-form-table .wpacu-fancy-radio input[type=radio]:checked,.wpacu-form-table .wpacu-fancy-radio input[type=radio]:hover{border:1px solid green}.wpacu-form-table .wpacu-fancy-radio input[type=radio]:checked:before{margin:0;line-height:inherit;text-indent:inherit;content:"";position:absolute;top:4px;left:4px;width:10px;height:10px;border-radius:50%;background:#52af00;color:#52af00;font:400 24px/1 dashicons}#wpacu-settings-vertical-tab-wrap{display:table;width:100%}#wpacu-settings-vertical-tab-wrap .wpacu-tab-extra-text{margin:4px 0 0}#wpacu-settings-vertical-tab-wrap .wpacu-tab-extra-text small{font-weight:lighter}#wpacu-settings-vertical-tab-wrap .wpacu-tab-extra-text small span.wpacu-status-wrap{position:relative;padding-left:14px}#wpacu-settings-vertical-tab-wrap .wpacu-tab-extra-text small span.wpacu-status-wrap span.wpacu-circle-status{position:absolute;left:0;top:2px;height:10px;width:10px;border-radius:50%;display:inline-block;opacity:.75}#wpacu-settings-vertical-tab-wrap .wpacu-tab-extra-text small span.wpacu-status-wrap span.wpacu-circle-status.wpacu-on{background:#52af00}#wpacu-settings-vertical-tab-wrap .wpacu-tab-extra-text small span.wpacu-status-wrap span.wpacu-circle-status.wpacu-off{background:#ccc}#wpacu-settings-vertical-tab-wrap *{box-sizing:border-box}.wpacu-settings-tab{display:table-cell;width:20%;height:100%;vertical-align:top}.wpacu-settings-tab a{text-decoration:none;border-left:3px solid transparent;display:block;background-color:#f1f1f1;color:#004567;padding:17px 16px;width:100%;outline:0;text-align:left;cursor:pointer;font-size:14px;font-weight:600;border-bottom:1px solid #ccc}.wpacu-settings-tab a:first-child{border-top:1px solid transparent!important}.wpacu-settings-tab a:last-child{border-bottom:1px solid transparent!important}.wpacu-settings-tab a:hover{background-color:#fff;border-left:3px solid #004567;position:relative}.wpacu-settings-tab a.active{color:#004567;background-color:#fff;border-left:3px solid #004567;position:relative;border-bottom:1px solid #ccc}.wpacu-settings-tab a.active:after{content:"";position:absolute;height:100%;width:1px;top:0;right:-1px;background-color:#fff}.wpacu-settings-tab-content{background-color:#fff;display:none;padding:12px 18px;width:79%;border-left:none;height:100%;border-top-right-radius:10px;border-bottom-right-radius:10px}.wpacu-settings-tab-content h2{padding:0 0 15px;border-bottom:1px solid #e7e7e7}.wpacu-settings-tab-content.active{display:table-cell}#wpacu_minify_css_exceptions_area,#wpacu_minify_js_exceptions_area{margin:16px 0 0}@media only screen and (min-width:768px){body.asset-cleanup-pro_page_wpassetcleanup_assets_manager #wpacu-update-button-area,body.asset-cleanup_page_wpassetcleanup_assets_manager #wpacu-update-button-area{position:-webkit-sticky;position:sticky;bottom:0;padding:0;z-index:1000000;border-top:1px solid #cdcdcd;background:#f1f1f1}.wpacu-get-help-wrap .help-content-wrap{-webkit-box-align:start;-ms-flex-align:start;-ms-grid-row-align:flex-start;align-items:flex-start}}body[class*=version-5-3] #wpacu-update-button-area .button{height:auto;padding:4px 18px 6px;font-size:15px}body[class*=version-5-3] #wpacu-updating-settings{margin-left:178px}#wpacu-update-button-area{position:relative;margin-left:20%}#wpacu-update-button-area.no-left-margin{margin-left:0}#wpacu-update-button-area .submit{margin:0;padding:19px 0}#wpacu-update-button-area .button{padding:5px 18px;height:38px;font-size:15px}#wpacu-updating-settings{position:absolute;margin-left:183px;top:28px;display:none}#combine_loaded_js_info_area{position:relative}#combine_loaded_js_info_area.locked-for-pro:before{position:absolute;content:"";height:100%;width:100%;background:#fff;opacity:.5;z-index:10000}.google_fonts_load_types{clear:both;margin:20px 0 15px;display:flex}.google_fonts_load_types>div{text-align:left}.google_fonts_load_types>div input{float:left;margin:0 7px 20px 0!important}.wpacu-sub-tabs-wrap{min-width:320px;margin:0 auto}.wpacu-sub-tabs-wrap input.wpacu-nav-input{display:none}.wpacu-sub-tabs-wrap label.wpacu-nav-label{display:inline-block;margin:0 0 -1px;padding:15px 25px;font-weight:600;text-align:center;color:#74777b;border-left:1px solid transparent;border-right:1px solid transparent;border-top:3px solid transparent;border-bottom:0}.wpacu-sub-tabs-wrap label.wpacu-nav-label:hover{cursor:pointer}.wpacu-sub-tabs-wrap input.wpacu-nav-input:checked+label.wpacu-nav-label{color:#004567;border-left:1px solid #ccc;border-right:1px solid #ccc;border-top:3px solid #004567;border-bottom:1px solid #fff}.wpacu-sub-tabs-wrap section{display:none;padding:20px 0 0;border-top:1px solid #ccc}#wpacu-google-fonts-optimize-tab-item:checked~#wpacu-google-fonts-optimize-tab-item-area,#wpacu-google-fonts-remove-tab-item:checked~#wpacu-google-fonts-remove-tab-item-area{display:block}.wpacu-fade-in{animation:wpacuFadeIn ease-in .2s;-webkit-animation:wpacuFadeIn ease-in .2s;-moz-animation:wpacuFadeIn ease-in .2s;-o-animation:wpacuFadeIn ease-in .2s;-ms-animation:wpacuFadeIn ease-in .2s}@keyframes wpacuFadeIn{0%{opacity:0}100%{opacity:1}}@-moz-keyframes wpacuFadeIn{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes wpacuFadeIn{0%{opacity:0}100%{opacity:1}}@-o-keyframes wpacuFadeIn{0%{opacity:0}100%{opacity:1}}@-ms-keyframes wpacuFadeIn{0%{opacity:0}100%{opacity:1}}body.wp-admin select.wpacu-screen-size-load{margin-top:10px;margin-bottom:10px;margin-right:6px}body.wp-admin div.wpacu-helper-area{display:inline-block;vertical-align:top}body.wp-admin .wpacu-handle-media-queries-load-field{display:none;vertical-align:top;margin-bottom:10px}body.wp-admin .wpacu-handle-media-queries-load-field.wpacu-is-visible{display:inline-block}body.wp-admin .wpacu-handle-media-queries-load-field>textarea{font-size:100%;padding:6px;width:320px;max-width:100%;max-height:80px;border:1px solid green}body.wp-admin .wpacu-handle-media-queries-load-field:not(.wpacu-is-visible)+div.wpacu-helper-area{margin-top:2px;vertical-align:middle}body.wp-admin .wpacu-handle-notes p{margin-top:0!important}body.wp-admin .wpacu-handle-notes p a{font-size:inherit}body.wp-admin .wpacu-handle-notes p a span.dashicons{font-size:19px;width:19px;height:19px;vertical-align:bottom;text-decoration:none}body:not(.wp-admin) select.wpacu-screen-size-load{margin-top:10px;margin-bottom:10px;margin-right:8px;width:auto}body:not(.wp-admin) div.wpacu-helper-area{display:inline-block;vertical-align:top}body:not(.wp-admin) .wpacu-handle-media-queries-load-field{display:none;vertical-align:top;margin-top:10px;margin-bottom:10px}body:not(.wp-admin) .wpacu-handle-media-queries-load-field.wpacu-is-visible{display:inline-block}body:not(.wp-admin) .wpacu-handle-media-queries-load-field>textarea{font-size:100%;padding:6px;width:320px;max-width:100%;max-height:80px;border:1px solid green}body:not(.wp-admin) .wpacu-handle-media-queries-load-field:not(.wpacu-is-visible)+div.wpacu-helper-area{margin-top:2px;vertical-align:middle}body:not(.wp-admin) .wpacu-handle-notes p{margin-top:0!important}body:not(.wp-admin) .wpacu-handle-notes p a{font-size:inherit}body:not(.wp-admin) .wpacu-handle-notes p a span.dashicons{font-size:19px;width:19px;height:19px;vertical-align:bottom;text-decoration:none}.wpacu-handle-notes{padding-top:5px;margin-bottom:-10px;border-top:1px solid #e7e7e7}.wpacu-handle-notes .wpacu-handle-notes-field{display:none}.wpacu-handle-notes .wpacu-handle-notes-field>textarea{font-size:85%;padding:6px;width:320px;max-width:100%}.wpacu-handle-notes p{margin:10px 0 0!important}.wpacu-handle-notes p a.wpacu-add-handle-note{text-decoration:none;font-size:80%;display:inline-block;color:inherit}.wpacu-handle-notes p a.wpacu-add-handle-note span.dashicons{font-size:18px;width:18px;height:18px}.wrap_bulk_unload_options{width:auto;display:block;clear:both}.wrap_bulk_unload_options .wpacu_asset_options_wrap{display:inline-block;float:left;margin:5px 10px 14px 0!important;padding:8px 10px 12px!important}.wrap_bulk_unload_options .wpacu_asset_options_wrap .wpacu_slider_text{position:relative!important;vertical-align:top;left:inherit!important;top:inherit!important}.wpacu-switch-enhanced .wpacu_asset_row .wpacu_switch{position:relative;display:inline-block;min-width:52px;width:52px;height:29px;margin-right:5px!important}.wpacu-switch-enhanced .wpacu_asset_row .wpacu_switch input{display:none}.wpacu-switch-enhanced .wpacu_asset_row .wpacu_switch .wpacu_slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.15s;transition:.15s}.wpacu-switch-enhanced .wpacu_asset_row .wpacu_switch .wpacu_slider:before{position:absolute;content:"";height:22px;width:22px;left:4px;bottom:4px;background-color:#fff;-webkit-transition:.15s;transition:.15s}.wpacu-switch-enhanced .wpacu_asset_row .wpacu_switch input:checked+.wpacu_slider{background-color:#C00}.wpacu-switch-enhanced .wpacu_asset_row .wpacu_switch input:focus+.wpacu_slider{box-shadow:0 0 1px #C00}.wpacu-switch-enhanced .wpacu_asset_row .wpacu_switch input:checked+.wpacu_slider:before{-webkit-transform:translateX(22px);-ms-transform:translateX(22px);transform:translateX(22px)}.wpacu-switch-enhanced .wpacu_asset_row .wpacu_switch .wpacu_slider.wpacu_round{border-radius:29px}.wpacu-switch-enhanced .wpacu_asset_row .wpacu_switch .wpacu_slider.wpacu_round:before{border-radius:50%}.wpacu-switch-enhanced .wpacu_asset_row .wpacu_switch.wpacu_disabled{opacity:.3}.wpacu-switch-enhanced .wpacu_asset_row .wpacu_switch.wpacu_disabled:before{content:"";font-family:Dashicons,Arial,"Times New Roman","Bitstream Charter",Times,serif;position:absolute;font-size:23px;top:1px;right:2px;z-index:1000}.wpacu-switch-enhanced .wpacu_asset_row .wpacu_slider_text{position:absolute;left:62px;top:3px}.wpacu-wrap{width:98%}.wpacu-wrap tr.wpacu_regex_rule_row{opacity:.45}.wpacu-wrap tr.wpacu_regex_rule_row textarea{line-height:normal;min-height:20px;min-width:400px;display:inline-block;padding:2px 4px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.wpacu-wrap tr.wpacu_regex_rule_row textarea:focus{width:100%}.wpacu-wrap tr.wpacu_regex_rule_row.wpacu_enabled{opacity:1}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch_small{position:relative;display:inline-block;min-width:30px;width:30px;height:17px;margin-right:5px!important}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch_small input{display:none}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch_small .wpacu_slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.15s;transition:.15s}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch_small .wpacu_slider:before{position:absolute;content:"";height:13px;width:13px;left:2px;bottom:2px;background-color:#fff;-webkit-transition:.15s;transition:.15s}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch_small input:checked+.wpacu_slider{background-color:#52af00}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch_small input:focus+.wpacu_slider{box-shadow:0 0 1px #52af00}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch_small input:checked+.wpacu_slider:before{-webkit-transform:translateX(13px);-ms-transform:translateX(13px);transform:translateX(13px)}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch_small .wpacu_slider.wpacu_round{border-radius:17px}.wpacu-wrap.wpacu-switch-enhanced .wpacu_switch_small .wpacu_slider.wpacu_round:before{border-radius:50%}.editor-post-saved-state.is-wpacu-reloading{animation:edit-post__loading-fade-animation .5s infinite}body.wp-admin tr.wpacu_asset_row>td[data-wpacu-row-status=contracted] .wpacu_handle_row_expand_contract_area a.wpacu_handle_row_expand_contract .dashicons{width:19px;height:19px;font-size:19px}body.wp-admin tr.wpacu_asset_row>td[data-wpacu-row-status=contracted] .wpacu_handle_row_expand_contract_area a.wpacu_handle_row_expand_contract:before{right:20px;top:-2px}body.wp-admin tr.wpacu_asset_row>td[data-wpacu-row-status=contracted] .wpacu_handle_row_expand_contract_area a.wpacu_handle_row_expand_contract:after{left:20px;top:-2px}body.wp-admin tr.wpacu_asset_row.wpacu-loading{position:relative}body.wp-admin tr.wpacu_asset_row.wpacu-loading .wpacu-ajax-loader{display:block!important}body.wp-admin tr.wpacu_asset_row .wpacu-ajax-loader{display:none;width:58px;height:58px;position:absolute;bottom:0;right:0;opacity:.75}.wpacu_asset_row.wpacu_not_load .wpacu_dependency_notice_area em{color:#c00}.wpacu_asset_row .wpacu-hardcoded-code-area{margin:0}.wpacu_asset_row .wpacu-hardcoded-code-area span.wpacu_inside_cond_comm{display:block;margin-bottom:8px}.wpacu_asset_row .wpacu-hardcoded-code-area .wpacu-has-view-more{max-height:300px;position:relative;overflow:hidden}.wpacu_asset_row .wpacu-hardcoded-code-area .wpacu-has-view-more p.wpacu-view-more-link-area{position:absolute;bottom:0;left:0;width:100%;margin:0;padding:20px 0 15px 15px;background:linear-gradient(to bottom,rgba(255,255,255,0) 0,#fbfbfb8c 100%);background:-webkit-linear-gradient(top,rgba(255,255,255,0) 0,#fbfbfb8c 100%)}.wpacu_asset_row .wpacu-hardcoded-code-area pre{margin:0;padding:0 0 8px;white-space:pre-wrap;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.wpacu_asset_row .wpacu-hardcoded-code-area code{color:inherit;font-style:italic;margin-left:2px;word-break:break-word}.wpacu_asset_row[data-is-hardcoded-asset=true] .wpacu-source-row{margin-top:0}.wpacu_asset_row[data-is-hardcoded-asset=true] .wpacu_handle_row_expand_contract_area{right:18px;top:18px;background:inherit;z-index:100}.wpacu_asset_row>td{overflow-wrap:break-word;word-wrap:break-word;-ms-word-break:break-all;word-break:break-all}.wpacu_asset_row>td[data-wpacu-row-status=expanded] .wpacu_file_size_area{margin:10px 0}.wpacu_asset_row>td[data-wpacu-row-status=expanded] .wpacu_hardcoded_part_if_contracted{display:none}.wpacu_asset_row>td[data-wpacu-row-status=contracted] .wpacu_hardcoded_part_if_contracted,.wpacu_asset_row>td[data-wpacu-row-status=expanded] .wpacu_hardcoded_part_if_expanded{display:block}.wpacu_asset_row>td[data-wpacu-row-status=contracted] .wpacu_file_size_area{margin:0}.wpacu_asset_row>td[data-wpacu-row-status=contracted] .wpacu_hardcoded_part_if_contracted code{width:100%}.wpacu_asset_row>td[data-wpacu-row-status=contracted] .wpacu_hardcoded_part_if_expanded{display:none}.wpacu_asset_row>td div.wpacu_dependency_notice_area{line-height:22px;margin:10px 0;text-align:left!important;font-weight:400!important}.wpacu_asset_row>td div.wpacu-source-row{margin-top:12px}.wpacu_asset_row>td .wpacu_hide_if_handle_row_contracted{display:inline-block}.wpacu_asset_row>td[data-wpacu-row-status=contracted]>div{float:left;margin-top:0;margin-right:20px;margin-bottom:10px}.wpacu_asset_row>td[data-wpacu-row-status=contracted] .wpacu_hide_if_handle_row_contracted{display:none}.wpacu_asset_row>td[data-wpacu-row-status=contracted] .wpacu_handle_row_expand_contract_area a.wpacu_handle_row_expand_contract{transition:none}.wpacu_asset_row>td[data-wpacu-row-status=contracted] .wpacu_handle_row_expand_contract_area a.wpacu_handle_row_expand_contract:focus,.wpacu_asset_row>td[data-wpacu-row-status=contracted] .wpacu_handle_row_expand_contract_area a.wpacu_handle_row_expand_contract:focus-visible,.wpacu_asset_row>td[data-wpacu-row-status=contracted] .wpacu_handle_row_expand_contract_area a.wpacu_handle_row_expand_contract:visited{text-decoration:none;border:none}.wpacu_asset_row>td[data-wpacu-row-status=contracted] .wpacu_handle_row_expand_contract_area a.wpacu_handle_row_expand_contract:after,.wpacu_asset_row>td[data-wpacu-row-status=contracted] .wpacu_handle_row_expand_contract_area a.wpacu_handle_row_expand_contract:before{opacity:0;-webkit-transition:-webkit-transform .3s,opacity .2s;-moz-transition:-moz-transform .3s,opacity .2s;transition:transform .3s,opacity .2s}.wpacu_asset_row>td[data-wpacu-row-status=contracted] .wpacu_handle_row_expand_contract_area a.wpacu_handle_row_expand_contract:before{position:absolute;right:20px;top:-4px;content:"[";-webkit-transform:translateX(20px);-moz-transform:translateX(20px);transform:translateX(20px)}.wpacu_asset_row>td[data-wpacu-row-status=contracted] .wpacu_handle_row_expand_contract_area a.wpacu_handle_row_expand_contract:after{position:absolute;left:20px;top:-4px;content:"]";-webkit-transform:translateX(-20px);-moz-transform:translateX(-20px);transform:translateX(-20px)}.wpacu_asset_row>td[data-wpacu-row-status=contracted].wpacu_hovered .wpacu_handle_row_expand_contract_area a.wpacu_handle_row_expand_contract,.wpacu_asset_row>td[data-wpacu-row-status=contracted]:focus .wpacu_handle_row_expand_contract_area a.wpacu_handle_row_expand_contract,.wpacu_asset_row>td[data-wpacu-row-status=contracted]:hover .wpacu_handle_row_expand_contract_area a.wpacu_handle_row_expand_contract{transition:none}.wpacu_asset_row>td[data-wpacu-row-status=contracted].wpacu_hovered .wpacu_handle_row_expand_contract_area a.wpacu_handle_row_expand_contract:hover,.wpacu_asset_row>td[data-wpacu-row-status=contracted]:focus .wpacu_handle_row_expand_contract_area a.wpacu_handle_row_expand_contract:hover,.wpacu_asset_row>td[data-wpacu-row-status=contracted]:hover .wpacu_handle_row_expand_contract_area a.wpacu_handle_row_expand_contract:hover{color:green}.wpacu_asset_row .wpacu_handle_row_expand_contract_area a.wpacu_handle_row_expand_contract,a.wpacu-assets-collapsible{color:#000;text-decoration:none}.wpacu_asset_row>td[data-wpacu-row-status=contracted].wpacu_hovered .wpacu_handle_row_expand_contract_area a.wpacu_handle_row_expand_contract:after,.wpacu_asset_row>td[data-wpacu-row-status=contracted].wpacu_hovered .wpacu_handle_row_expand_contract_area a.wpacu_handle_row_expand_contract:before,.wpacu_asset_row>td[data-wpacu-row-status=contracted]:focus .wpacu_handle_row_expand_contract_area a.wpacu_handle_row_expand_contract:after,.wpacu_asset_row>td[data-wpacu-row-status=contracted]:focus .wpacu_handle_row_expand_contract_area a.wpacu_handle_row_expand_contract:before,.wpacu_asset_row>td[data-wpacu-row-status=contracted]:hover .wpacu_handle_row_expand_contract_area a.wpacu_handle_row_expand_contract:after,.wpacu_asset_row>td[data-wpacu-row-status=contracted]:hover .wpacu_handle_row_expand_contract_area a.wpacu_handle_row_expand_contract:before{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);transform:translateX(0)}.wpacu_asset_row .wpacu_handle_row_expand_contract_area{position:absolute;right:20px;top:20px;float:none!important;margin:0!important}.wpacu_asset_row .wpacu_handle_row_expand_contract_area a.wpacu_handle_row_expand_contract:hover{text-decoration:none}.wpacu_asset_row input{width:auto;height:auto;min-height:16px}.wpacu_asset_row .tip{background:inherit;border-left:4px solid #e7e7e7;margin:10px 0;padding:7px;font-style:italic;font-size:small;line-height:1.4}.wpacu_asset_row td{width:100%;text-align:left}.wpacu_asset_row td p:last-child{margin-bottom:0!important}.wpacu_asset_row td .wpacu_asset_options_wrap{padding:8px 10px;margin:15px 0;background:#fff;border:1px solid #eee;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.wpacu_asset_row td .wpacu_asset_options_wrap p:first-child{margin-top:0;margin-bottom:8px!important}.wpacu_asset_row div.wpacu_handle{margin:0 0 -8px}.wpacu_asset_row p.wpacu_handle{margin-top:0}.wpacu_asset_row li.wpacu_unload_this_page{display:block!important;position:relative}.wpacu-clearfix:after,.wpacu-clearfix:before{display:table;content:""}.wpacu-contract-expand-area{width:100%;margin:20px 0 0}.wpacu-contract-expand-area .col-left{float:left}.wpacu-contract-expand-area .col-left h4{margin-bottom:0}.wpacu-contract-expand-area .col-right{float:right}.wpacu-clearfix{clear:both;height:0}.wpacu-clearfix:after{clear:both}.wpacu-wp-button{color:#555;border-color:#ccc;background:#f7f7f7;box-shadow:0 1px 0 #ccc;vertical-align:top}body.wp-admin .wpacu-wp-button{font-size:13px;line-height:26px;height:28px}.wpacu-wp-button.wpacu-wp-button-secondary{display:inline-block;text-decoration:none;height:auto;margin:0 5px 0 0;padding:0 10px 1px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;border-radius:3px;white-space:nowrap;box-sizing:border-box}.wpacu-wp-button:hover{background:#fafafa;border-color:#999;color:#23282d}.distinguish-asset-list{list-style:none;margin-left:0;margin-bottom:5px;display:inline-block}.distinguish-asset-list li{float:left;margin-right:20px}.distinguish-asset-list li:last-child{margin-right:0}body[class*=asset-cleanup-pro] a.wpacu-plugin-contracted-wrap-link{padding:16px 6px 16px 41px!important}body[class*=asset-cleanup-pro] .wpacu-area-open .wpacu-plugin-toggle-all{font-size:12px!important;width:calc(100% - 26px)!important}body.wp-admin .wpacu-area-expanded .wpacu-plugin-toggle-all{top:5px}body.wp-admin .wpacu-area-expanded .wpacu-plugin-toggle-all ul li{font-size:12px!important}.wpacu-assets-collapsible-wrap{border:1px solid #cdcdcd}.wpacu-assets-collapsible-wrap.wpacu-by-location{margin-bottom:15px}.wpacu-assets-collapsible-wrap.wpacu-wrap-all{margin-top:20px}.wpacu-assets-collapsible-wrap.wpacu-wrap-area{margin-top:10px}.wpacu-assets-collapsible-wrap.wpacu-by-location>a.wpacu-assets-collapsible{padding:15px 15px 15px 43px}.wpacu-assets-collapsible-wrap.wpacu-by-location .wpacu_list_table{border-width:0;margin:0;border-spacing:inherit;width:100%;box-shadow:3px 3px 2px #ddd;border-bottom-right-radius:5px;border-top-right-radius:5px}.wpacu-assets-collapsible-wrap.wpacu-by-location span.wpacu-child-location-name{font-weight:600}.wpacu-assets-collapsible-wrap.wpacu-by-location span.wpacu-child-location-version{font-weight:200}.wpacu-assets-collapsible-wrap.wpacu-by-location .wpacu-location-child-area[data-wpacu-plugin=oxygen] .icon-area{border-radius:50%}.wpacu-assets-collapsible-wrap.wpacu-by-location .wpacu-location-child-area .wpacu-plugin-toggle-all-wrap .wpacu-plugin-toggle-all{display:inline-block;padding:0;font-size:13px;width:100%;width:calc(100% + 46px);min-width:250px;position:absolute;left:100%;left:calc(100% + 6px);margin:0;top:4px}.wpacu-assets-collapsible-wrap.wpacu-by-location .wpacu-location-child-area .wpacu-plugin-toggle-all-wrap .wpacu-plugin-toggle-all ul{display:inline-block;margin:0;list-style:none;padding-left:13px;padding-top:0}.wpacu-assets-collapsible-wrap.wpacu-by-location .wpacu-location-child-area .wpacu-plugin-toggle-all-wrap .wpacu-plugin-toggle-all ul li{padding:0;margin:0;line-height:normal;font-size:14px}.wpacu-assets-collapsible-wrap.wpacu-by-location .wpacu-location-child-area .wpacu-plugin-toggle-all-wrap .wpacu-plugin-toggle-all ul li:first-child{font-style:italic;margin-bottom:5px}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-themes .wpacu-assets-collapsible-content>table:last-child{margin-bottom:20px}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-themes .wpacu-assets-collapsible-content .wpacu-location-child-area .wpacu-area-title{display:inline;position:relative;z-index:1}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-themes .wpacu-assets-collapsible-content .wpacu-location-child-area .wpacu-area-title:after{content:"";position:absolute;width:100%;left:0;bottom:0;height:1px;background-color:#fdfdfd}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content .wpacu-plugin-assets-wrap{padding:0 0 10px}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content .wpacu-plugin-assets-wrap.wpacu-area-open.wpacu-plugin-assets-last{margin-bottom:18px}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content .wpacu-plugin-assets-wrap.wpacu-area-open .wpacu-plugin-toggle-all-wrap .wpacu-plugin-toggle-all{display:inline-block;padding:7px 12px 8px;font-size:14px;width:100%;text-align:left;border-left:1px solid #cdcdcd;border-right:1px solid #cdcdcd}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content .wpacu-plugin-assets-wrap.wpacu-area-open .wpacu-plugin-toggle-all-wrap .wpacu-plugin-toggle-all+.wpacu-plugin-toggle-all{padding:2px 12px 10px}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link{color:inherit;text-decoration:none;font-weight:inherit;font-style:inherit;font-size:105%;line-height:initial;height:auto;margin:14px 0 0;padding:13px 6px 14px 39px;position:relative;display:block}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link:after{position:absolute;font-size:18px;font-family:Dashicons;right:12px;top:14px;content:""}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link.wpacu-link-open:after{content:""}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link.wpacu-link-closed{border:1px solid #cdcdcd}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link:hover{border:1px solid #878787;background:#f9f9f9}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link:hover.wpacu-link-closed{box-shadow:3px 3px 2px #ddd}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link.wpacu-link-open{border-top:1px solid #cdcdcd;border-left:1px solid #cdcdcd;border-right:1px solid #cdcdcd;border-bottom:none}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link.wpacu-link-closed.wpacu-last-wrap-link{margin-bottom:20px}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link .icon-plugin-default{top:10px;left:10px;width:30px;height:30px}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link .icon-plugin-default .icon-area{width:30px;height:30px}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link .icon-plugin-default .icon-area:before{font-size:22px;line-height:22px;top:4px;left:5px}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link .wpacu-area-title{position:relative;padding:17px 10px 16px 46px;z-index:1}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link .wpacu-area-title:after{content:"";position:absolute;width:100%;left:0;bottom:0;height:1px;background-color:#fdfdfd}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content a.wpacu-plugin-contracted-wrap-link.wpacu-area-last{margin-bottom:18px}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content .wpacu-area-open{padding:0;max-height:100%}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content .wpacu-area-closed{padding:0;overflow:hidden;max-height:0}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-plugins .wpacu-assets-collapsible-content>table:last-child{margin-bottom:20px}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-themes .wpacu-assets-collapsible-content .wpacu-location-child-area .wpacu-area-title{margin-top:0;margin-bottom:-1px;padding:14px 10px 16px 12px!important}.wpacu-assets-collapsible-wrap.wpacu-by-location.wpacu-themes .wpacu-assets-collapsible-content .wpacu-location-child-area .wpacu-area-title.wpacu-theme-has-icon{padding:18px 10px 16px 58px!important}.wpacu-assets-collapsible-wrap.wpacu-by-location .wpacu-assets-collapsible-content .wpacu-location-child-area{margin-top:22px;margin-bottom:-1px;font-size:110%;line-height:initial}.wpacu-assets-collapsible-wrap.wpacu-by-location .wpacu-assets-collapsible-content .wpacu-location-child-area.wpacu-location-child-area-first{margin-top:2px}.wpacu-assets-collapsible-wrap.wpacu-by-location .wpacu-assets-collapsible-content .wpacu-location-child-area.wpacu-area-expanded .wpacu-area-title{display:inline-block;z-index:1;padding:17px 10px 16px 46px}.wpacu-assets-collapsible-wrap.wpacu-by-location .wpacu-assets-collapsible-content .wpacu-location-child-area .wpacu-area-title{display:inline;border-top-right-radius:8px;border-top-left-radius:8px;background-color:#f9f9f9;border-left:1px solid #cdcdcd;border-top:1px solid #cdcdcd;border-bottom:1px solid transparent;border-right:1px solid #cdcdcd;position:relative}.wpacu-assets-collapsible-wrap.wpacu-by-location .icon-plugin-default{position:absolute;padding:0;top:10px;left:10px;width:37px;height:37px}.wpacu-assets-collapsible-wrap.wpacu-by-location .icon-plugin-default:not(.has-icon){color:#b4b9be;background-color:#eee;box-shadow:inset 0 0 10px rgba(160,165,170,.15);-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.wpacu-assets-collapsible-wrap.wpacu-by-location .icon-plugin-default:not(.has-icon) .icon-area:before{content:"";font-family:Dashicons;position:absolute;font-size:28px;line-height:28px;top:5px;left:5px}.wpacu-assets-collapsible-wrap.wpacu-by-location .icon-plugin-default .icon-area{position:relative;width:37px;height:37px}.wpacu-assets-collapsible-wrap.wpacu-by-location .icon-theme{position:absolute;padding:0;top:10px;left:10px;width:37px;height:37px}.wpacu-assets-collapsible-wrap.wpacu-by-location .icon-theme .icon-area{position:relative;width:37px;height:37px}.wpacu-assets-collapsible-wrap.wpacu-wp_core{border:1px solid #c00}.wpacu-assets-collapsible-wrap.wpacu-external .wpacu-assets-collapsible-content,.wpacu-assets-collapsible-wrap.wpacu-wp_core .wpacu-assets-collapsible-content{padding:0}.wpacu-assets-collapsible-wrap.wpacu-external .wpacu-assets-collapsible-content .wpacu_list_table,.wpacu-assets-collapsible-wrap.wpacu-wp_core .wpacu-assets-collapsible-content .wpacu_list_table{width:100%;margin:0}.wpacu-assets-collapsible-wrap.wpacu-external .wpacu-assets-collapsible-content .wpacu_list_table .wpacu_asset_row td,.wpacu-assets-collapsible-wrap.wpacu-wp_core .wpacu-assets-collapsible-content .wpacu_list_table .wpacu_asset_row td{border-left:hidden;border-right:hidden;border-bottom:1px solid #cdcdcd}.wpacu-assets-collapsible-wrap.wpacu-external .wpacu-assets-collapsible-content .wpacu_list_table .wpacu_asset_row:last-child,.wpacu-assets-collapsible-wrap.wpacu-wp_core .wpacu-assets-collapsible-content .wpacu_list_table .wpacu_asset_row:last-child{margin-bottom:0!important}.wpacu-assets-collapsible-wrap.wpacu-external .wpacu-assets-collapsible-content .wpacu_list_table .wpacu_asset_row:last-child td:last-child,.wpacu-assets-collapsible-wrap.wpacu-wp_core .wpacu-assets-collapsible-content .wpacu_list_table .wpacu_asset_row:last-child td:last-child{border-bottom:hidden}a.wpacu-assets-collapsible{font-size:20px;display:block;position:relative;background-color:#f1f3f8;cursor:pointer;padding:15px 15px 15px 36px;width:auto;border:none;text-align:left;outline:0}a.wpacu-assets-collapsible>span.dashicons{font-size:25px;line-height:normal;position:absolute;top:15px;top:calc(50% - 21px);left:22px;-webkit-transform:translate(-50%,50%);transform:translate(-50%,50%)}a.wpacu-assets-collapsible:hover{background-color:#f1f3f8;text-decoration:none}a.wpacu-assets-collapsible:after{position:absolute;font-size:22px;font-family:Dashicons;right:14px;top:16px}a.wpacu-assets-collapsible:not(.wpacu-assets-collapsible-active):after{content:""}a.wpacu-assets-collapsible.wpacu-assets-collapsible-active{background-color:#f1f3f8}a.wpacu-assets-collapsible.wpacu-assets-collapsible-active:after{content:""}.wpacu-assets-collapsible-content{padding:0 16px;max-height:0;overflow:hidden;background-color:#fbfbfb8c}.wpacu-assets-collapsible-content .wpacu-assets-note{margin:0;padding:15px 15px 10px}.wpacu-assets-collapsible-content>div:not(.wpacu-assets-table-list-wrap){padding:16px 0 0}.wpacu-assets-collapsible-content>div>p:first-child{margin-top:0}.wpacu-assets-collapsible-content.wpacu-open{max-height:100%}a.wpacu-assets-inline-code-collapsible{color:inherit;font-size:14px;text-decoration:none;display:inline-block;position:relative;cursor:pointer;width:auto;outline:0;background:#f1f3f8;border:1px solid #cdcdcd;padding:4px 21px 4px 8px;margin:0 0 0 6px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}a.wpacu-assets-inline-code-collapsible:hover{border:1px solid #5c5c5c}a.wpacu-assets-inline-code-collapsible:after{position:absolute;font-size:15px;font-family:Dashicons;right:-3px;top:-1px;width:14px;height:14px;-webkit-transform:translate(-50%,50%);transform:translate(-50%,50%)}a.wpacu-assets-inline-code-collapsible:not(.wpacu-assets-inline-code-collapsible-active):after{content:""}a.wpacu-assets-inline-code-collapsible.wpacu-assets-inline-code-collapsible-active:after{content:""}.wpacu-assets-inline-code-collapsible-content{padding:0 8px 2px 0;max-height:0;overflow:hidden;background-color:#fbfbfb8c}.wpacu-assets-inline-code-collapsible-content>div{padding:7px 8px 0}.wpacu-assets-inline-code-collapsible-content>div>p{line-height:normal!important}.wpacu-assets-inline-code-collapsible-content>div>p:first-child{margin-top:0}.wpacu-assets-inline-code-collapsible-content.wpacu-open{max-height:100%}.wpacu_asset_row p div.select{display:inline-block}.wpacu-wrap-choose-position{display:inline}.wpacu-wrap-choose-position>div{display:inline-block}.wpacu-wrap-choose-position select{width:auto;font-size:inherit;display:inline;margin-left:6px;margin-right:4px}.wpacu-wrap-choose-position>.select>.select{display:inline}.wpacu-wrap-choose-position>.select>.select select{padding-right:30px}.wpacu-wrap-choose-position>.select>.select:after{right:15px;top:-4px}.wpacu_handle_unload_regex_input_wrap,.wpacu_load_regex_input_wrap{display:block;width:100%}.wpacu_handle_unload_regex_input_wrap .wpacu_regex_rule_area .wpacu_regex_rule_textarea,.wpacu_load_regex_input_wrap .wpacu_regex_rule_area .wpacu_regex_rule_textarea{line-height:normal;min-height:20px;min-width:300px;max-width:400px;display:inline-block;padding:2px 4px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.wpacu_handle_unload_regex_input_wrap .wpacu_regex_rule_area .wpacu_regex_rule_textarea:focus,.wpacu_load_regex_input_wrap .wpacu_regex_rule_area .wpacu_regex_rule_textarea:focus{width:100%}body.logged-in:not(.wp-admin) .wpacu-view-more-code{box-shadow:inset 0 1px 0 0 #fff;background:linear-gradient(to bottom,#f9f9f9 5%,#e9e9e9 100%);background-color:#f9f9f9;border-radius:6px;border:1px solid #dcdcdc;display:inline-block;cursor:pointer;color:#666;font-size:inherit;font-weight:700;padding:6px 24px;text-decoration:none;text-shadow:0 1px 0 #fff}body.logged-in:not(.wp-admin) .wpacu-view-more-code:hover{background:linear-gradient(to bottom,#e9e9e9 5%,#f9f9f9 100%);background-color:#e9e9e9}body.logged-in:not(.wp-admin) .wpacu-view-more-code:active{position:relative;top:1px}.wpacu_table_wrap{margin:20px 0 0}.wpacu_table_wrap>table{border:1px solid #cdcdcd}.wpacu_table_wrap .table{width:100%;max-width:100%;margin-bottom:1rem;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px}.wpacu_table_wrap .table td,.wpacu_table_wrap .table th{padding:.75rem;vertical-align:top;border-top:1px solid #eceeef}.wpacu_table_wrap .table thead th{vertical-align:bottom;border-bottom:2px solid #eceeef}.wpacu_table_wrap .table tbody+tbody{border-top:2px solid #eceeef}.wpacu_table_wrap .table .table{background-color:#fff}.wpacu_table_wrap .table-sm td,.wpacu_table_wrap .table-sm th{padding:.3rem}.wpacu_table_wrap .table-bordered,.wpacu_table_wrap .table-bordered td,.wpacu_table_wrap .table-bordered th{border:1px solid #eceeef}.wpacu_table_wrap .table-bordered thead td,.wpacu_table_wrap .table-bordered thead th{border-bottom-width:2px}.wpacu_table_wrap .table-striped tbody tr:nth-of-type(even){background-color:#f9f9f9}.wpacu_table_wrap .table-striped tbody tr:nth-of-type(odd){background-color:#fff}.wpacu_table_wrap .table-active,.wpacu_table_wrap .table-active>td,.wpacu_table_wrap .table-active>th,.wpacu_table_wrap .table-hover .table-active:hover,.wpacu_table_wrap .table-hover .table-active:hover>td,.wpacu_table_wrap .table-hover .table-active:hover>th,.wpacu_table_wrap .table-hover tbody tr:hover{background-color:rgba(0,0,0,.075)}.wpacu_table_wrap .table-success,.wpacu_table_wrap .table-success>td,.wpacu_table_wrap .table-success>th{background-color:#dff0d8}.wpacu_table_wrap .table-hover .table-success:hover,.wpacu_table_wrap .table-hover .table-success:hover>td,.wpacu_table_wrap .table-hover .table-success:hover>th{background-color:#d0e9c6}.wpacu_table_wrap .table-info,.wpacu_table_wrap .table-info>td,.wpacu_table_wrap .table-info>th{background-color:#d9edf7}.wpacu_table_wrap .table-hover .table-info:hover,.wpacu_table_wrap .table-hover .table-info:hover>td,.wpacu_table_wrap .table-hover .table-info:hover>th{background-color:#c4e3f3}.wpacu_table_wrap .table-warning,.wpacu_table_wrap .table-warning>td,.wpacu_table_wrap .table-warning>th{background-color:#fcf8e3}.wpacu_table_wrap .table-hover .table-warning:hover,.wpacu_table_wrap .table-hover .table-warning:hover>td,.wpacu_table_wrap .table-hover .table-warning:hover>th{background-color:#faf2cc}.wpacu_table_wrap .table-danger,.wpacu_table_wrap .table-danger>td,.wpacu_table_wrap .table-danger>th{background-color:#f2dede}.wpacu_table_wrap .table-hover .table-danger:hover,.wpacu_table_wrap .table-hover .table-danger:hover>td,.wpacu_table_wrap .table-hover .table-danger:hover>th{background-color:#ebcccc}.wpacu_table_wrap .thead-inverse th{color:#fff;background-color:#292b2c}.wpacu_table_wrap .thead-default th{color:#464a4c;background-color:#eceeef}.wpacu_table_wrap .table-inverse{color:#fff;background-color:#292b2c}.wpacu_table_wrap .table-inverse td,.wpacu_table_wrap .table-inverse th,.wpacu_table_wrap .table-inverse thead th{border-color:#fff}.wpacu_table_wrap .table-inverse.table-bordered,.wpacu_table_wrap .table-responsive.table-bordered{border:0}.wpacu_table_wrap .table-responsive{display:block;width:100%;overflow-x:auto;-ms-overflow-style:-ms-autohiding-scrollbar}body.wp-admin[class*=asset-cleanup] .wpacu-overview-wrap .wpacu-overview-list-table tr:not(.wpacu-top):hover td{border-top:1px solid #ccd0d4;border-bottom:1px solid #ccd0d4}body.wp-admin[class*=asset-cleanup] .wpacu-overview-wrap .wpacu-overview-list-table tr:not(.wpacu-top):hover td:first-of-type{border-left:1px solid #ccd0d4}body.wp-admin[class*=asset-cleanup] .wpacu-overview-wrap .wpacu-overview-list-table tr:not(.wpacu-top):hover td:last-of-type{border-right:1px solid #ccd0d4}body.wp-admin[class*=asset-cleanup] .wpacu-overview-wrap .wpacu-overview-list-table tr td{font-size:14px;border-top:1px solid transparent;border-bottom:1px solid transparent}body.wp-admin[class*=asset-cleanup] .wpacu-overview-wrap .wpacu-overview-list-table tr td:first-of-type{border-left:1px solid transparent}body.wp-admin[class*=asset-cleanup] .wpacu-overview-wrap .wpacu-overview-list-table tr td:last-of-type{border-right:1px solid transparent}body.wp-admin[class*=asset-cleanup] table.wp-list-table:not(.wpacu-overview-list-table) tr:not(:first-of-type):not(.wpacu_selected):hover,body.wp-admin[class*=asset-cleanup] table.wp-list-table:not(.wpacu-overview-list-table).wpacu-list-table tr:not(.wpacu_selected):hover{-moz-box-shadow:inset 0 0 2px 1px #b3b3b3;-webkit-box-shadow:inset 0 0 2px 1px #B3B3B3;box-shadow:inset 0 0 2px 1px #B3B3B3}.wp-list-table .wpacu_remove_global_attr_row.wpacu_selected,.wp-list-table .wpacu_restore_position_row.wpacu_selected{background:#e7e7e7!important}ul.hire-reasons{margin-bottom:20px}ul.hire-reasons li{font-size:14px;line-height:22px;margin-bottom:12px}ul.hire-reasons li .dashicons{font-size:23px;line-height:23px}ul.hire-reasons li .dashicons.dashicons-yes{color:green}#wpacu-plugins-load-manager-wrap .wrap_plugin_unload_rules_options .wpacu_plugin_rules_wrap ul.wpacu_plugin_rules label.wpacu_plugin_unload_rule_input_checked,#wpacu-warning-read span.dashicons-warning,#wpacu-warning-read span.dashicons-wordpress-alt{color:#c00}ol.getting-started li{font-size:14px;line-height:22px;margin-bottom:8px}.wpacu-get-help-wrap p{font-size:14px}.wpacu-get-help-wrap .help-content-wrap{margin:20px 0 25px;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-moz-flex;display:-webkit-flex;display:flex;width:100%}@media only screen and (max-width:767px){.wpacu-get-help-wrap .help-content-wrap{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}}.wpacu-get-help-wrap .help-content-wrap .help-content{padding:15px;background:#fff;border:1px solid #E0E0E0;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;box-shadow:2px 3px 8px 0 #231f2038;flex:1 1 50%;margin-bottom:10px}.wpacu-get-help-wrap .help-content-wrap .help-content .content-title{margin:5px 0 15px;line-height:24px}.wpacu-get-help-wrap .help-content-wrap .help-content .cols-wrap{width:100%;margin:0 auto;display:table}.wpacu-get-help-wrap .help-content-wrap .help-content .wpacu-image-area{margin:5px 0 0;position:relative}.wpacu-get-help-wrap .help-content-wrap .help-content .wpacu-image-area.col-left{float:left;width:48%}.wpacu-get-help-wrap .help-content-wrap .help-content .wpacu-image-area.col-right{float:right;width:48%}.wpacu-get-help-wrap .help-content-wrap .help-content .wpacu-image-area.activate-plugin img{max-width:320px}.wpacu-get-help-wrap .help-content-wrap .help-content .wpacu-image-area img{width:99%;margin:8px 0;border:1px solid #cdcdcd;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px}.wpacu-get-help-wrap .help-content-wrap .help-content.upgrade-help{order:2}@media only screen and (min-width:768px){.wpacu-get-help-wrap .help-content-wrap .help-content{margin-right:24px}.wpacu-get-help-wrap .help-content-wrap .help-content.upgrade-help{margin-right:0}}.wpacu-get-help-wrap .help-content-wrap .help-content.tech-help{order:1}@media only screen and (max-width:767px){.wpacu-get-help-wrap .help-content-wrap .help-content.tech-help{margin-bottom:30px}}.wpacu-get-help-wrap .help-content-wrap .help-content ul{list-style:none;padding-left:0}.wpacu-get-help-wrap .help-content-wrap .help-content ul li{font-size:14px;line-height:22px;margin-bottom:15px}.wpacu-get-help-wrap .help-content-wrap .help-content p:last-child,.wpacu-get-help-wrap .help-content-wrap .help-content ul li:last-child{margin-bottom:0}select#wpacu-reset-drop-down{max-width:100%}#wpacu-license-data-remove-area{display:none;margin:14px 0 12px}#wpacu-license-data-remove-area.wpacu-visible{display:block}#wpacu-cache-assets-remove-area{display:none;margin:12px 0 25px}#wpacu-cache-assets-remove-area.wpacu-visible{display:block}#wpacu-cached-assets-removed-msg,span#wpacu-license-data-removed-msg{display:block;padding-left:26px}#wpacu-warning-read{display:none;margin:10px 0}#wpacu-warning-read.wpacu-visible{display:block}#wpacu-reset-submit-area{margin:10px 0;clear:both}#wpacu-reset-submit-btn{margin:10px 0 0}.wpacu-tools-area{margin:10px 20px 0 2px}.wpacu-tools-area .wpacu-tools-container{background:#fff;padding:15px;border:1px solid #cdcdcd;width:96%}.wpacu-tools-area .wpacu-tools-container form>div:first-child{margin:0 0 10px}.wpacu-tools-area .wpacu-tools-container form .wpacu-warning{display:none;box-sizing:border-box;margin-top:10px}.wpacu-tools-area .wpacu-tools-container form .wpacu-warning p{margin:0 0 10px;line-height:22px}.wpacu-tools-area .wpacu-tools-container form .wpacu-warning p:only-child{margin:0}.wpacu-tools-area .wpacu-tools-container form .wpacu-warning ul{font-size:13px;list-style-type:disc;padding-left:30px}.wpacu-tools-area .wpacu-tools-container form .wpacu-warning.wpacu-visible{display:block}.wpacu-tools-area .wpacu-export-import-area{padding:10px}.wpacu-tools-area .wpacu-export-import-area form>p:first-of-type{margin-top:0}.wpacu-tools-area .wpacu-export-import-area form>p:last-of-type{margin-bottom:0}.wpacu-tools-area .wpacu-export-import-area:hover{background:rgba(40,44,42,.05);box-shadow:inset 0 0 10px rgba(160,165,170,.15)}.wpacu-tools-area .wpacu-export-import-area+hr{display:block;height:1px;border:0;border-top:1px solid #cdcdcd;margin:10px 0;padding:0}#wpacu-import-form button.wpacu-importing img.wpacu-spinner{display:inline-block}#wpacu-import-form button img.wpacu-spinner{display:none;margin:0 0 0 5px;height:16px;width:16px;vertical-align:middle}.wpacu-about-wrap .wpacu-about-text img{width:auto;height:150px;position:absolute;top:20px;right:-20px}@media only screen and (max-width:767px){.wpacu-about-wrap h1{margin:20px}.wpacu-about-wrap .wpacu-about-text img{display:none}.wpacu-about-wrap .wpacu-about-text{margin:20px}}.wpacu-about-wrap .about-wrap-content .area-title{font-size:19px;line-height:19px;margin-bottom:0}.wpacu-about-wrap hr{margin:10px 0}.wpacu-lite-vs-pro-wrap ul{display:flex;top:0;z-index:10;padding-bottom:14px}.wpacu-lite-vs-pro-wrap li{list-style:none;flex:1}.wpacu-lite-vs-pro-wrap li:last-child{border-right:1px solid #DDD}.wpacu-lite-vs-pro-wrap button{width:100%;border:1px solid #DDD;border-right:0;border-top:0;padding:10px;background:#FFF;font-size:14px;font-weight:700;height:60px;color:#999}.wpacu-lite-vs-pro-wrap li.active button{background:#F5F5F5;color:#000}.wpacu-lite-vs-pro-wrap table{border-collapse:collapse;table-layout:fixed;width:100%}.wpacu-lite-vs-pro-wrap th{background:inherit}.wpacu-lite-vs-pro-wrap tr.first{background:inherit;font-size:18px}.wpacu-lite-vs-pro-wrap tr.first .bg-lite{border-top:4px solid #6d6e70;background:#fff;color:#6d6e70}.wpacu-lite-vs-pro-wrap tr.first .bg-pro{border-top:4px solid green;background:#fff;color:green}.wpacu-lite-vs-pro-wrap tr:not(.first){background:#fff}.wpacu-lite-vs-pro-wrap tr:not(:last-child):hover{background:#f8f8f8}.wpacu-lite-vs-pro-wrap td,.wpacu-lite-vs-pro-wrap th{height:53px;line-height:22px;border:1px solid #DDD;padding:10px 16px;empty-cells:show;text-align:left}@media only screen and (max-width:767px){.wpacu-lite-vs-pro-wrap td,.wpacu-lite-vs-pro-wrap th{font-size:14px}}.wpacu-lite-vs-pro-wrap td+td,.wpacu-lite-vs-pro-wrap th+th{text-align:center;display:none}.wpacu-lite-vs-pro-wrap td.default{display:table-cell}.wpacu-lite-vs-pro-wrap .txt-l{font-size:28px;font-weight:700}.wpacu-lite-vs-pro-wrap .txt-top{position:relative;top:-9px;left:-2px}.wpacu-lite-vs-pro-wrap svg{width:18px;height:18px}.wpacu-lite-vs-pro-wrap svg path{fill:green}.wpacu-lite-vs-pro-wrap .tick{color:#2CA01C}.wpacu-lite-vs-pro-wrap .tick img{fill:#2CA01C}@media only screen and (max-width:767px){.wpacu-lite-vs-pro-wrap .txt-l{font-size:20px}.wpacu-lite-vs-pro-wrap .tick{font-size:15px}}.wpacu-lite-vs-pro-wrap .na{font-size:18px;opacity:.3;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=30)"}.wpacu-lite-vs-pro-wrap .hide{border:0;background:0 0}.wpacu-lite-vs-pro-wrap td,.wpacu-lite-vs-pro-wrap th{display:table-cell!important;width:auto}.wpacu-lite-vs-pro-wrap td+td,.wpacu-lite-vs-pro-wrap th+th{width:130px}@media only screen and (max-width:767px){.wpacu-lite-vs-pro-wrap .na{font-size:15px}.wpacu-lite-vs-pro-wrap td+td,.wpacu-lite-vs-pro-wrap th+th{width:42px}}@media only screen and (min-width:768px){.wpacu-lite-vs-pro-wrap td .button{font-size:16px!important}}@media only screen and (max-width:767px){.wpacu-lite-vs-pro-wrap td .button{font-size:14px!important;padding:0 20px!important}.wpacu-lite-vs-pro-wrap td .button.button-primary{margin-top:6px;margin-bottom:14px}}@media only screen and (min-width:768px){.wpacu-lite-vs-pro-wrap{margin-bottom:40px;clear:both}}.wpacu-video-areas>div{padding:20px;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px}.wpacu-video-areas>div:nth-child(odd){background:#fff}.wpacu-video-areas>div:nth-child(even){background:inherit}@media only screen and (min-width:1200px){.wpacu-video-areas .wpacu-video-area-wrapper{margin:0 0 15px;display:flex}.wpacu-video-areas .wpacu-video-area-wrapper .wpacu-col-right{padding:0 20px 0 25px}}@media only screen and (min-width:992px) and (max-width:1199px){.wpacu-video-areas .wpacu-video-area-wrapper{margin:0 0 40px}}.wpacu-video-areas .wpacu-video-area-wrapper ol{font-size:14px}.wpacu-video-areas .wpacu-video-area-wrapper ul{font-size:14px;list-style:disc;margin-left:22px}@media only screen and (min-width:1200px){.wpacu-video-areas .wpacu-video-area-wrapper .wpacu-col-right p:first-child{margin-top:0}.wpacu-video-areas .wpacu-video-area-wrapper .wpacu-col-right p:last-child{margin-bottom:0}}@media only screen and (max-width:1199px){.wpacu-video-areas .wpacu-video-area-wrapper .wpacu-video-wrapper{position:relative;padding-bottom:56.25%;padding-top:30px;height:0;overflow:hidden}}.wpacu-video-areas .wpacu-video-area-wrapper .wpacu-video-wrapper iframe{width:560px;height:315px}@media only screen and (max-width:1199px){.wpacu-video-areas .wpacu-video-area-wrapper .wpacu-video-wrapper iframe{position:absolute;top:0;left:0;width:100%;height:100%}}#wpassetcleanup_asset_list.postbox h2{padding-left:52px!important;position:relative}#wpassetcleanup_asset_list.postbox h2:before{content:"";position:absolute;background-image:url(images/wpacu-logo-transparent-bg-v1.png);background-size:cover;top:6px;left:13px;width:33px;height:26px;opacity:.8;-webkit-filter:grayscale(100%);filter:grayscale(100%)}body.wp-admin .wpacu-modal{display:none;position:fixed;z-index:1000000;padding-top:15%;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:#000;background-color:rgba(0,0,0,.4)}body.wp-admin .wpacu-modal pre{white-space:normal}body.wp-admin .wpacu-modal-content{background-color:#fefefe;margin:auto;padding:20px;border:1px solid #888;width:80%;max-width:600px;border-radius:10px}body.wp-admin .wpacu-modal-content pre{white-space:normal}body.wp-admin .wpacu-close{color:#aaa;float:right;font-size:28px;font-weight:700}body.wp-admin .wpacu-close:focus,body.wp-admin .wpacu-close:hover{color:#000;text-decoration:none;cursor:pointer}.wpacu-bulk-changes-tabs{display:table;position:relative;overflow:hidden;margin:0;width:100%}.wpacu-bulk-changes-tabs li{border-top:1px solid rgba(40,44,42,.1);border-left:1px solid rgba(40,44,42,.1);border-bottom:1px solid rgba(40,44,42,.1);float:left;line-height:38px;padding:0;position:relative;margin-bottom:12px}.wpacu-bulk-changes-tabs li:last-child{border-right:1px solid rgba(40,44,42,.1)}.wpacu-bulk-changes-tabs a{position:relative;background:rgba(40,44,42,.05);color:#004567;font-size:14px;font-weight:500;display:block;letter-spacing:0;outline:0;padding:6px 20px;text-decoration:none;border-top:3px solid transparent}.wpacu-bulk-changes-tabs a:hover{background:#f1f1f1;border-top:3px solid transparent}.wpacu-bulk-changes-tabs .current a{background:#fff;border-top:3px solid #004567}.wpacu-bulk-changes-tabs .current a:hover{background:#fff}.wpacu-bulk-changes-tabs .current a:after,.wpacu-bulk-changes-tabs .current a:before{top:100%;left:50%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}.wpacu-bulk-changes-tabs .current a:after{border-color:rgba(136,183,213,0);border-top-color:#fff;border-width:12px;margin-left:-12px}.wpacu-bulk-changes-tabs .current a:before{border-color:rgba(194,225,245,0);border-top-color:rgba(40,44,42,.1);border-width:13px;margin-left:-13px}img.wpacu-emoji{display:inline!important;border:none!important;height:1em!important;width:1em!important;margin:0 .07em!important;vertical-align:-.1em!important;background:0 0!important;padding:0!important;box-shadow:none!important}#wpacu-plugins-load-manager-wrap table td{border-bottom:1px solid #e7e7e7}#wpacu-plugins-load-manager-wrap table td.wpacu_plugin_icon{padding:14px 10px}#wpacu-plugins-load-manager-wrap table td.wpacu_plugin_details{vertical-align:middle;padding:10px 0 10px 8px}#wpacu-plugins-load-manager-wrap table td.wpacu_plugin_details .wpacu_plugin_title{font-weight:600}#wpacu-plugins-load-manager-wrap .wrap_plugin_unload_rules_options{width:auto;display:inline-flex;-webkit-flex-wrap:wrap;flex-wrap:wrap}#wpacu-plugins-load-manager-wrap .wrap_plugin_unload_rules_options .wpacu_plugin_rules_wrap{flex-grow:1;margin:0 16px 0 0!important;padding:8px 10px 6px 0!important}#wpacu-plugins-load-manager-wrap .wrap_plugin_unload_rules_options .wpacu_plugin_rules_wrap ul.wpacu_plugin_rules{margin:0;vertical-align:middle}#wpacu-plugins-load-manager-wrap .wrap_plugin_unload_rules_options .wpacu_plugin_rules_wrap ul.wpacu_plugin_rules label{vertical-align:top}#wpacu-plugins-load-manager-wrap .wrap_plugin_unload_rules_options .wpacu_plugin_rules_wrap ul.wpacu_plugin_rules label input[type=radio].wpacu_plugin_load_it:before{background-color:green}#wpacu-plugins-load-manager-wrap .wrap_plugin_unload_rules_options .wpacu_plugin_rules_wrap ul.wpacu_plugin_rules label input[type=radio].wpacu_plugin_unload_rule_input:before{background-color:#c00}#wpacu-plugins-load-manager-wrap .wrap_plugin_load_exception_options{padding-top:5px;border-top:1px solid #e7e7e7;width:auto;display:inline-flex;-webkit-flex-wrap:wrap;flex-wrap:wrap}#wpacu-plugins-load-manager-wrap .wrap_plugin_load_exception_options .wpacu_plugin_rules_wrap{flex-grow:1;margin:0 16px 0 0!important;padding:6px 10px 6px 0!important}#wpacu-plugins-load-manager-wrap .wrap_plugin_load_exception_options .wpacu_plugin_rules_wrap ul.wpacu_plugin_rules{margin:0;vertical-align:middle}#wpacu-plugins-load-manager-wrap .wrap_plugin_load_exception_options .wpacu_plugin_rules_wrap ul.wpacu_plugin_rules label{vertical-align:top}#wpacu-plugins-load-manager-wrap .wrap_plugin_load_exception_options .wpacu_plugin_rules_wrap ul.wpacu_plugin_rules.wpacu_exception_options_area li{display:inline-block;float:left;margin:1px 25px 1px 0;line-height:20px}#wpacu-plugins-load-manager-wrap .wrap_plugin_load_exception_options .wpacu_plugin_rules_wrap ul.wpacu_plugin_rules.wpacu_exception_options_area li:last-of-type{margin:1px 0}.wpacu-list-table.plugins{width:98%;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}#wpacu-plugins-load-manager-wrap .help_link{text-decoration:none;color:inherit;vertical-align:middle}#wpacu-plugins-load-manager-wrap .help_link.unload_it_regex{vertical-align:top}#wpacu-plugins-load-manager-wrap .wpacu_plugin_details .wpacu_plugin_path{font-style:italic;color:grey}#wpacu-plugins-load-manager-wrap .wpacu_plugin_icon>img{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}#wpacu-plugins-load-manager-wrap .wpacu_plugin_icon>div{background:#efefef;border:#cdcdcd;border-radius:3px;width:40px;height:40px;vertical-align:middle;position:relative;text-align:center}#wpacu-plugins-load-manager-wrap .wpacu_plugin_icon>div>span{font-size:30px;color:#b3b3b3;top:50%;vertical-align:middle;left:50%;transform:translate(-50%,-50%);width:30px;height:30px;position:absolute}#wpacu-plugins-load-manager-wrap .wpacu_exception_options_area textarea,#wpacu-plugins-load-manager-wrap textarea:focus{width:100%}#wpacu-plugins-load-manager-wrap .wpacu_plugin_unload_regex_input_wrap{display:block}#wpacu-plugins-load-manager-wrap .wpacu_plugin_unload_regex_input_wrap textarea{margin-top:6px;min-width:400px}#wpacu-plugins-load-manager-wrap textarea{line-height:normal;min-height:20px;min-width:300px;display:inline-block;padding:2px 4px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}#wpacu-plugins-load-manager-wrap textarea.wpacu_disabled{background:#fbfafa!important;color:inherit}
|
assets/sweetalert/README.md
DELETED
@@ -1,220 +0,0 @@
|
|
1 |
-
<p align="center">
|
2 |
-
<a href="http://sweetalert.js.org">
|
3 |
-
<img alt="SweetAlert" src="https://raw.githubusercontent.com/t4t5/sweetalert/e3c2085473a0eb5a6b022e43eb22e746380bb955/assets/logotype.png" width="300">
|
4 |
-
</a>
|
5 |
-
</p>
|
6 |
-
|
7 |
-
<p align="center">
|
8 |
-
A beautiful replacement for JavaScript's "alert"
|
9 |
-
</p>
|
10 |
-
|
11 |
-
<p align="center">
|
12 |
-
<a href="https://badge.fury.io/js/sweetalert"><img src="https://badge.fury.io/js/sweetalert.svg" alt="npm version" height="18"></a>
|
13 |
-
<a href="https://travis-ci.org/t4t5/sweetalert"><img src="https://travis-ci.org/t4t5/sweetalert.svg" alt="Build status" /></a>
|
14 |
-
<a href="https://www.npmjs.com/package/sweetalert">
|
15 |
-
<img src="https://img.shields.io/npm/dm/sweetalert.svg" />
|
16 |
-
</a>
|
17 |
-
<a href="https://github.com/t4t5/sweetalert/blob/master/LICENSE">
|
18 |
-
<img src="https://img.shields.io/github/license/t4t5/sweetalert.svg" />
|
19 |
-
</a>
|
20 |
-
<a href="#backers" alt="sponsors on Open Collective"><img src="https://opencollective.com/SweetAlert/backers/badge.svg" /></a> <a href="#sponsors" alt="Sponsors on Open Collective"><img src="https://opencollective.com/SweetAlert/sponsors/badge.svg" /></a>
|
21 |
-
</p>
|
22 |
-
|
23 |
-
<p align="center">
|
24 |
-
<img alt="A success modal" src="https://raw.githubusercontent.com/t4t5/sweetalert/e3c2085473a0eb5a6b022e43eb22e746380bb955/assets/swal.gif">
|
25 |
-
</p>
|
26 |
-
|
27 |
-
|
28 |
-
## Installation
|
29 |
-
|
30 |
-
```bash
|
31 |
-
$ npm install --save sweetalert
|
32 |
-
```
|
33 |
-
|
34 |
-
## Usage
|
35 |
-
|
36 |
-
```javascript
|
37 |
-
import swal from 'sweetalert';
|
38 |
-
|
39 |
-
swal("Hello world!");
|
40 |
-
```
|
41 |
-
|
42 |
-
## Upgrading from 1.X
|
43 |
-
|
44 |
-
Many improvements and breaking changes have been introduced in the 2.0 release. Make sure you read the [upgrade guide](https://sweetalert.js.org/guides/#upgrading-from-1x) to avoid nasty suprises!
|
45 |
-
|
46 |
-
## Guides
|
47 |
-
|
48 |
-
- [Installation](https://sweetalert.js.org/guides/#installation)
|
49 |
-
- [Getting started](https://sweetalert.js.org/guides/#getting-started)
|
50 |
-
- [Advanced examples](https://sweetalert.js.org/guides/#advanced-examples)
|
51 |
-
- [Using with libraries](https://sweetalert.js.org/guides/#using-with-libraries)
|
52 |
-
- [Upgrading from 1.X](https://sweetalert.js.org/guides/#upgrading-from-1x)
|
53 |
-
|
54 |
-
## Documentation
|
55 |
-
|
56 |
-
- [Configuration](https://sweetalert.js.org/docs/#configuration)
|
57 |
-
- [Methods](https://sweetalert.js.org/docs/#methods)
|
58 |
-
- [Theming](https://sweetalert.js.org/docs/#theming)
|
59 |
-
|
60 |
-
## Examples
|
61 |
-
|
62 |
-
### An error message:
|
63 |
-
```javascript
|
64 |
-
swal("Oops!", "Something went wrong!", "error");
|
65 |
-
```
|
66 |
-
|
67 |
-
### A warning message, with a function attached to the confirm message:
|
68 |
-
- Using promises:
|
69 |
-
```javascript
|
70 |
-
swal({
|
71 |
-
title: "Are you sure?",
|
72 |
-
text: "Are you sure that you want to leave this page?",
|
73 |
-
icon: "warning",
|
74 |
-
dangerMode: true,
|
75 |
-
})
|
76 |
-
.then(willDelete => {
|
77 |
-
if (willDelete) {
|
78 |
-
swal("Deleted!", "Your imaginary file has been deleted!", "success");
|
79 |
-
}
|
80 |
-
});
|
81 |
-
```
|
82 |
-
- Using async/await:
|
83 |
-
```javascript
|
84 |
-
const willDelete = await swal({
|
85 |
-
title: "Are you sure?",
|
86 |
-
text: "Are you sure that you want to delete this file?",
|
87 |
-
icon: "warning",
|
88 |
-
dangerMode: true,
|
89 |
-
});
|
90 |
-
|
91 |
-
if (willDelete) {
|
92 |
-
swal("Deleted!", "Your imaginary file has been deleted!", "success");
|
93 |
-
}
|
94 |
-
```
|
95 |
-
|
96 |
-
### A prompt modal, where the user's input is logged:
|
97 |
-
- Using promises:
|
98 |
-
```javascript
|
99 |
-
swal("Type something:", {
|
100 |
-
content: "input",
|
101 |
-
})
|
102 |
-
.then((value) => {
|
103 |
-
swal(`You typed: ${value}`);
|
104 |
-
});
|
105 |
-
```
|
106 |
-
- Using async/await:
|
107 |
-
```javascript
|
108 |
-
const value = await swal("Type something:", {
|
109 |
-
content: "input",
|
110 |
-
});
|
111 |
-
|
112 |
-
swal(`You typed: ${value}`);
|
113 |
-
```
|
114 |
-
|
115 |
-
### In combination with Fetch:
|
116 |
-
- Using promises:
|
117 |
-
```javascript
|
118 |
-
swal({
|
119 |
-
text: "Wanna log some information about Bulbasaur?",
|
120 |
-
button: {
|
121 |
-
text: "Search!",
|
122 |
-
closeModal: false,
|
123 |
-
},
|
124 |
-
})
|
125 |
-
.then(willSearch => {
|
126 |
-
if (willSearch) {
|
127 |
-
return fetch("http://pokeapi.co/api/v2/pokemon/1");
|
128 |
-
}
|
129 |
-
})
|
130 |
-
.then(result => result.json())
|
131 |
-
.then(json => console.log(json))
|
132 |
-
.catch(err => {
|
133 |
-
swal("Oops!", "Seems like we couldn't fetch the info", "error");
|
134 |
-
});
|
135 |
-
```
|
136 |
-
- Using async/await:
|
137 |
-
```javascript
|
138 |
-
const willSearch = await swal({
|
139 |
-
text: "Wanna log some information about Bulbasaur?",
|
140 |
-
button: {
|
141 |
-
text: "Search!",
|
142 |
-
closeModal: false,
|
143 |
-
},
|
144 |
-
});
|
145 |
-
|
146 |
-
if (willSearch) {
|
147 |
-
try {
|
148 |
-
const result = await fetch("http://pokeapi.co/api/v2/pokemon/1");
|
149 |
-
const json = await result.json();
|
150 |
-
console.log(json);
|
151 |
-
} catch (err) {
|
152 |
-
swal("Oops!", "Seems like we couldn't fetch the info", "error");
|
153 |
-
}
|
154 |
-
}
|
155 |
-
```
|
156 |
-
|
157 |
-
## Using with React
|
158 |
-
|
159 |
-
SweetAlert has tools for [integrating with your favourite rendering library](https://sweetalert.js.org/guides/#using-with-libraries).
|
160 |
-
|
161 |
-
If you're using React, you can install [SweetAlert with React](https://www.npmjs.com/package/@sweetalert/with-react) in addition to the main library, and easily add React components to your alerts like this:
|
162 |
-
|
163 |
-
```javascript
|
164 |
-
import React from 'react'
|
165 |
-
import swal from '@sweetalert/with-react'
|
166 |
-
|
167 |
-
swal(
|
168 |
-
<div>
|
169 |
-
<h1>Hello world!</h1>
|
170 |
-
<p>
|
171 |
-
This is now rendered with JSX!
|
172 |
-
</p>
|
173 |
-
</div>
|
174 |
-
)
|
175 |
-
```
|
176 |
-
|
177 |
-
[Read more about integrating with React](http://localhost:3000/guides#using-react)
|
178 |
-
|
179 |
-
## Contributing
|
180 |
-
|
181 |
-
### If you're changing the core library:
|
182 |
-
1. Make changes in the `src` folder.
|
183 |
-
2. Preview changes by running `npm run docs`
|
184 |
-
3. Submit pull request
|
185 |
-
|
186 |
-
### If you're changing the documentation:
|
187 |
-
1. Make changes in the `docs-src` folder.
|
188 |
-
2. Preview changes by running `npm run docs`
|
189 |
-
3. Run `npm run builddocs` to compile the changes to the `docs` folder
|
190 |
-
4. Submit pull request
|
191 |
-
|
192 |
-
## Contributors
|
193 |
-
|
194 |
-
This project exists thanks to all the people who contribute. [[Contribute](https://github.com/t4t5/sweetalert#contributing)].
|
195 |
-
<a href="https://github.com/t4t5/sweetalert/graphs/contributors"><img src="https://opencollective.com/SweetAlert/contributors.svg?width=890&button=false" /></a>
|
196 |
-
|
197 |
-
|
198 |
-
## Backers
|
199 |
-
|
200 |
-
Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/SweetAlert#backer)]
|
201 |
-
|
202 |
-
<a href="https://opencollective.com/SweetAlert#backers" target="_blank"><img src="https://opencollective.com/SweetAlert/backers.svg?width=890"></a>
|
203 |
-
|
204 |
-
|
205 |
-
## Sponsors
|
206 |
-
|
207 |
-
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/SweetAlert#sponsor)]
|
208 |
-
|
209 |
-
<a href="https://opencollective.com/SweetAlert/sponsor/0/website" target="_blank"><img src="https://opencollective.com/SweetAlert/sponsor/0/avatar.svg"></a>
|
210 |
-
<a href="https://opencollective.com/SweetAlert/sponsor/1/website" target="_blank"><img src="https://opencollective.com/SweetAlert/sponsor/1/avatar.svg"></a>
|
211 |
-
<a href="https://opencollective.com/SweetAlert/sponsor/2/website" target="_blank"><img src="https://opencollective.com/SweetAlert/sponsor/2/avatar.svg"></a>
|
212 |
-
<a href="https://opencollective.com/SweetAlert/sponsor/3/website" target="_blank"><img src="https://opencollective.com/SweetAlert/sponsor/3/avatar.svg"></a>
|
213 |
-
<a href="https://opencollective.com/SweetAlert/sponsor/4/website" target="_blank"><img src="https://opencollective.com/SweetAlert/sponsor/4/avatar.svg"></a>
|
214 |
-
<a href="https://opencollective.com/SweetAlert/sponsor/5/website" target="_blank"><img src="https://opencollective.com/SweetAlert/sponsor/5/avatar.svg"></a>
|
215 |
-
<a href="https://opencollective.com/SweetAlert/sponsor/6/website" target="_blank"><img src="https://opencollective.com/SweetAlert/sponsor/6/avatar.svg"></a>
|
216 |
-
<a href="https://opencollective.com/SweetAlert/sponsor/7/website" target="_blank"><img src="https://opencollective.com/SweetAlert/sponsor/7/avatar.svg"></a>
|
217 |
-
<a href="https://opencollective.com/SweetAlert/sponsor/8/website" target="_blank"><img src="https://opencollective.com/SweetAlert/sponsor/8/avatar.svg"></a>
|
218 |
-
<a href="https://opencollective.com/SweetAlert/sponsor/9/website" target="_blank"><img src="https://opencollective.com/SweetAlert/sponsor/9/avatar.svg"></a>
|
219 |
-
|
220 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sweetalert/dist/sweetalert.min.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.swal=e():t.swal=e()}(this,function(){return function(t){function e(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:o})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=8)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o="swal-button";e.CLASS_NAMES={MODAL:"swal-modal",OVERLAY:"swal-overlay",SHOW_MODAL:"swal-overlay--show-modal",MODAL_TITLE:"swal-title",MODAL_TEXT:"swal-text",ICON:"swal-icon",ICON_CUSTOM:"swal-icon--custom",CONTENT:"swal-content",FOOTER:"swal-footer",BUTTON_CONTAINER:"swal-button-container",BUTTON:o,CONFIRM_BUTTON:o+"--confirm",CANCEL_BUTTON:o+"--cancel",DANGER_BUTTON:o+"--danger",BUTTON_LOADING:o+"--loading",BUTTON_LOADER:o+"__loader"},e.default=e.CLASS_NAMES},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getNode=function(t){var e="."+t;return document.querySelector(e)},e.stringToNode=function(t){var e=document.createElement("div");return e.innerHTML=t.trim(),e.firstChild},e.insertAfter=function(t,e){var n=e.nextSibling;e.parentNode.insertBefore(t,n)},e.removeNode=function(t){t.parentElement.removeChild(t)},e.throwErr=function(t){throw t=t.replace(/ +(?= )/g,""),"SweetAlert: "+(t=t.trim())},e.isPlainObject=function(t){if("[object Object]"!==Object.prototype.toString.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype},e.ordinalSuffixOf=function(t){var e=t%10,n=t%100;return 1===e&&11!==n?t+"st":2===e&&12!==n?t+"nd":3===e&&13!==n?t+"rd":t+"th"}},function(t,e,n){"use strict";function o(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}Object.defineProperty(e,"__esModule",{value:!0}),o(n(25));var r=n(26);e.overlayMarkup=r.default,o(n(27)),o(n(28)),o(n(29));var i=n(0),a=i.default.MODAL_TITLE,s=i.default.MODAL_TEXT,c=i.default.ICON,l=i.default.FOOTER;e.iconMarkup='\n <div class="'+c+'"></div>',e.titleMarkup='\n <div class="'+a+'"></div>\n',e.textMarkup='\n <div class="'+s+'"></div>',e.footerMarkup='\n <div class="'+l+'"></div>\n'},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(1);e.CONFIRM_KEY="confirm",e.CANCEL_KEY="cancel";var r={visible:!0,text:null,value:null,className:"",closeModal:!0},i=Object.assign({},r,{visible:!1,text:"Cancel",value:null}),a=Object.assign({},r,{text:"OK",value:!0});e.defaultButtonList={cancel:i,confirm:a};var s=function(t){switch(t){case e.CONFIRM_KEY:return a;case e.CANCEL_KEY:return i;default:var n=t.charAt(0).toUpperCase()+t.slice(1);return Object.assign({},r,{text:n,value:t})}},c=function(t,e){var n=s(t);return!0===e?Object.assign({},n,{visible:!0}):"string"==typeof e?Object.assign({},n,{visible:!0,text:e}):o.isPlainObject(e)?Object.assign({visible:!0},n,e):Object.assign({},n,{visible:!1})},l=function(t){for(var e={},n=0,o=Object.keys(t);n<o.length;n++){var r=o[n],a=t[r],s=c(r,a);e[r]=s}return e.cancel||(e.cancel=i),e},u=function(t){var n={};switch(t.length){case 1:n[e.CANCEL_KEY]=Object.assign({},i,{visible:!1});break;case 2:n[e.CANCEL_KEY]=c(e.CANCEL_KEY,t[0]),n[e.CONFIRM_KEY]=c(e.CONFIRM_KEY,t[1]);break;default:o.throwErr("Invalid number of 'buttons' in array ("+t.length+").\n If you want more than 2 buttons, you need to use an object!")}return n};e.getButtonListOpts=function(t){var n=e.defaultButtonList;return"string"==typeof t?n[e.CONFIRM_KEY]=c(e.CONFIRM_KEY,t):Array.isArray(t)?n=u(t):o.isPlainObject(t)?n=l(t):!0===t?n=u([!0,!0]):!1===t?n=u([!1,!1]):void 0===t&&(n=e.defaultButtonList),n}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),r=n(2),i=n(0),a=i.default.MODAL,s=i.default.OVERLAY,c=n(30),l=n(31),u=n(32),f=n(33);e.injectElIntoModal=function(t){var e=o.getNode(a),n=o.stringToNode(t);return e.appendChild(n),n};var d=function(t){t.className=a,t.textContent=""},p=function(t,e){d(t);var n=e.className;n&&t.classList.add(n)};e.initModalContent=function(t){var e=o.getNode(a);p(e,t),c.default(t.icon),l.initTitle(t.title),l.initText(t.text),f.default(t.content),u.default(t.buttons,t.dangerMode)};var m=function(){var t=o.getNode(s),e=o.stringToNode(r.modalMarkup);t.appendChild(e)};e.default=m},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(3),r={isOpen:!1,promise:null,actions:{},timer:null},i=Object.assign({},r);e.resetState=function(){i=Object.assign({},r)},e.setActionValue=function(t){if("string"==typeof t)return a(o.CONFIRM_KEY,t);for(var e in t)a(e,t[e])};var a=function(t,e){i.actions[t]||(i.actions[t]={}),Object.assign(i.actions[t],{value:e})};e.setActionOptionsFor=function(t,e){var n=(void 0===e?{}:e).closeModal,o=void 0===n||n;Object.assign(i.actions[t],{closeModal:o})},e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),r=n(3),i=n(0),a=i.default.OVERLAY,s=i.default.SHOW_MODAL,c=i.default.BUTTON,l=i.default.BUTTON_LOADING,u=n(5);e.openModal=function(){o.getNode(a).classList.add(s),u.default.isOpen=!0};var f=function(){o.getNode(a).classList.remove(s),u.default.isOpen=!1};e.onAction=function(t){void 0===t&&(t=r.CANCEL_KEY);var e=u.default.actions[t],n=e.value;if(!1===e.closeModal){var i=c+"--"+t;o.getNode(i).classList.add(l)}else f();u.default.promise.resolve(n)},e.getState=function(){var t=Object.assign({},u.default);return delete t.promise,delete t.timer,t},e.stopLoading=function(){for(var t=document.querySelectorAll("."+c),e=0;e<t.length;e++){t[e].classList.remove(l)}}},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){(function(e){t.exports=e.sweetAlert=n(9)}).call(e,n(7))},function(t,e,n){(function(e){t.exports=e.swal=n(10)}).call(e,n(7))},function(t,e,n){"undefined"!=typeof window&&n(11),n(16);var o=n(23).default;t.exports=o},function(t,e,n){var o=n(12);"string"==typeof o&&(o=[[t.i,o,""]]);var r={insertAt:"top"};r.transform=void 0;n(14)(o,r);o.locals&&(t.exports=o.locals)},function(t,e,n){e=t.exports=n(13)(void 0),e.push([t.i,'.swal-icon--error{border-color:#f27474;-webkit-animation:animateErrorIcon .5s;animation:animateErrorIcon .5s}.swal-icon--error__x-mark{position:relative;display:block;-webkit-animation:animateXMark .5s;animation:animateXMark .5s}.swal-icon--error__line{position:absolute;height:5px;width:47px;background-color:#f27474;display:block;top:37px;border-radius:2px}.swal-icon--error__line--left{-webkit-transform:rotate(45deg);transform:rotate(45deg);left:17px}.swal-icon--error__line--right{-webkit-transform:rotate(-45deg);transform:rotate(-45deg);right:16px}@-webkit-keyframes animateErrorIcon{0%{-webkit-transform:rotateX(100deg);transform:rotateX(100deg);opacity:0}to{-webkit-transform:rotateX(0deg);transform:rotateX(0deg);opacity:1}}@keyframes animateErrorIcon{0%{-webkit-transform:rotateX(100deg);transform:rotateX(100deg);opacity:0}to{-webkit-transform:rotateX(0deg);transform:rotateX(0deg);opacity:1}}@-webkit-keyframes animateXMark{0%{-webkit-transform:scale(.4);transform:scale(.4);margin-top:26px;opacity:0}50%{-webkit-transform:scale(.4);transform:scale(.4);margin-top:26px;opacity:0}80%{-webkit-transform:scale(1.15);transform:scale(1.15);margin-top:-6px}to{-webkit-transform:scale(1);transform:scale(1);margin-top:0;opacity:1}}@keyframes animateXMark{0%{-webkit-transform:scale(.4);transform:scale(.4);margin-top:26px;opacity:0}50%{-webkit-transform:scale(.4);transform:scale(.4);margin-top:26px;opacity:0}80%{-webkit-transform:scale(1.15);transform:scale(1.15);margin-top:-6px}to{-webkit-transform:scale(1);transform:scale(1);margin-top:0;opacity:1}}.swal-icon--warning{border-color:#f8bb86;-webkit-animation:pulseWarning .75s infinite alternate;animation:pulseWarning .75s infinite alternate}.swal-icon--warning__body{width:5px;height:47px;top:10px;border-radius:2px;margin-left:-2px}.swal-icon--warning__body,.swal-icon--warning__dot{position:absolute;left:50%;background-color:#f8bb86}.swal-icon--warning__dot{width:7px;height:7px;border-radius:50%;margin-left:-4px;bottom:-11px}@-webkit-keyframes pulseWarning{0%{border-color:#f8d486}to{border-color:#f8bb86}}@keyframes pulseWarning{0%{border-color:#f8d486}to{border-color:#f8bb86}}.swal-icon--success{border-color:#a5dc86}.swal-icon--success:after,.swal-icon--success:before{content:"";border-radius:50%;position:absolute;width:60px;height:120px;background:#fff;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.swal-icon--success:before{border-radius:120px 0 0 120px;top:-7px;left:-33px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-transform-origin:60px 60px;transform-origin:60px 60px}.swal-icon--success:after{border-radius:0 120px 120px 0;top:-11px;left:30px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-transform-origin:0 60px;transform-origin:0 60px;-webkit-animation:rotatePlaceholder 4.25s ease-in;animation:rotatePlaceholder 4.25s ease-in}.swal-icon--success__ring{width:80px;height:80px;border:4px solid hsla(98,55%,69%,.2);border-radius:50%;box-sizing:content-box;position:absolute;left:-4px;top:-4px;z-index:2}.swal-icon--success__hide-corners{width:5px;height:90px;background-color:#fff;padding:1px;position:absolute;left:28px;top:8px;z-index:1;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.swal-icon--success__line{height:5px;background-color:#a5dc86;display:block;border-radius:2px;position:absolute;z-index:2}.swal-icon--success__line--tip{width:25px;left:14px;top:46px;-webkit-transform:rotate(45deg);transform:rotate(45deg);-webkit-animation:animateSuccessTip .75s;animation:animateSuccessTip .75s}.swal-icon--success__line--long{width:47px;right:8px;top:38px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-animation:animateSuccessLong .75s;animation:animateSuccessLong .75s}@-webkit-keyframes rotatePlaceholder{0%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}5%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}12%{-webkit-transform:rotate(-405deg);transform:rotate(-405deg)}to{-webkit-transform:rotate(-405deg);transform:rotate(-405deg)}}@keyframes rotatePlaceholder{0%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}5%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}12%{-webkit-transform:rotate(-405deg);transform:rotate(-405deg)}to{-webkit-transform:rotate(-405deg);transform:rotate(-405deg)}}@-webkit-keyframes animateSuccessTip{0%{width:0;left:1px;top:19px}54%{width:0;left:1px;top:19px}70%{width:50px;left:-8px;top:37px}84%{width:17px;left:21px;top:48px}to{width:25px;left:14px;top:45px}}@keyframes animateSuccessTip{0%{width:0;left:1px;top:19px}54%{width:0;left:1px;top:19px}70%{width:50px;left:-8px;top:37px}84%{width:17px;left:21px;top:48px}to{width:25px;left:14px;top:45px}}@-webkit-keyframes animateSuccessLong{0%{width:0;right:46px;top:54px}65%{width:0;right:46px;top:54px}84%{width:55px;right:0;top:35px}to{width:47px;right:8px;top:38px}}@keyframes animateSuccessLong{0%{width:0;right:46px;top:54px}65%{width:0;right:46px;top:54px}84%{width:55px;right:0;top:35px}to{width:47px;right:8px;top:38px}}.swal-icon--info{border-color:#c9dae1}.swal-icon--info:before{width:5px;height:29px;bottom:17px;border-radius:2px;margin-left:-2px}.swal-icon--info:after,.swal-icon--info:before{content:"";position:absolute;left:50%;background-color:#c9dae1}.swal-icon--info:after{width:7px;height:7px;border-radius:50%;margin-left:-3px;top:19px}.swal-icon{width:80px;height:80px;border-width:4px;border-style:solid;border-radius:50%;padding:0;position:relative;box-sizing:content-box;margin:20px auto}.swal-icon:first-child{margin-top:32px}.swal-icon--custom{width:auto;height:auto;max-width:100%;border:none;border-radius:0}.swal-icon img{max-width:100%;max-height:100%}.swal-title{color:rgba(0,0,0,.65);font-weight:600;text-transform:none;position:relative;display:block;padding:13px 16px;font-size:27px;line-height:normal;text-align:center;margin-bottom:0}.swal-title:first-child{margin-top:26px}.swal-title:not(:first-child){padding-bottom:0}.swal-title:not(:last-child){margin-bottom:13px}.swal-text{font-size:16px;position:relative;float:none;line-height:normal;vertical-align:top;text-align:left;display:inline-block;margin:0;padding:0 10px;font-weight:400;color:rgba(0,0,0,.64);max-width:calc(100% - 20px);overflow-wrap:break-word;box-sizing:border-box}.swal-text:first-child{margin-top:45px}.swal-text:last-child{margin-bottom:45px}.swal-footer{text-align:right;padding-top:13px;margin-top:13px;padding:13px 16px;border-radius:inherit;border-top-left-radius:0;border-top-right-radius:0}.swal-button-container{margin:5px;display:inline-block;position:relative}.swal-button{background-color:#7cd1f9;color:#fff;border:none;box-shadow:none;border-radius:5px;font-weight:600;font-size:14px;padding:10px 24px;margin:0;cursor:pointer}.swal-button:not([disabled]):hover{background-color:#78cbf2}.swal-button:active{background-color:#70bce0}.swal-button:focus{outline:none;box-shadow:0 0 0 1px #fff,0 0 0 3px rgba(43,114,165,.29)}.swal-button[disabled]{opacity:.5;cursor:default}.swal-button::-moz-focus-inner{border:0}.swal-button--cancel{color:#555;background-color:#efefef}.swal-button--cancel:not([disabled]):hover{background-color:#e8e8e8}.swal-button--cancel:active{background-color:#d7d7d7}.swal-button--cancel:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px rgba(116,136,150,.29)}.swal-button--danger{background-color:#e64942}.swal-button--danger:not([disabled]):hover{background-color:#df4740}.swal-button--danger:active{background-color:#cf423b}.swal-button--danger:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px rgba(165,43,43,.29)}.swal-content{padding:0 20px;margin-top:20px;font-size:medium}.swal-content:last-child{margin-bottom:20px}.swal-content__input,.swal-content__textarea{-webkit-appearance:none;background-color:#fff;border:none;font-size:14px;display:block;box-sizing:border-box;width:100%;border:1px solid rgba(0,0,0,.14);padding:10px 13px;border-radius:2px;transition:border-color .2s}.swal-content__input:focus,.swal-content__textarea:focus{outline:none;border-color:#6db8ff}.swal-content__textarea{resize:vertical}.swal-button--loading{color:transparent}.swal-button--loading~.swal-button__loader{opacity:1}.swal-button__loader{position:absolute;height:auto;width:43px;z-index:2;left:50%;top:50%;-webkit-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%);text-align:center;pointer-events:none;opacity:0}.swal-button__loader div{display:inline-block;float:none;vertical-align:baseline;width:9px;height:9px;padding:0;border:none;margin:2px;opacity:.4;border-radius:7px;background-color:hsla(0,0%,100%,.9);transition:background .2s;-webkit-animation:swal-loading-anim 1s infinite;animation:swal-loading-anim 1s infinite}.swal-button__loader div:nth-child(3n+2){-webkit-animation-delay:.15s;animation-delay:.15s}.swal-button__loader div:nth-child(3n+3){-webkit-animation-delay:.3s;animation-delay:.3s}@-webkit-keyframes swal-loading-anim{0%{opacity:.4}20%{opacity:.4}50%{opacity:1}to{opacity:.4}}@keyframes swal-loading-anim{0%{opacity:.4}20%{opacity:.4}50%{opacity:1}to{opacity:.4}}.swal-overlay{position:fixed;top:0;bottom:0;left:0;right:0;text-align:center;font-size:0;overflow-y:auto;background-color:rgba(0,0,0,.4);z-index:10000;pointer-events:none;opacity:0;transition:opacity .3s}.swal-overlay:before{content:" ";display:inline-block;vertical-align:middle;height:100%}.swal-overlay--show-modal{opacity:1;pointer-events:auto}.swal-overlay--show-modal .swal-modal{opacity:1;pointer-events:auto;box-sizing:border-box;-webkit-animation:showSweetAlert .3s;animation:showSweetAlert .3s;will-change:transform}.swal-modal{width:478px;opacity:0;pointer-events:none;background-color:#fff;text-align:center;border-radius:5px;position:static;margin:20px auto;display:inline-block;vertical-align:middle;-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:50% 50%;transform-origin:50% 50%;z-index:10001;transition:opacity .2s,-webkit-transform .3s;transition:transform .3s,opacity .2s;transition:transform .3s,opacity .2s,-webkit-transform .3s}@media (max-width:500px){.swal-modal{width:calc(100% - 20px)}}@-webkit-keyframes showSweetAlert{0%{-webkit-transform:scale(1);transform:scale(1)}1%{-webkit-transform:scale(.5);transform:scale(.5)}45%{-webkit-transform:scale(1.05);transform:scale(1.05)}80%{-webkit-transform:scale(.95);transform:scale(.95)}to{-webkit-transform:scale(1);transform:scale(1)}}@keyframes showSweetAlert{0%{-webkit-transform:scale(1);transform:scale(1)}1%{-webkit-transform:scale(.5);transform:scale(.5)}45%{-webkit-transform:scale(1.05);transform:scale(1.05)}80%{-webkit-transform:scale(.95);transform:scale(.95)}to{-webkit-transform:scale(1);transform:scale(1)}}',""])},function(t,e){function n(t,e){var n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"==typeof btoa){var i=o(r);return[n].concat(r.sources.map(function(t){return"/*# sourceURL="+r.sourceRoot+t+" */"})).concat([i]).join("\n")}return[n].join("\n")}function o(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var o=n(e,t);return e[2]?"@media "+e[2]+"{"+o+"}":o}).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var o={},r=0;r<this.length;r++){var i=this[r][0];"number"==typeof i&&(o[i]=!0)}for(r=0;r<t.length;r++){var a=t[r];"number"==typeof a[0]&&o[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),e.push(a))}},e}},function(t,e,n){function o(t,e){for(var n=0;n<t.length;n++){var o=t[n],r=m[o.id];if(r){r.refs++;for(var i=0;i<r.parts.length;i++)r.parts[i](o.parts[i]);for(;i<o.parts.length;i++)r.parts.push(u(o.parts[i],e))}else{for(var a=[],i=0;i<o.parts.length;i++)a.push(u(o.parts[i],e));m[o.id]={id:o.id,refs:1,parts:a}}}}function r(t,e){for(var n=[],o={},r=0;r<t.length;r++){var i=t[r],a=e.base?i[0]+e.base:i[0],s=i[1],c=i[2],l=i[3],u={css:s,media:c,sourceMap:l};o[a]?o[a].parts.push(u):n.push(o[a]={id:a,parts:[u]})}return n}function i(t,e){var n=v(t.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var o=w[w.length-1];if("top"===t.insertAt)o?o.nextSibling?n.insertBefore(e,o.nextSibling):n.appendChild(e):n.insertBefore(e,n.firstChild),w.push(e);else{if("bottom"!==t.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");n.appendChild(e)}}function a(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var e=w.indexOf(t);e>=0&&w.splice(e,1)}function s(t){var e=document.createElement("style");return t.attrs.type="text/css",l(e,t.attrs),i(t,e),e}function c(t){var e=document.createElement("link");return t.attrs.type="text/css",t.attrs.rel="stylesheet",l(e,t.attrs),i(t,e),e}function l(t,e){Object.keys(e).forEach(function(n){t.setAttribute(n,e[n])})}function u(t,e){var n,o,r,i;if(e.transform&&t.css){if(!(i=e.transform(t.css)))return function(){};t.css=i}if(e.singleton){var l=h++;n=g||(g=s(e)),o=f.bind(null,n,l,!1),r=f.bind(null,n,l,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=c(e),o=p.bind(null,n,e),r=function(){a(n),n.href&&URL.revokeObjectURL(n.href)}):(n=s(e),o=d.bind(null,n),r=function(){a(n)});return o(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;o(t=e)}else r()}}function f(t,e,n,o){var r=n?"":o.css;if(t.styleSheet)t.styleSheet.cssText=x(e,r);else{var i=document.createTextNode(r),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(i,a[e]):t.appendChild(i)}}function d(t,e){var n=e.css,o=e.media;if(o&&t.setAttribute("media",o),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}function p(t,e,n){var o=n.css,r=n.sourceMap,i=void 0===e.convertToAbsoluteUrls&&r;(e.convertToAbsoluteUrls||i)&&(o=y(o)),r&&(o+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var a=new Blob([o],{type:"text/css"}),s=t.href;t.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}var m={},b=function(t){var e;return function(){return void 0===e&&(e=t.apply(this,arguments)),e}}(function(){return window&&document&&document.all&&!window.atob}),v=function(t){var e={};return function(n){return void 0===e[n]&&(e[n]=t.call(this,n)),e[n]}}(function(t){return document.querySelector(t)}),g=null,h=0,w=[],y=n(15);t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");e=e||{},e.attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||(e.singleton=b()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=r(t,e);return o(n,e),function(t){for(var i=[],a=0;a<n.length;a++){var s=n[a],c=m[s.id];c.refs--,i.push(c)}if(t){o(r(t,e),e)}for(var a=0;a<i.length;a++){var c=i[a];if(0===c.refs){for(var l=0;l<c.parts.length;l++)c.parts[l]();delete m[c.id]}}}};var x=function(){var t=[];return function(e,n){return t[e]=n,t.filter(Boolean).join("\n")}}()},function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var n=e.protocol+"//"+e.host,o=n+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(t,e){var r=e.trim().replace(/^"(.*)"$/,function(t,e){return e}).replace(/^'(.*)'$/,function(t,e){return e});if(/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(r))return t;var i;return i=0===r.indexOf("//")?r:0===r.indexOf("/")?n+r:o+r.replace(/^\.\//,""),"url("+JSON.stringify(i)+")"})}},function(t,e,n){var o=n(17);"undefined"==typeof window||window.Promise||(window.Promise=o),n(21),String.prototype.includes||(String.prototype.includes=function(t,e){"use strict";return"number"!=typeof e&&(e=0),!(e+t.length>this.length)&&-1!==this.indexOf(t,e)}),Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(t,e){if(null==this)throw new TypeError('"this" is null or not defined');var n=Object(this),o=n.length>>>0;if(0===o)return!1;for(var r=0|e,i=Math.max(r>=0?r:o-Math.abs(r),0);i<o;){if(function(t,e){return t===e||"number"==typeof t&&"number"==typeof e&&isNaN(t)&&isNaN(e)}(n[i],t))return!0;i++}return!1}}),"undefined"!=typeof window&&function(t){t.forEach(function(t){t.hasOwnProperty("remove")||Object.defineProperty(t,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){this.parentNode.removeChild(this)}})})}([Element.prototype,CharacterData.prototype,DocumentType.prototype])},function(t,e,n){(function(e){!function(n){function o(){}function r(t,e){return function(){t.apply(e,arguments)}}function i(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],f(t,this)}function a(t,e){for(;3===t._state;)t=t._value;if(0===t._state)return void t._deferreds.push(e);t._handled=!0,i._immediateFn(function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null===n)return void(1===t._state?s:c)(e.promise,t._value);var o;try{o=n(t._value)}catch(t){return void c(e.promise,t)}s(e.promise,o)})}function s(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof i)return t._state=3,t._value=e,void l(t);if("function"==typeof n)return void f(r(n,e),t)}t._state=1,t._value=e,l(t)}catch(e){c(t,e)}}function c(t,e){t._state=2,t._value=e,l(t)}function l(t){2===t._state&&0===t._deferreds.length&&i._immediateFn(function(){t._handled||i._unhandledRejectionFn(t._value)});for(var e=0,n=t._deferreds.length;e<n;e++)a(t,t._deferreds[e]);t._deferreds=null}function u(t,e,n){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=n}function f(t,e){var n=!1;try{t(function(t){n||(n=!0,s(e,t))},function(t){n||(n=!0,c(e,t))})}catch(t){if(n)return;n=!0,c(e,t)}}var d=setTimeout;i.prototype.catch=function(t){return this.then(null,t)},i.prototype.then=function(t,e){var n=new this.constructor(o);return a(this,new u(t,e,n)),n},i.all=function(t){var e=Array.prototype.slice.call(t);return new i(function(t,n){function o(i,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var s=a.then;if("function"==typeof s)return void s.call(a,function(t){o(i,t)},n)}e[i]=a,0==--r&&t(e)}catch(t){n(t)}}if(0===e.length)return t([]);for(var r=e.length,i=0;i<e.length;i++)o(i,e[i])})},i.resolve=function(t){return t&&"object"==typeof t&&t.constructor===i?t:new i(function(e){e(t)})},i.reject=function(t){return new i(function(e,n){n(t)})},i.race=function(t){return new i(function(e,n){for(var o=0,r=t.length;o<r;o++)t[o].then(e,n)})},i._immediateFn="function"==typeof e&&function(t){e(t)}||function(t){d(t,0)},i._unhandledRejectionFn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)},i._setImmediateFn=function(t){i._immediateFn=t},i._setUnhandledRejectionFn=function(t){i._unhandledRejectionFn=t},void 0!==t&&t.exports?t.exports=i:n.Promise||(n.Promise=i)}(this)}).call(e,n(18).setImmediate)},function(t,e,n){function o(t,e){this._id=t,this._clearFn=e}var r=Function.prototype.apply;e.setTimeout=function(){return new o(r.call(setTimeout,window,arguments),clearTimeout)},e.setInterval=function(){return new o(r.call(setInterval,window,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(window,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(19),e.setImmediate=setImmediate,e.clearImmediate=clearImmediate},function(t,e,n){(function(t,e){!function(t,n){"use strict";function o(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n<e.length;n++)e[n]=arguments[n+1];var o={callback:t,args:e};return l[c]=o,s(c),c++}function r(t){delete l[t]}function i(t){var e=t.callback,o=t.args;switch(o.length){case 0:e();break;case 1:e(o[0]);break;case 2:e(o[0],o[1]);break;case 3:e(o[0],o[1],o[2]);break;default:e.apply(n,o)}}function a(t){if(u)setTimeout(a,0,t);else{var e=l[t];if(e){u=!0;try{i(e)}finally{r(t),u=!1}}}}if(!t.setImmediate){var s,c=1,l={},u=!1,f=t.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(t);d=d&&d.setTimeout?d:t,"[object process]"==={}.toString.call(t.process)?function(){s=function(t){e.nextTick(function(){a(t)})}}():function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?function(){var e="setImmediate$"+Math.random()+"$",n=function(n){n.source===t&&"string"==typeof n.data&&0===n.data.indexOf(e)&&a(+n.data.slice(e.length))};t.addEventListener?t.addEventListener("message",n,!1):t.attachEvent("onmessage",n),s=function(n){t.postMessage(e+n,"*")}}():t.MessageChannel?function(){var t=new MessageChannel;t.port1.onmessage=function(t){a(t.data)},s=function(e){t.port2.postMessage(e)}}():f&&"onreadystatechange"in f.createElement("script")?function(){var t=f.documentElement;s=function(e){var n=f.createElement("script");n.onreadystatechange=function(){a(e),n.onreadystatechange=null,t.removeChild(n),n=null},t.appendChild(n)}}():function(){s=function(t){setTimeout(a,0,t)}}(),d.setImmediate=o,d.clearImmediate=r}}("undefined"==typeof self?void 0===t?this:t:self)}).call(e,n(7),n(20))},function(t,e){function n(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function r(t){if(u===setTimeout)return setTimeout(t,0);if((u===n||!u)&&setTimeout)return u=setTimeout,setTimeout(t,0);try{return u(t,0)}catch(e){try{return u.call(null,t,0)}catch(e){return u.call(this,t,0)}}}function i(t){if(f===clearTimeout)return clearTimeout(t);if((f===o||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(t);try{return f(t)}catch(e){try{return f.call(null,t)}catch(e){return f.call(this,t)}}}function a(){b&&p&&(b=!1,p.length?m=p.concat(m):v=-1,m.length&&s())}function s(){if(!b){var t=r(a);b=!0;for(var e=m.length;e;){for(p=m,m=[];++v<e;)p&&p[v].run();v=-1,e=m.length}p=null,b=!1,i(t)}}function c(t,e){this.fun=t,this.array=e}function l(){}var u,f,d=t.exports={};!function(){try{u="function"==typeof setTimeout?setTimeout:n}catch(t){u=n}try{f="function"==typeof clearTimeout?clearTimeout:o}catch(t){f=o}}();var p,m=[],b=!1,v=-1;d.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];m.push(new c(t,e)),1!==m.length||b||r(s)},c.prototype.run=function(){this.fun.apply(null,this.array)},d.title="browser",d.browser=!0,d.env={},d.argv=[],d.version="",d.versions={},d.on=l,d.addListener=l,d.once=l,d.off=l,d.removeListener=l,d.removeAllListeners=l,d.emit=l,d.prependListener=l,d.prependOnceListener=l,d.listeners=function(t){return[]},d.binding=function(t){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(t){throw new Error("process.chdir is not supported")},d.umask=function(){return 0}},function(t,e,n){"use strict";n(22).polyfill()},function(t,e,n){"use strict";function o(t,e){if(void 0===t||null===t)throw new TypeError("Cannot convert first argument to object");for(var n=Object(t),o=1;o<arguments.length;o++){var r=arguments[o];if(void 0!==r&&null!==r)for(var i=Object.keys(Object(r)),a=0,s=i.length;a<s;a++){var c=i[a],l=Object.getOwnPropertyDescriptor(r,c);void 0!==l&&l.enumerable&&(n[c]=r[c])}}return n}function r(){Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:o})}t.exports={assign:o,polyfill:r}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(24),r=n(6),i=n(5),a=n(36),s=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if("undefined"!=typeof window){var n=a.getOpts.apply(void 0,t);return new Promise(function(t,e){i.default.promise={resolve:t,reject:e},o.default(n),setTimeout(function(){r.openModal()})})}};s.close=r.onAction,s.getState=r.getState,s.setActionValue=i.setActionValue,s.stopLoading=r.stopLoading,s.setDefaults=a.setDefaults,e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),r=n(0),i=r.default.MODAL,a=n(4),s=n(34),c=n(35),l=n(1);e.init=function(t){o.getNode(i)||(document.body||l.throwErr("You can only use SweetAlert AFTER the DOM has loaded!"),s.default(),a.default()),a.initModalContent(t),c.default(t)},e.default=e.init},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),r=o.default.MODAL;e.modalMarkup='\n <div class="'+r+'" role="dialog" aria-modal="true"></div>',e.default=e.modalMarkup},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),r=o.default.OVERLAY,i='<div \n class="'+r+'"\n tabIndex="-1">\n </div>';e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),r=o.default.ICON;e.errorIconMarkup=function(){var t=r+"--error",e=t+"__line";return'\n <div class="'+t+'__x-mark">\n <span class="'+e+" "+e+'--left"></span>\n <span class="'+e+" "+e+'--right"></span>\n </div>\n '},e.warningIconMarkup=function(){var t=r+"--warning";return'\n <span class="'+t+'__body">\n <span class="'+t+'__dot"></span>\n </span>\n '},e.successIconMarkup=function(){var t=r+"--success";return'\n <span class="'+t+"__line "+t+'__line--long"></span>\n <span class="'+t+"__line "+t+'__line--tip"></span>\n\n <div class="'+t+'__ring"></div>\n <div class="'+t+'__hide-corners"></div>\n '}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),r=o.default.CONTENT;e.contentMarkup='\n <div class="'+r+'">\n\n </div>\n'},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),r=o.default.BUTTON_CONTAINER,i=o.default.BUTTON,a=o.default.BUTTON_LOADER;e.buttonMarkup='\n <div class="'+r+'">\n\n <button\n class="'+i+'"\n ></button>\n\n <div class="'+a+'">\n <div></div>\n <div></div>\n <div></div>\n </div>\n\n </div>\n'},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(4),r=n(2),i=n(0),a=i.default.ICON,s=i.default.ICON_CUSTOM,c=["error","warning","success","info"],l={error:r.errorIconMarkup(),warning:r.warningIconMarkup(),success:r.successIconMarkup()},u=function(t,e){var n=a+"--"+t;e.classList.add(n);var o=l[t];o&&(e.innerHTML=o)},f=function(t,e){e.classList.add(s);var n=document.createElement("img");n.src=t,e.appendChild(n)},d=function(t){if(t){var e=o.injectElIntoModal(r.iconMarkup);c.includes(t)?u(t,e):f(t,e)}};e.default=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(2),r=n(4),i=function(t){navigator.userAgent.includes("AppleWebKit")&&(t.style.display="none",t.offsetHeight,t.style.display="")};e.initTitle=function(t){if(t){var e=r.injectElIntoModal(o.titleMarkup);e.textContent=t,i(e)}},e.initText=function(t){if(t){var e=document.createDocumentFragment();t.split("\n").forEach(function(t,n,o){e.appendChild(document.createTextNode(t)),n<o.length-1&&e.appendChild(document.createElement("br"))});var n=r.injectElIntoModal(o.textMarkup);n.appendChild(e),i(n)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),r=n(4),i=n(0),a=i.default.BUTTON,s=i.default.DANGER_BUTTON,c=n(3),l=n(2),u=n(6),f=n(5),d=function(t,e,n){var r=e.text,i=e.value,d=e.className,p=e.closeModal,m=o.stringToNode(l.buttonMarkup),b=m.querySelector("."+a),v=a+"--"+t;if(b.classList.add(v),d){(Array.isArray(d)?d:d.split(" ")).filter(function(t){return t.length>0}).forEach(function(t){b.classList.add(t)})}n&&t===c.CONFIRM_KEY&&b.classList.add(s),b.textContent=r;var g={};return g[t]=i,f.setActionValue(g),f.setActionOptionsFor(t,{closeModal:p}),b.addEventListener("click",function(){return u.onAction(t)}),m},p=function(t,e){var n=r.injectElIntoModal(l.footerMarkup);for(var o in t){var i=t[o],a=d(o,i,e);i.visible&&n.appendChild(a)}0===n.children.length&&n.remove()};e.default=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(3),r=n(4),i=n(2),a=n(5),s=n(6),c=n(0),l=c.default.CONTENT,u=function(t){t.addEventListener("input",function(t){var e=t.target,n=e.value;a.setActionValue(n)}),t.addEventListener("keyup",function(t){if("Enter"===t.key)return s.onAction(o.CONFIRM_KEY)}),setTimeout(function(){t.focus(),a.setActionValue("")},0)},f=function(t,e,n){var o=document.createElement(e),r=l+"__"+e;o.classList.add(r);for(var i in n){var a=n[i];o[i]=a}"input"===e&&u(o),t.appendChild(o)},d=function(t){if(t){var e=r.injectElIntoModal(i.contentMarkup),n=t.element,o=t.attributes;"string"==typeof n?f(e,n,o):e.appendChild(n)}};e.default=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),r=n(2),i=function(){var t=o.stringToNode(r.overlayMarkup);document.body.appendChild(t)};e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(5),r=n(6),i=n(1),a=n(3),s=n(0),c=s.default.MODAL,l=s.default.BUTTON,u=s.default.OVERLAY,f=function(t){t.preventDefault(),v()},d=function(t){t.preventDefault(),g()},p=function(t){if(o.default.isOpen)switch(t.key){case"Escape":return r.onAction(a.CANCEL_KEY)}},m=function(t){if(o.default.isOpen)switch(t.key){case"Tab":return f(t)}},b=function(t){if(o.default.isOpen)return"Tab"===t.key&&t.shiftKey?d(t):void 0},v=function(){var t=i.getNode(l);t&&(t.tabIndex=0,t.focus())},g=function(){var t=i.getNode(c),e=t.querySelectorAll("."+l),n=e.length-1,o=e[n];o&&o.focus()},h=function(t){t[t.length-1].addEventListener("keydown",m)},w=function(t){t[0].addEventListener("keydown",b)},y=function(){var t=i.getNode(c),e=t.querySelectorAll("."+l);e.length&&(h(e),w(e))},x=function(t){if(i.getNode(u)===t.target)return r.onAction(a.CANCEL_KEY)},_=function(t){var e=i.getNode(u);e.removeEventListener("click",x),t&&e.addEventListener("click",x)},k=function(t){o.default.timer&&clearTimeout(o.default.timer),t&&(o.default.timer=window.setTimeout(function(){return r.onAction(a.CANCEL_KEY)},t))},O=function(t){t.closeOnEsc?document.addEventListener("keyup",p):document.removeEventListener("keyup",p),t.dangerMode?v():g(),y(),_(t.closeOnClickOutside),k(t.timer)};e.default=O},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),r=n(3),i=n(37),a=n(38),s={title:null,text:null,icon:null,buttons:r.defaultButtonList,content:null,className:null,closeOnClickOutside:!0,closeOnEsc:!0,dangerMode:!1,timer:null},c=Object.assign({},s);e.setDefaults=function(t){c=Object.assign({},s,t)};var l=function(t){var e=t&&t.button,n=t&&t.buttons;return void 0!==e&&void 0!==n&&o.throwErr("Cannot set both 'button' and 'buttons' options!"),void 0!==e?{confirm:e}:n},u=function(t){return o.ordinalSuffixOf(t+1)},f=function(t,e){o.throwErr(u(e)+" argument ('"+t+"') is invalid")},d=function(t,e){var n=t+1,r=e[n];o.isPlainObject(r)||void 0===r||o.throwErr("Expected "+u(n)+" argument ('"+r+"') to be a plain object")},p=function(t,e){var n=t+1,r=e[n];void 0!==r&&o.throwErr("Unexpected "+u(n)+" argument ("+r+")")},m=function(t,e,n,r){var i=typeof e,a="string"===i,s=e instanceof Element;if(a){if(0===n)return{text:e};if(1===n)return{text:e,title:r[0]};if(2===n)return d(n,r),{icon:e};f(e,n)}else{if(s&&0===n)return d(n,r),{content:e};if(o.isPlainObject(e))return p(n,r),e;f(e,n)}};e.getOpts=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n={};t.forEach(function(e,o){var r=m(0,e,o,t);Object.assign(n,r)});var o=l(n);n.buttons=r.getButtonListOpts(o),delete n.button,n.content=i.getContentOpts(n.content);var u=Object.assign({},s,c,n);return Object.keys(u).forEach(function(t){a.DEPRECATED_OPTS[t]&&a.logDeprecation(t)}),u}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),r={element:"input",attributes:{placeholder:""}};e.getContentOpts=function(t){var e={};return o.isPlainObject(t)?Object.assign(e,t):t instanceof Element?{element:t}:"input"===t?r:null}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.logDeprecation=function(t){var n=e.DEPRECATED_OPTS[t],o=n.onlyRename,r=n.replacement,i=n.subOption,a=n.link,s=o?"renamed":"deprecated",c='SweetAlert warning: "'+t+'" option has been '+s+".";if(r){c+=" Please use"+(i?' "'+i+'" in ':" ")+'"'+r+'" instead.'}var l="https://sweetalert.js.org";c+=a?" More details: "+l+a:" More details: "+l+"/guides/#upgrading-from-1x",console.warn(c)},e.DEPRECATED_OPTS={type:{replacement:"icon",link:"/docs/#icon"},imageUrl:{replacement:"icon",link:"/docs/#icon"},customClass:{replacement:"className",onlyRename:!0,link:"/docs/#classname"},imageSize:{},showCancelButton:{replacement:"buttons",link:"/docs/#buttons"},showConfirmButton:{replacement:"button",link:"/docs/#button"},confirmButtonText:{replacement:"button",link:"/docs/#button"},confirmButtonColor:{},cancelButtonText:{replacement:"buttons",link:"/docs/#buttons"},closeOnConfirm:{replacement:"button",subOption:"closeModal",link:"/docs/#button"},closeOnCancel:{replacement:"buttons",subOption:"closeModal",link:"/docs/#buttons"},showLoaderOnConfirm:{replacement:"buttons"},animation:{},inputType:{replacement:"content",link:"/docs/#content"},inputValue:{replacement:"content",link:"/docs/#content"},inputPlaceholder:{replacement:"content",link:"/docs/#content"},html:{replacement:"content",link:"/docs/#content"},allowEscapeKey:{replacement:"closeOnEsc",onlyRename:!0,link:"/docs/#closeonesc"},allowClickOutside:{replacement:"closeOnClickOutside",onlyRename:!0,link:"/docs/#closeonclickoutside"}}}])});
|
|
assets/sweetalert/package.json
DELETED
@@ -1,138 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"_from": "sweetalert@^2.1.2",
|
3 |
-
"_id": "sweetalert@2.1.2",
|
4 |
-
"_inBundle": false,
|
5 |
-
"_integrity": "sha512-iWx7X4anRBNDa/a+AdTmvAzQtkN1+s4j/JJRWlHpYE8Qimkohs8/XnFcWeYHH2lMA8LRCa5tj2d244If3S/hzA==",
|
6 |
-
"_location": "/sweetalert",
|
7 |
-
"_phantomChildren": {},
|
8 |
-
"_requested": {
|
9 |
-
"type": "range",
|
10 |
-
"registry": true,
|
11 |
-
"raw": "sweetalert@^2.1.2",
|
12 |
-
"name": "sweetalert",
|
13 |
-
"escapedName": "sweetalert",
|
14 |
-
"rawSpec": "^2.1.2",
|
15 |
-
"saveSpec": null,
|
16 |
-
"fetchSpec": "^2.1.2"
|
17 |
-
},
|
18 |
-
"_requiredBy": [
|
19 |
-
"#USER",
|
20 |
-
"/"
|
21 |
-
],
|
22 |
-
"_resolved": "https://registry.npmjs.org/sweetalert/-/sweetalert-2.1.2.tgz",
|
23 |
-
"_shasum": "010baaa80d0dbdc86f96bfcaa96b490728594b79",
|
24 |
-
"_spec": "sweetalert@^2.1.2",
|
25 |
-
"_where": "/Applications/MAMP/htdocs/asset-optimizer",
|
26 |
-
"author": {
|
27 |
-
"name": "Tristan Edwards",
|
28 |
-
"email": "tristan.edwards@me.com",
|
29 |
-
"url": "https://tristanedwards.me"
|
30 |
-
},
|
31 |
-
"bugs": {
|
32 |
-
"url": "https://github.com/t4t5/sweetalert/issues"
|
33 |
-
},
|
34 |
-
"bundleDependencies": false,
|
35 |
-
"collective": {
|
36 |
-
"type": "opencollective",
|
37 |
-
"url": "https://opencollective.com/SweetAlert"
|
38 |
-
},
|
39 |
-
"dependencies": {
|
40 |
-
"es6-object-assign": "^1.1.0",
|
41 |
-
"promise-polyfill": "^6.0.2"
|
42 |
-
},
|
43 |
-
"deprecated": false,
|
44 |
-
"description": "A beautiful replacement for JavaScript's \"alert\"",
|
45 |
-
"devDependencies": {
|
46 |
-
"@sweetalert/with-react": "^0.1.1",
|
47 |
-
"@types/jest": "19.2.3",
|
48 |
-
"autoprefixer": "6.7.7",
|
49 |
-
"babel-core": "6.24.1",
|
50 |
-
"babel-loader": "6.4.1",
|
51 |
-
"babel-plugin-transform-es2015-modules-commonjs": "6.24.1",
|
52 |
-
"babel-plugin-transform-runtime": "6.23.0",
|
53 |
-
"babel-preset-env": "1.4.0",
|
54 |
-
"babel-preset-es2015": "6.24.1",
|
55 |
-
"babel-preset-react": "6.24.1",
|
56 |
-
"babel-standalone": "^6.26.0",
|
57 |
-
"babelify": "^6.0.2",
|
58 |
-
"browserify": "^9.0.8",
|
59 |
-
"copy-webpack-plugin": "^4.0.1",
|
60 |
-
"css-loader": "0.28.7",
|
61 |
-
"dts-bundle": "0.7.3",
|
62 |
-
"exports-loader": "0.6.4",
|
63 |
-
"expose-loader": "0.7.3",
|
64 |
-
"glob": "^5.0.3",
|
65 |
-
"jest": "19.0.2",
|
66 |
-
"jquery": "3.2.1",
|
67 |
-
"jus": "0.24.1",
|
68 |
-
"nodelist-foreach-polyfill": "^1.2.0",
|
69 |
-
"opencollective": "^1.0.3",
|
70 |
-
"path": "^0.11.14",
|
71 |
-
"postcss-color-function": "3.0.0",
|
72 |
-
"postcss-custom-properties": "5.0.2",
|
73 |
-
"postcss-easy-import": "2.0.0",
|
74 |
-
"postcss-loader": "1.3.3",
|
75 |
-
"postcss-nesting": "2.3.1",
|
76 |
-
"react": "15.5.4",
|
77 |
-
"react-dom": "15.5.4",
|
78 |
-
"source-map-loader": "0.2.1",
|
79 |
-
"style-loader": "0.18.2",
|
80 |
-
"sweetalert": "file:./",
|
81 |
-
"ts-jest": "19.0.14",
|
82 |
-
"ts-loader": "2.0.3",
|
83 |
-
"tslint": "5.1.0",
|
84 |
-
"tslint-loader": "3.5.2",
|
85 |
-
"typescript": "2.2.2",
|
86 |
-
"vinyl-buffer": "^1.0.0",
|
87 |
-
"vinyl-source-stream": "^1.1.0",
|
88 |
-
"webpack": "3.5.5",
|
89 |
-
"webpack-bundle-analyzer": "2.9.0",
|
90 |
-
"webpack-dev-server": "2.4.2",
|
91 |
-
"webpack-merge": "4.1.0",
|
92 |
-
"whatwg-fetch": "^2.0.3"
|
93 |
-
},
|
94 |
-
"files": [
|
95 |
-
"dist",
|
96 |
-
"LICENSE.md",
|
97 |
-
"README.md",
|
98 |
-
"typings"
|
99 |
-
],
|
100 |
-
"homepage": "https://sweetalert.js.org/",
|
101 |
-
"jest": {
|
102 |
-
"verbose": true,
|
103 |
-
"transform": {
|
104 |
-
"^.+\\.tsx?$": "<rootDir>/node_modules/ts-jest/preprocessor.js"
|
105 |
-
},
|
106 |
-
"testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$",
|
107 |
-
"moduleFileExtensions": [
|
108 |
-
"ts",
|
109 |
-
"tsx",
|
110 |
-
"js",
|
111 |
-
"json"
|
112 |
-
]
|
113 |
-
},
|
114 |
-
"keywords": [
|
115 |
-
"sweetalert",
|
116 |
-
"alert",
|
117 |
-
"modal",
|
118 |
-
"popup"
|
119 |
-
],
|
120 |
-
"license": "MIT",
|
121 |
-
"main": "dist/sweetalert.min.js",
|
122 |
-
"name": "sweetalert",
|
123 |
-
"repository": {
|
124 |
-
"type": "git",
|
125 |
-
"url": "git+https://github.com/t4t5/sweetalert.git"
|
126 |
-
},
|
127 |
-
"scripts": {
|
128 |
-
"build": "webpack -p",
|
129 |
-
"builddocs": "node_modules/jus/cli.js build docs-src docs",
|
130 |
-
"buildtest": "npm run build && jest",
|
131 |
-
"docs": "npm run build && node_modules/jus/cli.js serve docs-src",
|
132 |
-
"prepare": "npm run build && npm run builddocs",
|
133 |
-
"prepublishOnly": "npm run build",
|
134 |
-
"test": "jest"
|
135 |
-
},
|
136 |
-
"types": "typings/sweetalert.d.ts",
|
137 |
-
"version": "2.1.2"
|
138 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sweetalert/typings/core.d.ts
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
import { ActionOptions, SwalState } from './modules/state';
|
2 |
-
import { SwalOptions } from './modules/options';
|
3 |
-
export declare type SwalParams = (string | Partial<SwalOptions>)[];
|
4 |
-
export interface SweetAlert {
|
5 |
-
(...params: SwalParams): Promise<any>;
|
6 |
-
close?(namespace?: string): void;
|
7 |
-
getState?(): SwalState;
|
8 |
-
setActionValue?(opts: string | ActionOptions): void;
|
9 |
-
stopLoading?(): void;
|
10 |
-
setDefaults?(opts: object): void;
|
11 |
-
}
|
12 |
-
declare const swal: SweetAlert;
|
13 |
-
export default swal;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sweetalert/typings/modules/actions.d.ts
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
import { SwalState } from './state';
|
2 |
-
export declare const openModal: () => void;
|
3 |
-
export declare const onAction: (namespace?: string) => void;
|
4 |
-
export declare const getState: () => SwalState;
|
5 |
-
export declare const stopLoading: () => void;
|
|
|
|
|
|
|
|
|
|
assets/sweetalert/typings/modules/class-list/index.d.ts
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
export interface ClassNameList {
|
2 |
-
[key: string]: string;
|
3 |
-
}
|
4 |
-
export declare const CLASS_NAMES: ClassNameList;
|
5 |
-
export default CLASS_NAMES;
|
|
|
|
|
|
|
|
|
|
assets/sweetalert/typings/modules/event-listeners.d.ts
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
import { SwalOptions } from './options';
|
2 |
-
declare const addEventListeners: (opts: SwalOptions) => void;
|
3 |
-
export default addEventListeners;
|
|
|
|
|
|
assets/sweetalert/typings/modules/init/buttons.d.ts
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
import { ButtonList } from '../options/buttons';
|
2 |
-
declare const initButtons: (buttons: ButtonList, dangerMode: boolean) => void;
|
3 |
-
export default initButtons;
|
|
|
|
|
|
assets/sweetalert/typings/modules/init/content.d.ts
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
import { ContentOptions } from '../options/content';
|
2 |
-
declare const initContent: (opts: ContentOptions) => void;
|
3 |
-
export default initContent;
|
|
|
|
|
|
assets/sweetalert/typings/modules/init/icon.d.ts
DELETED
@@ -1,2 +0,0 @@
|
|
1 |
-
declare const initIcon: (str: string) => void;
|
2 |
-
export default initIcon;
|
|
|
|
assets/sweetalert/typings/modules/init/index.d.ts
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
import { SwalOptions } from '../options';
|
2 |
-
export declare const init: (opts: SwalOptions) => void;
|
3 |
-
export default init;
|
|
|
|
|
|
assets/sweetalert/typings/modules/init/modal.d.ts
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
import { SwalOptions } from '../options';
|
2 |
-
export declare const injectElIntoModal: (markup: string) => HTMLElement;
|
3 |
-
export declare const initModalContent: (opts: SwalOptions) => void;
|
4 |
-
declare const initModalOnce: () => void;
|
5 |
-
export default initModalOnce;
|
|
|
|
|
|
|
|
|
|
assets/sweetalert/typings/modules/init/overlay.d.ts
DELETED
@@ -1,2 +0,0 @@
|
|
1 |
-
declare const initOverlayOnce: () => void;
|
2 |
-
export default initOverlayOnce;
|
|
|
|
assets/sweetalert/typings/modules/init/text.d.ts
DELETED
@@ -1,2 +0,0 @@
|
|
1 |
-
export declare const initTitle: (title: string) => void;
|
2 |
-
export declare const initText: (text: string) => void;
|
|
|
|
assets/sweetalert/typings/modules/markup/buttons.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
export declare const buttonMarkup: string;
|
|
assets/sweetalert/typings/modules/markup/content.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
export declare const contentMarkup: string;
|
|
assets/sweetalert/typings/modules/markup/icons.d.ts
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
export declare const errorIconMarkup: () => string;
|
2 |
-
export declare const warningIconMarkup: () => string;
|
3 |
-
export declare const successIconMarkup: () => string;
|
|
|
|
|
|
assets/sweetalert/typings/modules/markup/index.d.ts
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
export * from './modal';
|
2 |
-
export { default as overlayMarkup } from './overlay';
|
3 |
-
export * from './icons';
|
4 |
-
export * from './content';
|
5 |
-
export * from './buttons';
|
6 |
-
export declare const iconMarkup: string;
|
7 |
-
export declare const titleMarkup: string;
|
8 |
-
export declare const textMarkup: string;
|
9 |
-
export declare const footerMarkup: string;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sweetalert/typings/modules/markup/modal.d.ts
DELETED
@@ -1,2 +0,0 @@
|
|
1 |
-
export declare const modalMarkup: string;
|
2 |
-
export default modalMarkup;
|
|
|
|
assets/sweetalert/typings/modules/markup/overlay.d.ts
DELETED
@@ -1,2 +0,0 @@
|
|
1 |
-
declare const overlay: string;
|
2 |
-
export default overlay;
|
|
|
|
assets/sweetalert/typings/modules/options/buttons.d.ts
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
export interface ButtonOptions {
|
2 |
-
visible?: boolean;
|
3 |
-
text?: string;
|
4 |
-
value?: any;
|
5 |
-
className?: string | Array<string>;
|
6 |
-
closeModal?: boolean;
|
7 |
-
}
|
8 |
-
export interface ButtonList {
|
9 |
-
[buttonNamespace: string]: ButtonOptions | boolean;
|
10 |
-
}
|
11 |
-
export declare const CONFIRM_KEY = "confirm";
|
12 |
-
export declare const CANCEL_KEY = "cancel";
|
13 |
-
export declare const defaultButtonList: ButtonList;
|
14 |
-
export declare const getButtonListOpts: (opts: string | boolean | object) => ButtonList;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sweetalert/typings/modules/options/content.d.ts
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
export interface ContentOptions {
|
2 |
-
element: string | Node;
|
3 |
-
attributes?: object;
|
4 |
-
}
|
5 |
-
export declare const getContentOpts: (contentParam: string | object) => ContentOptions;
|
|
|
|
|
|
|
|
|
|
assets/sweetalert/typings/modules/options/deprecations.d.ts
DELETED
@@ -1,11 +0,0 @@
|
|
1 |
-
export declare const logDeprecation: (name: string) => void;
|
2 |
-
export interface OptionReplacement {
|
3 |
-
replacement?: string;
|
4 |
-
onlyRename?: boolean;
|
5 |
-
subOption?: string;
|
6 |
-
link?: string;
|
7 |
-
}
|
8 |
-
export interface OptionReplacementsList {
|
9 |
-
[name: string]: OptionReplacement;
|
10 |
-
}
|
11 |
-
export declare const DEPRECATED_OPTS: OptionReplacementsList;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sweetalert/typings/modules/options/index.d.ts
DELETED
@@ -1,16 +0,0 @@
|
|
1 |
-
import { ButtonList } from './buttons';
|
2 |
-
import { ContentOptions } from './content';
|
3 |
-
export interface SwalOptions {
|
4 |
-
title: string;
|
5 |
-
text: string;
|
6 |
-
icon: string;
|
7 |
-
buttons: ButtonList | Array<string | boolean>;
|
8 |
-
content: ContentOptions;
|
9 |
-
className: string;
|
10 |
-
closeOnClickOutside: boolean;
|
11 |
-
closeOnEsc: boolean;
|
12 |
-
dangerMode: boolean;
|
13 |
-
timer: number;
|
14 |
-
}
|
15 |
-
export declare const setDefaults: (opts: object) => void;
|
16 |
-
export declare const getOpts: (...params: (string | Partial<SwalOptions>)[]) => SwalOptions;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sweetalert/typings/modules/state.d.ts
DELETED
@@ -1,27 +0,0 @@
|
|
1 |
-
export interface SwalState {
|
2 |
-
isOpen: boolean;
|
3 |
-
promise: {
|
4 |
-
resolve?(value: string): void;
|
5 |
-
reject?(): void;
|
6 |
-
};
|
7 |
-
actions: {
|
8 |
-
[namespace: string]: {
|
9 |
-
value?: string | any;
|
10 |
-
closeModal?: boolean;
|
11 |
-
};
|
12 |
-
};
|
13 |
-
timer: number;
|
14 |
-
}
|
15 |
-
export interface ActionOptions {
|
16 |
-
[buttonNamespace: string]: {
|
17 |
-
value?: string;
|
18 |
-
closeModal?: boolean;
|
19 |
-
};
|
20 |
-
}
|
21 |
-
declare let state: SwalState;
|
22 |
-
export declare const resetState: () => void;
|
23 |
-
export declare const setActionValue: (opts: string | ActionOptions) => void;
|
24 |
-
export declare const setActionOptionsFor: (buttonKey: string, {closeModal}?: {
|
25 |
-
closeModal?: boolean;
|
26 |
-
}) => void;
|
27 |
-
export default state;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sweetalert/typings/modules/utils.d.ts
DELETED
@@ -1,7 +0,0 @@
|
|
1 |
-
export declare const getNode: (className: string) => HTMLElement;
|
2 |
-
export declare const stringToNode: (html: string) => HTMLElement;
|
3 |
-
export declare const insertAfter: (newNode: Node, referenceNode: Node) => void;
|
4 |
-
export declare const removeNode: (node: Node) => void;
|
5 |
-
export declare const throwErr: (message: string) => never;
|
6 |
-
export declare const isPlainObject: (value: any) => boolean;
|
7 |
-
export declare const ordinalSuffixOf: (num: number) => string;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sweetalert/typings/sweetalert.d.ts
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
import swal, { SweetAlert } from "./core";
|
2 |
-
|
3 |
-
declare global {
|
4 |
-
const swal: SweetAlert;
|
5 |
-
const sweetAlert: SweetAlert;
|
6 |
-
}
|
7 |
-
|
8 |
-
export default swal;
|
9 |
-
export as namespace swal;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sweetalert2/CHANGELOG.md
ADDED
@@ -0,0 +1,1628 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
## [10.6.1](https://github.com/sweetalert2/sweetalert2/compare/v10.6.0...v10.6.1) (2020-10-16)
|
2 |
+
|
3 |
+
|
4 |
+
### Bug Fixes
|
5 |
+
|
6 |
+
* **types:** make returnInputValueOnDeny optional ([9237bbc](https://github.com/sweetalert2/sweetalert2/commit/9237bbca23b549b98ed35da1d57ec84da98365bf))
|
7 |
+
|
8 |
+
# [10.6.0](https://github.com/sweetalert2/sweetalert2/compare/v10.5.1...v10.6.0) (2020-10-15)
|
9 |
+
|
10 |
+
|
11 |
+
### Bug Fixes
|
12 |
+
|
13 |
+
* make button colors WCAG compliant ([#2085](https://github.com/sweetalert2/sweetalert2/issues/2085)) ([0b1e4b4](https://github.com/sweetalert2/sweetalert2/commit/0b1e4b48ae284efb0a81437a58f3ce93e1c00085))
|
14 |
+
* set display: inline block for confirm button ([#2086](https://github.com/sweetalert2/sweetalert2/issues/2086)) ([43fdf17](https://github.com/sweetalert2/sweetalert2/commit/43fdf1732e8838c1a4469f721a6b456a75aae7e6))
|
15 |
+
|
16 |
+
|
17 |
+
### Features
|
18 |
+
|
19 |
+
* add returnInputValueOnDeny param ([#2084](https://github.com/sweetalert2/sweetalert2/issues/2084)) ([f0833e8](https://github.com/sweetalert2/sweetalert2/commit/f0833e8ea755bfe6a0c5ecb9d9c297edf12fec57))
|
20 |
+
|
21 |
+
## [10.5.1](https://github.com/sweetalert2/sweetalert2/compare/v10.5.0...v10.5.1) (2020-10-13)
|
22 |
+
|
23 |
+
|
24 |
+
### Bug Fixes
|
25 |
+
|
26 |
+
* **types:** inputValue can be number or boolean ([#2083](https://github.com/sweetalert2/sweetalert2/issues/2083)) ([fa1ac2b](https://github.com/sweetalert2/sweetalert2/commit/fa1ac2b2ccb7763ed18751fd72c2ce0a1e21498d))
|
27 |
+
|
28 |
+
# [10.5.0](https://github.com/sweetalert2/sweetalert2/compare/v10.4.0...v10.5.0) (2020-10-12)
|
29 |
+
|
30 |
+
|
31 |
+
### Features
|
32 |
+
|
33 |
+
* add customClass.validationMessage ([#2081](https://github.com/sweetalert2/sweetalert2/issues/2081)) ([76e54e4](https://github.com/sweetalert2/sweetalert2/commit/76e54e4861ce35e8c976f0f45347ade7142b8b03))
|
34 |
+
|
35 |
+
# [10.4.0](https://github.com/sweetalert2/sweetalert2/compare/v10.3.7...v10.4.0) (2020-10-11)
|
36 |
+
|
37 |
+
|
38 |
+
### Features
|
39 |
+
|
40 |
+
* add `inputLabel` parameter ([#2078](https://github.com/sweetalert2/sweetalert2/issues/2078)) ([a437376](https://github.com/sweetalert2/sweetalert2/commit/a4373763a2cc512408bb8a40c0b7a2c71167e688))
|
41 |
+
|
42 |
+
## [10.3.7](https://github.com/sweetalert2/sweetalert2/compare/v10.3.6...v10.3.7) (2020-10-09)
|
43 |
+
|
44 |
+
|
45 |
+
### Bug Fixes
|
46 |
+
|
47 |
+
* do not prevent events for Apple Pencil ([#2075](https://github.com/sweetalert2/sweetalert2/issues/2075)) ([88dd4c7](https://github.com/sweetalert2/sweetalert2/commit/88dd4c7d236603f7fce20cf5b19bf40b261debfb))
|
48 |
+
|
49 |
+
## [10.3.6](https://github.com/sweetalert2/sweetalert2/compare/v10.3.5...v10.3.6) (2020-10-08)
|
50 |
+
|
51 |
+
|
52 |
+
### Bug Fixes
|
53 |
+
|
54 |
+
* wrap progress steps when they aren't fitting one row ([#2074](https://github.com/sweetalert2/sweetalert2/issues/2074)) ([fa695bf](https://github.com/sweetalert2/sweetalert2/commit/fa695bffd9d9e45629e7f84c3e73112764f93f7f))
|
55 |
+
|
56 |
+
## [10.3.5](https://github.com/sweetalert2/sweetalert2/compare/v10.3.4...v10.3.5) (2020-09-25)
|
57 |
+
|
58 |
+
|
59 |
+
### Bug Fixes
|
60 |
+
|
61 |
+
* remove null coalescing operator ([#2069](https://github.com/sweetalert2/sweetalert2/issues/2069)) ([5145f75](https://github.com/sweetalert2/sweetalert2/commit/5145f75bf6aa698178e2a0728752b3c8f09c140b))
|
62 |
+
|
63 |
+
## [10.3.4](https://github.com/sweetalert2/sweetalert2/compare/v10.3.3...v10.3.4) (2020-09-25)
|
64 |
+
|
65 |
+
|
66 |
+
### Bug Fixes
|
67 |
+
|
68 |
+
* **types:** move fire<T>(options: SweetAlertOptions<T>) to the top ([#2068](https://github.com/sweetalert2/sweetalert2/issues/2068)) ([20ea88d](https://github.com/sweetalert2/sweetalert2/commit/20ea88dc86b13af7410f82efa7778dc6897443cb))
|
69 |
+
|
70 |
+
## [10.3.3](https://github.com/sweetalert2/sweetalert2/compare/v10.3.2...v10.3.3) (2020-09-23)
|
71 |
+
|
72 |
+
|
73 |
+
### Bug Fixes
|
74 |
+
|
75 |
+
* add timeout before calling setScrollingVisibility() ([#2066](https://github.com/sweetalert2/sweetalert2/issues/2066)) ([c8c28f7](https://github.com/sweetalert2/sweetalert2/commit/c8c28f794633ab30840475b457719d3c6fb6b70e))
|
76 |
+
|
77 |
+
## [10.3.2](https://github.com/sweetalert2/sweetalert2/compare/v10.3.1...v10.3.2) (2020-09-22)
|
78 |
+
|
79 |
+
|
80 |
+
### Bug Fixes
|
81 |
+
|
82 |
+
* add 10ms timeout before adding showClass ([#2063](https://github.com/sweetalert2/sweetalert2/issues/2063)) ([fdc89b7](https://github.com/sweetalert2/sweetalert2/commit/fdc89b701074df807e374de376a6ad24cfce9dc4))
|
83 |
+
|
84 |
+
## [10.3.1](https://github.com/sweetalert2/sweetalert2/compare/v10.3.0...v10.3.1) (2020-09-21)
|
85 |
+
|
86 |
+
|
87 |
+
### Bug Fixes
|
88 |
+
|
89 |
+
* add the opacity workaround and timeout for animating popup ([#2060](https://github.com/sweetalert2/sweetalert2/issues/2060)) ([4362d2b](https://github.com/sweetalert2/sweetalert2/commit/4362d2b21aeb3e409f0e2d9111dd98ad4b8c5ec6))
|
90 |
+
|
91 |
+
# [10.3.0](https://github.com/sweetalert2/sweetalert2/compare/v10.2.0...v10.3.0) (2020-09-20)
|
92 |
+
|
93 |
+
|
94 |
+
### Features
|
95 |
+
|
96 |
+
* consistent hook names: willOpen, didOpen, didRender, willClose, didClose, didDestroy ([#2057](https://github.com/sweetalert2/sweetalert2/issues/2057)) ([6434fb5](https://github.com/sweetalert2/sweetalert2/commit/6434fb56033b53b765c2ac9f3a768e326568b993))
|
97 |
+
|
98 |
+
# [10.2.0](https://github.com/sweetalert2/sweetalert2/compare/v10.1.0...v10.2.0) (2020-09-18)
|
99 |
+
|
100 |
+
|
101 |
+
### Features
|
102 |
+
|
103 |
+
* make background and iconColor params updatable ([#2054](https://github.com/sweetalert2/sweetalert2/issues/2054)) ([ed384ab](https://github.com/sweetalert2/sweetalert2/commit/ed384ab1ce9d70882b67b9475cf867397477e41e))
|
104 |
+
|
105 |
+
# [10.1.0](https://github.com/sweetalert2/sweetalert2/compare/v10.0.2...v10.1.0) (2020-09-17)
|
106 |
+
|
107 |
+
|
108 |
+
### Features
|
109 |
+
|
110 |
+
* add iconColor ([#2052](https://github.com/sweetalert2/sweetalert2/issues/2052)) ([81cb6f9](https://github.com/sweetalert2/sweetalert2/commit/81cb6f9f6d15af653346c7c72d9932ee5074b491))
|
111 |
+
|
112 |
+
## [10.0.2](https://github.com/sweetalert2/sweetalert2/compare/v10.0.1...v10.0.2) (2020-09-08)
|
113 |
+
|
114 |
+
|
115 |
+
### Bug Fixes
|
116 |
+
|
117 |
+
* padding on .swal2-actions for toasts ([e2a8f6f](https://github.com/sweetalert2/sweetalert2/commit/e2a8f6f9b895122ad0e1c848f64eefe0e45ef61b))
|
118 |
+
|
119 |
+
## [10.0.1](https://github.com/sweetalert2/sweetalert2/compare/v10.0.0...v10.0.1) (2020-09-08)
|
120 |
+
|
121 |
+
|
122 |
+
### Bug Fixes
|
123 |
+
|
124 |
+
* **scss:** set $swal2-<...>-button-order vars to null ([ef97ba1](https://github.com/sweetalert2/sweetalert2/commit/ef97ba11eac2119dcb0faa995e84151bf2d92100))
|
125 |
+
|
126 |
+
# [10.0.0](https://github.com/sweetalert2/sweetalert2/compare/v9.17.2...v10.0.0) (2020-09-07)
|
127 |
+
|
128 |
+
|
129 |
+
### Bug Fixes
|
130 |
+
|
131 |
+
* enable buttons in hideLoading ([#2048](https://github.com/sweetalert2/sweetalert2/issues/2048)) ([adcc392](https://github.com/sweetalert2/sweetalert2/commit/adcc3921d406a5970d4ab38ad8f40d2a7a8abf40))
|
132 |
+
|
133 |
+
|
134 |
+
### Features
|
135 |
+
|
136 |
+
* add loaderHtml ([#2049](https://github.com/sweetalert2/sweetalert2/issues/2049)) ([5c26b38](https://github.com/sweetalert2/sweetalert2/commit/5c26b3849d38a93b2f75f9b5e2be36f91b1c906e))
|
137 |
+
* **sass:** add $swal2-<...>-button-order vars ([8f0cf9e](https://github.com/sweetalert2/sweetalert2/commit/8f0cf9ecc6a906ad8582de1c53025ae552d95364))
|
138 |
+
* add the third DENY button 🎉 ([#2044](https://github.com/sweetalert2/sweetalert2/issues/2044)) ([1ad0f3c](https://github.com/sweetalert2/sweetalert2/commit/1ad0f3c9b75567c267943256b94b3f2308d3de0f))
|
139 |
+
|
140 |
+
|
141 |
+
* BREAKING CHANGE: Separate loader from the confirm button (#2045) ([e049195](https://github.com/sweetalert2/sweetalert2/commit/e049195510f96de39fa375efc9c1820669d89c79)), closes [#2045](https://github.com/sweetalert2/sweetalert2/issues/2045)
|
142 |
+
|
143 |
+
|
144 |
+
### BREAKING CHANGES
|
145 |
+
|
146 |
+
* Separate loader from the confirm button
|
147 |
+
|
148 |
+
## [9.17.2](https://github.com/sweetalert2/sweetalert2/compare/v9.17.1...v9.17.2) (2020-09-03)
|
149 |
+
|
150 |
+
|
151 |
+
### Bug Fixes
|
152 |
+
|
153 |
+
* **types:** add missing params to SweetAlertUpdatableParameters ([#2042](https://github.com/sweetalert2/sweetalert2/issues/2042)) ([7142fad](https://github.com/sweetalert2/sweetalert2/commit/7142fad6a032481415989436390a5ff2ab65c323))
|
154 |
+
|
155 |
+
## [9.17.1](https://github.com/sweetalert2/sweetalert2/compare/v9.17.0...v9.17.1) (2020-07-26)
|
156 |
+
|
157 |
+
|
158 |
+
### Bug Fixes
|
159 |
+
|
160 |
+
* typo content padding ([#2023](https://github.com/sweetalert2/sweetalert2/issues/2023)) ([e865aef](https://github.com/sweetalert2/sweetalert2/commit/e865aef94eff738c1be9d10b24e934f0f5b4feed))
|
161 |
+
|
162 |
+
# [9.17.0](https://github.com/sweetalert2/sweetalert2/compare/v9.16.0...v9.17.0) (2020-07-14)
|
163 |
+
|
164 |
+
|
165 |
+
### Features
|
166 |
+
|
167 |
+
* make close button updatable ([#2018](https://github.com/sweetalert2/sweetalert2/issues/2018)) ([911394f](https://github.com/sweetalert2/sweetalert2/commit/911394fb8d4ffe7c3771d254b83305309d6e346f))
|
168 |
+
|
169 |
+
# [9.16.0](https://github.com/sweetalert2/sweetalert2/compare/v9.15.3...v9.16.0) (2020-07-14)
|
170 |
+
|
171 |
+
|
172 |
+
### Features
|
173 |
+
|
174 |
+
* **styles:** add $swal2-header-padding variable ([#2001](https://github.com/sweetalert2/sweetalert2/issues/2001)) ([11338e6](https://github.com/sweetalert2/sweetalert2/commit/11338e690891ac7ec7bb702abbc9884190350a63))
|
175 |
+
|
176 |
+
## [9.15.3](https://github.com/sweetalert2/sweetalert2/compare/v9.15.2...v9.15.3) (2020-07-09)
|
177 |
+
|
178 |
+
|
179 |
+
### Bug Fixes
|
180 |
+
|
181 |
+
* url validator to support http://g.co ([#2013](https://github.com/sweetalert2/sweetalert2/issues/2013)) ([8ab6562](https://github.com/sweetalert2/sweetalert2/commit/8ab65628c0e6cd1227bce7d5898a5d77fc5e6f31))
|
182 |
+
|
183 |
+
## [9.15.2](https://github.com/sweetalert2/sweetalert2/compare/v9.15.1...v9.15.2) (2020-06-23)
|
184 |
+
|
185 |
+
|
186 |
+
### Bug Fixes
|
187 |
+
|
188 |
+
* do not fix scrollbar padding in case body has overflow-y: hidden ([#2006](https://github.com/sweetalert2/sweetalert2/issues/2006)) ([bc90d3c](https://github.com/sweetalert2/sweetalert2/commit/bc90d3ccdb589150eeb52d6b5ce254cb61d758bd))
|
189 |
+
|
190 |
+
## [9.15.1](https://github.com/sweetalert2/sweetalert2/compare/v9.15.0...v9.15.1) (2020-06-14)
|
191 |
+
|
192 |
+
|
193 |
+
### Bug Fixes
|
194 |
+
|
195 |
+
* do not use Array.find because it's not supported in IE11 ([20526ab](https://github.com/sweetalert2/sweetalert2/commit/20526ab6121087b9ec4d77b09b765f5bcecb6b58))
|
196 |
+
|
197 |
+
# [9.15.0](https://github.com/sweetalert2/sweetalert2/compare/v9.14.4...v9.15.0) (2020-06-13)
|
198 |
+
|
199 |
+
|
200 |
+
### Features
|
201 |
+
|
202 |
+
* add support for objects containing toPromise method ([#1998](https://github.com/sweetalert2/sweetalert2/issues/1998)) ([0d33441](https://github.com/sweetalert2/sweetalert2/commit/0d3344141c77f4b73d769cb3faa614c917e99f45))
|
203 |
+
|
204 |
+
## [9.14.4](https://github.com/sweetalert2/sweetalert2/compare/v9.14.3...v9.14.4) (2020-06-09)
|
205 |
+
|
206 |
+
|
207 |
+
### Bug Fixes
|
208 |
+
|
209 |
+
* **types:** minor changes ([#1997](https://github.com/sweetalert2/sweetalert2/issues/1997)) ([6ece962](https://github.com/sweetalert2/sweetalert2/commit/6ece962cc8cfd05554fe6a9f37625cbb50fd8b06))
|
210 |
+
|
211 |
+
## [9.14.3](https://github.com/sweetalert2/sweetalert2/compare/v9.14.2...v9.14.3) (2020-06-08)
|
212 |
+
|
213 |
+
|
214 |
+
### Bug Fixes
|
215 |
+
|
216 |
+
* **types:** remove the readonly modifier from 'SweetAlertOptions' ([#1996](https://github.com/sweetalert2/sweetalert2/issues/1996)) ([12fbea0](https://github.com/sweetalert2/sweetalert2/commit/12fbea0312ff3293b19d2e0e137e2aa53cd27e84))
|
217 |
+
|
218 |
+
## [9.14.2](https://github.com/sweetalert2/sweetalert2/compare/v9.14.1...v9.14.2) (2020-06-06)
|
219 |
+
|
220 |
+
|
221 |
+
### Bug Fixes
|
222 |
+
|
223 |
+
* add bottom padding to container for iOS Safari ([#1993](https://github.com/sweetalert2/sweetalert2/issues/1993)) ([1378a78](https://github.com/sweetalert2/sweetalert2/commit/1378a78a472805407ab711f473d6e683420dea34))
|
224 |
+
|
225 |
+
## [9.14.1](https://github.com/sweetalert2/sweetalert2/compare/v9.14.0...v9.14.1) (2020-06-06)
|
226 |
+
|
227 |
+
|
228 |
+
### Bug Fixes
|
229 |
+
|
230 |
+
* progressStepsDistance ([#1995](https://github.com/sweetalert2/sweetalert2/issues/1995)) ([1c61cfe](https://github.com/sweetalert2/sweetalert2/commit/1c61cfe38a7b3dedeacf87a7095c4ebdbe12b1ff))
|
231 |
+
|
232 |
+
# [9.14.0](https://github.com/sweetalert2/sweetalert2/compare/v9.13.4...v9.14.0) (2020-05-30)
|
233 |
+
|
234 |
+
|
235 |
+
### Features
|
236 |
+
|
237 |
+
* **input/select:** add support to <optgroup> in inputOptions ([#1985](https://github.com/sweetalert2/sweetalert2/issues/1985)) ([0659d0e](https://github.com/sweetalert2/sweetalert2/commit/0659d0eb59db5d78816134a2b1587e35cb87a9e3)), closes [#1589](https://github.com/sweetalert2/sweetalert2/issues/1589)
|
238 |
+
|
239 |
+
## [9.13.4](https://github.com/sweetalert2/sweetalert2/compare/v9.13.3...v9.13.4) (2020-05-29)
|
240 |
+
|
241 |
+
|
242 |
+
### Bug Fixes
|
243 |
+
|
244 |
+
* **types:** add missing prefix to UpdatableParameters ([#1984](https://github.com/sweetalert2/sweetalert2/issues/1984)) ([26d037e](https://github.com/sweetalert2/sweetalert2/commit/26d037ee8da074a6da3a8298a8ee0ec0d6c52c21))
|
245 |
+
|
246 |
+
## [9.13.3](https://github.com/sweetalert2/sweetalert2/compare/v9.13.2...v9.13.3) (2020-05-29)
|
247 |
+
|
248 |
+
|
249 |
+
### Bug Fixes
|
250 |
+
|
251 |
+
* **types:** improve type inference and correct some return types ([#1983](https://github.com/sweetalert2/sweetalert2/issues/1983)) ([d2e47cd](https://github.com/sweetalert2/sweetalert2/commit/d2e47cd72eec949b9ed1375984ae6d65cd8bf055))
|
252 |
+
|
253 |
+
## [9.13.2](https://github.com/sweetalert2/sweetalert2/compare/v9.13.1...v9.13.2) (2020-05-28)
|
254 |
+
|
255 |
+
|
256 |
+
### Bug Fixes
|
257 |
+
|
258 |
+
* **types:** support for generic types in interfaces and methods ([#1981](https://github.com/sweetalert2/sweetalert2/issues/1981)) ([146309c](https://github.com/sweetalert2/sweetalert2/commit/146309c2024d92ce04941bd30ae43fd54a401d86))
|
259 |
+
|
260 |
+
## [9.13.1](https://github.com/sweetalert2/sweetalert2/compare/v9.13.0...v9.13.1) (2020-05-21)
|
261 |
+
|
262 |
+
|
263 |
+
### Bug Fixes
|
264 |
+
|
265 |
+
* do not set style="display: flex" on image ([#1977](https://github.com/sweetalert2/sweetalert2/issues/1977)) ([8fc54e7](https://github.com/sweetalert2/sweetalert2/commit/8fc54e7ef163826a9b1a4fee31070e90eb9fdf4b))
|
266 |
+
|
267 |
+
# [9.13.0](https://github.com/sweetalert2/sweetalert2/compare/v9.12.0...v9.13.0) (2020-05-21)
|
268 |
+
|
269 |
+
|
270 |
+
### Features
|
271 |
+
|
272 |
+
* add isConfirmed and isDismissed to SweetAlertResult ([#1976](https://github.com/sweetalert2/sweetalert2/issues/1976)) ([8fc85f3](https://github.com/sweetalert2/sweetalert2/commit/8fc85f39c1f118a1da2ee26b8c83ba22e394ceba))
|
273 |
+
|
274 |
+
# [9.12.0](https://github.com/sweetalert2/sweetalert2/compare/v9.11.0...v9.12.0) (2020-05-20)
|
275 |
+
|
276 |
+
|
277 |
+
### Features
|
278 |
+
|
279 |
+
* make onClose onAfterClose onDestroy updatable ([#1974](https://github.com/sweetalert2/sweetalert2/issues/1974)) ([91700e7](https://github.com/sweetalert2/sweetalert2/commit/91700e74dbea701abf48c7245d5eee862f3be44c))
|
280 |
+
|
281 |
+
# [9.11.0](https://github.com/sweetalert2/sweetalert2/compare/v9.10.13...v9.11.0) (2020-05-19)
|
282 |
+
|
283 |
+
|
284 |
+
### Features
|
285 |
+
|
286 |
+
* make footer updatable ([#1969](https://github.com/sweetalert2/sweetalert2/issues/1969)) ([acd2b8a](https://github.com/sweetalert2/sweetalert2/commit/acd2b8a06cec766ea5b26cca671da0246870c122))
|
287 |
+
|
288 |
+
## [9.10.13](https://github.com/sweetalert2/sweetalert2/compare/v9.10.12...v9.10.13) (2020-05-11)
|
289 |
+
|
290 |
+
|
291 |
+
### Bug Fixes
|
292 |
+
|
293 |
+
* loader color on update ([#1958](https://github.com/sweetalert2/sweetalert2/issues/1958)) ([a2c130d](https://github.com/sweetalert2/sweetalert2/commit/a2c130df2d5cdc9e651ff586fbb2898a7b5d2540))
|
294 |
+
|
295 |
+
## [9.10.12](https://github.com/sweetalert2/sweetalert2/compare/v9.10.11...v9.10.12) (2020-04-14)
|
296 |
+
|
297 |
+
|
298 |
+
### Bug Fixes
|
299 |
+
|
300 |
+
* perform container.scrollTop = 0 asyncronously ([#1947](https://github.com/sweetalert2/sweetalert2/issues/1947)) ([5674005](https://github.com/sweetalert2/sweetalert2/commit/56740050414378e42ef377b1db565484d942f501))
|
301 |
+
|
302 |
+
## [9.10.11](https://github.com/sweetalert2/sweetalert2/compare/v9.10.10...v9.10.11) (2020-04-13)
|
303 |
+
|
304 |
+
|
305 |
+
### Bug Fixes
|
306 |
+
|
307 |
+
* scrollable content in iOS ([#1945](https://github.com/sweetalert2/sweetalert2/issues/1945)) ([87d9884](https://github.com/sweetalert2/sweetalert2/commit/87d9884908de302541fe0f3a19ee5099f2a1c6b5))
|
308 |
+
|
309 |
+
## [9.10.10](https://github.com/sweetalert2/sweetalert2/compare/v9.10.9...v9.10.10) (2020-04-09)
|
310 |
+
|
311 |
+
|
312 |
+
### Bug Fixes
|
313 |
+
|
314 |
+
* loader, color: transparent ([65642fc](https://github.com/sweetalert2/sweetalert2/commit/65642fc8837ab27e350645c767f5edfcd21d11cb)), closes [#1941](https://github.com/sweetalert2/sweetalert2/issues/1941)
|
315 |
+
|
316 |
+
## [9.10.9](https://github.com/sweetalert2/sweetalert2/compare/v9.10.8...v9.10.9) (2020-04-02)
|
317 |
+
|
318 |
+
|
319 |
+
### Bug Fixes
|
320 |
+
|
321 |
+
* getQueueStep() when popup is closed ([#1936](https://github.com/sweetalert2/sweetalert2/issues/1936)) ([ca3f3f4](https://github.com/sweetalert2/sweetalert2/commit/ca3f3f48da15482d9701465924494b699a80f207))
|
322 |
+
|
323 |
+
## [9.10.8](https://github.com/sweetalert2/sweetalert2/compare/v9.10.7...v9.10.8) (2020-03-31)
|
324 |
+
|
325 |
+
|
326 |
+
### Bug Fixes
|
327 |
+
|
328 |
+
* take <head> into account when parsing html with DOMParser ([#1934](https://github.com/sweetalert2/sweetalert2/issues/1934)) ([92eec64](https://github.com/sweetalert2/sweetalert2/commit/92eec64d5f81e0a67fe7865d03ed3497fe8275f4))
|
329 |
+
|
330 |
+
## [9.10.7](https://github.com/sweetalert2/sweetalert2/compare/v9.10.6...v9.10.7) (2020-03-28)
|
331 |
+
|
332 |
+
|
333 |
+
### Bug Fixes
|
334 |
+
|
335 |
+
* use DOMParset only if html is not empty ([#1931](https://github.com/sweetalert2/sweetalert2/issues/1931)) ([54463ec](https://github.com/sweetalert2/sweetalert2/commit/54463ec87637581a65147967bb4d55f1e123c9f6)), closes [/github.com/sweetalert2/sweetalert2/pull/1930#issuecomment-605412269](https://github.com//github.com/sweetalert2/sweetalert2/pull/1930/issues/issuecomment-605412269)
|
336 |
+
* use DOMParset to secure setting innerHTML ([#1930](https://github.com/sweetalert2/sweetalert2/issues/1930)) ([18c5a63](https://github.com/sweetalert2/sweetalert2/commit/18c5a63fe585053f31c85ed2fb17945aea3b334b))
|
337 |
+
|
338 |
+
## [9.10.6](https://github.com/sweetalert2/sweetalert2/compare/v9.10.5...v9.10.6) (2020-03-24)
|
339 |
+
|
340 |
+
|
341 |
+
### Bug Fixes
|
342 |
+
|
343 |
+
* revert "fix: use global to detect nodejs env ([#1923](https://github.com/sweetalert2/sweetalert2/issues/1923))" ([bce912d](https://github.com/sweetalert2/sweetalert2/commit/bce912d1bbd363da0734536fc1d672f08ed62983)), closes [#1927](https://github.com/sweetalert2/sweetalert2/issues/1927)
|
344 |
+
|
345 |
+
## [9.10.5](https://github.com/sweetalert2/sweetalert2/compare/v9.10.4...v9.10.5) (2020-03-22)
|
346 |
+
|
347 |
+
|
348 |
+
### Bug Fixes
|
349 |
+
|
350 |
+
* disable animation more convinient ([#1925](https://github.com/sweetalert2/sweetalert2/issues/1925)) ([01e1fb1](https://github.com/sweetalert2/sweetalert2/commit/01e1fb11160cf26bd3fed835584703aeff7e4fd5))
|
351 |
+
|
352 |
+
## [9.10.4](https://github.com/sweetalert2/sweetalert2/compare/v9.10.3...v9.10.4) (2020-03-21)
|
353 |
+
|
354 |
+
|
355 |
+
### Bug Fixes
|
356 |
+
|
357 |
+
* **a11y:** fix missing outline in Chrome ([7371fea](https://github.com/sweetalert2/sweetalert2/commit/7371feab405cbdeb1b5320497a928c42533eef1a))
|
358 |
+
|
359 |
+
## [9.10.3](https://github.com/sweetalert2/sweetalert2/compare/v9.10.2...v9.10.3) (2020-03-19)
|
360 |
+
|
361 |
+
|
362 |
+
### Bug Fixes
|
363 |
+
|
364 |
+
* use global to detect nodejs env ([#1923](https://github.com/sweetalert2/sweetalert2/issues/1923)) ([058dee1](https://github.com/sweetalert2/sweetalert2/commit/058dee1a7c1bd220319f4ff7da206aded7e5259a))
|
365 |
+
|
366 |
+
## [9.10.2](https://github.com/sweetalert2/sweetalert2/compare/v9.10.1...v9.10.2) (2020-03-16)
|
367 |
+
|
368 |
+
|
369 |
+
### Bug Fixes
|
370 |
+
|
371 |
+
* add timer-progress-bar-container ([#1919](https://github.com/sweetalert2/sweetalert2/issues/1919)) ([c7c469e](https://github.com/sweetalert2/sweetalert2/commit/c7c469eb7e4bfbe88d6ba857668a2f04938687ad))
|
372 |
+
|
373 |
+
## [9.10.1](https://github.com/sweetalert2/sweetalert2/compare/v9.10.0...v9.10.1) (2020-03-15)
|
374 |
+
|
375 |
+
|
376 |
+
### Bug Fixes
|
377 |
+
|
378 |
+
* setup timer after the popup is opened ([#1917](https://github.com/sweetalert2/sweetalert2/issues/1917)) ([7e24824](https://github.com/sweetalert2/sweetalert2/commit/7e248246535f9f0bc7333dcf30ebdb9c15ad5eb2))
|
379 |
+
* **styles:** add border-bottom-radius to timer-progress-bar ([32ff38f](https://github.com/sweetalert2/sweetalert2/commit/32ff38fe26cbc1cea79e9dad36d4188592afb46f))
|
380 |
+
|
381 |
+
# [9.10.0](https://github.com/sweetalert2/sweetalert2/compare/v9.9.0...v9.10.0) (2020-03-09)
|
382 |
+
|
383 |
+
|
384 |
+
### Features
|
385 |
+
|
386 |
+
* make hideClass updatable ([#1912](https://github.com/sweetalert2/sweetalert2/issues/1912)) ([06fa983](https://github.com/sweetalert2/sweetalert2/commit/06fa9835766d45beae380b9d8026b46d6357d011))
|
387 |
+
|
388 |
+
# [9.9.0](https://github.com/sweetalert2/sweetalert2/compare/v9.8.2...v9.9.0) (2020-03-07)
|
389 |
+
|
390 |
+
|
391 |
+
### Features
|
392 |
+
|
393 |
+
* **scss:** add $swal2-close-button-align-items and $swal2-close-button-justify-content vars ([fdf12c1](https://github.com/sweetalert2/sweetalert2/commit/fdf12c13373c31ee2463ea05eff85a97d71d1be1))
|
394 |
+
|
395 |
+
## [9.8.2](https://github.com/sweetalert2/sweetalert2/compare/v9.8.1...v9.8.2) (2020-02-22)
|
396 |
+
|
397 |
+
|
398 |
+
### Bug Fixes
|
399 |
+
|
400 |
+
* do not animate backdrop for queues ([#1900](https://github.com/sweetalert2/sweetalert2/issues/1900)) ([ae15307](https://github.com/sweetalert2/sweetalert2/commit/ae15307f1a36d5d2fc7387ed20add63b1af74487))
|
401 |
+
|
402 |
+
## [9.8.1](https://github.com/sweetalert2/sweetalert2/compare/v9.8.0...v9.8.1) (2020-02-21)
|
403 |
+
|
404 |
+
|
405 |
+
### Bug Fixes
|
406 |
+
|
407 |
+
* do not start animating timerProgressBar if timer is stopped ([#1898](https://github.com/sweetalert2/sweetalert2/issues/1898)) ([c4546bc](https://github.com/sweetalert2/sweetalert2/commit/c4546bc482b7fb295905a7a498a096c70a152cf7))
|
408 |
+
|
409 |
+
# [9.8.0](https://github.com/sweetalert2/sweetalert2/compare/v9.7.2...v9.8.0) (2020-02-21)
|
410 |
+
|
411 |
+
|
412 |
+
### Features
|
413 |
+
|
414 |
+
* **api:** expose the getTimerProgressBar method ([#1897](https://github.com/sweetalert2/sweetalert2/issues/1897)) ([e48ab48](https://github.com/sweetalert2/sweetalert2/commit/e48ab4840e18eb7d0b87c691ad18403ea39e19e7))
|
415 |
+
|
416 |
+
## [9.7.2](https://github.com/sweetalert2/sweetalert2/compare/v9.7.1...v9.7.2) (2020-02-07)
|
417 |
+
|
418 |
+
|
419 |
+
### Bug Fixes
|
420 |
+
|
421 |
+
* **types:** add getHeader() ([#1883](https://github.com/sweetalert2/sweetalert2/issues/1883)) ([f7d467a](https://github.com/sweetalert2/sweetalert2/commit/f7d467a8ff634e8d4e9537c936a3b2d41956e04d))
|
422 |
+
|
423 |
+
## [9.7.1](https://github.com/sweetalert2/sweetalert2/compare/v9.7.0...v9.7.1) (2020-01-28)
|
424 |
+
|
425 |
+
|
426 |
+
### Bug Fixes
|
427 |
+
|
428 |
+
* polish success icon for perfect rendering in Safari (fix [#1876](https://github.com/sweetalert2/sweetalert2/issues/1876)) ([fb9fe38](https://github.com/sweetalert2/sweetalert2/commit/fb9fe383d6247dda27d8301772c3e295c3fb223d))
|
429 |
+
|
430 |
+
# [9.7.0](https://github.com/sweetalert2/sweetalert2/compare/v9.6.1...v9.7.0) (2020-01-22)
|
431 |
+
|
432 |
+
|
433 |
+
### Features
|
434 |
+
|
435 |
+
* add onDestroy callback ([#1872](https://github.com/sweetalert2/sweetalert2/issues/1872)) ([97de150](https://github.com/sweetalert2/sweetalert2/commit/97de150e78edcb38a9261b8ec7890feebc8aa487))
|
436 |
+
|
437 |
+
## [9.6.1](https://github.com/sweetalert2/sweetalert2/compare/v9.6.0...v9.6.1) (2020-01-20)
|
438 |
+
|
439 |
+
|
440 |
+
### Bug Fixes
|
441 |
+
|
442 |
+
* handle objects better ([#1873](https://github.com/sweetalert2/sweetalert2/issues/1873)) ([5385db8](https://github.com/sweetalert2/sweetalert2/commit/5385db8fade488648a51b64735ef6670a92949d4))
|
443 |
+
|
444 |
+
# [9.6.0](https://github.com/sweetalert2/sweetalert2/compare/v9.5.4...v9.6.0) (2020-01-15)
|
445 |
+
|
446 |
+
|
447 |
+
### Features
|
448 |
+
|
449 |
+
* make allowOutsideClick and allowEscapeKey updatable ([#1867](https://github.com/sweetalert2/sweetalert2/issues/1867)) ([810d291](https://github.com/sweetalert2/sweetalert2/commit/810d2917724e85c0a528816fc39064bccd046bb0))
|
450 |
+
|
451 |
+
## [9.5.4](https://github.com/sweetalert2/sweetalert2/compare/v9.5.3...v9.5.4) (2019-12-27)
|
452 |
+
|
453 |
+
|
454 |
+
### Bug Fixes
|
455 |
+
|
456 |
+
* swalOpenAnimationFinished ([#1859](https://github.com/sweetalert2/sweetalert2/issues/1859)) ([b525149](https://github.com/sweetalert2/sweetalert2/commit/b5251491a5b6979eaf6117d9c3294b639649e13e))
|
457 |
+
|
458 |
+
## [9.5.3](https://github.com/sweetalert2/sweetalert2/compare/v9.5.2...v9.5.3) (2019-12-10)
|
459 |
+
|
460 |
+
|
461 |
+
### Bug Fixes
|
462 |
+
|
463 |
+
* fire swalOpenAnimationFinished() only when popup's animation is finished ([#1845](https://github.com/sweetalert2/sweetalert2/issues/1845)) ([ebcb2b8](https://github.com/sweetalert2/sweetalert2/commit/ebcb2b8831b8f3488a6071c0fc21111c764f8efe))
|
464 |
+
|
465 |
+
## [9.5.2](https://github.com/sweetalert2/sweetalert2/compare/v9.5.1...v9.5.2) (2019-12-09)
|
466 |
+
|
467 |
+
|
468 |
+
### Bug Fixes
|
469 |
+
|
470 |
+
* do not re-add popup's showClass ([7922360](https://github.com/sweetalert2/sweetalert2/commit/7922360163d76ebff7529e244be874493afccc9c))
|
471 |
+
|
472 |
+
## [9.5.1](https://github.com/sweetalert2/sweetalert2/compare/v9.5.0...v9.5.1) (2019-12-09)
|
473 |
+
|
474 |
+
|
475 |
+
### Bug Fixes
|
476 |
+
|
477 |
+
* make icon classes op popup different from classes on icons ([#1844](https://github.com/sweetalert2/sweetalert2/issues/1844)) ([1ae23fc](https://github.com/sweetalert2/sweetalert2/commit/1ae23fca7f3791ecbba44094721b08ebd7ef604f))
|
478 |
+
|
479 |
+
# [9.5.0](https://github.com/sweetalert2/sweetalert2/compare/v9.4.3...v9.5.0) (2019-12-09)
|
480 |
+
|
481 |
+
|
482 |
+
### Features
|
483 |
+
|
484 |
+
* add icon class to popup ([#1843](https://github.com/sweetalert2/sweetalert2/issues/1843)) ([1dd00af](https://github.com/sweetalert2/sweetalert2/commit/1dd00af941e4f909cb2a9236db94747c1c6c3e92))
|
485 |
+
|
486 |
+
## [9.4.3](https://github.com/sweetalert2/sweetalert2/compare/v9.4.2...v9.4.3) (2019-12-03)
|
487 |
+
|
488 |
+
|
489 |
+
### Bug Fixes
|
490 |
+
|
491 |
+
* **types:** export input, grow and position options types ([#1837](https://github.com/sweetalert2/sweetalert2/issues/1837)) ([5e1cf62](https://github.com/sweetalert2/sweetalert2/commit/5e1cf62d404fc4d0da621e668c7e9d390c62c74a))
|
492 |
+
|
493 |
+
## [9.4.2](https://github.com/sweetalert2/sweetalert2/compare/v9.4.1...v9.4.2) (2019-12-03)
|
494 |
+
|
495 |
+
|
496 |
+
### Bug Fixes
|
497 |
+
|
498 |
+
* progress steps and getQueueStep() API method ([#1836](https://github.com/sweetalert2/sweetalert2/issues/1836)) ([0f9fdde](https://github.com/sweetalert2/sweetalert2/commit/0f9fdde391fe677b136195ecc80b1d9c8b887d8c))
|
499 |
+
|
500 |
+
## [9.4.1](https://github.com/sweetalert2/sweetalert2/compare/v9.4.0...v9.4.1) (2019-12-01)
|
501 |
+
|
502 |
+
|
503 |
+
### Bug Fixes
|
504 |
+
|
505 |
+
* default values null -> undefined ([#1834](https://github.com/sweetalert2/sweetalert2/issues/1834)) ([fef4cf5](https://github.com/sweetalert2/sweetalert2/commit/fef4cf53b8a69565fdf00877401dd33ad6d4bf2c))
|
506 |
+
|
507 |
+
# [9.4.0](https://github.com/sweetalert2/sweetalert2/compare/v9.3.17...v9.4.0) (2019-11-23)
|
508 |
+
|
509 |
+
|
510 |
+
### Features
|
511 |
+
|
512 |
+
* add getHtmlContainer() getter ([#1828](https://github.com/sweetalert2/sweetalert2/issues/1828)) ([6908c3b](https://github.com/sweetalert2/sweetalert2/commit/6908c3b722f33a3595216fb9dde6ab374a688206))
|
513 |
+
|
514 |
+
## [9.3.17](https://github.com/sweetalert2/sweetalert2/compare/v9.3.16...v9.3.17) (2019-11-21)
|
515 |
+
|
516 |
+
|
517 |
+
### Bug Fixes
|
518 |
+
|
519 |
+
* do not fail when hideLoading() without popup ([2ada37c](https://github.com/sweetalert2/sweetalert2/commit/2ada37c1b5a0a9d05a2902ba82fd071002d5dd09))
|
520 |
+
|
521 |
+
## [9.3.16](https://github.com/sweetalert2/sweetalert2/compare/v9.3.15...v9.3.16) (2019-11-19)
|
522 |
+
|
523 |
+
|
524 |
+
### Bug Fixes
|
525 |
+
|
526 |
+
* animate popup right after showing it ([#1826](https://github.com/sweetalert2/sweetalert2/issues/1826)) ([cf13990](https://github.com/sweetalert2/sweetalert2/commit/cf139905449e10275d137fa7b027cda95f8eec45))
|
527 |
+
|
528 |
+
## [9.3.15](https://github.com/sweetalert2/sweetalert2/compare/v9.3.14...v9.3.15) (2019-11-19)
|
529 |
+
|
530 |
+
|
531 |
+
### Bug Fixes
|
532 |
+
|
533 |
+
* hasClass multiple classes support for IE11 ([bd4eab5](https://github.com/sweetalert2/sweetalert2/commit/bd4eab56d94e8f01615157c12ffcdd529698ff03))
|
534 |
+
* revert "fix: add showClass asyncronously to popup (IE11)" ([6cb66cc](https://github.com/sweetalert2/sweetalert2/commit/6cb66ccbe1a246877a78436dd201afbae60154f1))
|
535 |
+
|
536 |
+
## [9.3.14](https://github.com/sweetalert2/sweetalert2/compare/v9.3.13...v9.3.14) (2019-11-19)
|
537 |
+
|
538 |
+
|
539 |
+
### Bug Fixes
|
540 |
+
|
541 |
+
* measure scrollbar ([83bcdf3](https://github.com/sweetalert2/sweetalert2/commit/83bcdf33acd2db15168d18743d71997aea76d6dd))
|
542 |
+
|
543 |
+
## [9.3.13](https://github.com/sweetalert2/sweetalert2/compare/v9.3.12...v9.3.13) (2019-11-18)
|
544 |
+
|
545 |
+
|
546 |
+
### Bug Fixes
|
547 |
+
|
548 |
+
* add showClass asyncronously to popup (IE11) ([8aed623](https://github.com/sweetalert2/sweetalert2/commit/8aed62350e032393214651f45c085dbf5d798140))
|
549 |
+
|
550 |
+
## [9.3.12](https://github.com/sweetalert2/sweetalert2/compare/v9.3.11...v9.3.12) (2019-11-18)
|
551 |
+
|
552 |
+
|
553 |
+
### Bug Fixes
|
554 |
+
|
555 |
+
* **types:** simplify Swal.fire(title, message, icon) back ([#1823](https://github.com/sweetalert2/sweetalert2/issues/1823)) ([0cc40ff](https://github.com/sweetalert2/sweetalert2/commit/0cc40fff1956979869fee58261255e9d94fb1688))
|
556 |
+
|
557 |
+
## [9.3.11](https://github.com/sweetalert2/sweetalert2/compare/v9.3.10...v9.3.11) (2019-11-15)
|
558 |
+
|
559 |
+
|
560 |
+
### Bug Fixes
|
561 |
+
|
562 |
+
* use $swal2-background in $swal2-button-focus-box-shadow ([bef3d86](https://github.com/sweetalert2/sweetalert2/commit/bef3d86ce450d4380d567224e74c65fb1363dd96))
|
563 |
+
* use $swal2-background in $swal2-toast-button-focus-box-shadow ([2da88c2](https://github.com/sweetalert2/sweetalert2/commit/2da88c29cf53405be0d4f6287b345e975d11cb79))
|
564 |
+
|
565 |
+
## [9.3.10](https://github.com/sweetalert2/sweetalert2/compare/v9.3.9...v9.3.10) (2019-11-15)
|
566 |
+
|
567 |
+
|
568 |
+
### Bug Fixes
|
569 |
+
|
570 |
+
* **ci:** fix semantic-release step ([fcf57b9](https://github.com/sweetalert2/sweetalert2/commit/fcf57b9b82d9a7cd873d9a6a2fce2283ea3223c8))
|
571 |
+
* **ci:** use yarn for bundlewatch ([effa758](https://github.com/sweetalert2/sweetalert2/commit/effa758a1e88ee829af2559709cb90c4ea4ab17e))
|
572 |
+
|
573 |
+
## [9.3.9](https://github.com/sweetalert2/sweetalert2/compare/v9.3.8...v9.3.9) (2019-11-15)
|
574 |
+
|
575 |
+
|
576 |
+
### Bug Fixes
|
577 |
+
|
578 |
+
* add showClass.popup in renderPopup() ([#1820](https://github.com/sweetalert2/sweetalert2/issues/1820)) ([38b5965](https://github.com/sweetalert2/sweetalert2/commit/38b596574590a36c859842fbba47a904d90cf91c))
|
579 |
+
|
580 |
+
## [9.3.8](https://github.com/sweetalert2/sweetalert2/compare/v9.3.7...v9.3.8) (2019-11-15)
|
581 |
+
|
582 |
+
|
583 |
+
### Bug Fixes
|
584 |
+
|
585 |
+
* updatable params ([#1819](https://github.com/sweetalert2/sweetalert2/issues/1819)) ([42736bc](https://github.com/sweetalert2/sweetalert2/commit/42736bce35c993a3c6afab52ff6f9a6ff6269121))
|
586 |
+
|
587 |
+
## [9.3.7](https://github.com/sweetalert2/sweetalert2/compare/v9.3.6...v9.3.7) (2019-11-15)
|
588 |
+
|
589 |
+
|
590 |
+
### Bug Fixes
|
591 |
+
|
592 |
+
* add $swal2-toast-background ([8ac68f1](https://github.com/sweetalert2/sweetalert2/commit/8ac68f1eaac2de37023141880fb641d7c62ef688))
|
593 |
+
* use $swal2-background for range, radio, checkbox background ([6af549b](https://github.com/sweetalert2/sweetalert2/commit/6af549b8c4d00e30b4f857ddc493170fe2ea6f94))
|
594 |
+
|
595 |
+
## [9.3.6](https://github.com/sweetalert2/sweetalert2/compare/v9.3.5...v9.3.6) (2019-11-14)
|
596 |
+
|
597 |
+
|
598 |
+
### Bug Fixes
|
599 |
+
|
600 |
+
* add $swal2-button-focus-box-shadow ([#1811](https://github.com/sweetalert2/sweetalert2/issues/1811)) ([2a49074](https://github.com/sweetalert2/sweetalert2/commit/2a4907417b643d55d47e81dcc63c4042453c5c1b))
|
601 |
+
|
602 |
+
## [9.3.5](https://github.com/sweetalert2/sweetalert2/compare/v9.3.4...v9.3.5) (2019-11-13)
|
603 |
+
|
604 |
+
|
605 |
+
### Bug Fixes
|
606 |
+
|
607 |
+
* use inline-block for confirm button in showLoading() ([#1810](https://github.com/sweetalert2/sweetalert2/issues/1810)) ([c876d13](https://github.com/sweetalert2/sweetalert2/commit/c876d133a35f71feb1c73a09b777d9534e48bf8b))
|
608 |
+
|
609 |
+
## [9.3.4](https://github.com/sweetalert2/sweetalert2/compare/v9.3.3...v9.3.4) (2019-11-12)
|
610 |
+
|
611 |
+
|
612 |
+
### Bug Fixes
|
613 |
+
|
614 |
+
* "funding" field can't be a string even though docs says so ([604f3d2](https://github.com/sweetalert2/sweetalert2/commit/604f3d27e86c7a7d9fd154f6750c3a90c6251579))
|
615 |
+
|
616 |
+
## [9.3.3](https://github.com/sweetalert2/sweetalert2/compare/v9.3.2...v9.3.3) (2019-11-12)
|
617 |
+
|
618 |
+
|
619 |
+
### Bug Fixes
|
620 |
+
|
621 |
+
* add "funding" field to package.json ([04236fb](https://github.com/sweetalert2/sweetalert2/commit/04236fb072adcfe149dadb989772461814e374e3))
|
622 |
+
|
623 |
+
## [9.3.2](https://github.com/sweetalert2/sweetalert2/compare/v9.3.1...v9.3.2) (2019-11-12)
|
624 |
+
|
625 |
+
|
626 |
+
### Bug Fixes
|
627 |
+
|
628 |
+
* reset timer progress bar on Swal.increaseTimer() ([#1807](https://github.com/sweetalert2/sweetalert2/issues/1807)) ([604feb8](https://github.com/sweetalert2/sweetalert2/commit/604feb86b9b9f2370ac85d5f8313b6d33b6356df))
|
629 |
+
|
630 |
+
## [9.3.1](https://github.com/sweetalert2/sweetalert2/compare/v9.3.0...v9.3.1) (2019-11-11)
|
631 |
+
|
632 |
+
|
633 |
+
### Bug Fixes
|
634 |
+
|
635 |
+
* stop and resume timer progress bar ([#1806](https://github.com/sweetalert2/sweetalert2/issues/1806)) ([a8cf8c5](https://github.com/sweetalert2/sweetalert2/commit/a8cf8c51cbbe93344927619b836c208fca4fe158))
|
636 |
+
|
637 |
+
# [9.3.0](https://github.com/sweetalert2/sweetalert2/compare/v9.2.0...v9.3.0) (2019-11-10)
|
638 |
+
|
639 |
+
|
640 |
+
### Features
|
641 |
+
|
642 |
+
* add timerProgressBar ([#1805](https://github.com/sweetalert2/sweetalert2/issues/1805)) ([d49cbe5](https://github.com/sweetalert2/sweetalert2/commit/d49cbe522242c6445e7ed731ad2c2d70980e292c))
|
643 |
+
|
644 |
+
# [9.2.0](https://github.com/sweetalert2/sweetalert2/compare/v9.1.6...v9.2.0) (2019-11-09)
|
645 |
+
|
646 |
+
|
647 |
+
### Features
|
648 |
+
|
649 |
+
* support HTMLElement and JQuery in shorthand ([#1804](https://github.com/sweetalert2/sweetalert2/issues/1804)) ([9318f79](https://github.com/sweetalert2/sweetalert2/commit/9318f79174a3c26e44c15ddb051c3ec1e2367b0b))
|
650 |
+
|
651 |
+
## [9.1.6](https://github.com/sweetalert2/sweetalert2/compare/v9.1.5...v9.1.6) (2019-11-08)
|
652 |
+
|
653 |
+
|
654 |
+
### Bug Fixes
|
655 |
+
|
656 |
+
* **types:** add missing version type ([10c4136](https://github.com/sweetalert2/sweetalert2/commit/10c41361c53392dfee683980b213cca6eaf49d89))
|
657 |
+
|
658 |
+
## [9.1.5](https://github.com/sweetalert2/sweetalert2/compare/v9.1.4...v9.1.5) (2019-11-05)
|
659 |
+
|
660 |
+
|
661 |
+
### Bug Fixes
|
662 |
+
|
663 |
+
* .swal2-icon-content for toasts ([941b900](https://github.com/sweetalert2/sweetalert2/commit/941b900cfdecd5ad12c14d21f6e69757b84104f4))
|
664 |
+
|
665 |
+
## [9.1.4](https://github.com/sweetalert2/sweetalert2/compare/v9.1.3...v9.1.4) (2019-11-05)
|
666 |
+
|
667 |
+
|
668 |
+
### Bug Fixes
|
669 |
+
|
670 |
+
* toast success icon (fixes [#1797](https://github.com/sweetalert2/sweetalert2/issues/1797)) ([9e15867](https://github.com/sweetalert2/sweetalert2/commit/9e1586737d6bd227c7a30d92999942d32caab87e))
|
671 |
+
|
672 |
+
## [9.1.3](https://github.com/sweetalert2/sweetalert2/compare/v9.1.2...v9.1.3) (2019-11-05)
|
673 |
+
|
674 |
+
|
675 |
+
### Bug Fixes
|
676 |
+
|
677 |
+
* remove default backdrop background ([5027076](https://github.com/sweetalert2/sweetalert2/commit/50270767cd6b99478bd33c9ba5a9d6244b3a34a5))
|
678 |
+
|
679 |
+
## [9.1.2](https://github.com/sweetalert2/sweetalert2/compare/v9.1.1...v9.1.2) (2019-11-05)
|
680 |
+
|
681 |
+
|
682 |
+
### Bug Fixes
|
683 |
+
|
684 |
+
* default backdrop background ([501cab3](https://github.com/sweetalert2/sweetalert2/commit/501cab3f4290aea13d9c21e0d2dc9cdbe96dd782))
|
685 |
+
|
686 |
+
## [9.1.1](https://github.com/sweetalert2/sweetalert2/compare/v9.1.0...v9.1.1) (2019-11-05)
|
687 |
+
|
688 |
+
|
689 |
+
### Bug Fixes
|
690 |
+
|
691 |
+
* apply $swal2-backdrop to background instead of background-color ([8c27e1a](https://github.com/sweetalert2/sweetalert2/commit/8c27e1ad31b4d0d5cc02e1bc9c7c57498d60c9e2))
|
692 |
+
|
693 |
+
# [9.1.0](https://github.com/sweetalert2/sweetalert2/compare/v9.0.2...v9.1.0) (2019-11-05)
|
694 |
+
|
695 |
+
|
696 |
+
### Features
|
697 |
+
|
698 |
+
* **scss:** add $swal2-icon-animations ([897b20b](https://github.com/sweetalert2/sweetalert2/commit/897b20b2d1a3b5d586e70188da17be0f8af8f0f1))
|
699 |
+
|
700 |
+
## [9.0.2](https://github.com/sweetalert2/sweetalert2/compare/v9.0.1...v9.0.2) (2019-11-04)
|
701 |
+
|
702 |
+
|
703 |
+
### Bug Fixes
|
704 |
+
|
705 |
+
* **types:** add missing iconHtml ([6f7f316](https://github.com/sweetalert2/sweetalert2/commit/6f7f3162c0ea2c6f6f5b8b8f81d9c002f02e16db))
|
706 |
+
|
707 |
+
## [9.0.1](https://github.com/sweetalert2/sweetalert2/compare/v9.0.0...v9.0.1) (2019-11-04)
|
708 |
+
|
709 |
+
|
710 |
+
### Bug Fixes
|
711 |
+
|
712 |
+
* icon when passing it as third string argument ([6ad3aa5](https://github.com/sweetalert2/sweetalert2/commit/6ad3aa5354eb5e91afc2268f035267bb8b6b6dd6))
|
713 |
+
|
714 |
+
# [9.0.0](https://github.com/sweetalert2/sweetalert2/compare/v8.19.0...v9.0.0) (2019-11-04)
|
715 |
+
|
716 |
+
|
717 |
+
* BREAKING CHANGE: remove .swal2-arabic-question-mark, add iconHtml param ([f73dcba](https://github.com/sweetalert2/sweetalert2/commit/f73dcba787939877579fed7a1221d44b310079bc)), closes [#1672](https://github.com/sweetalert2/sweetalert2/issues/1672) [#1532](https://github.com/sweetalert2/sweetalert2/issues/1532)
|
718 |
+
* BREAKING CHANGE: rename 'type' param to 'icon' ([fcaabee](https://github.com/sweetalert2/sweetalert2/commit/fcaabee80993bdf34d4bcc85faee0eb2b132947c))
|
719 |
+
* BREAKING CHANGE: Stop disabling the Cancel button when in showLoading() ([3668055](https://github.com/sweetalert2/sweetalert2/commit/3668055a128526ca0ae1bf168c7206aedfe2985b)), closes [#1501](https://github.com/sweetalert2/sweetalert2/issues/1501)
|
720 |
+
* BREAKING CHANGE: remove setProgressSteps(), showProgressSteps(), hideProgressSteps() ([53d9106](https://github.com/sweetalert2/sweetalert2/commit/53d91066647d13ff71634d976c904046ac22f8cc)), closes [#1507](https://github.com/sweetalert2/sweetalert2/issues/1507) [#1673](https://github.com/sweetalert2/sweetalert2/issues/1673)
|
721 |
+
* BREAKING CHANGE: remove disableConfirmButton() and enableConfirmButton() ([8ebbcaf](https://github.com/sweetalert2/sweetalert2/commit/8ebbcaff4024416cbe5553e1c3f4b0811bafe050))
|
722 |
+
* BREAKING CHANGE: remove inputClass ([ee7e392](https://github.com/sweetalert2/sweetalert2/commit/ee7e392998c62e04d7256be9a240c6d509373a0e))
|
723 |
+
* BREAKING CHANGE: remove imageClass ([2594115](https://github.com/sweetalert2/sweetalert2/commit/2594115bf7e0940eaf9f3d74f195dbff9d5c2fce))
|
724 |
+
* BREAKING CHANGE: remove confirmButtonClass and cancelButtonClass ([5276cfd](https://github.com/sweetalert2/sweetalert2/commit/5276cfd1f6a40ce5c510e94dc8840bac6a54e4de))
|
725 |
+
* BREAKING CHANGE: remove customContainerClass ([c04782c](https://github.com/sweetalert2/sweetalert2/commit/c04782c1ae00ffc8150afb23b9510c400b78f0b5))
|
726 |
+
* BREAKING CHANGE: remove .swal2-shown from .swal2-container, add 'backdrop' to showClass and hideClass ([c3cbb74](https://github.com/sweetalert2/sweetalert2/commit/c3cbb741fe0159bb2d452558e40553407a0ad913))
|
727 |
+
* BREAKING CHANGE: replace animation with showClass and hideClass params ([f2153cb](https://github.com/sweetalert2/sweetalert2/commit/f2153cbfa3da01a80db4e1c986c4a94e9cfbfad0)), closes [#1193](https://github.com/sweetalert2/sweetalert2/issues/1193) [#654](https://github.com/sweetalert2/sweetalert2/issues/654) [#650](https://github.com/sweetalert2/sweetalert2/issues/650) [#761](https://github.com/sweetalert2/sweetalert2/issues/761)
|
728 |
+
|
729 |
+
|
730 |
+
### Features
|
731 |
+
|
732 |
+
* **api:** add 'icon' to showClass and hideClass ([7c4b324](https://github.com/sweetalert2/sweetalert2/commit/7c4b324c7c649d897db88e21f0de9326e9858d6e))
|
733 |
+
|
734 |
+
|
735 |
+
### BREAKING CHANGES
|
736 |
+
|
737 |
+
* remove .swal2-arabic-question-mark, add iconHtml param
|
738 |
+
* rename 'type' param to 'icon'
|
739 |
+
* Stop disabling the Cancel button when in showLoading()
|
740 |
+
* remove setProgressSteps(), showProgressSteps(), hideProgressSteps()
|
741 |
+
* remove disableConfirmButton() and enableConfirmButton()
|
742 |
+
* remove inputClass
|
743 |
+
* remove imageClass
|
744 |
+
* remove confirmButtonClass and cancelButtonClass
|
745 |
+
* remove customContainerClass
|
746 |
+
* remove .swal2-shown from .swal2-container, add 'backdrop' to showClass and hideClass
|
747 |
+
* replace animation with showClass and hideClass params
|
748 |
+
|
749 |
+
# [8.19.0](https://github.com/sweetalert2/sweetalert2/compare/v8.18.7...v8.19.0) (2019-11-02)
|
750 |
+
|
751 |
+
|
752 |
+
### Features
|
753 |
+
|
754 |
+
* **scss:** add $swal2-border ([0fdf5ba](https://github.com/sweetalert2/sweetalert2/commit/0fdf5ba6813f27695b6d6654484b51eb67c03d62))
|
755 |
+
|
756 |
+
## [8.18.7](https://github.com/sweetalert2/sweetalert2/compare/v8.18.6...v8.18.7) (2019-11-01)
|
757 |
+
|
758 |
+
|
759 |
+
### Bug Fixes
|
760 |
+
|
761 |
+
* iOS/iPadOS 13 detection ([#1789](https://github.com/sweetalert2/sweetalert2/issues/1789)) ([67e99e9](https://github.com/sweetalert2/sweetalert2/commit/67e99e905a2f45a6305d249575ea65480b45f0c4))
|
762 |
+
|
763 |
+
## [8.18.6](https://github.com/sweetalert2/sweetalert2/compare/v8.18.5...v8.18.6) (2019-10-23)
|
764 |
+
|
765 |
+
|
766 |
+
### Bug Fixes
|
767 |
+
|
768 |
+
* set the default value for zoom to null ([#1783](https://github.com/sweetalert2/sweetalert2/issues/1783)) ([36b7346](https://github.com/sweetalert2/sweetalert2/commit/36b7346524a7838c9517055d9fcf293b69c6d4d9))
|
769 |
+
|
770 |
+
## [8.18.5](https://github.com/sweetalert2/sweetalert2/compare/v8.18.4...v8.18.5) (2019-10-18)
|
771 |
+
|
772 |
+
|
773 |
+
### Bug Fixes
|
774 |
+
|
775 |
+
* throw warning when calling update() for closing popup ([#1779](https://github.com/sweetalert2/sweetalert2/issues/1779)) ([69d737e](https://github.com/sweetalert2/sweetalert2/commit/69d737e0ba783ed59f56cee31cf651fa3d339c1e))
|
776 |
+
|
777 |
+
## [8.18.4](https://github.com/sweetalert2/sweetalert2/compare/v8.18.3...v8.18.4) (2019-10-16)
|
778 |
+
|
779 |
+
|
780 |
+
### Bug Fixes
|
781 |
+
|
782 |
+
* **types:** do not use SweetAlertArrayOptions in fire() definition ([#1775](https://github.com/sweetalert2/sweetalert2/issues/1775)) ([893eee7](https://github.com/sweetalert2/sweetalert2/commit/893eee7ab6993013fb28337ff6fdf69f78d4ee9f))
|
783 |
+
|
784 |
+
## [8.18.3](https://github.com/sweetalert2/sweetalert2/compare/v8.18.2...v8.18.3) (2019-10-09)
|
785 |
+
|
786 |
+
|
787 |
+
### Bug Fixes
|
788 |
+
|
789 |
+
* apply customClass only to visible input ([#1767](https://github.com/sweetalert2/sweetalert2/issues/1767)) ([98de5fb](https://github.com/sweetalert2/sweetalert2/commit/98de5fb009923d1885a2bb437deed7746820e058))
|
790 |
+
|
791 |
+
## [8.18.2](https://github.com/sweetalert2/sweetalert2/compare/v8.18.1...v8.18.2) (2019-10-09)
|
792 |
+
|
793 |
+
|
794 |
+
### Bug Fixes
|
795 |
+
|
796 |
+
* **types:** getInput() returns HTMLInputElement ([#1766](https://github.com/sweetalert2/sweetalert2/issues/1766)) ([c9916da](https://github.com/sweetalert2/sweetalert2/commit/c9916da081c1dfdc48e02422b3af12aef306586d))
|
797 |
+
|
798 |
+
## [8.18.1](https://github.com/sweetalert2/sweetalert2/compare/v8.18.0...v8.18.1) (2019-10-07)
|
799 |
+
|
800 |
+
|
801 |
+
### Bug Fixes
|
802 |
+
|
803 |
+
* get file result for multiple file type input ([#1759](https://github.com/sweetalert2/sweetalert2/issues/1759)) ([cf00614](https://github.com/sweetalert2/sweetalert2/commit/cf00614))
|
804 |
+
|
805 |
+
# [8.18.0](https://github.com/sweetalert2/sweetalert2/compare/v8.17.6...v8.18.0) (2019-09-30)
|
806 |
+
|
807 |
+
|
808 |
+
### Features
|
809 |
+
|
810 |
+
* **scss:** add $swal2-close-button-font-family and $swal2-button-focus-background-color variables ([#1753](https://github.com/sweetalert2/sweetalert2/issues/1753)) ([bc1da42](https://github.com/sweetalert2/sweetalert2/commit/bc1da42))
|
811 |
+
|
812 |
+
## [8.17.6](https://github.com/sweetalert2/sweetalert2/compare/v8.17.5...v8.17.6) (2019-09-19)
|
813 |
+
|
814 |
+
|
815 |
+
### Bug Fixes
|
816 |
+
|
817 |
+
* throw warning about unexpected type of customClass ([#1743](https://github.com/sweetalert2/sweetalert2/issues/1743)) ([102bd03](https://github.com/sweetalert2/sweetalert2/commit/102bd03))
|
818 |
+
|
819 |
+
## [8.17.5](https://github.com/sweetalert2/sweetalert2/compare/v8.17.4...v8.17.5) (2019-09-19)
|
820 |
+
|
821 |
+
|
822 |
+
### Bug Fixes
|
823 |
+
|
824 |
+
* remove superfluous arguments ([#1742](https://github.com/sweetalert2/sweetalert2/issues/1742)) ([96d8429](https://github.com/sweetalert2/sweetalert2/commit/96d8429))
|
825 |
+
|
826 |
+
## [8.17.4](https://github.com/sweetalert2/sweetalert2/compare/v8.17.3...v8.17.4) (2019-09-17)
|
827 |
+
|
828 |
+
|
829 |
+
### Bug Fixes
|
830 |
+
|
831 |
+
* **types:** title and footer can be of HTMLElement and JQuery types ([b00065f](https://github.com/sweetalert2/sweetalert2/commit/b00065f))
|
832 |
+
|
833 |
+
## [8.17.3](https://github.com/sweetalert2/sweetalert2/compare/v8.17.2...v8.17.3) (2019-09-16)
|
834 |
+
|
835 |
+
|
836 |
+
### Bug Fixes
|
837 |
+
|
838 |
+
* move variables.scss back ([#1739](https://github.com/sweetalert2/sweetalert2/issues/1739)) ([540702a](https://github.com/sweetalert2/sweetalert2/commit/540702a)), closes [#1734](https://github.com/sweetalert2/sweetalert2/issues/1734)
|
839 |
+
|
840 |
+
## [8.17.2](https://github.com/sweetalert2/sweetalert2/compare/v8.17.1...v8.17.2) (2019-09-16)
|
841 |
+
|
842 |
+
|
843 |
+
### Bug Fixes
|
844 |
+
|
845 |
+
* split SCSS into smaller pieces for easier theming ([#1734](https://github.com/sweetalert2/sweetalert2/issues/1734)) ([c21d615](https://github.com/sweetalert2/sweetalert2/commit/c21d615))
|
846 |
+
|
847 |
+
## [8.17.1](https://github.com/sweetalert2/sweetalert2/compare/v8.17.0...v8.17.1) (2019-08-31)
|
848 |
+
|
849 |
+
|
850 |
+
### Bug Fixes
|
851 |
+
|
852 |
+
* **types:** first element of SweetAlertArrayOptions is also optional ([b30baf8](https://github.com/sweetalert2/sweetalert2/commit/b30baf8))
|
853 |
+
* **types:** more precise SweetAlertArrayOptions type and minor syntax improvement ([e0225e7](https://github.com/sweetalert2/sweetalert2/commit/e0225e7))
|
854 |
+
|
855 |
+
# [8.17.0](https://github.com/sweetalert2/sweetalert2/compare/v8.16.4...v8.17.0) (2019-08-31)
|
856 |
+
|
857 |
+
|
858 |
+
### Features
|
859 |
+
|
860 |
+
* add onRender lifecycle hook ([#1729](https://github.com/sweetalert2/sweetalert2/issues/1729)) ([bdcc35c](https://github.com/sweetalert2/sweetalert2/commit/bdcc35c))
|
861 |
+
|
862 |
+
## [8.16.4](https://github.com/sweetalert2/sweetalert2/compare/v8.16.3...v8.16.4) (2019-08-30)
|
863 |
+
|
864 |
+
|
865 |
+
### Bug Fixes
|
866 |
+
|
867 |
+
* swap enable/disable deprecation warnings ([#1727](https://github.com/sweetalert2/sweetalert2/issues/1727)) ([d557a1e](https://github.com/sweetalert2/sweetalert2/commit/d557a1e))
|
868 |
+
|
869 |
+
## [8.16.3](https://github.com/sweetalert2/sweetalert2/compare/v8.16.2...v8.16.3) (2019-08-22)
|
870 |
+
|
871 |
+
|
872 |
+
### Bug Fixes
|
873 |
+
|
874 |
+
* remove invalid selector (fix [#1575](https://github.com/sweetalert2/sweetalert2/issues/1575)) ([9986d6f](https://github.com/sweetalert2/sweetalert2/commit/9986d6f))
|
875 |
+
|
876 |
+
## [8.16.2](https://github.com/sweetalert2/sweetalert2/compare/v8.16.1...v8.16.2) (2019-08-18)
|
877 |
+
|
878 |
+
|
879 |
+
### Bug Fixes
|
880 |
+
|
881 |
+
* **types:** Swal.close() now takes the value to resolve with, not a callback ([8def219](https://github.com/sweetalert2/sweetalert2/commit/8def219))
|
882 |
+
|
883 |
+
## [8.16.1](https://github.com/sweetalert2/sweetalert2/compare/v8.16.0...v8.16.1) (2019-08-17)
|
884 |
+
|
885 |
+
|
886 |
+
### Bug Fixes
|
887 |
+
|
888 |
+
* add <summary> to focusable elements ([#1709](https://github.com/sweetalert2/sweetalert2/issues/1709)) ([47a8023](https://github.com/sweetalert2/sweetalert2/commit/47a8023))
|
889 |
+
|
890 |
+
# [8.16.0](https://github.com/sweetalert2/sweetalert2/compare/v8.15.3...v8.16.0) (2019-08-16)
|
891 |
+
|
892 |
+
|
893 |
+
### Features
|
894 |
+
|
895 |
+
* **sass:** add variables for .swal2-content ([c50185a](https://github.com/sweetalert2/sweetalert2/commit/c50185a))
|
896 |
+
|
897 |
+
## [8.15.3](https://github.com/sweetalert2/sweetalert2/compare/v8.15.2...v8.15.3) (2019-08-09)
|
898 |
+
|
899 |
+
|
900 |
+
### Bug Fixes
|
901 |
+
|
902 |
+
* expand/shrink popup accordingly to textarea width ([#1702](https://github.com/sweetalert2/sweetalert2/issues/1702)) ([93f59dc](https://github.com/sweetalert2/sweetalert2/commit/93f59dc))
|
903 |
+
|
904 |
+
## [8.15.2](https://github.com/sweetalert2/sweetalert2/compare/v8.15.1...v8.15.2) (2019-08-05)
|
905 |
+
|
906 |
+
|
907 |
+
### Bug Fixes
|
908 |
+
|
909 |
+
* apply buttons classes even if both of them are hidden ([#1697](https://github.com/sweetalert2/sweetalert2/issues/1697)) ([a90f139](https://github.com/sweetalert2/sweetalert2/commit/a90f139))
|
910 |
+
|
911 |
+
## [8.15.1](https://github.com/sweetalert2/sweetalert2/compare/v8.15.0...v8.15.1) (2019-08-03)
|
912 |
+
|
913 |
+
|
914 |
+
### Bug Fixes
|
915 |
+
|
916 |
+
* **types:** add missing getPopup() definition ([f4374a7](https://github.com/sweetalert2/sweetalert2/commit/f4374a7))
|
917 |
+
|
918 |
+
# [8.15.0](https://github.com/sweetalert2/sweetalert2/compare/v8.14.1...v8.15.0) (2019-08-02)
|
919 |
+
|
920 |
+
|
921 |
+
### Features
|
922 |
+
|
923 |
+
* **sass:** add variables for .swal2-actions ([3fc4c0c](https://github.com/sweetalert2/sweetalert2/commit/3fc4c0c))
|
924 |
+
|
925 |
+
## [8.14.1](https://github.com/sweetalert2/sweetalert2/compare/v8.14.0...v8.14.1) (2019-08-02)
|
926 |
+
|
927 |
+
|
928 |
+
### Bug Fixes
|
929 |
+
|
930 |
+
* **types:** support sweetalert2 modules from dist and src folders ([#1693](https://github.com/sweetalert2/sweetalert2/issues/1693)) ([ca1cbe9](https://github.com/sweetalert2/sweetalert2/commit/ca1cbe9))
|
931 |
+
|
932 |
+
# [8.14.0](https://github.com/sweetalert2/sweetalert2/compare/v8.13.6...v8.14.0) (2019-07-18)
|
933 |
+
|
934 |
+
|
935 |
+
### Features
|
936 |
+
|
937 |
+
* add closeButtonHtml param ([#1668](https://github.com/sweetalert2/sweetalert2/issues/1668)) ([7f5d662](https://github.com/sweetalert2/sweetalert2/commit/7f5d662))
|
938 |
+
|
939 |
+
## [8.13.6](https://github.com/sweetalert2/sweetalert2/compare/v8.13.5...v8.13.6) (2019-07-15)
|
940 |
+
|
941 |
+
|
942 |
+
### Bug Fixes
|
943 |
+
|
944 |
+
* get rid of DISPOSE_SWAL_TIMEOUT ([#1655](https://github.com/sweetalert2/sweetalert2/issues/1655)) ([fec6c13](https://github.com/sweetalert2/sweetalert2/commit/fec6c13))
|
945 |
+
|
946 |
+
## [8.13.5](https://github.com/sweetalert2/sweetalert2/compare/v8.13.4...v8.13.5) (2019-07-14)
|
947 |
+
|
948 |
+
|
949 |
+
### Bug Fixes
|
950 |
+
|
951 |
+
* set .swal2-actions' width to auto, fix [#1662](https://github.com/sweetalert2/sweetalert2/issues/1662) ([5acef36](https://github.com/sweetalert2/sweetalert2/commit/5acef36))
|
952 |
+
|
953 |
+
## [8.13.4](https://github.com/sweetalert2/sweetalert2/compare/v8.13.3...v8.13.4) (2019-07-09)
|
954 |
+
|
955 |
+
|
956 |
+
### Bug Fixes
|
957 |
+
|
958 |
+
* perform removeBodyClasses() as the very last step ([#1651](https://github.com/sweetalert2/sweetalert2/issues/1651)) ([624ccc9](https://github.com/sweetalert2/sweetalert2/commit/624ccc9))
|
959 |
+
|
960 |
+
## [8.13.3](https://github.com/sweetalert2/sweetalert2/compare/v8.13.2...v8.13.3) (2019-07-08)
|
961 |
+
|
962 |
+
|
963 |
+
### Bug Fixes
|
964 |
+
|
965 |
+
* Move `globalState` variables delete statements in closing callback ([#1647](https://github.com/sweetalert2/sweetalert2/issues/1647)) ([e5ded53](https://github.com/sweetalert2/sweetalert2/commit/e5ded53))
|
966 |
+
|
967 |
+
## [8.13.2](https://github.com/sweetalert2/sweetalert2/compare/v8.13.1...v8.13.2) (2019-07-08)
|
968 |
+
|
969 |
+
|
970 |
+
### Bug Fixes
|
971 |
+
|
972 |
+
* change closing sequence to detect a closing swal ([#1645](https://github.com/sweetalert2/sweetalert2/issues/1645)) ([9a8e802](https://github.com/sweetalert2/sweetalert2/commit/9a8e802))
|
973 |
+
|
974 |
+
## [8.13.1](https://github.com/sweetalert2/sweetalert2/compare/v8.13.0...v8.13.1) (2019-07-04)
|
975 |
+
|
976 |
+
|
977 |
+
### Bug Fixes
|
978 |
+
|
979 |
+
* inputValue as a promise (reject case) ([544c0c1](https://github.com/sweetalert2/sweetalert2/commit/544c0c1))
|
980 |
+
|
981 |
+
# [8.13.0](https://github.com/sweetalert2/sweetalert2/compare/v8.12.2...v8.13.0) (2019-06-21)
|
982 |
+
|
983 |
+
|
984 |
+
### Features
|
985 |
+
|
986 |
+
* add $swal2-icon-font-family SCSS variable ([#1628](https://github.com/sweetalert2/sweetalert2/issues/1628)) ([3f7aaa8](https://github.com/sweetalert2/sweetalert2/commit/3f7aaa8))
|
987 |
+
|
988 |
+
## [8.12.2](https://github.com/sweetalert2/sweetalert2/compare/v8.12.1...v8.12.2) (2019-06-20)
|
989 |
+
|
990 |
+
|
991 |
+
### Bug Fixes
|
992 |
+
|
993 |
+
* remove styles for #swal2-content ([#1624](https://github.com/sweetalert2/sweetalert2/issues/1624)) ([7b01573](https://github.com/sweetalert2/sweetalert2/commit/7b01573)), closes [#swal2](https://github.com/sweetalert2/sweetalert2/issues/swal2)
|
994 |
+
|
995 |
+
## [8.12.1](https://github.com/sweetalert2/sweetalert2/compare/v8.12.0...v8.12.1) (2019-06-10)
|
996 |
+
|
997 |
+
|
998 |
+
### Bug Fixes
|
999 |
+
|
1000 |
+
* add z-index to the close button to prevent its overlapping by the content ([#1618](https://github.com/sweetalert2/sweetalert2/issues/1618)) ([ad07176](https://github.com/sweetalert2/sweetalert2/commit/ad07176))
|
1001 |
+
|
1002 |
+
# [8.12.0](https://github.com/sweetalert2/sweetalert2/compare/v8.11.7...v8.12.0) (2019-06-08)
|
1003 |
+
|
1004 |
+
|
1005 |
+
### Features
|
1006 |
+
|
1007 |
+
* **dist:** use this instead of window to support Firefox extensions ([#1615](https://github.com/sweetalert2/sweetalert2/issues/1615)) ([9996bcf](https://github.com/sweetalert2/sweetalert2/commit/9996bcf))
|
1008 |
+
|
1009 |
+
## [8.11.7](https://github.com/sweetalert2/sweetalert2/compare/v8.11.6...v8.11.7) (2019-05-31)
|
1010 |
+
|
1011 |
+
|
1012 |
+
### Bug Fixes
|
1013 |
+
|
1014 |
+
* **iOS:** do not prevent touchmove for inputs ([#1605](https://github.com/sweetalert2/sweetalert2/issues/1605)) ([69d57e3](https://github.com/sweetalert2/sweetalert2/commit/69d57e3))
|
1015 |
+
|
1016 |
+
## [8.11.6](https://github.com/sweetalert2/sweetalert2/compare/v8.11.5...v8.11.6) (2019-05-25)
|
1017 |
+
|
1018 |
+
|
1019 |
+
### Bug Fixes
|
1020 |
+
|
1021 |
+
* run swalCloseEventFinished only for animations on popup ([#1601](https://github.com/sweetalert2/sweetalert2/issues/1601)) ([78920dc](https://github.com/sweetalert2/sweetalert2/commit/78920dc))
|
1022 |
+
|
1023 |
+
## [8.11.5](https://github.com/sweetalert2/sweetalert2/compare/v8.11.4...v8.11.5) (2019-05-23)
|
1024 |
+
|
1025 |
+
|
1026 |
+
### Bug Fixes
|
1027 |
+
|
1028 |
+
* revert 'module' field, add 'browser' field to package.json ([#1599](https://github.com/sweetalert2/sweetalert2/issues/1599)) ([4fe56fb](https://github.com/sweetalert2/sweetalert2/commit/4fe56fb))
|
1029 |
+
|
1030 |
+
## [8.11.4](https://github.com/sweetalert2/sweetalert2/compare/v8.11.3...v8.11.4) (2019-05-22)
|
1031 |
+
|
1032 |
+
|
1033 |
+
### Bug Fixes
|
1034 |
+
|
1035 |
+
* ie11 toast styles ([#1598](https://github.com/sweetalert2/sweetalert2/issues/1598)) ([bb415c1](https://github.com/sweetalert2/sweetalert2/commit/bb415c1))
|
1036 |
+
|
1037 |
+
## [8.11.3](https://github.com/sweetalert2/sweetalert2/compare/v8.11.2...v8.11.3) (2019-05-22)
|
1038 |
+
|
1039 |
+
|
1040 |
+
### Bug Fixes
|
1041 |
+
|
1042 |
+
* **iOS:** disable body scroll when modal is shown ([#1596](https://github.com/sweetalert2/sweetalert2/issues/1596)) ([409be8f](https://github.com/sweetalert2/sweetalert2/commit/409be8f))
|
1043 |
+
|
1044 |
+
## [8.11.2](https://github.com/sweetalert2/sweetalert2/compare/v8.11.1...v8.11.2) (2019-05-22)
|
1045 |
+
|
1046 |
+
|
1047 |
+
### Bug Fixes
|
1048 |
+
|
1049 |
+
* aviod double-executing of swalCloseEventFinished ([3874ba9](https://github.com/sweetalert2/sweetalert2/commit/3874ba9))
|
1050 |
+
|
1051 |
+
## [8.11.1](https://github.com/sweetalert2/sweetalert2/compare/v8.11.0...v8.11.1) (2019-05-16)
|
1052 |
+
|
1053 |
+
|
1054 |
+
### Bug Fixes
|
1055 |
+
|
1056 |
+
* **sass:** Add !default to swal2-actions-justify-content ([#1593](https://github.com/sweetalert2/sweetalert2/issues/1593)) ([5062187](https://github.com/sweetalert2/sweetalert2/commit/5062187))
|
1057 |
+
|
1058 |
+
# [8.11.0](https://github.com/sweetalert2/sweetalert2/compare/v8.10.7...v8.11.0) (2019-05-16)
|
1059 |
+
|
1060 |
+
|
1061 |
+
### Bug Fixes
|
1062 |
+
|
1063 |
+
* do not access innerParams in close() if there's no popup ([86e16f9](https://github.com/sweetalert2/sweetalert2/commit/86e16f9))
|
1064 |
+
|
1065 |
+
|
1066 |
+
### Features
|
1067 |
+
|
1068 |
+
* **sass:** add $swal2-actions-justify-content variable to control buttons justification ([#1592](https://github.com/sweetalert2/sweetalert2/issues/1592)) ([c0fcab8](https://github.com/sweetalert2/sweetalert2/commit/c0fcab8))
|
1069 |
+
|
1070 |
+
## [8.10.7](https://github.com/sweetalert2/sweetalert2/compare/v8.10.6...v8.10.7) (2019-05-11)
|
1071 |
+
|
1072 |
+
|
1073 |
+
### Bug Fixes
|
1074 |
+
|
1075 |
+
* pass isToast to removePopupAndResetState() ([#1585](https://github.com/sweetalert2/sweetalert2/issues/1585)) ([53f1047](https://github.com/sweetalert2/sweetalert2/commit/53f1047))
|
1076 |
+
|
1077 |
+
## [8.10.6](https://github.com/sweetalert2/sweetalert2/compare/v8.10.5...v8.10.6) (2019-05-10)
|
1078 |
+
|
1079 |
+
|
1080 |
+
### Bug Fixes
|
1081 |
+
|
1082 |
+
* **sass:** add $swal2-close-button-hover-background ([c209d1b](https://github.com/sweetalert2/sweetalert2/commit/c209d1b))
|
1083 |
+
* **styling:** revert opacity on toast hide animation ([1bb5a56](https://github.com/sweetalert2/sweetalert2/commit/1bb5a56))
|
1084 |
+
|
1085 |
+
## [8.10.5](https://github.com/sweetalert2/sweetalert2/compare/v8.10.4...v8.10.5) (2019-05-10)
|
1086 |
+
|
1087 |
+
|
1088 |
+
### Bug Fixes
|
1089 |
+
|
1090 |
+
* remove opacity from toast show/hide animations ([#1584](https://github.com/sweetalert2/sweetalert2/issues/1584)) ([469bcc5](https://github.com/sweetalert2/sweetalert2/commit/469bcc5))
|
1091 |
+
|
1092 |
+
## [8.10.4](https://github.com/sweetalert2/sweetalert2/compare/v8.10.3...v8.10.4) (2019-05-09)
|
1093 |
+
|
1094 |
+
|
1095 |
+
### Bug Fixes
|
1096 |
+
|
1097 |
+
* call Swal.fire() inside onClose() ([#1582](https://github.com/sweetalert2/sweetalert2/issues/1582)) ([9a02500](https://github.com/sweetalert2/sweetalert2/commit/9a02500))
|
1098 |
+
|
1099 |
+
## [8.10.3](https://github.com/sweetalert2/sweetalert2/compare/v8.10.2...v8.10.3) (2019-05-09)
|
1100 |
+
|
1101 |
+
|
1102 |
+
### Bug Fixes
|
1103 |
+
|
1104 |
+
* improve the awareness of users to support awesomeness ([982a612](https://github.com/sweetalert2/sweetalert2/commit/982a612))
|
1105 |
+
|
1106 |
+
## [8.10.2](https://github.com/sweetalert2/sweetalert2/compare/v8.10.1...v8.10.2) (2019-05-07)
|
1107 |
+
|
1108 |
+
|
1109 |
+
### Bug Fixes
|
1110 |
+
|
1111 |
+
* double-click on backdrop should close popup once ([#1579](https://github.com/sweetalert2/sweetalert2/issues/1579)) ([78d2d2a](https://github.com/sweetalert2/sweetalert2/commit/78d2d2a))
|
1112 |
+
* unset props after closing a popup so GC will dispose them ([#1570](https://github.com/sweetalert2/sweetalert2/issues/1570)) ([81c0a0d](https://github.com/sweetalert2/sweetalert2/commit/81c0a0d))
|
1113 |
+
|
1114 |
+
## [8.10.1](https://github.com/sweetalert2/sweetalert2/compare/v8.10.0...v8.10.1) (2019-05-06)
|
1115 |
+
|
1116 |
+
|
1117 |
+
### Bug Fixes
|
1118 |
+
|
1119 |
+
* improve checking when popup is animated ([#1576](https://github.com/sweetalert2/sweetalert2/issues/1576)) ([9b82c5a](https://github.com/sweetalert2/sweetalert2/commit/9b82c5a))
|
1120 |
+
|
1121 |
+
# [8.10.0](https://github.com/sweetalert2/sweetalert2/compare/v8.9.0...v8.10.0) (2019-05-03)
|
1122 |
+
|
1123 |
+
|
1124 |
+
### Features
|
1125 |
+
|
1126 |
+
* **sass:** add variables for toast, input and backdrop ([#1571](https://github.com/sweetalert2/sweetalert2/issues/1571)) ([feab788](https://github.com/sweetalert2/sweetalert2/commit/feab788))
|
1127 |
+
|
1128 |
+
# [8.9.0](https://github.com/sweetalert2/sweetalert2/compare/v8.8.7...v8.9.0) (2019-04-28)
|
1129 |
+
|
1130 |
+
|
1131 |
+
### Features
|
1132 |
+
|
1133 |
+
* **sass:** add $swal2-input-color ([#1563](https://github.com/sweetalert2/sweetalert2/issues/1563)) ([cbe02de](https://github.com/sweetalert2/sweetalert2/commit/cbe02de))
|
1134 |
+
|
1135 |
+
## [8.8.7](https://github.com/sweetalert2/sweetalert2/compare/v8.8.6...v8.8.7) (2019-04-21)
|
1136 |
+
|
1137 |
+
|
1138 |
+
### Bug Fixes
|
1139 |
+
|
1140 |
+
* revert "chore(tools): git hooks for running linters before commit ([#1537](https://github.com/sweetalert2/sweetalert2/issues/1537))" ([#1559](https://github.com/sweetalert2/sweetalert2/issues/1559)) ([d22b234](https://github.com/sweetalert2/sweetalert2/commit/d22b234))
|
1141 |
+
|
1142 |
+
## [8.8.6](https://github.com/sweetalert2/sweetalert2/compare/v8.8.5...v8.8.6) (2019-04-21)
|
1143 |
+
|
1144 |
+
|
1145 |
+
### Bug Fixes
|
1146 |
+
|
1147 |
+
* force extensions for import statements ([fa94cec](https://github.com/sweetalert2/sweetalert2/commit/fa94cec))
|
1148 |
+
|
1149 |
+
## [8.8.5](https://github.com/sweetalert2/sweetalert2/compare/v8.8.4...v8.8.5) (2019-04-13)
|
1150 |
+
|
1151 |
+
|
1152 |
+
### Bug Fixes
|
1153 |
+
|
1154 |
+
* do not repove style attribute from inputs ([#1545](https://github.com/sweetalert2/sweetalert2/issues/1545)) ([cf44531](https://github.com/sweetalert2/sweetalert2/commit/cf44531))
|
1155 |
+
|
1156 |
+
## [8.8.4](https://github.com/sweetalert2/sweetalert2/compare/v8.8.3...v8.8.4) (2019-04-13)
|
1157 |
+
|
1158 |
+
|
1159 |
+
### Bug Fixes
|
1160 |
+
|
1161 |
+
* do not rerender input on update ([#1543](https://github.com/sweetalert2/sweetalert2/issues/1543)) ([2649c34](https://github.com/sweetalert2/sweetalert2/commit/2649c34))
|
1162 |
+
|
1163 |
+
## [8.8.3](https://github.com/sweetalert2/sweetalert2/compare/v8.8.2...v8.8.3) (2019-04-10)
|
1164 |
+
|
1165 |
+
|
1166 |
+
### Bug Fixes
|
1167 |
+
|
1168 |
+
* **d.ts:** add missing HTMLElement to target param ([2ea9d80](https://github.com/sweetalert2/sweetalert2/commit/2ea9d80))
|
1169 |
+
|
1170 |
+
## [8.8.2](https://github.com/sweetalert2/sweetalert2/compare/v8.8.1...v8.8.2) (2019-04-10)
|
1171 |
+
|
1172 |
+
|
1173 |
+
### Bug Fixes
|
1174 |
+
|
1175 |
+
* remove unnecessary nesting in styles ([#1526](https://github.com/sweetalert2/sweetalert2/issues/1526)) ([848cf9f](https://github.com/sweetalert2/sweetalert2/commit/848cf9f))
|
1176 |
+
|
1177 |
+
## [8.8.1](https://github.com/sweetalert2/sweetalert2/compare/v8.8.0...v8.8.1) (2019-04-02)
|
1178 |
+
|
1179 |
+
|
1180 |
+
### Bug Fixes
|
1181 |
+
|
1182 |
+
* do not re-render icon if isn't provided or the same as before ([#1518](https://github.com/sweetalert2/sweetalert2/issues/1518)) ([f7613af](https://github.com/sweetalert2/sweetalert2/commit/f7613af))
|
1183 |
+
|
1184 |
+
# [8.8.0](https://github.com/sweetalert2/sweetalert2/compare/v8.7.1...v8.8.0) (2019-03-31)
|
1185 |
+
|
1186 |
+
|
1187 |
+
### Features
|
1188 |
+
|
1189 |
+
* allow image size to be set in any CSS units ([#1510](https://github.com/sweetalert2/sweetalert2/issues/1510)) ([9d74299](https://github.com/sweetalert2/sweetalert2/commit/9d74299))
|
1190 |
+
|
1191 |
+
## [8.7.1](https://github.com/sweetalert2/sweetalert2/compare/v8.7.0...v8.7.1) (2019-03-30)
|
1192 |
+
|
1193 |
+
|
1194 |
+
### Bug Fixes
|
1195 |
+
|
1196 |
+
* update internal params in Swal.update() ([#1505](https://github.com/sweetalert2/sweetalert2/issues/1505)) ([e81d840](https://github.com/sweetalert2/sweetalert2/commit/e81d840))
|
1197 |
+
|
1198 |
+
# [8.7.0](https://github.com/sweetalert2/sweetalert2/compare/v8.6.0...v8.7.0) (2019-03-26)
|
1199 |
+
|
1200 |
+
|
1201 |
+
### Features
|
1202 |
+
|
1203 |
+
* make customClass updatable ([#1467](https://github.com/sweetalert2/sweetalert2/issues/1467)) ([c144810](https://github.com/sweetalert2/sweetalert2/commit/c144810))
|
1204 |
+
|
1205 |
+
# [8.6.0](https://github.com/sweetalert2/sweetalert2/compare/v8.5.0...v8.6.0) (2019-03-24)
|
1206 |
+
|
1207 |
+
|
1208 |
+
### Features
|
1209 |
+
|
1210 |
+
* **sass-variables:** add $swal2-container-padding ([#1463](https://github.com/sweetalert2/sweetalert2/issues/1463)) ([d448794](https://github.com/sweetalert2/sweetalert2/commit/d448794))
|
1211 |
+
|
1212 |
+
# [8.5.0](https://github.com/sweetalert2/sweetalert2/compare/v8.4.0...v8.5.0) (2019-03-15)
|
1213 |
+
|
1214 |
+
|
1215 |
+
### Features
|
1216 |
+
|
1217 |
+
* **styles:** add .swal2-arabic-question-mark ([#1448](https://github.com/sweetalert2/sweetalert2/issues/1448)) ([e57ce7f](https://github.com/sweetalert2/sweetalert2/commit/e57ce7f))
|
1218 |
+
|
1219 |
+
# [8.4.0](https://github.com/sweetalert2/sweetalert2/compare/v8.3.0...v8.4.0) (2019-03-15)
|
1220 |
+
|
1221 |
+
|
1222 |
+
### Features
|
1223 |
+
|
1224 |
+
* add customClass.icon, simplify icons markup ([ba4a485](https://github.com/sweetalert2/sweetalert2/commit/ba4a485))
|
1225 |
+
* add Swal.getIcon() ([acc42a0](https://github.com/sweetalert2/sweetalert2/commit/acc42a0))
|
1226 |
+
|
1227 |
+
# [8.3.0](https://github.com/sweetalert2/sweetalert2/compare/v8.2.6...v8.3.0) (2019-03-11)
|
1228 |
+
|
1229 |
+
|
1230 |
+
### Bug Fixes
|
1231 |
+
|
1232 |
+
* remove excessive isVisible check for buttons, support Jest testing enviroment ([#1439](https://github.com/sweetalert2/sweetalert2/issues/1439)) ([42ef213](https://github.com/sweetalert2/sweetalert2/commit/42ef213))
|
1233 |
+
|
1234 |
+
|
1235 |
+
### Features
|
1236 |
+
|
1237 |
+
* **api:** allow adding custom classes to header, content, footer, etc. ([#1441](https://github.com/sweetalert2/sweetalert2/issues/1441)) ([4381bae](https://github.com/sweetalert2/sweetalert2/commit/4381bae))
|
1238 |
+
|
1239 |
+
## [8.2.6](https://github.com/sweetalert2/sweetalert2/compare/v8.2.5...v8.2.6) (2019-02-26)
|
1240 |
+
|
1241 |
+
|
1242 |
+
### Bug Fixes
|
1243 |
+
|
1244 |
+
* inactive step background ([#1428](https://github.com/sweetalert2/sweetalert2/issues/1428)) ([2f7701c](https://github.com/sweetalert2/sweetalert2/commit/2f7701c))
|
1245 |
+
|
1246 |
+
## [8.2.5](https://github.com/sweetalert2/sweetalert2/compare/v8.2.4...v8.2.5) (2019-02-26)
|
1247 |
+
|
1248 |
+
|
1249 |
+
### Bug Fixes
|
1250 |
+
|
1251 |
+
* make close button friendly for non-UTF encodings × -> × ([#1431](https://github.com/sweetalert2/sweetalert2/issues/1431)) ([b2006c3](https://github.com/sweetalert2/sweetalert2/commit/b2006c3))
|
1252 |
+
|
1253 |
+
## [8.2.4](https://github.com/sweetalert2/sweetalert2/compare/v8.2.3...v8.2.4) (2019-02-23)
|
1254 |
+
|
1255 |
+
|
1256 |
+
### Bug Fixes
|
1257 |
+
|
1258 |
+
* padding 0 ([#1424](https://github.com/sweetalert2/sweetalert2/issues/1424)) ([f1a2259](https://github.com/sweetalert2/sweetalert2/commit/f1a2259))
|
1259 |
+
|
1260 |
+
## [8.2.3](https://github.com/sweetalert2/sweetalert2/compare/v8.2.2...v8.2.3) (2019-02-21)
|
1261 |
+
|
1262 |
+
|
1263 |
+
### Bug Fixes
|
1264 |
+
|
1265 |
+
* Swal.isVisible() ([#1423](https://github.com/sweetalert2/sweetalert2/issues/1423)) ([97b6bd4](https://github.com/sweetalert2/sweetalert2/commit/97b6bd4))
|
1266 |
+
|
1267 |
+
## [8.2.2](https://github.com/sweetalert2/sweetalert2/compare/v8.2.1...v8.2.2) (2019-02-20)
|
1268 |
+
|
1269 |
+
|
1270 |
+
### Bug Fixes
|
1271 |
+
|
1272 |
+
* crash if swal2 action buttons classes are applied to elements in html prop ([#1420](https://github.com/sweetalert2/sweetalert2/issues/1420)) ([a21ef6b](https://github.com/sweetalert2/sweetalert2/commit/a21ef6b))
|
1273 |
+
|
1274 |
+
## [8.2.1](https://github.com/sweetalert2/sweetalert2/compare/v8.2.0...v8.2.1) (2019-02-18)
|
1275 |
+
|
1276 |
+
|
1277 |
+
### Bug Fixes
|
1278 |
+
|
1279 |
+
* model cut of by bottom positioning ([#1417](https://github.com/sweetalert2/sweetalert2/issues/1417)) ([8b0e5dd](https://github.com/sweetalert2/sweetalert2/commit/8b0e5dd))
|
1280 |
+
|
1281 |
+
# [8.2.0](https://github.com/sweetalert2/sweetalert2/compare/v8.1.0...v8.2.0) (2019-02-17)
|
1282 |
+
|
1283 |
+
|
1284 |
+
### Features
|
1285 |
+
|
1286 |
+
* **api:** add `scrollbarPadding` param ([#1414](https://github.com/sweetalert2/sweetalert2/issues/1414)) ([d095937](https://github.com/sweetalert2/sweetalert2/commit/d095937))
|
1287 |
+
|
1288 |
+
# [8.1.0](https://github.com/sweetalert2/sweetalert2/compare/v8.0.7...v8.1.0) (2019-02-17)
|
1289 |
+
|
1290 |
+
|
1291 |
+
### Features
|
1292 |
+
|
1293 |
+
* add new SCSS variables for input and progress steps ([#1411](https://github.com/sweetalert2/sweetalert2/issues/1411)) ([5be77b6](https://github.com/sweetalert2/sweetalert2/commit/5be77b6))
|
1294 |
+
|
1295 |
+
## [8.0.7](https://github.com/sweetalert2/sweetalert2/compare/v8.0.6...v8.0.7) (2019-02-12)
|
1296 |
+
|
1297 |
+
|
1298 |
+
### Bug Fixes
|
1299 |
+
|
1300 |
+
* restore correct padding when scrollbar is present ([#1410](https://github.com/sweetalert2/sweetalert2/issues/1410)) ([f73f1d7](https://github.com/sweetalert2/sweetalert2/commit/f73f1d7))
|
1301 |
+
|
1302 |
+
## [8.0.6](https://github.com/sweetalert2/sweetalert2/compare/v8.0.5...v8.0.6) (2019-02-05)
|
1303 |
+
|
1304 |
+
|
1305 |
+
### Bug Fixes
|
1306 |
+
|
1307 |
+
* **api:** falsy values in preConfirm ([#1403](https://github.com/sweetalert2/sweetalert2/issues/1403)) ([f6e1a30](https://github.com/sweetalert2/sweetalert2/commit/f6e1a30))
|
1308 |
+
|
1309 |
+
## [8.0.5](https://github.com/sweetalert2/sweetalert2/compare/v8.0.4...v8.0.5) (2019-02-02)
|
1310 |
+
|
1311 |
+
|
1312 |
+
### Bug Fixes
|
1313 |
+
|
1314 |
+
* **build-dist:** git add src/SweetAlert.js, connected to [#1401](https://github.com/sweetalert2/sweetalert2/issues/1401) ([d024119](https://github.com/sweetalert2/sweetalert2/commit/d024119))
|
1315 |
+
|
1316 |
+
## [8.0.4](https://github.com/sweetalert2/sweetalert2/compare/v8.0.3...v8.0.4) (2019-02-02)
|
1317 |
+
|
1318 |
+
|
1319 |
+
### Bug Fixes
|
1320 |
+
|
1321 |
+
* add Swal.version to src/SweetAlert.js ([#1401](https://github.com/sweetalert2/sweetalert2/issues/1401)) ([d4c19a3](https://github.com/sweetalert2/sweetalert2/commit/d4c19a3))
|
1322 |
+
|
1323 |
+
## [8.0.3](https://github.com/sweetalert2/sweetalert2/compare/v8.0.2...v8.0.3) (2019-01-29)
|
1324 |
+
|
1325 |
+
|
1326 |
+
### Bug Fixes
|
1327 |
+
|
1328 |
+
* **api:** showLoading() should open a new popup ([#1394](https://github.com/sweetalert2/sweetalert2/issues/1394)) ([38823ff](https://github.com/sweetalert2/sweetalert2/commit/38823ff))
|
1329 |
+
|
1330 |
+
## [8.0.2](https://github.com/sweetalert2/sweetalert2/compare/v8.0.1...v8.0.2) (2019-01-28)
|
1331 |
+
|
1332 |
+
|
1333 |
+
### Bug Fixes
|
1334 |
+
|
1335 |
+
* **package.json:** remove the 'module' field ([#1392](https://github.com/sweetalert2/sweetalert2/issues/1392)) ([b87b42f](https://github.com/sweetalert2/sweetalert2/commit/b87b42f))
|
1336 |
+
|
1337 |
+
## [8.0.1](https://github.com/sweetalert2/sweetalert2/compare/v8.0.0...v8.0.1) (2019-01-19)
|
1338 |
+
|
1339 |
+
|
1340 |
+
### Bug Fixes
|
1341 |
+
|
1342 |
+
* use .js in imports to support ES modules ([0e3e89e](https://github.com/sweetalert2/sweetalert2/commit/0e3e89e))
|
1343 |
+
|
1344 |
+
# [8.0.0](https://github.com/sweetalert2/sweetalert2/compare/v7.33.1...v8.0.0) (2019-01-19)
|
1345 |
+
|
1346 |
+
Detailed summury on the [release page](https://github.com/sweetalert2/sweetalert2/releases/tag/v8.0.0).
|
1347 |
+
|
1348 |
+
* BREAKING CHANGE: Change the main call method: swal() -> Swal.fire() (#1438)
|
1349 |
+
* BREAKING CHANGE: remove getButtonsWrapper() ([c93b5e3](https://github.com/sweetalert2/sweetalert2/commit/c93b5e3))
|
1350 |
+
* BREAKING CHANGE: close() as instance method (#1379) ([2519c17](https://github.com/sweetalert2/sweetalert2/commit/2519c17)), closes [#1379](https://github.com/sweetalert2/sweetalert2/issues/1379)
|
1351 |
+
* BREAKING CHANGE: replace deprecated `jsnext:main` with `module` in package.json (#1378) ([1785905](https://github.com/sweetalert2/sweetalert2/commit/1785905)), closes [#1378](https://github.com/sweetalert2/sweetalert2/issues/1378)
|
1352 |
+
* BREAKING CHANGE: drop Bower support (#1377) ([cb4ef28](https://github.com/sweetalert2/sweetalert2/commit/cb4ef28)), closes [#1377](https://github.com/sweetalert2/sweetalert2/issues/1377)
|
1353 |
+
* BREAKING CHANGE: remove withNoNewKeyword enhancer (#1372) ([f581352](https://github.com/sweetalert2/sweetalert2/commit/f581352)), closes [#1372](https://github.com/sweetalert2/sweetalert2/issues/1372)
|
1354 |
+
* BREAKING CHANGE: remove swal.noop() ([40d6fbb](https://github.com/sweetalert2/sweetalert2/commit/40d6fbb))
|
1355 |
+
* BREAKING CHANGE: rename $swal2-validationerror -> $swal2-validation-message (#1370) ([9d1b13b](https://github.com/sweetalert2/sweetalert2/commit/9d1b13b)), closes [#1370](https://github.com/sweetalert2/sweetalert2/issues/1370)
|
1356 |
+
* BREAKING CHANGE: inputValidator and preConfirm should always resolve (#1383) ([fc70cf9](https://github.com/sweetalert2/sweetalert2/commit/fc70cf9)), closes [#1383](https://github.com/sweetalert2/sweetalert2/issues/1383)
|
1357 |
+
* BREAKING CHANGE: remove setDefault and resetDefaults (#1365) ([97c1d7c](https://github.com/sweetalert2/sweetalert2/commit/97c1d7c)), closes [#1365](https://github.com/sweetalert2/sweetalert2/issues/1365)
|
1358 |
+
* BREAKING CHANGE: remove extraParams (#1363) ([5125491](https://github.com/sweetalert2/sweetalert2/commit/5125491)), closes [#1363](https://github.com/sweetalert2/sweetalert2/issues/1363)
|
1359 |
+
* BREAKING CHANGE: remove showValidationError and resetValidationError (#1367) ([50a1eff](https://github.com/sweetalert2/sweetalert2/commit/50a1eff)), closes [#1367](https://github.com/sweetalert2/sweetalert2/issues/1367)
|
1360 |
+
* BREAKING CHANGE: remove useRejections and expectRejections (#1362) ([f050caf](https://github.com/sweetalert2/sweetalert2/commit/f050caf)), closes [#1362](https://github.com/sweetalert2/sweetalert2/issues/1362)
|
1361 |
+
* BREAKING CHANGE: dismissReason: overlay -> backdrop (#1360) ([d05bf33](https://github.com/sweetalert2/sweetalert2/commit/d05bf33)), closes [#1360](https://github.com/sweetalert2/sweetalert2/issues/1360)
|
1362 |
+
* BREAKING CHANGE: drop Android 4.4 support (#1359) ([c0eddf3](https://github.com/sweetalert2/sweetalert2/commit/c0eddf3)), closes [#1359](https://github.com/sweetalert2/sweetalert2/issues/1359)
|
1363 |
+
|
1364 |
+
|
1365 |
+
### Features
|
1366 |
+
|
1367 |
+
* **api:** add update() method ([#1186](https://github.com/sweetalert2/sweetalert2/issues/1186)) ([348e8b7](https://github.com/sweetalert2/sweetalert2/commit/348e8b7))
|
1368 |
+
|
1369 |
+
|
1370 |
+
### BREAKING CHANGES
|
1371 |
+
|
1372 |
+
* swal() -> Swal.fire() (#1438)
|
1373 |
+
* close() as instance method (#1379)
|
1374 |
+
* drop Android 4.4 support (#1359)
|
1375 |
+
* replace deprecated `jsnext:main` with `module` in package.json (#1378)
|
1376 |
+
* drop Bower support (#1377)
|
1377 |
+
* remove withNoNewKeyword enhancer (#1372)
|
1378 |
+
* remove swal.noop()
|
1379 |
+
* rename $swal2-validationerror -> $swal2-validation-message (#1370)
|
1380 |
+
* inputValidator and preConfirm should always resolve (#1383)
|
1381 |
+
* remove setDefault and resetDefaults (#1365)
|
1382 |
+
* remove extraParams (#1363)
|
1383 |
+
* remove showValidationError and resetValidationError (#1367)
|
1384 |
+
* remove useRejections and expectRejections (#1362)
|
1385 |
+
* dismissReason: overlay -> backdrop (#1360)
|
1386 |
+
* remove getButtonsWrapper()
|
1387 |
+
|
1388 |
+
## [7.33.1](https://github.com/sweetalert2/sweetalert2/compare/v7.33.0...v7.33.1) (2018-12-22)
|
1389 |
+
|
1390 |
+
|
1391 |
+
### Bug Fixes
|
1392 |
+
|
1393 |
+
* **d.ts:** add customContainerClass definition ([#1351](https://github.com/sweetalert2/sweetalert2/issues/1351)) ([c5f11e7](https://github.com/sweetalert2/sweetalert2/commit/c5f11e7))
|
1394 |
+
|
1395 |
+
# [7.33.0](https://github.com/sweetalert2/sweetalert2/compare/v7.32.4...v7.33.0) (2018-12-22)
|
1396 |
+
|
1397 |
+
|
1398 |
+
### Features
|
1399 |
+
|
1400 |
+
* **API:** add customContainerClass for specifying custom container class ([#1347](https://github.com/sweetalert2/sweetalert2/issues/1347)) ([c5ef1aa](https://github.com/sweetalert2/sweetalert2/commit/c5ef1aa))
|
1401 |
+
|
1402 |
+
## [7.32.4](https://github.com/sweetalert2/sweetalert2/compare/v7.32.3...v7.32.4) (2018-12-15)
|
1403 |
+
|
1404 |
+
|
1405 |
+
### Bug Fixes
|
1406 |
+
|
1407 |
+
* remove excessive args check ([#1344](https://github.com/sweetalert2/sweetalert2/issues/1344)) ([d302584](https://github.com/sweetalert2/sweetalert2/commit/d302584))
|
1408 |
+
* trigger release ([f70362c](https://github.com/sweetalert2/sweetalert2/commit/f70362c))
|
1409 |
+
|
1410 |
+
## [7.32.3](https://github.com/sweetalert2/sweetalert2/compare/v7.32.2...v7.32.3) (2018-12-15)
|
1411 |
+
|
1412 |
+
|
1413 |
+
### Bug Fixes
|
1414 |
+
|
1415 |
+
* Remove excessive args check ([#1344](https://github.com/sweetalert2/sweetalert2/issues/1344))
|
1416 |
+
|
1417 |
+
## [7.32.2](https://github.com/sweetalert2/sweetalert2/compare/v7.32.1...v7.32.2) (2018-12-09)
|
1418 |
+
|
1419 |
+
|
1420 |
+
### Bug Fixes
|
1421 |
+
|
1422 |
+
* do not throw warnings when inputValue is a promise ([#1333](https://github.com/sweetalert2/sweetalert2/issues/1333)) ([3607b72](https://github.com/sweetalert2/sweetalert2/commit/3607b72))
|
1423 |
+
|
1424 |
+
## [7.32.1](https://github.com/sweetalert2/sweetalert2/compare/v7.32.0...v7.32.1) (2018-12-09)
|
1425 |
+
|
1426 |
+
|
1427 |
+
### Bug Fixes
|
1428 |
+
|
1429 |
+
* **ie11:** do not fail on <svg>.contains() ([#1331](https://github.com/sweetalert2/sweetalert2/issues/1331)) ([f7cb2c2](https://github.com/sweetalert2/sweetalert2/commit/f7cb2c2))
|
1430 |
+
|
1431 |
+
# [7.32.0](https://github.com/sweetalert2/sweetalert2/compare/v7.31.1...v7.32.0) (2018-12-08)
|
1432 |
+
|
1433 |
+
|
1434 |
+
### Features
|
1435 |
+
|
1436 |
+
* **api:** add .isTimerRunning() ([#1330](https://github.com/sweetalert2/sweetalert2/issues/1330)) ([0624e7a](https://github.com/sweetalert2/sweetalert2/commit/0624e7a))
|
1437 |
+
|
1438 |
+
## [7.31.1](https://github.com/sweetalert2/sweetalert2/compare/v7.31.0...v7.31.1) (2018-12-07)
|
1439 |
+
|
1440 |
+
|
1441 |
+
### Bug Fixes
|
1442 |
+
|
1443 |
+
* check this.running in timer methods ([#1327](https://github.com/sweetalert2/sweetalert2/issues/1327)) ([418b8d3](https://github.com/sweetalert2/sweetalert2/commit/418b8d3))
|
1444 |
+
* support HTMLElement for setting title/html/footer ([#1328](https://github.com/sweetalert2/sweetalert2/issues/1328)) ([6f35e48](https://github.com/sweetalert2/sweetalert2/commit/6f35e48))
|
1445 |
+
|
1446 |
+
# [7.31.0](https://github.com/sweetalert2/sweetalert2/compare/v7.30.0...v7.31.0) (2018-12-06)
|
1447 |
+
|
1448 |
+
|
1449 |
+
### Features
|
1450 |
+
|
1451 |
+
* **api:** add .resumeTimer(), .toggleTimer(), .increaseTimer() ([#1325](https://github.com/sweetalert2/sweetalert2/issues/1325)) ([77649ee](https://github.com/sweetalert2/sweetalert2/commit/77649ee))
|
1452 |
+
|
1453 |
+
# [7.30.0](https://github.com/sweetalert2/sweetalert2/compare/v7.29.2...v7.30.0) (2018-12-05)
|
1454 |
+
|
1455 |
+
|
1456 |
+
### Features
|
1457 |
+
|
1458 |
+
* **api:** add .stopTimer() ([#1322](https://github.com/sweetalert2/sweetalert2/issues/1322)) ([654caf2](https://github.com/sweetalert2/sweetalert2/commit/654caf2))
|
1459 |
+
|
1460 |
+
## [7.29.2](https://github.com/sweetalert2/sweetalert2/compare/v7.29.1...v7.29.2) (2018-11-26)
|
1461 |
+
|
1462 |
+
|
1463 |
+
### Bug Fixes
|
1464 |
+
|
1465 |
+
* **validators:** support long top level domain names in URL validator ([#1307](https://github.com/sweetalert2/sweetalert2/issues/1307)) ([3263217](https://github.com/sweetalert2/sweetalert2/commit/3263217))
|
1466 |
+
|
1467 |
+
## [7.29.1](https://github.com/sweetalert2/sweetalert2/compare/v7.29.0...v7.29.1) (2018-11-18)
|
1468 |
+
|
1469 |
+
|
1470 |
+
### Bug Fixes
|
1471 |
+
|
1472 |
+
* avoid Edge from crashing ([#1299](https://github.com/sweetalert2/sweetalert2/issues/1299)) ([69965e0](https://github.com/sweetalert2/sweetalert2/commit/69965e0))
|
1473 |
+
|
1474 |
+
# [7.29.0](https://github.com/sweetalert2/sweetalert2/compare/v7.28.13...v7.29.0) (2018-11-08)
|
1475 |
+
|
1476 |
+
|
1477 |
+
### Features
|
1478 |
+
|
1479 |
+
* **input:** add .checkValidity() support ([#1284](https://github.com/sweetalert2/sweetalert2/issues/1284)) ([361d2bd](https://github.com/sweetalert2/sweetalert2/commit/361d2bd))
|
1480 |
+
|
1481 |
+
## [7.28.13](https://github.com/sweetalert2/sweetalert2/compare/v7.28.12...v7.28.13) (2018-11-08)
|
1482 |
+
|
1483 |
+
|
1484 |
+
### Bug Fixes
|
1485 |
+
|
1486 |
+
* allow inputAttributes.placeholder ([#1279](https://github.com/sweetalert2/sweetalert2/issues/1279)) ([7ec7291](https://github.com/sweetalert2/sweetalert2/commit/7ec7291))
|
1487 |
+
|
1488 |
+
## [7.28.12](https://github.com/sweetalert2/sweetalert2/compare/v7.28.11...v7.28.12) (2018-11-06)
|
1489 |
+
|
1490 |
+
|
1491 |
+
### Bug Fixes
|
1492 |
+
|
1493 |
+
* **direction:** Support for CSS direction property ([#1275](https://github.com/sweetalert2/sweetalert2/issues/1275)) ([a12fefb](https://github.com/sweetalert2/sweetalert2/commit/a12fefb)), closes [#1262](https://github.com/sweetalert2/sweetalert2/issues/1262)
|
1494 |
+
|
1495 |
+
## [7.28.11](https://github.com/sweetalert2/sweetalert2/compare/v7.28.10...v7.28.11) (2018-10-29)
|
1496 |
+
|
1497 |
+
|
1498 |
+
### Bug Fixes
|
1499 |
+
|
1500 |
+
* **build:** use `.min.css` for `.all.js` to prevent the string concatenation ([#1268](https://github.com/sweetalert2/sweetalert2/issues/1268)) ([f18b4bc](https://github.com/sweetalert2/sweetalert2/commit/f18b4bc))
|
1501 |
+
|
1502 |
+
## [7.28.10](https://github.com/sweetalert2/sweetalert2/compare/v7.28.9...v7.28.10) (2018-10-25)
|
1503 |
+
|
1504 |
+
|
1505 |
+
### Bug Fixes
|
1506 |
+
|
1507 |
+
* **sarafi:** add preventDefault() in esc key handling ([#1264](https://github.com/sweetalert2/sweetalert2/issues/1264)) ([8a5c40f](https://github.com/sweetalert2/sweetalert2/commit/8a5c40f))
|
1508 |
+
|
1509 |
+
## [7.28.9](https://github.com/sweetalert2/sweetalert2/compare/v7.28.8...v7.28.9) (2018-10-24)
|
1510 |
+
|
1511 |
+
|
1512 |
+
### Bug Fixes
|
1513 |
+
|
1514 |
+
* **typings:** validationMesage typo ([3e9dbd5](https://github.com/sweetalert2/sweetalert2/commit/3e9dbd5))
|
1515 |
+
|
1516 |
+
## [7.28.8](https://github.com/sweetalert2/sweetalert2/compare/v7.28.7...v7.28.8) (2018-10-21)
|
1517 |
+
|
1518 |
+
|
1519 |
+
### Bug Fixes
|
1520 |
+
|
1521 |
+
* add resize handlers for IE11 vertical alignment fix ([ba1d4cf](https://github.com/sweetalert2/sweetalert2/commit/ba1d4cf))
|
1522 |
+
|
1523 |
+
## [7.28.7](https://github.com/sweetalert2/sweetalert2/compare/v7.28.6...v7.28.7) (2018-10-18)
|
1524 |
+
|
1525 |
+
|
1526 |
+
### Bug Fixes
|
1527 |
+
|
1528 |
+
* **animation:** detect animation before initialization ([#1255](https://github.com/sweetalert2/sweetalert2/issues/1255)) ([7e9cf38](https://github.com/sweetalert2/sweetalert2/commit/7e9cf38))
|
1529 |
+
|
1530 |
+
## [7.28.6](https://github.com/sweetalert2/sweetalert2/compare/v7.28.5...v7.28.6) (2018-10-18)
|
1531 |
+
|
1532 |
+
|
1533 |
+
### Bug Fixes
|
1534 |
+
|
1535 |
+
* **styles:** body 'overflow-y: hidden' -> 'overflow: hidden' ([#1254](https://github.com/sweetalert2/sweetalert2/issues/1254)) ([1b3d505](https://github.com/sweetalert2/sweetalert2/commit/1b3d505))
|
1536 |
+
|
1537 |
+
## [7.28.5](https://github.com/sweetalert2/sweetalert2/compare/v7.28.4...v7.28.5) (2018-10-12)
|
1538 |
+
|
1539 |
+
|
1540 |
+
### Bug Fixes
|
1541 |
+
|
1542 |
+
* scroll container to the top on open ([#1248](https://github.com/sweetalert2/sweetalert2/issues/1248)) ([369922f](https://github.com/sweetalert2/sweetalert2/commit/369922f))
|
1543 |
+
|
1544 |
+
## [7.28.4](https://github.com/sweetalert2/sweetalert2/compare/v7.28.3...v7.28.4) (2018-09-28)
|
1545 |
+
|
1546 |
+
|
1547 |
+
### Bug Fixes
|
1548 |
+
|
1549 |
+
* **release:** fix version in dist files ([#1235](https://github.com/sweetalert2/sweetalert2/issues/1235)) ([14eea6f](https://github.com/sweetalert2/sweetalert2/commit/14eea6f))
|
1550 |
+
|
1551 |
+
## [7.28.3](https://github.com/sweetalert2/sweetalert2/compare/v7.28.2...v7.28.3) (2018-09-28)
|
1552 |
+
|
1553 |
+
|
1554 |
+
### Bug Fixes
|
1555 |
+
|
1556 |
+
* **api:** call onAfterClose after previousActiveElement is focused ([#1233](https://github.com/sweetalert2/sweetalert2/issues/1233)) ([68c83ed](https://github.com/sweetalert2/sweetalert2/commit/68c83ed))
|
1557 |
+
|
1558 |
+
## [7.28.2](https://github.com/sweetalert2/sweetalert2/compare/v7.28.1...v7.28.2) (2018-09-24)
|
1559 |
+
|
1560 |
+
|
1561 |
+
### Bug Fixes
|
1562 |
+
|
1563 |
+
* **styles:** revert breaking changes in SASS variables ([#1229](https://github.com/sweetalert2/sweetalert2/issues/1229)) ([7d9f9d1](https://github.com/sweetalert2/sweetalert2/commit/7d9f9d1))
|
1564 |
+
|
1565 |
+
## [7.28.1](https://github.com/sweetalert2/sweetalert2/compare/v7.28.0...v7.28.1) (2018-09-23)
|
1566 |
+
|
1567 |
+
|
1568 |
+
### Bug Fixes
|
1569 |
+
|
1570 |
+
* **inputValue:** warn about invalid inputValue ([#1228](https://github.com/sweetalert2/sweetalert2/issues/1228)) ([8adebd0](https://github.com/sweetalert2/sweetalert2/commit/8adebd0))
|
1571 |
+
|
1572 |
+
# [7.28.0](https://github.com/sweetalert2/sweetalert2/compare/v7.27.0...v7.28.0) (2018-09-23)
|
1573 |
+
|
1574 |
+
|
1575 |
+
### Features
|
1576 |
+
|
1577 |
+
* **getters:** expose .getValidationMessage() ([3780165](https://github.com/sweetalert2/sweetalert2/commit/3780165))
|
1578 |
+
* **params:** add validationMessage ([73e0413](https://github.com/sweetalert2/sweetalert2/commit/73e0413))
|
1579 |
+
* **params:** deprecate extraParams ([1224200](https://github.com/sweetalert2/sweetalert2/commit/1224200))
|
1580 |
+
|
1581 |
+
# [7.27.0](https://github.com/sweetalert2/sweetalert2/compare/v7.26.29...v7.27.0) (2018-09-22)
|
1582 |
+
|
1583 |
+
|
1584 |
+
### Features
|
1585 |
+
|
1586 |
+
* **styles:** add [@media](https://github.com/media) print styles ([#1223](https://github.com/sweetalert2/sweetalert2/issues/1223)) ([1432e84](https://github.com/sweetalert2/sweetalert2/commit/1432e84))
|
1587 |
+
|
1588 |
+
## [7.26.29](https://github.com/sweetalert2/sweetalert2/compare/v7.26.28...v7.26.29) (2018-09-16)
|
1589 |
+
|
1590 |
+
|
1591 |
+
### Bug Fixes
|
1592 |
+
|
1593 |
+
* **styles:** wrap buttons (fix [#1201](https://github.com/sweetalert2/sweetalert2/issues/1201)) ([f4364e7](https://github.com/sweetalert2/sweetalert2/commit/f4364e7))
|
1594 |
+
|
1595 |
+
## [7.26.28](https://github.com/sweetalert2/sweetalert2/compare/v7.26.27...v7.26.28) (2018-09-07)
|
1596 |
+
|
1597 |
+
|
1598 |
+
### Bug Fixes
|
1599 |
+
|
1600 |
+
* **release:** purge jsdelivr before switching to master ([#1215](https://github.com/sweetalert2/sweetalert2/issues/1215)) ([4b5c55d](https://github.com/sweetalert2/sweetalert2/commit/4b5c55d))
|
1601 |
+
|
1602 |
+
## [7.26.27](https://github.com/sweetalert2/sweetalert2/compare/v7.26.26...v7.26.27) (2018-09-07)
|
1603 |
+
|
1604 |
+
|
1605 |
+
### Bug Fixes
|
1606 |
+
|
1607 |
+
* **release:** purge jsdelivr cache after releasing a new version ([#1214](https://github.com/sweetalert2/sweetalert2/issues/1214)) ([6229c1f](https://github.com/sweetalert2/sweetalert2/commit/6229c1f))
|
1608 |
+
|
1609 |
+
## [7.26.26](https://github.com/sweetalert2/sweetalert2/compare/v7.26.25...v7.26.26) (2018-09-06)
|
1610 |
+
|
1611 |
+
|
1612 |
+
### Bug Fixes
|
1613 |
+
|
1614 |
+
* **release:** remove --unshallow from fetch ([8f18115](https://github.com/sweetalert2/sweetalert2/commit/8f18115))
|
1615 |
+
|
1616 |
+
## [7.26.25](https://github.com/sweetalert2/sweetalert2/compare/v7.26.24...v7.26.25) (2018-09-06)
|
1617 |
+
|
1618 |
+
|
1619 |
+
### Bug Fixes
|
1620 |
+
|
1621 |
+
* **release:** fix cherry-picking the latest commit to master ([d2da2e1](https://github.com/sweetalert2/sweetalert2/commit/d2da2e1))
|
1622 |
+
|
1623 |
+
## [7.26.24](https://github.com/sweetalert2/sweetalert2/compare/v7.26.23...v7.26.24) (2018-09-06)
|
1624 |
+
|
1625 |
+
|
1626 |
+
### Bug Fixes
|
1627 |
+
|
1628 |
+
* clear changelog and trigger new release ([b652257](https://github.com/sweetalert2/sweetalert2/commit/b652257))
|
assets/{sweetalert/LICENSE.md → sweetalert2/LICENSE}
RENAMED
@@ -1,6 +1,6 @@
|
|
1 |
The MIT License (MIT)
|
2 |
|
3 |
-
Copyright (c) 2014
|
4 |
|
5 |
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6 |
of this software and associated documentation files (the "Software"), to deal
|
1 |
The MIT License (MIT)
|
2 |
|
3 |
+
Copyright (c) 2014 Tristan Edwards & Limon Monte
|
4 |
|
5 |
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6 |
of this software and associated documentation files (the "Software"), to deal
|
assets/sweetalert2/README.md
ADDED
@@ -0,0 +1,263 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<p align="center">
|
2 |
+
<a href="https://github.com/sponsors/limonte">[= Become the :trophy: Ultimate Sponsor of SweetAlert2 and place your banner here (100K+ unique visitors per month) =]</a>
|
3 |
+
</p>
|
4 |
+
|
5 |
+
<p align="center">
|
6 |
+
<a href="https://sweetalert2.github.io/">
|
7 |
+
<img src="/assets/swal2-logo.png" alt="SweetAlert2">
|
8 |
+
</a>
|
9 |
+
</p>
|
10 |
+
|
11 |
+
<p align="center">
|
12 |
+
A beautiful, responsive, customizable, accessible (WAI-ARIA) replacement for JavaScript's popup boxes. Zero dependencies.
|
13 |
+
</p>
|
14 |
+
|
15 |
+
<p align="center">
|
16 |
+
<a href="https://sweetalert2.github.io/">
|
17 |
+
<img src="https://raw.github.com/sweetalert2/sweetalert2/master/assets/sweetalert2.gif" width="562"><br>
|
18 |
+
See SweetAlert2 in action ↗
|
19 |
+
</a>
|
20 |
+
</p>
|
21 |
+
|
22 |
+
<p align="center">
|
23 |
+
<a href="https://github.com/sweetalert2/sweetalert2/actions"><img alt="Build Status" src="https://github.com/sweetalert2/sweetalert2/workflows/build/badge.svg"></a>
|
24 |
+
<a href="https://codeclimate.com/github/sweetalert2/sweetalert2/test_coverage"><img alt="Coverage Status" src="https://api.codeclimate.com/v1/badges/eba34bb80477933854d4/test_coverage"></a>
|
25 |
+
<a href="https://www.npmjs.com/package/sweetalert2"><img alt="Version" src="https://img.shields.io/npm/v/sweetalert2.svg"></a>
|
26 |
+
<a href="https://www.jsdelivr.com/package/npm/sweetalert2"><img alt="jsdelivr" src="https://data.jsdelivr.com/v1/package/npm/sweetalert2/badge?style=rounded"></a>
|
27 |
+
<a href="#support-and-donations"><img alt="Support Donate" src="https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=ea4aaa"></a>
|
28 |
+
</p>
|
29 |
+
|
30 |
+
---
|
31 |
+
|
32 |
+
:shipit: The author of SweetAlert2 ([@limonte](https://github.com/limonte/)) is looking for short-term to medium-term working contracts in front-end, preferably OSS.
|
33 |
+
|
34 |
+
---
|
35 |
+
|
36 |
+
:point_right: **Upgrading from v9.x to v10.x?** [Read the release notes!](https://github.com/sweetalert2/sweetalert2/releases/tag/v10.0.0)
|
37 |
+
<br>If you're upgrading from v8.x, please [upgrade from v8 to v9](https://github.com/sweetalert2/sweetalert2/releases/tag/v10.0.0) first!
|
38 |
+
<br>If you're upgrading from v7.x, please [upgrade from v7 to v8](https://github.com/sweetalert2/sweetalert2/releases/tag/v8.0.0) first!
|
39 |
+
<br>If you're upgrading from v6.x, please [upgrade from v6 to v7](https://github.com/sweetalert2/sweetalert2/releases/tag/v7.0.0) first!
|
40 |
+
|
41 |
+
:point_right: **Migrating from [SweetAlert](https://github.com/t4t5/sweetalert)?** [SweetAlert 1.x to SweetAlert2 migration guide](https://github.com/sweetalert2/sweetalert2/wiki/Migration-from-SweetAlert-to-SweetAlert2)
|
42 |
+
|
43 |
+
---
|
44 |
+
|
45 |
+
Installation
|
46 |
+
------------
|
47 |
+
|
48 |
+
```sh
|
49 |
+
npm install --save sweetalert2
|
50 |
+
```
|
51 |
+
|
52 |
+
Or grab from [jsdelivr CDN](https://www.jsdelivr.com/package/npm/sweetalert2)
|
53 |
+
:
|
54 |
+
|
55 |
+
```html
|
56 |
+
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@10"></script>
|
57 |
+
```
|
58 |
+
|
59 |
+
|
60 |
+
Usage
|
61 |
+
-----
|
62 |
+
|
63 |
+
```html
|
64 |
+
<script src="sweetalert2/dist/sweetalert2.all.min.js"></script>
|
65 |
+
|
66 |
+
<!-- Include a polyfill for ES6 Promises (optional) for IE11 -->
|
67 |
+
<script src="https://cdn.jsdelivr.net/npm/promise-polyfill@8/dist/polyfill.js"></script>
|
68 |
+
```
|
69 |
+
|
70 |
+
You can also include the stylesheet separately if desired:
|
71 |
+
|
72 |
+
```html
|
73 |
+
<script src="sweetalert2/dist/sweetalert2.min.js"></script>
|
74 |
+
<link rel="stylesheet" href="sweetalert2/dist/sweetalert2.min.css">
|
75 |
+
```
|
76 |
+
|
77 |
+
Or:
|
78 |
+
|
79 |
+
```js
|
80 |
+
// ES6 Modules or TypeScript
|
81 |
+
import Swal from 'sweetalert2'
|
82 |
+
|
83 |
+
// CommonJS
|
84 |
+
const Swal = require('sweetalert2')
|
85 |
+
```
|
86 |
+
|
87 |
+
Or with JS modules:
|
88 |
+
|
89 |
+
```html
|
90 |
+
<link rel="stylesheet" href="sweetalert2/dist/sweetalert2.css">
|
91 |
+
|
92 |
+
<script type="module">
|
93 |
+
import Swal from 'sweetalert2/src/sweetalert2.js'
|
94 |
+
</script>
|
95 |
+
```
|
96 |
+
|
97 |
+
It's possible to import JS and CSS separately, e.g. if you need to customize styles:
|
98 |
+
|
99 |
+
```js
|
100 |
+
import Swal from 'sweetalert2/dist/sweetalert2.js'
|
101 |
+
|
102 |
+
import 'sweetalert2/src/sweetalert2.scss'
|
103 |
+
```
|
104 |
+
|
105 |
+
Please note that [TypeScript is well-supported](https://github.com/sweetalert2/sweetalert2/blob/master/sweetalert2.d.ts), so you don't have to install a third-party declaration file.
|
106 |
+
|
107 |
+
|
108 |
+
Examples
|
109 |
+
--------
|
110 |
+
|
111 |
+
The most basic message:
|
112 |
+
|
113 |
+
```js
|
114 |
+
Swal.fire('Hello world!')
|
115 |
+
```
|
116 |
+
|
117 |
+
A message signaling an error:
|
118 |
+
|
119 |
+
```js
|
120 |
+
Swal.fire('Oops...', 'Something went wrong!', 'error')
|
121 |
+
```
|
122 |
+
|
123 |
+
Handling the result of SweetAlert2 modal:
|
124 |
+
|
125 |
+
```js
|
126 |
+
Swal.fire({
|
127 |
+
title: 'Are you sure?',
|
128 |
+
text: 'You will not be able to recover this imaginary file!',
|
129 |
+
icon: 'warning',
|
130 |
+
showCancelButton: true,
|
131 |
+
confirmButtonText: 'Yes, delete it!',
|
132 |
+
cancelButtonText: 'No, keep it'
|
133 |
+
}).then((result) => {
|
134 |
+
if (result.value) {
|
135 |
+
Swal.fire(
|
136 |
+
'Deleted!',
|
137 |
+
'Your imaginary file has been deleted.',
|
138 |
+
'success'
|
139 |
+
)
|
140 |
+
// For more information about handling dismissals please visit
|
141 |
+
// https://sweetalert2.github.io/#handling-dismissals
|
142 |
+
} else if (result.dismiss === Swal.DismissReason.cancel) {
|
143 |
+
Swal.fire(
|
144 |
+
'Cancelled',
|
145 |
+
'Your imaginary file is safe :)',
|
146 |
+
'error'
|
147 |
+
)
|
148 |
+
}
|
149 |
+
})
|
150 |
+
```
|
151 |
+
|
152 |
+
## [Go here to see the docs and more examples ↗](https://sweetalert2.github.io/)
|
153 |
+
|
154 |
+
|
155 |
+
Browser compatibility
|
156 |
+
---------------------
|
157 |
+
|
158 |
+
IE11* | Edge | Chrome | Firefox | Safari | Opera | UC Browser
|
159 |
+
-------|------|--------|---------|--------|-------|------------
|
160 |
+
:heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
|
161 |
+
|
162 |
+
\* ES6 Promise polyfill should be included, see [usage example](#usage).
|
163 |
+
|
164 |
+
Note that SweetAlert2 **does not** and **will not** provide support or functionality of any kind on IE10 and lower.
|
165 |
+
|
166 |
+
|
167 |
+
|
168 |
+
Themes ([`sweetalert2-themes ↗`](https://github.com/sweetalert2/sweetalert2-themes))
|
169 |
+
------
|
170 |
+
|
171 |
+
- [`Dark`](https://github.com/sweetalert2/sweetalert2-themes/tree/master/dark)
|
172 |
+
- [`Minimal`](https://github.com/sweetalert2/sweetalert2-themes/tree/master/minimal)
|
173 |
+
- [`Borderless`](https://github.com/sweetalert2/sweetalert2-themes/tree/master/borderless)
|
174 |
+
- [`Bootstrap 4`](https://github.com/sweetalert2/sweetalert2-themes/tree/master/bootstrap-4)
|
175 |
+
- [`Material UI`](https://github.com/sweetalert2/sweetalert2-themes/tree/master/material-ui)
|
176 |
+
- [`WordPress Admin`](https://github.com/sweetalert2/sweetalert2-themes/tree/master/wordpress-admin)
|
177 |
+
- [`Bulma`](https://github.com/sweetalert2/sweetalert2-themes/tree/master/bulma)
|
178 |
+
- [`Default`](https://github.com/sweetalert2/sweetalert2-themes/tree/master/default)
|
179 |
+
|
180 |
+
|
181 |
+
Related projects
|
182 |
+
-------------------------
|
183 |
+
|
184 |
+
- [ngx-sweetalert2](https://github.com/sweetalert2/ngx-sweetalert2) - Angular 4+ integration
|
185 |
+
- [sweetalert2-react-content](https://github.com/sweetalert2/sweetalert2-react-content) - React integration
|
186 |
+
- [sweetalert2-webpack-demo](https://github.com/sweetalert2/sweetalert2-webpack-demo) - webpack demo
|
187 |
+
- [sweetalert2-parcel-demo](https://github.com/sweetalert2/sweetalert2-parcel-demo) - overriding SCSS variables demo
|
188 |
+
|
189 |
+
|
190 |
+
Related community projects
|
191 |
+
-------------------------
|
192 |
+
|
193 |
+
- [avil13/vue-sweetalert2](https://github.com/avil13/vue-sweetalert2) - Vue.js wrapper
|
194 |
+
- [realrashid/sweet-alert](https://github.com/realrashid/sweet-alert) - Laravel 5 Package
|
195 |
+
- [Basaingeal/Razor.SweetAlert2](https://github.com/Basaingeal/Razor.SweetAlert2) - Blazor Wrapper
|
196 |
+
- [ElectronAlert](https://electron.guide/electron-alert/) - SweetAlert2 for Electron applications (main process)
|
197 |
+
|
198 |
+
|
199 |
+
Collaborators
|
200 |
+
-------------
|
201 |
+
|
202 |
+
[![](https://avatars3.githubusercontent.com/u/17089396?v=4&s=80)](https://github.com/gverni) | [![](https://avatars3.githubusercontent.com/u/3198597?v=4&s=80)](https://github.com/zenflow) | [![](https://avatars1.githubusercontent.com/u/1343250?v=4&s=80)](https://github.com/toverux)
|
203 |
+
-|-|-
|
204 |
+
[@gverni](https://github.com/gverni) | [@zenflow](https://github.com/zenflow) | [@toverux](https://github.com/toverux)
|
205 |
+
|
206 |
+
|
207 |
+
Contributing
|
208 |
+
------------
|
209 |
+
|
210 |
+
[![Maintainability](https://api.codeclimate.com/v1/badges/eba34bb80477933854d4/maintainability)](https://codeclimate.com/github/sweetalert2/sweetalert2/maintainability)
|
211 |
+
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/sweetalert2/sweetalert2/blob/master/CHANGELOG.md)
|
212 |
+
|
213 |
+
If you would like to contribute enhancements or fixes, please do the following:
|
214 |
+
|
215 |
+
1. Fork the `sweetalert2` repository and clone it locally.
|
216 |
+
|
217 |
+
2. Make sure you have [npm](https://www.npmjs.com/) or [yarn](https://yarnpkg.com/) installed.
|
218 |
+
|
219 |
+
3. When in the SweetAlert2 directory, run `npm install` or `yarn install` to install dependencies.
|
220 |
+
|
221 |
+
4. To begin active development, run `npm start` or `yarn start`. This does several things for you:
|
222 |
+
- Builds the `dist` folder
|
223 |
+
- Serves sandbox.html @ http://localhost:8080/ (browser-sync ui: http://localhost:8081/)
|
224 |
+
- Re-builds and re-loads as necessary when files change
|
225 |
+
|
226 |
+
Big Thanks
|
227 |
+
----------
|
228 |
+
|
229 |
+
- [Serena Verni (@serenaperora)](https://serena.verni.xyz) for creating the amazing project logo
|
230 |
+
- [Sauce Labs](https://saucelabs.com/) for providing the reliable cross-browser testing platform
|
231 |
+
|
232 |
+
Sponsors
|
233 |
+
--------
|
234 |
+
|
235 |
+
[<img src="https://sweetalert2.github.io/images/sponsors/flowcrypt-banner.png">](https://flowcrypt.com/?utm_source=sweetalert2&utm_medium=banner)
|
236 |
+
|
237 |
+
[<img src="https://sweetalert2.github.io/images/plus.png" width="80">](SPONSORS.md) | [<img src="https://avatars2.githubusercontent.com/u/28631236?s=80&v=4" width="80">](https://flowcrypt.com/?utm_source=sweetalert2&utm_medium=logo) | [<img src="https://sweetalert2.github.io/images/sponsors/brainbi.png" width="80">](https://www.brainbi.dev/) | [<img src="https://avatars0.githubusercontent.com/u/3986989?s=80&v=4" width="80">](https://github.com/tiagostutz)
|
238 |
+
-|-|-|-
|
239 |
+
[Become a sponsor](SPONSORS.md) | [FlowCrypt](https://flowcrypt.com/?utm_source=sweetalert2&utm_medium=logo) | [brainbi price monitoring](https://www.brainbi.dev/) | [Tiago de Oliveira Stutz](https://github.com/tiagostutz)
|
240 |
+
|
241 |
+
[<img src="https://sweetalert2.github.io/images/sponsors/zillathemes.jpg" width="80">](https://zillathemes.com/) | [<img src="https://sweetalert2.github.io/images/sponsors/sebaebc.png" width="80">](https://github.com/sebaebc) | [<img src="https://sweetalert2.github.io/images/sponsors/wp-reset.png" width="80">](https://wpreset.com/?utm_source=sweetalert2&utm_medium=logo)
|
242 |
+
-|-|-
|
243 |
+
[Zilla Themes](https://zillathemes.com/) | [SebaEBC](https://github.com/sebaebc) | [WP Reset](https://wpreset.com/?utm_source=sweetalert2&utm_medium=logo)
|
244 |
+
|
245 |
+
NSFW Sponsors
|
246 |
+
-------------
|
247 |
+
|
248 |
+
[<img src="https://sweetalert2.github.io/images/sponsors/twerkingbutt.jpg" width="80">](https://twerkingbutt.com/?utm_source=sweetalert2&utm_medium=logo) | [<img src="https://sweetalert2.github.io/images/sponsors/sex-toy-education.png" width="80">](https://sextoyeducation.com/?utm_source=sweetalert2&utm_medium=logo) | [<img src="https://sweetalert2.github.io/images/sponsors/sextopedia.png" width="80">](https://sextopedia.com/?utm_source=sweetalert2&utm_medium=logo) | [<img src="https://sweetalert2.github.io/images/sponsors/my-sex-toy-guide.jpg" width="80">](https://www.mysextoyguide.com/?utm_source=sweetalert2&utm_medium=logo) | [<img src="https://sweetalert2.github.io/images/sponsors/best-blowjob-machines.jpg" width="80">](https://www.bestblowjobmachines.com/?utm_source=sweetalert2&utm_medium=logo) | [<img src="https://sweetalert2.github.io/images/sponsors/yourdoll.jpg" width="80">](https://www.yourdoll.com/?utm_source=sweetalert2&utm_medium=logo)
|
249 |
+
-|-|-|-|-|-
|
250 |
+
[Twerking Butt](https://twerkingbutt.com/?utm_source=sweetalert2&utm_medium=logo) | [STED](https://sextoyeducation.com/?utm_source=sweetalert2&utm_medium=logo) | [Sextopedia](https://sextopedia.com/?utm_source=sweetalert2&utm_medium=logo) | [My Sex Toy Guide](https://www.mysextoyguide.com/?utm_source=sweetalert2&utm_medium=logo) | [Best Blowjob Machines](https://www.bestblowjobmachines.com/?utm_source=sweetalert2&utm_medium=logo) | [YourDoll](https://www.yourdoll.com/?utm_source=sweetalert2&utm_medium=logo)
|
251 |
+
|
252 |
+
[<img src="https://sweetalert2.github.io/images/sponsors/celebjihad.png" width="80">](https://celebjihad.ltd/?utm_source=sweetalert2&utm_medium=logo) | [<img src="https://sweetalert2.github.io/images/sponsors/sextoycollective.jpg" width="80">](https://sextoycollective.com/?utm_source=sweetalert2&utm_medium=logo) | [<img src="https://sweetalert2.github.io/images/sponsors/bingato.png" width="80">](https://bingato.com/?utm_source=sweetalert2&utm_medium=logo) | [<img src="https://sweetalert2.github.io/images/sponsors/realsexdoll.png" width="80">](https://realsexdoll.com/?utm_source=sweetalert2&utm_medium=logo)| [<img src="https://sweetalert2.github.io/images/sponsors/doctorclimax.png" width="80">](https://doctorclimax.com/)
|
253 |
+
-|-|-|-|-
|
254 |
+
[Celebjihad](https://celebjihad.ltd/?utm_source=sweetalert2&utm_medium=logo) | [STC](https://sextoycollective.com/?utm_source=sweetalert2&utm_medium=logo) | [Bingato](https://bingato.com/?utm_source=sweetalert2&utm_medium=logo) | [RealSexDoll](https://realsexdoll.com/?utm_source=sweetalert2&utm_medium=logo) | [DoctorClimax](https://doctorclimax.com/)
|
255 |
+
|
256 |
+
Support and Donations
|
257 |
+
---------------------
|
258 |
+
|
259 |
+
Has SweetAlert2 helped you create an amazing application? You can show your support via [GitHub Sponsors](https://github.com/sponsors/limonte)
|
260 |
+
|
261 |
+
Alternative ways for donations (PayPal, cryptocurrencies, etc.) are listed here: https://sweetalert2.github.io/#donations
|
262 |
+
|
263 |
+
### [Hall of Donators :trophy:](DONATIONS.md)
|
assets/sweetalert2/dist/sweetalert2.all.js
ADDED
@@ -0,0 +1,3371 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* sweetalert2 v10.6.1
|
3 |
+
* Released under the MIT License.
|
4 |
+
*/
|
5 |
+
(function (global, factory) {
|
6 |
+
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
7 |
+
typeof define === 'function' && define.amd ? define(factory) :
|
8 |
+
(global = global || self, global.Sweetalert2 = factory());
|
9 |
+
}(this, function () { 'use strict';
|
10 |
+
|
11 |
+
function _typeof(obj) {
|
12 |
+
"@babel/helpers - typeof";
|
13 |
+
|
14 |
+
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
15 |
+
_typeof = function (obj) {
|
16 |
+
return typeof obj;
|
17 |
+
};
|
18 |
+
} else {
|
19 |
+
_typeof = function (obj) {
|
20 |
+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
21 |
+
};
|
22 |
+
}
|
23 |
+
|
24 |
+
return _typeof(obj);
|
25 |
+
}
|
26 |
+
|
27 |
+
function _classCallCheck(instance, Constructor) {
|
28 |
+
if (!(instance instanceof Constructor)) {
|
29 |
+
throw new TypeError("Cannot call a class as a function");
|
30 |
+
}
|
31 |
+
}
|
32 |
+
|
33 |
+
function _defineProperties(target, props) {
|
34 |
+
for (var i = 0; i < props.length; i++) {
|
35 |
+
var descriptor = props[i];
|
36 |
+
descriptor.enumerable = descriptor.enumerable || false;
|
37 |
+
descriptor.configurable = true;
|
38 |
+
if ("value" in descriptor) descriptor.writable = true;
|
39 |
+
Object.defineProperty(target, descriptor.key, descriptor);
|
40 |
+
}
|
41 |
+
}
|
42 |
+
|
43 |
+
function _createClass(Constructor, protoProps, staticProps) {
|
44 |
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
45 |
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
46 |
+
return Constructor;
|
47 |
+
}
|
48 |
+
|
49 |
+
function _extends() {
|
50 |
+
_extends = Object.assign || function (target) {
|
51 |
+
for (var i = 1; i < arguments.length; i++) {
|
52 |
+
var source = arguments[i];
|
53 |
+
|
54 |
+
for (var key in source) {
|
55 |
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
56 |
+
target[key] = source[key];
|
57 |
+
}
|
58 |
+
}
|
59 |
+
}
|
60 |
+
|
61 |
+
return target;
|
62 |
+
};
|
63 |
+
|
64 |
+
return _extends.apply(this, arguments);
|
65 |
+
}
|
66 |
+
|
67 |
+
function _inherits(subClass, superClass) {
|
68 |
+
if (typeof superClass !== "function" && superClass !== null) {
|
69 |
+
throw new TypeError("Super expression must either be null or a function");
|
70 |
+
}
|
71 |
+
|
72 |
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
73 |
+
constructor: {
|
74 |
+
value: subClass,
|
75 |
+
writable: true,
|
76 |
+
configurable: true
|
77 |
+
}
|
78 |
+
});
|
79 |
+
if (superClass) _setPrototypeOf(subClass, superClass);
|
80 |
+
}
|
81 |
+
|
82 |
+
function _getPrototypeOf(o) {
|
83 |
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
84 |
+
return o.__proto__ || Object.getPrototypeOf(o);
|
85 |
+
};
|
86 |
+
return _getPrototypeOf(o);
|
87 |
+
}
|
88 |
+
|
89 |
+
function _setPrototypeOf(o, p) {
|
90 |
+
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
91 |
+
o.__proto__ = p;
|
92 |
+
return o;
|
93 |
+
};
|
94 |
+
|
95 |
+
return _setPrototypeOf(o, p);
|
96 |
+
}
|
97 |
+
|
98 |
+
function _isNativeReflectConstruct() {
|
99 |
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
100 |
+
if (Reflect.construct.sham) return false;
|
101 |
+
if (typeof Proxy === "function") return true;
|
102 |
+
|
103 |
+
try {
|
104 |
+
Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));
|
105 |
+
return true;
|
106 |
+
} catch (e) {
|
107 |
+
return false;
|
108 |
+
}
|
109 |
+
}
|
110 |
+
|
111 |
+
function _construct(Parent, args, Class) {
|
112 |
+
if (_isNativeReflectConstruct()) {
|
113 |
+
_construct = Reflect.construct;
|
114 |
+
} else {
|
115 |
+
_construct = function _construct(Parent, args, Class) {
|
116 |
+
var a = [null];
|
117 |
+
a.push.apply(a, args);
|
118 |
+
var Constructor = Function.bind.apply(Parent, a);
|
119 |
+
var instance = new Constructor();
|
120 |
+
if (Class) _setPrototypeOf(instance, Class.prototype);
|
121 |
+
return instance;
|
122 |
+
};
|
123 |
+
}
|
124 |
+
|
125 |
+
return _construct.apply(null, arguments);
|
126 |
+
}
|
127 |
+
|
128 |
+
function _assertThisInitialized(self) {
|
129 |
+
if (self === void 0) {
|
130 |
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
131 |
+
}
|
132 |
+
|
133 |
+
return self;
|
134 |
+
}
|
135 |
+
|
136 |
+
function _possibleConstructorReturn(self, call) {
|
137 |
+
if (call && (typeof call === "object" || typeof call === "function")) {
|
138 |
+
return call;
|
139 |
+
}
|
140 |
+
|
141 |
+
return _assertThisInitialized(self);
|
142 |
+
}
|
143 |
+
|
144 |
+
function _createSuper(Derived) {
|
145 |
+
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
146 |
+
|
147 |
+
return function _createSuperInternal() {
|
148 |
+
var Super = _getPrototypeOf(Derived),
|
149 |
+
result;
|
150 |
+
|
151 |
+
if (hasNativeReflectConstruct) {
|
152 |
+
var NewTarget = _getPrototypeOf(this).constructor;
|
153 |
+
|
154 |
+
result = Reflect.construct(Super, arguments, NewTarget);
|
155 |
+
} else {
|
156 |
+
result = Super.apply(this, arguments);
|
157 |
+
}
|
158 |
+
|
159 |
+
return _possibleConstructorReturn(this, result);
|
160 |
+
};
|
161 |
+
}
|
162 |
+
|
163 |
+
function _superPropBase(object, property) {
|
164 |
+
while (!Object.prototype.hasOwnProperty.call(object, property)) {
|
165 |
+
object = _getPrototypeOf(object);
|
166 |
+
if (object === null) break;
|
167 |
+
}
|
168 |
+
|
169 |
+
return object;
|
170 |
+
}
|
171 |
+
|
172 |
+
function _get(target, property, receiver) {
|
173 |
+
if (typeof Reflect !== "undefined" && Reflect.get) {
|
174 |
+
_get = Reflect.get;
|
175 |
+
} else {
|
176 |
+
_get = function _get(target, property, receiver) {
|
177 |
+
var base = _superPropBase(target, property);
|
178 |
+
|
179 |
+
if (!base) return;
|
180 |
+
var desc = Object.getOwnPropertyDescriptor(base, property);
|
181 |
+
|
182 |
+
if (desc.get) {
|
183 |
+
return desc.get.call(receiver);
|
184 |
+
}
|
185 |
+
|
186 |
+
return desc.value;
|
187 |
+
};
|
188 |
+
}
|
189 |
+
|
190 |
+
return _get(target, property, receiver || target);
|
191 |
+
}
|
192 |
+
|
193 |
+
var consolePrefix = 'SweetAlert2:';
|
194 |
+
/**
|
195 |
+
* Filter the unique values into a new array
|
196 |
+
* @param arr
|
197 |
+
*/
|
198 |
+
|
199 |
+
var uniqueArray = function uniqueArray(arr) {
|
200 |
+
var result = [];
|
201 |
+
|
202 |
+
for (var i = 0; i < arr.length; i++) {
|
203 |
+
if (result.indexOf(arr[i]) === -1) {
|
204 |
+
result.push(arr[i]);
|
205 |
+
}
|
206 |
+
}
|
207 |
+
|
208 |
+
return result;
|
209 |
+
};
|
210 |
+
/**
|
211 |
+
* Capitalize the first letter of a string
|
212 |
+
* @param str
|
213 |
+
*/
|
214 |
+
|
215 |
+
var capitalizeFirstLetter = function capitalizeFirstLetter(str) {
|
216 |
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
217 |
+
};
|
218 |
+
/**
|
219 |
+
* Returns the array of object values (Object.values isn't supported in IE11)
|
220 |
+
* @param obj
|
221 |
+
*/
|
222 |
+
|
223 |
+
var objectValues = function objectValues(obj) {
|
224 |
+
return Object.keys(obj).map(function (key) {
|
225 |
+
return obj[key];
|
226 |
+
});
|
227 |
+
};
|
228 |
+
/**
|
229 |
+
* Convert NodeList to Array
|
230 |
+
* @param nodeList
|
231 |
+
*/
|
232 |
+
|
233 |
+
var toArray = function toArray(nodeList) {
|
234 |
+
return Array.prototype.slice.call(nodeList);
|
235 |
+
};
|
236 |
+
/**
|
237 |
+
* Standardise console warnings
|
238 |
+
* @param message
|
239 |
+
*/
|
240 |
+
|
241 |
+
var warn = function warn(message) {
|
242 |
+
console.warn("".concat(consolePrefix, " ").concat(message));
|
243 |
+
};
|
244 |
+
/**
|
245 |
+
* Standardise console errors
|
246 |
+
* @param message
|
247 |
+
*/
|
248 |
+
|
249 |
+
var error = function error(message) {
|
250 |
+
console.error("".concat(consolePrefix, " ").concat(message));
|
251 |
+
};
|
252 |
+
/**
|
253 |
+
* Private global state for `warnOnce`
|
254 |
+
* @type {Array}
|
255 |
+
* @private
|
256 |
+
*/
|
257 |
+
|
258 |
+
var previousWarnOnceMessages = [];
|
259 |
+
/**
|
260 |
+
* Show a console warning, but only if it hasn't already been shown
|
261 |
+
* @param message
|
262 |
+
*/
|
263 |
+
|
264 |
+
var warnOnce = function warnOnce(message) {
|
265 |
+
if (!(previousWarnOnceMessages.indexOf(message) !== -1)) {
|
266 |
+
previousWarnOnceMessages.push(message);
|
267 |
+
warn(message);
|
268 |
+
}
|
269 |
+
};
|
270 |
+
/**
|
271 |
+
* Show a one-time console warning about deprecated params/methods
|
272 |
+
*/
|
273 |
+
|
274 |
+
var warnAboutDeprecation = function warnAboutDeprecation(deprecatedParam, useInstead) {
|
275 |
+
warnOnce("\"".concat(deprecatedParam, "\" is deprecated and will be removed in the next major release. Please use \"").concat(useInstead, "\" instead."));
|
276 |
+
};
|
277 |
+
/**
|
278 |
+
* If `arg` is a function, call it (with no arguments or context) and return the result.
|
279 |
+
* Otherwise, just pass the value through
|
280 |
+
* @param arg
|
281 |
+
*/
|
282 |
+
|
283 |
+
var callIfFunction = function callIfFunction(arg) {
|
284 |
+
return typeof arg === 'function' ? arg() : arg;
|
285 |
+
};
|
286 |
+
var hasToPromiseFn = function hasToPromiseFn(arg) {
|
287 |
+
return arg && typeof arg.toPromise === 'function';
|
288 |
+
};
|
289 |
+
var asPromise = function asPromise(arg) {
|
290 |
+
return hasToPromiseFn(arg) ? arg.toPromise() : Promise.resolve(arg);
|
291 |
+
};
|
292 |
+
var isPromise = function isPromise(arg) {
|
293 |
+
return arg && Promise.resolve(arg) === arg;
|
294 |
+
};
|
295 |
+
|
296 |
+
var DismissReason = Object.freeze({
|
297 |
+
cancel: 'cancel',
|
298 |
+
backdrop: 'backdrop',
|
299 |
+
close: 'close',
|
300 |
+
esc: 'esc',
|
301 |
+
timer: 'timer'
|
302 |
+
});
|
303 |
+
|
304 |
+
var isJqueryElement = function isJqueryElement(elem) {
|
305 |
+
return _typeof(elem) === 'object' && elem.jquery;
|
306 |
+
};
|
307 |
+
|
308 |
+
var isElement = function isElement(elem) {
|
309 |
+
return elem instanceof Element || isJqueryElement(elem);
|
310 |
+
};
|
311 |
+
|
312 |
+
var argsToParams = function argsToParams(args) {
|
313 |
+
var params = {};
|
314 |
+
|
315 |
+
if (_typeof(args[0]) === 'object' && !isElement(args[0])) {
|
316 |
+
_extends(params, args[0]);
|
317 |
+
} else {
|
318 |
+
['title', 'html', 'icon'].forEach(function (name, index) {
|
319 |
+
var arg = args[index];
|
320 |
+
|
321 |
+
if (typeof arg === 'string' || isElement(arg)) {
|
322 |
+
params[name] = arg;
|
323 |
+
} else if (arg !== undefined) {
|
324 |
+
error("Unexpected type of ".concat(name, "! Expected \"string\" or \"Element\", got ").concat(_typeof(arg)));
|
325 |
+
}
|
326 |
+
});
|
327 |
+
}
|
328 |
+
|
329 |
+
return params;
|
330 |
+
};
|
331 |
+
|
332 |
+
var swalPrefix = 'swal2-';
|
333 |
+
var prefix = function prefix(items) {
|
334 |
+
var result = {};
|
335 |
+
|
336 |
+
for (var i in items) {
|
337 |
+
result[items[i]] = swalPrefix + items[i];
|
338 |
+
}
|
339 |
+
|
340 |
+
return result;
|
341 |
+
};
|
342 |
+
var swalClasses = prefix(['container', 'shown', 'height-auto', 'iosfix', 'popup', 'modal', 'no-backdrop', 'no-transition', 'toast', 'toast-shown', 'toast-column', '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']);
|
343 |
+
var iconTypes = prefix(['success', 'warning', 'info', 'question', 'error']);
|
344 |
+
|
345 |
+
var getContainer = function getContainer() {
|
346 |
+
return document.body.querySelector(".".concat(swalClasses.container));
|
347 |
+
};
|
348 |
+
var elementBySelector = function elementBySelector(selectorString) {
|
349 |
+
var container = getContainer();
|
350 |
+
return container ? container.querySelector(selectorString) : null;
|
351 |
+
};
|
352 |
+
|
353 |
+
var elementByClass = function elementByClass(className) {
|
354 |
+
return elementBySelector(".".concat(className));
|
355 |
+
};
|
356 |
+
|
357 |
+
var getPopup = function getPopup() {
|
358 |
+
return elementByClass(swalClasses.popup);
|
359 |
+
};
|
360 |
+
var getIcons = function getIcons() {
|
361 |
+
var popup = getPopup();
|
362 |
+
return toArray(popup.querySelectorAll(".".concat(swalClasses.icon)));
|
363 |
+
};
|
364 |
+
var getIcon = function getIcon() {
|
365 |
+
var visibleIcon = getIcons().filter(function (icon) {
|
366 |
+
return isVisible(icon);
|
367 |
+
});
|
368 |
+
return visibleIcon.length ? visibleIcon[0] : null;
|
369 |
+
};
|
370 |
+
var getTitle = function getTitle() {
|
371 |
+
return elementByClass(swalClasses.title);
|
372 |
+
};
|
373 |
+
var getContent = function getContent() {
|
374 |
+
return elementByClass(swalClasses.content);
|
375 |
+
};
|
376 |
+
var getHtmlContainer = function getHtmlContainer() {
|
377 |
+
return elementByClass(swalClasses['html-container']);
|
378 |
+
};
|
379 |
+
var getImage = function getImage() {
|
380 |
+
return elementByClass(swalClasses.image);
|
381 |
+
};
|
382 |
+
var getProgressSteps = function getProgressSteps() {
|
383 |
+
return elementByClass(swalClasses['progress-steps']);
|
384 |
+
};
|
385 |
+
var getValidationMessage = function getValidationMessage() {
|
386 |
+
return elementByClass(swalClasses['validation-message']);
|
387 |
+
};
|
388 |
+
var getConfirmButton = function getConfirmButton() {
|
389 |
+
return elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.confirm));
|
390 |
+
};
|
391 |
+
var getDenyButton = function getDenyButton() {
|
392 |
+
return elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.deny));
|
393 |
+
};
|
394 |
+
var getInputLabel = function getInputLabel() {
|
395 |
+
return elementByClass(swalClasses['input-label']);
|
396 |
+
};
|
397 |
+
var getLoader = function getLoader() {
|
398 |
+
return elementBySelector(".".concat(swalClasses.loader));
|
399 |
+
};
|
400 |
+
var getCancelButton = function getCancelButton() {
|
401 |
+
return elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.cancel));
|
402 |
+
};
|
403 |
+
var getActions = function getActions() {
|
404 |
+
return elementByClass(swalClasses.actions);
|
405 |
+
};
|
406 |
+
var getHeader = function getHeader() {
|
407 |
+
return elementByClass(swalClasses.header);
|
408 |
+
};
|
409 |
+
var getFooter = function getFooter() {
|
410 |
+
return elementByClass(swalClasses.footer);
|
411 |
+
};
|
412 |
+
var getTimerProgressBar = function getTimerProgressBar() {
|
413 |
+
return elementByClass(swalClasses['timer-progress-bar']);
|
414 |
+
};
|
415 |
+
var getCloseButton = function getCloseButton() {
|
416 |
+
return elementByClass(swalClasses.close);
|
417 |
+
}; // https://github.com/jkup/focusable/blob/master/index.js
|
418 |
+
|
419 |
+
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";
|
420 |
+
var getFocusableElements = function getFocusableElements() {
|
421 |
+
var focusableElementsWithTabindex = toArray(getPopup().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')) // sort according to tabindex
|
422 |
+
.sort(function (a, b) {
|
423 |
+
a = parseInt(a.getAttribute('tabindex'));
|
424 |
+
b = parseInt(b.getAttribute('tabindex'));
|
425 |
+
|
426 |
+
if (a > b) {
|
427 |
+
return 1;
|
428 |
+
} else if (a < b) {
|
429 |
+
return -1;
|
430 |
+
}
|
431 |
+
|
432 |
+
return 0;
|
433 |
+
});
|
434 |
+
var otherFocusableElements = toArray(getPopup().querySelectorAll(focusable)).filter(function (el) {
|
435 |
+
return el.getAttribute('tabindex') !== '-1';
|
436 |
+
});
|
437 |
+
return uniqueArray(focusableElementsWithTabindex.concat(otherFocusableElements)).filter(function (el) {
|
438 |
+
return isVisible(el);
|
439 |
+
});
|
440 |
+
};
|
441 |
+
var isModal = function isModal() {
|
442 |
+
return !isToast() && !document.body.classList.contains(swalClasses['no-backdrop']);
|
443 |
+
};
|
444 |
+
var isToast = function isToast() {
|
445 |
+
return document.body.classList.contains(swalClasses['toast-shown']);
|
446 |
+
};
|
447 |
+
var isLoading = function isLoading() {
|
448 |
+
return getPopup().hasAttribute('data-loading');
|
449 |
+
};
|
450 |
+
|
451 |
+
var states = {
|
452 |
+
previousBodyPadding: null
|
453 |
+
};
|
454 |
+
var setInnerHtml = function setInnerHtml(elem, html) {
|
455 |
+
// #1926
|
456 |
+
elem.textContent = '';
|
457 |
+
|
458 |
+
if (html) {
|
459 |
+
var parser = new DOMParser();
|
460 |
+
var parsed = parser.parseFromString(html, "text/html");
|
461 |
+
toArray(parsed.querySelector('head').childNodes).forEach(function (child) {
|
462 |
+
elem.appendChild(child);
|
463 |
+
});
|
464 |
+
toArray(parsed.querySelector('body').childNodes).forEach(function (child) {
|
465 |
+
elem.appendChild(child);
|
466 |
+
});
|
467 |
+
}
|
468 |
+
};
|
469 |
+
var hasClass = function hasClass(elem, className) {
|
470 |
+
if (!className) {
|
471 |
+
return false;
|
472 |
+
}
|
473 |
+
|
474 |
+
var classList = className.split(/\s+/);
|
475 |
+
|
476 |
+
for (var i = 0; i < classList.length; i++) {
|
477 |
+
if (!elem.classList.contains(classList[i])) {
|
478 |
+
return false;
|
479 |
+
}
|
480 |
+
}
|
481 |
+
|
482 |
+
return true;
|
483 |
+
};
|
484 |
+
|
485 |
+
var removeCustomClasses = function removeCustomClasses(elem, params) {
|
486 |
+
toArray(elem.classList).forEach(function (className) {
|
487 |
+
if (!(objectValues(swalClasses).indexOf(className) !== -1) && !(objectValues(iconTypes).indexOf(className) !== -1) && !(objectValues(params.showClass).indexOf(className) !== -1)) {
|
488 |
+
elem.classList.remove(className);
|
489 |
+
}
|
490 |
+
});
|
491 |
+
};
|
492 |
+
|
493 |
+
var applyCustomClass = function applyCustomClass(elem, params, className) {
|
494 |
+
removeCustomClasses(elem, params);
|
495 |
+
|
496 |
+
if (params.customClass && params.customClass[className]) {
|
497 |
+
if (typeof params.customClass[className] !== 'string' && !params.customClass[className].forEach) {
|
498 |
+
return warn("Invalid type of customClass.".concat(className, "! Expected string or iterable object, got \"").concat(_typeof(params.customClass[className]), "\""));
|
499 |
+
}
|
500 |
+
|
501 |
+
addClass(elem, params.customClass[className]);
|
502 |
+
}
|
503 |
+
};
|
504 |
+
function getInput(content, inputType) {
|
505 |
+
if (!inputType) {
|
506 |
+
return null;
|
507 |
+
}
|
508 |
+
|
509 |
+
switch (inputType) {
|
510 |
+
case 'select':
|
511 |
+
case 'textarea':
|
512 |
+
case 'file':
|
513 |
+
return getChildByClass(content, swalClasses[inputType]);
|
514 |
+
|
515 |
+
case 'checkbox':
|
516 |
+
return content.querySelector(".".concat(swalClasses.checkbox, " input"));
|
517 |
+
|
518 |
+
case 'radio':
|
519 |
+
return content.querySelector(".".concat(swalClasses.radio, " input:checked")) || content.querySelector(".".concat(swalClasses.radio, " input:first-child"));
|
520 |
+
|
521 |
+
case 'range':
|
522 |
+
return content.querySelector(".".concat(swalClasses.range, " input"));
|
523 |
+
|
524 |
+
default:
|
525 |
+
return getChildByClass(content, swalClasses.input);
|
526 |
+
}
|
527 |
+
}
|
528 |
+
var focusInput = function focusInput(input) {
|
529 |
+
input.focus(); // place cursor at end of text in text input
|
530 |
+
|
531 |
+
if (input.type !== 'file') {
|
532 |
+
// http://stackoverflow.com/a/2345915
|
533 |
+
var val = input.value;
|
534 |
+
input.value = '';
|
535 |
+
input.value = val;
|
536 |
+
}
|
537 |
+
};
|
538 |
+
var toggleClass = function toggleClass(target, classList, condition) {
|
539 |
+
if (!target || !classList) {
|
540 |
+
return;
|
541 |
+
}
|
542 |
+
|
543 |
+
if (typeof classList === 'string') {
|
544 |
+
classList = classList.split(/\s+/).filter(Boolean);
|
545 |
+
}
|
546 |
+
|
547 |
+
classList.forEach(function (className) {
|
548 |
+
if (target.forEach) {
|
549 |
+
target.forEach(function (elem) {
|
550 |
+
condition ? elem.classList.add(className) : elem.classList.remove(className);
|
551 |
+
});
|
552 |
+
} else {
|
553 |
+
condition ? target.classList.add(className) : target.classList.remove(className);
|
554 |
+
}
|
555 |
+
});
|
556 |
+
};
|
557 |
+
var addClass = function addClass(target, classList) {
|
558 |
+
toggleClass(target, classList, true);
|
559 |
+
};
|
560 |
+
var removeClass = function removeClass(target, classList) {
|
561 |
+
toggleClass(target, classList, false);
|
562 |
+
};
|
563 |
+
var getChildByClass = function getChildByClass(elem, className) {
|
564 |
+
for (var i = 0; i < elem.childNodes.length; i++) {
|
565 |
+
if (hasClass(elem.childNodes[i], className)) {
|
566 |
+
return elem.childNodes[i];
|
567 |
+
}
|
568 |
+
}
|
569 |
+
};
|
570 |
+
var applyNumericalStyle = function applyNumericalStyle(elem, property, value) {
|
571 |
+
if (value || parseInt(value) === 0) {
|
572 |
+
elem.style[property] = typeof value === 'number' ? "".concat(value, "px") : value;
|
573 |
+
} else {
|
574 |
+
elem.style.removeProperty(property);
|
575 |
+
}
|
576 |
+
};
|
577 |
+
var show = function show(elem) {
|
578 |
+
var display = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'flex';
|
579 |
+
elem.style.display = display;
|
580 |
+
};
|
581 |
+
var hide = function hide(elem) {
|
582 |
+
elem.style.display = 'none';
|
583 |
+
};
|
584 |
+
var setStyle = function setStyle(parent, selector, property, value) {
|
585 |
+
var el = parent.querySelector(selector);
|
586 |
+
|
587 |
+
if (el) {
|
588 |
+
el.style[property] = value;
|
589 |
+
}
|
590 |
+
};
|
591 |
+
var toggle = function toggle(elem, condition, display) {
|
592 |
+
condition ? show(elem, display) : hide(elem);
|
593 |
+
}; // borrowed from jquery $(elem).is(':visible') implementation
|
594 |
+
|
595 |
+
var isVisible = function isVisible(elem) {
|
596 |
+
return !!(elem && (elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length));
|
597 |
+
};
|
598 |
+
/* istanbul ignore next */
|
599 |
+
|
600 |
+
var isScrollable = function isScrollable(elem) {
|
601 |
+
return !!(elem.scrollHeight > elem.clientHeight);
|
602 |
+
}; // borrowed from https://stackoverflow.com/a/46352119
|
603 |
+
|
604 |
+
var hasCssAnimation = function hasCssAnimation(elem) {
|
605 |
+
var style = window.getComputedStyle(elem);
|
606 |
+
var animDuration = parseFloat(style.getPropertyValue('animation-duration') || '0');
|
607 |
+
var transDuration = parseFloat(style.getPropertyValue('transition-duration') || '0');
|
608 |
+
return animDuration > 0 || transDuration > 0;
|
609 |
+
};
|
610 |
+
var contains = function contains(haystack, needle) {
|
611 |
+
if (typeof haystack.contains === 'function') {
|
612 |
+
return haystack.contains(needle);
|
613 |
+
}
|
614 |
+
};
|
615 |
+
var animateTimerProgressBar = function animateTimerProgressBar(timer) {
|
616 |
+
var reset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
617 |
+
var timerProgressBar = getTimerProgressBar();
|
618 |
+
|
619 |
+
if (isVisible(timerProgressBar)) {
|
620 |
+
if (reset) {
|
621 |
+
timerProgressBar.style.transition = 'none';
|
622 |
+
timerProgressBar.style.width = '100%';
|
623 |
+
}
|
624 |
+
|
625 |
+
setTimeout(function () {
|
626 |
+
timerProgressBar.style.transition = "width ".concat(timer / 1000, "s linear");
|
627 |
+
timerProgressBar.style.width = '0%';
|
628 |
+
}, 10);
|
629 |
+
}
|
630 |
+
};
|
631 |
+
var stopTimerProgressBar = function stopTimerProgressBar() {
|
632 |
+
var timerProgressBar = getTimerProgressBar();
|
633 |
+
var timerProgressBarWidth = parseInt(window.getComputedStyle(timerProgressBar).width);
|
634 |
+
timerProgressBar.style.removeProperty('transition');
|
635 |
+
timerProgressBar.style.width = '100%';
|
636 |
+
var timerProgressBarFullWidth = parseInt(window.getComputedStyle(timerProgressBar).width);
|
637 |
+
var timerProgressBarPercent = parseInt(timerProgressBarWidth / timerProgressBarFullWidth * 100);
|
638 |
+
timerProgressBar.style.removeProperty('transition');
|
639 |
+
timerProgressBar.style.width = "".concat(timerProgressBarPercent, "%");
|
640 |
+
};
|
641 |
+
|
642 |
+
// Detect Node env
|
643 |
+
var isNodeEnv = function isNodeEnv() {
|
644 |
+
return typeof window === 'undefined' || typeof document === 'undefined';
|
645 |
+
};
|
646 |
+
|
647 |
+
var sweetHTML = "\n <div aria-labelledby=\"".concat(swalClasses.title, "\" aria-describedby=\"").concat(swalClasses.content, "\" class=\"").concat(swalClasses.popup, "\" tabindex=\"-1\">\n <div class=\"").concat(swalClasses.header, "\">\n <ul class=\"").concat(swalClasses['progress-steps'], "\"></ul>\n <div class=\"").concat(swalClasses.icon, " ").concat(iconTypes.error, "\"></div>\n <div class=\"").concat(swalClasses.icon, " ").concat(iconTypes.question, "\"></div>\n <div class=\"").concat(swalClasses.icon, " ").concat(iconTypes.warning, "\"></div>\n <div class=\"").concat(swalClasses.icon, " ").concat(iconTypes.info, "\"></div>\n <div class=\"").concat(swalClasses.icon, " ").concat(iconTypes.success, "\"></div>\n <img class=\"").concat(swalClasses.image, "\" />\n <h2 class=\"").concat(swalClasses.title, "\" id=\"").concat(swalClasses.title, "\"></h2>\n <button type=\"button\" class=\"").concat(swalClasses.close, "\"></button>\n </div>\n <div class=\"").concat(swalClasses.content, "\">\n <div id=\"").concat(swalClasses.content, "\" class=\"").concat(swalClasses['html-container'], "\"></div>\n <input class=\"").concat(swalClasses.input, "\" />\n <input type=\"file\" class=\"").concat(swalClasses.file, "\" />\n <div class=\"").concat(swalClasses.range, "\">\n <input type=\"range\" />\n <output></output>\n </div>\n <select class=\"").concat(swalClasses.select, "\"></select>\n <div class=\"").concat(swalClasses.radio, "\"></div>\n <label for=\"").concat(swalClasses.checkbox, "\" class=\"").concat(swalClasses.checkbox, "\">\n <input type=\"checkbox\" />\n <span class=\"").concat(swalClasses.label, "\"></span>\n </label>\n <textarea class=\"").concat(swalClasses.textarea, "\"></textarea>\n <div class=\"").concat(swalClasses['validation-message'], "\" id=\"").concat(swalClasses['validation-message'], "\"></div>\n </div>\n <div class=\"").concat(swalClasses.actions, "\">\n <div class=\"").concat(swalClasses.loader, "\"></div>\n <button type=\"button\" class=\"").concat(swalClasses.confirm, "\"></button>\n <button type=\"button\" class=\"").concat(swalClasses.deny, "\"></button>\n <button type=\"button\" class=\"").concat(swalClasses.cancel, "\"></button>\n </div>\n <div class=\"").concat(swalClasses.footer, "\"></div>\n <div class=\"").concat(swalClasses['timer-progress-bar-container'], "\">\n <div class=\"").concat(swalClasses['timer-progress-bar'], "\"></div>\n </div>\n </div>\n").replace(/(^|\n)\s*/g, '');
|
648 |
+
|
649 |
+
var resetOldContainer = function resetOldContainer() {
|
650 |
+
var oldContainer = getContainer();
|
651 |
+
|
652 |
+
if (!oldContainer) {
|
653 |
+
return false;
|
654 |
+
}
|
655 |
+
|
656 |
+
oldContainer.parentNode.removeChild(oldContainer);
|
657 |
+
removeClass([document.documentElement, document.body], [swalClasses['no-backdrop'], swalClasses['toast-shown'], swalClasses['has-column']]);
|
658 |
+
return true;
|
659 |
+
};
|
660 |
+
|
661 |
+
var oldInputVal; // IE11 workaround, see #1109 for details
|
662 |
+
|
663 |
+
var resetValidationMessage = function resetValidationMessage(e) {
|
664 |
+
if (Swal.isVisible() && oldInputVal !== e.target.value) {
|
665 |
+
Swal.resetValidationMessage();
|
666 |
+
}
|
667 |
+
|
668 |
+
oldInputVal = e.target.value;
|
669 |
+
};
|
670 |
+
|
671 |
+
var addInputChangeListeners = function addInputChangeListeners() {
|
672 |
+
var content = getContent();
|
673 |
+
var input = getChildByClass(content, swalClasses.input);
|
674 |
+
var file = getChildByClass(content, swalClasses.file);
|
675 |
+
var range = content.querySelector(".".concat(swalClasses.range, " input"));
|
676 |
+
var rangeOutput = content.querySelector(".".concat(swalClasses.range, " output"));
|
677 |
+
var select = getChildByClass(content, swalClasses.select);
|
678 |
+
var checkbox = content.querySelector(".".concat(swalClasses.checkbox, " input"));
|
679 |
+
var textarea = getChildByClass(content, swalClasses.textarea);
|
680 |
+
input.oninput = resetValidationMessage;
|
681 |
+
file.onchange = resetValidationMessage;
|
682 |
+
select.onchange = resetValidationMessage;
|
683 |
+
checkbox.onchange = resetValidationMessage;
|
684 |
+
textarea.oninput = resetValidationMessage;
|
685 |
+
|
686 |
+
range.oninput = function (e) {
|
687 |
+
resetValidationMessage(e);
|
688 |
+
rangeOutput.value = range.value;
|
689 |
+
};
|
690 |
+
|
691 |
+
range.onchange = function (e) {
|
692 |
+
resetValidationMessage(e);
|
693 |
+
range.nextSibling.value = range.value;
|
694 |
+
};
|
695 |
+
};
|
696 |
+
|
697 |
+
var getTarget = function getTarget(target) {
|
698 |
+
return typeof target === 'string' ? document.querySelector(target) : target;
|
699 |
+
};
|
700 |
+
|
701 |
+
var setupAccessibility = function setupAccessibility(params) {
|
702 |
+
var popup = getPopup();
|
703 |
+
popup.setAttribute('role', params.toast ? 'alert' : 'dialog');
|
704 |
+
popup.setAttribute('aria-live', params.toast ? 'polite' : 'assertive');
|
705 |
+
|
706 |
+
if (!params.toast) {
|
707 |
+
popup.setAttribute('aria-modal', 'true');
|
708 |
+
}
|
709 |
+
};
|
710 |
+
|
711 |
+
var setupRTL = function setupRTL(targetElement) {
|
712 |
+
if (window.getComputedStyle(targetElement).direction === 'rtl') {
|
713 |
+
addClass(getContainer(), swalClasses.rtl);
|
714 |
+
}
|
715 |
+
};
|
716 |
+
/*
|
717 |
+
* Add modal + backdrop to DOM
|
718 |
+
*/
|
719 |
+
|
720 |
+
|
721 |
+
var init = function init(params) {
|
722 |
+
// Clean up the old popup container if it exists
|
723 |
+
var oldContainerExisted = resetOldContainer();
|
724 |
+
/* istanbul ignore if */
|
725 |
+
|
726 |
+
if (isNodeEnv()) {
|
727 |
+
error('SweetAlert2 requires document to initialize');
|
728 |
+
return;
|
729 |
+
}
|
730 |
+
|
731 |
+
var container = document.createElement('div');
|
732 |
+
container.className = swalClasses.container;
|
733 |
+
|
734 |
+
if (oldContainerExisted) {
|
735 |
+
addClass(container, swalClasses['no-transition']);
|
736 |
+
}
|
737 |
+
|
738 |
+
setInnerHtml(container, sweetHTML);
|
739 |
+
var targetElement = getTarget(params.target);
|
740 |
+
targetElement.appendChild(container);
|
741 |
+
setupAccessibility(params);
|
742 |
+
setupRTL(targetElement);
|
743 |
+
addInputChangeListeners();
|
744 |
+
};
|
745 |
+
|
746 |
+
var parseHtmlToContainer = function parseHtmlToContainer(param, target) {
|
747 |
+
// DOM element
|
748 |
+
if (param instanceof HTMLElement) {
|
749 |
+
target.appendChild(param); // Object
|
750 |
+
} else if (_typeof(param) === 'object') {
|
751 |
+
handleObject(param, target); // Plain string
|
752 |
+
} else if (param) {
|
753 |
+
setInnerHtml(target, param);
|
754 |
+
}
|
755 |
+
};
|
756 |
+
|
757 |
+
var handleObject = function handleObject(param, target) {
|
758 |
+
// JQuery element(s)
|
759 |
+
if (param.jquery) {
|
760 |
+
handleJqueryElem(target, param); // For other objects use their string representation
|
761 |
+
} else {
|
762 |
+
setInnerHtml(target, param.toString());
|
763 |
+
}
|
764 |
+
};
|
765 |
+
|
766 |
+
var handleJqueryElem = function handleJqueryElem(target, elem) {
|
767 |
+
target.textContent = '';
|
768 |
+
|
769 |
+
if (0 in elem) {
|
770 |
+
for (var i = 0; (i in elem); i++) {
|
771 |
+
target.appendChild(elem[i].cloneNode(true));
|
772 |
+
}
|
773 |
+
} else {
|
774 |
+
target.appendChild(elem.cloneNode(true));
|
775 |
+
}
|
776 |
+
};
|
777 |
+
|
778 |
+
var animationEndEvent = function () {
|
779 |
+
// Prevent run in Node env
|
780 |
+
|
781 |
+
/* istanbul ignore if */
|
782 |
+
if (isNodeEnv()) {
|
783 |
+
return false;
|
784 |
+
}
|
785 |
+
|
786 |
+
var testEl = document.createElement('div');
|
787 |
+
var transEndEventNames = {
|
788 |
+
WebkitAnimation: 'webkitAnimationEnd',
|
789 |
+
OAnimation: 'oAnimationEnd oanimationend',
|
790 |
+
animation: 'animationend'
|
791 |
+
};
|
792 |
+
|
793 |
+
for (var i in transEndEventNames) {
|
794 |
+
if (Object.prototype.hasOwnProperty.call(transEndEventNames, i) && typeof testEl.style[i] !== 'undefined') {
|
795 |
+
return transEndEventNames[i];
|
796 |
+
}
|
797 |
+
}
|
798 |
+
|
799 |
+
return false;
|
800 |
+
}();
|
801 |
+
|
802 |
+
// https://github.com/twbs/bootstrap/blob/master/js/src/modal.js
|
803 |
+
|
804 |
+
var measureScrollbar = function measureScrollbar() {
|
805 |
+
var scrollDiv = document.createElement('div');
|
806 |
+
scrollDiv.className = swalClasses['scrollbar-measure'];
|
807 |
+
document.body.appendChild(scrollDiv);
|
808 |
+
var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth;
|
809 |
+
document.body.removeChild(scrollDiv);
|
810 |
+
return scrollbarWidth;
|
811 |
+
};
|
812 |
+
|
813 |
+
var renderActions = function renderActions(instance, params) {
|
814 |
+
var actions = getActions();
|
815 |
+
var loader = getLoader();
|
816 |
+
var confirmButton = getConfirmButton();
|
817 |
+
var denyButton = getDenyButton();
|
818 |
+
var cancelButton = getCancelButton(); // Actions (buttons) wrapper
|
819 |
+
|
820 |
+
if (!params.showConfirmButton && !params.showDenyButton && !params.showCancelButton) {
|
821 |
+
hide(actions);
|
822 |
+
} // Custom class
|
823 |
+
|
824 |
+
|
825 |
+
applyCustomClass(actions, params, 'actions'); // Render buttons
|
826 |
+
|
827 |
+
renderButton(confirmButton, 'confirm', params);
|
828 |
+
renderButton(denyButton, 'deny', params);
|
829 |
+
renderButton(cancelButton, 'cancel', params); // Loader
|
830 |
+
|
831 |
+
loader.innerHTML = params.loaderHtml;
|
832 |
+
|
833 |
+
if (params.buttonsStyling) {
|
834 |
+
handleButtonsStyling(confirmButton, denyButton, cancelButton, params);
|
835 |
+
} else {
|
836 |
+
removeClass([confirmButton, denyButton, cancelButton], swalClasses.styled);
|
837 |
+
}
|
838 |
+
|
839 |
+
if (params.reverseButtons) {
|
840 |
+
actions.insertBefore(cancelButton, loader);
|
841 |
+
actions.insertBefore(denyButton, loader);
|
842 |
+
actions.insertBefore(confirmButton, loader);
|
843 |
+
}
|
844 |
+
};
|
845 |
+
|
846 |
+
function handleButtonsStyling(confirmButton, denyButton, cancelButton, params) {
|
847 |
+
addClass([confirmButton, denyButton, cancelButton], swalClasses.styled); // Buttons background colors
|
848 |
+
|
849 |
+
if (params.confirmButtonColor) {
|
850 |
+
confirmButton.style.backgroundColor = params.confirmButtonColor;
|
851 |
+
}
|
852 |
+
|
853 |
+
if (params.denyButtonColor) {
|
854 |
+
denyButton.style.backgroundColor = params.denyButtonColor;
|
855 |
+
}
|
856 |
+
|
857 |
+
if (params.cancelButtonColor) {
|
858 |
+
cancelButton.style.backgroundColor = params.cancelButtonColor;
|
859 |
+
}
|
860 |
+
}
|
861 |
+
|
862 |
+
function renderButton(button, buttonType, params) {
|
863 |
+
toggle(button, params["show".concat(capitalizeFirstLetter(buttonType), "Button")], 'inline-block');
|
864 |
+
setInnerHtml(button, params["".concat(buttonType, "ButtonText")]); // Set caption text
|
865 |
+
|
866 |
+
button.setAttribute('aria-label', params["".concat(buttonType, "ButtonAriaLabel")]); // ARIA label
|
867 |
+
// Add buttons custom classes
|
868 |
+
|
869 |
+
button.className = swalClasses[buttonType];
|
870 |
+
applyCustomClass(button, params, "".concat(buttonType, "Button"));
|
871 |
+
addClass(button, params["".concat(buttonType, "ButtonClass")]);
|
872 |
+
}
|
873 |
+
|
874 |
+
function handleBackdropParam(container, backdrop) {
|
875 |
+
if (typeof backdrop === 'string') {
|
876 |
+
container.style.background = backdrop;
|
877 |
+
} else if (!backdrop) {
|
878 |
+
addClass([document.documentElement, document.body], swalClasses['no-backdrop']);
|
879 |
+
}
|
880 |
+
}
|
881 |
+
|
882 |
+
function handlePositionParam(container, position) {
|
883 |
+
if (position in swalClasses) {
|
884 |
+
addClass(container, swalClasses[position]);
|
885 |
+
} else {
|
886 |
+
warn('The "position" parameter is not valid, defaulting to "center"');
|
887 |
+
addClass(container, swalClasses.center);
|
888 |
+
}
|
889 |
+
}
|
890 |
+
|
891 |
+
function handleGrowParam(container, grow) {
|
892 |
+
if (grow && typeof grow === 'string') {
|
893 |
+
var growClass = "grow-".concat(grow);
|
894 |
+
|
895 |
+
if (growClass in swalClasses) {
|
896 |
+
addClass(container, swalClasses[growClass]);
|
897 |
+
}
|
898 |
+
}
|
899 |
+
}
|
900 |
+
|
901 |
+
var renderContainer = function renderContainer(instance, params) {
|
902 |
+
var container = getContainer();
|
903 |
+
|
904 |
+
if (!container) {
|
905 |
+
return;
|
906 |
+
}
|
907 |
+
|
908 |
+
handleBackdropParam(container, params.backdrop);
|
909 |
+
|
910 |
+
if (!params.backdrop && params.allowOutsideClick) {
|
911 |
+
warn('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');
|
912 |
+
}
|
913 |
+
|
914 |
+
handlePositionParam(container, params.position);
|
915 |
+
handleGrowParam(container, params.grow); // Custom class
|
916 |
+
|
917 |
+
applyCustomClass(container, params, 'container'); // Set queue step attribute for getQueueStep() method
|
918 |
+
|
919 |
+
var queueStep = document.body.getAttribute('data-swal2-queue-step');
|
920 |
+
|
921 |
+
if (queueStep) {
|
922 |
+
container.setAttribute('data-queue-step', queueStep);
|
923 |
+
document.body.removeAttribute('data-swal2-queue-step');
|
924 |
+
}
|
925 |
+
};
|
926 |
+
|
927 |
+
/**
|
928 |
+
* This module containts `WeakMap`s for each effectively-"private property" that a `Swal` has.
|
929 |
+
* For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')`
|
930 |
+
* This is the approach that Babel will probably take to implement private methods/fields
|
931 |
+
* https://github.com/tc39/proposal-private-methods
|
932 |
+
* https://github.com/babel/babel/pull/7555
|
933 |
+
* Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module*
|
934 |
+
* then we can use that language feature.
|
935 |
+
*/
|
936 |
+
var privateProps = {
|
937 |
+
promise: new WeakMap(),
|
938 |
+
innerParams: new WeakMap(),
|
939 |
+
domCache: new WeakMap()
|
940 |
+
};
|
941 |
+
|
942 |
+
var inputTypes = ['input', 'file', 'range', 'select', 'radio', 'checkbox', 'textarea'];
|
943 |
+
var renderInput = function renderInput(instance, params) {
|
944 |
+
var content = getContent();
|
945 |
+
var innerParams = privateProps.innerParams.get(instance);
|
946 |
+
var rerender = !innerParams || params.input !== innerParams.input;
|
947 |
+
inputTypes.forEach(function (inputType) {
|
948 |
+
var inputClass = swalClasses[inputType];
|
949 |
+
var inputContainer = getChildByClass(content, inputClass); // set attributes
|
950 |
+
|
951 |
+
setAttributes(inputType, params.inputAttributes); // set class
|
952 |
+
|
953 |
+
inputContainer.className = inputClass;
|
954 |
+
|
955 |
+
if (rerender) {
|
956 |
+
hide(inputContainer);
|
957 |
+
}
|
958 |
+
});
|
959 |
+
|
960 |
+
if (params.input) {
|
961 |
+
if (rerender) {
|
962 |
+
showInput(params);
|
963 |
+
} // set custom class
|
964 |
+
|
965 |
+
|
966 |
+
setCustomClass(params);
|
967 |
+
}
|
968 |
+
};
|
969 |
+
|
970 |
+
var showInput = function showInput(params) {
|
971 |
+
if (!renderInputType[params.input]) {
|
972 |
+
return error("Unexpected type of input! Expected \"text\", \"email\", \"password\", \"number\", \"tel\", \"select\", \"radio\", \"checkbox\", \"textarea\", \"file\" or \"url\", got \"".concat(params.input, "\""));
|
973 |
+
}
|
974 |
+
|
975 |
+
var inputContainer = getInputContainer(params.input);
|
976 |
+
var input = renderInputType[params.input](inputContainer, params);
|
977 |
+
show(input); // input autofocus
|
978 |
+
|
979 |
+
setTimeout(function () {
|
980 |
+
focusInput(input);
|
981 |
+
});
|
982 |
+
};
|
983 |
+
|
984 |
+
var removeAttributes = function removeAttributes(input) {
|
985 |
+
for (var i = 0; i < input.attributes.length; i++) {
|
986 |
+
var attrName = input.attributes[i].name;
|
987 |
+
|
988 |
+
if (!(['type', 'value', 'style'].indexOf(attrName) !== -1)) {
|
989 |
+
input.removeAttribute(attrName);
|
990 |
+
}
|
991 |
+
}
|
992 |
+
};
|
993 |
+
|
994 |
+
var setAttributes = function setAttributes(inputType, inputAttributes) {
|
995 |
+
var input = getInput(getContent(), inputType);
|
996 |
+
|
997 |
+
if (!input) {
|
998 |
+
return;
|
999 |
+
}
|
1000 |
+
|
1001 |
+
removeAttributes(input);
|
1002 |
+
|
1003 |
+
for (var attr in inputAttributes) {
|
1004 |
+
// Do not set a placeholder for <input type="range">
|
1005 |
+
// it'll crash Edge, #1298
|
1006 |
+
if (inputType === 'range' && attr === 'placeholder') {
|
1007 |
+
continue;
|
1008 |
+
}
|
1009 |
+
|
1010 |
+
input.setAttribute(attr, inputAttributes[attr]);
|
1011 |
+
}
|
1012 |
+
};
|
1013 |
+
|
1014 |
+
var setCustomClass = function setCustomClass(params) {
|
1015 |
+
var inputContainer = getInputContainer(params.input);
|
1016 |
+
|
1017 |
+
if (params.customClass) {
|
1018 |
+
addClass(inputContainer, params.customClass.input);
|
1019 |
+
}
|
1020 |
+
};
|
1021 |
+
|
1022 |
+
var setInputPlaceholder = function setInputPlaceholder(input, params) {
|
1023 |
+
if (!input.placeholder || params.inputPlaceholder) {
|
1024 |
+
input.placeholder = params.inputPlaceholder;
|
1025 |
+
}
|
1026 |
+
};
|
1027 |
+
|
1028 |
+
var setInputLabel = function setInputLabel(input, prependTo, params) {
|
1029 |
+
if (params.inputLabel) {
|
1030 |
+
input.id = swalClasses.input;
|
1031 |
+
var label = document.createElement('label');
|
1032 |
+
var labelClass = swalClasses['input-label'];
|
1033 |
+
label.setAttribute('for', input.id);
|
1034 |
+
label.className = labelClass;
|
1035 |
+
label.innerText = params.inputLabel;
|
1036 |
+
prependTo.insertAdjacentElement('beforebegin', label);
|
1037 |
+
}
|
1038 |
+
};
|
1039 |
+
|
1040 |
+
var getInputContainer = function getInputContainer(inputType) {
|
1041 |
+
var inputClass = swalClasses[inputType] ? swalClasses[inputType] : swalClasses.input;
|
1042 |
+
return getChildByClass(getContent(), inputClass);
|
1043 |
+
};
|
1044 |
+
|
1045 |
+
var renderInputType = {};
|
1046 |
+
|
1047 |
+
renderInputType.text = renderInputType.email = renderInputType.password = renderInputType.number = renderInputType.tel = renderInputType.url = function (input, params) {
|
1048 |
+
if (typeof params.inputValue === 'string' || typeof params.inputValue === 'number') {
|
1049 |
+
input.value = params.inputValue;
|
1050 |
+
} else if (!isPromise(params.inputValue)) {
|
1051 |
+
warn("Unexpected type of inputValue! Expected \"string\", \"number\" or \"Promise\", got \"".concat(_typeof(params.inputValue), "\""));
|
1052 |
+
}
|
1053 |
+
|
1054 |
+
setInputLabel(input, input, params);
|
1055 |
+
setInputPlaceholder(input, params);
|
1056 |
+
input.type = params.input;
|
1057 |
+
return input;
|
1058 |
+
};
|
1059 |
+
|
1060 |
+
renderInputType.file = function (input, params) {
|
1061 |
+
setInputLabel(input, input, params);
|
1062 |
+
setInputPlaceholder(input, params);
|
1063 |
+
return input;
|
1064 |
+
};
|
1065 |
+
|
1066 |
+
renderInputType.range = function (range, params) {
|
1067 |
+
var rangeInput = range.querySelector('input');
|
1068 |
+
var rangeOutput = range.querySelector('output');
|
1069 |
+
rangeInput.value = params.inputValue;
|
1070 |
+
rangeInput.type = params.input;
|
1071 |
+
rangeOutput.value = params.inputValue;
|
1072 |
+
setInputLabel(rangeInput, range, params);
|
1073 |
+
return range;
|
1074 |
+
};
|
1075 |
+
|
1076 |
+
renderInputType.select = function (select, params) {
|
1077 |
+
select.textContent = '';
|
1078 |
+
|
1079 |
+
if (params.inputPlaceholder) {
|
1080 |
+
var placeholder = document.createElement('option');
|
1081 |
+
setInnerHtml(placeholder, params.inputPlaceholder);
|
1082 |
+
placeholder.value = '';
|
1083 |
+
placeholder.disabled = true;
|
1084 |
+
placeholder.selected = true;
|
1085 |
+
select.appendChild(placeholder);
|
1086 |
+
}
|
1087 |
+
|
1088 |
+
setInputLabel(select, select, params);
|
1089 |
+
return select;
|
1090 |
+
};
|
1091 |
+
|
1092 |
+
renderInputType.radio = function (radio) {
|
1093 |
+
radio.textContent = '';
|
1094 |
+
return radio;
|
1095 |
+
};
|
1096 |
+
|
1097 |
+
renderInputType.checkbox = function (checkboxContainer, params) {
|
1098 |
+
var checkbox = getInput(getContent(), 'checkbox');
|
1099 |
+
checkbox.value = 1;
|
1100 |
+
checkbox.id = swalClasses.checkbox;
|
1101 |
+
checkbox.checked = Boolean(params.inputValue);
|
1102 |
+
var label = checkboxContainer.querySelector('span');
|
1103 |
+
setInnerHtml(label, params.inputPlaceholder);
|
1104 |
+
return checkboxContainer;
|
1105 |
+
};
|
1106 |
+
|
1107 |
+
renderInputType.textarea = function (textarea, params) {
|
1108 |
+
textarea.value = params.inputValue;
|
1109 |
+
setInputPlaceholder(textarea, params);
|
1110 |
+
setInputLabel(textarea, textarea, params);
|
1111 |
+
|
1112 |
+
if ('MutationObserver' in window) {
|
1113 |
+
// #1699
|
1114 |
+
var initialPopupWidth = parseInt(window.getComputedStyle(getPopup()).width);
|
1115 |
+
var popupPadding = parseInt(window.getComputedStyle(getPopup()).paddingLeft) + parseInt(window.getComputedStyle(getPopup()).paddingRight);
|
1116 |
+
|
1117 |
+
var outputsize = function outputsize() {
|
1118 |
+
var contentWidth = textarea.offsetWidth + popupPadding;
|
1119 |
+
|
1120 |
+
if (contentWidth > initialPopupWidth) {
|
1121 |
+
getPopup().style.width = "".concat(contentWidth, "px");
|
1122 |
+
} else {
|
1123 |
+
getPopup().style.width = null;
|
1124 |
+
}
|
1125 |
+
};
|
1126 |
+
|
1127 |
+
new MutationObserver(outputsize).observe(textarea, {
|
1128 |
+
attributes: true,
|
1129 |
+
attributeFilter: ['style']
|
1130 |
+
});
|
1131 |
+
}
|
1132 |
+
|
1133 |
+
return textarea;
|
1134 |
+
};
|
1135 |
+
|
1136 |
+
var renderContent = function renderContent(instance, params) {
|
1137 |
+
var content = getContent().querySelector("#".concat(swalClasses.content)); // Content as HTML
|
1138 |
+
|
1139 |
+
if (params.html) {
|
1140 |
+
parseHtmlToContainer(params.html, content);
|
1141 |
+
show(content, 'block'); // Content as plain text
|
1142 |
+
} else if (params.text) {
|
1143 |
+
content.textContent = params.text;
|
1144 |
+
show(content, 'block'); // No content
|
1145 |
+
} else {
|
1146 |
+
hide(content);
|
1147 |
+
}
|
1148 |
+
|
1149 |
+
renderInput(instance, params); // Custom class
|
1150 |
+
|
1151 |
+
applyCustomClass(getContent(), params, 'content');
|
1152 |
+
};
|
1153 |
+
|
1154 |
+
var renderFooter = function renderFooter(instance, params) {
|
1155 |
+
var footer = getFooter();
|
1156 |
+
toggle(footer, params.footer);
|
1157 |
+
|
1158 |
+
if (params.footer) {
|
1159 |
+
parseHtmlToContainer(params.footer, footer);
|
1160 |
+
} // Custom class
|
1161 |
+
|
1162 |
+
|
1163 |
+
applyCustomClass(footer, params, 'footer');
|
1164 |
+
};
|
1165 |
+
|
1166 |
+
var renderCloseButton = function renderCloseButton(instance, params) {
|
1167 |
+
var closeButton = getCloseButton();
|
1168 |
+
setInnerHtml(closeButton, params.closeButtonHtml); // Custom class
|
1169 |
+
|
1170 |
+
applyCustomClass(closeButton, params, 'closeButton');
|
1171 |
+
toggle(closeButton, params.showCloseButton);
|
1172 |
+
closeButton.setAttribute('aria-label', params.closeButtonAriaLabel);
|
1173 |
+
};
|
1174 |
+
|
1175 |
+
var renderIcon = function renderIcon(instance, params) {
|
1176 |
+
var innerParams = privateProps.innerParams.get(instance); // if the given icon already rendered, apply the styling without re-rendering the icon
|
1177 |
+
|
1178 |
+
if (innerParams && params.icon === innerParams.icon && getIcon()) {
|
1179 |
+
applyStyles(getIcon(), params);
|
1180 |
+
return;
|
1181 |
+
}
|
1182 |
+
|
1183 |
+
hideAllIcons();
|
1184 |
+
|
1185 |
+
if (!params.icon) {
|
1186 |
+
return;
|
1187 |
+
}
|
1188 |
+
|
1189 |
+
if (Object.keys(iconTypes).indexOf(params.icon) !== -1) {
|
1190 |
+
var icon = elementBySelector(".".concat(swalClasses.icon, ".").concat(iconTypes[params.icon]));
|
1191 |
+
show(icon); // Custom or default content
|
1192 |
+
|
1193 |
+
setContent(icon, params);
|
1194 |
+
applyStyles(icon, params); // Animate icon
|
1195 |
+
|
1196 |
+
addClass(icon, params.showClass.icon);
|
1197 |
+
} else {
|
1198 |
+
error("Unknown icon! Expected \"success\", \"error\", \"warning\", \"info\" or \"question\", got \"".concat(params.icon, "\""));
|
1199 |
+
}
|
1200 |
+
};
|
1201 |
+
|
1202 |
+
var hideAllIcons = function hideAllIcons() {
|
1203 |
+
var icons = getIcons();
|
1204 |
+
|
1205 |
+
for (var i = 0; i < icons.length; i++) {
|
1206 |
+
hide(icons[i]);
|
1207 |
+
}
|
1208 |
+
};
|
1209 |
+
|
1210 |
+
var applyStyles = function applyStyles(icon, params) {
|
1211 |
+
// Icon color
|
1212 |
+
setColor(icon, params); // Success icon background color
|
1213 |
+
|
1214 |
+
adjustSuccessIconBackgoundColor(); // Custom class
|
1215 |
+
|
1216 |
+
applyCustomClass(icon, params, 'icon');
|
1217 |
+
}; // Adjust success icon background color to match the popup background color
|
1218 |
+
|
1219 |
+
|
1220 |
+
var adjustSuccessIconBackgoundColor = function adjustSuccessIconBackgoundColor() {
|
1221 |
+
var popup = getPopup();
|
1222 |
+
var popupBackgroundColor = window.getComputedStyle(popup).getPropertyValue('background-color');
|
1223 |
+
var successIconParts = popup.querySelectorAll('[class^=swal2-success-circular-line], .swal2-success-fix');
|
1224 |
+
|
1225 |
+
for (var i = 0; i < successIconParts.length; i++) {
|
1226 |
+
successIconParts[i].style.backgroundColor = popupBackgroundColor;
|
1227 |
+
}
|
1228 |
+
};
|
1229 |
+
|
1230 |
+
var setContent = function setContent(icon, params) {
|
1231 |
+
icon.textContent = '';
|
1232 |
+
|
1233 |
+
if (params.iconHtml) {
|
1234 |
+
setInnerHtml(icon, iconContent(params.iconHtml));
|
1235 |
+
} else if (params.icon === 'success') {
|
1236 |
+
setInnerHtml(icon, "\n <div class=\"swal2-success-circular-line-left\"></div>\n <span class=\"swal2-success-line-tip\"></span> <span class=\"swal2-success-line-long\"></span>\n <div class=\"swal2-success-ring\"></div> <div class=\"swal2-success-fix\"></div>\n <div class=\"swal2-success-circular-line-right\"></div>\n ");
|
1237 |
+
} else if (params.icon === 'error') {
|
1238 |
+
setInnerHtml(icon, "\n <span class=\"swal2-x-mark\">\n <span class=\"swal2-x-mark-line-left\"></span>\n <span class=\"swal2-x-mark-line-right\"></span>\n </span>\n ");
|
1239 |
+
} else {
|
1240 |
+
var defaultIconHtml = {
|
1241 |
+
question: '?',
|
1242 |
+
warning: '!',
|
1243 |
+
info: 'i'
|
1244 |
+
};
|
1245 |
+
setInnerHtml(icon, iconContent(defaultIconHtml[params.icon]));
|
1246 |
+
}
|
1247 |
+
};
|
1248 |
+
|
1249 |
+
var setColor = function setColor(icon, params) {
|
1250 |
+
if (!params.iconColor) {
|
1251 |
+
return;
|
1252 |
+
}
|
1253 |
+
|
1254 |
+
icon.style.color = params.iconColor;
|
1255 |
+
icon.style.borderColor = params.iconColor;
|
1256 |
+
|
1257 |
+
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++) {
|
1258 |
+
var sel = _arr[_i];
|
1259 |
+
setStyle(icon, sel, 'backgroundColor', params.iconColor);
|
1260 |
+
}
|
1261 |
+
|
1262 |
+
setStyle(icon, '.swal2-success-ring', 'borderColor', params.iconColor);
|
1263 |
+
};
|
1264 |
+
|
1265 |
+
var iconContent = function iconContent(content) {
|
1266 |
+
return "<div class=\"".concat(swalClasses['icon-content'], "\">").concat(content, "</div>");
|
1267 |
+
};
|
1268 |
+
|
1269 |
+
var renderImage = function renderImage(instance, params) {
|
1270 |
+
var image = getImage();
|
1271 |
+
|
1272 |
+
if (!params.imageUrl) {
|
1273 |
+
return hide(image);
|
1274 |
+
}
|
1275 |
+
|
1276 |
+
show(image, ''); // Src, alt
|
1277 |
+
|
1278 |
+
image.setAttribute('src', params.imageUrl);
|
1279 |
+
image.setAttribute('alt', params.imageAlt); // Width, height
|
1280 |
+
|
1281 |
+
applyNumericalStyle(image, 'width', params.imageWidth);
|
1282 |
+
applyNumericalStyle(image, 'height', params.imageHeight); // Class
|
1283 |
+
|
1284 |
+
image.className = swalClasses.image;
|
1285 |
+
applyCustomClass(image, params, 'image');
|
1286 |
+
};
|
1287 |
+
|
1288 |
+
var currentSteps = [];
|
1289 |
+
/*
|
1290 |
+
* Global function for chaining sweetAlert popups
|
1291 |
+
*/
|
1292 |
+
|
1293 |
+
var queue = function queue(steps) {
|
1294 |
+
var Swal = this;
|
1295 |
+
currentSteps = steps;
|
1296 |
+
|
1297 |
+
var resetAndResolve = function resetAndResolve(resolve, value) {
|
1298 |
+
currentSteps = [];
|
1299 |
+
resolve(value);
|
1300 |
+
};
|
1301 |
+
|
1302 |
+
var queueResult = [];
|
1303 |
+
return new Promise(function (resolve) {
|
1304 |
+
(function step(i, callback) {
|
1305 |
+
if (i < currentSteps.length) {
|
1306 |
+
document.body.setAttribute('data-swal2-queue-step', i);
|
1307 |
+
Swal.fire(currentSteps[i]).then(function (result) {
|
1308 |
+
if (typeof result.value !== 'undefined') {
|
1309 |
+
queueResult.push(result.value);
|
1310 |
+
step(i + 1, callback);
|
1311 |
+
} else {
|
1312 |
+
resetAndResolve(resolve, {
|
1313 |
+
dismiss: result.dismiss
|
1314 |
+
});
|
1315 |
+
}
|
1316 |
+
});
|
1317 |
+
} else {
|
1318 |
+
resetAndResolve(resolve, {
|
1319 |
+
value: queueResult
|
1320 |
+
});
|
1321 |
+
}
|
1322 |
+
})(0);
|
1323 |
+
});
|
1324 |
+
};
|
1325 |
+
/*
|
1326 |
+
* Global function for getting the index of current popup in queue
|
1327 |
+
*/
|
1328 |
+
|
1329 |
+
var getQueueStep = function getQueueStep() {
|
1330 |
+
return getContainer() && getContainer().getAttribute('data-queue-step');
|
1331 |
+
};
|
1332 |
+
/*
|
1333 |
+
* Global function for inserting a popup to the queue
|
1334 |
+
*/
|
1335 |
+
|
1336 |
+
var insertQueueStep = function insertQueueStep(step, index) {
|
1337 |
+
if (index && index < currentSteps.length) {
|
1338 |
+
return currentSteps.splice(index, 0, step);
|
1339 |
+
}
|
1340 |
+
|
1341 |
+
return currentSteps.push(step);
|
1342 |
+
};
|
1343 |
+
/*
|
1344 |
+
* Global function for deleting a popup from the queue
|
1345 |
+
*/
|
1346 |
+
|
1347 |
+
var deleteQueueStep = function deleteQueueStep(index) {
|
1348 |
+
if (typeof currentSteps[index] !== 'undefined') {
|
1349 |
+
currentSteps.splice(index, 1);
|
1350 |
+
}
|
1351 |
+
};
|
1352 |
+
|
1353 |
+
var createStepElement = function createStepElement(step) {
|
1354 |
+
var stepEl = document.createElement('li');
|
1355 |
+
addClass(stepEl, swalClasses['progress-step']);
|
1356 |
+
setInnerHtml(stepEl, step);
|
1357 |
+
return stepEl;
|
1358 |
+
};
|
1359 |
+
|
1360 |
+
var createLineElement = function createLineElement(params) {
|
1361 |
+
var lineEl = document.createElement('li');
|
1362 |
+
addClass(lineEl, swalClasses['progress-step-line']);
|
1363 |
+
|
1364 |
+
if (params.progressStepsDistance) {
|
1365 |
+
lineEl.style.width = params.progressStepsDistance;
|
1366 |
+
}
|
1367 |
+
|
1368 |
+
return lineEl;
|
1369 |
+
};
|
1370 |
+
|
1371 |
+
var renderProgressSteps = function renderProgressSteps(instance, params) {
|
1372 |
+
var progressStepsContainer = getProgressSteps();
|
1373 |
+
|
1374 |
+
if (!params.progressSteps || params.progressSteps.length === 0) {
|
1375 |
+
return hide(progressStepsContainer);
|
1376 |
+
}
|
1377 |
+
|
1378 |
+
show(progressStepsContainer);
|
1379 |
+
progressStepsContainer.textContent = '';
|
1380 |
+
var currentProgressStep = parseInt(params.currentProgressStep === undefined ? getQueueStep() : params.currentProgressStep);
|
1381 |
+
|
1382 |
+
if (currentProgressStep >= params.progressSteps.length) {
|
1383 |
+
warn('Invalid currentProgressStep parameter, it should be less than progressSteps.length ' + '(currentProgressStep like JS arrays starts from 0)');
|
1384 |
+
}
|
1385 |
+
|
1386 |
+
params.progressSteps.forEach(function (step, index) {
|
1387 |
+
var stepEl = createStepElement(step);
|
1388 |
+
progressStepsContainer.appendChild(stepEl);
|
1389 |
+
|
1390 |
+
if (index === currentProgressStep) {
|
1391 |
+
addClass(stepEl, swalClasses['active-progress-step']);
|
1392 |
+
}
|
1393 |
+
|
1394 |
+
if (index !== params.progressSteps.length - 1) {
|
1395 |
+
var lineEl = createLineElement(params);
|
1396 |
+
progressStepsContainer.appendChild(lineEl);
|
1397 |
+
}
|
1398 |
+
});
|
1399 |
+
};
|
1400 |
+
|
1401 |
+
var renderTitle = function renderTitle(instance, params) {
|
1402 |
+
var title = getTitle();
|
1403 |
+
toggle(title, params.title || params.titleText);
|
1404 |
+
|
1405 |
+
if (params.title) {
|
1406 |
+
parseHtmlToContainer(params.title, title);
|
1407 |
+
}
|
1408 |
+
|
1409 |
+
if (params.titleText) {
|
1410 |
+
title.innerText = params.titleText;
|
1411 |
+
} // Custom class
|
1412 |
+
|
1413 |
+
|
1414 |
+
applyCustomClass(title, params, 'title');
|
1415 |
+
};
|
1416 |
+
|
1417 |
+
var renderHeader = function renderHeader(instance, params) {
|
1418 |
+
var header = getHeader(); // Custom class
|
1419 |
+
|
1420 |
+
applyCustomClass(header, params, 'header'); // Progress steps
|
1421 |
+
|
1422 |
+
renderProgressSteps(instance, params); // Icon
|
1423 |
+
|
1424 |
+
renderIcon(instance, params); // Image
|
1425 |
+
|
1426 |
+
renderImage(instance, params); // Title
|
1427 |
+
|
1428 |
+
renderTitle(instance, params); // Close button
|
1429 |
+
|
1430 |
+
renderCloseButton(instance, params);
|
1431 |
+
};
|
1432 |
+
|
1433 |
+
var renderPopup = function renderPopup(instance, params) {
|
1434 |
+
var popup = getPopup(); // Width
|
1435 |
+
|
1436 |
+
applyNumericalStyle(popup, 'width', params.width); // Padding
|
1437 |
+
|
1438 |
+
applyNumericalStyle(popup, 'padding', params.padding); // Background
|
1439 |
+
|
1440 |
+
if (params.background) {
|
1441 |
+
popup.style.background = params.background;
|
1442 |
+
} // Classes
|
1443 |
+
|
1444 |
+
|
1445 |
+
addClasses(popup, params);
|
1446 |
+
};
|
1447 |
+
|
1448 |
+
var addClasses = function addClasses(popup, params) {
|
1449 |
+
// Default Class + showClass when updating Swal.update({})
|
1450 |
+
popup.className = "".concat(swalClasses.popup, " ").concat(isVisible(popup) ? params.showClass.popup : '');
|
1451 |
+
|
1452 |
+
if (params.toast) {
|
1453 |
+
addClass([document.documentElement, document.body], swalClasses['toast-shown']);
|
1454 |
+
addClass(popup, swalClasses.toast);
|
1455 |
+
} else {
|
1456 |
+
addClass(popup, swalClasses.modal);
|
1457 |
+
} // Custom class
|
1458 |
+
|
1459 |
+
|
1460 |
+
applyCustomClass(popup, params, 'popup');
|
1461 |
+
|
1462 |
+
if (typeof params.customClass === 'string') {
|
1463 |
+
addClass(popup, params.customClass);
|
1464 |
+
} // Icon class (#1842)
|
1465 |
+
|
1466 |
+
|
1467 |
+
if (params.icon) {
|
1468 |
+
addClass(popup, swalClasses["icon-".concat(params.icon)]);
|
1469 |
+
}
|
1470 |
+
};
|
1471 |
+
|
1472 |
+
var render = function render(instance, params) {
|
1473 |
+
renderPopup(instance, params);
|
1474 |
+
renderContainer(instance, params);
|
1475 |
+
renderHeader(instance, params);
|
1476 |
+
renderContent(instance, params);
|
1477 |
+
renderActions(instance, params);
|
1478 |
+
renderFooter(instance, params);
|
1479 |
+
|
1480 |
+
if (typeof params.didRender === 'function') {
|
1481 |
+
params.didRender(getPopup());
|
1482 |
+
} else if (typeof params.onRender === 'function') {
|
1483 |
+
params.onRender(getPopup()); // @deprecated
|
1484 |
+
}
|
1485 |
+
};
|
1486 |
+
|
1487 |
+
/*
|
1488 |
+
* Global function to determine if SweetAlert2 popup is shown
|
1489 |
+
*/
|
1490 |
+
|
1491 |
+
var isVisible$1 = function isVisible$$1() {
|
1492 |
+
return isVisible(getPopup());
|
1493 |
+
};
|
1494 |
+
/*
|
1495 |
+
* Global function to click 'Confirm' button
|
1496 |
+
*/
|
1497 |
+
|
1498 |
+
var clickConfirm = function clickConfirm() {
|
1499 |
+
return getConfirmButton() && getConfirmButton().click();
|
1500 |
+
};
|
1501 |
+
/*
|
1502 |
+
* Global function to click 'Deny' button
|
1503 |
+
*/
|
1504 |
+
|
1505 |
+
var clickDeny = function clickDeny() {
|
1506 |
+
return getDenyButton() && getDenyButton().click();
|
1507 |
+
};
|
1508 |
+
/*
|
1509 |
+
* Global function to click 'Cancel' button
|
1510 |
+
*/
|
1511 |
+
|
1512 |
+
var clickCancel = function clickCancel() {
|
1513 |
+
return getCancelButton() && getCancelButton().click();
|
1514 |
+
};
|
1515 |
+
|
1516 |
+
function fire() {
|
1517 |
+
var Swal = this;
|
1518 |
+
|
1519 |
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
1520 |
+
args[_key] = arguments[_key];
|
1521 |
+
}
|
1522 |
+
|
1523 |
+
return _construct(Swal, args);
|
1524 |
+
}
|
1525 |
+
|
1526 |
+
/**
|
1527 |
+
* Returns an extended version of `Swal` containing `params` as defaults.
|
1528 |
+
* Useful for reusing Swal configuration.
|
1529 |
+
*
|
1530 |
+
* For example:
|
1531 |
+
*
|
1532 |
+
* Before:
|
1533 |
+
* const textPromptOptions = { input: 'text', showCancelButton: true }
|
1534 |
+
* const {value: firstName} = await Swal.fire({ ...textPromptOptions, title: 'What is your first name?' })
|
1535 |
+
* const {value: lastName} = await Swal.fire({ ...textPromptOptions, title: 'What is your last name?' })
|
1536 |
+
*
|
1537 |
+
* After:
|
1538 |
+
* const TextPrompt = Swal.mixin({ input: 'text', showCancelButton: true })
|
1539 |
+
* const {value: firstName} = await TextPrompt('What is your first name?')
|
1540 |
+
* const {value: lastName} = await TextPrompt('What is your last name?')
|
1541 |
+
*
|
1542 |
+
* @param mixinParams
|
1543 |
+
*/
|
1544 |
+
function mixin(mixinParams) {
|
1545 |
+
var MixinSwal = /*#__PURE__*/function (_this) {
|
1546 |
+
_inherits(MixinSwal, _this);
|
1547 |
+
|
1548 |
+
var _super = _createSuper(MixinSwal);
|
1549 |
+
|
1550 |
+
function MixinSwal() {
|
1551 |
+
_classCallCheck(this, MixinSwal);
|
1552 |
+
|
1553 |
+
return _super.apply(this, arguments);
|
1554 |
+
}
|
1555 |
+
|
1556 |
+
_createClass(MixinSwal, [{
|
1557 |
+
key: "_main",
|
1558 |
+
value: function _main(params) {
|
1559 |
+
return _get(_getPrototypeOf(MixinSwal.prototype), "_main", this).call(this, _extends({}, mixinParams, params));
|
1560 |
+
}
|
1561 |
+
}]);
|
1562 |
+
|
1563 |
+
return MixinSwal;
|
1564 |
+
}(this);
|
1565 |
+
|
1566 |
+
return MixinSwal;
|
1567 |
+
}
|
1568 |
+
|
1569 |
+
/**
|
1570 |
+
* Show spinner instead of Confirm button
|
1571 |
+
*/
|
1572 |
+
|
1573 |
+
var showLoading = function showLoading() {
|
1574 |
+
var popup = getPopup();
|
1575 |
+
|
1576 |
+
if (!popup) {
|
1577 |
+
Swal.fire();
|
1578 |
+
}
|
1579 |
+
|
1580 |
+
popup = getPopup();
|
1581 |
+
var actions = getActions();
|
1582 |
+
var confirmButton = getConfirmButton();
|
1583 |
+
var loader = getLoader();
|
1584 |
+
show(actions);
|
1585 |
+
hide(confirmButton);
|
1586 |
+
addClass([popup, actions], swalClasses.loading);
|
1587 |
+
show(loader);
|
1588 |
+
popup.setAttribute('data-loading', true);
|
1589 |
+
popup.setAttribute('aria-busy', true);
|
1590 |
+
popup.focus();
|
1591 |
+
};
|
1592 |
+
|
1593 |
+
var RESTORE_FOCUS_TIMEOUT = 100;
|
1594 |
+
|
1595 |
+
var globalState = {};
|
1596 |
+
|
1597 |
+
var focusPreviousActiveElement = function focusPreviousActiveElement() {
|
1598 |
+
if (globalState.previousActiveElement && globalState.previousActiveElement.focus) {
|
1599 |
+
globalState.previousActiveElement.focus();
|
1600 |
+
globalState.previousActiveElement = null;
|
1601 |
+
} else if (document.body) {
|
1602 |
+
document.body.focus();
|
1603 |
+
}
|
1604 |
+
}; // Restore previous active (focused) element
|
1605 |
+
|
1606 |
+
|
1607 |
+
var restoreActiveElement = function restoreActiveElement() {
|
1608 |
+
return new Promise(function (resolve) {
|
1609 |
+
var x = window.scrollX;
|
1610 |
+
var y = window.scrollY;
|
1611 |
+
globalState.restoreFocusTimeout = setTimeout(function () {
|
1612 |
+
focusPreviousActiveElement();
|
1613 |
+
resolve();
|
1614 |
+
}, RESTORE_FOCUS_TIMEOUT); // issues/900
|
1615 |
+
|
1616 |
+
/* istanbul ignore if */
|
1617 |
+
|
1618 |
+
if (typeof x !== 'undefined' && typeof y !== 'undefined') {
|
1619 |
+
// IE doesn't have scrollX/scrollY support
|
1620 |
+
window.scrollTo(x, y);
|
1621 |
+
}
|
1622 |
+
});
|
1623 |
+
};
|
1624 |
+
|
1625 |
+
/**
|
1626 |
+
* If `timer` parameter is set, returns number of milliseconds of timer remained.
|
1627 |
+
* Otherwise, returns undefined.
|
1628 |
+
*/
|
1629 |
+
|
1630 |
+
var getTimerLeft = function getTimerLeft() {
|
1631 |
+
return globalState.timeout && globalState.timeout.getTimerLeft();
|
1632 |
+
};
|
1633 |
+
/**
|
1634 |
+
* Stop timer. Returns number of milliseconds of timer remained.
|
1635 |
+
* If `timer` parameter isn't set, returns undefined.
|
1636 |
+
*/
|
1637 |
+
|
1638 |
+
var stopTimer = function stopTimer() {
|
1639 |
+
if (globalState.timeout) {
|
1640 |
+
stopTimerProgressBar();
|
1641 |
+
return globalState.timeout.stop();
|
1642 |
+
}
|
1643 |
+
};
|
1644 |
+
/**
|
1645 |
+
* Resume timer. Returns number of milliseconds of timer remained.
|
1646 |
+
* If `timer` parameter isn't set, returns undefined.
|
1647 |
+
*/
|
1648 |
+
|
1649 |
+
var resumeTimer = function resumeTimer() {
|
1650 |
+
if (globalState.timeout) {
|
1651 |
+
var remaining = globalState.timeout.start();
|
1652 |
+
animateTimerProgressBar(remaining);
|
1653 |
+
return remaining;
|
1654 |
+
}
|
1655 |
+
};
|
1656 |
+
/**
|
1657 |
+
* Resume timer. Returns number of milliseconds of timer remained.
|
1658 |
+
* If `timer` parameter isn't set, returns undefined.
|
1659 |
+
*/
|
1660 |
+
|
1661 |
+
var toggleTimer = function toggleTimer() {
|
1662 |
+
var timer = globalState.timeout;
|
1663 |
+
return timer && (timer.running ? stopTimer() : resumeTimer());
|
1664 |
+
};
|
1665 |
+
/**
|
1666 |
+
* Increase timer. Returns number of milliseconds of an updated timer.
|
1667 |
+
* If `timer` parameter isn't set, returns undefined.
|
1668 |
+
*/
|
1669 |
+
|
1670 |
+
var increaseTimer = function increaseTimer(n) {
|
1671 |
+
if (globalState.timeout) {
|
1672 |
+
var remaining = globalState.timeout.increase(n);
|
1673 |
+
animateTimerProgressBar(remaining, true);
|
1674 |
+
return remaining;
|
1675 |
+
}
|
1676 |
+
};
|
1677 |
+
/**
|
1678 |
+
* Check if timer is running. Returns true if timer is running
|
1679 |
+
* or false if timer is paused or stopped.
|
1680 |
+
* If `timer` parameter isn't set, returns undefined
|
1681 |
+
*/
|
1682 |
+
|
1683 |
+
var isTimerRunning = function isTimerRunning() {
|
1684 |
+
return globalState.timeout && globalState.timeout.isRunning();
|
1685 |
+
};
|
1686 |
+
|
1687 |
+
var defaultParams = {
|
1688 |
+
title: '',
|
1689 |
+
titleText: '',
|
1690 |
+
text: '',
|
1691 |
+
html: '',
|
1692 |
+
footer: '',
|
1693 |
+
icon: undefined,
|
1694 |
+
iconColor: undefined,
|
1695 |
+
iconHtml: undefined,
|
1696 |
+
toast: false,
|
1697 |
+
animation: true,
|
1698 |
+
showClass: {
|
1699 |
+
popup: 'swal2-show',
|
1700 |
+
backdrop: 'swal2-backdrop-show',
|
1701 |
+
icon: 'swal2-icon-show'
|
1702 |
+
},
|
1703 |
+
hideClass: {
|
1704 |
+
popup: 'swal2-hide',
|
1705 |
+
backdrop: 'swal2-backdrop-hide',
|
1706 |
+
icon: 'swal2-icon-hide'
|
1707 |
+
},
|
1708 |
+
customClass: undefined,
|
1709 |
+
target: 'body',
|
1710 |
+
backdrop: true,
|
1711 |
+
heightAuto: true,
|
1712 |
+
allowOutsideClick: true,
|
1713 |
+
allowEscapeKey: true,
|
1714 |
+
allowEnterKey: true,
|
1715 |
+
stopKeydownPropagation: true,
|
1716 |
+
keydownListenerCapture: false,
|
1717 |
+
showConfirmButton: true,
|
1718 |
+
showDenyButton: false,
|
1719 |
+
showCancelButton: false,
|
1720 |
+
preConfirm: undefined,
|
1721 |
+
confirmButtonText: 'OK',
|
1722 |
+
confirmButtonAriaLabel: '',
|
1723 |
+
confirmButtonColor: undefined,
|
1724 |
+
denyButtonText: 'No',
|
1725 |
+
denyButtonAriaLabel: '',
|
1726 |
+
denyButtonColor: undefined,
|
1727 |
+
cancelButtonText: 'Cancel',
|
1728 |
+
cancelButtonAriaLabel: '',
|
1729 |
+
cancelButtonColor: undefined,
|
1730 |
+
buttonsStyling: true,
|
1731 |
+
reverseButtons: false,
|
1732 |
+
focusConfirm: true,
|
1733 |
+
focusDeny: false,
|
1734 |
+
focusCancel: false,
|
1735 |
+
showCloseButton: false,
|
1736 |
+
closeButtonHtml: '×',
|
1737 |
+
closeButtonAriaLabel: 'Close this dialog',
|
1738 |
+
loaderHtml: '',
|
1739 |
+
showLoaderOnConfirm: false,
|
1740 |
+
imageUrl: undefined,
|
1741 |
+
imageWidth: undefined,
|
1742 |
+
imageHeight: undefined,
|
1743 |
+
imageAlt: '',
|
1744 |
+
timer: undefined,
|
1745 |
+
timerProgressBar: false,
|
1746 |
+
width: undefined,
|
1747 |
+
padding: undefined,
|
1748 |
+
background: undefined,
|
1749 |
+
input: undefined,
|
1750 |
+
inputPlaceholder: '',
|
1751 |
+
inputLabel: '',
|
1752 |
+
inputValue: '',
|
1753 |
+
inputOptions: {},
|
1754 |
+
inputAutoTrim: true,
|
1755 |
+
inputAttributes: {},
|
1756 |
+
inputValidator: undefined,
|
1757 |
+
returnInputValueOnDeny: false,
|
1758 |
+
validationMessage: undefined,
|
1759 |
+
grow: false,
|
1760 |
+
position: 'center',
|
1761 |
+
progressSteps: [],
|
1762 |
+
currentProgressStep: undefined,
|
1763 |
+
progressStepsDistance: undefined,
|
1764 |
+
onBeforeOpen: undefined,
|
1765 |
+
onOpen: undefined,
|
1766 |
+
willOpen: undefined,
|
1767 |
+
didOpen: undefined,
|
1768 |
+
onRender: undefined,
|
1769 |
+
didRender: undefined,
|
1770 |
+
onClose: undefined,
|
1771 |
+
onAfterClose: undefined,
|
1772 |
+
willClose: undefined,
|
1773 |
+
didClose: undefined,
|
1774 |
+
onDestroy: undefined,
|
1775 |
+
didDestroy: undefined,
|
1776 |
+
scrollbarPadding: true
|
1777 |
+
};
|
1778 |
+
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', 'imageAlt', 'imageHeight', 'imageUrl', 'imageWidth', 'onAfterClose', 'onClose', 'onDestroy', 'progressSteps', 'reverseButtons', 'showCancelButton', 'showCloseButton', 'showConfirmButton', 'showDenyButton', 'text', 'title', 'titleText', 'willClose'];
|
1779 |
+
var deprecatedParams = {
|
1780 |
+
animation: 'showClass" and "hideClass',
|
1781 |
+
onBeforeOpen: 'willOpen',
|
1782 |
+
onOpen: 'didOpen',
|
1783 |
+
onRender: 'didRender',
|
1784 |
+
onClose: 'willClose',
|
1785 |
+
onAfterClose: 'didClose',
|
1786 |
+
onDestroy: 'didDestroy'
|
1787 |
+
};
|
1788 |
+
var toastIncompatibleParams = ['allowOutsideClick', 'allowEnterKey', 'backdrop', 'focusConfirm', 'focusDeny', 'focusCancel', 'heightAuto', 'keydownListenerCapture'];
|
1789 |
+
/**
|
1790 |
+
* Is valid parameter
|
1791 |
+
* @param {String} paramName
|
1792 |
+
*/
|
1793 |
+
|
1794 |
+
var isValidParameter = function isValidParameter(paramName) {
|
1795 |
+
return Object.prototype.hasOwnProperty.call(defaultParams, paramName);
|
1796 |
+
};
|
1797 |
+
/**
|
1798 |
+
* Is valid parameter for Swal.update() method
|
1799 |
+
* @param {String} paramName
|
1800 |
+
*/
|
1801 |
+
|
1802 |
+
var isUpdatableParameter = function isUpdatableParameter(paramName) {
|
1803 |
+
return updatableParams.indexOf(paramName) !== -1;
|
1804 |
+
};
|
1805 |
+
/**
|
1806 |
+
* Is deprecated parameter
|
1807 |
+
* @param {String} paramName
|
1808 |
+
*/
|
1809 |
+
|
1810 |
+
var isDeprecatedParameter = function isDeprecatedParameter(paramName) {
|
1811 |
+
return deprecatedParams[paramName];
|
1812 |
+
};
|
1813 |
+
|
1814 |
+
var checkIfParamIsValid = function checkIfParamIsValid(param) {
|
1815 |
+
if (!isValidParameter(param)) {
|
1816 |
+
warn("Unknown parameter \"".concat(param, "\""));
|
1817 |
+
}
|
1818 |
+
};
|
1819 |
+
|
1820 |
+
var checkIfToastParamIsValid = function checkIfToastParamIsValid(param) {
|
1821 |
+
if (toastIncompatibleParams.indexOf(param) !== -1) {
|
1822 |
+
warn("The parameter \"".concat(param, "\" is incompatible with toasts"));
|
1823 |
+
}
|
1824 |
+
};
|
1825 |
+
|
1826 |
+
var checkIfParamIsDeprecated = function checkIfParamIsDeprecated(param) {
|
1827 |
+
if (isDeprecatedParameter(param)) {
|
1828 |
+
warnAboutDeprecation(param, isDeprecatedParameter(param));
|
1829 |
+
}
|
1830 |
+
};
|
1831 |
+
/**
|
1832 |
+
* Show relevant warnings for given params
|
1833 |
+
*
|
1834 |
+
* @param params
|
1835 |
+
*/
|
1836 |
+
|
1837 |
+
|
1838 |
+
var showWarningsForParams = function showWarningsForParams(params) {
|
1839 |
+
for (var param in params) {
|
1840 |
+
checkIfParamIsValid(param);
|
1841 |
+
|
1842 |
+
if (params.toast) {
|
1843 |
+
checkIfToastParamIsValid(param);
|
1844 |
+
}
|
1845 |
+
|
1846 |
+
checkIfParamIsDeprecated(param);
|
1847 |
+
}
|
1848 |
+
};
|
1849 |
+
|
1850 |
+
|
1851 |
+
|
1852 |
+
var staticMethods = /*#__PURE__*/Object.freeze({
|
1853 |
+
isValidParameter: isValidParameter,
|
1854 |
+
isUpdatableParameter: isUpdatableParameter,
|
1855 |
+
isDeprecatedParameter: isDeprecatedParameter,
|
1856 |
+
argsToParams: argsToParams,
|
1857 |
+
isVisible: isVisible$1,
|
1858 |
+
clickConfirm: clickConfirm,
|
1859 |
+
clickDeny: clickDeny,
|
1860 |
+
clickCancel: clickCancel,
|
1861 |
+
getContainer: getContainer,
|
1862 |
+
getPopup: getPopup,
|
1863 |
+
getTitle: getTitle,
|
1864 |
+
getContent: getContent,
|
1865 |
+
getHtmlContainer: getHtmlContainer,
|
1866 |
+
getImage: getImage,
|
1867 |
+
getIcon: getIcon,
|
1868 |
+
getIcons: getIcons,
|
1869 |
+
getInputLabel: getInputLabel,
|
1870 |
+
getCloseButton: getCloseButton,
|
1871 |
+
getActions: getActions,
|
1872 |
+
getConfirmButton: getConfirmButton,
|
1873 |
+
getDenyButton: getDenyButton,
|
1874 |
+
getCancelButton: getCancelButton,
|
1875 |
+
getHeader: getHeader,
|
1876 |
+
getFooter: getFooter,
|
1877 |
+
getTimerProgressBar: getTimerProgressBar,
|
1878 |
+
getFocusableElements: getFocusableElements,
|
1879 |
+
getValidationMessage: getValidationMessage,
|
1880 |
+
isLoading: isLoading,
|
1881 |
+
fire: fire,
|
1882 |
+
mixin: mixin,
|
1883 |
+
queue: queue,
|
1884 |
+
getQueueStep: getQueueStep,
|
1885 |
+
insertQueueStep: insertQueueStep,
|
1886 |
+
deleteQueueStep: deleteQueueStep,
|
1887 |
+
showLoading: showLoading,
|
1888 |
+
enableLoading: showLoading,
|
1889 |
+
getTimerLeft: getTimerLeft,
|
1890 |
+
stopTimer: stopTimer,
|
1891 |
+
resumeTimer: resumeTimer,
|
1892 |
+
toggleTimer: toggleTimer,
|
1893 |
+
increaseTimer: increaseTimer,
|
1894 |
+
isTimerRunning: isTimerRunning
|
1895 |
+
});
|
1896 |
+
|
1897 |
+
/**
|
1898 |
+
* Enables buttons and hide loader.
|
1899 |
+
*/
|
1900 |
+
|
1901 |
+
function hideLoading() {
|
1902 |
+
// do nothing if popup is closed
|
1903 |
+
var innerParams = privateProps.innerParams.get(this);
|
1904 |
+
|
1905 |
+
if (!innerParams) {
|
1906 |
+
return;
|
1907 |
+
}
|
1908 |
+
|
1909 |
+
var domCache = privateProps.domCache.get(this);
|
1910 |
+
hide(domCache.loader);
|
1911 |
+
|
1912 |
+
if (innerParams.showConfirmButton) {
|
1913 |
+
show(domCache.confirmButton, 'inline-block');
|
1914 |
+
} else if (!innerParams.showConfirmButton && !innerParams.showCancelButton) {
|
1915 |
+
hide(domCache.actions);
|
1916 |
+
}
|
1917 |
+
|
1918 |
+
removeClass([domCache.popup, domCache.actions], swalClasses.loading);
|
1919 |
+
domCache.popup.removeAttribute('aria-busy');
|
1920 |
+
domCache.popup.removeAttribute('data-loading');
|
1921 |
+
domCache.confirmButton.disabled = false;
|
1922 |
+
domCache.denyButton.disabled = false;
|
1923 |
+
domCache.cancelButton.disabled = false;
|
1924 |
+
}
|
1925 |
+
|
1926 |
+
function getInput$1(instance) {
|
1927 |
+
var innerParams = privateProps.innerParams.get(instance || this);
|
1928 |
+
var domCache = privateProps.domCache.get(instance || this);
|
1929 |
+
|
1930 |
+
if (!domCache) {
|
1931 |
+
return null;
|
1932 |
+
}
|
1933 |
+
|
1934 |
+
return getInput(domCache.content, innerParams.input);
|
1935 |
+
}
|
1936 |
+
|
1937 |
+
var fixScrollbar = function fixScrollbar() {
|
1938 |
+
// for queues, do not do this more than once
|
1939 |
+
if (states.previousBodyPadding !== null) {
|
1940 |
+
return;
|
1941 |
+
} // if the body has overflow
|
1942 |
+
|
1943 |
+
|
1944 |
+
if (document.body.scrollHeight > window.innerHeight) {
|
1945 |
+
// add padding so the content doesn't shift after removal of scrollbar
|
1946 |
+
states.previousBodyPadding = parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right'));
|
1947 |
+
document.body.style.paddingRight = "".concat(states.previousBodyPadding + measureScrollbar(), "px");
|
1948 |
+
}
|
1949 |
+
};
|
1950 |
+
var undoScrollbar = function undoScrollbar() {
|
1951 |
+
if (states.previousBodyPadding !== null) {
|
1952 |
+
document.body.style.paddingRight = "".concat(states.previousBodyPadding, "px");
|
1953 |
+
states.previousBodyPadding = null;
|
1954 |
+
}
|
1955 |
+
};
|
1956 |
+
|
1957 |
+
/* istanbul ignore file */
|
1958 |
+
|
1959 |
+
var iOSfix = function iOSfix() {
|
1960 |
+
var iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream || navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1;
|
1961 |
+
|
1962 |
+
if (iOS && !hasClass(document.body, swalClasses.iosfix)) {
|
1963 |
+
var offset = document.body.scrollTop;
|
1964 |
+
document.body.style.top = "".concat(offset * -1, "px");
|
1965 |
+
addClass(document.body, swalClasses.iosfix);
|
1966 |
+
lockBodyScroll();
|
1967 |
+
addBottomPaddingForTallPopups(); // #1948
|
1968 |
+
}
|
1969 |
+
};
|
1970 |
+
|
1971 |
+
var addBottomPaddingForTallPopups = function addBottomPaddingForTallPopups() {
|
1972 |
+
var safari = !navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i);
|
1973 |
+
|
1974 |
+
if (safari) {
|
1975 |
+
var bottomPanelHeight = 44;
|
1976 |
+
|
1977 |
+
if (getPopup().scrollHeight > window.innerHeight - bottomPanelHeight) {
|
1978 |
+
getContainer().style.paddingBottom = "".concat(bottomPanelHeight, "px");
|
1979 |
+
}
|
1980 |
+
}
|
1981 |
+
};
|
1982 |
+
|
1983 |
+
var lockBodyScroll = function lockBodyScroll() {
|
1984 |
+
// #1246
|
1985 |
+
var container = getContainer();
|
1986 |
+
var preventTouchMove;
|
1987 |
+
|
1988 |
+
container.ontouchstart = function (e) {
|
1989 |
+
preventTouchMove = shouldPreventTouchMove(e);
|
1990 |
+
};
|
1991 |
+
|
1992 |
+
container.ontouchmove = function (e) {
|
1993 |
+
if (preventTouchMove) {
|
1994 |
+
e.preventDefault();
|
1995 |
+
e.stopPropagation();
|
1996 |
+
}
|
1997 |
+
};
|
1998 |
+
};
|
1999 |
+
|
2000 |
+
var shouldPreventTouchMove = function shouldPreventTouchMove(event) {
|
2001 |
+
var target = event.target;
|
2002 |
+
var container = getContainer();
|
2003 |
+
|
2004 |
+
if (event.touches && event.touches.length && event.touches[0].touchType === 'stylus') {
|
2005 |
+
// #1786
|
2006 |
+
return false;
|
2007 |
+
}
|
2008 |
+
|
2009 |
+
if (target === container) {
|
2010 |
+
return true;
|
2011 |
+
}
|
2012 |
+
|
2013 |
+
if (!isScrollable(container) && target.tagName !== 'INPUT' && // #1603
|
2014 |
+
!(isScrollable(getContent()) && // #1944
|
2015 |
+
getContent().contains(target))) {
|
2016 |
+
return true;
|
2017 |
+
}
|
2018 |
+
|
2019 |
+
return false;
|
2020 |
+
};
|
2021 |
+
|
2022 |
+
var undoIOSfix = function undoIOSfix() {
|
2023 |
+
if (hasClass(document.body, swalClasses.iosfix)) {
|
2024 |
+
var offset = parseInt(document.body.style.top, 10);
|
2025 |
+
removeClass(document.body, swalClasses.iosfix);
|
2026 |
+
document.body.style.top = '';
|
2027 |
+
document.body.scrollTop = offset * -1;
|
2028 |
+
}
|
2029 |
+
};
|
2030 |
+
|
2031 |
+
/* istanbul ignore file */
|
2032 |
+
|
2033 |
+
var isIE11 = function isIE11() {
|
2034 |
+
return !!window.MSInputMethodContext && !!document.documentMode;
|
2035 |
+
}; // Fix IE11 centering sweetalert2/issues/933
|
2036 |
+
|
2037 |
+
|
2038 |
+
var fixVerticalPositionIE = function fixVerticalPositionIE() {
|
2039 |
+
var container = getContainer();
|
2040 |
+
var popup = getPopup();
|
2041 |
+
container.style.removeProperty('align-items');
|
2042 |
+
|
2043 |
+
if (popup.offsetTop < 0) {
|
2044 |
+
container.style.alignItems = 'flex-start';
|
2045 |
+
}
|
2046 |
+
};
|
2047 |
+
|
2048 |
+
var IEfix = function IEfix() {
|
2049 |
+
if (typeof window !== 'undefined' && isIE11()) {
|
2050 |
+
fixVerticalPositionIE();
|
2051 |
+
window.addEventListener('resize', fixVerticalPositionIE);
|
2052 |
+
}
|
2053 |
+
};
|
2054 |
+
var undoIEfix = function undoIEfix() {
|
2055 |
+
if (typeof window !== 'undefined' && isIE11()) {
|
2056 |
+
window.removeEventListener('resize', fixVerticalPositionIE);
|
2057 |
+
}
|
2058 |
+
};
|
2059 |
+
|
2060 |
+
// Adding aria-hidden="true" to elements outside of the active modal dialog ensures that
|
2061 |
+
// elements not within the active modal dialog will not be surfaced if a user opens a screen
|
2062 |
+
// reader’s list of elements (headings, form controls, landmarks, etc.) in the document.
|
2063 |
+
|
2064 |
+
var setAriaHidden = function setAriaHidden() {
|
2065 |
+
var bodyChildren = toArray(document.body.children);
|
2066 |
+
bodyChildren.forEach(function (el) {
|
2067 |
+
if (el === getContainer() || contains(el, getContainer())) {
|
2068 |
+
return;
|
2069 |
+
}
|
2070 |
+
|
2071 |
+
if (el.hasAttribute('aria-hidden')) {
|
2072 |
+
el.setAttribute('data-previous-aria-hidden', el.getAttribute('aria-hidden'));
|
2073 |
+
}
|
2074 |
+
|
2075 |
+
el.setAttribute('aria-hidden', 'true');
|
2076 |
+
});
|
2077 |
+
};
|
2078 |
+
var unsetAriaHidden = function unsetAriaHidden() {
|
2079 |
+
var bodyChildren = toArray(document.body.children);
|
2080 |
+
bodyChildren.forEach(function (el) {
|
2081 |
+
if (el.hasAttribute('data-previous-aria-hidden')) {
|
2082 |
+
el.setAttribute('aria-hidden', el.getAttribute('data-previous-aria-hidden'));
|
2083 |
+
el.removeAttribute('data-previous-aria-hidden');
|
2084 |
+
} else {
|
2085 |
+
el.removeAttribute('aria-hidden');
|
2086 |
+
}
|
2087 |
+
});
|
2088 |
+
};
|
2089 |
+
|
2090 |
+
/**
|
2091 |
+
* This module containts `WeakMap`s for each effectively-"private property" that a `Swal` has.
|
2092 |
+
* For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')`
|
2093 |
+
* This is the approach that Babel will probably take to implement private methods/fields
|
2094 |
+
* https://github.com/tc39/proposal-private-methods
|
2095 |
+
* https://github.com/babel/babel/pull/7555
|
2096 |
+
* Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module*
|
2097 |
+
* then we can use that language feature.
|
2098 |
+
*/
|
2099 |
+
var privateMethods = {
|
2100 |
+
swalPromiseResolve: new WeakMap()
|
2101 |
+
};
|
2102 |
+
|
2103 |
+
/*
|
2104 |
+
* Instance method to close sweetAlert
|
2105 |
+
*/
|
2106 |
+
|
2107 |
+
function removePopupAndResetState(instance, container, isToast$$1, didClose) {
|
2108 |
+
if (isToast$$1) {
|
2109 |
+
triggerDidCloseAndDispose(instance, didClose);
|
2110 |
+
} else {
|
2111 |
+
restoreActiveElement().then(function () {
|
2112 |
+
return triggerDidCloseAndDispose(instance, didClose);
|
2113 |
+
});
|
2114 |
+
globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, {
|
2115 |
+
capture: globalState.keydownListenerCapture
|
2116 |
+
});
|
2117 |
+
globalState.keydownHandlerAdded = false;
|
2118 |
+
}
|
2119 |
+
|
2120 |
+
if (container.parentNode && !document.body.getAttribute('data-swal2-queue-step')) {
|
2121 |
+
container.parentNode.removeChild(container);
|
2122 |
+
}
|
2123 |
+
|
2124 |
+
if (isModal()) {
|
2125 |
+
undoScrollbar();
|
2126 |
+
undoIOSfix();
|
2127 |
+
undoIEfix();
|
2128 |
+
unsetAriaHidden();
|
2129 |
+
}
|
2130 |
+
|
2131 |
+
removeBodyClasses();
|
2132 |
+
}
|
2133 |
+
|
2134 |
+
function removeBodyClasses() {
|
2135 |
+
removeClass([document.documentElement, document.body], [swalClasses.shown, swalClasses['height-auto'], swalClasses['no-backdrop'], swalClasses['toast-shown'], swalClasses['toast-column']]);
|
2136 |
+
}
|
2137 |
+
|
2138 |
+
function close(resolveValue) {
|
2139 |
+
var popup = getPopup();
|
2140 |
+
|
2141 |
+
if (!popup) {
|
2142 |
+
return;
|
2143 |
+
}
|
2144 |
+
|
2145 |
+
resolveValue = prepareResolveValue(resolveValue);
|
2146 |
+
var innerParams = privateProps.innerParams.get(this);
|
2147 |
+
|
2148 |
+
if (!innerParams || hasClass(popup, innerParams.hideClass.popup)) {
|
2149 |
+
return;
|
2150 |
+
}
|
2151 |
+
|
2152 |
+
var swalPromiseResolve = privateMethods.swalPromiseResolve.get(this);
|
2153 |
+
removeClass(popup, innerParams.showClass.popup);
|
2154 |
+
addClass(popup, innerParams.hideClass.popup);
|
2155 |
+
var backdrop = getContainer();
|
2156 |
+
removeClass(backdrop, innerParams.showClass.backdrop);
|
2157 |
+
addClass(backdrop, innerParams.hideClass.backdrop);
|
2158 |
+
handlePopupAnimation(this, popup, innerParams); // Resolve Swal promise
|
2159 |
+
|
2160 |
+
swalPromiseResolve(resolveValue);
|
2161 |
+
}
|
2162 |
+
|
2163 |
+
var prepareResolveValue = function prepareResolveValue(resolveValue) {
|
2164 |
+
// When user calls Swal.close()
|
2165 |
+
if (typeof resolveValue === 'undefined') {
|
2166 |
+
return {
|
2167 |
+
isConfirmed: false,
|
2168 |
+
isDenied: false,
|
2169 |
+
isDismissed: true
|
2170 |
+
};
|
2171 |
+
}
|
2172 |
+
|
2173 |
+
return _extends({
|
2174 |
+
isConfirmed: false,
|
2175 |
+
isDenied: false,
|
2176 |
+
isDismissed: false
|
2177 |
+
}, resolveValue);
|
2178 |
+
};
|
2179 |
+
|
2180 |
+
var handlePopupAnimation = function handlePopupAnimation(instance, popup, innerParams) {
|
2181 |
+
var container = getContainer(); // If animation is supported, animate
|
2182 |
+
|
2183 |
+
var animationIsSupported = animationEndEvent && hasCssAnimation(popup);
|
2184 |
+
var onClose = innerParams.onClose,
|
2185 |
+
onAfterClose = innerParams.onAfterClose,
|
2186 |
+
willClose = innerParams.willClose,
|
2187 |
+
didClose = innerParams.didClose;
|
2188 |
+
runDidClose(popup, willClose, onClose);
|
2189 |
+
|
2190 |
+
if (animationIsSupported) {
|
2191 |
+
animatePopup(instance, popup, container, didClose || onAfterClose);
|
2192 |
+
} else {
|
2193 |
+
// Otherwise, remove immediately
|
2194 |
+
removePopupAndResetState(instance, container, isToast(), didClose || onAfterClose);
|
2195 |
+
}
|
2196 |
+
};
|
2197 |
+
|
2198 |
+
var runDidClose = function runDidClose(popup, willClose, onClose) {
|
2199 |
+
if (willClose !== null && typeof willClose === 'function') {
|
2200 |
+
willClose(popup);
|
2201 |
+
} else if (onClose !== null && typeof onClose === 'function') {
|
2202 |
+
onClose(popup); // @deprecated
|
2203 |
+
}
|
2204 |
+
};
|
2205 |
+
|
2206 |
+
var animatePopup = function animatePopup(instance, popup, container, didClose) {
|
2207 |
+
globalState.swalCloseEventFinishedCallback = removePopupAndResetState.bind(null, instance, container, isToast(), didClose);
|
2208 |
+
popup.addEventListener(animationEndEvent, function (e) {
|
2209 |
+
if (e.target === popup) {
|
2210 |
+
globalState.swalCloseEventFinishedCallback();
|
2211 |
+
delete globalState.swalCloseEventFinishedCallback;
|
2212 |
+
}
|
2213 |
+
});
|
2214 |
+
};
|
2215 |
+
|
2216 |
+
var triggerDidCloseAndDispose = function triggerDidCloseAndDispose(instance, didClose) {
|
2217 |
+
setTimeout(function () {
|
2218 |
+
if (typeof didClose === 'function') {
|
2219 |
+
didClose();
|
2220 |
+
}
|
2221 |
+
|
2222 |
+
instance._destroy();
|
2223 |
+
});
|
2224 |
+
};
|
2225 |
+
|
2226 |
+
function setButtonsDisabled(instance, buttons, disabled) {
|
2227 |
+
var domCache = privateProps.domCache.get(instance);
|
2228 |
+
buttons.forEach(function (button) {
|
2229 |
+
domCache[button].disabled = disabled;
|
2230 |
+
});
|
2231 |
+
}
|
2232 |
+
|
2233 |
+
function setInputDisabled(input, disabled) {
|
2234 |
+
if (!input) {
|
2235 |
+
return false;
|
2236 |
+
}
|
2237 |
+
|
2238 |
+
if (input.type === 'radio') {
|
2239 |
+
var radiosContainer = input.parentNode.parentNode;
|
2240 |
+
var radios = radiosContainer.querySelectorAll('input');
|
2241 |
+
|
2242 |
+
for (var i = 0; i < radios.length; i++) {
|
2243 |
+
radios[i].disabled = disabled;
|
2244 |
+
}
|
2245 |
+
} else {
|
2246 |
+
input.disabled = disabled;
|
2247 |
+
}
|
2248 |
+
}
|
2249 |
+
|
2250 |
+
function enableButtons() {
|
2251 |
+
setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], false);
|
2252 |
+
}
|
2253 |
+
function disableButtons() {
|
2254 |
+
setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], true);
|
2255 |
+
}
|
2256 |
+
function enableInput() {
|
2257 |
+
return setInputDisabled(this.getInput(), false);
|
2258 |
+
}
|
2259 |
+
function disableInput() {
|
2260 |
+
return setInputDisabled(this.getInput(), true);
|
2261 |
+
}
|
2262 |
+
|
2263 |
+
function showValidationMessage(error) {
|
2264 |
+
var domCache = privateProps.domCache.get(this);
|
2265 |
+
var params = privateProps.innerParams.get(this);
|
2266 |
+
setInnerHtml(domCache.validationMessage, error);
|
2267 |
+
domCache.validationMessage.className = swalClasses['validation-message'];
|
2268 |
+
|
2269 |
+
if (params.customClass && params.customClass.validationMessage) {
|
2270 |
+
addClass(domCache.validationMessage, params.customClass.validationMessage);
|
2271 |
+
}
|
2272 |
+
|
2273 |
+
show(domCache.validationMessage);
|
2274 |
+
var input = this.getInput();
|
2275 |
+
|
2276 |
+
if (input) {
|
2277 |
+
input.setAttribute('aria-invalid', true);
|
2278 |
+
input.setAttribute('aria-describedBy', swalClasses['validation-message']);
|
2279 |
+
focusInput(input);
|
2280 |
+
addClass(input, swalClasses.inputerror);
|
2281 |
+
}
|
2282 |
+
} // Hide block with validation message
|
2283 |
+
|
2284 |
+
function resetValidationMessage$1() {
|
2285 |
+
var domCache = privateProps.domCache.get(this);
|
2286 |
+
|
2287 |
+
if (domCache.validationMessage) {
|
2288 |
+
hide(domCache.validationMessage);
|
2289 |
+
}
|
2290 |
+
|
2291 |
+
var input = this.getInput();
|
2292 |
+
|
2293 |
+
if (input) {
|
2294 |
+
input.removeAttribute('aria-invalid');
|
2295 |
+
input.removeAttribute('aria-describedBy');
|
2296 |
+
removeClass(input, swalClasses.inputerror);
|
2297 |
+
}
|
2298 |
+
}
|
2299 |
+
|
2300 |
+
function getProgressSteps$1() {
|
2301 |
+
var domCache = privateProps.domCache.get(this);
|
2302 |
+
return domCache.progressSteps;
|
2303 |
+
}
|
2304 |
+
|
2305 |
+
var Timer = /*#__PURE__*/function () {
|
2306 |
+
function Timer(callback, delay) {
|
2307 |
+
_classCallCheck(this, Timer);
|
2308 |
+
|
2309 |
+
this.callback = callback;
|
2310 |
+
this.remaining = delay;
|
2311 |
+
this.running = false;
|
2312 |
+
this.start();
|
2313 |
+
}
|
2314 |
+
|
2315 |
+
_createClass(Timer, [{
|
2316 |
+
key: "start",
|
2317 |
+
value: function start() {
|
2318 |
+
if (!this.running) {
|
2319 |
+
this.running = true;
|
2320 |
+
this.started = new Date();
|
2321 |
+
this.id = setTimeout(this.callback, this.remaining);
|
2322 |
+
}
|
2323 |
+
|
2324 |
+
return this.remaining;
|
2325 |
+
}
|
2326 |
+
}, {
|
2327 |
+
key: "stop",
|
2328 |
+
value: function stop() {
|
2329 |
+
if (this.running) {
|
2330 |
+
this.running = false;
|
2331 |
+
clearTimeout(this.id);
|
2332 |
+
this.remaining -= new Date() - this.started;
|
2333 |
+
}
|
2334 |
+
|
2335 |
+
return this.remaining;
|
2336 |
+
}
|
2337 |
+
}, {
|
2338 |
+
key: "increase",
|
2339 |
+
value: function increase(n) {
|
2340 |
+
var running = this.running;
|
2341 |
+
|
2342 |
+
if (running) {
|
2343 |
+
this.stop();
|
2344 |
+
}
|
2345 |
+
|
2346 |
+
this.remaining += n;
|
2347 |
+
|
2348 |
+
if (running) {
|
2349 |
+
this.start();
|
2350 |
+
}
|
2351 |
+
|
2352 |
+
return this.remaining;
|
2353 |
+
}
|
2354 |
+
}, {
|
2355 |
+
key: "getTimerLeft",
|
2356 |
+
value: function getTimerLeft() {
|
2357 |
+
if (this.running) {
|
2358 |
+
this.stop();
|
2359 |
+
this.start();
|
2360 |
+
}
|
2361 |
+
|
2362 |
+
return this.remaining;
|
2363 |
+
}
|
2364 |
+
}, {
|
2365 |
+
key: "isRunning",
|
2366 |
+
value: function isRunning() {
|
2367 |
+
return this.running;
|
2368 |
+
}
|
2369 |
+
}]);
|
2370 |
+
|
2371 |
+
return Timer;
|
2372 |
+
}();
|
2373 |
+
|
2374 |
+
var defaultInputValidators = {
|
2375 |
+
email: function email(string, validationMessage) {
|
2376 |
+
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');
|
2377 |
+
},
|
2378 |
+
url: function url(string, validationMessage) {
|
2379 |
+
// taken from https://stackoverflow.com/a/3809435 with a small change from #1306 and #2013
|
2380 |
+
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');
|
2381 |
+
}
|
2382 |
+
};
|
2383 |
+
|
2384 |
+
function setDefaultInputValidators(params) {
|
2385 |
+
// Use default `inputValidator` for supported input types if not provided
|
2386 |
+
if (!params.inputValidator) {
|
2387 |
+
Object.keys(defaultInputValidators).forEach(function (key) {
|
2388 |
+
if (params.input === key) {
|
2389 |
+
params.inputValidator = defaultInputValidators[key];
|
2390 |
+
}
|
2391 |
+
});
|
2392 |
+
}
|
2393 |
+
}
|
2394 |
+
|
2395 |
+
function validateCustomTargetElement(params) {
|
2396 |
+
// Determine if the custom target element is valid
|
2397 |
+
if (!params.target || typeof params.target === 'string' && !document.querySelector(params.target) || typeof params.target !== 'string' && !params.target.appendChild) {
|
2398 |
+
warn('Target parameter is not valid, defaulting to "body"');
|
2399 |
+
params.target = 'body';
|
2400 |
+
}
|
2401 |
+
}
|
2402 |
+
/**
|
2403 |
+
* Set type, text and actions on popup
|
2404 |
+
*
|
2405 |
+
* @param params
|
2406 |
+
* @returns {boolean}
|
2407 |
+
*/
|
2408 |
+
|
2409 |
+
|
2410 |
+
function setParameters(params) {
|
2411 |
+
setDefaultInputValidators(params); // showLoaderOnConfirm && preConfirm
|
2412 |
+
|
2413 |
+
if (params.showLoaderOnConfirm && !params.preConfirm) {
|
2414 |
+
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');
|
2415 |
+
} // params.animation will be actually used in renderPopup.js
|
2416 |
+
// but in case when params.animation is a function, we need to call that function
|
2417 |
+
// before popup (re)initialization, so it'll be possible to check Swal.isVisible()
|
2418 |
+
// inside the params.animation function
|
2419 |
+
|
2420 |
+
|
2421 |
+
params.animation = callIfFunction(params.animation);
|
2422 |
+
validateCustomTargetElement(params); // Replace newlines with <br> in title
|
2423 |
+
|
2424 |
+
if (typeof params.title === 'string') {
|
2425 |
+
params.title = params.title.split('\n').join('<br />');
|
2426 |
+
}
|
2427 |
+
|
2428 |
+
init(params);
|
2429 |
+
}
|
2430 |
+
|
2431 |
+
var SHOW_CLASS_TIMEOUT = 10;
|
2432 |
+
/**
|
2433 |
+
* Open popup, add necessary classes and styles, fix scrollbar
|
2434 |
+
*
|
2435 |
+
* @param params
|
2436 |
+
*/
|
2437 |
+
|
2438 |
+
var openPopup = function openPopup(params) {
|
2439 |
+
var container = getContainer();
|
2440 |
+
var popup = getPopup();
|
2441 |
+
|
2442 |
+
if (typeof params.willOpen === 'function') {
|
2443 |
+
params.willOpen(popup);
|
2444 |
+
} else if (typeof params.onBeforeOpen === 'function') {
|
2445 |
+
params.onBeforeOpen(popup); // @deprecated
|
2446 |
+
}
|
2447 |
+
|
2448 |
+
var bodyStyles = window.getComputedStyle(document.body);
|
2449 |
+
var initialBodyOverflow = bodyStyles.overflowY;
|
2450 |
+
addClasses$1(container, popup, params); // scrolling is 'hidden' until animation is done, after that 'auto'
|
2451 |
+
|
2452 |
+
setTimeout(function () {
|
2453 |
+
setScrollingVisibility(container, popup);
|
2454 |
+
}, SHOW_CLASS_TIMEOUT);
|
2455 |
+
|
2456 |
+
if (isModal()) {
|
2457 |
+
fixScrollContainer(container, params.scrollbarPadding, initialBodyOverflow);
|
2458 |
+
setAriaHidden();
|
2459 |
+
}
|
2460 |
+
|
2461 |
+
if (!isToast() && !globalState.previousActiveElement) {
|
2462 |
+
globalState.previousActiveElement = document.activeElement;
|
2463 |
+
}
|
2464 |
+
|
2465 |
+
runDidOpen(popup, params);
|
2466 |
+
removeClass(container, swalClasses['no-transition']);
|
2467 |
+
};
|
2468 |
+
|
2469 |
+
var runDidOpen = function runDidOpen(popup, params) {
|
2470 |
+
if (typeof params.didOpen === 'function') {
|
2471 |
+
setTimeout(function () {
|
2472 |
+
return params.didOpen(popup);
|
2473 |
+
});
|
2474 |
+
} else if (typeof params.onOpen === 'function') {
|
2475 |
+
setTimeout(function () {
|
2476 |
+
return params.onOpen(popup);
|
2477 |
+
}); // @deprecated
|
2478 |
+
}
|
2479 |
+
};
|
2480 |
+
|
2481 |
+
var swalOpenAnimationFinished = function swalOpenAnimationFinished(event) {
|
2482 |
+
var popup = getPopup();
|
2483 |
+
|
2484 |
+
if (event.target !== popup) {
|
2485 |
+
return;
|
2486 |
+
}
|
2487 |
+
|
2488 |
+
var container = getContainer();
|
2489 |
+
popup.removeEventListener(animationEndEvent, swalOpenAnimationFinished);
|
2490 |
+
container.style.overflowY = 'auto';
|
2491 |
+
};
|
2492 |
+
|
2493 |
+
var setScrollingVisibility = function setScrollingVisibility(container, popup) {
|
2494 |
+
if (animationEndEvent && hasCssAnimation(popup)) {
|
2495 |
+
container.style.overflowY = 'hidden';
|
2496 |
+
popup.addEventListener(animationEndEvent, swalOpenAnimationFinished);
|
2497 |
+
} else {
|
2498 |
+
container.style.overflowY = 'auto';
|
2499 |
+
}
|
2500 |
+
};
|
2501 |
+
|
2502 |
+
var fixScrollContainer = function fixScrollContainer(container, scrollbarPadding, initialBodyOverflow) {
|
2503 |
+
iOSfix();
|
2504 |
+
IEfix();
|
2505 |
+
|
2506 |
+
if (scrollbarPadding && initialBodyOverflow !== 'hidden') {
|
2507 |
+
fixScrollbar();
|
2508 |
+
} // sweetalert2/issues/1247
|
2509 |
+
|
2510 |
+
|
2511 |
+
setTimeout(function () {
|
2512 |
+
container.scrollTop = 0;
|
2513 |
+
});
|
2514 |
+
};
|
2515 |
+
|
2516 |
+
var addClasses$1 = function addClasses(container, popup, params) {
|
2517 |
+
addClass(container, params.showClass.backdrop); // the workaround with setting/unsetting opacity is needed for #2019 and 2059
|
2518 |
+
|
2519 |
+
popup.style.setProperty('opacity', '0', 'important');
|
2520 |
+
show(popup);
|
2521 |
+
setTimeout(function () {
|
2522 |
+
// Animate popup right after showing it
|
2523 |
+
addClass(popup, params.showClass.popup); // and remove the opacity workaround
|
2524 |
+
|
2525 |
+
popup.style.removeProperty('opacity');
|
2526 |
+
}, SHOW_CLASS_TIMEOUT); // 10ms in order to fix #2062
|
2527 |
+
|
2528 |
+
addClass([document.documentElement, document.body], swalClasses.shown);
|
2529 |
+
|
2530 |
+
if (params.heightAuto && params.backdrop && !params.toast) {
|
2531 |
+
addClass([document.documentElement, document.body], swalClasses['height-auto']);
|
2532 |
+
}
|
2533 |
+
};
|
2534 |
+
|
2535 |
+
var handleInputOptionsAndValue = function handleInputOptionsAndValue(instance, params) {
|
2536 |
+
if (params.input === 'select' || params.input === 'radio') {
|
2537 |
+
handleInputOptions(instance, params);
|
2538 |
+
} else if (['text', 'email', 'number', 'tel', 'textarea'].indexOf(params.input) !== -1 && (hasToPromiseFn(params.inputValue) || isPromise(params.inputValue))) {
|
2539 |
+
handleInputValue(instance, params);
|
2540 |
+
}
|
2541 |
+
};
|
2542 |
+
var getInputValue = function getInputValue(instance, innerParams) {
|
2543 |
+
var input = instance.getInput();
|
2544 |
+
|
2545 |
+
if (!input) {
|
2546 |
+
return null;
|
2547 |
+
}
|
2548 |
+
|
2549 |
+
switch (innerParams.input) {
|
2550 |
+
case 'checkbox':
|
2551 |
+
return getCheckboxValue(input);
|
2552 |
+
|
2553 |
+
case 'radio':
|
2554 |
+
return getRadioValue(input);
|
2555 |
+
|
2556 |
+
case 'file':
|
2557 |
+
return getFileValue(input);
|
2558 |
+
|
2559 |
+
default:
|
2560 |
+
return innerParams.inputAutoTrim ? input.value.trim() : input.value;
|
2561 |
+
}
|
2562 |
+
};
|
2563 |
+
|
2564 |
+
var getCheckboxValue = function getCheckboxValue(input) {
|
2565 |
+
return input.checked ? 1 : 0;
|
2566 |
+
};
|
2567 |
+
|
2568 |
+
var getRadioValue = function getRadioValue(input) {
|
2569 |
+
return input.checked ? input.value : null;
|
2570 |
+
};
|
2571 |
+
|
2572 |
+
var getFileValue = function getFileValue(input) {
|
2573 |
+
return input.files.length ? input.getAttribute('multiple') !== null ? input.files : input.files[0] : null;
|
2574 |
+
};
|
2575 |
+
|
2576 |
+
var handleInputOptions = function handleInputOptions(instance, params) {
|
2577 |
+
var content = getContent();
|
2578 |
+
|
2579 |
+
var processInputOptions = function processInputOptions(inputOptions) {
|
2580 |
+
return populateInputOptions[params.input](content, formatInputOptions(inputOptions), params);
|
2581 |
+
};
|
2582 |
+
|
2583 |
+
if (hasToPromiseFn(params.inputOptions) || isPromise(params.inputOptions)) {
|
2584 |
+
showLoading();
|
2585 |
+
asPromise(params.inputOptions).then(function (inputOptions) {
|
2586 |
+
instance.hideLoading();
|
2587 |
+
processInputOptions(inputOptions);
|
2588 |
+
});
|
2589 |
+
} else if (_typeof(params.inputOptions) === 'object') {
|
2590 |
+
processInputOptions(params.inputOptions);
|
2591 |
+
} else {
|
2592 |
+
error("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(_typeof(params.inputOptions)));
|
2593 |
+
}
|
2594 |
+
};
|
2595 |
+
|
2596 |
+
var handleInputValue = function handleInputValue(instance, params) {
|
2597 |
+
var input = instance.getInput();
|
2598 |
+
hide(input);
|
2599 |
+
asPromise(params.inputValue).then(function (inputValue) {
|
2600 |
+
input.value = params.input === 'number' ? parseFloat(inputValue) || 0 : "".concat(inputValue);
|
2601 |
+
show(input);
|
2602 |
+
input.focus();
|
2603 |
+
instance.hideLoading();
|
2604 |
+
})["catch"](function (err) {
|
2605 |
+
error("Error in inputValue promise: ".concat(err));
|
2606 |
+
input.value = '';
|
2607 |
+
show(input);
|
2608 |
+
input.focus();
|
2609 |
+
instance.hideLoading();
|
2610 |
+
});
|
2611 |
+
};
|
2612 |
+
|
2613 |
+
var populateInputOptions = {
|
2614 |
+
select: function select(content, inputOptions, params) {
|
2615 |
+
var select = getChildByClass(content, swalClasses.select);
|
2616 |
+
|
2617 |
+
var renderOption = function renderOption(parent, optionLabel, optionValue) {
|
2618 |
+
var option = document.createElement('option');
|
2619 |
+
option.value = optionValue;
|
2620 |
+
setInnerHtml(option, optionLabel);
|
2621 |
+
|
2622 |
+
if (params.inputValue.toString() === optionValue.toString()) {
|
2623 |
+
option.selected = true;
|
2624 |
+
}
|
2625 |
+
|
2626 |
+
parent.appendChild(option);
|
2627 |
+
};
|
2628 |
+
|
2629 |
+
inputOptions.forEach(function (inputOption) {
|
2630 |
+
var optionValue = inputOption[0];
|
2631 |
+
var optionLabel = inputOption[1]; // <optgroup> spec:
|
2632 |
+
// https://www.w3.org/TR/html401/interact/forms.html#h-17.6
|
2633 |
+
// "...all OPTGROUP elements must be specified directly within a SELECT element (i.e., groups may not be nested)..."
|
2634 |
+
// check whether this is a <optgroup>
|
2635 |
+
|
2636 |
+
if (Array.isArray(optionLabel)) {
|
2637 |
+
// if it is an array, then it is an <optgroup>
|
2638 |
+
var optgroup = document.createElement('optgroup');
|
2639 |
+
optgroup.label = optionValue;
|
2640 |
+
optgroup.disabled = false; // not configurable for now
|
2641 |
+
|
2642 |
+
select.appendChild(optgroup);
|
2643 |
+
optionLabel.forEach(function (o) {
|
2644 |
+
return renderOption(optgroup, o[1], o[0]);
|
2645 |
+
});
|
2646 |
+
} else {
|
2647 |
+
// case of <option>
|
2648 |
+
renderOption(select, optionLabel, optionValue);
|
2649 |
+
}
|
2650 |
+
});
|
2651 |
+
select.focus();
|
2652 |
+
},
|
2653 |
+
radio: function radio(content, inputOptions, params) {
|
2654 |
+
var radio = getChildByClass(content, swalClasses.radio);
|
2655 |
+
inputOptions.forEach(function (inputOption) {
|
2656 |
+
var radioValue = inputOption[0];
|
2657 |
+
var radioLabel = inputOption[1];
|
2658 |
+
var radioInput = document.createElement('input');
|
2659 |
+
var radioLabelElement = document.createElement('label');
|
2660 |
+
radioInput.type = 'radio';
|
2661 |
+
radioInput.name = swalClasses.radio;
|
2662 |
+
radioInput.value = radioValue;
|
2663 |
+
|
2664 |
+
if (params.inputValue.toString() === radioValue.toString()) {
|
2665 |
+
radioInput.checked = true;
|
2666 |
+
}
|
2667 |
+
|
2668 |
+
var label = document.createElement('span');
|
2669 |
+
setInnerHtml(label, radioLabel);
|
2670 |
+
label.className = swalClasses.label;
|
2671 |
+
radioLabelElement.appendChild(radioInput);
|
2672 |
+
radioLabelElement.appendChild(label);
|
2673 |
+
radio.appendChild(radioLabelElement);
|
2674 |
+
});
|
2675 |
+
var radios = radio.querySelectorAll('input');
|
2676 |
+
|
2677 |
+
if (radios.length) {
|
2678 |
+
radios[0].focus();
|
2679 |
+
}
|
2680 |
+
}
|
2681 |
+
};
|
2682 |
+
/**
|
2683 |
+
* Converts `inputOptions` into an array of `[value, label]`s
|
2684 |
+
* @param inputOptions
|
2685 |
+
*/
|
2686 |
+
|
2687 |
+
var formatInputOptions = function formatInputOptions(inputOptions) {
|
2688 |
+
var result = [];
|
2689 |
+
|
2690 |
+
if (typeof Map !== 'undefined' && inputOptions instanceof Map) {
|
2691 |
+
inputOptions.forEach(function (value, key) {
|
2692 |
+
var valueFormatted = value;
|
2693 |
+
|
2694 |
+
if (_typeof(valueFormatted) === 'object') {
|
2695 |
+
// case of <optgroup>
|
2696 |
+
valueFormatted = formatInputOptions(valueFormatted);
|
2697 |
+
}
|
2698 |
+
|
2699 |
+
result.push([key, valueFormatted]);
|
2700 |
+
});
|
2701 |
+
} else {
|
2702 |
+
Object.keys(inputOptions).forEach(function (key) {
|
2703 |
+
var valueFormatted = inputOptions[key];
|
2704 |
+
|
2705 |
+
if (_typeof(valueFormatted) === 'object') {
|
2706 |
+
// case of <optgroup>
|
2707 |
+
valueFormatted = formatInputOptions(valueFormatted);
|
2708 |
+
}
|
2709 |
+
|
2710 |
+
result.push([key, valueFormatted]);
|
2711 |
+
});
|
2712 |
+
}
|
2713 |
+
|
2714 |
+
return result;
|
2715 |
+
};
|
2716 |
+
|
2717 |
+
var handleConfirmButtonClick = function handleConfirmButtonClick(instance, innerParams) {
|
2718 |
+
instance.disableButtons();
|
2719 |
+
|
2720 |
+
if (innerParams.input) {
|
2721 |
+
handleConfirmOrDenyWithInput(instance, innerParams, 'confirm');
|
2722 |
+
} else {
|
2723 |
+
confirm(instance, innerParams, true);
|
2724 |
+
}
|
2725 |
+
};
|
2726 |
+
var handleDenyButtonClick = function handleDenyButtonClick(instance, innerParams) {
|
2727 |
+
instance.disableButtons(); // here we could add preDeny in future, if needed
|
2728 |
+
|
2729 |
+
if (innerParams.returnInputValueOnDeny) {
|
2730 |
+
handleConfirmOrDenyWithInput(instance, innerParams, 'deny');
|
2731 |
+
} else {
|
2732 |
+
deny(instance, false);
|
2733 |
+
}
|
2734 |
+
};
|
2735 |
+
var handleCancelButtonClick = function handleCancelButtonClick(instance, dismissWith) {
|
2736 |
+
instance.disableButtons();
|
2737 |
+
dismissWith(DismissReason.cancel);
|
2738 |
+
};
|
2739 |
+
|
2740 |
+
var handleConfirmOrDenyWithInput = function handleConfirmOrDenyWithInput(instance, innerParams, type
|
2741 |
+
/* type is either 'confirm' or 'deny' */
|
2742 |
+
) {
|
2743 |
+
var inputValue = getInputValue(instance, innerParams);
|
2744 |
+
|
2745 |
+
if (innerParams.inputValidator) {
|
2746 |
+
handleInputValidator(instance, innerParams, inputValue);
|
2747 |
+
} else if (!instance.getInput().checkValidity()) {
|
2748 |
+
instance.enableButtons();
|
2749 |
+
instance.showValidationMessage(innerParams.validationMessage);
|
2750 |
+
} else if (type === 'deny') {
|
2751 |
+
deny(instance, inputValue);
|
2752 |
+
} else {
|
2753 |
+
confirm(instance, innerParams, inputValue);
|
2754 |
+
}
|
2755 |
+
};
|
2756 |
+
|
2757 |
+
var handleInputValidator = function handleInputValidator(instance, innerParams, inputValue) {
|
2758 |
+
instance.disableInput();
|
2759 |
+
var validationPromise = Promise.resolve().then(function () {
|
2760 |
+
return asPromise(innerParams.inputValidator(inputValue, innerParams.validationMessage));
|
2761 |
+
});
|
2762 |
+
validationPromise.then(function (validationMessage) {
|
2763 |
+
instance.enableButtons();
|
2764 |
+
instance.enableInput();
|
2765 |
+
|
2766 |
+
if (validationMessage) {
|
2767 |
+
instance.showValidationMessage(validationMessage);
|
2768 |
+
} else {
|
2769 |
+
confirm(instance, innerParams, inputValue);
|
2770 |
+
}
|
2771 |
+
});
|
2772 |
+
};
|
2773 |
+
|
2774 |
+
var deny = function deny(instance, value) {
|
2775 |
+
instance.closePopup({
|
2776 |
+
isDenied: true,
|
2777 |
+
value: value
|
2778 |
+
});
|
2779 |
+
};
|
2780 |
+
|
2781 |
+
var succeedWith = function succeedWith(instance, value) {
|
2782 |
+
instance.closePopup({
|
2783 |
+
isConfirmed: true,
|
2784 |
+
value: value
|
2785 |
+
});
|
2786 |
+
};
|
2787 |
+
|
2788 |
+
var confirm = function confirm(instance, innerParams, value) {
|
2789 |
+
if (innerParams.showLoaderOnConfirm) {
|
2790 |
+
showLoading(); // TODO: make showLoading an *instance* method
|
2791 |
+
}
|
2792 |
+
|
2793 |
+
if (innerParams.preConfirm) {
|
2794 |
+
instance.resetValidationMessage();
|
2795 |
+
var preConfirmPromise = Promise.resolve().then(function () {
|
2796 |
+
return asPromise(innerParams.preConfirm(value, innerParams.validationMessage));
|
2797 |
+
});
|
2798 |
+
preConfirmPromise.then(function (preConfirmValue) {
|
2799 |
+
if (isVisible(getValidationMessage()) || preConfirmValue === false) {
|
2800 |
+
instance.hideLoading();
|
2801 |
+
} else {
|
2802 |
+
succeedWith(instance, typeof preConfirmValue === 'undefined' ? value : preConfirmValue);
|
2803 |
+
}
|
2804 |
+
});
|
2805 |
+
} else {
|
2806 |
+
succeedWith(instance, value);
|
2807 |
+
}
|
2808 |
+
};
|
2809 |
+
|
2810 |
+
var addKeydownHandler = function addKeydownHandler(instance, globalState, innerParams, dismissWith) {
|
2811 |
+
if (globalState.keydownTarget && globalState.keydownHandlerAdded) {
|
2812 |
+
globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, {
|
2813 |
+
capture: globalState.keydownListenerCapture
|
2814 |
+
});
|
2815 |
+
globalState.keydownHandlerAdded = false;
|
2816 |
+
}
|
2817 |
+
|
2818 |
+
if (!innerParams.toast) {
|
2819 |
+
globalState.keydownHandler = function (e) {
|
2820 |
+
return keydownHandler(instance, e, dismissWith);
|
2821 |
+
};
|
2822 |
+
|
2823 |
+
globalState.keydownTarget = innerParams.keydownListenerCapture ? window : getPopup();
|
2824 |
+
globalState.keydownListenerCapture = innerParams.keydownListenerCapture;
|
2825 |
+
globalState.keydownTarget.addEventListener('keydown', globalState.keydownHandler, {
|
2826 |
+
capture: globalState.keydownListenerCapture
|
2827 |
+
});
|
2828 |
+
globalState.keydownHandlerAdded = true;
|
2829 |
+
}
|
2830 |
+
}; // Focus handling
|
2831 |
+
|
2832 |
+
var setFocus = function setFocus(innerParams, index, increment) {
|
2833 |
+
var focusableElements = getFocusableElements(); // search for visible elements and select the next possible match
|
2834 |
+
|
2835 |
+
for (var i = 0; i < focusableElements.length; i++) {
|
2836 |
+
index = index + increment; // rollover to first item
|
2837 |
+
|
2838 |
+
if (index === focusableElements.length) {
|
2839 |
+
index = 0; // go to last item
|
2840 |
+
} else if (index === -1) {
|
2841 |
+
index = focusableElements.length - 1;
|
2842 |
+
}
|
2843 |
+
|
2844 |
+
return focusableElements[index].focus();
|
2845 |
+
} // no visible focusable elements, focus the popup
|
2846 |
+
|
2847 |
+
|
2848 |
+
getPopup().focus();
|
2849 |
+
};
|
2850 |
+
var arrowKeysNextButton = ['ArrowRight', 'ArrowDown', 'Right', 'Down' // IE11
|
2851 |
+
];
|
2852 |
+
var arrowKeysPreviousButton = ['ArrowLeft', 'ArrowUp', 'Left', 'Up' // IE11
|
2853 |
+
];
|
2854 |
+
var escKeys = ['Escape', 'Esc' // IE11
|
2855 |
+
];
|
2856 |
+
|
2857 |
+
var keydownHandler = function keydownHandler(instance, e, dismissWith) {
|
2858 |
+
var innerParams = privateProps.innerParams.get(instance);
|
2859 |
+
|
2860 |
+
if (innerParams.stopKeydownPropagation) {
|
2861 |
+
e.stopPropagation();
|
2862 |
+
} // ENTER
|
2863 |
+
|
2864 |
+
|
2865 |
+
if (e.key === 'Enter') {
|
2866 |
+
handleEnter(instance, e, innerParams); // TAB
|
2867 |
+
} else if (e.key === 'Tab') {
|
2868 |
+
handleTab(e, innerParams); // ARROWS - switch focus between buttons
|
2869 |
+
} else if ([].concat(arrowKeysNextButton, arrowKeysPreviousButton).indexOf(e.key) !== -1) {
|
2870 |
+
handleArrows(e.key); // ESC
|
2871 |
+
} else if (escKeys.indexOf(e.key) !== -1) {
|
2872 |
+
handleEsc(e, innerParams, dismissWith);
|
2873 |
+
}
|
2874 |
+
};
|
2875 |
+
|
2876 |
+
var handleEnter = function handleEnter(instance, e, innerParams) {
|
2877 |
+
// #720 #721
|
2878 |
+
if (e.isComposing) {
|
2879 |
+
return;
|
2880 |
+
}
|
2881 |
+
|
2882 |
+
if (e.target && instance.getInput() && e.target.outerHTML === instance.getInput().outerHTML) {
|
2883 |
+
if (['textarea', 'file'].indexOf(innerParams.input) !== -1) {
|
2884 |
+
return; // do not submit
|
2885 |
+
}
|
2886 |
+
|
2887 |
+
clickConfirm();
|
2888 |
+
e.preventDefault();
|
2889 |
+
}
|
2890 |
+
};
|
2891 |
+
|
2892 |
+
var handleTab = function handleTab(e, innerParams) {
|
2893 |
+
var targetElement = e.target;
|
2894 |
+
var focusableElements = getFocusableElements();
|
2895 |
+
var btnIndex = -1;
|
2896 |
+
|
2897 |
+
for (var i = 0; i < focusableElements.length; i++) {
|
2898 |
+
if (targetElement === focusableElements[i]) {
|
2899 |
+
btnIndex = i;
|
2900 |
+
break;
|
2901 |
+
}
|
2902 |
+
}
|
2903 |
+
|
2904 |
+
if (!e.shiftKey) {
|
2905 |
+
// Cycle to the next button
|
2906 |
+
setFocus(innerParams, btnIndex, 1);
|
2907 |
+
} else {
|
2908 |
+
// Cycle to the prev button
|
2909 |
+
setFocus(innerParams, btnIndex, -1);
|
2910 |
+
}
|
2911 |
+
|
2912 |
+
e.stopPropagation();
|
2913 |
+
e.preventDefault();
|
2914 |
+
};
|
2915 |
+
|
2916 |
+
var handleArrows = function handleArrows(key) {
|
2917 |
+
var confirmButton = getConfirmButton();
|
2918 |
+
var denyButton = getDenyButton();
|
2919 |
+
var cancelButton = getCancelButton();
|
2920 |
+
|
2921 |
+
if (!([confirmButton, denyButton, cancelButton].indexOf(document.activeElement) !== -1)) {
|
2922 |
+
return;
|
2923 |
+
}
|
2924 |
+
|
2925 |
+
var sibling = arrowKeysNextButton.indexOf(key) !== -1 ? 'nextElementSibling' : 'previousElementSibling';
|
2926 |
+
var buttonToFocus = document.activeElement[sibling];
|
2927 |
+
|
2928 |
+
if (buttonToFocus) {
|
2929 |
+
buttonToFocus.focus();
|
2930 |
+
}
|
2931 |
+
};
|
2932 |
+
|
2933 |
+
var handleEsc = function handleEsc(e, innerParams, dismissWith) {
|
2934 |
+
if (callIfFunction(innerParams.allowEscapeKey)) {
|
2935 |
+
e.preventDefault();
|
2936 |
+
dismissWith(DismissReason.esc);
|
2937 |
+
}
|
2938 |
+
};
|
2939 |
+
|
2940 |
+
var handlePopupClick = function handlePopupClick(instance, domCache, dismissWith) {
|
2941 |
+
var innerParams = privateProps.innerParams.get(instance);
|
2942 |
+
|
2943 |
+
if (innerParams.toast) {
|
2944 |
+
handleToastClick(instance, domCache, dismissWith);
|
2945 |
+
} else {
|
2946 |
+
// Ignore click events that had mousedown on the popup but mouseup on the container
|
2947 |
+
// This can happen when the user drags a slider
|
2948 |
+
handleModalMousedown(domCache); // Ignore click events that had mousedown on the container but mouseup on the popup
|
2949 |
+
|
2950 |
+
handleContainerMousedown(domCache);
|
2951 |
+
handleModalClick(instance, domCache, dismissWith);
|
2952 |
+
}
|
2953 |
+
};
|
2954 |
+
|
2955 |
+
var handleToastClick = function handleToastClick(instance, domCache, dismissWith) {
|
2956 |
+
// Closing toast by internal click
|
2957 |
+
domCache.popup.onclick = function () {
|
2958 |
+
var innerParams = privateProps.innerParams.get(instance);
|
2959 |
+
|
2960 |
+
if (innerParams.showConfirmButton || innerParams.showDenyButton || innerParams.showCancelButton || innerParams.showCloseButton || innerParams.input) {
|
2961 |
+
return;
|
2962 |
+
}
|
2963 |
+
|
2964 |
+
dismissWith(DismissReason.close);
|
2965 |
+
};
|
2966 |
+
};
|
2967 |
+
|
2968 |
+
var ignoreOutsideClick = false;
|
2969 |
+
|
2970 |
+
var handleModalMousedown = function handleModalMousedown(domCache) {
|
2971 |
+
domCache.popup.onmousedown = function () {
|
2972 |
+
domCache.container.onmouseup = function (e) {
|
2973 |
+
domCache.container.onmouseup = undefined; // We only check if the mouseup target is the container because usually it doesn't
|
2974 |
+
// have any other direct children aside of the popup
|
2975 |
+
|
2976 |
+
if (e.target === domCache.container) {
|
2977 |
+
ignoreOutsideClick = true;
|
2978 |
+
}
|
2979 |
+
};
|
2980 |
+
};
|
2981 |
+
};
|
2982 |
+
|
2983 |
+
var handleContainerMousedown = function handleContainerMousedown(domCache) {
|
2984 |
+
domCache.container.onmousedown = function () {
|
2985 |
+
domCache.popup.onmouseup = function (e) {
|
2986 |
+
domCache.popup.onmouseup = undefined; // We also need to check if the mouseup target is a child of the popup
|
2987 |
+
|
2988 |
+
if (e.target === domCache.popup || domCache.popup.contains(e.target)) {
|
2989 |
+
ignoreOutsideClick = true;
|
2990 |
+
}
|
2991 |
+
};
|
2992 |
+
};
|
2993 |
+
};
|
2994 |
+
|
2995 |
+
var handleModalClick = function handleModalClick(instance, domCache, dismissWith) {
|
2996 |
+
domCache.container.onclick = function (e) {
|
2997 |
+
var innerParams = privateProps.innerParams.get(instance);
|
2998 |
+
|
2999 |
+
if (ignoreOutsideClick) {
|
3000 |
+
ignoreOutsideClick = false;
|
3001 |
+
return;
|
3002 |
+
}
|
3003 |
+
|
3004 |
+
if (e.target === domCache.container && callIfFunction(innerParams.allowOutsideClick)) {
|
3005 |
+
dismissWith(DismissReason.backdrop);
|
3006 |
+
}
|
3007 |
+
};
|
3008 |
+
};
|
3009 |
+
|
3010 |
+
function _main(userParams) {
|
3011 |
+
showWarningsForParams(userParams);
|
3012 |
+
|
3013 |
+
if (globalState.currentInstance) {
|
3014 |
+
globalState.currentInstance._destroy();
|
3015 |
+
}
|
3016 |
+
|
3017 |
+
globalState.currentInstance = this;
|
3018 |
+
var innerParams = prepareParams(userParams);
|
3019 |
+
setParameters(innerParams);
|
3020 |
+
Object.freeze(innerParams); // clear the previous timer
|
3021 |
+
|
3022 |
+
if (globalState.timeout) {
|
3023 |
+
globalState.timeout.stop();
|
3024 |
+
delete globalState.timeout;
|
3025 |
+
} // clear the restore focus timeout
|
3026 |
+
|
3027 |
+
|
3028 |
+
clearTimeout(globalState.restoreFocusTimeout);
|
3029 |
+
var domCache = populateDomCache(this);
|
3030 |
+
render(this, innerParams);
|
3031 |
+
privateProps.innerParams.set(this, innerParams);
|
3032 |
+
return swalPromise(this, domCache, innerParams);
|
3033 |
+
}
|
3034 |
+
|
3035 |
+
var prepareParams = function prepareParams(userParams) {
|
3036 |
+
var showClass = _extends({}, defaultParams.showClass, userParams.showClass);
|
3037 |
+
|
3038 |
+
var hideClass = _extends({}, defaultParams.hideClass, userParams.hideClass);
|
3039 |
+
|
3040 |
+
var params = _extends({}, defaultParams, userParams);
|
3041 |
+
|
3042 |
+
params.showClass = showClass;
|
3043 |
+
params.hideClass = hideClass; // @deprecated
|
3044 |
+
|
3045 |
+
if (userParams.animation === false) {
|
3046 |
+
params.showClass = {
|
3047 |
+
popup: 'swal2-noanimation',
|
3048 |
+
backdrop: 'swal2-noanimation'
|
3049 |
+
};
|
3050 |
+
params.hideClass = {};
|
3051 |
+
}
|
3052 |
+
|
3053 |
+
return params;
|
3054 |
+
};
|
3055 |
+
|
3056 |
+
var swalPromise = function swalPromise(instance, domCache, innerParams) {
|
3057 |
+
return new Promise(function (resolve) {
|
3058 |
+
// functions to handle all closings/dismissals
|
3059 |
+
var dismissWith = function dismissWith(dismiss) {
|
3060 |
+
instance.closePopup({
|
3061 |
+
isDismissed: true,
|
3062 |
+
dismiss: dismiss
|
3063 |
+
});
|
3064 |
+
};
|
3065 |
+
|
3066 |
+
privateMethods.swalPromiseResolve.set(instance, resolve);
|
3067 |
+
|
3068 |
+
domCache.confirmButton.onclick = function () {
|
3069 |
+
return handleConfirmButtonClick(instance, innerParams);
|
3070 |
+
};
|
3071 |
+
|
3072 |
+
domCache.denyButton.onclick = function () {
|
3073 |
+
return handleDenyButtonClick(instance, innerParams);
|
3074 |
+
};
|
3075 |
+
|
3076 |
+
domCache.cancelButton.onclick = function () {
|
3077 |
+
return handleCancelButtonClick(instance, dismissWith);
|
3078 |
+
};
|
3079 |
+
|
3080 |
+
domCache.closeButton.onclick = function () {
|
3081 |
+
return dismissWith(DismissReason.close);
|
3082 |
+
};
|
3083 |
+
|
3084 |
+
handlePopupClick(instance, domCache, dismissWith);
|
3085 |
+
addKeydownHandler(instance, globalState, innerParams, dismissWith);
|
3086 |
+
|
3087 |
+
if (innerParams.toast && (innerParams.input || innerParams.footer || innerParams.showCloseButton)) {
|
3088 |
+
addClass(document.body, swalClasses['toast-column']);
|
3089 |
+
} else {
|
3090 |
+
removeClass(document.body, swalClasses['toast-column']);
|
3091 |
+
}
|
3092 |
+
|
3093 |
+
handleInputOptionsAndValue(instance, innerParams);
|
3094 |
+
openPopup(innerParams);
|
3095 |
+
setupTimer(globalState, innerParams, dismissWith);
|
3096 |
+
initFocus(domCache, innerParams); // Scroll container to top on open (#1247, #1946)
|
3097 |
+
|
3098 |
+
setTimeout(function () {
|
3099 |
+
domCache.container.scrollTop = 0;
|
3100 |
+
});
|
3101 |
+
});
|
3102 |
+
};
|
3103 |
+
|
3104 |
+
var populateDomCache = function populateDomCache(instance) {
|
3105 |
+
var domCache = {
|
3106 |
+
popup: getPopup(),
|
3107 |
+
container: getContainer(),
|
3108 |
+
content: getContent(),
|
3109 |
+
actions: getActions(),
|
3110 |
+
confirmButton: getConfirmButton(),
|
3111 |
+
denyButton: getDenyButton(),
|
3112 |
+
cancelButton: getCancelButton(),
|
3113 |
+
loader: getLoader(),
|
3114 |
+
closeButton: getCloseButton(),
|
3115 |
+
validationMessage: getValidationMessage(),
|
3116 |
+
progressSteps: getProgressSteps()
|
3117 |
+
};
|
3118 |
+
privateProps.domCache.set(instance, domCache);
|
3119 |
+
return domCache;
|
3120 |
+
};
|
3121 |
+
|
3122 |
+
var setupTimer = function setupTimer(globalState$$1, innerParams, dismissWith) {
|
3123 |
+
var timerProgressBar = getTimerProgressBar();
|
3124 |
+
hide(timerProgressBar);
|
3125 |
+
|
3126 |
+
if (innerParams.timer) {
|
3127 |
+
globalState$$1.timeout = new Timer(function () {
|
3128 |
+
dismissWith('timer');
|
3129 |
+
delete globalState$$1.timeout;
|
3130 |
+
}, innerParams.timer);
|
3131 |
+
|
3132 |
+
if (innerParams.timerProgressBar) {
|
3133 |
+
show(timerProgressBar);
|
3134 |
+
setTimeout(function () {
|
3135 |
+
if (globalState$$1.timeout.running) {
|
3136 |
+
// timer can be already stopped at this point
|
3137 |
+
animateTimerProgressBar(innerParams.timer);
|
3138 |
+
}
|
3139 |
+
});
|
3140 |
+
}
|
3141 |
+
}
|
3142 |
+
};
|
3143 |
+
|
3144 |
+
var initFocus = function initFocus(domCache, innerParams) {
|
3145 |
+
if (innerParams.toast) {
|
3146 |
+
return;
|
3147 |
+
}
|
3148 |
+
|
3149 |
+
if (!callIfFunction(innerParams.allowEnterKey)) {
|
3150 |
+
return blurActiveElement();
|
3151 |
+
}
|
3152 |
+
|
3153 |
+
if (!focusButton(domCache, innerParams)) {
|
3154 |
+
setFocus(innerParams, -1, 1);
|
3155 |
+
}
|
3156 |
+
};
|
3157 |
+
|
3158 |
+
var focusButton = function focusButton(domCache, innerParams) {
|
3159 |
+
if (innerParams.focusDeny && isVisible(domCache.denyButton)) {
|
3160 |
+
domCache.denyButton.focus();
|
3161 |
+
return true;
|
3162 |
+
}
|
3163 |
+
|
3164 |
+
if (innerParams.focusCancel && isVisible(domCache.cancelButton)) {
|
3165 |
+
domCache.cancelButton.focus();
|
3166 |
+
return true;
|
3167 |
+
}
|
3168 |
+
|
3169 |
+
if (innerParams.focusConfirm && isVisible(domCache.confirmButton)) {
|
3170 |
+
domCache.confirmButton.focus();
|
3171 |
+
return true;
|
3172 |
+
}
|
3173 |
+
|
3174 |
+
return false;
|
3175 |
+
};
|
3176 |
+
|
3177 |
+
var blurActiveElement = function blurActiveElement() {
|
3178 |
+
if (document.activeElement && typeof document.activeElement.blur === 'function') {
|
3179 |
+
document.activeElement.blur();
|
3180 |
+
}
|
3181 |
+
};
|
3182 |
+
|
3183 |
+
/**
|
3184 |
+
* Updates popup parameters.
|
3185 |
+
*/
|
3186 |
+
|
3187 |
+
function update(params) {
|
3188 |
+
var popup = getPopup();
|
3189 |
+
var innerParams = privateProps.innerParams.get(this);
|
3190 |
+
|
3191 |
+
if (!popup || hasClass(popup, innerParams.hideClass.popup)) {
|
3192 |
+
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.");
|
3193 |
+
}
|
3194 |
+
|
3195 |
+
var validUpdatableParams = {}; // assign valid params from `params` to `defaults`
|
3196 |
+
|
3197 |
+
Object.keys(params).forEach(function (param) {
|
3198 |
+
if (Swal.isUpdatableParameter(param)) {
|
3199 |
+
validUpdatableParams[param] = params[param];
|
3200 |
+
} else {
|
3201 |
+
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"));
|
3202 |
+
}
|
3203 |
+
});
|
3204 |
+
|
3205 |
+
var updatedParams = _extends({}, innerParams, validUpdatableParams);
|
3206 |
+
|
3207 |
+
render(this, updatedParams);
|
3208 |
+
privateProps.innerParams.set(this, updatedParams);
|
3209 |
+
Object.defineProperties(this, {
|
3210 |
+
params: {
|
3211 |
+
value: _extends({}, this.params, params),
|
3212 |
+
writable: false,
|
3213 |
+
enumerable: true
|
3214 |
+
}
|
3215 |
+
});
|
3216 |
+
}
|
3217 |
+
|
3218 |
+
function _destroy() {
|
3219 |
+
var domCache = privateProps.domCache.get(this);
|
3220 |
+
var innerParams = privateProps.innerParams.get(this);
|
3221 |
+
|
3222 |
+
if (!innerParams) {
|
3223 |
+
return; // This instance has already been destroyed
|
3224 |
+
} // Check if there is another Swal closing
|
3225 |
+
|
3226 |
+
|
3227 |
+
if (domCache.popup && globalState.swalCloseEventFinishedCallback) {
|
3228 |
+
globalState.swalCloseEventFinishedCallback();
|
3229 |
+
delete globalState.swalCloseEventFinishedCallback;
|
3230 |
+
} // Check if there is a swal disposal defer timer
|
3231 |
+
|
3232 |
+
|
3233 |
+
if (globalState.deferDisposalTimer) {
|
3234 |
+
clearTimeout(globalState.deferDisposalTimer);
|
3235 |
+
delete globalState.deferDisposalTimer;
|
3236 |
+
}
|
3237 |
+
|
3238 |
+
runDidDestroy(innerParams);
|
3239 |
+
disposeSwal(this);
|
3240 |
+
}
|
3241 |
+
|
3242 |
+
var runDidDestroy = function runDidDestroy(innerParams) {
|
3243 |
+
if (typeof innerParams.didDestroy === 'function') {
|
3244 |
+
innerParams.didDestroy();
|
3245 |
+
} else if (typeof innerParams.onDestroy === 'function') {
|
3246 |
+
innerParams.onDestroy(); // @deprecated
|
3247 |
+
}
|
3248 |
+
};
|
3249 |
+
|
3250 |
+
var disposeSwal = function disposeSwal(instance) {
|
3251 |
+
// Unset this.params so GC will dispose it (#1569)
|
3252 |
+
delete instance.params; // Unset globalState props so GC will dispose globalState (#1569)
|
3253 |
+
|
3254 |
+
delete globalState.keydownHandler;
|
3255 |
+
delete globalState.keydownTarget; // Unset WeakMaps so GC will be able to dispose them (#1569)
|
3256 |
+
|
3257 |
+
unsetWeakMaps(privateProps);
|
3258 |
+
unsetWeakMaps(privateMethods);
|
3259 |
+
};
|
3260 |
+
|
3261 |
+
var unsetWeakMaps = function unsetWeakMaps(obj) {
|
3262 |
+
for (var i in obj) {
|
3263 |
+
obj[i] = new WeakMap();
|
3264 |
+
}
|
3265 |
+
};
|
3266 |
+
|
3267 |
+
|
3268 |
+
|
3269 |
+
var instanceMethods = /*#__PURE__*/Object.freeze({
|
3270 |
+
hideLoading: hideLoading,
|
3271 |
+
disableLoading: hideLoading,
|
3272 |
+
getInput: getInput$1,
|
3273 |
+
close: close,
|
3274 |
+
closePopup: close,
|
3275 |
+
closeModal: close,
|
3276 |
+
closeToast: close,
|
3277 |
+
enableButtons: enableButtons,
|
3278 |
+
disableButtons: disableButtons,
|
3279 |
+
enableInput: enableInput,
|
3280 |
+
disableInput: disableInput,
|
3281 |
+
showValidationMessage: showValidationMessage,
|
3282 |
+
resetValidationMessage: resetValidationMessage$1,
|
3283 |
+
getProgressSteps: getProgressSteps$1,
|
3284 |
+
_main: _main,
|
3285 |
+
update: update,
|
3286 |
+
_destroy: _destroy
|
3287 |
+
});
|
3288 |
+
|
3289 |
+
var currentInstance;
|
3290 |
+
|
3291 |
+
var SweetAlert = /*#__PURE__*/function () {
|
3292 |
+
function SweetAlert() {
|
3293 |
+
_classCallCheck(this, SweetAlert);
|
3294 |
+
|
3295 |
+
// Prevent run in Node env
|
3296 |
+
if (typeof window === 'undefined') {
|
3297 |
+
return;
|
3298 |
+
} // Check for the existence of Promise
|
3299 |
+
|
3300 |
+
|
3301 |
+
if (typeof Promise === 'undefined') {
|
3302 |
+
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)');
|
3303 |
+
}
|
3304 |
+
|
3305 |
+
currentInstance = this;
|
3306 |
+
|
3307 |
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
3308 |
+
args[_key] = arguments[_key];
|
3309 |
+
}
|
3310 |
+
|
3311 |
+
var outerParams = Object.freeze(this.constructor.argsToParams(args));
|
3312 |
+
Object.defineProperties(this, {
|
3313 |
+
params: {
|
3314 |
+
value: outerParams,
|
3315 |
+
writable: false,
|
3316 |
+
enumerable: true,
|
3317 |
+
configurable: true
|
3318 |
+
}
|
3319 |
+
});
|
3320 |
+
|
3321 |
+
var promise = this._main(this.params);
|
3322 |
+
|
3323 |
+
privateProps.promise.set(this, promise);
|
3324 |
+
} // `catch` cannot be the name of a module export, so we define our thenable methods here instead
|
3325 |
+
|
3326 |
+
|
3327 |
+
_createClass(SweetAlert, [{
|
3328 |
+
key: "then",
|
3329 |
+
value: function then(onFulfilled) {
|
3330 |
+
var promise = privateProps.promise.get(this);
|
3331 |
+
return promise.then(onFulfilled);
|
3332 |
+
}
|
3333 |
+
}, {
|
3334 |
+
key: "finally",
|
3335 |
+
value: function _finally(onFinally) {
|
3336 |
+
var promise = privateProps.promise.get(this);
|
3337 |
+
return promise["finally"](onFinally);
|
3338 |
+
}
|
3339 |
+
}]);
|
3340 |
+
|
3341 |
+
return SweetAlert;
|
3342 |
+
}(); // Assign instance methods from src/instanceMethods/*.js to prototype
|
3343 |
+
|
3344 |
+
|
3345 |
+
_extends(SweetAlert.prototype, instanceMethods); // Assign static methods from src/staticMethods/*.js to constructor
|
3346 |
+
|
3347 |
+
|
3348 |
+
_extends(SweetAlert, staticMethods); // Proxy to instance methods to constructor, for now, for backwards compatibility
|
3349 |
+
|
3350 |
+
|
3351 |
+
Object.keys(instanceMethods).forEach(function (key) {
|
3352 |
+
SweetAlert[key] = function () {
|
3353 |
+
if (currentInstance) {
|
3354 |
+
var _currentInstance;
|
3355 |
+
|
3356 |
+
return (_currentInstance = currentInstance)[key].apply(_currentInstance, arguments);
|
3357 |
+
}
|
3358 |
+
};
|
3359 |
+
});
|
3360 |
+
SweetAlert.DismissReason = DismissReason;
|
3361 |
+
SweetAlert.version = '10.6.1';
|
3362 |
+
|
3363 |
+
var Swal = SweetAlert;
|
3364 |
+
Swal["default"] = Swal;
|
3365 |
+
|
3366 |
+
return Swal;
|
3367 |
+
|
3368 |
+
}));
|
3369 |
+
if (typeof this !== 'undefined' && this.Sweetalert2){ this.swal = this.sweetAlert = this.Swal = this.SweetAlert = this.Sweetalert2}
|
3370 |
+
|
3371 |
+
"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:row;align-items:center;width:auto;padding:.625em;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 .6em;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;padding:0;font-size:1em}.swal2-popup.swal2-toast .swal2-icon{width:2em;min-width:2em;height:2em;margin: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-basis:auto!important;width:auto;height:auto;margin:0 .3125em;padding:0}.swal2-popup.swal2-toast .swal2-styled{margin:0 .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(50,100,150,.4)}.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:.3125em;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 1.6em}.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 2em;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:1.0625em}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#d14529;color:#fff;font-size:1.0625em}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#757575;color:#fff;font-size:1.0625em}.swal2-styled:focus{outline:0;box-shadow:0 0 0 1px #fff,0 0 0 3px rgba(50,100,150,.4)}.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:.3125em;border-bottom-left-radius:.3125em}.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:0;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::-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 3px #c4e6f5}.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::-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{margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto}.swal2-validation-message{display:none;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%;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}}@-moz-document url-prefix(){.swal2-close:focus{outline:2px solid rgba(50,100,150,.4)}}@-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}body.swal2-toast-column .swal2-toast{flex-direction:column;align-items:stretch}body.swal2-toast-column .swal2-toast .swal2-actions{flex:1;align-self:stretch;height:2.2em;margin-top:.3125em}body.swal2-toast-column .swal2-toast .swal2-loading{justify-content:center}body.swal2-toast-column .swal2-toast .swal2-input{height:2em;margin:.3125em auto;font-size:1em}body.swal2-toast-column .swal2-toast .swal2-validation-message{font-size:1em}");
|
assets/sweetalert2/dist/sweetalert2.all.min.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Sweetalert2=e()}(this,function(){"use strict";function r(t){return(r="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})(t)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function s(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),t}function c(){return(c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t}).apply(this,arguments)}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function l(t,e){return(l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function d(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}function i(t,e,n){return(i=d()?Reflect.construct:function(t,e,n){var o=[null];o.push.apply(o,e);var i=new(Function.bind.apply(t,o));return n&&l(i,n.prototype),i}).apply(null,arguments)}function p(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function f(t,e,n){return(f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var o=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=u(t)););return t}(t,e);if(o){var i=Object.getOwnPropertyDescriptor(o,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}function m(e){return Object.keys(e).map(function(t){return e[t]})}function h(t){return Array.prototype.slice.call(t)}function g(t,e){var n;n='"'.concat(t,'" is deprecated and will be removed in the next major release. Please use "').concat(e,'" instead.'),-1===Y.indexOf(n)&&(Y.push(n),W(n))}function v(t){return t&&"function"==typeof t.toPromise}function y(t){return v(t)?t.toPromise():Promise.resolve(t)}function b(t){return t&&Promise.resolve(t)===t}function w(t){return t instanceof Element||"object"===r(e=t)&&e.jquery;var e}function t(t){var e={};for(var n in t)e[t[n]]="swal2-"+t[n];return e}function C(){return document.body.querySelector(".".concat($.container))}function k(t){var e=C();return e?e.querySelector(t):null}function e(t){return k(".".concat(t))}function x(){return e($.popup)}function n(){var t=x();return h(t.querySelectorAll(".".concat($.icon)))}function B(){var t=n().filter(function(t){return bt(t)});return t.length?t[0]:null}function A(){return e($.title)}function P(){return e($.content)}function E(){return e($.image)}function O(){return e($["progress-steps"])}function S(){return e($["validation-message"])}function T(){return k(".".concat($.actions," .").concat($.confirm))}function L(){return k(".".concat($.actions," .").concat($.deny))}function D(){return k(".".concat($.loader))}function I(){return k(".".concat($.actions," .").concat($.cancel))}function q(){return e($.actions)}function j(){return e($.header)}function M(){return e($.footer)}function V(){return e($["timer-progress-bar"])}function H(){return e($.close)}function R(){var t=h(x().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort(function(t,e){return t=parseInt(t.getAttribute("tabindex")),(e=parseInt(e.getAttribute("tabindex")))<t?1:t<e?-1:0}),e=h(x().querySelectorAll('\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')).filter(function(t){return"-1"!==t.getAttribute("tabindex")});return function(t){for(var e=[],n=0;n<t.length;n++)-1===e.indexOf(t[n])&&e.push(t[n]);return e}(t.concat(e)).filter(function(t){return bt(t)})}function N(){return!X()&&!document.body.classList.contains($["no-backdrop"])}function U(e,t){var n;e.textContent="",t&&(n=(new DOMParser).parseFromString(t,"text/html"),h(n.querySelector("head").childNodes).forEach(function(t){e.appendChild(t)}),h(n.querySelector("body").childNodes).forEach(function(t){e.appendChild(t)}))}function _(t,e){if(e){for(var n=e.split(/\s+/),o=0;o<n.length;o++)if(!t.classList.contains(n[o]))return;return 1}}function F(t,e,n){var o,i;if(i=e,h((o=t).classList).forEach(function(t){-1===m($).indexOf(t)&&-1===m(J).indexOf(t)&&-1===m(i.showClass).indexOf(t)&&o.classList.remove(t)}),e.customClass&&e.customClass[n]){if("string"!=typeof e.customClass[n]&&!e.customClass[n].forEach)return W("Invalid type of customClass.".concat(n,'! Expected string or iterable object, got "').concat(r(e.customClass[n]),'"'));gt(t,e.customClass[n])}}var z="SweetAlert2:",W=function(t){console.warn("".concat(z," ").concat(t))},K=function(t){console.error("".concat(z," ").concat(t))},Y=[],Z=function(t){return"function"==typeof t?t():t},Q=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),$=t(["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","toast-column","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"]),J=t(["success","warning","info","question","error"]),X=function(){return document.body.classList.contains($["toast-shown"])},G={previousBodyPadding:null};function tt(t,e){if(!e)return null;switch(e){case"select":case"textarea":case"file":return yt(t,$[e]);case"checkbox":return t.querySelector(".".concat($.checkbox," input"));case"radio":return t.querySelector(".".concat($.radio," input:checked"))||t.querySelector(".".concat($.radio," input:first-child"));case"range":return t.querySelector(".".concat($.range," input"));default:return yt(t,$.input)}}function et(t){var e;t.focus(),"file"!==t.type&&(e=t.value,t.value="",t.value=e)}function nt(t,e,n){t&&e&&("string"==typeof e&&(e=e.split(/\s+/).filter(Boolean)),e.forEach(function(e){t.forEach?t.forEach(function(t){n?t.classList.add(e):t.classList.remove(e)}):n?t.classList.add(e):t.classList.remove(e)}))}function ot(t,e,n){n||0===parseInt(n)?t.style[e]="number"==typeof n?"".concat(n,"px"):n:t.style.removeProperty(e)}function it(t,e){var n=1<arguments.length&&void 0!==e?e:"flex";t.style.display=n}function rt(t){t.style.display="none"}function at(t,e,n,o){var i=t.querySelector(e);i&&(i.style[n]=o)}function st(t,e,n){e?it(t,n):rt(t)}function ct(t){return!!(t.scrollHeight>t.clientHeight)}function ut(t){var e=window.getComputedStyle(t),n=parseFloat(e.getPropertyValue("animation-duration")||"0"),o=parseFloat(e.getPropertyValue("transition-duration")||"0");return 0<n||0<o}function lt(t,e){var n=1<arguments.length&&void 0!==e&&e,o=V();bt(o)&&(n&&(o.style.transition="none",o.style.width="100%"),setTimeout(function(){o.style.transition="width ".concat(t/1e3,"s linear"),o.style.width="0%"},10))}function dt(){return"undefined"==typeof window||"undefined"==typeof document}function pt(t){wn.isVisible()&&ht!==t.target.value&&wn.resetValidationMessage(),ht=t.target.value}function ft(t,e){t instanceof HTMLElement?e.appendChild(t):"object"===r(t)?kt(t,e):t&&U(e,t)}function mt(t,e){var n=q(),o=D(),i=T(),r=L(),a=I();e.showConfirmButton||e.showDenyButton||e.showCancelButton||rt(n),F(n,e,"actions"),At(i,"confirm",e),At(r,"deny",e),At(a,"cancel",e),o.innerHTML=e.loaderHtml,e.buttonsStyling?function(t,e,n,o){gt([t,e,n],$.styled),o.confirmButtonColor&&(t.style.backgroundColor=o.confirmButtonColor);o.denyButtonColor&&(e.style.backgroundColor=o.denyButtonColor);o.cancelButtonColor&&(n.style.backgroundColor=o.cancelButtonColor)}(i,r,a,e):vt([i,r,a],$.styled),e.reverseButtons&&(n.insertBefore(a,o),n.insertBefore(r,o),n.insertBefore(i,o))}var ht,gt=function(t,e){nt(t,e,!0)},vt=function(t,e){nt(t,e,!1)},yt=function(t,e){for(var n=0;n<t.childNodes.length;n++)if(_(t.childNodes[n],e))return t.childNodes[n]},bt=function(t){return!(!t||!(t.offsetWidth||t.offsetHeight||t.getClientRects().length))},wt='\n <div aria-labelledby="'.concat($.title,'" aria-describedby="').concat($.content,'" class="').concat($.popup,'" tabindex="-1">\n <div class="').concat($.header,'">\n <ul class="').concat($["progress-steps"],'"></ul>\n <div class="').concat($.icon," ").concat(J.error,'"></div>\n <div class="').concat($.icon," ").concat(J.question,'"></div>\n <div class="').concat($.icon," ").concat(J.warning,'"></div>\n <div class="').concat($.icon," ").concat(J.info,'"></div>\n <div class="').concat($.icon," ").concat(J.success,'"></div>\n <img class="').concat($.image,'" />\n <h2 class="').concat($.title,'" id="').concat($.title,'"></h2>\n <button type="button" class="').concat($.close,'"></button>\n </div>\n <div class="').concat($.content,'">\n <div id="').concat($.content,'" class="').concat($["html-container"],'"></div>\n <input class="').concat($.input,'" />\n <input type="file" class="').concat($.file,'" />\n <div class="').concat($.range,'">\n <input type="range" />\n <output></output>\n </div>\n <select class="').concat($.select,'"></select>\n <div class="').concat($.radio,'"></div>\n <label for="').concat($.checkbox,'" class="').concat($.checkbox,'">\n <input type="checkbox" />\n <span class="').concat($.label,'"></span>\n </label>\n <textarea class="').concat($.textarea,'"></textarea>\n <div class="').concat($["validation-message"],'" id="').concat($["validation-message"],'"></div>\n </div>\n <div class="').concat($.actions,'">\n <div class="').concat($.loader,'"></div>\n <button type="button" class="').concat($.confirm,'"></button>\n <button type="button" class="').concat($.deny,'"></button>\n <button type="button" class="').concat($.cancel,'"></button>\n </div>\n <div class="').concat($.footer,'"></div>\n <div class="').concat($["timer-progress-bar-container"],'">\n <div class="').concat($["timer-progress-bar"],'"></div>\n </div>\n </div>\n').replace(/(^|\n)\s*/g,""),Ct=function(t){var e,n,o,i,r,a,s,c,u,l,d,p,f,m,h,g=!!(e=C())&&(e.parentNode.removeChild(e),vt([document.documentElement,document.body],[$["no-backdrop"],$["toast-shown"],$["has-column"]]),!0);dt()?K("SweetAlert2 requires document to initialize"):((n=document.createElement("div")).className=$.container,g&>(n,$["no-transition"]),U(n,wt),(o="string"==typeof(i=t.target)?document.querySelector(i):i).appendChild(n),r=t,(a=x()).setAttribute("role",r.toast?"alert":"dialog"),a.setAttribute("aria-live",r.toast?"polite":"assertive"),r.toast||a.setAttribute("aria-modal","true"),s=o,"rtl"===window.getComputedStyle(s).direction&>(C(),$.rtl),c=P(),u=yt(c,$.input),l=yt(c,$.file),d=c.querySelector(".".concat($.range," input")),p=c.querySelector(".".concat($.range," output")),f=yt(c,$.select),m=c.querySelector(".".concat($.checkbox," input")),h=yt(c,$.textarea),u.oninput=pt,l.onchange=pt,f.onchange=pt,m.onchange=pt,h.oninput=pt,d.oninput=function(t){pt(t),p.value=d.value},d.onchange=function(t){pt(t),d.nextSibling.value=d.value})},kt=function(t,e){t.jquery?xt(e,t):U(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))},Bt=function(){if(dt())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}();function At(t,e,n){var o;st(t,n["show".concat((o=e).charAt(0).toUpperCase()+o.slice(1),"Button")],"inline-block"),U(t,n["".concat(e,"ButtonText")]),t.setAttribute("aria-label",n["".concat(e,"ButtonAriaLabel")]),t.className=$[e],F(t,n,"".concat(e,"Button")),gt(t,n["".concat(e,"ButtonClass")])}function Pt(t,e){var n,o,i,r,a,s,c,u,l=C();l&&(n=l,"string"==typeof(o=e.backdrop)?n.style.background=o:o||gt([document.documentElement,document.body],$["no-backdrop"]),!e.backdrop&&e.allowOutsideClick&&W('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'),i=l,(r=e.position)in $?gt(i,$[r]):(W('The "position" parameter is not valid, defaulting to "center"'),gt(i,$.center)),a=l,!(s=e.grow)||"string"!=typeof s||(c="grow-".concat(s))in $&>(a,$[c]),F(l,e,"container"),(u=document.body.getAttribute("data-swal2-queue-step"))&&(l.setAttribute("data-queue-step",u),document.body.removeAttribute("data-swal2-queue-step")))}function Et(t,e){t.placeholder&&!e.inputPlaceholder||(t.placeholder=e.inputPlaceholder)}function Ot(t,e,n){var o,i;n.inputLabel&&(t.id=$.input,o=document.createElement("label"),i=$["input-label"],o.setAttribute("for",t.id),o.className=i,o.innerText=n.inputLabel,e.insertAdjacentElement("beforebegin",o))}var St={promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap},Tt=["input","file","range","select","radio","checkbox","textarea"],Lt=function(t){if(!jt[t.input])return K('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=jt[t.input](e,t);it(n),setTimeout(function(){et(n)})},Dt=function(t,e){var n=tt(P(),t);if(n)for(var o in!function(t){for(var e=0;e<t.attributes.length;e++){var n=t.attributes[e].name;-1===["type","value","style"].indexOf(n)&&t.removeAttribute(n)}}(n),e)"range"===t&&"placeholder"===o||n.setAttribute(o,e[o])},It=function(t){var e=qt(t.input);t.customClass&>(e,t.customClass.input)},qt=function(t){var e=$[t]?$[t]:$.input;return yt(P(),e)},jt={};jt.text=jt.email=jt.password=jt.number=jt.tel=jt.url=function(t,e){return"string"==typeof e.inputValue||"number"==typeof e.inputValue?t.value=e.inputValue:b(e.inputValue)||W('Unexpected type of inputValue! Expected "string", "number" or "Promise", got "'.concat(r(e.inputValue),'"')),Ot(t,t,e),Et(t,e),t.type=e.input,t},jt.file=function(t,e){return Ot(t,t,e),Et(t,e),t},jt.range=function(t,e){var n=t.querySelector("input"),o=t.querySelector("output");return n.value=e.inputValue,n.type=e.input,o.value=e.inputValue,Ot(n,t,e),t},jt.select=function(t,e){var n;return t.textContent="",e.inputPlaceholder&&(n=document.createElement("option"),U(n,e.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,t.appendChild(n)),Ot(t,t,e),t},jt.radio=function(t){return t.textContent="",t},jt.checkbox=function(t,e){var n=tt(P(),"checkbox");n.value=1,n.id=$.checkbox,n.checked=Boolean(e.inputValue);var o=t.querySelector("span");return U(o,e.inputPlaceholder),t},jt.textarea=function(e,t){var n,o;return e.value=t.inputValue,Et(e,t),Ot(e,e,t),"MutationObserver"in window&&(n=parseInt(window.getComputedStyle(x()).width),o=parseInt(window.getComputedStyle(x()).paddingLeft)+parseInt(window.getComputedStyle(x()).paddingRight),new MutationObserver(function(){var t=e.offsetWidth+o;x().style.width=n<t?"".concat(t,"px"):null}).observe(e,{attributes:!0,attributeFilter:["style"]})),e};function Mt(t,e){var n,o,i,r,a,s=P().querySelector("#".concat($.content));e.html?(ft(e.html,s),it(s,"block")):e.text?(s.textContent=e.text,it(s,"block")):rt(s),n=t,o=e,i=P(),r=St.innerParams.get(n),a=!r||o.input!==r.input,Tt.forEach(function(t){var e=$[t],n=yt(i,e);Dt(t,o.inputAttributes),n.className=e,a&&rt(n)}),o.input&&(a&&Lt(o),It(o)),F(P(),e,"content")}function Vt(){return C()&&C().getAttribute("data-queue-step")}function Ht(t,c){var u=O();if(!c.progressSteps||0===c.progressSteps.length)return rt(u),0;it(u),u.textContent="";var l=parseInt(void 0===c.currentProgressStep?Vt():c.currentProgressStep);l>=c.progressSteps.length&&W("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),c.progressSteps.forEach(function(t,e){var n,o,i,r,a,s=(n=t,o=document.createElement("li"),gt(o,$["progress-step"]),U(o,n),o);u.appendChild(s),e===l&>(s,$["active-progress-step"]),e!==c.progressSteps.length-1&&(r=c,a=document.createElement("li"),gt(a,$["progress-step-line"]),r.progressStepsDistance&&(a.style.width=r.progressStepsDistance),i=a,u.appendChild(i))})}function Rt(t,e){var n,o,i,r,a,s,c,u,l=j();F(l,e,"header"),Ht(0,e),n=t,o=e,(r=St.innerParams.get(n))&&o.icon===r.icon&&B()?Ft(B(),o):(_t(),o.icon&&(-1!==Object.keys(J).indexOf(o.icon)?(i=k(".".concat($.icon,".").concat(J[o.icon])),it(i),Wt(i,o),Ft(i,o),gt(i,o.showClass.icon)):K('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(o.icon,'"')))),function(t){var e=E();if(!t.imageUrl)return rt(e);it(e,""),e.setAttribute("src",t.imageUrl),e.setAttribute("alt",t.imageAlt),ot(e,"width",t.imageWidth),ot(e,"height",t.imageHeight),e.className=$.image,F(e,t,"image")}(e),a=e,s=A(),st(s,a.title||a.titleText),a.title&&ft(a.title,s),a.titleText&&(s.innerText=a.titleText),F(s,a,"title"),c=e,u=H(),U(u,c.closeButtonHtml),F(u,c,"closeButton"),st(u,c.showCloseButton),u.setAttribute("aria-label",c.closeButtonAriaLabel)}function Nt(t,e){var n,o,i,r;n=e,o=x(),ot(o,"width",n.width),ot(o,"padding",n.padding),n.background&&(o.style.background=n.background),Qt(o,n),Pt(0,e),Rt(t,e),Mt(t,e),mt(0,e),i=e,r=M(),st(r,i.footer),i.footer&&ft(i.footer,r),F(r,i,"footer"),"function"==typeof e.didRender?e.didRender(x()):"function"==typeof e.onRender&&e.onRender(x())}function Ut(){return T()&&T().click()}var _t=function(){for(var t=n(),e=0;e<t.length;e++)rt(t[e])},Ft=function(t,e){Kt(t,e),zt(),F(t,e,"icon")},zt=function(){for(var t=x(),e=window.getComputedStyle(t).getPropertyValue("background-color"),n=t.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix"),o=0;o<n.length;o++)n[o].style.backgroundColor=e},Wt=function(t,e){t.textContent="",e.iconHtml?U(t,Yt(e.iconHtml)):"success"===e.icon?U(t,'\n <div class="swal2-success-circular-line-left"></div>\n <span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>\n <div class="swal2-success-ring"></div> <div class="swal2-success-fix"></div>\n <div class="swal2-success-circular-line-right"></div>\n '):"error"===e.icon?U(t,'\n <span class="swal2-x-mark">\n <span class="swal2-x-mark-line-left"></span>\n <span class="swal2-x-mark-line-right"></span>\n </span>\n '):U(t,Yt({question:"?",warning:"!",info:"i"}[e.icon]))},Kt=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<o.length;n++){at(t,o[n],"backgroundColor",e.iconColor)}at(t,".swal2-success-ring","borderColor",e.iconColor)}},Yt=function(t){return'<div class="'.concat($["icon-content"],'">').concat(t,"</div>")},Zt=[],Qt=function(t,e){t.className="".concat($.popup," ").concat(bt(t)?e.showClass.popup:""),e.toast?(gt([document.documentElement,document.body],$["toast-shown"]),gt(t,$.toast)):gt(t,$.modal),F(t,e,"popup"),"string"==typeof e.customClass&>(t,e.customClass),e.icon&>(t,$["icon-".concat(e.icon)])};function $t(){var t=x();t||wn.fire(),t=x();var e=q(),n=T(),o=D();it(e),rt(n),gt([t,e],$.loading),it(o),t.setAttribute("data-loading",!0),t.setAttribute("aria-busy",!0),t.focus()}function Jt(){return new Promise(function(t){var e=window.scrollX,n=window.scrollY;oe.restoreFocusTimeout=setTimeout(function(){oe.previousActiveElement&&oe.previousActiveElement.focus?(oe.previousActiveElement.focus(),oe.previousActiveElement=null):document.body&&document.body.focus(),t()},100),void 0!==e&&void 0!==n&&window.scrollTo(e,n)})}function Xt(){if(oe.timeout)return function(){var t=V(),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,"%")}(),oe.timeout.stop()}function Gt(){if(oe.timeout){var t=oe.timeout.start();return lt(t),t}}function te(t){return Object.prototype.hasOwnProperty.call(ie,t)}function ee(t){return ae[t]}function ne(t){for(var e in t)te(i=e)||W('Unknown parameter "'.concat(i,'"')),t.toast&&(o=e,-1!==se.indexOf(o)&&W('The parameter "'.concat(o,'" is incompatible with toasts'))),ee(n=e)&&g(n,ee(n));var n,o,i}var oe={},ie={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml: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:void 0,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,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,showCloseButton:!1,closeButtonHtml:"×",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!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},re=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","imageAlt","imageHeight","imageUrl","imageWidth","onAfterClose","onClose","onDestroy","progressSteps","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],ae={animation:'showClass" and "hideClass',onBeforeOpen:"willOpen",onOpen:"didOpen",onRender:"didRender",onClose:"willClose",onAfterClose:"didClose",onDestroy:"didDestroy"},se=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","heightAuto","keydownListenerCapture"],ce=Object.freeze({isValidParameter:te,isUpdatableParameter:function(t){return-1!==re.indexOf(t)},isDeprecatedParameter:ee,argsToParams:function(o){var i={};return"object"!==r(o[0])||w(o[0])?["title","html","icon"].forEach(function(t,e){var n=o[e];"string"==typeof n||w(n)?i[t]=n:void 0!==n&&K("Unexpected type of ".concat(t,'! Expected "string" or "Element", got ').concat(r(n)))}):c(i,o[0]),i},isVisible:function(){return bt(x())},clickConfirm:Ut,clickDeny:function(){return L()&&L().click()},clickCancel:function(){return I()&&I().click()},getContainer:C,getPopup:x,getTitle:A,getContent:P,getHtmlContainer:function(){return e($["html-container"])},getImage:E,getIcon:B,getIcons:n,getInputLabel:function(){return e($["input-label"])},getCloseButton:H,getActions:q,getConfirmButton:T,getDenyButton:L,getCancelButton:I,getHeader:j,getFooter:M,getTimerProgressBar:V,getFocusableElements:R,getValidationMessage:S,isLoading:function(){return x().hasAttribute("data-loading")},fire:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return i(this,e)},mixin:function(r){return function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&l(t,e)}(i,t);var n,o,e=(n=i,o=d(),function(){var t,e=u(n);return p(this,o?(t=u(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))});function i(){return a(this,i),e.apply(this,arguments)}return s(i,[{key:"_main",value:function(t){return f(u(i.prototype),"_main",this).call(this,c({},r,t))}}]),i}(this)},queue:function(t){var r=this;Zt=t;function a(t,e){Zt=[],t(e)}var s=[];return new Promise(function(i){!function e(n,o){n<Zt.length?(document.body.setAttribute("data-swal2-queue-step",n),r.fire(Zt[n]).then(function(t){void 0!==t.value?(s.push(t.value),e(n+1,o)):a(i,{dismiss:t.dismiss})})):a(i,{value:s})}(0)})},getQueueStep:Vt,insertQueueStep:function(t,e){return e&&e<Zt.length?Zt.splice(e,0,t):Zt.push(t)},deleteQueueStep:function(t){void 0!==Zt[t]&&Zt.splice(t,1)},showLoading:$t,enableLoading:$t,getTimerLeft:function(){return oe.timeout&&oe.timeout.getTimerLeft()},stopTimer:Xt,resumeTimer:Gt,toggleTimer:function(){var t=oe.timeout;return t&&(t.running?Xt:Gt)()},increaseTimer:function(t){if(oe.timeout){var e=oe.timeout.increase(t);return lt(e,!0),e}},isTimerRunning:function(){return oe.timeout&&oe.timeout.isRunning()}});function ue(){var t,e=St.innerParams.get(this);e&&(t=St.domCache.get(this),rt(t.loader),e.showConfirmButton?it(t.confirmButton,"inline-block"):e.showConfirmButton||e.showCancelButton||rt(t.actions),vt([t.popup,t.actions],$.loading),t.popup.removeAttribute("aria-busy"),t.popup.removeAttribute("data-loading"),t.confirmButton.disabled=!1,t.denyButton.disabled=!1,t.cancelButton.disabled=!1)}function le(){null===G.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(G.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(G.previousBodyPadding+function(){var t=document.createElement("div");t.className=$["scrollbar-measure"],document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e}(),"px"))}function de(){return!!window.MSInputMethodContext&&!!document.documentMode}function pe(){var t=C(),e=x();t.style.removeProperty("align-items"),e.offsetTop<0&&(t.style.alignItems="flex-start")}var fe=function(){navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i)||x().scrollHeight>window.innerHeight-44&&(C().style.paddingBottom="".concat(44,"px"))},me=function(){var e,t=C();t.ontouchstart=function(t){e=he(t)},t.ontouchmove=function(t){e&&(t.preventDefault(),t.stopPropagation())}},he=function(t){var e=t.target,n=C();return(!t.touches||!t.touches.length||"stylus"!==t.touches[0].touchType)&&(e===n||!(ct(n)||"INPUT"===e.tagName||ct(P())&&P().contains(e)))},ge={swalPromiseResolve:new WeakMap};function ve(t,e,n,o){var i;n?Ce(t,o):(Jt().then(function(){return Ce(t,o)}),oe.keydownTarget.removeEventListener("keydown",oe.keydownHandler,{capture:oe.keydownListenerCapture}),oe.keydownHandlerAdded=!1),e.parentNode&&!document.body.getAttribute("data-swal2-queue-step")&&e.parentNode.removeChild(e),N()&&(null!==G.previousBodyPadding&&(document.body.style.paddingRight="".concat(G.previousBodyPadding,"px"),G.previousBodyPadding=null),_(document.body,$.iosfix)&&(i=parseInt(document.body.style.top,10),vt(document.body,$.iosfix),document.body.style.top="",document.body.scrollTop=-1*i),"undefined"!=typeof window&&de()&&window.removeEventListener("resize",pe),h(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")})),vt([document.documentElement,document.body],[$.shown,$["height-auto"],$["no-backdrop"],$["toast-shown"],$["toast-column"]])}function ye(t){var e,n,o,i=x();i&&(t=function(t){return void 0!==t?c({isConfirmed:!1,isDenied:!1,isDismissed:!1},t):{isConfirmed:!1,isDenied:!1,isDismissed:!0}}(t),(e=St.innerParams.get(this))&&!_(i,e.hideClass.popup)&&(n=ge.swalPromiseResolve.get(this),vt(i,e.showClass.popup),gt(i,e.hideClass.popup),o=C(),vt(o,e.showClass.backdrop),gt(o,e.hideClass.backdrop),function(t,e,n){var o=C(),i=Bt&&ut(e),r=n.onClose,a=n.onAfterClose,s=n.willClose,c=n.didClose;if(be(e,s,r),i){we(t,e,o,c||a)}else{ve(t,o,X(),c||a)}}(this,i,e),n(t)))}var be=function(t,e,n){null!==e&&"function"==typeof e?e(t):null!==n&&"function"==typeof n&&n(t)},we=function(t,e,n,o){oe.swalCloseEventFinishedCallback=ve.bind(null,t,n,X(),o),e.addEventListener(Bt,function(t){t.target===e&&(oe.swalCloseEventFinishedCallback(),delete oe.swalCloseEventFinishedCallback)})},Ce=function(t,e){setTimeout(function(){"function"==typeof e&&e(),t._destroy()})};function ke(t,e,n){var o=St.domCache.get(t);e.forEach(function(t){o[t].disabled=n})}function xe(t,e){if(!t)return!1;if("radio"===t.type)for(var n=t.parentNode.parentNode.querySelectorAll("input"),o=0;o<n.length;o++)n[o].disabled=e;else t.disabled=e}var Be=function(){function n(t,e){a(this,n),this.callback=t,this.remaining=e,this.running=!1,this.start()}return s(n,[{key:"start",value:function(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}},{key:"stop",value:function(){return this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=new Date-this.started),this.remaining}},{key:"increase",value:function(t){var e=this.running;return e&&this.stop(),this.remaining+=t,e&&this.start(),this.remaining}},{key:"getTimerLeft",value:function(){return this.running&&(this.stop(),this.start()),this.remaining}},{key:"isRunning",value:function(){return this.running}}]),n}(),Ae={email:function(t,e){return/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(t)?Promise.resolve():Promise.resolve(e||"Invalid email address")},url:function(t,e){return/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(t)?Promise.resolve():Promise.resolve(e||"Invalid URL")}};function Pe(t){var e,n;(e=t).inputValidator||Object.keys(Ae).forEach(function(t){e.input===t&&(e.inputValidator=Ae[t])}),t.showLoaderOnConfirm&&!t.preConfirm&&W("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"),t.animation=Z(t.animation),(n=t).target&&("string"!=typeof n.target||document.querySelector(n.target))&&("string"==typeof n.target||n.target.appendChild)||(W('Target parameter is not valid, defaulting to "body"'),n.target="body"),"string"==typeof t.title&&(t.title=t.title.split("\n").join("<br />")),Ct(t)}function Ee(t){var e=C(),n=x();"function"==typeof t.willOpen?t.willOpen(n):"function"==typeof t.onBeforeOpen&&t.onBeforeOpen(n);var o=window.getComputedStyle(document.body).overflowY;Ne(e,n,t),setTimeout(function(){He(e,n)},10),N()&&(Re(e,t.scrollbarPadding,o),h(document.body.children).forEach(function(t){t===C()||function(t,e){if("function"==typeof t.contains)return t.contains(e)}(t,C())||(t.hasAttribute("aria-hidden")&&t.setAttribute("data-previous-aria-hidden",t.getAttribute("aria-hidden")),t.setAttribute("aria-hidden","true"))})),X()||oe.previousActiveElement||(oe.previousActiveElement=document.activeElement),Ve(n,t),vt(e,$["no-transition"])}function Oe(t){var e,n=x();t.target===n&&(e=C(),n.removeEventListener(Bt,Oe),e.style.overflowY="auto")}function Se(t,e){"select"===e.input||"radio"===e.input?ze(t,e):-1!==["text","email","number","tel","textarea"].indexOf(e.input)&&(v(e.inputValue)||b(e.inputValue))&&We(t,e)}function Te(t,e){t.disableButtons(),e.input?Ze(t,e,"confirm"):Je(t,e,!0)}function Le(t,e){t.disableButtons(),e.returnInputValueOnDeny?Ze(t,e,"deny"):$e(t,!1)}function De(t,e){t.disableButtons(),e(Q.cancel)}function Ie(t,e){t.closePopup({isConfirmed:!0,value:e})}function qe(e,t,n,o){t.keydownTarget&&t.keydownHandlerAdded&&(t.keydownTarget.removeEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!1),n.toast||(t.keydownHandler=function(t){return en(e,t,o)},t.keydownTarget=n.keydownListenerCapture?window:x(),t.keydownListenerCapture=n.keydownListenerCapture,t.keydownTarget.addEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!0)}function je(t,e,n){var o=R(),i=0;if(i<o.length)return(e+=n)===o.length?e=0:-1===e&&(e=o.length-1),o[e].focus();x().focus()}function Me(t,e,n){St.innerParams.get(t).toast?sn(t,e,n):(un(e),ln(e),dn(t,e,n))}var Ve=function(t,e){"function"==typeof e.didOpen?setTimeout(function(){return e.didOpen(t)}):"function"==typeof e.onOpen&&setTimeout(function(){return e.onOpen(t)})},He=function(t,e){Bt&&ut(e)?(t.style.overflowY="hidden",e.addEventListener(Bt,Oe)):t.style.overflowY="auto"},Re=function(t,e,n){var o;(/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||"MacIntel"===navigator.platform&&1<navigator.maxTouchPoints)&&!_(document.body,$.iosfix)&&(o=document.body.scrollTop,document.body.style.top="".concat(-1*o,"px"),gt(document.body,$.iosfix),me(),fe()),"undefined"!=typeof window&&de()&&(pe(),window.addEventListener("resize",pe)),e&&"hidden"!==n&&le(),setTimeout(function(){t.scrollTop=0})},Ne=function(t,e,n){gt(t,n.showClass.backdrop),e.style.setProperty("opacity","0","important"),it(e),setTimeout(function(){gt(e,n.showClass.popup),e.style.removeProperty("opacity")},10),gt([document.documentElement,document.body],$.shown),n.heightAuto&&n.backdrop&&!n.toast&>([document.documentElement,document.body],$["height-auto"])},Ue=function(t){return t.checked?1:0},_e=function(t){return t.checked?t.value:null},Fe=function(t){return t.files.length?null!==t.getAttribute("multiple")?t.files:t.files[0]:null},ze=function(e,n){function o(t){return Ke[n.input](i,Ye(t),n)}var i=P();v(n.inputOptions)||b(n.inputOptions)?($t(),y(n.inputOptions).then(function(t){e.hideLoading(),o(t)})):"object"===r(n.inputOptions)?o(n.inputOptions):K("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(r(n.inputOptions)))},We=function(e,n){var o=e.getInput();rt(o),y(n.inputValue).then(function(t){o.value="number"===n.input?parseFloat(t)||0:"".concat(t),it(o),o.focus(),e.hideLoading()}).catch(function(t){K("Error in inputValue promise: ".concat(t)),o.value="",it(o),o.focus(),e.hideLoading()})},Ke={select:function(t,e,i){function r(t,e,n){var o=document.createElement("option");o.value=n,U(o,e),i.inputValue.toString()===n.toString()&&(o.selected=!0),t.appendChild(o)}var a=yt(t,$.select);e.forEach(function(t){var e,n=t[0],o=t[1];Array.isArray(o)?((e=document.createElement("optgroup")).label=n,e.disabled=!1,a.appendChild(e),o.forEach(function(t){return r(e,t[1],t[0])})):r(a,o,n)}),a.focus()},radio:function(t,e,a){var s=yt(t,$.radio);e.forEach(function(t){var e=t[0],n=t[1],o=document.createElement("input"),i=document.createElement("label");o.type="radio",o.name=$.radio,o.value=e,a.inputValue.toString()===e.toString()&&(o.checked=!0);var r=document.createElement("span");U(r,n),r.className=$.label,i.appendChild(o),i.appendChild(r),s.appendChild(i)});var n=s.querySelectorAll("input");n.length&&n[0].focus()}},Ye=function o(n){var i=[];return"undefined"!=typeof Map&&n instanceof Map?n.forEach(function(t,e){var n=t;"object"===r(n)&&(n=o(n)),i.push([e,n])}):Object.keys(n).forEach(function(t){var e=n[t];"object"===r(e)&&(e=o(e)),i.push([t,e])}),i},Ze=function(t,e,n){var o=function(t,e){var n=t.getInput();if(!n)return null;switch(e.input){case"checkbox":return Ue(n);case"radio":return _e(n);case"file":return Fe(n);default:return e.inputAutoTrim?n.value.trim():n.value}}(t,e);e.inputValidator?Qe(t,e,o):t.getInput().checkValidity()?"deny"===n?$e(t,o):Je(t,e,o):(t.enableButtons(),t.showValidationMessage(e.validationMessage))},Qe=function(e,n,o){e.disableInput(),Promise.resolve().then(function(){return y(n.inputValidator(o,n.validationMessage))}).then(function(t){e.enableButtons(),e.enableInput(),t?e.showValidationMessage(t):Je(e,n,o)})},$e=function(t,e){t.closePopup({isDenied:!0,value:e})},Je=function(e,t,n){t.showLoaderOnConfirm&&$t(),t.preConfirm?(e.resetValidationMessage(),Promise.resolve().then(function(){return y(t.preConfirm(n,t.validationMessage))}).then(function(t){bt(S())||!1===t?e.hideLoading():Ie(e,void 0===t?n:t)})):Ie(e,n)},Xe=["ArrowRight","ArrowDown","Right","Down"],Ge=["ArrowLeft","ArrowUp","Left","Up"],tn=["Escape","Esc"],en=function(t,e,n){var o=St.innerParams.get(t);o.stopKeydownPropagation&&e.stopPropagation(),"Enter"===e.key?nn(t,e,o):"Tab"===e.key?on(e,o):-1!==[].concat(Xe,Ge).indexOf(e.key)?rn(e.key):-1!==tn.indexOf(e.key)&&an(e,o,n)},nn=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;Ut(),e.preventDefault()}},on=function(t){for(var e=t.target,n=R(),o=-1,i=0;i<n.length;i++)if(e===n[i]){o=i;break}t.shiftKey?je(0,o,-1):je(0,o,1),t.stopPropagation(),t.preventDefault()},rn=function(t){var e,n;-1!==[T(),L(),I()].indexOf(document.activeElement)&&(e=-1!==Xe.indexOf(t)?"nextElementSibling":"previousElementSibling",(n=document.activeElement[e])&&n.focus())},an=function(t,e,n){Z(e.allowEscapeKey)&&(t.preventDefault(),n(Q.esc))},sn=function(e,t,n){t.popup.onclick=function(){var t=St.innerParams.get(e);t.showConfirmButton||t.showDenyButton||t.showCancelButton||t.showCloseButton||t.input||n(Q.close)}},cn=!1,un=function(e){e.popup.onmousedown=function(){e.container.onmouseup=function(t){e.container.onmouseup=void 0,t.target===e.container&&(cn=!0)}}},ln=function(e){e.container.onmousedown=function(){e.popup.onmouseup=function(t){e.popup.onmouseup=void 0,t.target!==e.popup&&!e.popup.contains(t.target)||(cn=!0)}}},dn=function(n,o,i){o.container.onclick=function(t){var e=St.innerParams.get(n);cn?cn=!1:t.target===o.container&&Z(e.allowOutsideClick)&&i(Q.backdrop)}};var pn=function(t,e,n){var o=V();rt(o),e.timer&&(t.timeout=new Be(function(){n("timer"),delete t.timeout},e.timer),e.timerProgressBar&&(it(o),setTimeout(function(){t.timeout.running&<(e.timer)})))},fn=function(t,e){if(!e.toast)return Z(e.allowEnterKey)?void(mn(t,e)||je(0,-1,1)):hn()},mn=function(t,e){return e.focusDeny&&bt(t.denyButton)?(t.denyButton.focus(),!0):e.focusCancel&&bt(t.cancelButton)?(t.cancelButton.focus(),!0):!(!e.focusConfirm||!bt(t.confirmButton))&&(t.confirmButton.focus(),!0)},hn=function(){document.activeElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};var gn,vn=function(t){for(var e in t)t[e]=new WeakMap},yn=Object.freeze({hideLoading:ue,disableLoading:ue,getInput:function(t){var e=St.innerParams.get(t||this),n=St.domCache.get(t||this);return n?tt(n.content,e.input):null},close:ye,closePopup:ye,closeModal:ye,closeToast:ye,enableButtons:function(){ke(this,["confirmButton","denyButton","cancelButton"],!1)},disableButtons:function(){ke(this,["confirmButton","denyButton","cancelButton"],!0)},enableInput:function(){return xe(this.getInput(),!1)},disableInput:function(){return xe(this.getInput(),!0)},showValidationMessage:function(t){var e=St.domCache.get(this),n=St.innerParams.get(this);U(e.validationMessage,t),e.validationMessage.className=$["validation-message"],n.customClass&&n.customClass.validationMessage&>(e.validationMessage,n.customClass.validationMessage),it(e.validationMessage);var o=this.getInput();o&&(o.setAttribute("aria-invalid",!0),o.setAttribute("aria-describedBy",$["validation-message"]),et(o),gt(o,$.inputerror))},resetValidationMessage:function(){var t=St.domCache.get(this);t.validationMessage&&rt(t.validationMessage);var e=this.getInput();e&&(e.removeAttribute("aria-invalid"),e.removeAttribute("aria-describedBy"),vt(e,$.inputerror))},getProgressSteps:function(){return St.domCache.get(this).progressSteps},_main:function(t){ne(t),oe.currentInstance&&oe.currentInstance._destroy(),oe.currentInstance=this;var e=function(t){var e=c({},ie.showClass,t.showClass),n=c({},ie.hideClass,t.hideClass),o=c({},ie,t);if(o.showClass=e,o.hideClass=n,t.animation===false){o.showClass={popup:"swal2-noanimation",backdrop:"swal2-noanimation"};o.hideClass={}}return o}(t);Pe(e),Object.freeze(e),oe.timeout&&(oe.timeout.stop(),delete oe.timeout),clearTimeout(oe.restoreFocusTimeout);var n=function(t){var e={popup:x(),container:C(),content:P(),actions:q(),confirmButton:T(),denyButton:L(),cancelButton:I(),loader:D(),closeButton:H(),validationMessage:S(),progressSteps:O()};return St.domCache.set(t,e),e}(this);return Nt(this,e),St.innerParams.set(this,e),function(n,o,i){return new Promise(function(t){var e=function t(e){n.closePopup({isDismissed:true,dismiss:e})};ge.swalPromiseResolve.set(n,t);o.confirmButton.onclick=function(){return Te(n,i)};o.denyButton.onclick=function(){return Le(n,i)};o.cancelButton.onclick=function(){return De(n,e)};o.closeButton.onclick=function(){return e(Q.close)};Me(n,o,e);qe(n,oe,i,e);if(i.toast&&(i.input||i.footer||i.showCloseButton)){gt(document.body,$["toast-column"])}else{vt(document.body,$["toast-column"])}Se(n,i);Ee(i);pn(oe,i,e);fn(o,i);setTimeout(function(){o.container.scrollTop=0})})}(this,n,e)},update:function(e){var t=x(),n=St.innerParams.get(this);if(!t||_(t,n.hideClass.popup))return W("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(e).forEach(function(t){wn.isUpdatableParameter(t)?o[t]=e[t]:W('Invalid parameter to update: "'.concat(t,'". 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 i=c({},n,o);Nt(this,i),St.innerParams.set(this,i),Object.defineProperties(this,{params:{value:c({},this.params,e),writable:!1,enumerable:!0}})},_destroy:function(){var t=St.domCache.get(this),e=St.innerParams.get(this);e&&(t.popup&&oe.swalCloseEventFinishedCallback&&(oe.swalCloseEventFinishedCallback(),delete oe.swalCloseEventFinishedCallback),oe.deferDisposalTimer&&(clearTimeout(oe.deferDisposalTimer),delete oe.deferDisposalTimer),function(t){if(typeof t.didDestroy==="function"){t.didDestroy()}else if(typeof t.onDestroy==="function"){t.onDestroy()}}(e),delete this.params,delete oe.keydownHandler,delete oe.keydownTarget,vn(St),vn(ge))}}),bn=function(){function r(){if(a(this,r),"undefined"!=typeof window){"undefined"==typeof Promise&&K("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)"),gn=this;for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var o=Object.freeze(this.constructor.argsToParams(e));Object.defineProperties(this,{params:{value:o,writable:!1,enumerable:!0,configurable:!0}});var i=this._main(this.params);St.promise.set(this,i)}}return s(r,[{key:"then",value:function(t){return St.promise.get(this).then(t)}},{key:"finally",value:function(t){return St.promise.get(this).finally(t)}}]),r}();c(bn.prototype,yn),c(bn,ce),Object.keys(yn).forEach(function(t){bn[t]=function(){if(gn)return gn[t].apply(gn,arguments)}}),bn.DismissReason=Q,bn.version="10.6.1";var wn=bn;return wn.default=wn}),void 0!==this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2);
|
2 |
+
"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:row;align-items:center;width:auto;padding:.625em;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 .6em;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;padding:0;font-size:1em}.swal2-popup.swal2-toast .swal2-icon{width:2em;min-width:2em;height:2em;margin: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-basis:auto!important;width:auto;height:auto;margin:0 .3125em;padding:0}.swal2-popup.swal2-toast .swal2-styled{margin:0 .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(50,100,150,.4)}.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:.3125em;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 1.6em}.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 2em;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:1.0625em}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#d14529;color:#fff;font-size:1.0625em}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#757575;color:#fff;font-size:1.0625em}.swal2-styled:focus{outline:0;box-shadow:0 0 0 1px #fff,0 0 0 3px rgba(50,100,150,.4)}.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:.3125em;border-bottom-left-radius:.3125em}.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:0;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::-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 3px #c4e6f5}.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::-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{margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto}.swal2-validation-message{display:none;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%;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}}@-moz-document url-prefix(){.swal2-close:focus{outline:2px solid rgba(50,100,150,.4)}}@-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}body.swal2-toast-column .swal2-toast{flex-direction:column;align-items:stretch}body.swal2-toast-column .swal2-toast .swal2-actions{flex:1;align-self:stretch;height:2.2em;margin-top:.3125em}body.swal2-toast-column .swal2-toast .swal2-loading{justify-content:center}body.swal2-toast-column .swal2-toast .swal2-input{height:2em;margin:.3125em auto;font-size:1em}body.swal2-toast-column .swal2-toast .swal2-validation-message{font-size:1em}");
|
assets/sweetalert2/dist/sweetalert2.css
ADDED
@@ -0,0 +1,1372 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.swal2-popup.swal2-toast {
|
2 |
+
flex-direction: row;
|
3 |
+
align-items: center;
|
4 |
+
width: auto;
|
5 |
+
padding: 0.625em;
|
6 |
+
overflow-y: hidden;
|
7 |
+
background: #fff;
|
8 |
+
box-shadow: 0 0 0.625em #d9d9d9;
|
9 |
+
}
|
10 |
+
.swal2-popup.swal2-toast .swal2-header {
|
11 |
+
flex-direction: row;
|
12 |
+
padding: 0;
|
13 |
+
}
|
14 |
+
.swal2-popup.swal2-toast .swal2-title {
|
15 |
+
flex-grow: 1;
|
16 |
+
justify-content: flex-start;
|
17 |
+
margin: 0 0.6em;
|
18 |
+
font-size: 1em;
|
19 |
+
}
|
20 |
+
.swal2-popup.swal2-toast .swal2-footer {
|
21 |
+
margin: 0.5em 0 0;
|
22 |
+
padding: 0.5em 0 0;
|
23 |
+
font-size: 0.8em;
|
24 |
+
}
|
25 |
+
.swal2-popup.swal2-toast .swal2-close {
|
26 |
+
position: static;
|
27 |
+
width: 0.8em;
|
28 |
+
height: 0.8em;
|
29 |
+
line-height: 0.8;
|
30 |
+
}
|
31 |
+
.swal2-popup.swal2-toast .swal2-content {
|
32 |
+
justify-content: flex-start;
|
33 |
+
padding: 0;
|
34 |
+
font-size: 1em;
|
35 |
+
}
|
36 |
+
.swal2-popup.swal2-toast .swal2-icon {
|
37 |
+
width: 2em;
|
38 |
+
min-width: 2em;
|
39 |
+
height: 2em;
|
40 |
+
margin: 0;
|
41 |
+
}
|
42 |
+
.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content {
|
43 |
+
display: flex;
|
44 |
+
align-items: center;
|
45 |
+
font-size: 1.8em;
|
46 |
+
font-weight: bold;
|
47 |
+
}
|
48 |
+
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
|
49 |
+
.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content {
|
50 |
+
font-size: 0.25em;
|
51 |
+
}
|
52 |
+
}
|
53 |
+
.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring {
|
54 |
+
width: 2em;
|
55 |
+
height: 2em;
|
56 |
+
}
|
57 |
+
.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line] {
|
58 |
+
top: 0.875em;
|
59 |
+
width: 1.375em;
|
60 |
+
}
|
61 |
+
.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left] {
|
62 |
+
left: 0.3125em;
|
63 |
+
}
|
64 |
+
.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right] {
|
65 |
+
right: 0.3125em;
|
66 |
+
}
|
67 |
+
.swal2-popup.swal2-toast .swal2-actions {
|
68 |
+
flex-basis: auto !important;
|
69 |
+
width: auto;
|
70 |
+
height: auto;
|
71 |
+
margin: 0 0.3125em;
|
72 |
+
padding: 0;
|
73 |
+
}
|
74 |
+
.swal2-popup.swal2-toast .swal2-styled {
|
75 |
+
margin: 0 0.3125em;
|
76 |
+
padding: 0.3125em 0.625em;
|
77 |
+
font-size: 1em;
|
78 |
+
}
|
79 |
+
.swal2-popup.swal2-toast .swal2-styled:focus {
|
80 |
+
box-shadow: 0 0 0 1px #fff, 0 0 0 3px rgba(50, 100, 150, 0.4);
|
81 |
+
}
|
82 |
+
.swal2-popup.swal2-toast .swal2-success {
|
83 |
+
border-color: #a5dc86;
|
84 |
+
}
|
85 |
+
.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line] {
|
86 |
+
position: absolute;
|
87 |
+
width: 1.6em;
|
88 |
+
height: 3em;
|
89 |
+
transform: rotate(45deg);
|
90 |
+
border-radius: 50%;
|
91 |
+
}
|
92 |
+
.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left] {
|
93 |
+
top: -0.8em;
|
94 |
+
left: -0.5em;
|
95 |
+
transform: rotate(-45deg);
|
96 |
+
transform-origin: 2em 2em;
|
97 |
+
border-radius: 4em 0 0 4em;
|
98 |
+
}
|
99 |
+
.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right] {
|
100 |
+
top: -0.25em;
|
101 |
+
left: 0.9375em;
|
102 |
+
transform-origin: 0 1.5em;
|
103 |
+
border-radius: 0 4em 4em 0;
|
104 |
+
}
|
105 |
+
.swal2-popup.swal2-toast .swal2-success .swal2-success-ring {
|
106 |
+
width: 2em;
|
107 |
+
height: 2em;
|
108 |
+
}
|
109 |
+
.swal2-popup.swal2-toast .swal2-success .swal2-success-fix {
|
110 |
+
top: 0;
|
111 |
+
left: 0.4375em;
|
112 |
+
width: 0.4375em;
|
113 |
+
height: 2.6875em;
|
114 |
+
}
|
115 |
+
.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line] {
|
116 |
+
height: 0.3125em;
|
117 |
+
}
|
118 |
+
.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip] {
|
119 |
+
top: 1.125em;
|
120 |
+
left: 0.1875em;
|
121 |
+
width: 0.75em;
|
122 |
+
}
|
123 |
+
.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long] {
|
124 |
+
top: 0.9375em;
|
125 |
+
right: 0.1875em;
|
126 |
+
width: 1.375em;
|
127 |
+
}
|
128 |
+
.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip {
|
129 |
+
-webkit-animation: swal2-toast-animate-success-line-tip 0.75s;
|
130 |
+
animation: swal2-toast-animate-success-line-tip 0.75s;
|
131 |
+
}
|
132 |
+
.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long {
|
133 |
+
-webkit-animation: swal2-toast-animate-success-line-long 0.75s;
|
134 |
+
animation: swal2-toast-animate-success-line-long 0.75s;
|
135 |
+
}
|
136 |
+
.swal2-popup.swal2-toast.swal2-show {
|
137 |
+
-webkit-animation: swal2-toast-show 0.5s;
|
138 |
+
animation: swal2-toast-show 0.5s;
|
139 |
+
}
|
140 |
+
.swal2-popup.swal2-toast.swal2-hide {
|
141 |
+
-webkit-animation: swal2-toast-hide 0.1s forwards;
|
142 |
+
animation: swal2-toast-hide 0.1s forwards;
|
143 |
+
}
|
144 |
+
|
145 |
+
.swal2-container {
|
146 |
+
display: flex;
|
147 |
+
position: fixed;
|
148 |
+
z-index: 1060;
|
149 |
+
top: 0;
|
150 |
+
right: 0;
|
151 |
+
bottom: 0;
|
152 |
+
left: 0;
|
153 |
+
flex-direction: row;
|
154 |
+
align-items: center;
|
155 |
+
justify-content: center;
|
156 |
+
padding: 0.625em;
|
157 |
+
overflow-x: hidden;
|
158 |
+
transition: background-color 0.1s;
|
159 |
+
-webkit-overflow-scrolling: touch;
|
160 |
+
}
|
161 |
+
.swal2-container.swal2-backdrop-show, .swal2-container.swal2-noanimation {
|
162 |
+
background: rgba(0, 0, 0, 0.4);
|
163 |
+
}
|
164 |
+
.swal2-container.swal2-backdrop-hide {
|
165 |
+
background: transparent !important;
|
166 |
+
}
|
167 |
+
.swal2-container.swal2-top {
|
168 |
+
align-items: flex-start;
|
169 |
+
}
|
170 |
+
.swal2-container.swal2-top-start, .swal2-container.swal2-top-left {
|
171 |
+
align-items: flex-start;
|
172 |
+
justify-content: flex-start;
|
173 |
+
}
|
174 |
+
.swal2-container.swal2-top-end, .swal2-container.swal2-top-right {
|
175 |
+
align-items: flex-start;
|
176 |
+
justify-content: flex-end;
|
177 |
+
}
|
178 |
+
.swal2-container.swal2-center {
|
179 |
+
align-items: center;
|
180 |
+
}
|
181 |
+
.swal2-container.swal2-center-start, .swal2-container.swal2-center-left {
|
182 |
+
align-items: center;
|
183 |
+
justify-content: flex-start;
|
184 |
+
}
|
185 |
+
.swal2-container.swal2-center-end, .swal2-container.swal2-center-right {
|
186 |
+
align-items: center;
|
187 |
+
justify-content: flex-end;
|
188 |
+
}
|
189 |
+
.swal2-container.swal2-bottom {
|
190 |
+
align-items: flex-end;
|
191 |
+
}
|
192 |
+
.swal2-container.swal2-bottom-start, .swal2-container.swal2-bottom-left {
|
193 |
+
align-items: flex-end;
|
194 |
+
justify-content: flex-start;
|
195 |
+
}
|
196 |
+
.swal2-container.swal2-bottom-end, .swal2-container.swal2-bottom-right {
|
197 |
+
align-items: flex-end;
|
198 |
+
justify-content: flex-end;
|
199 |
+
}
|
200 |
+
.swal2-container.swal2-bottom > :first-child, .swal2-container.swal2-bottom-start > :first-child, .swal2-container.swal2-bottom-left > :first-child, .swal2-container.swal2-bottom-end > :first-child, .swal2-container.swal2-bottom-right > :first-child {
|
201 |
+
margin-top: auto;
|
202 |
+
}
|
203 |
+
.swal2-container.swal2-grow-fullscreen > .swal2-modal {
|
204 |
+
display: flex !important;
|
205 |
+
flex: 1;
|
206 |
+
align-self: stretch;
|
207 |
+
justify-content: center;
|
208 |
+
}
|
209 |
+
.swal2-container.swal2-grow-row > .swal2-modal {
|
210 |
+
display: flex !important;
|
211 |
+
flex: 1;
|
212 |
+
align-content: center;
|
213 |
+
justify-content: center;
|
214 |
+
}
|
215 |
+
.swal2-container.swal2-grow-column {
|
216 |
+
flex: 1;
|
217 |
+
flex-direction: column;
|
218 |
+
}
|
219 |
+
.swal2-container.swal2-grow-column.swal2-top, .swal2-container.swal2-grow-column.swal2-center, .swal2-container.swal2-grow-column.swal2-bottom {
|
220 |
+
align-items: center;
|
221 |
+
}
|
222 |
+
.swal2-container.swal2-grow-column.swal2-top-start, .swal2-container.swal2-grow-column.swal2-center-start, .swal2-container.swal2-grow-column.swal2-bottom-start, .swal2-container.swal2-grow-column.swal2-top-left, .swal2-container.swal2-grow-column.swal2-center-left, .swal2-container.swal2-grow-column.swal2-bottom-left {
|
223 |
+
align-items: flex-start;
|
224 |
+
}
|
225 |
+
.swal2-container.swal2-grow-column.swal2-top-end, .swal2-container.swal2-grow-column.swal2-center-end, .swal2-container.swal2-grow-column.swal2-bottom-end, .swal2-container.swal2-grow-column.swal2-top-right, .swal2-container.swal2-grow-column.swal2-center-right, .swal2-container.swal2-grow-column.swal2-bottom-right {
|
226 |
+
align-items: flex-end;
|
227 |
+
}
|
228 |
+
.swal2-container.swal2-grow-column > .swal2-modal {
|
229 |
+
display: flex !important;
|
230 |
+
flex: 1;
|
231 |
+
align-content: center;
|
232 |
+
justify-content: center;
|
233 |
+
}
|
234 |
+
.swal2-container.swal2-no-transition {
|
235 |
+
transition: none !important;
|
236 |
+
}
|
237 |
+
.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 {
|
238 |
+
margin: auto;
|
239 |
+
}
|
240 |
+
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
|
241 |
+
.swal2-container .swal2-modal {
|
242 |
+
margin: 0 !important;
|
243 |
+
}
|
244 |
+
}
|
245 |
+
|
246 |
+
.swal2-popup {
|
247 |
+
display: none;
|
248 |
+
position: relative;
|
249 |
+
box-sizing: border-box;
|
250 |
+
flex-direction: column;
|
251 |
+
justify-content: center;
|
252 |
+
width: 32em;
|
253 |
+
max-width: 100%;
|
254 |
+
padding: 1.25em;
|
255 |
+
border: none;
|
256 |
+
border-radius: 0.3125em;
|
257 |
+
background: #fff;
|
258 |
+
font-family: inherit;
|
259 |
+
font-size: 1rem;
|
260 |
+
}
|
261 |
+
.swal2-popup:focus {
|
262 |
+
outline: none;
|
263 |
+
}
|
264 |
+
.swal2-popup.swal2-loading {
|
265 |
+
overflow-y: hidden;
|
266 |
+
}
|
267 |
+
|
268 |
+
.swal2-header {
|
269 |
+
display: flex;
|
270 |
+
flex-direction: column;
|
271 |
+
align-items: center;
|
272 |
+
padding: 0 1.8em;
|
273 |
+
}
|
274 |
+
|
275 |
+
.swal2-title {
|
276 |
+
position: relative;
|
277 |
+
max-width: 100%;
|
278 |
+
margin: 0 0 0.4em;
|
279 |
+
padding: 0;
|
280 |
+
color: #595959;
|
281 |
+
font-size: 1.875em;
|
282 |
+
font-weight: 600;
|
283 |
+
text-align: center;
|
284 |
+
text-transform: none;
|
285 |
+
word-wrap: break-word;
|
286 |
+
}
|
287 |
+
|
288 |
+
.swal2-actions {
|
289 |
+
display: flex;
|
290 |
+
z-index: 1;
|
291 |
+
box-sizing: border-box;
|
292 |
+
flex-wrap: wrap;
|
293 |
+
align-items: center;
|
294 |
+
justify-content: center;
|
295 |
+
width: 100%;
|
296 |
+
margin: 1.25em auto 0;
|
297 |
+
padding: 0 1.6em;
|
298 |
+
}
|
299 |
+
.swal2-actions:not(.swal2-loading) .swal2-styled[disabled] {
|
300 |
+
opacity: 0.4;
|
301 |
+
}
|
302 |
+
.swal2-actions:not(.swal2-loading) .swal2-styled:hover {
|
303 |
+
background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1));
|
304 |
+
}
|
305 |
+
.swal2-actions:not(.swal2-loading) .swal2-styled:active {
|
306 |
+
background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2));
|
307 |
+
}
|
308 |
+
|
309 |
+
.swal2-loader {
|
310 |
+
display: none;
|
311 |
+
align-items: center;
|
312 |
+
justify-content: center;
|
313 |
+
width: 2.2em;
|
314 |
+
height: 2.2em;
|
315 |
+
margin: 0 1.875em;
|
316 |
+
-webkit-animation: swal2-rotate-loading 1.5s linear 0s infinite normal;
|
317 |
+
animation: swal2-rotate-loading 1.5s linear 0s infinite normal;
|
318 |
+
border-width: 0.25em;
|
319 |
+
border-style: solid;
|
320 |
+
border-radius: 100%;
|
321 |
+
border-color: #2778c4 transparent #2778c4 transparent;
|
322 |
+
}
|
323 |
+
|
324 |
+
.swal2-styled {
|
325 |
+
margin: 0.3125em;
|
326 |
+
padding: 0.625em 2em;
|
327 |
+
box-shadow: none;
|
328 |
+
font-weight: 500;
|
329 |
+
}
|
330 |
+
.swal2-styled:not([disabled]) {
|
331 |
+
cursor: pointer;
|
332 |
+
}
|
333 |
+
.swal2-styled.swal2-confirm {
|
334 |
+
border: 0;
|
335 |
+
border-radius: 0.25em;
|
336 |
+
background: initial;
|
337 |
+
background-color: #2778c4;
|
338 |
+
color: #fff;
|
339 |
+
font-size: 1.0625em;
|
340 |
+
}
|
341 |
+
.swal2-styled.swal2-deny {
|
342 |
+
border: 0;
|
343 |
+
border-radius: 0.25em;
|
344 |
+
background: initial;
|
345 |
+
background-color: #d14529;
|
346 |
+
color: #fff;
|
347 |
+
font-size: 1.0625em;
|
348 |
+
}
|
349 |
+
.swal2-styled.swal2-cancel {
|
350 |
+
border: 0;
|
351 |
+
border-radius: 0.25em;
|
352 |
+
background: initial;
|
353 |
+
background-color: #757575;
|
354 |
+
color: #fff;
|
355 |
+
font-size: 1.0625em;
|
356 |
+
}
|
357 |
+
.swal2-styled:focus {
|
358 |
+
outline: none;
|
359 |
+
box-shadow: 0 0 0 1px #fff, 0 0 0 3px rgba(50, 100, 150, 0.4);
|
360 |
+
}
|
361 |
+
.swal2-styled::-moz-focus-inner {
|
362 |
+
border: 0;
|
363 |
+
}
|
364 |
+
|
365 |
+
.swal2-footer {
|
366 |
+
justify-content: center;
|
367 |
+
margin: 1.25em 0 0;
|
368 |
+
padding: 1em 0 0;
|
369 |
+
border-top: 1px solid #eee;
|
370 |
+
color: #545454;
|
371 |
+
font-size: 1em;
|
372 |
+
}
|
373 |
+
|
374 |
+
.swal2-timer-progress-bar-container {
|
375 |
+
position: absolute;
|
376 |
+
right: 0;
|
377 |
+
bottom: 0;
|
378 |
+
left: 0;
|
379 |
+
height: 0.25em;
|
380 |
+
overflow: hidden;
|
381 |
+
border-bottom-right-radius: 0.3125em;
|
382 |
+
border-bottom-left-radius: 0.3125em;
|
383 |
+
}
|
384 |
+
|
385 |
+
.swal2-timer-progress-bar {
|
386 |
+
width: 100%;
|
387 |
+
height: 0.25em;
|
388 |
+
background: rgba(0, 0, 0, 0.2);
|
389 |
+
}
|
390 |
+
|
391 |
+
.swal2-image {
|
392 |
+
max-width: 100%;
|
393 |
+
margin: 1.25em auto;
|
394 |
+
}
|
395 |
+
|
396 |
+
.swal2-close {
|
397 |
+
position: absolute;
|
398 |
+
z-index: 2;
|
399 |
+
top: 0;
|
400 |
+
right: 0;
|
401 |
+
align-items: center;
|
402 |
+
justify-content: center;
|
403 |
+
width: 1.2em;
|
404 |
+
height: 1.2em;
|
405 |
+
padding: 0;
|
406 |
+
overflow: hidden;
|
407 |
+
transition: color 0.1s ease-out;
|
408 |
+
border: none;
|
409 |
+
border-radius: 0;
|
410 |
+
background: transparent;
|
411 |
+
color: #cccccc;
|
412 |
+
font-family: serif;
|
413 |
+
font-size: 2.5em;
|
414 |
+
line-height: 1.2;
|
415 |
+
cursor: pointer;
|
416 |
+
}
|
417 |
+
.swal2-close:hover {
|
418 |
+
transform: none;
|
419 |
+
background: transparent;
|
420 |
+
color: #f27474;
|
421 |
+
}
|
422 |
+
.swal2-close::-moz-focus-inner {
|
423 |
+
border: 0;
|
424 |
+
}
|
425 |
+
|
426 |
+
.swal2-content {
|
427 |
+
z-index: 1;
|
428 |
+
justify-content: center;
|
429 |
+
margin: 0;
|
430 |
+
padding: 0 1.6em;
|
431 |
+
color: #545454;
|
432 |
+
font-size: 1.125em;
|
433 |
+
font-weight: normal;
|
434 |
+
line-height: normal;
|
435 |
+
text-align: center;
|
436 |
+
word-wrap: break-word;
|
437 |
+
}
|
438 |
+
|
439 |
+
.swal2-input,
|
440 |
+
.swal2-file,
|
441 |
+
.swal2-textarea,
|
442 |
+
.swal2-select,
|
443 |
+
.swal2-radio,
|
444 |
+
.swal2-checkbox {
|
445 |
+
margin: 1em auto;
|
446 |
+
}
|
447 |
+
|
448 |
+
.swal2-input,
|
449 |
+
.swal2-file,
|
450 |
+
.swal2-textarea {
|
451 |
+
box-sizing: border-box;
|
452 |
+
width: 100%;
|
453 |
+
transition: border-color 0.3s, box-shadow 0.3s;
|
454 |
+
border: 1px solid #d9d9d9;
|
455 |
+
border-radius: 0.1875em;
|
456 |
+
background: inherit;
|
457 |
+
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06);
|
458 |
+
color: inherit;
|
459 |
+
font-size: 1.125em;
|
460 |
+
}
|
461 |
+
.swal2-input.swal2-inputerror,
|
462 |
+
.swal2-file.swal2-inputerror,
|
463 |
+
.swal2-textarea.swal2-inputerror {
|
464 |
+
border-color: #f27474 !important;
|
465 |
+
box-shadow: 0 0 2px #f27474 !important;
|
466 |
+
}
|
467 |
+
.swal2-input:focus,
|
468 |
+
.swal2-file:focus,
|
469 |
+
.swal2-textarea:focus {
|
470 |
+
border: 1px solid #b4dbed;
|
471 |
+
outline: none;
|
472 |
+
box-shadow: 0 0 3px #c4e6f5;
|
473 |
+
}
|
474 |
+
.swal2-input::-moz-placeholder, .swal2-file::-moz-placeholder, .swal2-textarea::-moz-placeholder {
|
475 |
+
color: #cccccc;
|
476 |
+
}
|
477 |
+
.swal2-input:-ms-input-placeholder, .swal2-file:-ms-input-placeholder, .swal2-textarea:-ms-input-placeholder {
|
478 |
+
color: #cccccc;
|
479 |
+
}
|
480 |
+
.swal2-input::-ms-input-placeholder, .swal2-file::-ms-input-placeholder, .swal2-textarea::-ms-input-placeholder {
|
481 |
+
color: #cccccc;
|
482 |
+
}
|
483 |
+
.swal2-input::placeholder,
|
484 |
+
.swal2-file::placeholder,
|
485 |
+
.swal2-textarea::placeholder {
|
486 |
+
color: #cccccc;
|
487 |
+
}
|
488 |
+
|
489 |
+
.swal2-range {
|
490 |
+
margin: 1em auto;
|
491 |
+
background: #fff;
|
492 |
+
}
|
493 |
+
.swal2-range input {
|
494 |
+
width: 80%;
|
495 |
+
}
|
496 |
+
.swal2-range output {
|
497 |
+
width: 20%;
|
498 |
+
color: inherit;
|
499 |
+
font-weight: 600;
|
500 |
+
text-align: center;
|
501 |
+
}
|
502 |
+
.swal2-range input,
|
503 |
+
.swal2-range output {
|
504 |
+
height: 2.625em;
|
505 |
+
padding: 0;
|
506 |
+
font-size: 1.125em;
|
507 |
+
line-height: 2.625em;
|
508 |
+
}
|
509 |
+
|
510 |
+
.swal2-input {
|
511 |
+
height: 2.625em;
|
512 |
+
padding: 0 0.75em;
|
513 |
+
}
|
514 |
+
.swal2-input[type=number] {
|
515 |
+
max-width: 10em;
|
516 |
+
}
|
517 |
+
|
518 |
+
.swal2-file {
|
519 |
+
background: inherit;
|
520 |
+
font-size: 1.125em;
|
521 |
+
}
|
522 |
+
|
523 |
+
.swal2-textarea {
|
524 |
+
height: 6.75em;
|
525 |
+
padding: 0.75em;
|
526 |
+
}
|
527 |
+
|
528 |
+
.swal2-select {
|
529 |
+
min-width: 50%;
|
530 |
+
max-width: 100%;
|
531 |
+
padding: 0.375em 0.625em;
|
532 |
+
background: inherit;
|
533 |
+
color: inherit;
|
534 |
+
font-size: 1.125em;
|
535 |
+
}
|
536 |
+
|
537 |
+
.swal2-radio,
|
538 |
+
.swal2-checkbox {
|
539 |
+
align-items: center;
|
540 |
+
justify-content: center;
|
541 |
+
background: #fff;
|
542 |
+
color: inherit;
|
543 |
+
}
|
544 |
+
.swal2-radio label,
|
545 |
+
.swal2-checkbox label {
|
546 |
+
margin: 0 0.6em;
|
547 |
+
font-size: 1.125em;
|
548 |
+
}
|
549 |
+
.swal2-radio input,
|
550 |
+
.swal2-checkbox input {
|
551 |
+
margin: 0 0.4em;
|
552 |
+
}
|
553 |
+
|
554 |
+
.swal2-input-label {
|
555 |
+
display: flex;
|
556 |
+
justify-content: center;
|
557 |
+
margin: 1em auto;
|
558 |
+
}
|
559 |
+
|
560 |
+
.swal2-validation-message {
|
561 |
+
display: none;
|
562 |
+
align-items: center;
|
563 |
+
justify-content: center;
|
564 |
+
margin: 0 -2.7em;
|
565 |
+
padding: 0.625em;
|
566 |
+
overflow: hidden;
|
567 |
+
background: #f0f0f0;
|
568 |
+
color: #666666;
|
569 |
+
font-size: 1em;
|
570 |
+
font-weight: 300;
|
571 |
+
}
|
572 |
+
.swal2-validation-message::before {
|
573 |
+
content: "!";
|
574 |
+
display: inline-block;
|
575 |
+
width: 1.5em;
|
576 |
+
min-width: 1.5em;
|
577 |
+
height: 1.5em;
|
578 |
+
margin: 0 0.625em;
|
579 |
+
border-radius: 50%;
|
580 |
+
background-color: #f27474;
|
581 |
+
color: #fff;
|
582 |
+
font-weight: 600;
|
583 |
+
line-height: 1.5em;
|
584 |
+
text-align: center;
|
585 |
+
}
|
586 |
+
|
587 |
+
.swal2-icon {
|
588 |
+
position: relative;
|
589 |
+
box-sizing: content-box;
|
590 |
+
justify-content: center;
|
591 |
+
width: 5em;
|
592 |
+
height: 5em;
|
593 |
+
margin: 1.25em auto 1.875em;
|
594 |
+
border: 0.25em solid transparent;
|
595 |
+
border-radius: 50%;
|
596 |
+
font-family: inherit;
|
597 |
+
line-height: 5em;
|
598 |
+
cursor: default;
|
599 |
+
-webkit-user-select: none;
|
600 |
+
-moz-user-select: none;
|
601 |
+
-ms-user-select: none;
|
602 |
+
user-select: none;
|
603 |
+
}
|
604 |
+
.swal2-icon .swal2-icon-content {
|
605 |
+
display: flex;
|
606 |
+
align-items: center;
|
607 |
+
font-size: 3.75em;
|
608 |
+
}
|
609 |
+
.swal2-icon.swal2-error {
|
610 |
+
border-color: #f27474;
|
611 |
+
color: #f27474;
|
612 |
+
}
|
613 |
+
.swal2-icon.swal2-error .swal2-x-mark {
|
614 |
+
position: relative;
|
615 |
+
flex-grow: 1;
|
616 |
+
}
|
617 |
+
.swal2-icon.swal2-error [class^=swal2-x-mark-line] {
|
618 |
+
display: block;
|
619 |
+
position: absolute;
|
620 |
+
top: 2.3125em;
|
621 |
+
width: 2.9375em;
|
622 |
+
height: 0.3125em;
|
623 |
+
border-radius: 0.125em;
|
624 |
+
background-color: #f27474;
|
625 |
+
}
|
626 |
+
.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left] {
|
627 |
+
left: 1.0625em;
|
628 |
+
transform: rotate(45deg);
|
629 |
+
}
|
630 |
+
.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right] {
|
631 |
+
right: 1em;
|
632 |
+
transform: rotate(-45deg);
|
633 |
+
}
|
634 |
+
.swal2-icon.swal2-error.swal2-icon-show {
|
635 |
+
-webkit-animation: swal2-animate-error-icon 0.5s;
|
636 |
+
animation: swal2-animate-error-icon 0.5s;
|
637 |
+
}
|
638 |
+
.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark {
|
639 |
+
-webkit-animation: swal2-animate-error-x-mark 0.5s;
|
640 |
+
animation: swal2-animate-error-x-mark 0.5s;
|
641 |
+
}
|
642 |
+
.swal2-icon.swal2-warning {
|
643 |
+
border-color: #facea8;
|
644 |
+
color: #f8bb86;
|
645 |
+
}
|
646 |
+
.swal2-icon.swal2-info {
|
647 |
+
border-color: #9de0f6;
|
648 |
+
color: #3fc3ee;
|
649 |
+
}
|
650 |
+
.swal2-icon.swal2-question {
|
651 |
+
border-color: #c9dae1;
|
652 |
+
color: #87adbd;
|
653 |
+
}
|
654 |
+
.swal2-icon.swal2-success {
|
655 |
+
border-color: #a5dc86;
|
656 |
+
color: #a5dc86;
|
657 |
+
}
|
658 |
+
.swal2-icon.swal2-success [class^=swal2-success-circular-line] {
|
659 |
+
position: absolute;
|
660 |
+
width: 3.75em;
|
661 |
+
height: 7.5em;
|
662 |
+
transform: rotate(45deg);
|
663 |
+
border-radius: 50%;
|
664 |
+
}
|
665 |
+
.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left] {
|
666 |
+
top: -0.4375em;
|
667 |
+
left: -2.0635em;
|
668 |
+
transform: rotate(-45deg);
|
669 |
+
transform-origin: 3.75em 3.75em;
|
670 |
+
border-radius: 7.5em 0 0 7.5em;
|
671 |
+
}
|
672 |
+
.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right] {
|
673 |
+
top: -0.6875em;
|
674 |
+
left: 1.875em;
|
675 |
+
transform: rotate(-45deg);
|
676 |
+
transform-origin: 0 3.75em;
|
677 |
+
border-radius: 0 7.5em 7.5em 0;
|
678 |
+
}
|
679 |
+
.swal2-icon.swal2-success .swal2-success-ring {
|
680 |
+
position: absolute;
|
681 |
+
z-index: 2;
|
682 |
+
top: -0.25em;
|
683 |
+
left: -0.25em;
|
684 |
+
box-sizing: content-box;
|
685 |
+
width: 100%;
|
686 |
+
height: 100%;
|
687 |
+
border: 0.25em solid rgba(165, 220, 134, 0.3);
|
688 |
+
border-radius: 50%;
|
689 |
+
}
|
690 |
+
.swal2-icon.swal2-success .swal2-success-fix {
|
691 |
+
position: absolute;
|
692 |
+
z-index: 1;
|
693 |
+
top: 0.5em;
|
694 |
+
left: 1.625em;
|
695 |
+
width: 0.4375em;
|
696 |
+
height: 5.625em;
|
697 |
+
transform: rotate(-45deg);
|
698 |
+
}
|
699 |
+
.swal2-icon.swal2-success [class^=swal2-success-line] {
|
700 |
+
display: block;
|
701 |
+
position: absolute;
|
702 |
+
z-index: 2;
|
703 |
+
height: 0.3125em;
|
704 |
+
border-radius: 0.125em;
|
705 |
+
background-color: #a5dc86;
|
706 |
+
}
|
707 |
+
.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip] {
|
708 |
+
top: 2.875em;
|
709 |
+
left: 0.8125em;
|
710 |
+
width: 1.5625em;
|
711 |
+
transform: rotate(45deg);
|
712 |
+
}
|
713 |
+
.swal2-icon.swal2-success [class^=swal2-success-line][class$=long] {
|
714 |
+
top: 2.375em;
|
715 |
+
right: 0.5em;
|
716 |
+
width: 2.9375em;
|
717 |
+
transform: rotate(-45deg);
|
718 |
+
}
|
719 |
+
.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip {
|
720 |
+
-webkit-animation: swal2-animate-success-line-tip 0.75s;
|
721 |
+
animation: swal2-animate-success-line-tip 0.75s;
|
722 |
+
}
|
723 |
+
.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long {
|
724 |
+
-webkit-animation: swal2-animate-success-line-long 0.75s;
|
725 |
+
animation: swal2-animate-success-line-long 0.75s;
|
726 |
+
}
|
727 |
+
.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right {
|
728 |
+
-webkit-animation: swal2-rotate-success-circular-line 4.25s ease-in;
|
729 |
+
animation: swal2-rotate-success-circular-line 4.25s ease-in;
|
730 |
+
}
|
731 |
+
|
732 |
+
.swal2-progress-steps {
|
733 |
+
flex-wrap: wrap;
|
734 |
+
align-items: center;
|
735 |
+
max-width: 100%;
|
736 |
+
margin: 0 0 1.25em;
|
737 |
+
padding: 0;
|
738 |
+
background: inherit;
|
739 |
+
font-weight: 600;
|
740 |
+
}
|
741 |
+
.swal2-progress-steps li {
|
742 |
+
display: inline-block;
|
743 |
+
position: relative;
|
744 |
+
}
|
745 |
+
.swal2-progress-steps .swal2-progress-step {
|
746 |
+
z-index: 20;
|
747 |
+
flex-shrink: 0;
|
748 |
+
width: 2em;
|
749 |
+
height: 2em;
|
750 |
+
border-radius: 2em;
|
751 |
+
background: #2778c4;
|
752 |
+
color: #fff;
|
753 |
+
line-height: 2em;
|
754 |
+
text-align: center;
|
755 |
+
}
|
756 |
+
.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step {
|
757 |
+
background: #2778c4;
|
758 |
+
}
|
759 |
+
.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step ~ .swal2-progress-step {
|
760 |
+
background: #add8e6;
|
761 |
+
color: #fff;
|
762 |
+
}
|
763 |
+
.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step ~ .swal2-progress-step-line {
|
764 |
+
background: #add8e6;
|
765 |
+
}
|
766 |
+
.swal2-progress-steps .swal2-progress-step-line {
|
767 |
+
z-index: 10;
|
768 |
+
flex-shrink: 0;
|
769 |
+
width: 2.5em;
|
770 |
+
height: 0.4em;
|
771 |
+
margin: 0 -1px;
|
772 |
+
background: #2778c4;
|
773 |
+
}
|
774 |
+
|
775 |
+
[class^=swal2] {
|
776 |
+
-webkit-tap-highlight-color: transparent;
|
777 |
+
}
|
778 |
+
|
779 |
+
.swal2-show {
|
780 |
+
-webkit-animation: swal2-show 0.3s;
|
781 |
+
animation: swal2-show 0.3s;
|
782 |
+
}
|
783 |
+
|
784 |
+
.swal2-hide {
|
785 |
+
-webkit-animation: swal2-hide 0.15s forwards;
|
786 |
+
animation: swal2-hide 0.15s forwards;
|
787 |
+
}
|
788 |
+
|
789 |
+
.swal2-noanimation {
|
790 |
+
transition: none;
|
791 |
+
}
|
792 |
+
|
793 |
+
.swal2-scrollbar-measure {
|
794 |
+
position: absolute;
|
795 |
+
top: -9999px;
|
796 |
+
width: 50px;
|
797 |
+
height: 50px;
|
798 |
+
overflow: scroll;
|
799 |
+
}
|
800 |
+
|
801 |
+
.swal2-rtl .swal2-close {
|
802 |
+
right: auto;
|
803 |
+
left: 0;
|
804 |
+
}
|
805 |
+
.swal2-rtl .swal2-timer-progress-bar {
|
806 |
+
right: 0;
|
807 |
+
left: auto;
|
808 |
+
}
|
809 |
+
|
810 |
+
@supports (-ms-accelerator: true) {
|
811 |
+
.swal2-range input {
|
812 |
+
width: 100% !important;
|
813 |
+
}
|
814 |
+
.swal2-range output {
|
815 |
+
display: none;
|
816 |
+
}
|
817 |
+
}
|
818 |
+
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
|
819 |
+
.swal2-range input {
|
820 |
+
width: 100% !important;
|
821 |
+
}
|
822 |
+
.swal2-range output {
|
823 |
+
display: none;
|
824 |
+
}
|
825 |
+
}
|
826 |
+
@-moz-document url-prefix() {
|
827 |
+
.swal2-close:focus {
|
828 |
+
outline: 2px solid rgba(50, 100, 150, 0.4);
|
829 |
+
}
|
830 |
+
}
|
831 |
+
@-webkit-keyframes swal2-toast-show {
|
832 |
+
0% {
|
833 |
+
transform: translateY(-0.625em) rotateZ(2deg);
|
834 |
+
}
|
835 |
+
33% {
|
836 |
+
transform: translateY(0) rotateZ(-2deg);
|
837 |
+
}
|
838 |
+
66% {
|
839 |
+
transform: translateY(0.3125em) rotateZ(2deg);
|
840 |
+
}
|
841 |
+
100% {
|
842 |
+
transform: translateY(0) rotateZ(0deg);
|
843 |
+
}
|
844 |
+
}
|
845 |
+
@keyframes swal2-toast-show {
|
846 |
+
0% {
|
847 |
+
transform: translateY(-0.625em) rotateZ(2deg);
|
848 |
+
}
|
849 |
+
33% {
|
850 |
+
transform: translateY(0) rotateZ(-2deg);
|
851 |
+
}
|
852 |
+
66% {
|
853 |
+
transform: translateY(0.3125em) rotateZ(2deg);
|
854 |
+
}
|
855 |
+
100% {
|
856 |
+
transform: translateY(0) rotateZ(0deg);
|
857 |
+
}
|
858 |
+
}
|
859 |
+
@-webkit-keyframes swal2-toast-hide {
|
860 |
+
100% {
|
861 |
+
transform: rotateZ(1deg);
|
862 |
+
opacity: 0;
|
863 |
+
}
|
864 |
+
}
|
865 |
+
@keyframes swal2-toast-hide {
|
866 |
+
100% {
|
867 |
+
transform: rotateZ(1deg);
|
868 |
+
opacity: 0;
|
869 |
+
}
|
870 |
+
}
|
871 |
+
@-webkit-keyframes swal2-toast-animate-success-line-tip {
|
872 |
+
0% {
|
873 |
+
top: 0.5625em;
|
874 |
+
left: 0.0625em;
|
875 |
+
width: 0;
|
876 |
+
}
|
877 |
+
54% {
|
878 |
+
top: 0.125em;
|
879 |
+
left: 0.125em;
|
880 |
+
width: 0;
|
881 |
+
}
|
882 |
+
70% {
|
883 |
+
top: 0.625em;
|
884 |
+
left: -0.25em;
|
885 |
+
width: 1.625em;
|
886 |
+
}
|
887 |
+
84% {
|
888 |
+
top: 1.0625em;
|
889 |
+
left: 0.75em;
|
890 |
+
width: 0.5em;
|
891 |
+
}
|
892 |
+
100% {
|
893 |
+
top: 1.125em;
|
894 |
+
left: 0.1875em;
|
895 |
+
width: 0.75em;
|
896 |
+
}
|
897 |
+
}
|
898 |
+
@keyframes swal2-toast-animate-success-line-tip {
|
899 |
+
0% {
|
900 |
+
top: 0.5625em;
|
901 |
+
left: 0.0625em;
|
902 |
+
width: 0;
|
903 |
+
}
|
904 |
+
54% {
|
905 |
+
top: 0.125em;
|
906 |
+
left: 0.125em;
|
907 |
+
width: 0;
|
908 |
+
}
|
909 |
+
70% {
|
910 |
+
top: 0.625em;
|
911 |
+
left: -0.25em;
|
912 |
+
width: 1.625em;
|
913 |
+
}
|
914 |
+
84% {
|
915 |
+
top: 1.0625em;
|
916 |
+
left: 0.75em;
|
917 |
+
width: 0.5em;
|
918 |
+
}
|
919 |
+
100% {
|
920 |
+
top: 1.125em;
|
921 |
+
left: 0.1875em;
|
922 |
+
width: 0.75em;
|
923 |
+
}
|
924 |
+
}
|
925 |
+
@-webkit-keyframes swal2-toast-animate-success-line-long {
|
926 |
+
0% {
|
927 |
+
top: 1.625em;
|
928 |
+
right: 1.375em;
|
929 |
+
width: 0;
|
930 |
+
}
|
931 |
+
65% {
|
932 |
+
top: 1.25em;
|
933 |
+
right: 0.9375em;
|
934 |
+
width: 0;
|
935 |
+
}
|
936 |
+
84% {
|
937 |
+
top: 0.9375em;
|
938 |
+
right: 0;
|
939 |
+
width: 1.125em;
|
940 |
+
}
|
941 |
+
100% {
|
942 |
+
top: 0.9375em;
|
943 |
+
right: 0.1875em;
|
944 |
+
width: 1.375em;
|
945 |
+
}
|
946 |
+
}
|
947 |
+
@keyframes swal2-toast-animate-success-line-long {
|
948 |
+
0% {
|
949 |
+
top: 1.625em;
|
950 |
+
right: 1.375em;
|
951 |
+
width: 0;
|
952 |
+
}
|
953 |
+
65% {
|
954 |
+
top: 1.25em;
|
955 |
+
right: 0.9375em;
|
956 |
+
width: 0;
|
957 |
+
}
|
958 |
+
84% {
|
959 |
+
top: 0.9375em;
|
960 |
+
right: 0;
|
961 |
+
width: 1.125em;
|
962 |
+
}
|
963 |
+
100% {
|
964 |
+
top: 0.9375em;
|
965 |
+
right: 0.1875em;
|
966 |
+
width: 1.375em;
|
967 |
+
}
|
968 |
+
}
|
969 |
+
@-webkit-keyframes swal2-show {
|
970 |
+
0% {
|
971 |
+
transform: scale(0.7);
|
972 |
+
}
|
973 |
+
45% {
|
974 |
+
transform: scale(1.05);
|
975 |
+
}
|
976 |
+
80% {
|
977 |
+
transform: scale(0.95);
|
978 |
+
}
|
979 |
+
100% {
|
980 |
+
transform: scale(1);
|
981 |
+
}
|
982 |
+
}
|
983 |
+
@keyframes swal2-show {
|
984 |
+
0% {
|
985 |
+
transform: scale(0.7);
|
986 |
+
}
|
987 |
+
45% {
|
988 |
+
transform: scale(1.05);
|
989 |
+
}
|
990 |
+
80% {
|
991 |
+
transform: scale(0.95);
|
992 |
+
}
|
993 |
+
100% {
|
994 |
+
transform: scale(1);
|
995 |
+
}
|
996 |
+
}
|
997 |
+
@-webkit-keyframes swal2-hide {
|
998 |
+
0% {
|
999 |
+
transform: scale(1);
|
1000 |
+
opacity: 1;
|
1001 |
+
}
|
1002 |
+
100% {
|
1003 |
+
transform: scale(0.5);
|
1004 |
+
opacity: 0;
|
1005 |
+
}
|
1006 |
+
}
|
1007 |
+
@keyframes swal2-hide {
|
1008 |
+
0% {
|
1009 |
+
transform: scale(1);
|
1010 |
+
opacity: 1;
|
1011 |
+
}
|
1012 |
+
100% {
|
1013 |
+
transform: scale(0.5);
|
1014 |
+
opacity: 0;
|
1015 |
+
}
|
1016 |
+
}
|
1017 |
+
@-webkit-keyframes swal2-animate-success-line-tip {
|
1018 |
+
0% {
|
1019 |
+
top: 1.1875em;
|
1020 |
+
left: 0.0625em;
|
1021 |
+
width: 0;
|
1022 |
+
}
|
1023 |
+
54% {
|
1024 |
+
top: 1.0625em;
|
1025 |
+
left: 0.125em;
|
1026 |
+
width: 0;
|
1027 |
+
}
|
1028 |
+
70% {
|
1029 |
+
top: 2.1875em;
|
1030 |
+
left: -0.375em;
|
1031 |
+
width: 3.125em;
|
1032 |
+
}
|
1033 |
+
84% {
|
1034 |
+
top: 3em;
|
1035 |
+
left: 1.3125em;
|
1036 |
+
width: 1.0625em;
|
1037 |
+
}
|
1038 |
+
100% {
|
1039 |
+
top: 2.8125em;
|
1040 |
+
left: 0.8125em;
|
1041 |
+
width: 1.5625em;
|
1042 |
+
}
|
1043 |
+
}
|
1044 |
+
@keyframes swal2-animate-success-line-tip {
|
1045 |
+
0% {
|
1046 |
+
top: 1.1875em;
|
1047 |
+
left: 0.0625em;
|
1048 |
+
width: 0;
|
1049 |
+
}
|
1050 |
+
54% {
|
1051 |
+
top: 1.0625em;
|
1052 |
+
left: 0.125em;
|
1053 |
+
width: 0;
|
1054 |
+
}
|
1055 |
+
70% {
|
1056 |
+
top: 2.1875em;
|
1057 |
+
left: -0.375em;
|
1058 |
+
width: 3.125em;
|
1059 |
+
}
|
1060 |
+
84% {
|
1061 |
+
top: 3em;
|
1062 |
+
left: 1.3125em;
|
1063 |
+
width: 1.0625em;
|
1064 |
+
}
|
1065 |
+
100% {
|
1066 |
+
top: 2.8125em;
|
1067 |
+
left: 0.8125em;
|
1068 |
+
width: 1.5625em;
|
1069 |
+
}
|
1070 |
+
}
|
1071 |
+
@-webkit-keyframes swal2-animate-success-line-long {
|
1072 |
+
0% {
|
1073 |
+
top: 3.375em;
|
1074 |
+
right: 2.875em;
|
1075 |
+
width: 0;
|
1076 |
+
}
|
1077 |
+
65% {
|
1078 |
+
top: 3.375em;
|
1079 |
+
right: 2.875em;
|
1080 |
+
width: 0;
|
1081 |
+
}
|
1082 |
+
84% {
|
1083 |
+
top: 2.1875em;
|
1084 |
+
right: 0;
|
1085 |
+
width: 3.4375em;
|
1086 |
+
}
|
1087 |
+
100% {
|
1088 |
+
top: 2.375em;
|
1089 |
+
right: 0.5em;
|
1090 |
+
width: 2.9375em;
|
1091 |
+
}
|
1092 |
+
}
|
1093 |
+
@keyframes swal2-animate-success-line-long {
|
1094 |
+
0% {
|
1095 |
+
top: 3.375em;
|
1096 |
+
right: 2.875em;
|
1097 |
+
width: 0;
|
1098 |
+
}
|
1099 |
+
65% {
|
1100 |
+
top: 3.375em;
|
1101 |
+
right: 2.875em;
|
1102 |
+
width: 0;
|
1103 |
+
}
|
1104 |
+
84% {
|
1105 |
+
top: 2.1875em;
|
1106 |
+
right: 0;
|
1107 |
+
width: 3.4375em;
|
1108 |
+
}
|
1109 |
+
100% {
|
1110 |
+
top: 2.375em;
|
1111 |
+
right: 0.5em;
|
1112 |
+
width: 2.9375em;
|
1113 |
+
}
|
1114 |
+
}
|
1115 |
+
@-webkit-keyframes swal2-rotate-success-circular-line {
|
1116 |
+
0% {
|
1117 |
+
transform: rotate(-45deg);
|
1118 |
+
}
|
1119 |
+
5% {
|
1120 |
+
transform: rotate(-45deg);
|
1121 |
+
}
|
1122 |
+
12% {
|
1123 |
+
transform: rotate(-405deg);
|
1124 |
+
}
|
1125 |
+
100% {
|
1126 |
+
transform: rotate(-405deg);
|
1127 |
+
}
|
1128 |
+
}
|
1129 |
+
@keyframes swal2-rotate-success-circular-line {
|
1130 |
+
0% {
|
1131 |
+
transform: rotate(-45deg);
|
1132 |
+
}
|
1133 |
+
5% {
|
1134 |
+
transform: rotate(-45deg);
|
1135 |
+
}
|
1136 |
+
12% {
|
1137 |
+
transform: rotate(-405deg);
|
1138 |
+
}
|
1139 |
+
100% {
|
1140 |
+
transform: rotate(-405deg);
|
1141 |
+
}
|
1142 |
+
}
|
1143 |
+
@-webkit-keyframes swal2-animate-error-x-mark {
|
1144 |
+
0% {
|
1145 |
+
margin-top: 1.625em;
|
1146 |
+
transform: scale(0.4);
|
1147 |
+
opacity: 0;
|
1148 |
+
}
|
1149 |
+
50% {
|
1150 |
+
margin-top: 1.625em;
|
1151 |
+
transform: scale(0.4);
|
1152 |
+
opacity: 0;
|
1153 |
+
}
|
1154 |
+
80% {
|
1155 |
+
margin-top: -0.375em;
|
1156 |
+
transform: scale(1.15);
|
1157 |
+
}
|
1158 |
+
100% {
|
1159 |
+
margin-top: 0;
|
1160 |
+
transform: scale(1);
|
1161 |
+
opacity: 1;
|
1162 |
+
}
|
1163 |
+
}
|
1164 |
+
@keyframes swal2-animate-error-x-mark {
|
1165 |
+
0% {
|
1166 |
+
margin-top: 1.625em;
|
1167 |
+
transform: scale(0.4);
|
1168 |
+
opacity: 0;
|
1169 |
+
}
|
1170 |
+
50% {
|
1171 |
+
margin-top: 1.625em;
|
1172 |
+
transform: scale(0.4);
|
1173 |
+
opacity: 0;
|
1174 |
+
}
|
1175 |
+
80% {
|
1176 |
+
margin-top: -0.375em;
|
1177 |
+
transform: scale(1.15);
|
1178 |
+
}
|
1179 |
+
100% {
|
1180 |
+
margin-top: 0;
|
1181 |
+
transform: scale(1);
|
1182 |
+
opacity: 1;
|
1183 |
+
}
|
1184 |
+
}
|
1185 |
+
@-webkit-keyframes swal2-animate-error-icon {
|
1186 |
+
0% {
|
1187 |
+
transform: rotateX(100deg);
|
1188 |
+
opacity: 0;
|
1189 |
+
}
|
1190 |
+
100% {
|
1191 |
+
transform: rotateX(0deg);
|
1192 |
+
opacity: 1;
|
1193 |
+
}
|
1194 |
+
}
|
1195 |
+
@keyframes swal2-animate-error-icon {
|
1196 |
+
0% {
|
1197 |
+
transform: rotateX(100deg);
|
1198 |
+
opacity: 0;
|
1199 |
+
}
|
1200 |
+
100% {
|
1201 |
+
transform: rotateX(0deg);
|
1202 |
+
opacity: 1;
|
1203 |
+
}
|
1204 |
+
}
|
1205 |
+
@-webkit-keyframes swal2-rotate-loading {
|
1206 |
+
0% {
|
1207 |
+
transform: rotate(0deg);
|
1208 |
+
}
|
1209 |
+
100% {
|
1210 |
+
transform: rotate(360deg);
|
1211 |
+
}
|
1212 |
+
}
|
1213 |
+
@keyframes swal2-rotate-loading {
|
1214 |
+
0% {
|
1215 |
+
transform: rotate(0deg);
|
1216 |
+
}
|
1217 |
+
100% {
|
1218 |
+
transform: rotate(360deg);
|
1219 |
+
}
|
1220 |
+
}
|
1221 |
+
body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) {
|
1222 |
+
overflow: hidden;
|
1223 |
+
}
|
1224 |
+
body.swal2-height-auto {
|
1225 |
+
height: auto !important;
|
1226 |
+
}
|
1227 |
+
body.swal2-no-backdrop .swal2-container {
|
1228 |
+
top: auto;
|
1229 |
+
right: auto;
|
1230 |
+
bottom: auto;
|
1231 |
+
left: auto;
|
1232 |
+
max-width: calc(100% - 0.625em * 2);
|
1233 |
+
background-color: transparent !important;
|
1234 |
+
}
|
1235 |
+
body.swal2-no-backdrop .swal2-container > .swal2-modal {
|
1236 |
+
box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
|
1237 |
+
}
|
1238 |
+
body.swal2-no-backdrop .swal2-container.swal2-top {
|
1239 |
+
top: 0;
|
1240 |
+
left: 50%;
|
1241 |
+
transform: translateX(-50%);
|
1242 |
+
}
|
1243 |
+
body.swal2-no-backdrop .swal2-container.swal2-top-start, body.swal2-no-backdrop .swal2-container.swal2-top-left {
|
1244 |
+
top: 0;
|
1245 |
+
left: 0;
|
1246 |
+
}
|
1247 |
+
body.swal2-no-backdrop .swal2-container.swal2-top-end, body.swal2-no-backdrop .swal2-container.swal2-top-right {
|
1248 |
+
top: 0;
|
1249 |
+
right: 0;
|
1250 |
+
}
|
1251 |
+
body.swal2-no-backdrop .swal2-container.swal2-center {
|
1252 |
+
top: 50%;
|
1253 |
+
left: 50%;
|
1254 |
+
transform: translate(-50%, -50%);
|
1255 |
+
}
|
1256 |
+
body.swal2-no-backdrop .swal2-container.swal2-center-start, body.swal2-no-backdrop .swal2-container.swal2-center-left {
|
1257 |
+
top: 50%;
|
1258 |
+
left: 0;
|
1259 |
+
transform: translateY(-50%);
|
1260 |
+
}
|
1261 |
+
body.swal2-no-backdrop .swal2-container.swal2-center-end, body.swal2-no-backdrop .swal2-container.swal2-center-right {
|
1262 |
+
top: 50%;
|
1263 |
+
right: 0;
|
1264 |
+
transform: translateY(-50%);
|
1265 |
+
}
|
1266 |
+
body.swal2-no-backdrop .swal2-container.swal2-bottom {
|
1267 |
+
bottom: 0;
|
1268 |
+
left: 50%;
|
1269 |
+
transform: translateX(-50%);
|
1270 |
+
}
|
1271 |
+
body.swal2-no-backdrop .swal2-container.swal2-bottom-start, body.swal2-no-backdrop .swal2-container.swal2-bottom-left {
|
1272 |
+
bottom: 0;
|
1273 |
+
left: 0;
|
1274 |
+
}
|
1275 |
+
body.swal2-no-backdrop .swal2-container.swal2-bottom-end, body.swal2-no-backdrop .swal2-container.swal2-bottom-right {
|
1276 |
+
right: 0;
|
1277 |
+
bottom: 0;
|
1278 |
+
}
|
1279 |
+
@media print {
|
1280 |
+
body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) {
|
1281 |
+
overflow-y: scroll !important;
|
1282 |
+
}
|
1283 |
+
body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) > [aria-hidden=true] {
|
1284 |
+
display: none;
|
1285 |
+
}
|
1286 |
+
body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container {
|
1287 |
+
position: static !important;
|
1288 |
+
}
|
1289 |
+
}
|
1290 |
+
body.swal2-toast-shown .swal2-container {
|
1291 |
+
background-color: transparent;
|
1292 |
+
}
|
1293 |
+
body.swal2-toast-shown .swal2-container.swal2-top {
|
1294 |
+
top: 0;
|
1295 |
+
right: auto;
|
1296 |
+
bottom: auto;
|
1297 |
+
left: 50%;
|
1298 |
+
transform: translateX(-50%);
|
1299 |
+
}
|
1300 |
+
body.swal2-toast-shown .swal2-container.swal2-top-end, body.swal2-toast-shown .swal2-container.swal2-top-right {
|
1301 |
+
top: 0;
|
1302 |
+
right: 0;
|
1303 |
+
bottom: auto;
|
1304 |
+
left: auto;
|
1305 |
+
}
|
1306 |
+
body.swal2-toast-shown .swal2-container.swal2-top-start, body.swal2-toast-shown .swal2-container.swal2-top-left {
|
1307 |
+
top: 0;
|
1308 |
+
right: auto;
|
1309 |
+
bottom: auto;
|
1310 |
+
left: 0;
|
1311 |
+
}
|
1312 |
+
body.swal2-toast-shown .swal2-container.swal2-center-start, body.swal2-toast-shown .swal2-container.swal2-center-left {
|
1313 |
+
top: 50%;
|
1314 |
+
right: auto;
|
1315 |
+
bottom: auto;
|
1316 |
+
left: 0;
|
1317 |
+
transform: translateY(-50%);
|
1318 |
+
}
|
1319 |
+
body.swal2-toast-shown .swal2-container.swal2-center {
|
1320 |
+
top: 50%;
|
1321 |
+
right: auto;
|
1322 |
+
bottom: auto;
|
1323 |
+
left: 50%;
|
1324 |
+
transform: translate(-50%, -50%);
|
1325 |
+
}
|
1326 |
+
body.swal2-toast-shown .swal2-container.swal2-center-end, body.swal2-toast-shown .swal2-container.swal2-center-right {
|
1327 |
+
top: 50%;
|
1328 |
+
right: 0;
|
1329 |
+
bottom: auto;
|
1330 |
+
left: auto;
|
1331 |
+
transform: translateY(-50%);
|
1332 |
+
}
|
1333 |
+
body.swal2-toast-shown .swal2-container.swal2-bottom-start, body.swal2-toast-shown .swal2-container.swal2-bottom-left {
|
1334 |
+
top: auto;
|
1335 |
+
right: auto;
|
1336 |
+
bottom: 0;
|
1337 |
+
left: 0;
|
1338 |
+
}
|
1339 |
+
body.swal2-toast-shown .swal2-container.swal2-bottom {
|
1340 |
+
top: auto;
|
1341 |
+
right: auto;
|
1342 |
+
bottom: 0;
|
1343 |
+
left: 50%;
|
1344 |
+
transform: translateX(-50%);
|
1345 |
+
}
|
1346 |
+
body.swal2-toast-shown .swal2-container.swal2-bottom-end, body.swal2-toast-shown .swal2-container.swal2-bottom-right {
|
1347 |
+
top: auto;
|
1348 |
+
right: 0;
|
1349 |
+
bottom: 0;
|
1350 |
+
left: auto;
|
1351 |
+
}
|
1352 |
+
body.swal2-toast-column .swal2-toast {
|
1353 |
+
flex-direction: column;
|
1354 |
+
align-items: stretch;
|
1355 |
+
}
|
1356 |
+
body.swal2-toast-column .swal2-toast .swal2-actions {
|
1357 |
+
flex: 1;
|
1358 |
+
align-self: stretch;
|
1359 |
+
height: 2.2em;
|
1360 |
+
margin-top: 0.3125em;
|
1361 |
+
}
|
1362 |
+
body.swal2-toast-column .swal2-toast .swal2-loading {
|
1363 |
+
justify-content: center;
|
1364 |
+
}
|
1365 |
+
body.swal2-toast-column .swal2-toast .swal2-input {
|
1366 |
+
height: 2em;
|
1367 |
+
margin: 0.3125em auto;
|
1368 |
+
font-size: 1em;
|
1369 |
+
}
|
1370 |
+
body.swal2-toast-column .swal2-toast .swal2-validation-message {
|
1371 |
+
font-size: 1em;
|
1372 |
+
}
|
assets/sweetalert2/dist/sweetalert2.js
ADDED
@@ -0,0 +1,3369 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* sweetalert2 v10.6.1
|
3 |
+
* Released under the MIT License.
|
4 |
+
*/
|
5 |
+
(function (global, factory) {
|
6 |
+
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
7 |
+
typeof define === 'function' && define.amd ? define(factory) :
|
8 |
+
(global = global || self, global.Sweetalert2 = factory());
|
9 |
+
}(this, function () { 'use strict';
|
10 |
+
|
11 |
+
function _typeof(obj) {
|
12 |
+
"@babel/helpers - typeof";
|
13 |
+
|
14 |
+
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
15 |
+
_typeof = function (obj) {
|
16 |
+
return typeof obj;
|
17 |
+
};
|
18 |
+
} else {
|
19 |
+
_typeof = function (obj) {
|
20 |
+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
21 |
+
};
|
22 |
+
}
|
23 |
+
|
24 |
+
return _typeof(obj);
|
25 |
+
}
|
26 |
+
|
27 |
+
function _classCallCheck(instance, Constructor) {
|
28 |
+
if (!(instance instanceof Constructor)) {
|
29 |
+
throw new TypeError("Cannot call a class as a function");
|
30 |
+
}
|
31 |
+
}
|
32 |
+
|
33 |
+
function _defineProperties(target, props) {
|
34 |
+
for (var i = 0; i < props.length; i++) {
|
35 |
+
var descriptor = props[i];
|
36 |
+
descriptor.enumerable = descriptor.enumerable || false;
|
37 |
+
descriptor.configurable = true;
|
38 |
+
if ("value" in descriptor) descriptor.writable = true;
|
39 |
+
Object.defineProperty(target, descriptor.key, descriptor);
|
40 |
+
}
|
41 |
+
}
|
42 |
+
|
43 |
+
function _createClass(Constructor, protoProps, staticProps) {
|
44 |
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
45 |
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
46 |
+
return Constructor;
|
47 |
+
}
|
48 |
+
|
49 |
+
function _extends() {
|
50 |
+
_extends = Object.assign || function (target) {
|
51 |
+
for (var i = 1; i < arguments.length; i++) {
|
52 |
+
var source = arguments[i];
|
53 |
+
|
54 |
+
for (var key in source) {
|
55 |
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
56 |
+
target[key] = source[key];
|
57 |
+
}
|
58 |
+
}
|
59 |
+
}
|
60 |
+
|
61 |
+
return target;
|
62 |
+
};
|
63 |
+
|
64 |
+
return _extends.apply(this, arguments);
|
65 |
+
}
|
66 |
+
|
67 |
+
function _inherits(subClass, superClass) {
|
68 |
+
if (typeof superClass !== "function" && superClass !== null) {
|
69 |
+
throw new TypeError("Super expression must either be null or a function");
|
70 |
+
}
|
71 |
+
|
72 |
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
73 |
+
constructor: {
|
74 |
+
value: subClass,
|
75 |
+
writable: true,
|
76 |
+
configurable: true
|
77 |
+
}
|
78 |
+
});
|
79 |
+
if (superClass) _setPrototypeOf(subClass, superClass);
|
80 |
+
}
|
81 |
+
|
82 |
+
function _getPrototypeOf(o) {
|
83 |
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
84 |
+
return o.__proto__ || Object.getPrototypeOf(o);
|
85 |
+
};
|
86 |
+
return _getPrototypeOf(o);
|
87 |
+
}
|
88 |
+
|
89 |
+
function _setPrototypeOf(o, p) {
|
90 |
+
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
91 |
+
o.__proto__ = p;
|
92 |
+
return o;
|
93 |
+
};
|
94 |
+
|
95 |
+
return _setPrototypeOf(o, p);
|
96 |
+
}
|
97 |
+
|
98 |
+
function _isNativeReflectConstruct() {
|
99 |
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
100 |
+
if (Reflect.construct.sham) return false;
|
101 |
+
if (typeof Proxy === "function") return true;
|
102 |
+
|
103 |
+
try {
|
104 |
+
Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));
|
105 |
+
return true;
|
106 |
+
} catch (e) {
|
107 |
+
return false;
|
108 |
+
}
|
109 |
+
}
|
110 |
+
|
111 |
+
function _construct(Parent, args, Class) {
|
112 |
+
if (_isNativeReflectConstruct()) {
|
113 |
+
_construct = Reflect.construct;
|
114 |
+
} else {
|
115 |
+
_construct = function _construct(Parent, args, Class) {
|
116 |
+
var a = [null];
|
117 |
+
a.push.apply(a, args);
|
118 |
+
var Constructor = Function.bind.apply(Parent, a);
|
119 |
+
var instance = new Constructor();
|
120 |
+
if (Class) _setPrototypeOf(instance, Class.prototype);
|
121 |
+
return instance;
|
122 |
+
};
|
123 |
+
}
|
124 |
+
|
125 |
+
return _construct.apply(null, arguments);
|
126 |
+
}
|
127 |
+
|
128 |
+
function _assertThisInitialized(self) {
|
129 |
+
if (self === void 0) {
|
130 |
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
131 |
+
}
|
132 |
+
|
133 |
+
return self;
|
134 |
+
}
|
135 |
+
|
136 |
+
function _possibleConstructorReturn(self, call) {
|
137 |
+
if (call && (typeof call === "object" || typeof call === "function")) {
|
138 |
+
return call;
|
139 |
+
}
|
140 |
+
|
141 |
+
return _assertThisInitialized(self);
|
142 |
+
}
|
143 |
+
|
144 |
+
function _createSuper(Derived) {
|
145 |
+
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
146 |
+
|
147 |
+
return function _createSuperInternal() {
|
148 |
+
var Super = _getPrototypeOf(Derived),
|
149 |
+
result;
|
150 |
+
|
151 |
+
if (hasNativeReflectConstruct) {
|
152 |
+
var NewTarget = _getPrototypeOf(this).constructor;
|
153 |
+
|
154 |
+
result = Reflect.construct(Super, arguments, NewTarget);
|
155 |
+
} else {
|
156 |
+
result = Super.apply(this, arguments);
|
157 |
+
}
|
158 |
+
|
159 |
+
return _possibleConstructorReturn(this, result);
|
160 |
+
};
|
161 |
+
}
|
162 |
+
|
163 |
+
function _superPropBase(object, property) {
|
164 |
+
while (!Object.prototype.hasOwnProperty.call(object, property)) {
|
165 |
+
object = _getPrototypeOf(object);
|
166 |
+
if (object === null) break;
|
167 |
+
}
|
168 |
+
|
169 |
+
return object;
|
170 |
+
}
|
171 |
+
|
172 |
+
function _get(target, property, receiver) {
|
173 |
+
if (typeof Reflect !== "undefined" && Reflect.get) {
|
174 |
+
_get = Reflect.get;
|
175 |
+
} else {
|
176 |
+
_get = function _get(target, property, receiver) {
|
177 |
+
var base = _superPropBase(target, property);
|
178 |
+
|
179 |
+
if (!base) return;
|
180 |
+
var desc = Object.getOwnPropertyDescriptor(base, property);
|
181 |
+
|
182 |
+
if (desc.get) {
|
183 |
+
return desc.get.call(receiver);
|
184 |
+
}
|
185 |
+
|
186 |
+
return desc.value;
|
187 |
+
};
|
188 |
+
}
|
189 |
+
|
190 |
+
return _get(target, property, receiver || target);
|
191 |
+
}
|
192 |
+
|
193 |
+
var consolePrefix = 'SweetAlert2:';
|
194 |
+
/**
|
195 |
+
* Filter the unique values into a new array
|
196 |
+
* @param arr
|
197 |
+
*/
|
198 |
+
|
199 |
+
var uniqueArray = function uniqueArray(arr) {
|
200 |
+
var result = [];
|
201 |
+
|
202 |
+
for (var i = 0; i < arr.length; i++) {
|
203 |
+
if (result.indexOf(arr[i]) === -1) {
|
204 |
+
result.push(arr[i]);
|
205 |
+
}
|
206 |
+
}
|
207 |
+
|
208 |
+
return result;
|
209 |
+
};
|
210 |
+
/**
|
211 |
+
* Capitalize the first letter of a string
|
212 |
+
* @param str
|
213 |
+
*/
|
214 |
+
|
215 |
+
var capitalizeFirstLetter = function capitalizeFirstLetter(str) {
|
216 |
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
217 |
+
};
|
218 |
+
/**
|
219 |
+
* Returns the array of object values (Object.values isn't supported in IE11)
|
220 |
+
* @param obj
|
221 |
+
*/
|
222 |
+
|
223 |
+
var objectValues = function objectValues(obj) {
|
224 |
+
return Object.keys(obj).map(function (key) {
|
225 |
+
return obj[key];
|
226 |
+
});
|
227 |
+
};
|
228 |
+
/**
|
229 |
+
* Convert NodeList to Array
|
230 |
+
* @param nodeList
|
231 |
+
*/
|
232 |
+
|
233 |
+
var toArray = function toArray(nodeList) {
|
234 |
+
return Array.prototype.slice.call(nodeList);
|
235 |
+
};
|
236 |
+
/**
|
237 |
+
* Standardise console warnings
|
238 |
+
* @param message
|
239 |
+
*/
|
240 |
+
|
241 |
+
var warn = function warn(message) {
|
242 |
+
console.warn("".concat(consolePrefix, " ").concat(message));
|
243 |
+
};
|
244 |
+
/**
|
245 |
+
* Standardise console errors
|
246 |
+
* @param message
|
247 |
+
*/
|
248 |
+
|
249 |
+
var error = function error(message) {
|
250 |
+
console.error("".concat(consolePrefix, " ").concat(message));
|
251 |
+
};
|
252 |
+
/**
|
253 |
+
* Private global state for `warnOnce`
|
254 |
+
* @type {Array}
|
255 |
+
* @private
|
256 |
+
*/
|
257 |
+
|
258 |
+
var previousWarnOnceMessages = [];
|
259 |
+
/**
|
260 |
+
* Show a console warning, but only if it hasn't already been shown
|
261 |
+
* @param message
|
262 |
+
*/
|
263 |
+
|
264 |
+
var warnOnce = function warnOnce(message) {
|
265 |
+
if (!(previousWarnOnceMessages.indexOf(message) !== -1)) {
|
266 |
+
previousWarnOnceMessages.push(message);
|
267 |
+
warn(message);
|
268 |
+
}
|
269 |
+
};
|
270 |
+
/**
|
271 |
+
* Show a one-time console warning about deprecated params/methods
|
272 |
+
*/
|
273 |
+
|
274 |
+
var warnAboutDeprecation = function warnAboutDeprecation(deprecatedParam, useInstead) {
|
275 |
+
warnOnce("\"".concat(deprecatedParam, "\" is deprecated and will be removed in the next major release. Please use \"").concat(useInstead, "\" instead."));
|
276 |
+
};
|
277 |
+
/**
|
278 |
+
* If `arg` is a function, call it (with no arguments or context) and return the result.
|
279 |
+
* Otherwise, just pass the value through
|
280 |
+
* @param arg
|
281 |
+
*/
|
282 |
+
|
283 |
+
var callIfFunction = function callIfFunction(arg) {
|
284 |
+
return typeof arg === 'function' ? arg() : arg;
|
285 |
+
};
|
286 |
+
var hasToPromiseFn = function hasToPromiseFn(arg) {
|
287 |
+
return arg && typeof arg.toPromise === 'function';
|
288 |
+
};
|
289 |
+
var asPromise = function asPromise(arg) {
|
290 |
+
return hasToPromiseFn(arg) ? arg.toPromise() : Promise.resolve(arg);
|
291 |
+
};
|
292 |
+
var isPromise = function isPromise(arg) {
|
293 |
+
return arg && Promise.resolve(arg) === arg;
|
294 |
+
};
|
295 |
+
|
296 |
+
var DismissReason = Object.freeze({
|
297 |
+
cancel: 'cancel',
|
298 |
+
backdrop: 'backdrop',
|
299 |
+
close: 'close',
|
300 |
+
esc: 'esc',
|
301 |
+
timer: 'timer'
|
302 |
+
});
|
303 |
+
|
304 |
+
var isJqueryElement = function isJqueryElement(elem) {
|
305 |
+
return _typeof(elem) === 'object' && elem.jquery;
|
306 |
+
};
|
307 |
+
|
308 |
+
var isElement = function isElement(elem) {
|
309 |
+
return elem instanceof Element || isJqueryElement(elem);
|
310 |
+
};
|
311 |
+
|
312 |
+
var argsToParams = function argsToParams(args) {
|
313 |
+
var params = {};
|
314 |
+
|
315 |
+
if (_typeof(args[0]) === 'object' && !isElement(args[0])) {
|
316 |
+
_extends(params, args[0]);
|
317 |
+
} else {
|
318 |
+
['title', 'html', 'icon'].forEach(function (name, index) {
|
319 |
+
var arg = args[index];
|
320 |
+
|
321 |
+
if (typeof arg === 'string' || isElement(arg)) {
|
322 |
+
params[name] = arg;
|
323 |
+
} else if (arg !== undefined) {
|
324 |
+
error("Unexpected type of ".concat(name, "! Expected \"string\" or \"Element\", got ").concat(_typeof(arg)));
|
325 |
+
}
|
326 |
+
});
|
327 |
+
}
|
328 |
+
|
329 |
+
return params;
|
330 |
+
};
|
331 |
+
|
332 |
+
var swalPrefix = 'swal2-';
|
333 |
+
var prefix = function prefix(items) {
|
334 |
+
var result = {};
|
335 |
+
|
336 |
+
for (var i in items) {
|
337 |
+
result[items[i]] = swalPrefix + items[i];
|
338 |
+
}
|
339 |
+
|
340 |
+
return result;
|
341 |
+
};
|
342 |
+
var swalClasses = prefix(['container', 'shown', 'height-auto', 'iosfix', 'popup', 'modal', 'no-backdrop', 'no-transition', 'toast', 'toast-shown', 'toast-column', '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']);
|
343 |
+
var iconTypes = prefix(['success', 'warning', 'info', 'question', 'error']);
|
344 |
+
|
345 |
+
var getContainer = function getContainer() {
|
346 |
+
return document.body.querySelector(".".concat(swalClasses.container));
|
347 |
+
};
|
348 |
+
var elementBySelector = function elementBySelector(selectorString) {
|
349 |
+
var container = getContainer();
|
350 |
+
return container ? container.querySelector(selectorString) : null;
|
351 |
+
};
|
352 |
+
|
353 |
+
var elementByClass = function elementByClass(className) {
|
354 |
+
return elementBySelector(".".concat(className));
|
355 |
+
};
|
356 |
+
|
357 |
+
var getPopup = function getPopup() {
|
358 |
+
return elementByClass(swalClasses.popup);
|
359 |
+
};
|
360 |
+
var getIcons = function getIcons() {
|
361 |
+
var popup = getPopup();
|
362 |
+
return toArray(popup.querySelectorAll(".".concat(swalClasses.icon)));
|
363 |
+
};
|
364 |
+
var getIcon = function getIcon() {
|
365 |
+
var visibleIcon = getIcons().filter(function (icon) {
|
366 |
+
return isVisible(icon);
|
367 |
+
});
|
368 |
+
return visibleIcon.length ? visibleIcon[0] : null;
|
369 |
+
};
|
370 |
+
var getTitle = function getTitle() {
|
371 |
+
return elementByClass(swalClasses.title);
|
372 |
+
};
|
373 |
+
var getContent = function getContent() {
|
374 |
+
return elementByClass(swalClasses.content);
|
375 |
+
};
|
376 |
+
var getHtmlContainer = function getHtmlContainer() {
|
377 |
+
return elementByClass(swalClasses['html-container']);
|
378 |
+
};
|
379 |
+
var getImage = function getImage() {
|
380 |
+
return elementByClass(swalClasses.image);
|
381 |
+
};
|
382 |
+
var getProgressSteps = function getProgressSteps() {
|
383 |
+
return elementByClass(swalClasses['progress-steps']);
|
384 |
+
};
|
385 |
+
var getValidationMessage = function getValidationMessage() {
|
386 |
+
return elementByClass(swalClasses['validation-message']);
|
387 |
+
};
|
388 |
+
var getConfirmButton = function getConfirmButton() {
|
389 |
+
return elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.confirm));
|
390 |
+
};
|
391 |
+
var getDenyButton = function getDenyButton() {
|
392 |
+
return elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.deny));
|
393 |
+
};
|
394 |
+
var getInputLabel = function getInputLabel() {
|
395 |
+
return elementByClass(swalClasses['input-label']);
|
396 |
+
};
|
397 |
+
var getLoader = function getLoader() {
|
398 |
+
return elementBySelector(".".concat(swalClasses.loader));
|
399 |
+
};
|
400 |
+
var getCancelButton = function getCancelButton() {
|
401 |
+
return elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.cancel));
|
402 |
+
};
|
403 |
+
var getActions = function getActions() {
|
404 |
+
return elementByClass(swalClasses.actions);
|
405 |
+
};
|
406 |
+
var getHeader = function getHeader() {
|
407 |
+
return elementByClass(swalClasses.header);
|
408 |
+
};
|
409 |
+
var getFooter = function getFooter() {
|
410 |
+
return elementByClass(swalClasses.footer);
|
411 |
+
};
|
412 |
+
var getTimerProgressBar = function getTimerProgressBar() {
|
413 |
+
return elementByClass(swalClasses['timer-progress-bar']);
|
414 |
+
};
|
415 |
+
var getCloseButton = function getCloseButton() {
|
416 |
+
return elementByClass(swalClasses.close);
|
417 |
+
}; // https://github.com/jkup/focusable/blob/master/index.js
|
418 |
+
|
419 |
+
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";
|
420 |
+
var getFocusableElements = function getFocusableElements() {
|
421 |
+
var focusableElementsWithTabindex = toArray(getPopup().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')) // sort according to tabindex
|
422 |
+
.sort(function (a, b) {
|
423 |
+
a = parseInt(a.getAttribute('tabindex'));
|
424 |
+
b = parseInt(b.getAttribute('tabindex'));
|
425 |
+
|
426 |
+
if (a > b) {
|
427 |
+
return 1;
|
428 |
+
} else if (a < b) {
|
429 |
+
return -1;
|
430 |
+
}
|
431 |
+
|
432 |
+
return 0;
|
433 |
+
});
|
434 |
+
var otherFocusableElements = toArray(getPopup().querySelectorAll(focusable)).filter(function (el) {
|
435 |
+
return el.getAttribute('tabindex') !== '-1';
|
436 |
+
});
|
437 |
+
return uniqueArray(focusableElementsWithTabindex.concat(otherFocusableElements)).filter(function (el) {
|
438 |
+
return isVisible(el);
|
439 |
+
});
|
440 |
+
};
|
441 |
+
var isModal = function isModal() {
|
442 |
+
return !isToast() && !document.body.classList.contains(swalClasses['no-backdrop']);
|
443 |
+
};
|
444 |
+
var isToast = function isToast() {
|
445 |
+
return document.body.classList.contains(swalClasses['toast-shown']);
|
446 |
+
};
|
447 |
+
var isLoading = function isLoading() {
|
448 |
+
return getPopup().hasAttribute('data-loading');
|
449 |
+
};
|
450 |
+
|
451 |
+
var states = {
|
452 |
+
previousBodyPadding: null
|
453 |
+
};
|
454 |
+
var setInnerHtml = function setInnerHtml(elem, html) {
|
455 |
+
// #1926
|
456 |
+
elem.textContent = '';
|
457 |
+
|
458 |
+
if (html) {
|
459 |
+
var parser = new DOMParser();
|
460 |
+
var parsed = parser.parseFromString(html, "text/html");
|
461 |
+
toArray(parsed.querySelector('head').childNodes).forEach(function (child) {
|
462 |
+
elem.appendChild(child);
|
463 |
+
});
|
464 |
+
toArray(parsed.querySelector('body').childNodes).forEach(function (child) {
|
465 |
+
elem.appendChild(child);
|
466 |
+
});
|
467 |
+
}
|
468 |
+
};
|
469 |
+
var hasClass = function hasClass(elem, className) {
|
470 |
+
if (!className) {
|
471 |
+
return false;
|
472 |
+
}
|
473 |
+
|
474 |
+
var classList = className.split(/\s+/);
|
475 |
+
|
476 |
+
for (var i = 0; i < classList.length; i++) {
|
477 |
+
if (!elem.classList.contains(classList[i])) {
|
478 |
+
return false;
|
479 |
+
}
|
480 |
+
}
|
481 |
+
|
482 |
+
return true;
|
483 |
+
};
|
484 |
+
|
485 |
+
var removeCustomClasses = function removeCustomClasses(elem, params) {
|
486 |
+
toArray(elem.classList).forEach(function (className) {
|
487 |
+
if (!(objectValues(swalClasses).indexOf(className) !== -1) && !(objectValues(iconTypes).indexOf(className) !== -1) && !(objectValues(params.showClass).indexOf(className) !== -1)) {
|
488 |
+
elem.classList.remove(className);
|
489 |
+
}
|
490 |
+
});
|
491 |
+
};
|
492 |
+
|
493 |
+
var applyCustomClass = function applyCustomClass(elem, params, className) {
|
494 |
+
removeCustomClasses(elem, params);
|
495 |
+
|
496 |
+
if (params.customClass && params.customClass[className]) {
|
497 |
+
if (typeof params.customClass[className] !== 'string' && !params.customClass[className].forEach) {
|
498 |
+
return warn("Invalid type of customClass.".concat(className, "! Expected string or iterable object, got \"").concat(_typeof(params.customClass[className]), "\""));
|
499 |
+
}
|
500 |
+
|
501 |
+
addClass(elem, params.customClass[className]);
|
502 |
+
}
|
503 |
+
};
|
504 |
+
function getInput(content, inputType) {
|
505 |
+
if (!inputType) {
|
506 |
+
return null;
|
507 |
+
}
|
508 |
+
|
509 |
+
switch (inputType) {
|
510 |
+
case 'select':
|
511 |
+
case 'textarea':
|
512 |
+
case 'file':
|
513 |
+
return getChildByClass(content, swalClasses[inputType]);
|
514 |
+
|
515 |
+
case 'checkbox':
|
516 |
+
return content.querySelector(".".concat(swalClasses.checkbox, " input"));
|
517 |
+
|
518 |
+
case 'radio':
|
519 |
+
return content.querySelector(".".concat(swalClasses.radio, " input:checked")) || content.querySelector(".".concat(swalClasses.radio, " input:first-child"));
|
520 |
+
|
521 |
+
case 'range':
|
522 |
+
return content.querySelector(".".concat(swalClasses.range, " input"));
|
523 |
+
|
524 |
+
default:
|
525 |
+
return getChildByClass(content, swalClasses.input);
|
526 |
+
}
|
527 |
+
}
|
528 |
+
var focusInput = function focusInput(input) {
|
529 |
+
input.focus(); // place cursor at end of text in text input
|
530 |
+
|
531 |
+
if (input.type !== 'file') {
|
532 |
+
// http://stackoverflow.com/a/2345915
|
533 |
+
var val = input.value;
|
534 |
+
input.value = '';
|
535 |
+
input.value = val;
|
536 |
+
}
|
537 |
+
};
|
538 |
+
var toggleClass = function toggleClass(target, classList, condition) {
|
539 |
+
if (!target || !classList) {
|
540 |
+
return;
|
541 |
+
}
|
542 |
+
|
543 |
+
if (typeof classList === 'string') {
|
544 |
+
classList = classList.split(/\s+/).filter(Boolean);
|
545 |
+
}
|
546 |
+
|
547 |
+
classList.forEach(function (className) {
|
548 |
+
if (target.forEach) {
|
549 |
+
target.forEach(function (elem) {
|
550 |
+
condition ? elem.classList.add(className) : elem.classList.remove(className);
|
551 |
+
});
|
552 |
+
} else {
|
553 |
+
condition ? target.classList.add(className) : target.classList.remove(className);
|
554 |
+
}
|
555 |
+
});
|
556 |
+
};
|
557 |
+
var addClass = function addClass(target, classList) {
|
558 |
+
toggleClass(target, classList, true);
|
559 |
+
};
|
560 |
+
var removeClass = function removeClass(target, classList) {
|
561 |
+
toggleClass(target, classList, false);
|
562 |
+
};
|
563 |
+
var getChildByClass = function getChildByClass(elem, className) {
|
564 |
+
for (var i = 0; i < elem.childNodes.length; i++) {
|
565 |
+
if (hasClass(elem.childNodes[i], className)) {
|
566 |
+
return elem.childNodes[i];
|
567 |
+
}
|
568 |
+
}
|
569 |
+
};
|
570 |
+
var applyNumericalStyle = function applyNumericalStyle(elem, property, value) {
|
571 |
+
if (value || parseInt(value) === 0) {
|
572 |
+
elem.style[property] = typeof value === 'number' ? "".concat(value, "px") : value;
|
573 |
+
} else {
|
574 |
+
elem.style.removeProperty(property);
|
575 |
+
}
|
576 |
+
};
|
577 |
+
var show = function show(elem) {
|
578 |
+
var display = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'flex';
|
579 |
+
elem.style.display = display;
|
580 |
+
};
|
581 |
+
var hide = function hide(elem) {
|
582 |
+
elem.style.display = 'none';
|
583 |
+
};
|
584 |
+
var setStyle = function setStyle(parent, selector, property, value) {
|
585 |
+
var el = parent.querySelector(selector);
|
586 |
+
|
587 |
+
if (el) {
|
588 |
+
el.style[property] = value;
|
589 |
+
}
|
590 |
+
};
|
591 |
+
var toggle = function toggle(elem, condition, display) {
|
592 |
+
condition ? show(elem, display) : hide(elem);
|
593 |
+
}; // borrowed from jquery $(elem).is(':visible') implementation
|
594 |
+
|
595 |
+
var isVisible = function isVisible(elem) {
|
596 |
+
return !!(elem && (elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length));
|
597 |
+
};
|
598 |
+
/* istanbul ignore next */
|
599 |
+
|
600 |
+
var isScrollable = function isScrollable(elem) {
|
601 |
+
return !!(elem.scrollHeight > elem.clientHeight);
|
602 |
+
}; // borrowed from https://stackoverflow.com/a/46352119
|
603 |
+
|
604 |
+
var hasCssAnimation = function hasCssAnimation(elem) {
|
605 |
+
var style = window.getComputedStyle(elem);
|
606 |
+
var animDuration = parseFloat(style.getPropertyValue('animation-duration') || '0');
|
607 |
+
var transDuration = parseFloat(style.getPropertyValue('transition-duration') || '0');
|
608 |
+
return animDuration > 0 || transDuration > 0;
|
609 |
+
};
|
610 |
+
var contains = function contains(haystack, needle) {
|
611 |
+
if (typeof haystack.contains === 'function') {
|
612 |
+
return haystack.contains(needle);
|
613 |
+
}
|
614 |
+
};
|
615 |
+
var animateTimerProgressBar = function animateTimerProgressBar(timer) {
|
616 |
+
var reset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
617 |
+
var timerProgressBar = getTimerProgressBar();
|
618 |
+
|
619 |
+
if (isVisible(timerProgressBar)) {
|
620 |
+
if (reset) {
|
621 |
+
timerProgressBar.style.transition = 'none';
|
622 |
+
timerProgressBar.style.width = '100%';
|
623 |
+
}
|
624 |
+
|
625 |
+
setTimeout(function () {
|
626 |
+
timerProgressBar.style.transition = "width ".concat(timer / 1000, "s linear");
|
627 |
+
timerProgressBar.style.width = '0%';
|
628 |
+
}, 10);
|
629 |
+
}
|
630 |
+
};
|
631 |
+
var stopTimerProgressBar = function stopTimerProgressBar() {
|
632 |
+
var timerProgressBar = getTimerProgressBar();
|
633 |
+
var timerProgressBarWidth = parseInt(window.getComputedStyle(timerProgressBar).width);
|
634 |
+
timerProgressBar.style.removeProperty('transition');
|
635 |
+
timerProgressBar.style.width = '100%';
|
636 |
+
var timerProgressBarFullWidth = parseInt(window.getComputedStyle(timerProgressBar).width);
|
637 |
+
var timerProgressBarPercent = parseInt(timerProgressBarWidth / timerProgressBarFullWidth * 100);
|
638 |
+
timerProgressBar.style.removeProperty('transition');
|
639 |
+
timerProgressBar.style.width = "".concat(timerProgressBarPercent, "%");
|
640 |
+
};
|
641 |
+
|
642 |
+
// Detect Node env
|
643 |
+
var isNodeEnv = function isNodeEnv() {
|
644 |
+
return typeof window === 'undefined' || typeof document === 'undefined';
|
645 |
+
};
|
646 |
+
|
647 |
+
var sweetHTML = "\n <div aria-labelledby=\"".concat(swalClasses.title, "\" aria-describedby=\"").concat(swalClasses.content, "\" class=\"").concat(swalClasses.popup, "\" tabindex=\"-1\">\n <div class=\"").concat(swalClasses.header, "\">\n <ul class=\"").concat(swalClasses['progress-steps'], "\"></ul>\n <div class=\"").concat(swalClasses.icon, " ").concat(iconTypes.error, "\"></div>\n <div class=\"").concat(swalClasses.icon, " ").concat(iconTypes.question, "\"></div>\n <div class=\"").concat(swalClasses.icon, " ").concat(iconTypes.warning, "\"></div>\n <div class=\"").concat(swalClasses.icon, " ").concat(iconTypes.info, "\"></div>\n <div class=\"").concat(swalClasses.icon, " ").concat(iconTypes.success, "\"></div>\n <img class=\"").concat(swalClasses.image, "\" />\n <h2 class=\"").concat(swalClasses.title, "\" id=\"").concat(swalClasses.title, "\"></h2>\n <button type=\"button\" class=\"").concat(swalClasses.close, "\"></button>\n </div>\n <div class=\"").concat(swalClasses.content, "\">\n <div id=\"").concat(swalClasses.content, "\" class=\"").concat(swalClasses['html-container'], "\"></div>\n <input class=\"").concat(swalClasses.input, "\" />\n <input type=\"file\" class=\"").concat(swalClasses.file, "\" />\n <div class=\"").concat(swalClasses.range, "\">\n <input type=\"range\" />\n <output></output>\n </div>\n <select class=\"").concat(swalClasses.select, "\"></select>\n <div class=\"").concat(swalClasses.radio, "\"></div>\n <label for=\"").concat(swalClasses.checkbox, "\" class=\"").concat(swalClasses.checkbox, "\">\n <input type=\"checkbox\" />\n <span class=\"").concat(swalClasses.label, "\"></span>\n </label>\n <textarea class=\"").concat(swalClasses.textarea, "\"></textarea>\n <div class=\"").concat(swalClasses['validation-message'], "\" id=\"").concat(swalClasses['validation-message'], "\"></div>\n </div>\n <div class=\"").concat(swalClasses.actions, "\">\n <div class=\"").concat(swalClasses.loader, "\"></div>\n <button type=\"button\" class=\"").concat(swalClasses.confirm, "\"></button>\n <button type=\"button\" class=\"").concat(swalClasses.deny, "\"></button>\n <button type=\"button\" class=\"").concat(swalClasses.cancel, "\"></button>\n </div>\n <div class=\"").concat(swalClasses.footer, "\"></div>\n <div class=\"").concat(swalClasses['timer-progress-bar-container'], "\">\n <div class=\"").concat(swalClasses['timer-progress-bar'], "\"></div>\n </div>\n </div>\n").replace(/(^|\n)\s*/g, '');
|
648 |
+
|
649 |
+
var resetOldContainer = function resetOldContainer() {
|
650 |
+
var oldContainer = getContainer();
|
651 |
+
|
652 |
+
if (!oldContainer) {
|
653 |
+
return false;
|
654 |
+
}
|
655 |
+
|
656 |
+
oldContainer.parentNode.removeChild(oldContainer);
|
657 |
+
removeClass([document.documentElement, document.body], [swalClasses['no-backdrop'], swalClasses['toast-shown'], swalClasses['has-column']]);
|
658 |
+
return true;
|
659 |
+
};
|
660 |
+
|
661 |
+
var oldInputVal; // IE11 workaround, see #1109 for details
|
662 |
+
|
663 |
+
var resetValidationMessage = function resetValidationMessage(e) {
|
664 |
+
if (Swal.isVisible() && oldInputVal !== e.target.value) {
|
665 |
+
Swal.resetValidationMessage();
|
666 |
+
}
|
667 |
+
|
668 |
+
oldInputVal = e.target.value;
|
669 |
+
};
|
670 |
+
|
671 |
+
var addInputChangeListeners = function addInputChangeListeners() {
|
672 |
+
var content = getContent();
|
673 |
+
var input = getChildByClass(content, swalClasses.input);
|
674 |
+
var file = getChildByClass(content, swalClasses.file);
|
675 |
+
var range = content.querySelector(".".concat(swalClasses.range, " input"));
|
676 |
+
var rangeOutput = content.querySelector(".".concat(swalClasses.range, " output"));
|
677 |
+
var select = getChildByClass(content, swalClasses.select);
|
678 |
+
var checkbox = content.querySelector(".".concat(swalClasses.checkbox, " input"));
|
679 |
+
var textarea = getChildByClass(content, swalClasses.textarea);
|
680 |
+
input.oninput = resetValidationMessage;
|
681 |
+
file.onchange = resetValidationMessage;
|
682 |
+
select.onchange = resetValidationMessage;
|
683 |
+
checkbox.onchange = resetValidationMessage;
|
684 |
+
textarea.oninput = resetValidationMessage;
|
685 |
+
|
686 |
+
range.oninput = function (e) {
|
687 |
+
resetValidationMessage(e);
|
688 |
+
rangeOutput.value = range.value;
|
689 |
+
};
|
690 |
+
|
691 |
+
range.onchange = function (e) {
|
692 |
+
resetValidationMessage(e);
|
693 |
+
range.nextSibling.value = range.value;
|
694 |
+
};
|
695 |
+
};
|
696 |
+
|
697 |
+
var getTarget = function getTarget(target) {
|
698 |
+
return typeof target === 'string' ? document.querySelector(target) : target;
|
699 |
+
};
|
700 |
+
|
701 |
+
var setupAccessibility = function setupAccessibility(params) {
|
702 |
+
var popup = getPopup();
|
703 |
+
popup.setAttribute('role', params.toast ? 'alert' : 'dialog');
|
704 |
+
popup.setAttribute('aria-live', params.toast ? 'polite' : 'assertive');
|
705 |
+
|
706 |
+
if (!params.toast) {
|
707 |
+
popup.setAttribute('aria-modal', 'true');
|
708 |
+
}
|
709 |
+
};
|
710 |
+
|
711 |
+
var setupRTL = function setupRTL(targetElement) {
|
712 |
+
if (window.getComputedStyle(targetElement).direction === 'rtl') {
|
713 |
+
addClass(getContainer(), swalClasses.rtl);
|
714 |
+
}
|
715 |
+
};
|
716 |
+
/*
|
717 |
+
* Add modal + backdrop to DOM
|
718 |
+
*/
|
719 |
+
|
720 |
+
|
721 |
+
var init = function init(params) {
|
722 |
+
// Clean up the old popup container if it exists
|
723 |
+
var oldContainerExisted = resetOldContainer();
|
724 |
+
/* istanbul ignore if */
|
725 |
+
|
726 |
+
if (isNodeEnv()) {
|
727 |
+
error('SweetAlert2 requires document to initialize');
|
728 |
+
return;
|
729 |
+
}
|
730 |
+
|
731 |
+
var container = document.createElement('div');
|
732 |
+
container.className = swalClasses.container;
|
733 |
+
|
734 |
+
if (oldContainerExisted) {
|
735 |
+
addClass(container, swalClasses['no-transition']);
|
736 |
+
}
|
737 |
+
|
738 |
+
setInnerHtml(container, sweetHTML);
|
739 |
+
var targetElement = getTarget(params.target);
|
740 |
+
targetElement.appendChild(container);
|
741 |
+
setupAccessibility(params);
|
742 |
+
setupRTL(targetElement);
|
743 |
+
addInputChangeListeners();
|
744 |
+
};
|
745 |
+
|
746 |
+
var parseHtmlToContainer = function parseHtmlToContainer(param, target) {
|
747 |
+
// DOM element
|
748 |
+
if (param instanceof HTMLElement) {
|
749 |
+
target.appendChild(param); // Object
|
750 |
+
} else if (_typeof(param) === 'object') {
|
751 |
+
handleObject(param, target); // Plain string
|
752 |
+
} else if (param) {
|
753 |
+
setInnerHtml(target, param);
|
754 |
+
}
|
755 |
+
};
|
756 |
+
|
757 |
+
var handleObject = function handleObject(param, target) {
|
758 |
+
// JQuery element(s)
|
759 |
+
if (param.jquery) {
|
760 |
+
handleJqueryElem(target, param); // For other objects use their string representation
|
761 |
+
} else {
|
762 |
+
setInnerHtml(target, param.toString());
|
763 |
+
}
|
764 |
+
};
|
765 |
+
|
766 |
+
var handleJqueryElem = function handleJqueryElem(target, elem) {
|
767 |
+
target.textContent = '';
|
768 |
+
|
769 |
+
if (0 in elem) {
|
770 |
+
for (var i = 0; (i in elem); i++) {
|
771 |
+
target.appendChild(elem[i].cloneNode(true));
|
772 |
+
}
|
773 |
+
} else {
|
774 |
+
target.appendChild(elem.cloneNode(true));
|
775 |
+
}
|
776 |
+
};
|
777 |
+
|
778 |
+
var animationEndEvent = function () {
|
779 |
+
// Prevent run in Node env
|
780 |
+
|
781 |
+
/* istanbul ignore if */
|
782 |
+
if (isNodeEnv()) {
|
783 |
+
return false;
|
784 |
+
}
|
785 |
+
|
786 |
+
var testEl = document.createElement('div');
|
787 |
+
var transEndEventNames = {
|
788 |
+
WebkitAnimation: 'webkitAnimationEnd',
|
789 |
+
OAnimation: 'oAnimationEnd oanimationend',
|
790 |
+
animation: 'animationend'
|
791 |
+
};
|
792 |
+
|
793 |
+
for (var i in transEndEventNames) {
|
794 |
+
if (Object.prototype.hasOwnProperty.call(transEndEventNames, i) && typeof testEl.style[i] !== 'undefined') {
|
795 |
+
return transEndEventNames[i];
|
796 |
+
}
|
797 |
+
}
|
798 |
+
|
799 |
+
return false;
|
800 |
+
}();
|
801 |
+
|
802 |
+
// https://github.com/twbs/bootstrap/blob/master/js/src/modal.js
|
803 |
+
|
804 |
+
var measureScrollbar = function measureScrollbar() {
|
805 |
+
var scrollDiv = document.createElement('div');
|
806 |
+
scrollDiv.className = swalClasses['scrollbar-measure'];
|
807 |
+
document.body.appendChild(scrollDiv);
|
808 |
+
var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth;
|
809 |
+
document.body.removeChild(scrollDiv);
|
810 |
+
return scrollbarWidth;
|
811 |
+
};
|
812 |
+
|
813 |
+
var renderActions = function renderActions(instance, params) {
|
814 |
+
var actions = getActions();
|
815 |
+
var loader = getLoader();
|
816 |
+
var confirmButton = getConfirmButton();
|
817 |
+
var denyButton = getDenyButton();
|
818 |
+
var cancelButton = getCancelButton(); // Actions (buttons) wrapper
|
819 |
+
|
820 |
+
if (!params.showConfirmButton && !params.showDenyButton && !params.showCancelButton) {
|
821 |
+
hide(actions);
|
822 |
+
} // Custom class
|
823 |
+
|
824 |
+
|
825 |
+
applyCustomClass(actions, params, 'actions'); // Render buttons
|
826 |
+
|
827 |
+
renderButton(confirmButton, 'confirm', params);
|
828 |
+
renderButton(denyButton, 'deny', params);
|
829 |
+
renderButton(cancelButton, 'cancel', params); // Loader
|
830 |
+
|
831 |
+
loader.innerHTML = params.loaderHtml;
|
832 |
+
|
833 |
+
if (params.buttonsStyling) {
|
834 |
+
handleButtonsStyling(confirmButton, denyButton, cancelButton, params);
|
835 |
+
} else {
|
836 |
+
removeClass([confirmButton, denyButton, cancelButton], swalClasses.styled);
|
837 |
+
}
|
838 |
+
|
839 |
+
if (params.reverseButtons) {
|
840 |
+
actions.insertBefore(cancelButton, loader);
|
841 |
+
actions.insertBefore(denyButton, loader);
|
842 |
+
actions.insertBefore(confirmButton, loader);
|
843 |
+
}
|
844 |
+
};
|
845 |
+
|
846 |
+
function handleButtonsStyling(confirmButton, denyButton, cancelButton, params) {
|
847 |
+
addClass([confirmButton, denyButton, cancelButton], swalClasses.styled); // Buttons background colors
|
848 |
+
|
849 |
+
if (params.confirmButtonColor) {
|
850 |
+
confirmButton.style.backgroundColor = params.confirmButtonColor;
|
851 |
+
}
|
852 |
+
|
853 |
+
if (params.denyButtonColor) {
|
854 |
+
denyButton.style.backgroundColor = params.denyButtonColor;
|
855 |
+
}
|
856 |
+
|
857 |
+
if (params.cancelButtonColor) {
|
858 |
+
cancelButton.style.backgroundColor = params.cancelButtonColor;
|
859 |
+
}
|
860 |
+
}
|
861 |
+
|
862 |
+
function renderButton(button, buttonType, params) {
|
863 |
+
toggle(button, params["show".concat(capitalizeFirstLetter(buttonType), "Button")], 'inline-block');
|
864 |
+
setInnerHtml(button, params["".concat(buttonType, "ButtonText")]); // Set caption text
|
865 |
+
|
866 |
+
button.setAttribute('aria-label', params["".concat(buttonType, "ButtonAriaLabel")]); // ARIA label
|
867 |
+
// Add buttons custom classes
|
868 |
+
|
869 |
+
button.className = swalClasses[buttonType];
|
870 |
+
applyCustomClass(button, params, "".concat(buttonType, "Button"));
|
871 |
+
addClass(button, params["".concat(buttonType, "ButtonClass")]);
|
872 |
+
}
|
873 |
+
|
874 |
+
function handleBackdropParam(container, backdrop) {
|
875 |
+
if (typeof backdrop === 'string') {
|
876 |
+
container.style.background = backdrop;
|
877 |
+
} else if (!backdrop) {
|
878 |
+
addClass([document.documentElement, document.body], swalClasses['no-backdrop']);
|
879 |
+
}
|
880 |
+
}
|
881 |
+
|
882 |
+
function handlePositionParam(container, position) {
|
883 |
+
if (position in swalClasses) {
|
884 |
+
addClass(container, swalClasses[position]);
|
885 |
+
} else {
|
886 |
+
warn('The "position" parameter is not valid, defaulting to "center"');
|
887 |
+
addClass(container, swalClasses.center);
|
888 |
+
}
|
889 |
+
}
|
890 |
+
|
891 |
+
function handleGrowParam(container, grow) {
|
892 |
+
if (grow && typeof grow === 'string') {
|
893 |
+
var growClass = "grow-".concat(grow);
|
894 |
+
|
895 |
+
if (growClass in swalClasses) {
|
896 |
+
addClass(container, swalClasses[growClass]);
|
897 |
+
}
|
898 |
+
}
|
899 |
+
}
|
900 |
+
|
901 |
+
var renderContainer = function renderContainer(instance, params) {
|
902 |
+
var container = getContainer();
|
903 |
+
|
904 |
+
if (!container) {
|
905 |
+
return;
|
906 |
+
}
|
907 |
+
|
908 |
+
handleBackdropParam(container, params.backdrop);
|
909 |
+
|
910 |
+
if (!params.backdrop && params.allowOutsideClick) {
|
911 |
+
warn('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');
|
912 |
+
}
|
913 |
+
|
914 |
+
handlePositionParam(container, params.position);
|
915 |
+
handleGrowParam(container, params.grow); // Custom class
|
916 |
+
|
917 |
+
applyCustomClass(container, params, 'container'); // Set queue step attribute for getQueueStep() method
|
918 |
+
|
919 |
+
var queueStep = document.body.getAttribute('data-swal2-queue-step');
|
920 |
+
|
921 |
+
if (queueStep) {
|
922 |
+
container.setAttribute('data-queue-step', queueStep);
|
923 |
+
document.body.removeAttribute('data-swal2-queue-step');
|
924 |
+
}
|
925 |
+
};
|
926 |
+
|
927 |
+
/**
|
928 |
+
* This module containts `WeakMap`s for each effectively-"private property" that a `Swal` has.
|
929 |
+
* For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')`
|
930 |
+
* This is the approach that Babel will probably take to implement private methods/fields
|
931 |
+
* https://github.com/tc39/proposal-private-methods
|
932 |
+
* https://github.com/babel/babel/pull/7555
|
933 |
+
* Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module*
|
934 |
+
* then we can use that language feature.
|
935 |
+
*/
|
936 |
+
var privateProps = {
|
937 |
+
promise: new WeakMap(),
|
938 |
+
innerParams: new WeakMap(),
|
939 |
+
domCache: new WeakMap()
|
940 |
+
};
|
941 |
+
|
942 |
+
var inputTypes = ['input', 'file', 'range', 'select', 'radio', 'checkbox', 'textarea'];
|
943 |
+
var renderInput = function renderInput(instance, params) {
|
944 |
+
var content = getContent();
|
945 |
+
var innerParams = privateProps.innerParams.get(instance);
|
946 |
+
var rerender = !innerParams || params.input !== innerParams.input;
|
947 |
+
inputTypes.forEach(function (inputType) {
|
948 |
+
var inputClass = swalClasses[inputType];
|
949 |
+
var inputContainer = getChildByClass(content, inputClass); // set attributes
|
950 |
+
|
951 |
+
setAttributes(inputType, params.inputAttributes); // set class
|
952 |
+
|
953 |
+
inputContainer.className = inputClass;
|
954 |
+
|
955 |
+
if (rerender) {
|
956 |
+
hide(inputContainer);
|
957 |
+
}
|
958 |
+
});
|
959 |
+
|
960 |
+
if (params.input) {
|
961 |
+
if (rerender) {
|
962 |
+
showInput(params);
|
963 |
+
} // set custom class
|
964 |
+
|
965 |
+
|
966 |
+
setCustomClass(params);
|
967 |
+
}
|
968 |
+
};
|
969 |
+
|
970 |
+
var showInput = function showInput(params) {
|
971 |
+
if (!renderInputType[params.input]) {
|
972 |
+
return error("Unexpected type of input! Expected \"text\", \"email\", \"password\", \"number\", \"tel\", \"select\", \"radio\", \"checkbox\", \"textarea\", \"file\" or \"url\", got \"".concat(params.input, "\""));
|
973 |
+
}
|
974 |
+
|
975 |
+
var inputContainer = getInputContainer(params.input);
|
976 |
+
var input = renderInputType[params.input](inputContainer, params);
|
977 |
+
show(input); // input autofocus
|
978 |
+
|
979 |
+
setTimeout(function () {
|
980 |
+
focusInput(input);
|
981 |
+
});
|
982 |
+
};
|
983 |
+
|
984 |
+
var removeAttributes = function removeAttributes(input) {
|
985 |
+
for (var i = 0; i < input.attributes.length; i++) {
|
986 |
+
var attrName = input.attributes[i].name;
|
987 |
+
|
988 |
+
if (!(['type', 'value', 'style'].indexOf(attrName) !== -1)) {
|
989 |
+
input.removeAttribute(attrName);
|
990 |
+
}
|
991 |
+
}
|
992 |
+
};
|
993 |
+
|
994 |
+
var setAttributes = function setAttributes(inputType, inputAttributes) {
|
995 |
+
var input = getInput(getContent(), inputType);
|
996 |
+
|
997 |
+
if (!input) {
|
998 |
+
return;
|
999 |
+
}
|
1000 |
+
|
1001 |
+
removeAttributes(input);
|
1002 |
+
|
1003 |
+
for (var attr in inputAttributes) {
|
1004 |
+
// Do not set a placeholder for <input type="range">
|
1005 |
+
// it'll crash Edge, #1298
|
1006 |
+
if (inputType === 'range' && attr === 'placeholder') {
|
1007 |
+
continue;
|
1008 |
+
}
|
1009 |
+
|
1010 |
+
input.setAttribute(attr, inputAttributes[attr]);
|
1011 |
+
}
|
1012 |
+
};
|
1013 |
+
|
1014 |
+
var setCustomClass = function setCustomClass(params) {
|
1015 |
+
var inputContainer = getInputContainer(params.input);
|
1016 |
+
|
1017 |
+
if (params.customClass) {
|
1018 |
+
addClass(inputContainer, params.customClass.input);
|
1019 |
+
}
|
1020 |
+
};
|
1021 |
+
|
1022 |
+
var setInputPlaceholder = function setInputPlaceholder(input, params) {
|
1023 |
+
if (!input.placeholder || params.inputPlaceholder) {
|
1024 |
+
input.placeholder = params.inputPlaceholder;
|
1025 |
+
}
|
1026 |
+
};
|
1027 |
+
|
1028 |
+
var setInputLabel = function setInputLabel(input, prependTo, params) {
|
1029 |
+
if (params.inputLabel) {
|
1030 |
+
input.id = swalClasses.input;
|
1031 |
+
var label = document.createElement('label');
|
1032 |
+
var labelClass = swalClasses['input-label'];
|
1033 |
+
label.setAttribute('for', input.id);
|
1034 |
+
label.className = labelClass;
|
1035 |
+
label.innerText = params.inputLabel;
|
1036 |
+
prependTo.insertAdjacentElement('beforebegin', label);
|
1037 |
+
}
|
1038 |
+
};
|
1039 |
+
|
1040 |
+
var getInputContainer = function getInputContainer(inputType) {
|
1041 |
+
var inputClass = swalClasses[inputType] ? swalClasses[inputType] : swalClasses.input;
|
1042 |
+
return getChildByClass(getContent(), inputClass);
|
1043 |
+
};
|
1044 |
+
|
1045 |
+
var renderInputType = {};
|
1046 |
+
|
1047 |
+
renderInputType.text = renderInputType.email = renderInputType.password = renderInputType.number = renderInputType.tel = renderInputType.url = function (input, params) {
|
1048 |
+
if (typeof params.inputValue === 'string' || typeof params.inputValue === 'number') {
|
1049 |
+
input.value = params.inputValue;
|
1050 |
+
} else if (!isPromise(params.inputValue)) {
|
1051 |
+
warn("Unexpected type of inputValue! Expected \"string\", \"number\" or \"Promise\", got \"".concat(_typeof(params.inputValue), "\""));
|
1052 |
+
}
|
1053 |
+
|
1054 |
+
setInputLabel(input, input, params);
|
1055 |
+
setInputPlaceholder(input, params);
|
1056 |
+
input.type = params.input;
|
1057 |
+
return input;
|
1058 |
+
};
|
1059 |
+
|
1060 |
+
renderInputType.file = function (input, params) {
|
1061 |
+
setInputLabel(input, input, params);
|
1062 |
+
setInputPlaceholder(input, params);
|
1063 |
+
return input;
|
1064 |
+
};
|
1065 |
+
|
1066 |
+
renderInputType.range = function (range, params) {
|
1067 |
+
var rangeInput = range.querySelector('input');
|
1068 |
+
var rangeOutput = range.querySelector('output');
|
1069 |
+
rangeInput.value = params.inputValue;
|
1070 |
+
rangeInput.type = params.input;
|
1071 |
+
rangeOutput.value = params.inputValue;
|
1072 |
+
setInputLabel(rangeInput, range, params);
|
1073 |
+
return range;
|
1074 |
+
};
|
1075 |
+
|
1076 |
+
renderInputType.select = function (select, params) {
|
1077 |
+
select.textContent = '';
|
1078 |
+
|
1079 |
+
if (params.inputPlaceholder) {
|
1080 |
+
var placeholder = document.createElement('option');
|
1081 |
+
setInnerHtml(placeholder, params.inputPlaceholder);
|
1082 |
+
placeholder.value = '';
|
1083 |
+
placeholder.disabled = true;
|
1084 |
+
placeholder.selected = true;
|
1085 |
+
select.appendChild(placeholder);
|
1086 |
+
}
|
1087 |
+
|
1088 |
+
setInputLabel(select, select, params);
|
1089 |
+
return select;
|
1090 |
+
};
|
1091 |
+
|
1092 |
+
renderInputType.radio = function (radio) {
|
1093 |
+
radio.textContent = '';
|
1094 |
+
return radio;
|
1095 |
+
};
|
1096 |
+
|
1097 |
+
renderInputType.checkbox = function (checkboxContainer, params) {
|
1098 |
+
var checkbox = getInput(getContent(), 'checkbox');
|
1099 |
+
checkbox.value = 1;
|
1100 |
+
checkbox.id = swalClasses.checkbox;
|
1101 |
+
checkbox.checked = Boolean(params.inputValue);
|
1102 |
+
var label = checkboxContainer.querySelector('span');
|
1103 |
+
setInnerHtml(label, params.inputPlaceholder);
|
1104 |
+
return checkboxContainer;
|
1105 |
+
};
|
1106 |
+
|
1107 |
+
renderInputType.textarea = function (textarea, params) {
|
1108 |
+
textarea.value = params.inputValue;
|
1109 |
+
setInputPlaceholder(textarea, params);
|
1110 |
+
setInputLabel(textarea, textarea, params);
|
1111 |
+
|
1112 |
+
if ('MutationObserver' in window) {
|
1113 |
+
// #1699
|
1114 |
+
var initialPopupWidth = parseInt(window.getComputedStyle(getPopup()).width);
|
1115 |
+
var popupPadding = parseInt(window.getComputedStyle(getPopup()).paddingLeft) + parseInt(window.getComputedStyle(getPopup()).paddingRight);
|
1116 |
+
|
1117 |
+
var outputsize = function outputsize() {
|
1118 |
+
var contentWidth = textarea.offsetWidth + popupPadding;
|
1119 |
+
|
1120 |
+
if (contentWidth > initialPopupWidth) {
|
1121 |
+
getPopup().style.width = "".concat(contentWidth, "px");
|
1122 |
+
} else {
|
1123 |
+
getPopup().style.width = null;
|
1124 |
+
}
|
1125 |
+
};
|
1126 |
+
|
1127 |
+
new MutationObserver(outputsize).observe(textarea, {
|
1128 |
+
attributes: true,
|
1129 |
+
attributeFilter: ['style']
|
1130 |
+
});
|
1131 |
+
}
|
1132 |
+
|
1133 |
+
return textarea;
|
1134 |
+
};
|
1135 |
+
|
1136 |
+
var renderContent = function renderContent(instance, params) {
|
1137 |
+
var content = getContent().querySelector("#".concat(swalClasses.content)); // Content as HTML
|
1138 |
+
|
1139 |
+
if (params.html) {
|
1140 |
+
parseHtmlToContainer(params.html, content);
|
1141 |
+
show(content, 'block'); // Content as plain text
|
1142 |
+
} else if (params.text) {
|
1143 |
+
content.textContent = params.text;
|
1144 |
+
show(content, 'block'); // No content
|
1145 |
+
} else {
|
1146 |
+
hide(content);
|
1147 |
+
}
|
1148 |
+
|
1149 |
+
renderInput(instance, params); // Custom class
|
1150 |
+
|
1151 |
+
applyCustomClass(getContent(), params, 'content');
|
1152 |
+
};
|
1153 |
+
|
1154 |
+
var renderFooter = function renderFooter(instance, params) {
|
1155 |
+
var footer = getFooter();
|
1156 |
+
toggle(footer, params.footer);
|
1157 |
+
|
1158 |
+
if (params.footer) {
|
1159 |
+
parseHtmlToContainer(params.footer, footer);
|
1160 |
+
} // Custom class
|
1161 |
+
|
1162 |
+
|
1163 |
+
applyCustomClass(footer, params, 'footer');
|
1164 |
+
};
|
1165 |
+
|
1166 |
+
var renderCloseButton = function renderCloseButton(instance, params) {
|
1167 |
+
var closeButton = getCloseButton();
|
1168 |
+
setInnerHtml(closeButton, params.closeButtonHtml); // Custom class
|
1169 |
+
|
1170 |
+
applyCustomClass(closeButton, params, 'closeButton');
|
1171 |
+
toggle(closeButton, params.showCloseButton);
|
1172 |
+
closeButton.setAttribute('aria-label', params.closeButtonAriaLabel);
|
1173 |
+
};
|
1174 |
+
|
1175 |
+
var renderIcon = function renderIcon(instance, params) {
|
1176 |
+
var innerParams = privateProps.innerParams.get(instance); // if the given icon already rendered, apply the styling without re-rendering the icon
|
1177 |
+
|
1178 |
+
if (innerParams && params.icon === innerParams.icon && getIcon()) {
|
1179 |
+
applyStyles(getIcon(), params);
|
1180 |
+
return;
|
1181 |
+
}
|
1182 |
+
|
1183 |
+
hideAllIcons();
|
1184 |
+
|
1185 |
+
if (!params.icon) {
|
1186 |
+
return;
|
1187 |
+
}
|
1188 |
+
|
1189 |
+
if (Object.keys(iconTypes).indexOf(params.icon) !== -1) {
|
1190 |
+
var icon = elementBySelector(".".concat(swalClasses.icon, ".").concat(iconTypes[params.icon]));
|
1191 |
+
show(icon); // Custom or default content
|
1192 |
+
|
1193 |
+
setContent(icon, params);
|
1194 |
+
applyStyles(icon, params); // Animate icon
|
1195 |
+
|
1196 |
+
addClass(icon, params.showClass.icon);
|
1197 |
+
} else {
|
1198 |
+
error("Unknown icon! Expected \"success\", \"error\", \"warning\", \"info\" or \"question\", got \"".concat(params.icon, "\""));
|
1199 |
+
}
|
1200 |
+
};
|
1201 |
+
|
1202 |
+
var hideAllIcons = function hideAllIcons() {
|
1203 |
+
var icons = getIcons();
|
1204 |
+
|
1205 |
+
for (var i = 0; i < icons.length; i++) {
|
1206 |
+
hide(icons[i]);
|
1207 |
+
}
|
1208 |
+
};
|
1209 |
+
|
1210 |
+
var applyStyles = function applyStyles(icon, params) {
|
1211 |
+
// Icon color
|
1212 |
+
setColor(icon, params); // Success icon background color
|
1213 |
+
|
1214 |
+
adjustSuccessIconBackgoundColor(); // Custom class
|
1215 |
+
|
1216 |
+
applyCustomClass(icon, params, 'icon');
|
1217 |
+
}; // Adjust success icon background color to match the popup background color
|
1218 |
+
|
1219 |
+
|
1220 |
+
var adjustSuccessIconBackgoundColor = function adjustSuccessIconBackgoundColor() {
|
1221 |
+
var popup = getPopup();
|
1222 |
+
var popupBackgroundColor = window.getComputedStyle(popup).getPropertyValue('background-color');
|
1223 |
+
var successIconParts = popup.querySelectorAll('[class^=swal2-success-circular-line], .swal2-success-fix');
|
1224 |
+
|
1225 |
+
for (var i = 0; i < successIconParts.length; i++) {
|
1226 |
+
successIconParts[i].style.backgroundColor = popupBackgroundColor;
|
1227 |
+
}
|
1228 |
+
};
|
1229 |
+
|
1230 |
+
var setContent = function setContent(icon, params) {
|
1231 |
+
icon.textContent = '';
|
1232 |
+
|
1233 |
+
if (params.iconHtml) {
|
1234 |
+
setInnerHtml(icon, iconContent(params.iconHtml));
|
1235 |
+
} else if (params.icon === 'success') {
|
1236 |
+
setInnerHtml(icon, "\n <div class=\"swal2-success-circular-line-left\"></div>\n <span class=\"swal2-success-line-tip\"></span> <span class=\"swal2-success-line-long\"></span>\n <div class=\"swal2-success-ring\"></div> <div class=\"swal2-success-fix\"></div>\n <div class=\"swal2-success-circular-line-right\"></div>\n ");
|
1237 |
+
} else if (params.icon === 'error') {
|
1238 |
+
setInnerHtml(icon, "\n <span class=\"swal2-x-mark\">\n <span class=\"swal2-x-mark-line-left\"></span>\n <span class=\"swal2-x-mark-line-right\"></span>\n </span>\n ");
|
1239 |
+
} else {
|
1240 |
+
var defaultIconHtml = {
|
1241 |
+
question: '?',
|
1242 |
+
warning: '!',
|
1243 |
+
info: 'i'
|
1244 |
+
};
|
1245 |
+
setInnerHtml(icon, iconContent(defaultIconHtml[params.icon]));
|
1246 |
+
}
|
1247 |
+
};
|
1248 |
+
|
1249 |
+
var setColor = function setColor(icon, params) {
|
1250 |
+
if (!params.iconColor) {
|
1251 |
+
return;
|
1252 |
+
}
|
1253 |
+
|
1254 |
+
icon.style.color = params.iconColor;
|
1255 |
+
icon.style.borderColor = params.iconColor;
|
1256 |
+
|
1257 |
+
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++) {
|
1258 |
+
var sel = _arr[_i];
|
1259 |
+
setStyle(icon, sel, 'backgroundColor', params.iconColor);
|
1260 |
+
}
|
1261 |
+
|
1262 |
+
setStyle(icon, '.swal2-success-ring', 'borderColor', params.iconColor);
|
1263 |
+
};
|
1264 |
+
|
1265 |
+
var iconContent = function iconContent(content) {
|
1266 |
+
return "<div class=\"".concat(swalClasses['icon-content'], "\">").concat(content, "</div>");
|
1267 |
+
};
|
1268 |
+
|
1269 |
+
var renderImage = function renderImage(instance, params) {
|
1270 |
+
var image = getImage();
|
1271 |
+
|
1272 |
+
if (!params.imageUrl) {
|
1273 |
+
return hide(image);
|
1274 |
+
}
|
1275 |
+
|
1276 |
+
show(image, ''); // Src, alt
|
1277 |
+
|
1278 |
+
image.setAttribute('src', params.imageUrl);
|
1279 |
+
image.setAttribute('alt', params.imageAlt); // Width, height
|
1280 |
+
|
1281 |
+
applyNumericalStyle(image, 'width', params.imageWidth);
|
1282 |
+
applyNumericalStyle(image, 'height', params.imageHeight); // Class
|
1283 |
+
|
1284 |
+
image.className = swalClasses.image;
|
1285 |
+
applyCustomClass(image, params, 'image');
|
1286 |
+
};
|
1287 |
+
|
1288 |
+
var currentSteps = [];
|
1289 |
+
/*
|
1290 |
+
* Global function for chaining sweetAlert popups
|
1291 |
+
*/
|
1292 |
+
|
1293 |
+
var queue = function queue(steps) {
|
1294 |
+
var Swal = this;
|
1295 |
+
currentSteps = steps;
|
1296 |
+
|
1297 |
+
var resetAndResolve = function resetAndResolve(resolve, value) {
|
1298 |
+
currentSteps = [];
|
1299 |
+
resolve(value);
|
1300 |
+
};
|
1301 |
+
|
1302 |
+
var queueResult = [];
|
1303 |
+
return new Promise(function (resolve) {
|
1304 |
+
(function step(i, callback) {
|
1305 |
+
if (i < currentSteps.length) {
|
1306 |
+
document.body.setAttribute('data-swal2-queue-step', i);
|
1307 |
+
Swal.fire(currentSteps[i]).then(function (result) {
|
1308 |
+
if (typeof result.value !== 'undefined') {
|
1309 |
+
queueResult.push(result.value);
|
1310 |
+
step(i + 1, callback);
|
1311 |
+
} else {
|
1312 |
+
resetAndResolve(resolve, {
|
1313 |
+
dismiss: result.dismiss
|
1314 |
+
});
|
1315 |
+
}
|
1316 |
+
});
|
1317 |
+
} else {
|
1318 |
+
resetAndResolve(resolve, {
|
1319 |
+
value: queueResult
|
1320 |
+
});
|
1321 |
+
}
|
1322 |
+
})(0);
|
1323 |
+
});
|
1324 |
+
};
|
1325 |
+
/*
|
1326 |
+
* Global function for getting the index of current popup in queue
|
1327 |
+
*/
|
1328 |
+
|
1329 |
+
var getQueueStep = function getQueueStep() {
|
1330 |
+
return getContainer() && getContainer().getAttribute('data-queue-step');
|
1331 |
+
};
|
1332 |
+
/*
|
1333 |
+
* Global function for inserting a popup to the queue
|
1334 |
+
*/
|
1335 |
+
|
1336 |
+
var insertQueueStep = function insertQueueStep(step, index) {
|
1337 |
+
if (index && index < currentSteps.length) {
|
1338 |
+
return currentSteps.splice(index, 0, step);
|
1339 |
+
}
|
1340 |
+
|
1341 |
+
return currentSteps.push(step);
|
1342 |
+
};
|
1343 |
+
/*
|
1344 |
+
* Global function for deleting a popup from the queue
|
1345 |
+
*/
|
1346 |
+
|
1347 |
+
var deleteQueueStep = function deleteQueueStep(index) {
|
1348 |
+
if (typeof currentSteps[index] !== 'undefined') {
|
1349 |
+
currentSteps.splice(index, 1);
|
1350 |
+
}
|
1351 |
+
};
|
1352 |
+
|
1353 |
+
var createStepElement = function createStepElement(step) {
|
1354 |
+
var stepEl = document.createElement('li');
|
1355 |
+
addClass(stepEl, swalClasses['progress-step']);
|
1356 |
+
setInnerHtml(stepEl, step);
|
1357 |
+
return stepEl;
|
1358 |
+
};
|
1359 |
+
|
1360 |
+
var createLineElement = function createLineElement(params) {
|
1361 |
+
var lineEl = document.createElement('li');
|
1362 |
+
addClass(lineEl, swalClasses['progress-step-line']);
|
1363 |
+
|
1364 |
+
if (params.progressStepsDistance) {
|
1365 |
+
lineEl.style.width = params.progressStepsDistance;
|
1366 |
+
}
|
1367 |
+
|
1368 |
+
return lineEl;
|
1369 |
+
};
|
1370 |
+
|
1371 |
+
var renderProgressSteps = function renderProgressSteps(instance, params) {
|
1372 |
+
var progressStepsContainer = getProgressSteps();
|
1373 |
+
|
1374 |
+
if (!params.progressSteps || params.progressSteps.length === 0) {
|
1375 |
+
return hide(progressStepsContainer);
|
1376 |
+
}
|
1377 |
+
|
1378 |
+
show(progressStepsContainer);
|
1379 |
+
progressStepsContainer.textContent = '';
|
1380 |
+
var currentProgressStep = parseInt(params.currentProgressStep === undefined ? getQueueStep() : params.currentProgressStep);
|
1381 |
+
|
1382 |
+
if (currentProgressStep >= params.progressSteps.length) {
|
1383 |
+
warn('Invalid currentProgressStep parameter, it should be less than progressSteps.length ' + '(currentProgressStep like JS arrays starts from 0)');
|
1384 |
+
}
|
1385 |
+
|
1386 |
+
params.progressSteps.forEach(function (step, index) {
|
1387 |
+
var stepEl = createStepElement(step);
|
1388 |
+
progressStepsContainer.appendChild(stepEl);
|
1389 |
+
|
1390 |
+
if (index === currentProgressStep) {
|
1391 |
+
addClass(stepEl, swalClasses['active-progress-step']);
|
1392 |
+
}
|
1393 |
+
|
1394 |
+
if (index !== params.progressSteps.length - 1) {
|
1395 |
+
var lineEl = createLineElement(params);
|
1396 |
+
progressStepsContainer.appendChild(lineEl);
|
1397 |
+
}
|
1398 |
+
});
|
1399 |
+
};
|
1400 |
+
|
1401 |
+
var renderTitle = function renderTitle(instance, params) {
|
1402 |
+
var title = getTitle();
|
1403 |
+
toggle(title, params.title || params.titleText);
|
1404 |
+
|
1405 |
+
if (params.title) {
|
1406 |
+
parseHtmlToContainer(params.title, title);
|
1407 |
+
}
|
1408 |
+
|
1409 |
+
if (params.titleText) {
|
1410 |
+
title.innerText = params.titleText;
|
1411 |
+
} // Custom class
|
1412 |
+
|
1413 |
+
|
1414 |
+
applyCustomClass(title, params, 'title');
|
1415 |
+
};
|
1416 |
+
|
1417 |
+
var renderHeader = function renderHeader(instance, params) {
|
1418 |
+
var header = getHeader(); // Custom class
|
1419 |
+
|
1420 |
+
applyCustomClass(header, params, 'header'); // Progress steps
|
1421 |
+
|
1422 |
+
renderProgressSteps(instance, params); // Icon
|
1423 |
+
|
1424 |
+
renderIcon(instance, params); // Image
|
1425 |
+
|
1426 |
+
renderImage(instance, params); // Title
|
1427 |
+
|
1428 |
+
renderTitle(instance, params); // Close button
|
1429 |
+
|
1430 |
+
renderCloseButton(instance, params);
|
1431 |
+
};
|
1432 |
+
|
1433 |
+
var renderPopup = function renderPopup(instance, params) {
|
1434 |
+
var popup = getPopup(); // Width
|
1435 |
+
|
1436 |
+
applyNumericalStyle(popup, 'width', params.width); // Padding
|
1437 |
+
|
1438 |
+
applyNumericalStyle(popup, 'padding', params.padding); // Background
|
1439 |
+
|
1440 |
+
if (params.background) {
|
1441 |
+
popup.style.background = params.background;
|
1442 |
+
} // Classes
|
1443 |
+
|
1444 |
+
|
1445 |
+
addClasses(popup, params);
|
1446 |
+
};
|
1447 |
+
|
1448 |
+
var addClasses = function addClasses(popup, params) {
|
1449 |
+
// Default Class + showClass when updating Swal.update({})
|
1450 |
+
popup.className = "".concat(swalClasses.popup, " ").concat(isVisible(popup) ? params.showClass.popup : '');
|
1451 |
+
|
1452 |
+
if (params.toast) {
|
1453 |
+
addClass([document.documentElement, document.body], swalClasses['toast-shown']);
|
1454 |
+
addClass(popup, swalClasses.toast);
|
1455 |
+
} else {
|
1456 |
+
addClass(popup, swalClasses.modal);
|
1457 |
+
} // Custom class
|
1458 |
+
|
1459 |
+
|
1460 |
+
applyCustomClass(popup, params, 'popup');
|
1461 |
+
|
1462 |
+
if (typeof params.customClass === 'string') {
|
1463 |
+
addClass(popup, params.customClass);
|
1464 |
+
} // Icon class (#1842)
|
1465 |
+
|
1466 |
+
|
1467 |
+
if (params.icon) {
|
1468 |
+
addClass(popup, swalClasses["icon-".concat(params.icon)]);
|
1469 |
+
}
|
1470 |
+
};
|
1471 |
+
|
1472 |
+
var render = function render(instance, params) {
|
1473 |
+
renderPopup(instance, params);
|
1474 |
+
renderContainer(instance, params);
|
1475 |
+
renderHeader(instance, params);
|
1476 |
+
renderContent(instance, params);
|
1477 |
+
renderActions(instance, params);
|
1478 |
+
renderFooter(instance, params);
|
1479 |
+
|
1480 |
+
if (typeof params.didRender === 'function') {
|
1481 |
+
params.didRender(getPopup());
|
1482 |
+
} else if (typeof params.onRender === 'function') {
|
1483 |
+
params.onRender(getPopup()); // @deprecated
|
1484 |
+
}
|
1485 |
+
};
|
1486 |
+
|
1487 |
+
/*
|
1488 |
+
* Global function to determine if SweetAlert2 popup is shown
|
1489 |
+
*/
|
1490 |
+
|
1491 |
+
var isVisible$1 = function isVisible$$1() {
|
1492 |
+
return isVisible(getPopup());
|
1493 |
+
};
|
1494 |
+
/*
|
1495 |
+
* Global function to click 'Confirm' button
|
1496 |
+
*/
|
1497 |
+
|
1498 |
+
var clickConfirm = function clickConfirm() {
|
1499 |
+
return getConfirmButton() && getConfirmButton().click();
|
1500 |
+
};
|
1501 |
+
/*
|
1502 |
+
* Global function to click 'Deny' button
|
1503 |
+
*/
|
1504 |
+
|
1505 |
+
var clickDeny = function clickDeny() {
|
1506 |
+
return getDenyButton() && getDenyButton().click();
|
1507 |
+
};
|
1508 |
+
/*
|
1509 |
+
* Global function to click 'Cancel' button
|
1510 |
+
*/
|
1511 |
+
|
1512 |
+
var clickCancel = function clickCancel() {
|
1513 |
+
return getCancelButton() && getCancelButton().click();
|
1514 |
+
};
|
1515 |
+
|
1516 |
+
function fire() {
|
1517 |
+
var Swal = this;
|
1518 |
+
|
1519 |
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
1520 |
+
args[_key] = arguments[_key];
|
1521 |
+
}
|
1522 |
+
|
1523 |
+
return _construct(Swal, args);
|
1524 |
+
}
|
1525 |
+
|
1526 |
+
/**
|
1527 |
+
* Returns an extended version of `Swal` containing `params` as defaults.
|
1528 |
+
* Useful for reusing Swal configuration.
|
1529 |
+
*
|
1530 |
+
* For example:
|
1531 |
+
*
|
1532 |
+
* Before:
|
1533 |
+
* const textPromptOptions = { input: 'text', showCancelButton: true }
|
1534 |
+
* const {value: firstName} = await Swal.fire({ ...textPromptOptions, title: 'What is your first name?' })
|
1535 |
+
* const {value: lastName} = await Swal.fire({ ...textPromptOptions, title: 'What is your last name?' })
|
1536 |
+
*
|
1537 |
+
* After:
|
1538 |
+
* const TextPrompt = Swal.mixin({ input: 'text', showCancelButton: true })
|
1539 |
+
* const {value: firstName} = await TextPrompt('What is your first name?')
|
1540 |
+
* const {value: lastName} = await TextPrompt('What is your last name?')
|
1541 |
+
*
|
1542 |
+
* @param mixinParams
|
1543 |
+
*/
|
1544 |
+
function mixin(mixinParams) {
|
1545 |
+
var MixinSwal = /*#__PURE__*/function (_this) {
|
1546 |
+
_inherits(MixinSwal, _this);
|
1547 |
+
|
1548 |
+
var _super = _createSuper(MixinSwal);
|
1549 |
+
|
1550 |
+
function MixinSwal() {
|
1551 |
+
_classCallCheck(this, MixinSwal);
|
1552 |
+
|
1553 |
+
return _super.apply(this, arguments);
|
1554 |
+
}
|
1555 |
+
|
1556 |
+
_createClass(MixinSwal, [{
|
1557 |
+
key: "_main",
|
1558 |
+
value: function _main(params) {
|
1559 |
+
return _get(_getPrototypeOf(MixinSwal.prototype), "_main", this).call(this, _extends({}, mixinParams, params));
|
1560 |
+
}
|
1561 |
+
}]);
|
1562 |
+
|
1563 |
+
return MixinSwal;
|
1564 |
+
}(this);
|
1565 |
+
|
1566 |
+
return MixinSwal;
|
1567 |
+
}
|
1568 |
+
|
1569 |
+
/**
|
1570 |
+
* Show spinner instead of Confirm button
|
1571 |
+
*/
|
1572 |
+
|
1573 |
+
var showLoading = function showLoading() {
|
1574 |
+
var popup = getPopup();
|
1575 |
+
|
1576 |
+
if (!popup) {
|
1577 |
+
Swal.fire();
|
1578 |
+
}
|
1579 |
+
|
1580 |
+
popup = getPopup();
|
1581 |
+
var actions = getActions();
|
1582 |
+
var confirmButton = getConfirmButton();
|
1583 |
+
var loader = getLoader();
|
1584 |
+
show(actions);
|
1585 |
+
hide(confirmButton);
|
1586 |
+
addClass([popup, actions], swalClasses.loading);
|
1587 |
+
show(loader);
|
1588 |
+
popup.setAttribute('data-loading', true);
|
1589 |
+
popup.setAttribute('aria-busy', true);
|
1590 |
+
popup.focus();
|
1591 |
+
};
|
1592 |
+
|
1593 |
+
var RESTORE_FOCUS_TIMEOUT = 100;
|
1594 |
+
|
1595 |
+
var globalState = {};
|
1596 |
+
|
1597 |
+
var focusPreviousActiveElement = function focusPreviousActiveElement() {
|
1598 |
+
if (globalState.previousActiveElement && globalState.previousActiveElement.focus) {
|
1599 |
+
globalState.previousActiveElement.focus();
|
1600 |
+
globalState.previousActiveElement = null;
|
1601 |
+
} else if (document.body) {
|
1602 |
+
document.body.focus();
|
1603 |
+
}
|
1604 |
+
}; // Restore previous active (focused) element
|
1605 |
+
|
1606 |
+
|
1607 |
+
var restoreActiveElement = function restoreActiveElement() {
|
1608 |
+
return new Promise(function (resolve) {
|
1609 |
+
var x = window.scrollX;
|
1610 |
+
var y = window.scrollY;
|
1611 |
+
globalState.restoreFocusTimeout = setTimeout(function () {
|
1612 |
+
focusPreviousActiveElement();
|
1613 |
+
resolve();
|
1614 |
+
}, RESTORE_FOCUS_TIMEOUT); // issues/900
|
1615 |
+
|
1616 |
+
/* istanbul ignore if */
|
1617 |
+
|
1618 |
+
if (typeof x !== 'undefined' && typeof y !== 'undefined') {
|
1619 |
+
// IE doesn't have scrollX/scrollY support
|
1620 |
+
window.scrollTo(x, y);
|
1621 |
+
}
|
1622 |
+
});
|
1623 |
+
};
|
1624 |
+
|
1625 |
+
/**
|
1626 |
+
* If `timer` parameter is set, returns number of milliseconds of timer remained.
|
1627 |
+
* Otherwise, returns undefined.
|
1628 |
+
*/
|
1629 |
+
|
1630 |
+
var getTimerLeft = function getTimerLeft() {
|
1631 |
+
return globalState.timeout && globalState.timeout.getTimerLeft();
|
1632 |
+
};
|
1633 |
+
/**
|
1634 |
+
* Stop timer. Returns number of milliseconds of timer remained.
|
1635 |
+
* If `timer` parameter isn't set, returns undefined.
|
1636 |
+
*/
|
1637 |
+
|
1638 |
+
var stopTimer = function stopTimer() {
|
1639 |
+
if (globalState.timeout) {
|
1640 |
+
stopTimerProgressBar();
|
1641 |
+
return globalState.timeout.stop();
|
1642 |
+
}
|
1643 |
+
};
|
1644 |
+
/**
|
1645 |
+
* Resume timer. Returns number of milliseconds of timer remained.
|
1646 |
+
* If `timer` parameter isn't set, returns undefined.
|
1647 |
+
*/
|
1648 |
+
|
1649 |
+
var resumeTimer = function resumeTimer() {
|
1650 |
+
if (globalState.timeout) {
|
1651 |
+
var remaining = globalState.timeout.start();
|
1652 |
+
animateTimerProgressBar(remaining);
|
1653 |
+
return remaining;
|
1654 |
+
}
|
1655 |
+
};
|
1656 |
+
/**
|
1657 |
+
* Resume timer. Returns number of milliseconds of timer remained.
|
1658 |
+
* If `timer` parameter isn't set, returns undefined.
|
1659 |
+
*/
|
1660 |
+
|
1661 |
+
var toggleTimer = function toggleTimer() {
|
1662 |
+
var timer = globalState.timeout;
|
1663 |
+
return timer && (timer.running ? stopTimer() : resumeTimer());
|
1664 |
+
};
|
1665 |
+
/**
|
1666 |
+
* Increase timer. Returns number of milliseconds of an updated timer.
|
1667 |
+
* If `timer` parameter isn't set, returns undefined.
|
1668 |
+
*/
|
1669 |
+
|
1670 |
+
var increaseTimer = function increaseTimer(n) {
|
1671 |
+
if (globalState.timeout) {
|
1672 |
+
var remaining = globalState.timeout.increase(n);
|
1673 |
+
animateTimerProgressBar(remaining, true);
|
1674 |
+
return remaining;
|
1675 |
+
}
|
1676 |
+
};
|
1677 |
+
/**
|
1678 |
+
* Check if timer is running. Returns true if timer is running
|
1679 |
+
* or false if timer is paused or stopped.
|
1680 |
+
* If `timer` parameter isn't set, returns undefined
|
1681 |
+
*/
|
1682 |
+
|
1683 |
+
var isTimerRunning = function isTimerRunning() {
|
1684 |
+
return globalState.timeout && globalState.timeout.isRunning();
|
1685 |
+
};
|
1686 |
+
|
1687 |
+
var defaultParams = {
|
1688 |
+
title: '',
|
1689 |
+
titleText: '',
|
1690 |
+
text: '',
|
1691 |
+
html: '',
|
1692 |
+
footer: '',
|
1693 |
+
icon: undefined,
|
1694 |
+
iconColor: undefined,
|
1695 |
+
iconHtml: undefined,
|
1696 |
+
toast: false,
|
1697 |
+
animation: true,
|
1698 |
+
showClass: {
|
1699 |
+
popup: 'swal2-show',
|
1700 |
+
backdrop: 'swal2-backdrop-show',
|
1701 |
+
icon: 'swal2-icon-show'
|
1702 |
+
},
|
1703 |
+
hideClass: {
|
1704 |
+
popup: 'swal2-hide',
|
1705 |
+
backdrop: 'swal2-backdrop-hide',
|
1706 |
+
icon: 'swal2-icon-hide'
|
1707 |
+
},
|
1708 |
+
customClass: undefined,
|
1709 |
+
target: 'body',
|
1710 |
+
backdrop: true,
|
1711 |
+
heightAuto: true,
|
1712 |
+
allowOutsideClick: true,
|
1713 |
+
allowEscapeKey: true,
|
1714 |
+
allowEnterKey: true,
|
1715 |
+
stopKeydownPropagation: true,
|
1716 |
+
keydownListenerCapture: false,
|
1717 |
+
showConfirmButton: true,
|
1718 |
+
showDenyButton: false,
|
1719 |
+
showCancelButton: false,
|
1720 |
+
preConfirm: undefined,
|
1721 |
+
confirmButtonText: 'OK',
|
1722 |
+
confirmButtonAriaLabel: '',
|
1723 |
+
confirmButtonColor: undefined,
|
1724 |
+
denyButtonText: 'No',
|
1725 |
+
denyButtonAriaLabel: '',
|
1726 |
+
denyButtonColor: undefined,
|
1727 |
+
cancelButtonText: 'Cancel',
|
1728 |
+
cancelButtonAriaLabel: '',
|
1729 |
+
cancelButtonColor: undefined,
|
1730 |
+
buttonsStyling: true,
|
1731 |
+
reverseButtons: false,
|
1732 |
+
focusConfirm: true,
|
1733 |
+
focusDeny: false,
|
1734 |
+
focusCancel: false,
|
1735 |
+
showCloseButton: false,
|
1736 |
+
closeButtonHtml: '×',
|
1737 |
+
closeButtonAriaLabel: 'Close this dialog',
|
1738 |
+
loaderHtml: '',
|
1739 |
+
showLoaderOnConfirm: false,
|
1740 |
+
imageUrl: undefined,
|
1741 |
+
imageWidth: undefined,
|
1742 |
+
imageHeight: undefined,
|
1743 |
+
imageAlt: '',
|
1744 |
+
timer: undefined,
|
1745 |
+
timerProgressBar: false,
|
1746 |
+
width: undefined,
|
1747 |
+
padding: undefined,
|
1748 |
+
background: undefined,
|
1749 |
+
input: undefined,
|
1750 |
+
inputPlaceholder: '',
|
1751 |
+
inputLabel: '',
|
1752 |
+
inputValue: '',
|
1753 |
+
inputOptions: {},
|
1754 |
+
inputAutoTrim: true,
|
1755 |
+
inputAttributes: {},
|
1756 |
+
inputValidator: undefined,
|
1757 |
+
returnInputValueOnDeny: false,
|
1758 |
+
validationMessage: undefined,
|
1759 |
+
grow: false,
|
1760 |
+
position: 'center',
|
1761 |
+
progressSteps: [],
|
1762 |
+
currentProgressStep: undefined,
|
1763 |
+
progressStepsDistance: undefined,
|
1764 |
+
onBeforeOpen: undefined,
|
1765 |
+
onOpen: undefined,
|
1766 |
+
willOpen: undefined,
|
1767 |
+
didOpen: undefined,
|
1768 |
+
onRender: undefined,
|
1769 |
+
didRender: undefined,
|
1770 |
+
onClose: undefined,
|
1771 |
+
onAfterClose: undefined,
|
1772 |
+
willClose: undefined,
|
1773 |
+
didClose: undefined,
|
1774 |
+
onDestroy: undefined,
|
1775 |
+
didDestroy: undefined,
|
1776 |
+
scrollbarPadding: true
|
1777 |
+
};
|
1778 |
+
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', 'imageAlt', 'imageHeight', 'imageUrl', 'imageWidth', 'onAfterClose', 'onClose', 'onDestroy', 'progressSteps', 'reverseButtons', 'showCancelButton', 'showCloseButton', 'showConfirmButton', 'showDenyButton', 'text', 'title', 'titleText', 'willClose'];
|
1779 |
+
var deprecatedParams = {
|
1780 |
+
animation: 'showClass" and "hideClass',
|
1781 |
+
onBeforeOpen: 'willOpen',
|
1782 |
+
onOpen: 'didOpen',
|
1783 |
+
onRender: 'didRender',
|
1784 |
+
onClose: 'willClose',
|
1785 |
+
onAfterClose: 'didClose',
|
1786 |
+
onDestroy: 'didDestroy'
|
1787 |
+
};
|
1788 |
+
var toastIncompatibleParams = ['allowOutsideClick', 'allowEnterKey', 'backdrop', 'focusConfirm', 'focusDeny', 'focusCancel', 'heightAuto', 'keydownListenerCapture'];
|
1789 |
+
/**
|
1790 |
+
* Is valid parameter
|
1791 |
+
* @param {String} paramName
|
1792 |
+
*/
|
1793 |
+
|
1794 |
+
var isValidParameter = function isValidParameter(paramName) {
|
1795 |
+
return Object.prototype.hasOwnProperty.call(defaultParams, paramName);
|
1796 |
+
};
|
1797 |
+
/**
|
1798 |
+
* Is valid parameter for Swal.update() method
|
1799 |
+
* @param {String} paramName
|
1800 |
+
*/
|
1801 |
+
|
1802 |
+
var isUpdatableParameter = function isUpdatableParameter(paramName) {
|
1803 |
+
return updatableParams.indexOf(paramName) !== -1;
|
1804 |
+
};
|
1805 |
+
/**
|
1806 |
+
* Is deprecated parameter
|
1807 |
+
* @param {String} paramName
|
1808 |
+
*/
|
1809 |
+
|
1810 |
+
var isDeprecatedParameter = function isDeprecatedParameter(paramName) {
|
1811 |
+
return deprecatedParams[paramName];
|
1812 |
+
};
|
1813 |
+
|
1814 |
+
var checkIfParamIsValid = function checkIfParamIsValid(param) {
|
1815 |
+
if (!isValidParameter(param)) {
|
1816 |
+
warn("Unknown parameter \"".concat(param, "\""));
|
1817 |
+
}
|
1818 |
+
};
|
1819 |
+
|
1820 |
+
var checkIfToastParamIsValid = function checkIfToastParamIsValid(param) {
|
1821 |
+
if (toastIncompatibleParams.indexOf(param) !== -1) {
|
1822 |
+
warn("The parameter \"".concat(param, "\" is incompatible with toasts"));
|
1823 |
+
}
|
1824 |
+
};
|
1825 |
+
|
1826 |
+
var checkIfParamIsDeprecated = function checkIfParamIsDeprecated(param) {
|
1827 |
+
if (isDeprecatedParameter(param)) {
|
1828 |
+
warnAboutDeprecation(param, isDeprecatedParameter(param));
|
1829 |
+
}
|
1830 |
+
};
|
1831 |
+
/**
|
1832 |
+
* Show relevant warnings for given params
|
1833 |
+
*
|
1834 |
+
* @param params
|
1835 |
+
*/
|
1836 |
+
|
1837 |
+
|
1838 |
+
var showWarningsForParams = function showWarningsForParams(params) {
|
1839 |
+
for (var param in params) {
|
1840 |
+
checkIfParamIsValid(param);
|
1841 |
+
|
1842 |
+
if (params.toast) {
|
1843 |
+
checkIfToastParamIsValid(param);
|
1844 |
+
}
|
1845 |
+
|
1846 |
+
checkIfParamIsDeprecated(param);
|
1847 |
+
}
|
1848 |
+
};
|
1849 |
+
|
1850 |
+
|
1851 |
+
|
1852 |
+
var staticMethods = /*#__PURE__*/Object.freeze({
|
1853 |
+
isValidParameter: isValidParameter,
|
1854 |
+
isUpdatableParameter: isUpdatableParameter,
|
1855 |
+
isDeprecatedParameter: isDeprecatedParameter,
|
1856 |
+
argsToParams: argsToParams,
|
1857 |
+
isVisible: isVisible$1,
|
1858 |
+
clickConfirm: clickConfirm,
|
1859 |
+
clickDeny: clickDeny,
|
1860 |
+
clickCancel: clickCancel,
|
1861 |
+
getContainer: getContainer,
|
1862 |
+
getPopup: getPopup,
|
1863 |
+
getTitle: getTitle,
|
1864 |
+
getContent: getContent,
|
1865 |
+
getHtmlContainer: getHtmlContainer,
|
1866 |
+
getImage: getImage,
|
1867 |
+
getIcon: getIcon,
|
1868 |
+
getIcons: getIcons,
|
1869 |
+
getInputLabel: getInputLabel,
|
1870 |
+
getCloseButton: getCloseButton,
|
1871 |
+
getActions: getActions,
|
1872 |
+
getConfirmButton: getConfirmButton,
|
1873 |
+
getDenyButton: getDenyButton,
|
1874 |
+
getCancelButton: getCancelButton,
|
1875 |
+
getHeader: getHeader,
|
1876 |
+
getFooter: getFooter,
|
1877 |
+
getTimerProgressBar: getTimerProgressBar,
|
1878 |
+
getFocusableElements: getFocusableElements,
|
1879 |
+
getValidationMessage: getValidationMessage,
|
1880 |
+
isLoading: isLoading,
|
1881 |
+
fire: fire,
|
1882 |
+
mixin: mixin,
|
1883 |
+
queue: queue,
|
1884 |
+
getQueueStep: getQueueStep,
|
1885 |
+
insertQueueStep: insertQueueStep,
|
1886 |
+
deleteQueueStep: deleteQueueStep,
|
1887 |
+
showLoading: showLoading,
|
1888 |
+
enableLoading: showLoading,
|
1889 |
+
getTimerLeft: getTimerLeft,
|
1890 |
+
stopTimer: stopTimer,
|
1891 |
+
resumeTimer: resumeTimer,
|
1892 |
+
toggleTimer: toggleTimer,
|
1893 |
+
increaseTimer: increaseTimer,
|
1894 |
+
isTimerRunning: isTimerRunning
|
1895 |
+
});
|
1896 |
+
|
1897 |
+
/**
|
1898 |
+
* Enables buttons and hide loader.
|
1899 |
+
*/
|
1900 |
+
|
1901 |
+
function hideLoading() {
|
1902 |
+
// do nothing if popup is closed
|
1903 |
+
var innerParams = privateProps.innerParams.get(this);
|
1904 |
+
|
1905 |
+
if (!innerParams) {
|
1906 |
+
return;
|
1907 |
+
}
|
1908 |
+
|
1909 |
+
var domCache = privateProps.domCache.get(this);
|
1910 |
+
hide(domCache.loader);
|
1911 |
+
|
1912 |
+
if (innerParams.showConfirmButton) {
|
1913 |
+
show(domCache.confirmButton, 'inline-block');
|
1914 |
+
} else if (!innerParams.showConfirmButton && !innerParams.showCancelButton) {
|
1915 |
+
hide(domCache.actions);
|
1916 |
+
}
|
1917 |
+
|
1918 |
+
removeClass([domCache.popup, domCache.actions], swalClasses.loading);
|
1919 |
+
domCache.popup.removeAttribute('aria-busy');
|
1920 |
+
domCache.popup.removeAttribute('data-loading');
|
1921 |
+
domCache.confirmButton.disabled = false;
|
1922 |
+
domCache.denyButton.disabled = false;
|
1923 |
+
domCache.cancelButton.disabled = false;
|
1924 |
+
}
|
1925 |
+
|
1926 |
+
function getInput$1(instance) {
|
1927 |
+
var innerParams = privateProps.innerParams.get(instance || this);
|
1928 |
+
var domCache = privateProps.domCache.get(instance || this);
|
1929 |
+
|
1930 |
+
if (!domCache) {
|
1931 |
+
return null;
|
1932 |
+
}
|
1933 |
+
|
1934 |
+
return getInput(domCache.content, innerParams.input);
|
1935 |
+
}
|
1936 |
+
|
1937 |
+
var fixScrollbar = function fixScrollbar() {
|
1938 |
+
// for queues, do not do this more than once
|
1939 |
+
if (states.previousBodyPadding !== null) {
|
1940 |
+
return;
|
1941 |
+
} // if the body has overflow
|
1942 |
+
|
1943 |
+
|
1944 |
+
if (document.body.scrollHeight > window.innerHeight) {
|
1945 |
+
// add padding so the content doesn't shift after removal of scrollbar
|
1946 |
+
states.previousBodyPadding = parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right'));
|
1947 |
+
document.body.style.paddingRight = "".concat(states.previousBodyPadding + measureScrollbar(), "px");
|
1948 |
+
}
|
1949 |
+
};
|
1950 |
+
var undoScrollbar = function undoScrollbar() {
|
1951 |
+
if (states.previousBodyPadding !== null) {
|
1952 |
+
document.body.style.paddingRight = "".concat(states.previousBodyPadding, "px");
|
1953 |
+
states.previousBodyPadding = null;
|
1954 |
+
}
|
1955 |
+
};
|
1956 |
+
|
1957 |
+
/* istanbul ignore file */
|
1958 |
+
|
1959 |
+
var iOSfix = function iOSfix() {
|
1960 |
+
var iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream || navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1;
|
1961 |
+
|
1962 |
+
if (iOS && !hasClass(document.body, swalClasses.iosfix)) {
|
1963 |
+
var offset = document.body.scrollTop;
|
1964 |
+
document.body.style.top = "".concat(offset * -1, "px");
|
1965 |
+
addClass(document.body, swalClasses.iosfix);
|
1966 |
+
lockBodyScroll();
|
1967 |
+
addBottomPaddingForTallPopups(); // #1948
|
1968 |
+
}
|
1969 |
+
};
|
1970 |
+
|
1971 |
+
var addBottomPaddingForTallPopups = function addBottomPaddingForTallPopups() {
|
1972 |
+
var safari = !navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i);
|
1973 |
+
|
1974 |
+
if (safari) {
|
1975 |
+
var bottomPanelHeight = 44;
|
1976 |
+
|
1977 |
+
if (getPopup().scrollHeight > window.innerHeight - bottomPanelHeight) {
|
1978 |
+
getContainer().style.paddingBottom = "".concat(bottomPanelHeight, "px");
|
1979 |
+
}
|
1980 |
+
}
|
1981 |
+
};
|
1982 |
+
|
1983 |
+
var lockBodyScroll = function lockBodyScroll() {
|
1984 |
+
// #1246
|
1985 |
+
var container = getContainer();
|
1986 |
+
var preventTouchMove;
|
1987 |
+
|
1988 |
+
container.ontouchstart = function (e) {
|
1989 |
+
preventTouchMove = shouldPreventTouchMove(e);
|
1990 |
+
};
|
1991 |
+
|
1992 |
+
container.ontouchmove = function (e) {
|
1993 |
+
if (preventTouchMove) {
|
1994 |
+
e.preventDefault();
|
1995 |
+
e.stopPropagation();
|
1996 |
+
}
|
1997 |
+
};
|
1998 |
+
};
|
1999 |
+
|
2000 |
+
var shouldPreventTouchMove = function shouldPreventTouchMove(event) {
|
2001 |
+
var target = event.target;
|
2002 |
+
var container = getContainer();
|
2003 |
+
|
2004 |
+
if (event.touches && event.touches.length && event.touches[0].touchType === 'stylus') {
|
2005 |
+
// #1786
|
2006 |
+
return false;
|
2007 |
+
}
|
2008 |
+
|
2009 |
+
if (target === container) {
|
2010 |
+
return true;
|
2011 |
+
}
|
2012 |
+
|
2013 |
+
if (!isScrollable(container) && target.tagName !== 'INPUT' && // #1603
|
2014 |
+
!(isScrollable(getContent()) && // #1944
|
2015 |
+
getContent().contains(target))) {
|
2016 |
+
return true;
|
2017 |
+
}
|
2018 |
+
|
2019 |
+
return false;
|
2020 |
+
};
|
2021 |
+
|
2022 |
+
var undoIOSfix = function undoIOSfix() {
|
2023 |
+
if (hasClass(document.body, swalClasses.iosfix)) {
|
2024 |
+
var offset = parseInt(document.body.style.top, 10);
|
2025 |
+
removeClass(document.body, swalClasses.iosfix);
|
2026 |
+
document.body.style.top = '';
|
2027 |
+
document.body.scrollTop = offset * -1;
|
2028 |
+
}
|
2029 |
+
};
|
2030 |
+
|
2031 |
+
/* istanbul ignore file */
|
2032 |
+
|
2033 |
+
var isIE11 = function isIE11() {
|
2034 |
+
return !!window.MSInputMethodContext && !!document.documentMode;
|
2035 |
+
}; // Fix IE11 centering sweetalert2/issues/933
|
2036 |
+
|
2037 |
+
|
2038 |
+
var fixVerticalPositionIE = function fixVerticalPositionIE() {
|
2039 |
+
var container = getContainer();
|
2040 |
+
var popup = getPopup();
|
2041 |
+
container.style.removeProperty('align-items');
|
2042 |
+
|
2043 |
+
if (popup.offsetTop < 0) {
|
2044 |
+
container.style.alignItems = 'flex-start';
|
2045 |
+
}
|
2046 |
+
};
|
2047 |
+
|
2048 |
+
var IEfix = function IEfix() {
|
2049 |
+
if (typeof window !== 'undefined' && isIE11()) {
|
2050 |
+
fixVerticalPositionIE();
|
2051 |
+
window.addEventListener('resize', fixVerticalPositionIE);
|
2052 |
+
}
|
2053 |
+
};
|
2054 |
+
var undoIEfix = function undoIEfix() {
|
2055 |
+
if (typeof window !== 'undefined' && isIE11()) {
|
2056 |
+
window.removeEventListener('resize', fixVerticalPositionIE);
|
2057 |
+
}
|
2058 |
+
};
|
2059 |
+
|
2060 |
+
// Adding aria-hidden="true" to elements outside of the active modal dialog ensures that
|
2061 |
+
// elements not within the active modal dialog will not be surfaced if a user opens a screen
|
2062 |
+
// reader’s list of elements (headings, form controls, landmarks, etc.) in the document.
|
2063 |
+
|
2064 |
+
var setAriaHidden = function setAriaHidden() {
|
2065 |
+
var bodyChildren = toArray(document.body.children);
|
2066 |
+
bodyChildren.forEach(function (el) {
|
2067 |
+
if (el === getContainer() || contains(el, getContainer())) {
|
2068 |
+
return;
|
2069 |
+
}
|
2070 |
+
|
2071 |
+
if (el.hasAttribute('aria-hidden')) {
|
2072 |
+
el.setAttribute('data-previous-aria-hidden', el.getAttribute('aria-hidden'));
|
2073 |
+
}
|
2074 |
+
|
2075 |
+
el.setAttribute('aria-hidden', 'true');
|
2076 |
+
});
|
2077 |
+
};
|
2078 |
+
var unsetAriaHidden = function unsetAriaHidden() {
|
2079 |
+
var bodyChildren = toArray(document.body.children);
|
2080 |
+
bodyChildren.forEach(function (el) {
|
2081 |
+
if (el.hasAttribute('data-previous-aria-hidden')) {
|
2082 |
+
el.setAttribute('aria-hidden', el.getAttribute('data-previous-aria-hidden'));
|
2083 |
+
el.removeAttribute('data-previous-aria-hidden');
|
2084 |
+
} else {
|
2085 |
+
el.removeAttribute('aria-hidden');
|
2086 |
+
}
|
2087 |
+
});
|
2088 |
+
};
|
2089 |
+
|
2090 |
+
/**
|
2091 |
+
* This module containts `WeakMap`s for each effectively-"private property" that a `Swal` has.
|
2092 |
+
* For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')`
|
2093 |
+
* This is the approach that Babel will probably take to implement private methods/fields
|
2094 |
+
* https://github.com/tc39/proposal-private-methods
|
2095 |
+
* https://github.com/babel/babel/pull/7555
|
2096 |
+
* Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module*
|
2097 |
+
* then we can use that language feature.
|
2098 |
+
*/
|
2099 |
+
var privateMethods = {
|
2100 |
+
swalPromiseResolve: new WeakMap()
|
2101 |
+
};
|
2102 |
+
|
2103 |
+
/*
|
2104 |
+
* Instance method to close sweetAlert
|
2105 |
+
*/
|
2106 |
+
|
2107 |
+
function removePopupAndResetState(instance, container, isToast$$1, didClose) {
|
2108 |
+
if (isToast$$1) {
|
2109 |
+
triggerDidCloseAndDispose(instance, didClose);
|
2110 |
+
} else {
|
2111 |
+
restoreActiveElement().then(function () {
|
2112 |
+
return triggerDidCloseAndDispose(instance, didClose);
|
2113 |
+
});
|
2114 |
+
globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, {
|
2115 |
+
capture: globalState.keydownListenerCapture
|
2116 |
+
});
|
2117 |
+
globalState.keydownHandlerAdded = false;
|
2118 |
+
}
|
2119 |
+
|
2120 |
+
if (container.parentNode && !document.body.getAttribute('data-swal2-queue-step')) {
|
2121 |
+
container.parentNode.removeChild(container);
|
2122 |
+
}
|
2123 |
+
|
2124 |
+
if (isModal()) {
|
2125 |
+
undoScrollbar();
|
2126 |
+
undoIOSfix();
|
2127 |
+
undoIEfix();
|
2128 |
+
unsetAriaHidden();
|
2129 |
+
}
|
2130 |
+
|
2131 |
+
removeBodyClasses();
|
2132 |
+
}
|
2133 |
+
|
2134 |
+
function removeBodyClasses() {
|
2135 |
+
removeClass([document.documentElement, document.body], [swalClasses.shown, swalClasses['height-auto'], swalClasses['no-backdrop'], swalClasses['toast-shown'], swalClasses['toast-column']]);
|
2136 |
+
}
|
2137 |
+
|
2138 |
+
function close(resolveValue) {
|
2139 |
+
var popup = getPopup();
|
2140 |
+
|
2141 |
+
if (!popup) {
|
2142 |
+
return;
|
2143 |
+
}
|
2144 |
+
|
2145 |
+
resolveValue = prepareResolveValue(resolveValue);
|
2146 |
+
var innerParams = privateProps.innerParams.get(this);
|
2147 |
+
|
2148 |
+
if (!innerParams || hasClass(popup, innerParams.hideClass.popup)) {
|
2149 |
+
return;
|
2150 |
+
}
|
2151 |
+
|
2152 |
+
var swalPromiseResolve = privateMethods.swalPromiseResolve.get(this);
|
2153 |
+
removeClass(popup, innerParams.showClass.popup);
|
2154 |
+
addClass(popup, innerParams.hideClass.popup);
|
2155 |
+
var backdrop = getContainer();
|
2156 |
+
removeClass(backdrop, innerParams.showClass.backdrop);
|
2157 |
+
addClass(backdrop, innerParams.hideClass.backdrop);
|
2158 |
+
handlePopupAnimation(this, popup, innerParams); // Resolve Swal promise
|
2159 |
+
|
2160 |
+
swalPromiseResolve(resolveValue);
|
2161 |
+
}
|
2162 |
+
|
2163 |
+
var prepareResolveValue = function prepareResolveValue(resolveValue) {
|
2164 |
+
// When user calls Swal.close()
|
2165 |
+
if (typeof resolveValue === 'undefined') {
|
2166 |
+
return {
|
2167 |
+
isConfirmed: false,
|
2168 |
+
isDenied: false,
|
2169 |
+
isDismissed: true
|
2170 |
+
};
|
2171 |
+
}
|
2172 |
+
|
2173 |
+
return _extends({
|
2174 |
+
isConfirmed: false,
|
2175 |
+
isDenied: false,
|
2176 |
+
isDismissed: false
|
2177 |
+
}, resolveValue);
|
2178 |
+
};
|
2179 |
+
|
2180 |
+
var handlePopupAnimation = function handlePopupAnimation(instance, popup, innerParams) {
|
2181 |
+
var container = getContainer(); // If animation is supported, animate
|
2182 |
+
|
2183 |
+
var animationIsSupported = animationEndEvent && hasCssAnimation(popup);
|
2184 |
+
var onClose = innerParams.onClose,
|
2185 |
+
onAfterClose = innerParams.onAfterClose,
|
2186 |
+
willClose = innerParams.willClose,
|
2187 |
+
didClose = innerParams.didClose;
|
2188 |
+
runDidClose(popup, willClose, onClose);
|
2189 |
+
|
2190 |
+
if (animationIsSupported) {
|
2191 |
+
animatePopup(instance, popup, container, didClose || onAfterClose);
|
2192 |
+
} else {
|
2193 |
+
// Otherwise, remove immediately
|
2194 |
+
removePopupAndResetState(instance, container, isToast(), didClose || onAfterClose);
|
2195 |
+
}
|
2196 |
+
};
|
2197 |
+
|
2198 |
+
var runDidClose = function runDidClose(popup, willClose, onClose) {
|
2199 |
+
if (willClose !== null && typeof willClose === 'function') {
|
2200 |
+
willClose(popup);
|
2201 |
+
} else if (onClose !== null && typeof onClose === 'function') {
|
2202 |
+
onClose(popup); // @deprecated
|
2203 |
+
}
|
2204 |
+
};
|
2205 |
+
|
2206 |
+
var animatePopup = function animatePopup(instance, popup, container, didClose) {
|
2207 |
+
globalState.swalCloseEventFinishedCallback = removePopupAndResetState.bind(null, instance, container, isToast(), didClose);
|
2208 |
+
popup.addEventListener(animationEndEvent, function (e) {
|
2209 |
+
if (e.target === popup) {
|
2210 |
+
globalState.swalCloseEventFinishedCallback();
|
2211 |
+
delete globalState.swalCloseEventFinishedCallback;
|
2212 |
+
}
|
2213 |
+
});
|
2214 |
+
};
|
2215 |
+
|
2216 |
+
var triggerDidCloseAndDispose = function triggerDidCloseAndDispose(instance, didClose) {
|
2217 |
+
setTimeout(function () {
|
2218 |
+
if (typeof didClose === 'function') {
|
2219 |
+
didClose();
|
2220 |
+
}
|
2221 |
+
|
2222 |
+
instance._destroy();
|
2223 |
+
});
|
2224 |
+
};
|
2225 |
+
|
2226 |
+
function setButtonsDisabled(instance, buttons, disabled) {
|
2227 |
+
var domCache = privateProps.domCache.get(instance);
|
2228 |
+
buttons.forEach(function (button) {
|
2229 |
+
domCache[button].disabled = disabled;
|
2230 |
+
});
|
2231 |
+
}
|
2232 |
+
|
2233 |
+
function setInputDisabled(input, disabled) {
|
2234 |
+
if (!input) {
|
2235 |
+
return false;
|
2236 |
+
}
|
2237 |
+
|
2238 |
+
if (input.type === 'radio') {
|
2239 |
+
var radiosContainer = input.parentNode.parentNode;
|
2240 |
+
var radios = radiosContainer.querySelectorAll('input');
|
2241 |
+
|
2242 |
+
for (var i = 0; i < radios.length; i++) {
|
2243 |
+
radios[i].disabled = disabled;
|
2244 |
+
}
|
2245 |
+
} else {
|
2246 |
+
input.disabled = disabled;
|
2247 |
+
}
|
2248 |
+
}
|
2249 |
+
|
2250 |
+
function enableButtons() {
|
2251 |
+
setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], false);
|
2252 |
+
}
|
2253 |
+
function disableButtons() {
|
2254 |
+
setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], true);
|
2255 |
+
}
|
2256 |
+
function enableInput() {
|
2257 |
+
return setInputDisabled(this.getInput(), false);
|
2258 |
+
}
|
2259 |
+
function disableInput() {
|
2260 |
+
return setInputDisabled(this.getInput(), true);
|
2261 |
+
}
|
2262 |
+
|
2263 |
+
function showValidationMessage(error) {
|
2264 |
+
var domCache = privateProps.domCache.get(this);
|
2265 |
+
var params = privateProps.innerParams.get(this);
|
2266 |
+
setInnerHtml(domCache.validationMessage, error);
|
2267 |
+
domCache.validationMessage.className = swalClasses['validation-message'];
|
2268 |
+
|
2269 |
+
if (params.customClass && params.customClass.validationMessage) {
|
2270 |
+
addClass(domCache.validationMessage, params.customClass.validationMessage);
|
2271 |
+
}
|
2272 |
+
|
2273 |
+
show(domCache.validationMessage);
|
2274 |
+
var input = this.getInput();
|
2275 |
+
|
2276 |
+
if (input) {
|
2277 |
+
input.setAttribute('aria-invalid', true);
|
2278 |
+
input.setAttribute('aria-describedBy', swalClasses['validation-message']);
|
2279 |
+
focusInput(input);
|
2280 |
+
addClass(input, swalClasses.inputerror);
|
2281 |
+
}
|
2282 |
+
} // Hide block with validation message
|
2283 |
+
|
2284 |
+
function resetValidationMessage$1() {
|
2285 |
+
var domCache = privateProps.domCache.get(this);
|
2286 |
+
|
2287 |
+
if (domCache.validationMessage) {
|
2288 |
+
hide(domCache.validationMessage);
|
2289 |
+
}
|
2290 |
+
|
2291 |
+
var input = this.getInput();
|
2292 |
+
|
2293 |
+
if (input) {
|
2294 |
+
input.removeAttribute('aria-invalid');
|
2295 |
+
input.removeAttribute('aria-describedBy');
|
2296 |
+
removeClass(input, swalClasses.inputerror);
|
2297 |
+
}
|
2298 |
+
}
|
2299 |
+
|
2300 |
+
function getProgressSteps$1() {
|
2301 |
+
var domCache = privateProps.domCache.get(this);
|
2302 |
+
return domCache.progressSteps;
|
2303 |
+
}
|
2304 |
+
|
2305 |
+
var Timer = /*#__PURE__*/function () {
|
2306 |
+
function Timer(callback, delay) {
|
2307 |
+
_classCallCheck(this, Timer);
|
2308 |
+
|
2309 |
+
this.callback = callback;
|
2310 |
+
this.remaining = delay;
|
2311 |
+
this.running = false;
|
2312 |
+
this.start();
|
2313 |
+
}
|
2314 |
+
|
2315 |
+
_createClass(Timer, [{
|
2316 |
+
key: "start",
|
2317 |
+
value: function start() {
|
2318 |
+
if (!this.running) {
|
2319 |
+
this.running = true;
|
2320 |
+
this.started = new Date();
|
2321 |
+
this.id = setTimeout(this.callback, this.remaining);
|
2322 |
+
}
|
2323 |
+
|
2324 |
+
return this.remaining;
|
2325 |
+
}
|
2326 |
+
}, {
|
2327 |
+
key: "stop",
|
2328 |
+
value: function stop() {
|
2329 |
+
if (this.running) {
|
2330 |
+
this.running = false;
|
2331 |
+
clearTimeout(this.id);
|
2332 |
+
this.remaining -= new Date() - this.started;
|
2333 |
+
}
|
2334 |
+
|
2335 |
+
return this.remaining;
|
2336 |
+
}
|
2337 |
+
}, {
|
2338 |
+
key: "increase",
|
2339 |
+
value: function increase(n) {
|
2340 |
+
var running = this.running;
|
2341 |
+
|
2342 |
+
if (running) {
|
2343 |
+
this.stop();
|
2344 |
+
}
|
2345 |
+
|
2346 |
+
this.remaining += n;
|
2347 |
+
|
2348 |
+
if (running) {
|
2349 |
+
this.start();
|
2350 |
+
}
|
2351 |
+
|
2352 |
+
return this.remaining;
|
2353 |
+
}
|
2354 |
+
}, {
|
2355 |
+
key: "getTimerLeft",
|
2356 |
+
value: function getTimerLeft() {
|
2357 |
+
if (this.running) {
|
2358 |
+
this.stop();
|
2359 |
+
this.start();
|
2360 |
+
}
|
2361 |
+
|
2362 |
+
return this.remaining;
|
2363 |
+
}
|
2364 |
+
}, {
|
2365 |
+
key: "isRunning",
|
2366 |
+
value: function isRunning() {
|
2367 |
+
return this.running;
|
2368 |
+
}
|
2369 |
+
}]);
|
2370 |
+
|
2371 |
+
return Timer;
|
2372 |
+
}();
|
2373 |
+
|
2374 |
+
var defaultInputValidators = {
|
2375 |
+
email: function email(string, validationMessage) {
|
2376 |
+
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');
|
2377 |
+
},
|
2378 |
+
url: function url(string, validationMessage) {
|
2379 |
+
// taken from https://stackoverflow.com/a/3809435 with a small change from #1306 and #2013
|
2380 |
+
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');
|
2381 |
+
}
|
2382 |
+
};
|
2383 |
+
|
2384 |
+
function setDefaultInputValidators(params) {
|
2385 |
+
// Use default `inputValidator` for supported input types if not provided
|
2386 |
+
if (!params.inputValidator) {
|
2387 |
+
Object.keys(defaultInputValidators).forEach(function (key) {
|
2388 |
+
if (params.input === key) {
|
2389 |
+
params.inputValidator = defaultInputValidators[key];
|
2390 |
+
}
|
2391 |
+
});
|
2392 |
+
}
|
2393 |
+
}
|
2394 |
+
|
2395 |
+
function validateCustomTargetElement(params) {
|
2396 |
+
// Determine if the custom target element is valid
|
2397 |
+
if (!params.target || typeof params.target === 'string' && !document.querySelector(params.target) || typeof params.target !== 'string' && !params.target.appendChild) {
|
2398 |
+
warn('Target parameter is not valid, defaulting to "body"');
|
2399 |
+
params.target = 'body';
|
2400 |
+
}
|
2401 |
+
}
|
2402 |
+
/**
|
2403 |
+
* Set type, text and actions on popup
|
2404 |
+
*
|
2405 |
+
* @param params
|
2406 |
+
* @returns {boolean}
|
2407 |
+
*/
|
2408 |
+
|
2409 |
+
|
2410 |
+
function setParameters(params) {
|
2411 |
+
setDefaultInputValidators(params); // showLoaderOnConfirm && preConfirm
|
2412 |
+
|
2413 |
+
if (params.showLoaderOnConfirm && !params.preConfirm) {
|
2414 |
+
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');
|
2415 |
+
} // params.animation will be actually used in renderPopup.js
|
2416 |
+
// but in case when params.animation is a function, we need to call that function
|
2417 |
+
// before popup (re)initialization, so it'll be possible to check Swal.isVisible()
|
2418 |
+
// inside the params.animation function
|
2419 |
+
|
2420 |
+
|
2421 |
+
params.animation = callIfFunction(params.animation);
|
2422 |
+
validateCustomTargetElement(params); // Replace newlines with <br> in title
|
2423 |
+
|
2424 |
+
if (typeof params.title === 'string') {
|
2425 |
+
params.title = params.title.split('\n').join('<br />');
|
2426 |
+
}
|
2427 |
+
|
2428 |
+
init(params);
|
2429 |
+
}
|
2430 |
+
|
2431 |
+
var SHOW_CLASS_TIMEOUT = 10;
|
2432 |
+
/**
|
2433 |
+
* Open popup, add necessary classes and styles, fix scrollbar
|
2434 |
+
*
|
2435 |
+
* @param params
|
2436 |
+
*/
|
2437 |
+
|
2438 |
+
var openPopup = function openPopup(params) {
|
2439 |
+
var container = getContainer();
|
2440 |
+
var popup = getPopup();
|
2441 |
+
|
2442 |
+
if (typeof params.willOpen === 'function') {
|
2443 |
+
params.willOpen(popup);
|
2444 |
+
} else if (typeof params.onBeforeOpen === 'function') {
|
2445 |
+
params.onBeforeOpen(popup); // @deprecated
|
2446 |
+
}
|
2447 |
+
|
2448 |
+
var bodyStyles = window.getComputedStyle(document.body);
|
2449 |
+
var initialBodyOverflow = bodyStyles.overflowY;
|
2450 |
+
addClasses$1(container, popup, params); // scrolling is 'hidden' until animation is done, after that 'auto'
|
2451 |
+
|
2452 |
+
setTimeout(function () {
|
2453 |
+
setScrollingVisibility(container, popup);
|
2454 |
+
}, SHOW_CLASS_TIMEOUT);
|
2455 |
+
|
2456 |
+
if (isModal()) {
|
2457 |
+
fixScrollContainer(container, params.scrollbarPadding, initialBodyOverflow);
|
2458 |
+
setAriaHidden();
|
2459 |
+
}
|
2460 |
+
|
2461 |
+
if (!isToast() && !globalState.previousActiveElement) {
|
2462 |
+
globalState.previousActiveElement = document.activeElement;
|
2463 |
+
}
|
2464 |
+
|
2465 |
+
runDidOpen(popup, params);
|
2466 |
+
removeClass(container, swalClasses['no-transition']);
|
2467 |
+
};
|
2468 |
+
|
2469 |
+
var runDidOpen = function runDidOpen(popup, params) {
|
2470 |
+
if (typeof params.didOpen === 'function') {
|
2471 |
+
setTimeout(function () {
|
2472 |
+
return params.didOpen(popup);
|
2473 |
+
});
|
2474 |
+
} else if (typeof params.onOpen === 'function') {
|
2475 |
+
setTimeout(function () {
|
2476 |
+
return params.onOpen(popup);
|
2477 |
+
}); // @deprecated
|
2478 |
+
}
|
2479 |
+
};
|
2480 |
+
|
2481 |
+
var swalOpenAnimationFinished = function swalOpenAnimationFinished(event) {
|
2482 |
+
var popup = getPopup();
|
2483 |
+
|
2484 |
+
if (event.target !== popup) {
|
2485 |
+
return;
|
2486 |
+
}
|
2487 |
+
|
2488 |
+
var container = getContainer();
|
2489 |
+
popup.removeEventListener(animationEndEvent, swalOpenAnimationFinished);
|
2490 |
+
container.style.overflowY = 'auto';
|
2491 |
+
};
|
2492 |
+
|
2493 |
+
var setScrollingVisibility = function setScrollingVisibility(container, popup) {
|
2494 |
+
if (animationEndEvent && hasCssAnimation(popup)) {
|
2495 |
+
container.style.overflowY = 'hidden';
|
2496 |
+
popup.addEventListener(animationEndEvent, swalOpenAnimationFinished);
|
2497 |
+
} else {
|
2498 |
+
container.style.overflowY = 'auto';
|
2499 |
+
}
|
2500 |
+
};
|
2501 |
+
|
2502 |
+
var fixScrollContainer = function fixScrollContainer(container, scrollbarPadding, initialBodyOverflow) {
|
2503 |
+
iOSfix();
|
2504 |
+
IEfix();
|
2505 |
+
|
2506 |
+
if (scrollbarPadding && initialBodyOverflow !== 'hidden') {
|
2507 |
+
fixScrollbar();
|
2508 |
+
} // sweetalert2/issues/1247
|
2509 |
+
|
2510 |
+
|
2511 |
+
setTimeout(function () {
|
2512 |
+
container.scrollTop = 0;
|
2513 |
+
});
|
2514 |
+
};
|
2515 |
+
|
2516 |
+
var addClasses$1 = function addClasses(container, popup, params) {
|
2517 |
+
addClass(container, params.showClass.backdrop); // the workaround with setting/unsetting opacity is needed for #2019 and 2059
|
2518 |
+
|
2519 |
+
popup.style.setProperty('opacity', '0', 'important');
|
2520 |
+
show(popup);
|
2521 |
+
setTimeout(function () {
|
2522 |
+
// Animate popup right after showing it
|
2523 |
+
addClass(popup, params.showClass.popup); // and remove the opacity workaround
|
2524 |
+
|
2525 |
+
popup.style.removeProperty('opacity');
|
2526 |
+
}, SHOW_CLASS_TIMEOUT); // 10ms in order to fix #2062
|
2527 |
+
|
2528 |
+
addClass([document.documentElement, document.body], swalClasses.shown);
|
2529 |
+
|
2530 |
+
if (params.heightAuto && params.backdrop && !params.toast) {
|
2531 |
+
addClass([document.documentElement, document.body], swalClasses['height-auto']);
|
2532 |
+
}
|
2533 |
+
};
|
2534 |
+
|
2535 |
+
var handleInputOptionsAndValue = function handleInputOptionsAndValue(instance, params) {
|
2536 |
+
if (params.input === 'select' || params.input === 'radio') {
|
2537 |
+
handleInputOptions(instance, params);
|
2538 |
+
} else if (['text', 'email', 'number', 'tel', 'textarea'].indexOf(params.input) !== -1 && (hasToPromiseFn(params.inputValue) || isPromise(params.inputValue))) {
|
2539 |
+
handleInputValue(instance, params);
|
2540 |
+
}
|
2541 |
+
};
|
2542 |
+
var getInputValue = function getInputValue(instance, innerParams) {
|
2543 |
+
var input = instance.getInput();
|
2544 |
+
|
2545 |
+
if (!input) {
|
2546 |
+
return null;
|
2547 |
+
}
|
2548 |
+
|
2549 |
+
switch (innerParams.input) {
|
2550 |
+
case 'checkbox':
|
2551 |
+
return getCheckboxValue(input);
|
2552 |
+
|
2553 |
+
case 'radio':
|
2554 |
+
return getRadioValue(input);
|
2555 |
+
|
2556 |
+
case 'file':
|
2557 |
+
return getFileValue(input);
|
2558 |
+
|
2559 |
+
default:
|
2560 |
+
return innerParams.inputAutoTrim ? input.value.trim() : input.value;
|
2561 |
+
}
|
2562 |
+
};
|
2563 |
+
|
2564 |
+
var getCheckboxValue = function getCheckboxValue(input) {
|
2565 |
+
return input.checked ? 1 : 0;
|
2566 |
+
};
|
2567 |
+
|
2568 |
+
var getRadioValue = function getRadioValue(input) {
|
2569 |
+
return input.checked ? input.value : null;
|
2570 |
+
};
|
2571 |
+
|
2572 |
+
var getFileValue = function getFileValue(input) {
|
2573 |
+
return input.files.length ? input.getAttribute('multiple') !== null ? input.files : input.files[0] : null;
|
2574 |
+
};
|
2575 |
+
|
2576 |
+
var handleInputOptions = function handleInputOptions(instance, params) {
|
2577 |
+
var content = getContent();
|
2578 |
+
|
2579 |
+
var processInputOptions = function processInputOptions(inputOptions) {
|
2580 |
+
return populateInputOptions[params.input](content, formatInputOptions(inputOptions), params);
|
2581 |
+
};
|
2582 |
+
|
2583 |
+
if (hasToPromiseFn(params.inputOptions) || isPromise(params.inputOptions)) {
|
2584 |
+
showLoading();
|
2585 |
+
asPromise(params.inputOptions).then(function (inputOptions) {
|
2586 |
+
instance.hideLoading();
|
2587 |
+
processInputOptions(inputOptions);
|
2588 |
+
});
|
2589 |
+
} else if (_typeof(params.inputOptions) === 'object') {
|
2590 |
+
processInputOptions(params.inputOptions);
|
2591 |
+
} else {
|
2592 |
+
error("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(_typeof(params.inputOptions)));
|
2593 |
+
}
|
2594 |
+
};
|
2595 |
+
|
2596 |
+
var handleInputValue = function handleInputValue(instance, params) {
|
2597 |
+
var input = instance.getInput();
|
2598 |
+
hide(input);
|
2599 |
+
asPromise(params.inputValue).then(function (inputValue) {
|
2600 |
+
input.value = params.input === 'number' ? parseFloat(inputValue) || 0 : "".concat(inputValue);
|
2601 |
+
show(input);
|
2602 |
+
input.focus();
|
2603 |
+
instance.hideLoading();
|
2604 |
+
})["catch"](function (err) {
|
2605 |
+
error("Error in inputValue promise: ".concat(err));
|
2606 |
+
input.value = '';
|
2607 |
+
show(input);
|
2608 |
+
input.focus();
|
2609 |
+
instance.hideLoading();
|
2610 |
+
});
|
2611 |
+
};
|
2612 |
+
|
2613 |
+
var populateInputOptions = {
|
2614 |
+
select: function select(content, inputOptions, params) {
|
2615 |
+
var select = getChildByClass(content, swalClasses.select);
|
2616 |
+
|
2617 |
+
var renderOption = function renderOption(parent, optionLabel, optionValue) {
|
2618 |
+
var option = document.createElement('option');
|
2619 |
+
option.value = optionValue;
|
2620 |
+
setInnerHtml(option, optionLabel);
|
2621 |
+
|
2622 |
+
if (params.inputValue.toString() === optionValue.toString()) {
|
2623 |
+
option.selected = true;
|
2624 |
+
}
|
2625 |
+
|
2626 |
+
parent.appendChild(option);
|
2627 |
+
};
|
2628 |
+
|
2629 |
+
inputOptions.forEach(function (inputOption) {
|
2630 |
+
var optionValue = inputOption[0];
|
2631 |
+
var optionLabel = inputOption[1]; // <optgroup> spec:
|
2632 |
+
// https://www.w3.org/TR/html401/interact/forms.html#h-17.6
|
2633 |
+
// "...all OPTGROUP elements must be specified directly within a SELECT element (i.e., groups may not be nested)..."
|
2634 |
+
// check whether this is a <optgroup>
|
2635 |
+
|
2636 |
+
if (Array.isArray(optionLabel)) {
|
2637 |
+
// if it is an array, then it is an <optgroup>
|
2638 |
+
var optgroup = document.createElement('optgroup');
|
2639 |
+
optgroup.label = optionValue;
|
2640 |
+
optgroup.disabled = false; // not configurable for now
|
2641 |
+
|
2642 |
+
select.appendChild(optgroup);
|
2643 |
+
optionLabel.forEach(function (o) {
|
2644 |
+
return renderOption(optgroup, o[1], o[0]);
|
2645 |
+
});
|
2646 |
+
} else {
|
2647 |
+
// case of <option>
|
2648 |
+
renderOption(select, optionLabel, optionValue);
|
2649 |
+
}
|
2650 |
+
});
|
2651 |
+
select.focus();
|
2652 |
+
},
|
2653 |
+
radio: function radio(content, inputOptions, params) {
|
2654 |
+
var radio = getChildByClass(content, swalClasses.radio);
|
2655 |
+
inputOptions.forEach(function (inputOption) {
|
2656 |
+
var radioValue = inputOption[0];
|
2657 |
+
var radioLabel = inputOption[1];
|
2658 |
+
var radioInput = document.createElement('input');
|
2659 |
+
var radioLabelElement = document.createElement('label');
|
2660 |
+
radioInput.type = 'radio';
|
2661 |
+
radioInput.name = swalClasses.radio;
|
2662 |
+
radioInput.value = radioValue;
|
2663 |
+
|
2664 |
+
if (params.inputValue.toString() === radioValue.toString()) {
|
2665 |
+
radioInput.checked = true;
|
2666 |
+
}
|
2667 |
+
|
2668 |
+
var label = document.createElement('span');
|
2669 |
+
setInnerHtml(label, radioLabel);
|
2670 |
+
label.className = swalClasses.label;
|
2671 |
+
radioLabelElement.appendChild(radioInput);
|
2672 |
+
radioLabelElement.appendChild(label);
|
2673 |
+
radio.appendChild(radioLabelElement);
|
2674 |
+
});
|
2675 |
+
var radios = radio.querySelectorAll('input');
|
2676 |
+
|
2677 |
+
if (radios.length) {
|
2678 |
+
radios[0].focus();
|
2679 |
+
}
|
2680 |
+
}
|
2681 |
+
};
|
2682 |
+
/**
|
2683 |
+
* Converts `inputOptions` into an array of `[value, label]`s
|
2684 |
+
* @param inputOptions
|
2685 |
+
*/
|
2686 |
+
|
2687 |
+
var formatInputOptions = function formatInputOptions(inputOptions) {
|
2688 |
+
var result = [];
|
2689 |
+
|
2690 |
+
if (typeof Map !== 'undefined' && inputOptions instanceof Map) {
|
2691 |
+
inputOptions.forEach(function (value, key) {
|
2692 |
+
var valueFormatted = value;
|
2693 |
+
|
2694 |
+
if (_typeof(valueFormatted) === 'object') {
|
2695 |
+
// case of <optgroup>
|
2696 |
+
valueFormatted = formatInputOptions(valueFormatted);
|
2697 |
+
}
|
2698 |
+
|
2699 |
+
result.push([key, valueFormatted]);
|
2700 |
+
});
|
2701 |
+
} else {
|
2702 |
+
Object.keys(inputOptions).forEach(function (key) {
|
2703 |
+
var valueFormatted = inputOptions[key];
|
2704 |
+
|
2705 |
+
if (_typeof(valueFormatted) === 'object') {
|
2706 |
+
// case of <optgroup>
|
2707 |
+
valueFormatted = formatInputOptions(valueFormatted);
|
2708 |
+
}
|
2709 |
+
|
2710 |
+
result.push([key, valueFormatted]);
|
2711 |
+
});
|
2712 |
+
}
|
2713 |
+
|
2714 |
+
return result;
|
2715 |
+
};
|
2716 |
+
|
2717 |
+
var handleConfirmButtonClick = function handleConfirmButtonClick(instance, innerParams) {
|
2718 |
+
instance.disableButtons();
|
2719 |
+
|
2720 |
+
if (innerParams.input) {
|
2721 |
+
handleConfirmOrDenyWithInput(instance, innerParams, 'confirm');
|
2722 |
+
} else {
|
2723 |
+
confirm(instance, innerParams, true);
|
2724 |
+
}
|
2725 |
+
};
|
2726 |
+
var handleDenyButtonClick = function handleDenyButtonClick(instance, innerParams) {
|
2727 |
+
instance.disableButtons(); // here we could add preDeny in future, if needed
|
2728 |
+
|
2729 |
+
if (innerParams.returnInputValueOnDeny) {
|
2730 |
+
handleConfirmOrDenyWithInput(instance, innerParams, 'deny');
|
2731 |
+
} else {
|
2732 |
+
deny(instance, false);
|
2733 |
+
}
|
2734 |
+
};
|
2735 |
+
var handleCancelButtonClick = function handleCancelButtonClick(instance, dismissWith) {
|
2736 |
+
instance.disableButtons();
|
2737 |
+
dismissWith(DismissReason.cancel);
|
2738 |
+
};
|
2739 |
+
|
2740 |
+
var handleConfirmOrDenyWithInput = function handleConfirmOrDenyWithInput(instance, innerParams, type
|
2741 |
+
/* type is either 'confirm' or 'deny' */
|
2742 |
+
) {
|
2743 |
+
var inputValue = getInputValue(instance, innerParams);
|
2744 |
+
|
2745 |
+
if (innerParams.inputValidator) {
|
2746 |
+
handleInputValidator(instance, innerParams, inputValue);
|
2747 |
+
} else if (!instance.getInput().checkValidity()) {
|
2748 |
+
instance.enableButtons();
|
2749 |
+
instance.showValidationMessage(innerParams.validationMessage);
|
2750 |
+
} else if (type === 'deny') {
|
2751 |
+
deny(instance, inputValue);
|
2752 |
+
} else {
|
2753 |
+
confirm(instance, innerParams, inputValue);
|
2754 |
+
}
|
2755 |
+
};
|
2756 |
+
|
2757 |
+
var handleInputValidator = function handleInputValidator(instance, innerParams, inputValue) {
|
2758 |
+
instance.disableInput();
|
2759 |
+
var validationPromise = Promise.resolve().then(function () {
|
2760 |
+
return asPromise(innerParams.inputValidator(inputValue, innerParams.validationMessage));
|
2761 |
+
});
|
2762 |
+
validationPromise.then(function (validationMessage) {
|
2763 |
+
instance.enableButtons();
|
2764 |
+
instance.enableInput();
|
2765 |
+
|
2766 |
+
if (validationMessage) {
|
2767 |
+
instance.showValidationMessage(validationMessage);
|
2768 |
+
} else {
|
2769 |
+
confirm(instance, innerParams, inputValue);
|
2770 |
+
}
|
2771 |
+
});
|
2772 |
+
};
|
2773 |
+
|
2774 |
+
var deny = function deny(instance, value) {
|
2775 |
+
instance.closePopup({
|
2776 |
+
isDenied: true,
|
2777 |
+
value: value
|
2778 |
+
});
|
2779 |
+
};
|
2780 |
+
|
2781 |
+
var succeedWith = function succeedWith(instance, value) {
|
2782 |
+
instance.closePopup({
|
2783 |
+
isConfirmed: true,
|
2784 |
+
value: value
|
2785 |
+
});
|
2786 |
+
};
|
2787 |
+
|
2788 |
+
var confirm = function confirm(instance, innerParams, value) {
|
2789 |
+
if (innerParams.showLoaderOnConfirm) {
|
2790 |
+
showLoading(); // TODO: make showLoading an *instance* method
|
2791 |
+
}
|
2792 |
+
|
2793 |
+
if (innerParams.preConfirm) {
|
2794 |
+
instance.resetValidationMessage();
|
2795 |
+
var preConfirmPromise = Promise.resolve().then(function () {
|
2796 |
+
return asPromise(innerParams.preConfirm(value, innerParams.validationMessage));
|
2797 |
+
});
|
2798 |
+
preConfirmPromise.then(function (preConfirmValue) {
|
2799 |
+
if (isVisible(getValidationMessage()) || preConfirmValue === false) {
|
2800 |
+
instance.hideLoading();
|
2801 |
+
} else {
|
2802 |
+
succeedWith(instance, typeof preConfirmValue === 'undefined' ? value : preConfirmValue);
|
2803 |
+
}
|
2804 |
+
});
|
2805 |
+
} else {
|
2806 |
+
succeedWith(instance, value);
|
2807 |
+
}
|
2808 |
+
};
|
2809 |
+
|
2810 |
+
var addKeydownHandler = function addKeydownHandler(instance, globalState, innerParams, dismissWith) {
|
2811 |
+
if (globalState.keydownTarget && globalState.keydownHandlerAdded) {
|
2812 |
+
globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, {
|
2813 |
+
capture: globalState.keydownListenerCapture
|
2814 |
+
});
|
2815 |
+
globalState.keydownHandlerAdded = false;
|
2816 |
+
}
|
2817 |
+
|
2818 |
+
if (!innerParams.toast) {
|
2819 |
+
globalState.keydownHandler = function (e) {
|
2820 |
+
return keydownHandler(instance, e, dismissWith);
|
2821 |
+
};
|
2822 |
+
|
2823 |
+
globalState.keydownTarget = innerParams.keydownListenerCapture ? window : getPopup();
|
2824 |
+
globalState.keydownListenerCapture = innerParams.keydownListenerCapture;
|
2825 |
+
globalState.keydownTarget.addEventListener('keydown', globalState.keydownHandler, {
|
2826 |
+
capture: globalState.keydownListenerCapture
|
2827 |
+
});
|
2828 |
+
globalState.keydownHandlerAdded = true;
|
2829 |
+
}
|
2830 |
+
}; // Focus handling
|
2831 |
+
|
2832 |
+
var setFocus = function setFocus(innerParams, index, increment) {
|
2833 |
+
var focusableElements = getFocusableElements(); // search for visible elements and select the next possible match
|
2834 |
+
|
2835 |
+
for (var i = 0; i < focusableElements.length; i++) {
|
2836 |
+
index = index + increment; // rollover to first item
|
2837 |
+
|
2838 |
+
if (index === focusableElements.length) {
|
2839 |
+
index = 0; // go to last item
|
2840 |
+
} else if (index === -1) {
|
2841 |
+
index = focusableElements.length - 1;
|
2842 |
+
}
|
2843 |
+
|
2844 |
+
return focusableElements[index].focus();
|
2845 |
+
} // no visible focusable elements, focus the popup
|
2846 |
+
|
2847 |
+
|
2848 |
+
getPopup().focus();
|
2849 |
+
};
|
2850 |
+
var arrowKeysNextButton = ['ArrowRight', 'ArrowDown', 'Right', 'Down' // IE11
|
2851 |
+
];
|
2852 |
+
var arrowKeysPreviousButton = ['ArrowLeft', 'ArrowUp', 'Left', 'Up' // IE11
|
2853 |
+
];
|
2854 |
+
var escKeys = ['Escape', 'Esc' // IE11
|
2855 |
+
];
|
2856 |
+
|
2857 |
+
var keydownHandler = function keydownHandler(instance, e, dismissWith) {
|
2858 |
+
var innerParams = privateProps.innerParams.get(instance);
|
2859 |
+
|
2860 |
+
if (innerParams.stopKeydownPropagation) {
|
2861 |
+
e.stopPropagation();
|
2862 |
+
} // ENTER
|
2863 |
+
|
2864 |
+
|
2865 |
+
if (e.key === 'Enter') {
|
2866 |
+
handleEnter(instance, e, innerParams); // TAB
|
2867 |
+
} else if (e.key === 'Tab') {
|
2868 |
+
handleTab(e, innerParams); // ARROWS - switch focus between buttons
|
2869 |
+
} else if ([].concat(arrowKeysNextButton, arrowKeysPreviousButton).indexOf(e.key) !== -1) {
|
2870 |
+
handleArrows(e.key); // ESC
|
2871 |
+
} else if (escKeys.indexOf(e.key) !== -1) {
|
2872 |
+
handleEsc(e, innerParams, dismissWith);
|
2873 |
+
}
|
2874 |
+
};
|
2875 |
+
|
2876 |
+
var handleEnter = function handleEnter(instance, e, innerParams) {
|
2877 |
+
// #720 #721
|
2878 |
+
if (e.isComposing) {
|
2879 |
+
return;
|
2880 |
+
}
|
2881 |
+
|
2882 |
+
if (e.target && instance.getInput() && e.target.outerHTML === instance.getInput().outerHTML) {
|
2883 |
+
if (['textarea', 'file'].indexOf(innerParams.input) !== -1) {
|
2884 |
+
return; // do not submit
|
2885 |
+
}
|
2886 |
+
|
2887 |
+
clickConfirm();
|
2888 |
+
e.preventDefault();
|
2889 |
+
}
|
2890 |
+
};
|
2891 |
+
|
2892 |
+
var handleTab = function handleTab(e, innerParams) {
|
2893 |
+
var targetElement = e.target;
|
2894 |
+
var focusableElements = getFocusableElements();
|
2895 |
+
var btnIndex = -1;
|
2896 |
+
|
2897 |
+
for (var i = 0; i < focusableElements.length; i++) {
|
2898 |
+
if (targetElement === focusableElements[i]) {
|
2899 |
+
btnIndex = i;
|
2900 |
+
break;
|
2901 |
+
}
|
2902 |
+
}
|
2903 |
+
|
2904 |
+
if (!e.shiftKey) {
|
2905 |
+
// Cycle to the next button
|
2906 |
+
setFocus(innerParams, btnIndex, 1);
|
2907 |
+
} else {
|
2908 |
+
// Cycle to the prev button
|
2909 |
+
setFocus(innerParams, btnIndex, -1);
|
2910 |
+
}
|
2911 |
+
|
2912 |
+
e.stopPropagation();
|
2913 |
+
e.preventDefault();
|
2914 |
+
};
|
2915 |
+
|
2916 |
+
var handleArrows = function handleArrows(key) {
|
2917 |
+
var confirmButton = getConfirmButton();
|
2918 |
+
var denyButton = getDenyButton();
|
2919 |
+
var cancelButton = getCancelButton();
|
2920 |
+
|
2921 |
+
if (!([confirmButton, denyButton, cancelButton].indexOf(document.activeElement) !== -1)) {
|
2922 |
+
return;
|
2923 |
+
}
|
2924 |
+
|
2925 |
+
var sibling = arrowKeysNextButton.indexOf(key) !== -1 ? 'nextElementSibling' : 'previousElementSibling';
|
2926 |
+
var buttonToFocus = document.activeElement[sibling];
|
2927 |
+
|
2928 |
+
if (buttonToFocus) {
|
2929 |
+
buttonToFocus.focus();
|
2930 |
+
}
|
2931 |
+
};
|
2932 |
+
|
2933 |
+
var handleEsc = function handleEsc(e, innerParams, dismissWith) {
|
2934 |
+
if (callIfFunction(innerParams.allowEscapeKey)) {
|
2935 |
+
e.preventDefault();
|
2936 |
+
dismissWith(DismissReason.esc);
|
2937 |
+
}
|
2938 |
+
};
|
2939 |
+
|
2940 |
+
var handlePopupClick = function handlePopupClick(instance, domCache, dismissWith) {
|
2941 |
+
var innerParams = privateProps.innerParams.get(instance);
|
2942 |
+
|
2943 |
+
if (innerParams.toast) {
|
2944 |
+
handleToastClick(instance, domCache, dismissWith);
|
2945 |
+
} else {
|
2946 |
+
// Ignore click events that had mousedown on the popup but mouseup on the container
|
2947 |
+
// This can happen when the user drags a slider
|
2948 |
+
handleModalMousedown(domCache); // Ignore click events that had mousedown on the container but mouseup on the popup
|
2949 |
+
|
2950 |
+
handleContainerMousedown(domCache);
|
2951 |
+
handleModalClick(instance, domCache, dismissWith);
|
2952 |
+
}
|
2953 |
+
};
|
2954 |
+
|
2955 |
+
var handleToastClick = function handleToastClick(instance, domCache, dismissWith) {
|
2956 |
+
// Closing toast by internal click
|
2957 |
+
domCache.popup.onclick = function () {
|
2958 |
+
var innerParams = privateProps.innerParams.get(instance);
|
2959 |
+
|
2960 |
+
if (innerParams.showConfirmButton || innerParams.showDenyButton || innerParams.showCancelButton || innerParams.showCloseButton || innerParams.input) {
|
2961 |
+
return;
|
2962 |
+
}
|
2963 |
+
|
2964 |
+
dismissWith(DismissReason.close);
|
2965 |
+
};
|
2966 |
+
};
|
2967 |
+
|
2968 |
+
var ignoreOutsideClick = false;
|
2969 |
+
|
2970 |
+
var handleModalMousedown = function handleModalMousedown(domCache) {
|
2971 |
+
domCache.popup.onmousedown = function () {
|
2972 |
+
domCache.container.onmouseup = function (e) {
|
2973 |
+
domCache.container.onmouseup = undefined; // We only check if the mouseup target is the container because usually it doesn't
|
2974 |
+
// have any other direct children aside of the popup
|
2975 |
+
|
2976 |
+
if (e.target === domCache.container) {
|
2977 |
+
ignoreOutsideClick = true;
|
2978 |
+
}
|
2979 |
+
};
|
2980 |
+
};
|
2981 |
+
};
|
2982 |
+
|
2983 |
+
var handleContainerMousedown = function handleContainerMousedown(domCache) {
|
2984 |
+
domCache.container.onmousedown = function () {
|
2985 |
+
domCache.popup.onmouseup = function (e) {
|
2986 |
+
domCache.popup.onmouseup = undefined; // We also need to check if the mouseup target is a child of the popup
|
2987 |
+
|
2988 |
+
if (e.target === domCache.popup || domCache.popup.contains(e.target)) {
|
2989 |
+
ignoreOutsideClick = true;
|
2990 |
+
}
|
2991 |
+
};
|
2992 |
+
};
|
2993 |
+
};
|
2994 |
+
|
2995 |
+
var handleModalClick = function handleModalClick(instance, domCache, dismissWith) {
|
2996 |
+
domCache.container.onclick = function (e) {
|
2997 |
+
var innerParams = privateProps.innerParams.get(instance);
|
2998 |
+
|
2999 |
+
if (ignoreOutsideClick) {
|
3000 |
+
ignoreOutsideClick = false;
|
3001 |
+
return;
|
3002 |
+
}
|
3003 |
+
|
3004 |
+
if (e.target === domCache.container && callIfFunction(innerParams.allowOutsideClick)) {
|
3005 |
+
dismissWith(DismissReason.backdrop);
|
3006 |
+
}
|
3007 |
+
};
|
3008 |
+
};
|
3009 |
+
|
3010 |
+
function _main(userParams) {
|
3011 |
+
showWarningsForParams(userParams);
|
3012 |
+
|
3013 |
+
if (globalState.currentInstance) {
|
3014 |
+
globalState.currentInstance._destroy();
|
3015 |
+
}
|
3016 |
+
|
3017 |
+
globalState.currentInstance = this;
|
3018 |
+
var innerParams = prepareParams(userParams);
|
3019 |
+
setParameters(innerParams);
|
3020 |
+
Object.freeze(innerParams); // clear the previous timer
|
3021 |
+
|
3022 |
+
if (globalState.timeout) {
|
3023 |
+
globalState.timeout.stop();
|
3024 |
+
delete globalState.timeout;
|
3025 |
+
} // clear the restore focus timeout
|
3026 |
+
|
3027 |
+
|
3028 |
+
clearTimeout(globalState.restoreFocusTimeout);
|
3029 |
+
var domCache = populateDomCache(this);
|
3030 |
+
render(this, innerParams);
|
3031 |
+
privateProps.innerParams.set(this, innerParams);
|
3032 |
+
return swalPromise(this, domCache, innerParams);
|
3033 |
+
}
|
3034 |
+
|
3035 |
+
var prepareParams = function prepareParams(userParams) {
|
3036 |
+
var showClass = _extends({}, defaultParams.showClass, userParams.showClass);
|
3037 |
+
|
3038 |
+
var hideClass = _extends({}, defaultParams.hideClass, userParams.hideClass);
|
3039 |
+
|
3040 |
+
var params = _extends({}, defaultParams, userParams);
|
3041 |
+
|
3042 |
+
params.showClass = showClass;
|
3043 |
+
params.hideClass = hideClass; // @deprecated
|
3044 |
+
|
3045 |
+
if (userParams.animation === false) {
|
3046 |
+
params.showClass = {
|
3047 |
+
popup: 'swal2-noanimation',
|
3048 |
+
backdrop: 'swal2-noanimation'
|
3049 |
+
};
|
3050 |
+
params.hideClass = {};
|
3051 |
+
}
|
3052 |
+
|
3053 |
+
return params;
|
3054 |
+
};
|
3055 |
+
|
3056 |
+
var swalPromise = function swalPromise(instance, domCache, innerParams) {
|
3057 |
+
return new Promise(function (resolve) {
|
3058 |
+
// functions to handle all closings/dismissals
|
3059 |
+
var dismissWith = function dismissWith(dismiss) {
|
3060 |
+
instance.closePopup({
|
3061 |
+
isDismissed: true,
|
3062 |
+
dismiss: dismiss
|
3063 |
+
});
|
3064 |
+
};
|
3065 |
+
|
3066 |
+
privateMethods.swalPromiseResolve.set(instance, resolve);
|
3067 |
+
|
3068 |
+
domCache.confirmButton.onclick = function () {
|
3069 |
+
return handleConfirmButtonClick(instance, innerParams);
|
3070 |
+
};
|
3071 |
+
|
3072 |
+
domCache.denyButton.onclick = function () {
|
3073 |
+
return handleDenyButtonClick(instance, innerParams);
|
3074 |
+
};
|
3075 |
+
|
3076 |
+
domCache.cancelButton.onclick = function () {
|
3077 |
+
return handleCancelButtonClick(instance, dismissWith);
|
3078 |
+
};
|
3079 |
+
|
3080 |
+
domCache.closeButton.onclick = function () {
|
3081 |
+
return dismissWith(DismissReason.close);
|
3082 |
+
};
|
3083 |
+
|
3084 |
+
handlePopupClick(instance, domCache, dismissWith);
|
3085 |
+
addKeydownHandler(instance, globalState, innerParams, dismissWith);
|
3086 |
+
|
3087 |
+
if (innerParams.toast && (innerParams.input || innerParams.footer || innerParams.showCloseButton)) {
|
3088 |
+
addClass(document.body, swalClasses['toast-column']);
|
3089 |
+
} else {
|
3090 |
+
removeClass(document.body, swalClasses['toast-column']);
|
3091 |
+
}
|
3092 |
+
|
3093 |
+
handleInputOptionsAndValue(instance, innerParams);
|
3094 |
+
openPopup(innerParams);
|
3095 |
+
setupTimer(globalState, innerParams, dismissWith);
|
3096 |
+
initFocus(domCache, innerParams); // Scroll container to top on open (#1247, #1946)
|
3097 |
+
|
3098 |
+
setTimeout(function () {
|
3099 |
+
domCache.container.scrollTop = 0;
|
3100 |
+
});
|
3101 |
+
});
|
3102 |
+
};
|
3103 |
+
|
3104 |
+
var populateDomCache = function populateDomCache(instance) {
|
3105 |
+
var domCache = {
|
3106 |
+
popup: getPopup(),
|
3107 |
+
container: getContainer(),
|
3108 |
+
content: getContent(),
|
3109 |
+
actions: getActions(),
|
3110 |
+
confirmButton: getConfirmButton(),
|
3111 |
+
denyButton: getDenyButton(),
|
3112 |
+
cancelButton: getCancelButton(),
|
3113 |
+
loader: getLoader(),
|
3114 |
+
closeButton: getCloseButton(),
|
3115 |
+
validationMessage: getValidationMessage(),
|
3116 |
+
progressSteps: getProgressSteps()
|
3117 |
+
};
|
3118 |
+
privateProps.domCache.set(instance, domCache);
|
3119 |
+
return domCache;
|
3120 |
+
};
|
3121 |
+
|
3122 |
+
var setupTimer = function setupTimer(globalState$$1, innerParams, dismissWith) {
|
3123 |
+
var timerProgressBar = getTimerProgressBar();
|
3124 |
+
hide(timerProgressBar);
|
3125 |
+
|
3126 |
+
if (innerParams.timer) {
|
3127 |
+
globalState$$1.timeout = new Timer(function () {
|
3128 |
+
dismissWith('timer');
|
3129 |
+
delete globalState$$1.timeout;
|
3130 |
+
}, innerParams.timer);
|
3131 |
+
|
3132 |
+
if (innerParams.timerProgressBar) {
|
3133 |
+
show(timerProgressBar);
|
3134 |
+
setTimeout(function () {
|
3135 |
+
if (globalState$$1.timeout.running) {
|
3136 |
+
// timer can be already stopped at this point
|
3137 |
+
animateTimerProgressBar(innerParams.timer);
|
3138 |
+
}
|
3139 |
+
});
|
3140 |
+
}
|
3141 |
+
}
|
3142 |
+
};
|
3143 |
+
|
3144 |
+
var initFocus = function initFocus(domCache, innerParams) {
|
3145 |
+
if (innerParams.toast) {
|
3146 |
+
return;
|
3147 |
+
}
|
3148 |
+
|
3149 |
+
if (!callIfFunction(innerParams.allowEnterKey)) {
|
3150 |
+
return blurActiveElement();
|
3151 |
+
}
|
3152 |
+
|
3153 |
+
if (!focusButton(domCache, innerParams)) {
|
3154 |
+
setFocus(innerParams, -1, 1);
|
3155 |
+
}
|
3156 |
+
};
|
3157 |
+
|
3158 |
+
var focusButton = function focusButton(domCache, innerParams) {
|
3159 |
+
if (innerParams.focusDeny && isVisible(domCache.denyButton)) {
|
3160 |
+
domCache.denyButton.focus();
|
3161 |
+
return true;
|
3162 |
+
}
|
3163 |
+
|
3164 |
+
if (innerParams.focusCancel && isVisible(domCache.cancelButton)) {
|
3165 |
+
domCache.cancelButton.focus();
|
3166 |
+
return true;
|
3167 |
+
}
|
3168 |
+
|
3169 |
+
if (innerParams.focusConfirm && isVisible(domCache.confirmButton)) {
|
3170 |
+
domCache.confirmButton.focus();
|
3171 |
+
return true;
|
3172 |
+
}
|
3173 |
+
|
3174 |
+
return false;
|
3175 |
+
};
|
3176 |
+
|
3177 |
+
var blurActiveElement = function blurActiveElement() {
|
3178 |
+
if (document.activeElement && typeof document.activeElement.blur === 'function') {
|
3179 |
+
document.activeElement.blur();
|
3180 |
+
}
|
3181 |
+
};
|
3182 |
+
|
3183 |
+
/**
|
3184 |
+
* Updates popup parameters.
|
3185 |
+
*/
|
3186 |
+
|
3187 |
+
function update(params) {
|
3188 |
+
var popup = getPopup();
|
3189 |
+
var innerParams = privateProps.innerParams.get(this);
|
3190 |
+
|
3191 |
+
if (!popup || hasClass(popup, innerParams.hideClass.popup)) {
|
3192 |
+
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.");
|
3193 |
+
}
|
3194 |
+
|
3195 |
+
var validUpdatableParams = {}; // assign valid params from `params` to `defaults`
|
3196 |
+
|
3197 |
+
Object.keys(params).forEach(function (param) {
|
3198 |
+
if (Swal.isUpdatableParameter(param)) {
|
3199 |
+
validUpdatableParams[param] = params[param];
|
3200 |
+
} else {
|
3201 |
+
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"));
|
3202 |
+
}
|
3203 |
+
});
|
3204 |
+
|
3205 |
+
var updatedParams = _extends({}, innerParams, validUpdatableParams);
|
3206 |
+
|
3207 |
+
render(this, updatedParams);
|
3208 |
+
privateProps.innerParams.set(this, updatedParams);
|
3209 |
+
Object.defineProperties(this, {
|
3210 |
+
params: {
|
3211 |
+
value: _extends({}, this.params, params),
|
3212 |
+
writable: false,
|
3213 |
+
enumerable: true
|
3214 |
+
}
|
3215 |
+
});
|
3216 |
+
}
|
3217 |
+
|
3218 |
+
function _destroy() {
|
3219 |
+
var domCache = privateProps.domCache.get(this);
|
3220 |
+
var innerParams = privateProps.innerParams.get(this);
|
3221 |
+
|
3222 |
+
if (!innerParams) {
|
3223 |
+
return; // This instance has already been destroyed
|
3224 |
+
} // Check if there is another Swal closing
|
3225 |
+
|
3226 |
+
|
3227 |
+
if (domCache.popup && globalState.swalCloseEventFinishedCallback) {
|
3228 |
+
globalState.swalCloseEventFinishedCallback();
|
3229 |
+
delete globalState.swalCloseEventFinishedCallback;
|
3230 |
+
} // Check if there is a swal disposal defer timer
|
3231 |
+
|
3232 |
+
|
3233 |
+
if (globalState.deferDisposalTimer) {
|
3234 |
+
clearTimeout(globalState.deferDisposalTimer);
|
3235 |
+
delete globalState.deferDisposalTimer;
|
3236 |
+
}
|
3237 |
+
|
3238 |
+
runDidDestroy(innerParams);
|
3239 |
+
disposeSwal(this);
|
3240 |
+
}
|
3241 |
+
|
3242 |
+
var runDidDestroy = function runDidDestroy(innerParams) {
|
3243 |
+
if (typeof innerParams.didDestroy === 'function') {
|
3244 |
+
innerParams.didDestroy();
|
3245 |
+
} else if (typeof innerParams.onDestroy === 'function') {
|
3246 |
+
innerParams.onDestroy(); // @deprecated
|
3247 |
+
}
|
3248 |
+
};
|
3249 |
+
|
3250 |
+
var disposeSwal = function disposeSwal(instance) {
|
3251 |
+
// Unset this.params so GC will dispose it (#1569)
|
3252 |
+
delete instance.params; // Unset globalState props so GC will dispose globalState (#1569)
|
3253 |
+
|
3254 |
+
delete globalState.keydownHandler;
|
3255 |
+
delete globalState.keydownTarget; // Unset WeakMaps so GC will be able to dispose them (#1569)
|
3256 |
+
|
3257 |
+
unsetWeakMaps(privateProps);
|
3258 |
+
unsetWeakMaps(privateMethods);
|
3259 |
+
};
|
3260 |
+
|
3261 |
+
var unsetWeakMaps = function unsetWeakMaps(obj) {
|
3262 |
+
for (var i in obj) {
|
3263 |
+
obj[i] = new WeakMap();
|
3264 |
+
}
|
3265 |
+
};
|
3266 |
+
|
3267 |
+
|
3268 |
+
|
3269 |
+
var instanceMethods = /*#__PURE__*/Object.freeze({
|
3270 |
+
hideLoading: hideLoading,
|
3271 |
+
disableLoading: hideLoading,
|
3272 |
+
getInput: getInput$1,
|
3273 |
+
close: close,
|
3274 |
+
closePopup: close,
|
3275 |
+
closeModal: close,
|
3276 |
+
closeToast: close,
|
3277 |
+
enableButtons: enableButtons,
|
3278 |
+
disableButtons: disableButtons,
|
3279 |
+
enableInput: enableInput,
|
3280 |
+
disableInput: disableInput,
|
3281 |
+
showValidationMessage: showValidationMessage,
|
3282 |
+
resetValidationMessage: resetValidationMessage$1,
|
3283 |
+
getProgressSteps: getProgressSteps$1,
|
3284 |
+
_main: _main,
|
3285 |
+
update: update,
|
3286 |
+
_destroy: _destroy
|
3287 |
+
});
|
3288 |
+
|
3289 |
+
var currentInstance;
|
3290 |
+
|
3291 |
+
var SweetAlert = /*#__PURE__*/function () {
|
3292 |
+
function SweetAlert() {
|
3293 |
+
_classCallCheck(this, SweetAlert);
|
3294 |
+
|
3295 |
+
// Prevent run in Node env
|
3296 |
+
if (typeof window === 'undefined') {
|
3297 |
+
return;
|
3298 |
+
} // Check for the existence of Promise
|
3299 |
+
|
3300 |
+
|
3301 |
+
if (typeof Promise === 'undefined') {
|
3302 |
+
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)');
|
3303 |
+
}
|
3304 |
+
|
3305 |
+
currentInstance = this;
|
3306 |
+
|
3307 |
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
3308 |
+
args[_key] = arguments[_key];
|
3309 |
+
}
|
3310 |
+
|
3311 |
+
var outerParams = Object.freeze(this.constructor.argsToParams(args));
|
3312 |
+
Object.defineProperties(this, {
|
3313 |
+
params: {
|
3314 |
+
value: outerParams,
|
3315 |
+
writable: false,
|
3316 |
+
enumerable: true,
|
3317 |
+
configurable: true
|
3318 |
+
}
|
3319 |
+
});
|
3320 |
+
|
3321 |
+
var promise = this._main(this.params);
|
3322 |
+
|
3323 |
+
privateProps.promise.set(this, promise);
|
3324 |
+
} // `catch` cannot be the name of a module export, so we define our thenable methods here instead
|
3325 |
+
|
3326 |
+
|
3327 |
+
_createClass(SweetAlert, [{
|
3328 |
+
key: "then",
|
3329 |
+
value: function then(onFulfilled) {
|
3330 |
+
var promise = privateProps.promise.get(this);
|
3331 |
+
return promise.then(onFulfilled);
|
3332 |
+
}
|
3333 |
+
}, {
|
3334 |
+
key: "finally",
|
3335 |
+
value: function _finally(onFinally) {
|
3336 |
+
var promise = privateProps.promise.get(this);
|
3337 |
+
return promise["finally"](onFinally);
|
3338 |
+
}
|
3339 |
+
}]);
|
3340 |
+
|
3341 |
+
return SweetAlert;
|
3342 |
+
}(); // Assign instance methods from src/instanceMethods/*.js to prototype
|
3343 |
+
|
3344 |
+
|
3345 |
+
_extends(SweetAlert.prototype, instanceMethods); // Assign static methods from src/staticMethods/*.js to constructor
|
3346 |
+
|
3347 |
+
|
3348 |
+
_extends(SweetAlert, staticMethods); // Proxy to instance methods to constructor, for now, for backwards compatibility
|
3349 |
+
|
3350 |
+
|
3351 |
+
Object.keys(instanceMethods).forEach(function (key) {
|
3352 |
+
SweetAlert[key] = function () {
|
3353 |
+
if (currentInstance) {
|
3354 |
+
var _currentInstance;
|
3355 |
+
|
3356 |
+
return (_currentInstance = currentInstance)[key].apply(_currentInstance, arguments);
|
3357 |
+
}
|
3358 |
+
};
|
3359 |
+
});
|
3360 |
+
SweetAlert.DismissReason = DismissReason;
|
3361 |
+
SweetAlert.version = '10.6.1';
|
3362 |
+
|
3363 |
+
var Swal = SweetAlert;
|
3364 |
+
Swal["default"] = Swal;
|
3365 |
+
|
3366 |
+
return Swal;
|
3367 |
+
|
3368 |
+
}));
|
3369 |
+
if (typeof this !== 'undefined' && this.Sweetalert2){ this.swal = this.sweetAlert = this.Swal = this.SweetAlert = this.Sweetalert2}
|
assets/sweetalert2/dist/sweetalert2.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.swal2-popup.swal2-toast{flex-direction:row;align-items:center;width:auto;padding:.625em;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 .6em;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;padding:0;font-size:1em}.swal2-popup.swal2-toast .swal2-icon{width:2em;min-width:2em;height:2em;margin: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-basis:auto!important;width:auto;height:auto;margin:0 .3125em;padding:0}.swal2-popup.swal2-toast .swal2-styled{margin:0 .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(50,100,150,.4)}.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:.3125em;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 1.6em}.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 2em;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:1.0625em}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#d14529;color:#fff;font-size:1.0625em}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#757575;color:#fff;font-size:1.0625em}.swal2-styled:focus{outline:0;box-shadow:0 0 0 1px #fff,0 0 0 3px rgba(50,100,150,.4)}.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:.3125em;border-bottom-left-radius:.3125em}.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:0;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::-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 3px #c4e6f5}.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::-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{margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto}.swal2-validation-message{display:none;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%;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}}@-moz-document url-prefix(){.swal2-close:focus{outline:2px solid rgba(50,100,150,.4)}}@-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}body.swal2-toast-column .swal2-toast{flex-direction:column;align-items:stretch}body.swal2-toast-column .swal2-toast .swal2-actions{flex:1;align-self:stretch;height:2.2em;margin-top:.3125em}body.swal2-toast-column .swal2-toast .swal2-loading{justify-content:center}body.swal2-toast-column .swal2-toast .swal2-input{height:2em;margin:.3125em auto;font-size:1em}body.swal2-toast-column .swal2-toast .swal2-validation-message{font-size:1em}
|
assets/sweetalert2/dist/sweetalert2.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Sweetalert2=e()}(this,function(){"use strict";function r(t){return(r="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})(t)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function s(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),t}function c(){return(c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t}).apply(this,arguments)}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function l(t,e){return(l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function d(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}function i(t,e,n){return(i=d()?Reflect.construct:function(t,e,n){var o=[null];o.push.apply(o,e);var i=new(Function.bind.apply(t,o));return n&&l(i,n.prototype),i}).apply(null,arguments)}function p(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function f(t,e,n){return(f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var o=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=u(t)););return t}(t,e);if(o){var i=Object.getOwnPropertyDescriptor(o,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}function m(e){return Object.keys(e).map(function(t){return e[t]})}function h(t){return Array.prototype.slice.call(t)}function g(t,e){var n;n='"'.concat(t,'" is deprecated and will be removed in the next major release. Please use "').concat(e,'" instead.'),-1===Y.indexOf(n)&&(Y.push(n),W(n))}function v(t){return t&&"function"==typeof t.toPromise}function y(t){return v(t)?t.toPromise():Promise.resolve(t)}function b(t){return t&&Promise.resolve(t)===t}function w(t){return t instanceof Element||"object"===r(e=t)&&e.jquery;var e}function t(t){var e={};for(var n in t)e[t[n]]="swal2-"+t[n];return e}function C(){return document.body.querySelector(".".concat($.container))}function k(t){var e=C();return e?e.querySelector(t):null}function e(t){return k(".".concat(t))}function x(){return e($.popup)}function n(){var t=x();return h(t.querySelectorAll(".".concat($.icon)))}function B(){var t=n().filter(function(t){return bt(t)});return t.length?t[0]:null}function A(){return e($.title)}function P(){return e($.content)}function E(){return e($.image)}function O(){return e($["progress-steps"])}function S(){return e($["validation-message"])}function T(){return k(".".concat($.actions," .").concat($.confirm))}function L(){return k(".".concat($.actions," .").concat($.deny))}function D(){return k(".".concat($.loader))}function I(){return k(".".concat($.actions," .").concat($.cancel))}function q(){return e($.actions)}function j(){return e($.header)}function M(){return e($.footer)}function V(){return e($["timer-progress-bar"])}function H(){return e($.close)}function R(){var t=h(x().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort(function(t,e){return t=parseInt(t.getAttribute("tabindex")),(e=parseInt(e.getAttribute("tabindex")))<t?1:t<e?-1:0}),e=h(x().querySelectorAll('\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')).filter(function(t){return"-1"!==t.getAttribute("tabindex")});return function(t){for(var e=[],n=0;n<t.length;n++)-1===e.indexOf(t[n])&&e.push(t[n]);return e}(t.concat(e)).filter(function(t){return bt(t)})}function N(){return!X()&&!document.body.classList.contains($["no-backdrop"])}function U(e,t){var n;e.textContent="",t&&(n=(new DOMParser).parseFromString(t,"text/html"),h(n.querySelector("head").childNodes).forEach(function(t){e.appendChild(t)}),h(n.querySelector("body").childNodes).forEach(function(t){e.appendChild(t)}))}function _(t,e){if(e){for(var n=e.split(/\s+/),o=0;o<n.length;o++)if(!t.classList.contains(n[o]))return;return 1}}function F(t,e,n){var o,i;if(i=e,h((o=t).classList).forEach(function(t){-1===m($).indexOf(t)&&-1===m(J).indexOf(t)&&-1===m(i.showClass).indexOf(t)&&o.classList.remove(t)}),e.customClass&&e.customClass[n]){if("string"!=typeof e.customClass[n]&&!e.customClass[n].forEach)return W("Invalid type of customClass.".concat(n,'! Expected string or iterable object, got "').concat(r(e.customClass[n]),'"'));gt(t,e.customClass[n])}}var z="SweetAlert2:",W=function(t){console.warn("".concat(z," ").concat(t))},K=function(t){console.error("".concat(z," ").concat(t))},Y=[],Z=function(t){return"function"==typeof t?t():t},Q=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),$=t(["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","toast-column","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"]),J=t(["success","warning","info","question","error"]),X=function(){return document.body.classList.contains($["toast-shown"])},G={previousBodyPadding:null};function tt(t,e){if(!e)return null;switch(e){case"select":case"textarea":case"file":return yt(t,$[e]);case"checkbox":return t.querySelector(".".concat($.checkbox," input"));case"radio":return t.querySelector(".".concat($.radio," input:checked"))||t.querySelector(".".concat($.radio," input:first-child"));case"range":return t.querySelector(".".concat($.range," input"));default:return yt(t,$.input)}}function et(t){var e;t.focus(),"file"!==t.type&&(e=t.value,t.value="",t.value=e)}function nt(t,e,n){t&&e&&("string"==typeof e&&(e=e.split(/\s+/).filter(Boolean)),e.forEach(function(e){t.forEach?t.forEach(function(t){n?t.classList.add(e):t.classList.remove(e)}):n?t.classList.add(e):t.classList.remove(e)}))}function ot(t,e,n){n||0===parseInt(n)?t.style[e]="number"==typeof n?"".concat(n,"px"):n:t.style.removeProperty(e)}function it(t,e){var n=1<arguments.length&&void 0!==e?e:"flex";t.style.display=n}function rt(t){t.style.display="none"}function at(t,e,n,o){var i=t.querySelector(e);i&&(i.style[n]=o)}function st(t,e,n){e?it(t,n):rt(t)}function ct(t){return!!(t.scrollHeight>t.clientHeight)}function ut(t){var e=window.getComputedStyle(t),n=parseFloat(e.getPropertyValue("animation-duration")||"0"),o=parseFloat(e.getPropertyValue("transition-duration")||"0");return 0<n||0<o}function lt(t,e){var n=1<arguments.length&&void 0!==e&&e,o=V();bt(o)&&(n&&(o.style.transition="none",o.style.width="100%"),setTimeout(function(){o.style.transition="width ".concat(t/1e3,"s linear"),o.style.width="0%"},10))}function dt(){return"undefined"==typeof window||"undefined"==typeof document}function pt(t){wn.isVisible()&&ht!==t.target.value&&wn.resetValidationMessage(),ht=t.target.value}function ft(t,e){t instanceof HTMLElement?e.appendChild(t):"object"===r(t)?kt(t,e):t&&U(e,t)}function mt(t,e){var n=q(),o=D(),i=T(),r=L(),a=I();e.showConfirmButton||e.showDenyButton||e.showCancelButton||rt(n),F(n,e,"actions"),At(i,"confirm",e),At(r,"deny",e),At(a,"cancel",e),o.innerHTML=e.loaderHtml,e.buttonsStyling?function(t,e,n,o){gt([t,e,n],$.styled),o.confirmButtonColor&&(t.style.backgroundColor=o.confirmButtonColor);o.denyButtonColor&&(e.style.backgroundColor=o.denyButtonColor);o.cancelButtonColor&&(n.style.backgroundColor=o.cancelButtonColor)}(i,r,a,e):vt([i,r,a],$.styled),e.reverseButtons&&(n.insertBefore(a,o),n.insertBefore(r,o),n.insertBefore(i,o))}var ht,gt=function(t,e){nt(t,e,!0)},vt=function(t,e){nt(t,e,!1)},yt=function(t,e){for(var n=0;n<t.childNodes.length;n++)if(_(t.childNodes[n],e))return t.childNodes[n]},bt=function(t){return!(!t||!(t.offsetWidth||t.offsetHeight||t.getClientRects().length))},wt='\n <div aria-labelledby="'.concat($.title,'" aria-describedby="').concat($.content,'" class="').concat($.popup,'" tabindex="-1">\n <div class="').concat($.header,'">\n <ul class="').concat($["progress-steps"],'"></ul>\n <div class="').concat($.icon," ").concat(J.error,'"></div>\n <div class="').concat($.icon," ").concat(J.question,'"></div>\n <div class="').concat($.icon," ").concat(J.warning,'"></div>\n <div class="').concat($.icon," ").concat(J.info,'"></div>\n <div class="').concat($.icon," ").concat(J.success,'"></div>\n <img class="').concat($.image,'" />\n <h2 class="').concat($.title,'" id="').concat($.title,'"></h2>\n <button type="button" class="').concat($.close,'"></button>\n </div>\n <div class="').concat($.content,'">\n <div id="').concat($.content,'" class="').concat($["html-container"],'"></div>\n <input class="').concat($.input,'" />\n <input type="file" class="').concat($.file,'" />\n <div class="').concat($.range,'">\n <input type="range" />\n <output></output>\n </div>\n <select class="').concat($.select,'"></select>\n <div class="').concat($.radio,'"></div>\n <label for="').concat($.checkbox,'" class="').concat($.checkbox,'">\n <input type="checkbox" />\n <span class="').concat($.label,'"></span>\n </label>\n <textarea class="').concat($.textarea,'"></textarea>\n <div class="').concat($["validation-message"],'" id="').concat($["validation-message"],'"></div>\n </div>\n <div class="').concat($.actions,'">\n <div class="').concat($.loader,'"></div>\n <button type="button" class="').concat($.confirm,'"></button>\n <button type="button" class="').concat($.deny,'"></button>\n <button type="button" class="').concat($.cancel,'"></button>\n </div>\n <div class="').concat($.footer,'"></div>\n <div class="').concat($["timer-progress-bar-container"],'">\n <div class="').concat($["timer-progress-bar"],'"></div>\n </div>\n </div>\n').replace(/(^|\n)\s*/g,""),Ct=function(t){var e,n,o,i,r,a,s,c,u,l,d,p,f,m,h,g=!!(e=C())&&(e.parentNode.removeChild(e),vt([document.documentElement,document.body],[$["no-backdrop"],$["toast-shown"],$["has-column"]]),!0);dt()?K("SweetAlert2 requires document to initialize"):((n=document.createElement("div")).className=$.container,g&>(n,$["no-transition"]),U(n,wt),(o="string"==typeof(i=t.target)?document.querySelector(i):i).appendChild(n),r=t,(a=x()).setAttribute("role",r.toast?"alert":"dialog"),a.setAttribute("aria-live",r.toast?"polite":"assertive"),r.toast||a.setAttribute("aria-modal","true"),s=o,"rtl"===window.getComputedStyle(s).direction&>(C(),$.rtl),c=P(),u=yt(c,$.input),l=yt(c,$.file),d=c.querySelector(".".concat($.range," input")),p=c.querySelector(".".concat($.range," output")),f=yt(c,$.select),m=c.querySelector(".".concat($.checkbox," input")),h=yt(c,$.textarea),u.oninput=pt,l.onchange=pt,f.onchange=pt,m.onchange=pt,h.oninput=pt,d.oninput=function(t){pt(t),p.value=d.value},d.onchange=function(t){pt(t),d.nextSibling.value=d.value})},kt=function(t,e){t.jquery?xt(e,t):U(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))},Bt=function(){if(dt())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}();function At(t,e,n){var o;st(t,n["show".concat((o=e).charAt(0).toUpperCase()+o.slice(1),"Button")],"inline-block"),U(t,n["".concat(e,"ButtonText")]),t.setAttribute("aria-label",n["".concat(e,"ButtonAriaLabel")]),t.className=$[e],F(t,n,"".concat(e,"Button")),gt(t,n["".concat(e,"ButtonClass")])}function Pt(t,e){var n,o,i,r,a,s,c,u,l=C();l&&(n=l,"string"==typeof(o=e.backdrop)?n.style.background=o:o||gt([document.documentElement,document.body],$["no-backdrop"]),!e.backdrop&&e.allowOutsideClick&&W('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'),i=l,(r=e.position)in $?gt(i,$[r]):(W('The "position" parameter is not valid, defaulting to "center"'),gt(i,$.center)),a=l,!(s=e.grow)||"string"!=typeof s||(c="grow-".concat(s))in $&>(a,$[c]),F(l,e,"container"),(u=document.body.getAttribute("data-swal2-queue-step"))&&(l.setAttribute("data-queue-step",u),document.body.removeAttribute("data-swal2-queue-step")))}function Et(t,e){t.placeholder&&!e.inputPlaceholder||(t.placeholder=e.inputPlaceholder)}function Ot(t,e,n){var o,i;n.inputLabel&&(t.id=$.input,o=document.createElement("label"),i=$["input-label"],o.setAttribute("for",t.id),o.className=i,o.innerText=n.inputLabel,e.insertAdjacentElement("beforebegin",o))}var St={promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap},Tt=["input","file","range","select","radio","checkbox","textarea"],Lt=function(t){if(!jt[t.input])return K('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=jt[t.input](e,t);it(n),setTimeout(function(){et(n)})},Dt=function(t,e){var n=tt(P(),t);if(n)for(var o in!function(t){for(var e=0;e<t.attributes.length;e++){var n=t.attributes[e].name;-1===["type","value","style"].indexOf(n)&&t.removeAttribute(n)}}(n),e)"range"===t&&"placeholder"===o||n.setAttribute(o,e[o])},It=function(t){var e=qt(t.input);t.customClass&>(e,t.customClass.input)},qt=function(t){var e=$[t]?$[t]:$.input;return yt(P(),e)},jt={};jt.text=jt.email=jt.password=jt.number=jt.tel=jt.url=function(t,e){return"string"==typeof e.inputValue||"number"==typeof e.inputValue?t.value=e.inputValue:b(e.inputValue)||W('Unexpected type of inputValue! Expected "string", "number" or "Promise", got "'.concat(r(e.inputValue),'"')),Ot(t,t,e),Et(t,e),t.type=e.input,t},jt.file=function(t,e){return Ot(t,t,e),Et(t,e),t},jt.range=function(t,e){var n=t.querySelector("input"),o=t.querySelector("output");return n.value=e.inputValue,n.type=e.input,o.value=e.inputValue,Ot(n,t,e),t},jt.select=function(t,e){var n;return t.textContent="",e.inputPlaceholder&&(n=document.createElement("option"),U(n,e.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,t.appendChild(n)),Ot(t,t,e),t},jt.radio=function(t){return t.textContent="",t},jt.checkbox=function(t,e){var n=tt(P(),"checkbox");n.value=1,n.id=$.checkbox,n.checked=Boolean(e.inputValue);var o=t.querySelector("span");return U(o,e.inputPlaceholder),t},jt.textarea=function(e,t){var n,o;return e.value=t.inputValue,Et(e,t),Ot(e,e,t),"MutationObserver"in window&&(n=parseInt(window.getComputedStyle(x()).width),o=parseInt(window.getComputedStyle(x()).paddingLeft)+parseInt(window.getComputedStyle(x()).paddingRight),new MutationObserver(function(){var t=e.offsetWidth+o;x().style.width=n<t?"".concat(t,"px"):null}).observe(e,{attributes:!0,attributeFilter:["style"]})),e};function Mt(t,e){var n,o,i,r,a,s=P().querySelector("#".concat($.content));e.html?(ft(e.html,s),it(s,"block")):e.text?(s.textContent=e.text,it(s,"block")):rt(s),n=t,o=e,i=P(),r=St.innerParams.get(n),a=!r||o.input!==r.input,Tt.forEach(function(t){var e=$[t],n=yt(i,e);Dt(t,o.inputAttributes),n.className=e,a&&rt(n)}),o.input&&(a&&Lt(o),It(o)),F(P(),e,"content")}function Vt(){return C()&&C().getAttribute("data-queue-step")}function Ht(t,c){var u=O();if(!c.progressSteps||0===c.progressSteps.length)return rt(u),0;it(u),u.textContent="";var l=parseInt(void 0===c.currentProgressStep?Vt():c.currentProgressStep);l>=c.progressSteps.length&&W("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),c.progressSteps.forEach(function(t,e){var n,o,i,r,a,s=(n=t,o=document.createElement("li"),gt(o,$["progress-step"]),U(o,n),o);u.appendChild(s),e===l&>(s,$["active-progress-step"]),e!==c.progressSteps.length-1&&(r=c,a=document.createElement("li"),gt(a,$["progress-step-line"]),r.progressStepsDistance&&(a.style.width=r.progressStepsDistance),i=a,u.appendChild(i))})}function Rt(t,e){var n,o,i,r,a,s,c,u,l=j();F(l,e,"header"),Ht(0,e),n=t,o=e,(r=St.innerParams.get(n))&&o.icon===r.icon&&B()?Ft(B(),o):(_t(),o.icon&&(-1!==Object.keys(J).indexOf(o.icon)?(i=k(".".concat($.icon,".").concat(J[o.icon])),it(i),Wt(i,o),Ft(i,o),gt(i,o.showClass.icon)):K('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(o.icon,'"')))),function(t){var e=E();if(!t.imageUrl)return rt(e);it(e,""),e.setAttribute("src",t.imageUrl),e.setAttribute("alt",t.imageAlt),ot(e,"width",t.imageWidth),ot(e,"height",t.imageHeight),e.className=$.image,F(e,t,"image")}(e),a=e,s=A(),st(s,a.title||a.titleText),a.title&&ft(a.title,s),a.titleText&&(s.innerText=a.titleText),F(s,a,"title"),c=e,u=H(),U(u,c.closeButtonHtml),F(u,c,"closeButton"),st(u,c.showCloseButton),u.setAttribute("aria-label",c.closeButtonAriaLabel)}function Nt(t,e){var n,o,i,r;n=e,o=x(),ot(o,"width",n.width),ot(o,"padding",n.padding),n.background&&(o.style.background=n.background),Qt(o,n),Pt(0,e),Rt(t,e),Mt(t,e),mt(0,e),i=e,r=M(),st(r,i.footer),i.footer&&ft(i.footer,r),F(r,i,"footer"),"function"==typeof e.didRender?e.didRender(x()):"function"==typeof e.onRender&&e.onRender(x())}function Ut(){return T()&&T().click()}var _t=function(){for(var t=n(),e=0;e<t.length;e++)rt(t[e])},Ft=function(t,e){Kt(t,e),zt(),F(t,e,"icon")},zt=function(){for(var t=x(),e=window.getComputedStyle(t).getPropertyValue("background-color"),n=t.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix"),o=0;o<n.length;o++)n[o].style.backgroundColor=e},Wt=function(t,e){t.textContent="",e.iconHtml?U(t,Yt(e.iconHtml)):"success"===e.icon?U(t,'\n <div class="swal2-success-circular-line-left"></div>\n <span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>\n <div class="swal2-success-ring"></div> <div class="swal2-success-fix"></div>\n <div class="swal2-success-circular-line-right"></div>\n '):"error"===e.icon?U(t,'\n <span class="swal2-x-mark">\n <span class="swal2-x-mark-line-left"></span>\n <span class="swal2-x-mark-line-right"></span>\n </span>\n '):U(t,Yt({question:"?",warning:"!",info:"i"}[e.icon]))},Kt=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<o.length;n++){at(t,o[n],"backgroundColor",e.iconColor)}at(t,".swal2-success-ring","borderColor",e.iconColor)}},Yt=function(t){return'<div class="'.concat($["icon-content"],'">').concat(t,"</div>")},Zt=[],Qt=function(t,e){t.className="".concat($.popup," ").concat(bt(t)?e.showClass.popup:""),e.toast?(gt([document.documentElement,document.body],$["toast-shown"]),gt(t,$.toast)):gt(t,$.modal),F(t,e,"popup"),"string"==typeof e.customClass&>(t,e.customClass),e.icon&>(t,$["icon-".concat(e.icon)])};function $t(){var t=x();t||wn.fire(),t=x();var e=q(),n=T(),o=D();it(e),rt(n),gt([t,e],$.loading),it(o),t.setAttribute("data-loading",!0),t.setAttribute("aria-busy",!0),t.focus()}function Jt(){return new Promise(function(t){var e=window.scrollX,n=window.scrollY;oe.restoreFocusTimeout=setTimeout(function(){oe.previousActiveElement&&oe.previousActiveElement.focus?(oe.previousActiveElement.focus(),oe.previousActiveElement=null):document.body&&document.body.focus(),t()},100),void 0!==e&&void 0!==n&&window.scrollTo(e,n)})}function Xt(){if(oe.timeout)return function(){var t=V(),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,"%")}(),oe.timeout.stop()}function Gt(){if(oe.timeout){var t=oe.timeout.start();return lt(t),t}}function te(t){return Object.prototype.hasOwnProperty.call(ie,t)}function ee(t){return ae[t]}function ne(t){for(var e in t)te(i=e)||W('Unknown parameter "'.concat(i,'"')),t.toast&&(o=e,-1!==se.indexOf(o)&&W('The parameter "'.concat(o,'" is incompatible with toasts'))),ee(n=e)&&g(n,ee(n));var n,o,i}var oe={},ie={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml: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:void 0,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,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,showCloseButton:!1,closeButtonHtml:"×",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!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},re=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","imageAlt","imageHeight","imageUrl","imageWidth","onAfterClose","onClose","onDestroy","progressSteps","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],ae={animation:'showClass" and "hideClass',onBeforeOpen:"willOpen",onOpen:"didOpen",onRender:"didRender",onClose:"willClose",onAfterClose:"didClose",onDestroy:"didDestroy"},se=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","heightAuto","keydownListenerCapture"],ce=Object.freeze({isValidParameter:te,isUpdatableParameter:function(t){return-1!==re.indexOf(t)},isDeprecatedParameter:ee,argsToParams:function(o){var i={};return"object"!==r(o[0])||w(o[0])?["title","html","icon"].forEach(function(t,e){var n=o[e];"string"==typeof n||w(n)?i[t]=n:void 0!==n&&K("Unexpected type of ".concat(t,'! Expected "string" or "Element", got ').concat(r(n)))}):c(i,o[0]),i},isVisible:function(){return bt(x())},clickConfirm:Ut,clickDeny:function(){return L()&&L().click()},clickCancel:function(){return I()&&I().click()},getContainer:C,getPopup:x,getTitle:A,getContent:P,getHtmlContainer:function(){return e($["html-container"])},getImage:E,getIcon:B,getIcons:n,getInputLabel:function(){return e($["input-label"])},getCloseButton:H,getActions:q,getConfirmButton:T,getDenyButton:L,getCancelButton:I,getHeader:j,getFooter:M,getTimerProgressBar:V,getFocusableElements:R,getValidationMessage:S,isLoading:function(){return x().hasAttribute("data-loading")},fire:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return i(this,e)},mixin:function(r){return function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&l(t,e)}(i,t);var n,o,e=(n=i,o=d(),function(){var t,e=u(n);return p(this,o?(t=u(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))});function i(){return a(this,i),e.apply(this,arguments)}return s(i,[{key:"_main",value:function(t){return f(u(i.prototype),"_main",this).call(this,c({},r,t))}}]),i}(this)},queue:function(t){var r=this;Zt=t;function a(t,e){Zt=[],t(e)}var s=[];return new Promise(function(i){!function e(n,o){n<Zt.length?(document.body.setAttribute("data-swal2-queue-step",n),r.fire(Zt[n]).then(function(t){void 0!==t.value?(s.push(t.value),e(n+1,o)):a(i,{dismiss:t.dismiss})})):a(i,{value:s})}(0)})},getQueueStep:Vt,insertQueueStep:function(t,e){return e&&e<Zt.length?Zt.splice(e,0,t):Zt.push(t)},deleteQueueStep:function(t){void 0!==Zt[t]&&Zt.splice(t,1)},showLoading:$t,enableLoading:$t,getTimerLeft:function(){return oe.timeout&&oe.timeout.getTimerLeft()},stopTimer:Xt,resumeTimer:Gt,toggleTimer:function(){var t=oe.timeout;return t&&(t.running?Xt:Gt)()},increaseTimer:function(t){if(oe.timeout){var e=oe.timeout.increase(t);return lt(e,!0),e}},isTimerRunning:function(){return oe.timeout&&oe.timeout.isRunning()}});function ue(){var t,e=St.innerParams.get(this);e&&(t=St.domCache.get(this),rt(t.loader),e.showConfirmButton?it(t.confirmButton,"inline-block"):e.showConfirmButton||e.showCancelButton||rt(t.actions),vt([t.popup,t.actions],$.loading),t.popup.removeAttribute("aria-busy"),t.popup.removeAttribute("data-loading"),t.confirmButton.disabled=!1,t.denyButton.disabled=!1,t.cancelButton.disabled=!1)}function le(){null===G.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(G.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(G.previousBodyPadding+function(){var t=document.createElement("div");t.className=$["scrollbar-measure"],document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e}(),"px"))}function de(){return!!window.MSInputMethodContext&&!!document.documentMode}function pe(){var t=C(),e=x();t.style.removeProperty("align-items"),e.offsetTop<0&&(t.style.alignItems="flex-start")}var fe=function(){navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i)||x().scrollHeight>window.innerHeight-44&&(C().style.paddingBottom="".concat(44,"px"))},me=function(){var e,t=C();t.ontouchstart=function(t){e=he(t)},t.ontouchmove=function(t){e&&(t.preventDefault(),t.stopPropagation())}},he=function(t){var e=t.target,n=C();return(!t.touches||!t.touches.length||"stylus"!==t.touches[0].touchType)&&(e===n||!(ct(n)||"INPUT"===e.tagName||ct(P())&&P().contains(e)))},ge={swalPromiseResolve:new WeakMap};function ve(t,e,n,o){var i;n?Ce(t,o):(Jt().then(function(){return Ce(t,o)}),oe.keydownTarget.removeEventListener("keydown",oe.keydownHandler,{capture:oe.keydownListenerCapture}),oe.keydownHandlerAdded=!1),e.parentNode&&!document.body.getAttribute("data-swal2-queue-step")&&e.parentNode.removeChild(e),N()&&(null!==G.previousBodyPadding&&(document.body.style.paddingRight="".concat(G.previousBodyPadding,"px"),G.previousBodyPadding=null),_(document.body,$.iosfix)&&(i=parseInt(document.body.style.top,10),vt(document.body,$.iosfix),document.body.style.top="",document.body.scrollTop=-1*i),"undefined"!=typeof window&&de()&&window.removeEventListener("resize",pe),h(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")})),vt([document.documentElement,document.body],[$.shown,$["height-auto"],$["no-backdrop"],$["toast-shown"],$["toast-column"]])}function ye(t){var e,n,o,i=x();i&&(t=function(t){return void 0!==t?c({isConfirmed:!1,isDenied:!1,isDismissed:!1},t):{isConfirmed:!1,isDenied:!1,isDismissed:!0}}(t),(e=St.innerParams.get(this))&&!_(i,e.hideClass.popup)&&(n=ge.swalPromiseResolve.get(this),vt(i,e.showClass.popup),gt(i,e.hideClass.popup),o=C(),vt(o,e.showClass.backdrop),gt(o,e.hideClass.backdrop),function(t,e,n){var o=C(),i=Bt&&ut(e),r=n.onClose,a=n.onAfterClose,s=n.willClose,c=n.didClose;if(be(e,s,r),i){we(t,e,o,c||a)}else{ve(t,o,X(),c||a)}}(this,i,e),n(t)))}var be=function(t,e,n){null!==e&&"function"==typeof e?e(t):null!==n&&"function"==typeof n&&n(t)},we=function(t,e,n,o){oe.swalCloseEventFinishedCallback=ve.bind(null,t,n,X(),o),e.addEventListener(Bt,function(t){t.target===e&&(oe.swalCloseEventFinishedCallback(),delete oe.swalCloseEventFinishedCallback)})},Ce=function(t,e){setTimeout(function(){"function"==typeof e&&e(),t._destroy()})};function ke(t,e,n){var o=St.domCache.get(t);e.forEach(function(t){o[t].disabled=n})}function xe(t,e){if(!t)return!1;if("radio"===t.type)for(var n=t.parentNode.parentNode.querySelectorAll("input"),o=0;o<n.length;o++)n[o].disabled=e;else t.disabled=e}var Be=function(){function n(t,e){a(this,n),this.callback=t,this.remaining=e,this.running=!1,this.start()}return s(n,[{key:"start",value:function(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}},{key:"stop",value:function(){return this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=new Date-this.started),this.remaining}},{key:"increase",value:function(t){var e=this.running;return e&&this.stop(),this.remaining+=t,e&&this.start(),this.remaining}},{key:"getTimerLeft",value:function(){return this.running&&(this.stop(),this.start()),this.remaining}},{key:"isRunning",value:function(){return this.running}}]),n}(),Ae={email:function(t,e){return/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(t)?Promise.resolve():Promise.resolve(e||"Invalid email address")},url:function(t,e){return/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(t)?Promise.resolve():Promise.resolve(e||"Invalid URL")}};function Pe(t){var e,n;(e=t).inputValidator||Object.keys(Ae).forEach(function(t){e.input===t&&(e.inputValidator=Ae[t])}),t.showLoaderOnConfirm&&!t.preConfirm&&W("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"),t.animation=Z(t.animation),(n=t).target&&("string"!=typeof n.target||document.querySelector(n.target))&&("string"==typeof n.target||n.target.appendChild)||(W('Target parameter is not valid, defaulting to "body"'),n.target="body"),"string"==typeof t.title&&(t.title=t.title.split("\n").join("<br />")),Ct(t)}function Ee(t){var e=C(),n=x();"function"==typeof t.willOpen?t.willOpen(n):"function"==typeof t.onBeforeOpen&&t.onBeforeOpen(n);var o=window.getComputedStyle(document.body).overflowY;Ne(e,n,t),setTimeout(function(){He(e,n)},10),N()&&(Re(e,t.scrollbarPadding,o),h(document.body.children).forEach(function(t){t===C()||function(t,e){if("function"==typeof t.contains)return t.contains(e)}(t,C())||(t.hasAttribute("aria-hidden")&&t.setAttribute("data-previous-aria-hidden",t.getAttribute("aria-hidden")),t.setAttribute("aria-hidden","true"))})),X()||oe.previousActiveElement||(oe.previousActiveElement=document.activeElement),Ve(n,t),vt(e,$["no-transition"])}function Oe(t){var e,n=x();t.target===n&&(e=C(),n.removeEventListener(Bt,Oe),e.style.overflowY="auto")}function Se(t,e){"select"===e.input||"radio"===e.input?ze(t,e):-1!==["text","email","number","tel","textarea"].indexOf(e.input)&&(v(e.inputValue)||b(e.inputValue))&&We(t,e)}function Te(t,e){t.disableButtons(),e.input?Ze(t,e,"confirm"):Je(t,e,!0)}function Le(t,e){t.disableButtons(),e.returnInputValueOnDeny?Ze(t,e,"deny"):$e(t,!1)}function De(t,e){t.disableButtons(),e(Q.cancel)}function Ie(t,e){t.closePopup({isConfirmed:!0,value:e})}function qe(e,t,n,o){t.keydownTarget&&t.keydownHandlerAdded&&(t.keydownTarget.removeEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!1),n.toast||(t.keydownHandler=function(t){return en(e,t,o)},t.keydownTarget=n.keydownListenerCapture?window:x(),t.keydownListenerCapture=n.keydownListenerCapture,t.keydownTarget.addEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!0)}function je(t,e,n){var o=R(),i=0;if(i<o.length)return(e+=n)===o.length?e=0:-1===e&&(e=o.length-1),o[e].focus();x().focus()}function Me(t,e,n){St.innerParams.get(t).toast?sn(t,e,n):(un(e),ln(e),dn(t,e,n))}var Ve=function(t,e){"function"==typeof e.didOpen?setTimeout(function(){return e.didOpen(t)}):"function"==typeof e.onOpen&&setTimeout(function(){return e.onOpen(t)})},He=function(t,e){Bt&&ut(e)?(t.style.overflowY="hidden",e.addEventListener(Bt,Oe)):t.style.overflowY="auto"},Re=function(t,e,n){var o;(/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||"MacIntel"===navigator.platform&&1<navigator.maxTouchPoints)&&!_(document.body,$.iosfix)&&(o=document.body.scrollTop,document.body.style.top="".concat(-1*o,"px"),gt(document.body,$.iosfix),me(),fe()),"undefined"!=typeof window&&de()&&(pe(),window.addEventListener("resize",pe)),e&&"hidden"!==n&&le(),setTimeout(function(){t.scrollTop=0})},Ne=function(t,e,n){gt(t,n.showClass.backdrop),e.style.setProperty("opacity","0","important"),it(e),setTimeout(function(){gt(e,n.showClass.popup),e.style.removeProperty("opacity")},10),gt([document.documentElement,document.body],$.shown),n.heightAuto&&n.backdrop&&!n.toast&>([document.documentElement,document.body],$["height-auto"])},Ue=function(t){return t.checked?1:0},_e=function(t){return t.checked?t.value:null},Fe=function(t){return t.files.length?null!==t.getAttribute("multiple")?t.files:t.files[0]:null},ze=function(e,n){function o(t){return Ke[n.input](i,Ye(t),n)}var i=P();v(n.inputOptions)||b(n.inputOptions)?($t(),y(n.inputOptions).then(function(t){e.hideLoading(),o(t)})):"object"===r(n.inputOptions)?o(n.inputOptions):K("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(r(n.inputOptions)))},We=function(e,n){var o=e.getInput();rt(o),y(n.inputValue).then(function(t){o.value="number"===n.input?parseFloat(t)||0:"".concat(t),it(o),o.focus(),e.hideLoading()}).catch(function(t){K("Error in inputValue promise: ".concat(t)),o.value="",it(o),o.focus(),e.hideLoading()})},Ke={select:function(t,e,i){function r(t,e,n){var o=document.createElement("option");o.value=n,U(o,e),i.inputValue.toString()===n.toString()&&(o.selected=!0),t.appendChild(o)}var a=yt(t,$.select);e.forEach(function(t){var e,n=t[0],o=t[1];Array.isArray(o)?((e=document.createElement("optgroup")).label=n,e.disabled=!1,a.appendChild(e),o.forEach(function(t){return r(e,t[1],t[0])})):r(a,o,n)}),a.focus()},radio:function(t,e,a){var s=yt(t,$.radio);e.forEach(function(t){var e=t[0],n=t[1],o=document.createElement("input"),i=document.createElement("label");o.type="radio",o.name=$.radio,o.value=e,a.inputValue.toString()===e.toString()&&(o.checked=!0);var r=document.createElement("span");U(r,n),r.className=$.label,i.appendChild(o),i.appendChild(r),s.appendChild(i)});var n=s.querySelectorAll("input");n.length&&n[0].focus()}},Ye=function o(n){var i=[];return"undefined"!=typeof Map&&n instanceof Map?n.forEach(function(t,e){var n=t;"object"===r(n)&&(n=o(n)),i.push([e,n])}):Object.keys(n).forEach(function(t){var e=n[t];"object"===r(e)&&(e=o(e)),i.push([t,e])}),i},Ze=function(t,e,n){var o=function(t,e){var n=t.getInput();if(!n)return null;switch(e.input){case"checkbox":return Ue(n);case"radio":return _e(n);case"file":return Fe(n);default:return e.inputAutoTrim?n.value.trim():n.value}}(t,e);e.inputValidator?Qe(t,e,o):t.getInput().checkValidity()?"deny"===n?$e(t,o):Je(t,e,o):(t.enableButtons(),t.showValidationMessage(e.validationMessage))},Qe=function(e,n,o){e.disableInput(),Promise.resolve().then(function(){return y(n.inputValidator(o,n.validationMessage))}).then(function(t){e.enableButtons(),e.enableInput(),t?e.showValidationMessage(t):Je(e,n,o)})},$e=function(t,e){t.closePopup({isDenied:!0,value:e})},Je=function(e,t,n){t.showLoaderOnConfirm&&$t(),t.preConfirm?(e.resetValidationMessage(),Promise.resolve().then(function(){return y(t.preConfirm(n,t.validationMessage))}).then(function(t){bt(S())||!1===t?e.hideLoading():Ie(e,void 0===t?n:t)})):Ie(e,n)},Xe=["ArrowRight","ArrowDown","Right","Down"],Ge=["ArrowLeft","ArrowUp","Left","Up"],tn=["Escape","Esc"],en=function(t,e,n){var o=St.innerParams.get(t);o.stopKeydownPropagation&&e.stopPropagation(),"Enter"===e.key?nn(t,e,o):"Tab"===e.key?on(e,o):-1!==[].concat(Xe,Ge).indexOf(e.key)?rn(e.key):-1!==tn.indexOf(e.key)&&an(e,o,n)},nn=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;Ut(),e.preventDefault()}},on=function(t){for(var e=t.target,n=R(),o=-1,i=0;i<n.length;i++)if(e===n[i]){o=i;break}t.shiftKey?je(0,o,-1):je(0,o,1),t.stopPropagation(),t.preventDefault()},rn=function(t){var e,n;-1!==[T(),L(),I()].indexOf(document.activeElement)&&(e=-1!==Xe.indexOf(t)?"nextElementSibling":"previousElementSibling",(n=document.activeElement[e])&&n.focus())},an=function(t,e,n){Z(e.allowEscapeKey)&&(t.preventDefault(),n(Q.esc))},sn=function(e,t,n){t.popup.onclick=function(){var t=St.innerParams.get(e);t.showConfirmButton||t.showDenyButton||t.showCancelButton||t.showCloseButton||t.input||n(Q.close)}},cn=!1,un=function(e){e.popup.onmousedown=function(){e.container.onmouseup=function(t){e.container.onmouseup=void 0,t.target===e.container&&(cn=!0)}}},ln=function(e){e.container.onmousedown=function(){e.popup.onmouseup=function(t){e.popup.onmouseup=void 0,t.target!==e.popup&&!e.popup.contains(t.target)||(cn=!0)}}},dn=function(n,o,i){o.container.onclick=function(t){var e=St.innerParams.get(n);cn?cn=!1:t.target===o.container&&Z(e.allowOutsideClick)&&i(Q.backdrop)}};var pn=function(t,e,n){var o=V();rt(o),e.timer&&(t.timeout=new Be(function(){n("timer"),delete t.timeout},e.timer),e.timerProgressBar&&(it(o),setTimeout(function(){t.timeout.running&<(e.timer)})))},fn=function(t,e){if(!e.toast)return Z(e.allowEnterKey)?void(mn(t,e)||je(0,-1,1)):hn()},mn=function(t,e){return e.focusDeny&&bt(t.denyButton)?(t.denyButton.focus(),!0):e.focusCancel&&bt(t.cancelButton)?(t.cancelButton.focus(),!0):!(!e.focusConfirm||!bt(t.confirmButton))&&(t.confirmButton.focus(),!0)},hn=function(){document.activeElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};var gn,vn=function(t){for(var e in t)t[e]=new WeakMap},yn=Object.freeze({hideLoading:ue,disableLoading:ue,getInput:function(t){var e=St.innerParams.get(t||this),n=St.domCache.get(t||this);return n?tt(n.content,e.input):null},close:ye,closePopup:ye,closeModal:ye,closeToast:ye,enableButtons:function(){ke(this,["confirmButton","denyButton","cancelButton"],!1)},disableButtons:function(){ke(this,["confirmButton","denyButton","cancelButton"],!0)},enableInput:function(){return xe(this.getInput(),!1)},disableInput:function(){return xe(this.getInput(),!0)},showValidationMessage:function(t){var e=St.domCache.get(this),n=St.innerParams.get(this);U(e.validationMessage,t),e.validationMessage.className=$["validation-message"],n.customClass&&n.customClass.validationMessage&>(e.validationMessage,n.customClass.validationMessage),it(e.validationMessage);var o=this.getInput();o&&(o.setAttribute("aria-invalid",!0),o.setAttribute("aria-describedBy",$["validation-message"]),et(o),gt(o,$.inputerror))},resetValidationMessage:function(){var t=St.domCache.get(this);t.validationMessage&&rt(t.validationMessage);var e=this.getInput();e&&(e.removeAttribute("aria-invalid"),e.removeAttribute("aria-describedBy"),vt(e,$.inputerror))},getProgressSteps:function(){return St.domCache.get(this).progressSteps},_main:function(t){ne(t),oe.currentInstance&&oe.currentInstance._destroy(),oe.currentInstance=this;var e=function(t){var e=c({},ie.showClass,t.showClass),n=c({},ie.hideClass,t.hideClass),o=c({},ie,t);if(o.showClass=e,o.hideClass=n,t.animation===false){o.showClass={popup:"swal2-noanimation",backdrop:"swal2-noanimation"};o.hideClass={}}return o}(t);Pe(e),Object.freeze(e),oe.timeout&&(oe.timeout.stop(),delete oe.timeout),clearTimeout(oe.restoreFocusTimeout);var n=function(t){var e={popup:x(),container:C(),content:P(),actions:q(),confirmButton:T(),denyButton:L(),cancelButton:I(),loader:D(),closeButton:H(),validationMessage:S(),progressSteps:O()};return St.domCache.set(t,e),e}(this);return Nt(this,e),St.innerParams.set(this,e),function(n,o,i){return new Promise(function(t){var e=function t(e){n.closePopup({isDismissed:true,dismiss:e})};ge.swalPromiseResolve.set(n,t);o.confirmButton.onclick=function(){return Te(n,i)};o.denyButton.onclick=function(){return Le(n,i)};o.cancelButton.onclick=function(){return De(n,e)};o.closeButton.onclick=function(){return e(Q.close)};Me(n,o,e);qe(n,oe,i,e);if(i.toast&&(i.input||i.footer||i.showCloseButton)){gt(document.body,$["toast-column"])}else{vt(document.body,$["toast-column"])}Se(n,i);Ee(i);pn(oe,i,e);fn(o,i);setTimeout(function(){o.container.scrollTop=0})})}(this,n,e)},update:function(e){var t=x(),n=St.innerParams.get(this);if(!t||_(t,n.hideClass.popup))return W("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(e).forEach(function(t){wn.isUpdatableParameter(t)?o[t]=e[t]:W('Invalid parameter to update: "'.concat(t,'". 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 i=c({},n,o);Nt(this,i),St.innerParams.set(this,i),Object.defineProperties(this,{params:{value:c({},this.params,e),writable:!1,enumerable:!0}})},_destroy:function(){var t=St.domCache.get(this),e=St.innerParams.get(this);e&&(t.popup&&oe.swalCloseEventFinishedCallback&&(oe.swalCloseEventFinishedCallback(),delete oe.swalCloseEventFinishedCallback),oe.deferDisposalTimer&&(clearTimeout(oe.deferDisposalTimer),delete oe.deferDisposalTimer),function(t){if(typeof t.didDestroy==="function"){t.didDestroy()}else if(typeof t.onDestroy==="function"){t.onDestroy()}}(e),delete this.params,delete oe.keydownHandler,delete oe.keydownTarget,vn(St),vn(ge))}}),bn=function(){function r(){if(a(this,r),"undefined"!=typeof window){"undefined"==typeof Promise&&K("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)"),gn=this;for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var o=Object.freeze(this.constructor.argsToParams(e));Object.defineProperties(this,{params:{value:o,writable:!1,enumerable:!0,configurable:!0}});var i=this._main(this.params);St.promise.set(this,i)}}return s(r,[{key:"then",value:function(t){return St.promise.get(this).then(t)}},{key:"finally",value:function(t){return St.promise.get(this).finally(t)}}]),r}();c(bn.prototype,yn),c(bn,ce),Object.keys(yn).forEach(function(t){bn[t]=function(){if(gn)return gn[t].apply(gn,arguments)}}),bn.DismissReason=Q,bn.version="10.6.1";var wn=bn;return wn.default=wn}),void 0!==this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2);
|
assets/sweetalert2/package.json
ADDED
@@ -0,0 +1,162 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_from": "sweetalert2",
|
3 |
+
"_id": "sweetalert2@10.6.1",
|
4 |
+
"_inBundle": false,
|
5 |
+
"_integrity": "sha512-5cIPtYldmZ+EljMVRd5ml9xT72STU+N4kk57nO0oECQmjkCsJypAcEdL+h045otoAd3t9962FtewJYSKyJxOFQ==",
|
6 |
+
"_location": "/sweetalert2",
|
7 |
+
"_phantomChildren": {},
|
8 |
+
"_requested": {
|
9 |
+
"type": "tag",
|
10 |
+
"registry": true,
|
11 |
+
"raw": "sweetalert2",
|
12 |
+
"name": "sweetalert2",
|
13 |
+
"escapedName": "sweetalert2",
|
14 |
+
"rawSpec": "",
|
15 |
+
"saveSpec": null,
|
16 |
+
"fetchSpec": "latest"
|
17 |
+
},
|
18 |
+
"_requiredBy": [
|
19 |
+
"#USER",
|
20 |
+
"/"
|
21 |
+
],
|
22 |
+
"_resolved": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-10.6.1.tgz",
|
23 |
+
"_shasum": "343d980858494bd0073ac8de9be57bf2365df316",
|
24 |
+
"_spec": "sweetalert2",
|
25 |
+
"_where": "/Applications/MAMP/htdocs/asset-optimizer",
|
26 |
+
"author": {
|
27 |
+
"name": "Limon Monte",
|
28 |
+
"email": "limon.monte@gmail.com",
|
29 |
+
"url": "https://limonte.github.io"
|
30 |
+
},
|
31 |
+
"browser": "dist/sweetalert2.all.js",
|
32 |
+
"bugs": {
|
33 |
+
"url": "https://github.com/sweetalert2/sweetalert2/issues"
|
34 |
+
},
|
35 |
+
"bundleDependencies": false,
|
36 |
+
"bundlewatch": {
|
37 |
+
"files": [
|
38 |
+
{
|
39 |
+
"path": "dist/sweetalert2.all.min.js",
|
40 |
+
"maxSize": "20kB"
|
41 |
+
}
|
42 |
+
]
|
43 |
+
},
|
44 |
+
"contributors": [
|
45 |
+
{
|
46 |
+
"name": "Giuseppe Verni",
|
47 |
+
"url": "https://github.com/gverni"
|
48 |
+
},
|
49 |
+
{
|
50 |
+
"name": "Matthew Francis Brunetti",
|
51 |
+
"email": "zenflow87@gmail.com",
|
52 |
+
"url": "https://github.com/zenflow"
|
53 |
+
},
|
54 |
+
{
|
55 |
+
"name": "Morgan Touverey-Quilling",
|
56 |
+
"email": "mtouverey@alembic-dev.com",
|
57 |
+
"url": "https://github.com/toverux"
|
58 |
+
},
|
59 |
+
{
|
60 |
+
"name": "Sam Turrell",
|
61 |
+
"email": "sam@samturrell.co.uk",
|
62 |
+
"url": "https://github.com/samturrell"
|
63 |
+
},
|
64 |
+
{
|
65 |
+
"name": "Joseph Schultz",
|
66 |
+
"url": "https://github.com/acupajoe"
|
67 |
+
},
|
68 |
+
{
|
69 |
+
"name": "Johan Fagerberg",
|
70 |
+
"url": "https://github.com/birjolaxew"
|
71 |
+
}
|
72 |
+
],
|
73 |
+
"deprecated": false,
|
74 |
+
"description": "A beautiful, responsive, customizable and accessible (WAI-ARIA) replacement for JavaScript's popup boxes, supported fork of sweetalert",
|
75 |
+
"devDependencies": {
|
76 |
+
"@babel/core": "^7.2.2",
|
77 |
+
"@babel/plugin-transform-object-assign": "^7.2.0",
|
78 |
+
"@babel/preset-env": "^7.3.1",
|
79 |
+
"@rollup/plugin-json": "^4.0.2",
|
80 |
+
"@sweetalert2/eslint-config": "^1.0.0",
|
81 |
+
"@sweetalert2/execute": "^1.0.0",
|
82 |
+
"@sweetalert2/stylelint-config": "^1.1.5",
|
83 |
+
"babel-loader": "^8.0.4",
|
84 |
+
"babel-plugin-array-includes": "^2.0.3",
|
85 |
+
"browser-sync": "^2.26.3",
|
86 |
+
"custom-event-polyfill": "^1.0.6",
|
87 |
+
"eslint": "^7.0.0",
|
88 |
+
"eslint-plugin-cypress": "^2.8.1",
|
89 |
+
"gulp": "^4.0.0",
|
90 |
+
"gulp-autoprefixer": "^7.0.0",
|
91 |
+
"gulp-clean-css": "^4.0.0",
|
92 |
+
"gulp-concat": "^2.6.1",
|
93 |
+
"gulp-css2js": "^1.1.2",
|
94 |
+
"gulp-if": "^3.0.0",
|
95 |
+
"gulp-rename": "^2.0.0",
|
96 |
+
"gulp-rollup": "^2.16.2",
|
97 |
+
"gulp-uglify": "^3.0.0",
|
98 |
+
"istanbul-lib-coverage": "^3.0.0",
|
99 |
+
"jquery": "^3.3.1",
|
100 |
+
"karma": "^5.0.0",
|
101 |
+
"karma-chrome-launcher": "^3.0.0",
|
102 |
+
"karma-firefox-launcher": "^1.1.0",
|
103 |
+
"karma-ie-launcher": "^1.0.0",
|
104 |
+
"karma-qunit": "^4.0.0",
|
105 |
+
"karma-sauce-launcher": "^4.0.0",
|
106 |
+
"karma-sourcemap-loader": "^0.3.7",
|
107 |
+
"karma-spec-reporter": "^0.0.32",
|
108 |
+
"karma-webpack": "^4.0.0",
|
109 |
+
"merge2": "^1.2.3",
|
110 |
+
"nyc": "^15.0.0",
|
111 |
+
"promise-polyfill": "^8.1.0",
|
112 |
+
"qunit": "^2.8.0",
|
113 |
+
"replace-in-file": "^6.0.0",
|
114 |
+
"rollup": "^2.0.0",
|
115 |
+
"rollup-plugin-babel": "^4.3.2",
|
116 |
+
"sass": "^1.22.1",
|
117 |
+
"sinon": "^9.0.0",
|
118 |
+
"stylelint": "^13.0.0",
|
119 |
+
"typescript": "^4.0.0",
|
120 |
+
"webpack": "^4.29.0"
|
121 |
+
},
|
122 |
+
"files": [
|
123 |
+
"dist",
|
124 |
+
"src",
|
125 |
+
"sweetalert2.d.ts"
|
126 |
+
],
|
127 |
+
"funding": {
|
128 |
+
"url": "https://sweetalert2.github.io/#donations"
|
129 |
+
},
|
130 |
+
"homepage": "https://sweetalert2.github.io/",
|
131 |
+
"keywords": [
|
132 |
+
"sweetalert",
|
133 |
+
"sweetalert2",
|
134 |
+
"alert",
|
135 |
+
"modal",
|
136 |
+
"popup",
|
137 |
+
"prompt",
|
138 |
+
"confirm",
|
139 |
+
"toast",
|
140 |
+
"accessible"
|
141 |
+
],
|
142 |
+
"license": "MIT",
|
143 |
+
"main": "dist/sweetalert2.all.js",
|
144 |
+
"module": "src/sweetalert2.js",
|
145 |
+
"name": "sweetalert2",
|
146 |
+
"repository": {
|
147 |
+
"type": "git",
|
148 |
+
"url": "git+https://github.com/sweetalert2/sweetalert2.git"
|
149 |
+
},
|
150 |
+
"scripts": {
|
151 |
+
"build": "gulp build",
|
152 |
+
"cy:run": "cypress run --browser chrome --config supportFile=cypress/support/ci.js",
|
153 |
+
"cy:run:headless": "cypress run --headless --browser chrome --config supportFile=cypress/support/ci.js",
|
154 |
+
"cy:start": "cypress open",
|
155 |
+
"lint": "stylelint src && eslint src test cypress tools *.js *.ts",
|
156 |
+
"nyc:instrument": "nyc instrument --compact=false src src_instrumented && rm -rf src && mv src_instrumented src",
|
157 |
+
"start": "gulp develop --continue-on-error --skip-minification --skip-standalone",
|
158 |
+
"test": "karma start karma.conf.js --single-run"
|
159 |
+
},
|
160 |
+
"types": "sweetalert2.d.ts",
|
161 |
+
"version": "10.6.1"
|
162 |
+
}
|
assets/sweetalert2/src/SweetAlert.js
ADDED
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { error } from './utils/utils.js'
|
2 |
+
import { DismissReason } from './utils/DismissReason.js'
|
3 |
+
import * as staticMethods from './staticMethods.js'
|
4 |
+
import * as instanceMethods from './instanceMethods.js'
|
5 |
+
import privateProps from './privateProps.js'
|
6 |
+
|
7 |
+
let currentInstance
|
8 |
+
|
9 |
+
class SweetAlert {
|
10 |
+
constructor (...args) {
|
11 |
+
// Prevent run in Node env
|
12 |
+
if (typeof window === 'undefined') {
|
13 |
+
return
|
14 |
+
}
|
15 |
+
|
16 |
+
// Check for the existence of Promise
|
17 |
+
if (typeof Promise === 'undefined') {
|
18 |
+
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)')
|
19 |
+
}
|
20 |
+
|
21 |
+
currentInstance = this
|
22 |
+
|
23 |
+
const outerParams = Object.freeze(this.constructor.argsToParams(args))
|
24 |
+
|
25 |
+
Object.defineProperties(this, {
|
26 |
+
params: {
|
27 |
+
value: outerParams,
|
28 |
+
writable: false,
|
29 |
+
enumerable: true,
|
30 |
+
configurable: true
|
31 |
+
}
|
32 |
+
})
|
33 |
+
|
34 |
+
const promise = this._main(this.params)
|
35 |
+
privateProps.promise.set(this, promise)
|
36 |
+
}
|
37 |
+
|
38 |
+
// `catch` cannot be the name of a module export, so we define our thenable methods here instead
|
39 |
+
then (onFulfilled) {
|
40 |
+
const promise = privateProps.promise.get(this)
|
41 |
+
return promise.then(onFulfilled)
|
42 |
+
}
|
43 |
+
|
44 |
+
finally (onFinally) {
|
45 |
+
const promise = privateProps.promise.get(this)
|
46 |
+
return promise.finally(onFinally)
|
47 |
+
}
|
48 |
+
}
|
49 |
+
|
50 |
+
// Assign instance methods from src/instanceMethods/*.js to prototype
|
51 |
+
Object.assign(SweetAlert.prototype, instanceMethods)
|
52 |
+
|
53 |
+
// Assign static methods from src/staticMethods/*.js to constructor
|
54 |
+
Object.assign(SweetAlert, staticMethods)
|
55 |
+
|
56 |
+
// Proxy to instance methods to constructor, for now, for backwards compatibility
|
57 |
+
Object.keys(instanceMethods).forEach(key => {
|
58 |
+
SweetAlert[key] = function (...args) {
|
59 |
+
if (currentInstance) {
|
60 |
+
return currentInstance[key](...args)
|
61 |
+
}
|
62 |
+
}
|
63 |
+
})
|
64 |
+
|
65 |
+
SweetAlert.DismissReason = DismissReason
|
66 |
+
|
67 |
+
SweetAlert.version = '10.6.1'
|
68 |
+
|
69 |
+
export default SweetAlert
|
assets/sweetalert2/src/constants.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
export const RESTORE_FOCUS_TIMEOUT = 100
|
assets/sweetalert2/src/globalState.js
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { RESTORE_FOCUS_TIMEOUT } from './constants.js'
|
2 |
+
|
3 |
+
const globalState = {}
|
4 |
+
|
5 |
+
export default globalState
|
6 |
+
|
7 |
+
const focusPreviousActiveElement = () => {
|
8 |
+
if (globalState.previousActiveElement && globalState.previousActiveElement.focus) {
|
9 |
+
globalState.previousActiveElement.focus()
|
10 |
+
globalState.previousActiveElement = null
|
11 |
+
} else if (document.body) {
|
12 |
+
document.body.focus()
|
13 |
+
}
|
14 |
+
}
|
15 |
+
|
16 |
+
// Restore previous active (focused) element
|
17 |
+
export const restoreActiveElement = () => {
|
18 |
+
return new Promise(resolve => {
|
19 |
+
const x = window.scrollX
|
20 |
+
const y = window.scrollY
|
21 |
+
globalState.restoreFocusTimeout = setTimeout(() => {
|
22 |
+
focusPreviousActiveElement()
|
23 |
+
resolve()
|
24 |
+
}, RESTORE_FOCUS_TIMEOUT) // issues/900
|
25 |
+
/* istanbul ignore if */
|
26 |
+
if (typeof x !== 'undefined' && typeof y !== 'undefined') { // IE doesn't have scrollX/scrollY support
|
27 |
+
window.scrollTo(x, y)
|
28 |
+
}
|
29 |
+
})
|
30 |
+
}
|
assets/sweetalert2/src/instanceMethods.js
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
export * from './instanceMethods/hideLoading.js'
|
2 |
+
export * from './instanceMethods/getInput.js'
|
3 |
+
export * from './instanceMethods/close.js'
|
4 |
+
export * from './instanceMethods/enable-disable-elements.js'
|
5 |
+
export * from './instanceMethods/validation-message.js'
|
6 |
+
export * from './instanceMethods/progress-steps.js'
|
7 |
+
export * from './instanceMethods/_main.js'
|
8 |
+
export * from './instanceMethods/update.js'
|
9 |
+
export * from './instanceMethods/_destroy.js'
|
assets/sweetalert2/src/instanceMethods/_destroy.js
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import globalState from '../globalState.js'
|
2 |
+
import privateProps from '../privateProps.js'
|
3 |
+
import privateMethods from '../privateMethods.js'
|
4 |
+
|
5 |
+
export function _destroy () {
|
6 |
+
const domCache = privateProps.domCache.get(this)
|
7 |
+
const innerParams = privateProps.innerParams.get(this)
|
8 |
+
|
9 |
+
if (!innerParams) {
|
10 |
+
return // This instance has already been destroyed
|
11 |
+
}
|
12 |
+
|
13 |
+
// Check if there is another Swal closing
|
14 |
+
if (domCache.popup && globalState.swalCloseEventFinishedCallback) {
|
15 |
+
globalState.swalCloseEventFinishedCallback()
|
16 |
+
delete globalState.swalCloseEventFinishedCallback
|
17 |
+
}
|
18 |
+
|
19 |
+
// Check if there is a swal disposal defer timer
|
20 |
+
if (globalState.deferDisposalTimer) {
|
21 |
+
clearTimeout(globalState.deferDisposalTimer)
|
22 |
+
delete globalState.deferDisposalTimer
|
23 |
+
}
|
24 |
+
|
25 |
+
runDidDestroy(innerParams)
|
26 |
+
|
27 |
+
disposeSwal(this)
|
28 |
+
}
|
29 |
+
|
30 |
+
const runDidDestroy = (innerParams) => {
|
31 |
+
if (typeof innerParams.didDestroy === 'function') {
|
32 |
+
innerParams.didDestroy()
|
33 |
+
} else if (typeof innerParams.onDestroy === 'function') {
|
34 |
+
innerParams.onDestroy() // @deprecated
|
35 |
+
}
|
36 |
+
}
|
37 |
+
|
38 |
+
const disposeSwal = (instance) => {
|
39 |
+
// Unset this.params so GC will dispose it (#1569)
|
40 |
+
delete instance.params
|
41 |
+
// Unset globalState props so GC will dispose globalState (#1569)
|
42 |
+
delete globalState.keydownHandler
|
43 |
+
delete globalState.keydownTarget
|
44 |
+
// Unset WeakMaps so GC will be able to dispose them (#1569)
|
45 |
+
unsetWeakMaps(privateProps)
|
46 |
+
unsetWeakMaps(privateMethods)
|
47 |
+
}
|
48 |
+
|
49 |
+
const unsetWeakMaps = (obj) => {
|
50 |
+
for (const i in obj) {
|
51 |
+
obj[i] = new WeakMap()
|
52 |
+
}
|
53 |
+
}
|
assets/sweetalert2/src/instanceMethods/_main.js
ADDED
@@ -0,0 +1,179 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import defaultParams, { showWarningsForParams } from '../utils/params.js'
|
2 |
+
import * as dom from '../utils/dom/index.js'
|
3 |
+
import { swalClasses } from '../utils/classes.js'
|
4 |
+
import Timer from '../utils/Timer.js'
|
5 |
+
import { callIfFunction } from '../utils/utils.js'
|
6 |
+
import setParameters from '../utils/setParameters.js'
|
7 |
+
import globalState from '../globalState.js'
|
8 |
+
import { openPopup } from '../utils/openPopup.js'
|
9 |
+
import privateProps from '../privateProps.js'
|
10 |
+
import privateMethods from '../privateMethods.js'
|
11 |
+
import { handleInputOptionsAndValue } from '../utils/dom/inputUtils.js'
|
12 |
+
import { handleConfirmButtonClick, handleDenyButtonClick, handleCancelButtonClick } from './buttons-handlers.js'
|
13 |
+
import { addKeydownHandler, setFocus } from './keydown-handler.js'
|
14 |
+
import { handlePopupClick } from './popup-click-handler.js'
|
15 |
+
import { DismissReason } from '../utils/DismissReason.js'
|
16 |
+
|
17 |
+
export function _main (userParams) {
|
18 |
+
showWarningsForParams(userParams)
|
19 |
+
|
20 |
+
if (globalState.currentInstance) {
|
21 |
+
globalState.currentInstance._destroy()
|
22 |
+
}
|
23 |
+
globalState.currentInstance = this
|
24 |
+
|
25 |
+
const innerParams = prepareParams(userParams)
|
26 |
+
setParameters(innerParams)
|
27 |
+
Object.freeze(innerParams)
|
28 |
+
|
29 |
+
// clear the previous timer
|
30 |
+
if (globalState.timeout) {
|
31 |
+
globalState.timeout.stop()
|
32 |
+
delete globalState.timeout
|
33 |
+
}
|
34 |
+
|
35 |
+
// clear the restore focus timeout
|
36 |
+
clearTimeout(globalState.restoreFocusTimeout)
|
37 |
+
|
38 |
+
const domCache = populateDomCache(this)
|
39 |
+
|
40 |
+
dom.render(this, innerParams)
|
41 |
+
|
42 |
+
privateProps.innerParams.set(this, innerParams)
|
43 |
+
|
44 |
+
return swalPromise(this, domCache, innerParams)
|
45 |
+
}
|
46 |
+
|
47 |
+
const prepareParams = (userParams) => {
|
48 |
+
const showClass = Object.assign({}, defaultParams.showClass, userParams.showClass)
|
49 |
+
const hideClass = Object.assign({}, defaultParams.hideClass, userParams.hideClass)
|
50 |
+
const params = Object.assign({}, defaultParams, userParams)
|
51 |
+
params.showClass = showClass
|
52 |
+
params.hideClass = hideClass
|
53 |
+
// @deprecated
|
54 |
+
if (userParams.animation === false) {
|
55 |
+
params.showClass = {
|
56 |
+
popup: 'swal2-noanimation',
|
57 |
+
backdrop: 'swal2-noanimation'
|
58 |
+
}
|
59 |
+
params.hideClass = {}
|
60 |
+
}
|
61 |
+
return params
|
62 |
+
}
|
63 |
+
|
64 |
+
const swalPromise = (instance, domCache, innerParams) => {
|
65 |
+
return new Promise((resolve) => {
|
66 |
+
// functions to handle all closings/dismissals
|
67 |
+
const dismissWith = (dismiss) => {
|
68 |
+
instance.closePopup({ isDismissed: true, dismiss })
|
69 |
+
}
|
70 |
+
|
71 |
+
privateMethods.swalPromiseResolve.set(instance, resolve)
|
72 |
+
|
73 |
+
domCache.confirmButton.onclick = () => handleConfirmButtonClick(instance, innerParams)
|
74 |
+
domCache.denyButton.onclick = () => handleDenyButtonClick(instance, innerParams)
|
75 |
+
domCache.cancelButton.onclick = () => handleCancelButtonClick(instance, dismissWith)
|
76 |
+
|
77 |
+
domCache.closeButton.onclick = () => dismissWith(DismissReason.close)
|
78 |
+
|
79 |
+
handlePopupClick(instance, domCache, dismissWith)
|
80 |
+
|
81 |
+
addKeydownHandler(instance, globalState, innerParams, dismissWith)
|
82 |
+
|
83 |
+
if (innerParams.toast && (innerParams.input || innerParams.footer || innerParams.showCloseButton)) {
|
84 |
+
dom.addClass(document.body, swalClasses['toast-column'])
|
85 |
+
} else {
|
86 |
+
dom.removeClass(document.body, swalClasses['toast-column'])
|
87 |
+
}
|
88 |
+
|
89 |
+
handleInputOptionsAndValue(instance, innerParams)
|
90 |
+
|
91 |
+
openPopup(innerParams)
|
92 |
+
|
93 |
+
setupTimer(globalState, innerParams, dismissWith)
|
94 |
+
|
95 |
+
initFocus(domCache, innerParams)
|
96 |
+
|
97 |
+
// Scroll container to top on open (#1247, #1946)
|
98 |
+
setTimeout(() => {
|
99 |
+
domCache.container.scrollTop = 0
|
100 |
+
})
|
101 |
+
})
|
102 |
+
}
|
103 |
+
|
104 |
+
const populateDomCache = (instance) => {
|
105 |
+
const domCache = {
|
106 |
+
popup: dom.getPopup(),
|
107 |
+
container: dom.getContainer(),
|
108 |
+
content: dom.getContent(),
|
109 |
+
actions: dom.getActions(),
|
110 |
+
confirmButton: dom.getConfirmButton(),
|
111 |
+
denyButton: dom.getDenyButton(),
|
112 |
+
cancelButton: dom.getCancelButton(),
|
113 |
+
loader: dom.getLoader(),
|
114 |
+
closeButton: dom.getCloseButton(),
|
115 |
+
validationMessage: dom.getValidationMessage(),
|
116 |
+
progressSteps: dom.getProgressSteps()
|
117 |
+
}
|
118 |
+
privateProps.domCache.set(instance, domCache)
|
119 |
+
|
120 |
+
return domCache
|
121 |
+
}
|
122 |
+
|
123 |
+
const setupTimer = (globalState, innerParams, dismissWith) => {
|
124 |
+
const timerProgressBar = dom.getTimerProgressBar()
|
125 |
+
dom.hide(timerProgressBar)
|
126 |
+
if (innerParams.timer) {
|
127 |
+
globalState.timeout = new Timer(() => {
|
128 |
+
dismissWith('timer')
|
129 |
+
delete globalState.timeout
|
130 |
+
}, innerParams.timer)
|
131 |
+
if (innerParams.timerProgressBar) {
|
132 |
+
dom.show(timerProgressBar)
|
133 |
+
setTimeout(() => {
|
134 |
+
if (globalState.timeout.running) { // timer can be already stopped at this point
|
135 |
+
dom.animateTimerProgressBar(innerParams.timer)
|
136 |
+
}
|
137 |
+
})
|
138 |
+
}
|
139 |
+
}
|
140 |
+
}
|
141 |
+
|
142 |
+
const initFocus = (domCache, innerParams) => {
|
143 |
+
if (innerParams.toast) {
|
144 |
+
return
|
145 |
+
}
|
146 |
+
|
147 |
+
if (!callIfFunction(innerParams.allowEnterKey)) {
|
148 |
+
return blurActiveElement()
|
149 |
+
}
|
150 |
+
|
151 |
+
if (!focusButton(domCache, innerParams)) {
|
152 |
+
setFocus(innerParams, -1, 1)
|
153 |
+
}
|
154 |
+
}
|
155 |
+
|
156 |
+
const focusButton = (domCache, innerParams) => {
|
157 |
+
if (innerParams.focusDeny && dom.isVisible(domCache.denyButton)) {
|
158 |
+
domCache.denyButton.focus()
|
159 |
+
return true
|
160 |
+
}
|
161 |
+
|
162 |
+
if (innerParams.focusCancel && dom.isVisible(domCache.cancelButton)) {
|
163 |
+
domCache.cancelButton.focus()
|
164 |
+
return true
|
165 |
+
}
|
166 |
+
|
167 |
+
if (innerParams.focusConfirm && dom.isVisible(domCache.confirmButton)) {
|
168 |
+
domCache.confirmButton.focus()
|
169 |
+
return true
|
170 |
+
}
|
171 |
+
|
172 |
+
return false
|
173 |
+
}
|
174 |
+
|
175 |
+
const blurActiveElement = () => {
|
176 |
+
if (document.activeElement && typeof document.activeElement.blur === 'function') {
|
177 |
+
document.activeElement.blur()
|
178 |
+
}
|
179 |
+
}
|
assets/sweetalert2/src/instanceMethods/buttons-handlers.js
ADDED
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { isVisible } from '../utils/dom/domUtils.js'
|
2 |
+
import { getInputValue } from '../utils/dom/inputUtils.js'
|
3 |
+
import { getValidationMessage } from '../utils/dom/getters.js'
|
4 |
+
import { asPromise } from '../utils/utils.js'
|
5 |
+
import { showLoading } from '../staticMethods/showLoading.js'
|
6 |
+
import { DismissReason } from '../utils/DismissReason.js'
|
7 |
+
|
8 |
+
export const handleConfirmButtonClick = (instance, innerParams) => {
|
9 |
+
instance.disableButtons()
|
10 |
+
if (innerParams.input) {
|
11 |
+
handleConfirmOrDenyWithInput(instance, innerParams, 'confirm')
|
12 |
+
} else {
|
13 |
+
confirm(instance, innerParams, true)
|
14 |
+
}
|
15 |
+
}
|
16 |
+
|
17 |
+
export const handleDenyButtonClick = (instance, innerParams) => {
|
18 |
+
instance.disableButtons()
|
19 |
+
// here we could add preDeny in future, if needed
|
20 |
+
if (innerParams.returnInputValueOnDeny) {
|
21 |
+
handleConfirmOrDenyWithInput(instance, innerParams, 'deny')
|
22 |
+
} else {
|
23 |
+
deny(instance, false)
|
24 |
+
}
|
25 |
+
}
|
26 |
+
|
27 |
+
export const handleCancelButtonClick = (instance, dismissWith) => {
|
28 |
+
instance.disableButtons()
|
29 |
+
dismissWith(DismissReason.cancel)
|
30 |
+
}
|
31 |
+
|
32 |
+
const handleConfirmOrDenyWithInput = (instance, innerParams, type /* type is either 'confirm' or 'deny' */) => {
|
33 |
+
const inputValue = getInputValue(instance, innerParams)
|
34 |
+
if (innerParams.inputValidator) {
|
35 |
+
handleInputValidator(instance, innerParams, inputValue)
|
36 |
+
} else if (!instance.getInput().checkValidity()) {
|
37 |
+
instance.enableButtons()
|
38 |
+
instance.showValidationMessage(innerParams.validationMessage)
|
39 |
+
} else if (type === 'deny') {
|
40 |
+
deny(instance, inputValue)
|
41 |
+
} else {
|
42 |
+
confirm(instance, innerParams, inputValue)
|
43 |
+
}
|
44 |
+
}
|
45 |
+
|
46 |
+
const handleInputValidator = (instance, innerParams, inputValue) => {
|
47 |
+
instance.disableInput()
|
48 |
+
const validationPromise = Promise.resolve().then(() => asPromise(
|
49 |
+
innerParams.inputValidator(inputValue, innerParams.validationMessage))
|
50 |
+
)
|
51 |
+
validationPromise.then(
|
52 |
+
(validationMessage) => {
|
53 |
+
instance.enableButtons()
|
54 |
+
instance.enableInput()
|
55 |
+
if (validationMessage) {
|
56 |
+
instance.showValidationMessage(validationMessage)
|
57 |
+
} else {
|
58 |
+
confirm(instance, innerParams, inputValue)
|
59 |
+
}
|
60 |
+
}
|
61 |
+
)
|
62 |
+
}
|
63 |
+
|
64 |
+
const deny = (instance, value) => {
|
65 |
+
instance.closePopup({ isDenied: true, value })
|
66 |
+
}
|
67 |
+
|
68 |
+
const succeedWith = (instance, value) => {
|
69 |
+
instance.closePopup({ isConfirmed: true, value })
|
70 |
+
}
|
71 |
+
|
72 |
+
const confirm = (instance, innerParams, value) => {
|
73 |
+
if (innerParams.showLoaderOnConfirm) {
|
74 |
+
showLoading() // TODO: make showLoading an *instance* method
|
75 |
+
}
|
76 |
+
|
77 |
+
if (innerParams.preConfirm) {
|
78 |
+
instance.resetValidationMessage()
|
79 |
+
const preConfirmPromise = Promise.resolve().then(() => asPromise(
|
80 |
+
innerParams.preConfirm(value, innerParams.validationMessage))
|
81 |
+
)
|
82 |
+
preConfirmPromise.then(
|
83 |
+
(preConfirmValue) => {
|
84 |
+
if (isVisible(getValidationMessage()) || preConfirmValue === false) {
|
85 |
+
instance.hideLoading()
|
86 |
+
} else {
|
87 |
+
succeedWith(instance, typeof preConfirmValue === 'undefined' ? value : preConfirmValue)
|
88 |
+
}
|
89 |
+
}
|
90 |
+
)
|
91 |
+
} else {
|
92 |
+
succeedWith(instance, value)
|
93 |
+
}
|
94 |
+
}
|
assets/sweetalert2/src/instanceMethods/close.js
ADDED
@@ -0,0 +1,147 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { undoScrollbar } from '../utils/scrollbarFix.js'
|
2 |
+
import { undoIOSfix } from '../utils/iosFix.js'
|
3 |
+
import { undoIEfix } from '../utils/ieFix.js'
|
4 |
+
import { unsetAriaHidden } from '../utils/aria.js'
|
5 |
+
import * as dom from '../utils/dom/index.js'
|
6 |
+
import { swalClasses } from '../utils/classes.js'
|
7 |
+
import globalState, { restoreActiveElement } from '../globalState.js'
|
8 |
+
import privateProps from '../privateProps.js'
|
9 |
+
import privateMethods from '../privateMethods.js'
|
10 |
+
|
11 |
+
/*
|
12 |
+
* Instance method to close sweetAlert
|
13 |
+
*/
|
14 |
+
|
15 |
+
function removePopupAndResetState (instance, container, isToast, didClose) {
|
16 |
+
if (isToast) {
|
17 |
+
triggerDidCloseAndDispose(instance, didClose)
|
18 |
+
} else {
|
19 |
+
restoreActiveElement().then(() => triggerDidCloseAndDispose(instance, didClose))
|
20 |
+
globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, { capture: globalState.keydownListenerCapture })
|
21 |
+
globalState.keydownHandlerAdded = false
|
22 |
+
}
|
23 |
+
|
24 |
+
if (container.parentNode && !document.body.getAttribute('data-swal2-queue-step')) {
|
25 |
+
container.parentNode.removeChild(container)
|
26 |
+
}
|
27 |
+
|
28 |
+
if (dom.isModal()) {
|
29 |
+
undoScrollbar()
|
30 |
+
undoIOSfix()
|
31 |
+
undoIEfix()
|
32 |
+
unsetAriaHidden()
|
33 |
+
}
|
34 |
+
|
35 |
+
removeBodyClasses()
|
36 |
+
}
|
37 |
+
|
38 |
+
function removeBodyClasses () {
|
39 |
+
dom.removeClass(
|
40 |
+
[document.documentElement, document.body],
|
41 |
+
[
|
42 |
+
swalClasses.shown,
|
43 |
+
swalClasses['height-auto'],
|
44 |
+
swalClasses['no-backdrop'],
|
45 |
+
swalClasses['toast-shown'],
|
46 |
+
swalClasses['toast-column']
|
47 |
+
]
|
48 |
+
)
|
49 |
+
}
|
50 |
+
|
51 |
+
export function close (resolveValue) {
|
52 |
+
const popup = dom.getPopup()
|
53 |
+
|
54 |
+
if (!popup) {
|
55 |
+
return
|
56 |
+
}
|
57 |
+
|
58 |
+
resolveValue = prepareResolveValue(resolveValue)
|
59 |
+
|
60 |
+
const innerParams = privateProps.innerParams.get(this)
|
61 |
+
if (!innerParams || dom.hasClass(popup, innerParams.hideClass.popup)) {
|
62 |
+
return
|
63 |
+
}
|
64 |
+
const swalPromiseResolve = privateMethods.swalPromiseResolve.get(this)
|
65 |
+
|
66 |
+
dom.removeClass(popup, innerParams.showClass.popup)
|
67 |
+
dom.addClass(popup, innerParams.hideClass.popup)
|
68 |
+
|
69 |
+
const backdrop = dom.getContainer()
|
70 |
+
dom.removeClass(backdrop, innerParams.showClass.backdrop)
|
71 |
+
dom.addClass(backdrop, innerParams.hideClass.backdrop)
|
72 |
+
|
73 |
+
handlePopupAnimation(this, popup, innerParams)
|
74 |
+
|
75 |
+
// Resolve Swal promise
|
76 |
+
swalPromiseResolve(resolveValue)
|
77 |
+
}
|
78 |
+
|
79 |
+
const prepareResolveValue = (resolveValue) => {
|
80 |
+
// When user calls Swal.close()
|
81 |
+
if (typeof resolveValue === 'undefined') {
|
82 |
+
return {
|
83 |
+
isConfirmed: false,
|
84 |
+
isDenied: false,
|
85 |
+
isDismissed: true,
|
86 |
+
}
|
87 |
+
}
|
88 |
+
|
89 |
+
return Object.assign({
|
90 |
+
isConfirmed: false,
|
91 |
+
isDenied: false,
|
92 |
+
isDismissed: false,
|
93 |
+
}, resolveValue)
|
94 |
+
}
|
95 |
+
|
96 |
+
const handlePopupAnimation = (instance, popup, innerParams) => {
|
97 |
+
const container = dom.getContainer()
|
98 |
+
// If animation is supported, animate
|
99 |
+
const animationIsSupported = dom.animationEndEvent && dom.hasCssAnimation(popup)
|
100 |
+
|
101 |
+
const {
|
102 |
+
onClose, onAfterClose, // @deprecated
|
103 |
+
willClose, didClose
|
104 |
+
} = innerParams
|
105 |
+
|
106 |
+
runDidClose(popup, willClose, onClose)
|
107 |
+
|
108 |
+
if (animationIsSupported) {
|
109 |
+
animatePopup(instance, popup, container, didClose || onAfterClose)
|
110 |
+
} else {
|
111 |
+
// Otherwise, remove immediately
|
112 |
+
removePopupAndResetState(instance, container, dom.isToast(), didClose || onAfterClose)
|
113 |
+
}
|
114 |
+
}
|
115 |
+
|
116 |
+
const runDidClose = (popup, willClose, onClose) => {
|
117 |
+
if (willClose !== null && typeof willClose === 'function') {
|
118 |
+
willClose(popup)
|
119 |
+
} else if (onClose !== null && typeof onClose === 'function') {
|
120 |
+
onClose(popup) // @deprecated
|
121 |
+
}
|
122 |
+
}
|
123 |
+
|
124 |
+
const animatePopup = (instance, popup, container, didClose) => {
|
125 |
+
globalState.swalCloseEventFinishedCallback = removePopupAndResetState.bind(null, instance, container, dom.isToast(), didClose)
|
126 |
+
popup.addEventListener(dom.animationEndEvent, function (e) {
|
127 |
+
if (e.target === popup) {
|
128 |
+
globalState.swalCloseEventFinishedCallback()
|
129 |
+
delete globalState.swalCloseEventFinishedCallback
|
130 |
+
}
|
131 |
+
})
|
132 |
+
}
|
133 |
+
|
134 |
+
const triggerDidCloseAndDispose = (instance, didClose) => {
|
135 |
+
setTimeout(() => {
|
136 |
+
if (typeof didClose === 'function') {
|
137 |
+
didClose()
|
138 |
+
}
|
139 |
+
instance._destroy()
|
140 |
+
})
|
141 |
+
}
|
142 |
+
|
143 |
+
export {
|
144 |
+
close as closePopup,
|
145 |
+
close as closeModal,
|
146 |
+
close as closeToast
|
147 |
+
}
|
assets/sweetalert2/src/instanceMethods/enable-disable-elements.js
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import privateProps from '../privateProps.js'
|
2 |
+
|
3 |
+
function setButtonsDisabled (instance, buttons, disabled) {
|
4 |
+
const domCache = privateProps.domCache.get(instance)
|
5 |
+
buttons.forEach(button => {
|
6 |
+
domCache[button].disabled = disabled
|
7 |
+
})
|
8 |
+
}
|
9 |
+
|
10 |
+
function setInputDisabled (input, disabled) {
|
11 |
+
if (!input) {
|
12 |
+
return false
|
13 |
+
}
|
14 |
+
if (input.type === 'radio') {
|
15 |
+
const radiosContainer = input.parentNode.parentNode
|
16 |
+
const radios = radiosContainer.querySelectorAll('input')
|
17 |
+
for (let i = 0; i < radios.length; i++) {
|
18 |
+
radios[i].disabled = disabled
|
19 |
+
}
|
20 |
+
} else {
|
21 |
+
input.disabled = disabled
|
22 |
+
}
|
23 |
+
}
|
24 |
+
|
25 |
+
export function enableButtons () {
|
26 |
+
setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], false)
|
27 |
+
}
|
28 |
+
|
29 |
+
export function disableButtons () {
|
30 |
+
setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], true)
|
31 |
+
}
|
32 |
+
|
33 |
+
export function enableInput () {
|
34 |
+
return setInputDisabled(this.getInput(), false)
|
35 |
+
}
|
36 |
+
|
37 |
+
export function disableInput () {
|
38 |
+
return setInputDisabled(this.getInput(), true)
|
39 |
+
}
|
assets/sweetalert2/src/instanceMethods/getInput.js
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import * as dom from '../utils/dom/index.js'
|
2 |
+
import privateProps from '../privateProps.js'
|
3 |
+
|
4 |
+
// Get input element by specified type or, if type isn't specified, by params.input
|
5 |
+
export function getInput (instance) {
|
6 |
+
const innerParams = privateProps.innerParams.get(instance || this)
|
7 |
+
const domCache = privateProps.domCache.get(instance || this)
|
8 |
+
if (!domCache) {
|
9 |
+
return null
|
10 |
+
}
|
11 |
+
return dom.getInput(domCache.content, innerParams.input)
|
12 |
+
}
|
assets/sweetalert2/src/instanceMethods/hideLoading.js
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import * as dom from '../utils/dom/index.js'
|
2 |
+
import { swalClasses } from '../utils/classes.js'
|
3 |
+
import privateProps from '../privateProps.js'
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Enables buttons and hide loader.
|
7 |
+
*/
|
8 |
+
function hideLoading () {
|
9 |
+
// do nothing if popup is closed
|
10 |
+
const innerParams = privateProps.innerParams.get(this)
|
11 |
+
if (!innerParams) {
|
12 |
+
return
|
13 |
+
}
|
14 |
+
const domCache = privateProps.domCache.get(this)
|
15 |
+
dom.hide(domCache.loader)
|
16 |
+
if (innerParams.showConfirmButton) {
|
17 |
+
dom.show(domCache.confirmButton, 'inline-block')
|
18 |
+
} else if (!innerParams.showConfirmButton && !innerParams.showCancelButton) {
|
19 |
+
dom.hide(domCache.actions)
|
20 |
+
}
|
21 |
+
dom.removeClass([domCache.popup, domCache.actions], swalClasses.loading)
|
22 |
+
domCache.popup.removeAttribute('aria-busy')
|
23 |
+
domCache.popup.removeAttribute('data-loading')
|
24 |
+
domCache.confirmButton.disabled = false
|
25 |
+
domCache.denyButton.disabled = false
|
26 |
+
domCache.cancelButton.disabled = false
|
27 |
+
}
|
28 |
+
|
29 |
+
export {
|
30 |
+
hideLoading,
|
31 |
+
hideLoading as disableLoading
|
32 |
+
}
|
assets/sweetalert2/src/instanceMethods/keydown-handler.js
ADDED
@@ -0,0 +1,142 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import * as dom from '../utils/dom/index.js'
|
2 |
+
import { DismissReason } from '../utils/DismissReason.js'
|
3 |
+
import { callIfFunction } from '../utils/utils.js'
|
4 |
+
import { clickConfirm } from '../staticMethods/dom.js'
|
5 |
+
import privateProps from '../privateProps.js'
|
6 |
+
|
7 |
+
export const addKeydownHandler = (instance, globalState, innerParams, dismissWith) => {
|
8 |
+
if (globalState.keydownTarget && globalState.keydownHandlerAdded) {
|
9 |
+
globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, { capture: globalState.keydownListenerCapture })
|
10 |
+
globalState.keydownHandlerAdded = false
|
11 |
+
}
|
12 |
+
|
13 |
+
if (!innerParams.toast) {
|
14 |
+
globalState.keydownHandler = (e) => keydownHandler(instance, e, dismissWith)
|
15 |
+
globalState.keydownTarget = innerParams.keydownListenerCapture ? window : dom.getPopup()
|
16 |
+
globalState.keydownListenerCapture = innerParams.keydownListenerCapture
|
17 |
+
globalState.keydownTarget.addEventListener('keydown', globalState.keydownHandler, { capture: globalState.keydownListenerCapture })
|
18 |
+
globalState.keydownHandlerAdded = true
|
19 |
+
}
|
20 |
+
}
|
21 |
+
|
22 |
+
// Focus handling
|
23 |
+
export const setFocus = (innerParams, index, increment) => {
|
24 |
+
const focusableElements = dom.getFocusableElements()
|
25 |
+
// search for visible elements and select the next possible match
|
26 |
+
for (let i = 0; i < focusableElements.length; i++) {
|
27 |
+
index = index + increment
|
28 |
+
|
29 |
+
// rollover to first item
|
30 |
+
if (index === focusableElements.length) {
|
31 |
+
index = 0
|
32 |
+
|
33 |
+
// go to last item
|
34 |
+
} else if (index === -1) {
|
35 |
+
index = focusableElements.length - 1
|
36 |
+
}
|
37 |
+
|
38 |
+
return focusableElements[index].focus()
|
39 |
+
}
|
40 |
+
// no visible focusable elements, focus the popup
|
41 |
+
dom.getPopup().focus()
|
42 |
+
}
|
43 |
+
|
44 |
+
const arrowKeysNextButton = [
|
45 |
+
'ArrowRight', 'ArrowDown',
|
46 |
+
'Right', 'Down' // IE11
|
47 |
+
]
|
48 |
+
|
49 |
+
const arrowKeysPreviousButton = [
|
50 |
+
'ArrowLeft', 'ArrowUp',
|
51 |
+
'Left', 'Up' // IE11
|
52 |
+
]
|
53 |
+
|
54 |
+
const escKeys = [
|
55 |
+
'Escape',
|
56 |
+
'Esc' // IE11
|
57 |
+
]
|
58 |
+
|
59 |
+
const keydownHandler = (instance, e, dismissWith) => {
|
60 |
+
const innerParams = privateProps.innerParams.get(instance)
|
61 |
+
|
62 |
+
if (innerParams.stopKeydownPropagation) {
|
63 |
+
e.stopPropagation()
|
64 |
+
}
|
65 |
+
|
66 |
+
// ENTER
|
67 |
+
if (e.key === 'Enter') {
|
68 |
+
handleEnter(instance, e, innerParams)
|
69 |
+
|
70 |
+
// TAB
|
71 |
+
} else if (e.key === 'Tab') {
|
72 |
+
handleTab(e, innerParams)
|
73 |
+
|
74 |
+
// ARROWS - switch focus between buttons
|
75 |
+
} else if ([...arrowKeysNextButton, ...arrowKeysPreviousButton].includes(e.key)) {
|
76 |
+
handleArrows(e.key)
|
77 |
+
|
78 |
+
// ESC
|
79 |
+
} else if (escKeys.includes(e.key)) {
|
80 |
+
handleEsc(e, innerParams, dismissWith)
|
81 |
+
}
|
82 |
+
}
|
83 |
+
|
84 |
+
const handleEnter = (instance, e, innerParams) => {
|
85 |
+
// #720 #721
|
86 |
+
if (e.isComposing) {
|
87 |
+
return
|
88 |
+
}
|
89 |
+
|
90 |
+
if (e.target && instance.getInput() && e.target.outerHTML === instance.getInput().outerHTML) {
|
91 |
+
if (['textarea', 'file'].includes(innerParams.input)) {
|
92 |
+
return // do not submit
|
93 |
+
}
|
94 |
+
|
95 |
+
clickConfirm()
|
96 |
+
e.preventDefault()
|
97 |
+
}
|
98 |
+
}
|
99 |
+
|
100 |
+
const handleTab = (e, innerParams) => {
|
101 |
+
const targetElement = e.target
|
102 |
+
|
103 |
+
const focusableElements = dom.getFocusableElements()
|
104 |
+
let btnIndex = -1
|
105 |
+
for (let i = 0; i < focusableElements.length; i++) {
|
106 |
+
if (targetElement === focusableElements[i]) {
|
107 |
+
btnIndex = i
|
108 |
+
break
|
109 |
+
}
|
110 |
+
}
|
111 |
+
|
112 |
+
if (!e.shiftKey) {
|
113 |
+
// Cycle to the next button
|
114 |
+
setFocus(innerParams, btnIndex, 1)
|
115 |
+
} else {
|
116 |
+
// Cycle to the prev button
|
117 |
+
setFocus(innerParams, btnIndex, -1)
|
118 |
+
}
|
119 |
+
e.stopPropagation()
|
120 |
+
e.preventDefault()
|
121 |
+
}
|
122 |
+
|
123 |
+
const handleArrows = (key) => {
|
124 |
+
const confirmButton = dom.getConfirmButton()
|
125 |
+
const denyButton = dom.getDenyButton()
|
126 |
+
const cancelButton = dom.getCancelButton()
|
127 |
+
if (![confirmButton, denyButton, cancelButton].includes(document.activeElement)) {
|
128 |
+
return
|
129 |
+
}
|
130 |
+
const sibling = arrowKeysNextButton.includes(key) ? 'nextElementSibling' : 'previousElementSibling'
|
131 |
+
const buttonToFocus = document.activeElement[sibling]
|
132 |
+
if (buttonToFocus) {
|
133 |
+
buttonToFocus.focus()
|
134 |
+
}
|
135 |
+
}
|
136 |
+
|
137 |
+
const handleEsc = (e, innerParams, dismissWith) => {
|
138 |
+
if (callIfFunction(innerParams.allowEscapeKey)) {
|
139 |
+
e.preventDefault()
|
140 |
+
dismissWith(DismissReason.esc)
|
141 |
+
}
|
142 |
+
}
|
assets/sweetalert2/src/instanceMethods/popup-click-handler.js
ADDED
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { callIfFunction } from '../utils/utils.js'
|
2 |
+
import { DismissReason } from '../utils/DismissReason.js'
|
3 |
+
import privateProps from '../privateProps.js'
|
4 |
+
|
5 |
+
export const handlePopupClick = (instance, domCache, dismissWith) => {
|
6 |
+
const innerParams = privateProps.innerParams.get(instance)
|
7 |
+
if (innerParams.toast) {
|
8 |
+
handleToastClick(instance, domCache, dismissWith)
|
9 |
+
} else {
|
10 |
+
// Ignore click events that had mousedown on the popup but mouseup on the container
|
11 |
+
// This can happen when the user drags a slider
|
12 |
+
handleModalMousedown(domCache)
|
13 |
+
|
14 |
+
// Ignore click events that had mousedown on the container but mouseup on the popup
|
15 |
+
handleContainerMousedown(domCache)
|
16 |
+
|
17 |
+
handleModalClick(instance, domCache, dismissWith)
|
18 |
+
}
|
19 |
+
}
|
20 |
+
|
21 |
+
const handleToastClick = (instance, domCache, dismissWith) => {
|
22 |
+
// Closing toast by internal click
|
23 |
+
domCache.popup.onclick = () => {
|
24 |
+
const innerParams = privateProps.innerParams.get(instance)
|
25 |
+
if (
|
26 |
+
innerParams.showConfirmButton ||
|
27 |
+
innerParams.showDenyButton ||
|
28 |
+
innerParams.showCancelButton ||
|
29 |
+
innerParams.showCloseButton ||
|
30 |
+
innerParams.input
|
31 |
+
) {
|
32 |
+
return
|
33 |
+
}
|
34 |
+
dismissWith(DismissReason.close)
|
35 |
+
}
|
36 |
+
}
|
37 |
+
|
38 |
+
let ignoreOutsideClick = false
|
39 |
+
|
40 |
+
const handleModalMousedown = (domCache) => {
|
41 |
+
domCache.popup.onmousedown = () => {
|
42 |
+
domCache.container.onmouseup = function (e) {
|
43 |
+
domCache.container.onmouseup = undefined
|
44 |
+
// We only check if the mouseup target is the container because usually it doesn't
|
45 |
+
// have any other direct children aside of the popup
|
46 |
+
if (e.target === domCache.container) {
|
47 |
+
ignoreOutsideClick = true
|
48 |
+
}
|
49 |
+
}
|
50 |
+
}
|
51 |
+
}
|
52 |
+
|
53 |
+
const handleContainerMousedown = (domCache) => {
|
54 |
+
domCache.container.onmousedown = () => {
|
55 |
+
domCache.popup.onmouseup = function (e) {
|
56 |
+
domCache.popup.onmouseup = undefined
|
57 |
+
// We also need to check if the mouseup target is a child of the popup
|
58 |
+
if (e.target === domCache.popup || domCache.popup.contains(e.target)) {
|
59 |
+
ignoreOutsideClick = true
|
60 |
+
}
|
61 |
+
}
|
62 |
+
}
|
63 |
+
}
|
64 |
+
|
65 |
+
const handleModalClick = (instance, domCache, dismissWith) => {
|
66 |
+
domCache.container.onclick = (e) => {
|
67 |
+
const innerParams = privateProps.innerParams.get(instance)
|
68 |
+
if (ignoreOutsideClick) {
|
69 |
+
ignoreOutsideClick = false
|
70 |
+
return
|
71 |
+
}
|
72 |
+
if (e.target === domCache.container && callIfFunction(innerParams.allowOutsideClick)) {
|
73 |
+
dismissWith(DismissReason.backdrop)
|
74 |
+
}
|
75 |
+
}
|
76 |
+
}
|
assets/sweetalert2/src/instanceMethods/progress-steps.js
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import privateProps from '../privateProps.js'
|
2 |
+
|
3 |
+
export function getProgressSteps () {
|
4 |
+
const domCache = privateProps.domCache.get(this)
|
5 |
+
return domCache.progressSteps
|
6 |
+
}
|
assets/sweetalert2/src/instanceMethods/update.js
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import * as dom from '../../src/utils/dom/index.js'
|
2 |
+
import { warn } from '../../src/utils/utils.js'
|
3 |
+
import sweetAlert from '../sweetalert2.js'
|
4 |
+
import privateProps from '../privateProps.js'
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Updates popup parameters.
|
8 |
+
*/
|
9 |
+
export function update (params) {
|
10 |
+
const popup = dom.getPopup()
|
11 |
+
const innerParams = privateProps.innerParams.get(this)
|
12 |
+
|
13 |
+
if (!popup || dom.hasClass(popup, innerParams.hideClass.popup)) {
|
14 |
+
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.`)
|
15 |
+
}
|
16 |
+
|
17 |
+
const validUpdatableParams = {}
|
18 |
+
|
19 |
+
// assign valid params from `params` to `defaults`
|
20 |
+
Object.keys(params).forEach(param => {
|
21 |
+
if (sweetAlert.isUpdatableParameter(param)) {
|
22 |
+
validUpdatableParams[param] = params[param]
|
23 |
+
} else {
|
24 |
+
warn(`Invalid parameter to update: "${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`)
|
25 |
+
}
|
26 |
+
})
|
27 |
+
|
28 |
+
const updatedParams = Object.assign({}, innerParams, validUpdatableParams)
|
29 |
+
|
30 |
+
dom.render(this, updatedParams)
|
31 |
+
|
32 |
+
privateProps.innerParams.set(this, updatedParams)
|
33 |
+
Object.defineProperties(this, {
|
34 |
+
params: {
|
35 |
+
value: Object.assign({}, this.params, params),
|
36 |
+
writable: false,
|
37 |
+
enumerable: true
|
38 |
+
}
|
39 |
+
})
|
40 |
+
}
|
assets/sweetalert2/src/instanceMethods/validation-message.js
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import * as dom from '../utils/dom/index.js'
|
2 |
+
import { swalClasses } from '../utils/classes.js'
|
3 |
+
import privateProps from '../privateProps.js'
|
4 |
+
|
5 |
+
// Show block with validation message
|
6 |
+
export function showValidationMessage (error) {
|
7 |
+
const domCache = privateProps.domCache.get(this)
|
8 |
+
const params = privateProps.innerParams.get(this)
|
9 |
+
dom.setInnerHtml(domCache.validationMessage, error)
|
10 |
+
domCache.validationMessage.className = swalClasses['validation-message']
|
11 |
+
if (params.customClass && params.customClass.validationMessage) {
|
12 |
+
dom.addClass(domCache.validationMessage, params.customClass.validationMessage)
|
13 |
+
}
|
14 |
+
dom.show(domCache.validationMessage)
|
15 |
+
|
16 |
+
const input = this.getInput()
|
17 |
+
if (input) {
|
18 |
+
input.setAttribute('aria-invalid', true)
|
19 |
+
input.setAttribute('aria-describedBy', swalClasses['validation-message'])
|
20 |
+
dom.focusInput(input)
|
21 |
+
dom.addClass(input, swalClasses.inputerror)
|
22 |
+
}
|
23 |
+
}
|
24 |
+
|
25 |
+
// Hide block with validation message
|
26 |
+
export function resetValidationMessage () {
|
27 |
+
const domCache = privateProps.domCache.get(this)
|
28 |
+
if (domCache.validationMessage) {
|
29 |
+
dom.hide(domCache.validationMessage)
|
30 |
+
}
|
31 |
+
|
32 |
+
const input = this.getInput()
|
33 |
+
if (input) {
|
34 |
+
input.removeAttribute('aria-invalid')
|
35 |
+
input.removeAttribute('aria-describedBy')
|
36 |
+
dom.removeClass(input, swalClasses.inputerror)
|
37 |
+
}
|
38 |
+
}
|
assets/sweetalert2/src/privateMethods.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* This module containts `WeakMap`s for each effectively-"private property" that a `Swal` has.
|
3 |
+
* For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')`
|
4 |
+
* This is the approach that Babel will probably take to implement private methods/fields
|
5 |
+
* https://github.com/tc39/proposal-private-methods
|
6 |
+
* https://github.com/babel/babel/pull/7555
|
7 |
+
* Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module*
|
8 |
+
* then we can use that language feature.
|
9 |
+
*/
|
10 |
+
|
11 |
+
export default {
|
12 |
+
swalPromiseResolve: new WeakMap()
|
13 |
+
}
|
assets/sweetalert2/src/privateProps.js
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* This module containts `WeakMap`s for each effectively-"private property" that a `Swal` has.
|
3 |
+
* For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')`
|
4 |
+
* This is the approach that Babel will probably take to implement private methods/fields
|
5 |
+
* https://github.com/tc39/proposal-private-methods
|
6 |
+
* https://github.com/babel/babel/pull/7555
|
7 |
+
* Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module*
|
8 |
+
* then we can use that language feature.
|
9 |
+
*/
|
10 |
+
|
11 |
+
export default {
|
12 |
+
promise: new WeakMap(),
|
13 |
+
innerParams: new WeakMap(),
|
14 |
+
domCache: new WeakMap()
|
15 |
+
}
|
assets/sweetalert2/src/scss/_animations.scss
ADDED
@@ -0,0 +1,158 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@import 'toasts-animations';
|
2 |
+
|
3 |
+
// Appearance animation
|
4 |
+
@keyframes swal2-show {
|
5 |
+
0% {
|
6 |
+
transform: scale(.7);
|
7 |
+
}
|
8 |
+
|
9 |
+
45% {
|
10 |
+
transform: scale(1.05);
|
11 |
+
}
|
12 |
+
|
13 |
+
80% {
|
14 |
+
transform: scale(.95);
|
15 |
+
}
|
16 |
+
|
17 |
+
100% {
|
18 |
+
transform: scale(1);
|
19 |
+
}
|
20 |
+
}
|
21 |
+
|
22 |
+
// Disppearance animation
|
23 |
+
@keyframes swal2-hide {
|
24 |
+
0% {
|
25 |
+
transform: scale(1);
|
26 |
+
opacity: 1;
|
27 |
+
}
|
28 |
+
|
29 |
+
100% {
|
30 |
+
transform: scale(.5);
|
31 |
+
opacity: 0;
|
32 |
+
}
|
33 |
+
}
|
34 |
+
|
35 |
+
// Success icon animations
|
36 |
+
@keyframes swal2-animate-success-line-tip {
|
37 |
+
0% {
|
38 |
+
top: 1.1875em;
|
39 |
+
left: .0625em;
|
40 |
+
width: 0;
|
41 |
+
}
|
42 |
+
|
43 |
+
54% {
|
44 |
+
top: 1.0625em;
|
45 |
+
left: .125em;
|
46 |
+
width: 0;
|
47 |
+
}
|
48 |
+
|
49 |
+
70% {
|
50 |
+
top: 2.1875em;
|
51 |
+
left: -.375em;
|
52 |
+
width: 3.125em;
|
53 |
+
}
|
54 |
+
|
55 |
+
84% {
|
56 |
+
top: 3em;
|
57 |
+
left: 1.3125em;
|
58 |
+
width: 1.0625em;
|
59 |
+
}
|
60 |
+
|
61 |
+
100% {
|
62 |
+
top: 2.8125em;
|
63 |
+
left: .8125em;
|
64 |
+
width: 1.5625em;
|
65 |
+
}
|
66 |
+
}
|
67 |
+
|
68 |
+
@keyframes swal2-animate-success-line-long {
|
69 |
+
0% {
|
70 |
+
top: 3.375em;
|
71 |
+
right: 2.875em;
|
72 |
+
width: 0;
|
73 |
+
}
|
74 |
+
|
75 |
+
65% {
|
76 |
+
top: 3.375em;
|
77 |
+
right: 2.875em;
|
78 |
+
width: 0;
|
79 |
+
}
|
80 |
+
|
81 |
+
84% {
|
82 |
+
top: 2.1875em;
|
83 |
+
right: 0;
|
84 |
+
width: 3.4375em;
|
85 |
+
}
|
86 |
+
|
87 |
+
100% {
|
88 |
+
top: 2.375em;
|
89 |
+
right: .5em;
|
90 |
+
width: 2.9375em;
|
91 |
+
}
|
92 |
+
}
|
93 |
+
|
94 |
+
@keyframes swal2-rotate-success-circular-line {
|
95 |
+
0% {
|
96 |
+
transform: rotate(-45deg);
|
97 |
+
}
|
98 |
+
|
99 |
+
5% {
|
100 |
+
transform: rotate(-45deg);
|
101 |
+
}
|
102 |
+
|
103 |
+
12% {
|
104 |
+
transform: rotate(-405deg);
|
105 |
+
}
|
106 |
+
|
107 |
+
100% {
|
108 |
+
transform: rotate(-405deg);
|
109 |
+
}
|
110 |
+
}
|
111 |
+
|
112 |
+
// Error icon animations
|
113 |
+
@keyframes swal2-animate-error-x-mark {
|
114 |
+
0% {
|
115 |
+
margin-top: 1.625em;
|
116 |
+
transform: scale(.4);
|
117 |
+
opacity: 0;
|
118 |
+
}
|
119 |
+
|
120 |
+
50% {
|
121 |
+
margin-top: 1.625em;
|
122 |
+
transform: scale(.4);
|
123 |
+
opacity: 0;
|
124 |
+
}
|
125 |
+
|
126 |
+
80% {
|
127 |
+
margin-top: -.375em;
|
128 |
+
transform: scale(1.15);
|
129 |
+
}
|
130 |
+
|
131 |
+
100% {
|
132 |
+
margin-top: 0;
|
133 |
+
transform: scale(1);
|
134 |
+
opacity: 1;
|
135 |
+
}
|
136 |
+
}
|
137 |
+
|
138 |
+
@keyframes swal2-animate-error-icon {
|
139 |
+
0% {
|
140 |
+
transform: rotateX(100deg);
|
141 |
+
opacity: 0;
|
142 |
+
}
|
143 |
+
|
144 |
+
100% {
|
145 |
+
transform: rotateX(0deg);
|
146 |
+
opacity: 1;
|
147 |
+
}
|
148 |
+
}
|
149 |
+
|
150 |
+
@keyframes swal2-rotate-loading {
|
151 |
+
0% {
|
152 |
+
transform: rotate(0deg);
|
153 |
+
}
|
154 |
+
|
155 |
+
100% {
|
156 |
+
transform: rotate(360deg);
|
157 |
+
}
|
158 |
+
}
|
assets/sweetalert2/src/scss/_body.scss
ADDED
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@import 'toasts-body';
|
2 |
+
|
3 |
+
@mixin sweetalert2-body() {
|
4 |
+
&.swal2-shown {
|
5 |
+
@include not('.swal2-no-backdrop', '.swal2-toast-shown') {
|
6 |
+
overflow: hidden; // not overflow-y because of Sarari, #1253
|
7 |
+
}
|
8 |
+
}
|
9 |
+
|
10 |
+
&.swal2-height-auto {
|
11 |
+
height: auto !important; // #781 #1107
|
12 |
+
}
|
13 |
+
|
14 |
+
&.swal2-no-backdrop {
|
15 |
+
.swal2-container {
|
16 |
+
top: auto;
|
17 |
+
right: auto;
|
18 |
+
bottom: auto;
|
19 |
+
left: auto;
|
20 |
+
max-width: calc(100% - #{$swal2-container-padding} * 2);
|
21 |
+
background-color: transparent !important;
|
22 |
+
|
23 |
+
& > .swal2-modal {
|
24 |
+
box-shadow: 0 0 10px $swal2-backdrop;
|
25 |
+
}
|
26 |
+
|
27 |
+
&.swal2-top {
|
28 |
+
top: 0;
|
29 |
+
left: 50%;
|
30 |
+
transform: translateX(-50%);
|
31 |
+
}
|
32 |
+
|
33 |
+
&.swal2-top-start,
|
34 |
+
&.swal2-top-left {
|
35 |
+
top: 0;
|
36 |
+
left: 0;
|
37 |
+
}
|
38 |
+
|
39 |
+
&.swal2-top-end,
|
40 |
+
&.swal2-top-right {
|
41 |
+
top: 0;
|
42 |
+
right: 0;
|
43 |
+
}
|
44 |
+
|
45 |
+
&.swal2-center {
|
46 |
+
top: 50%;
|
47 |
+
left: 50%;
|
48 |
+
transform: translate(-50%, -50%);
|
49 |
+
}
|
50 |
+
|
51 |
+
&.swal2-center-start,
|
52 |
+
&.swal2-center-left {
|
53 |
+
top: 50%;
|
54 |
+
left: 0;
|
55 |
+
transform: translateY(-50%);
|
56 |
+
}
|
57 |
+
|
58 |
+
&.swal2-center-end,
|
59 |
+
&.swal2-center-right {
|
60 |
+
top: 50%;
|
61 |
+
right: 0;
|
62 |
+
transform: translateY(-50%);
|
63 |
+
}
|
64 |
+
|
65 |
+
&.swal2-bottom {
|
66 |
+
bottom: 0;
|
67 |
+
left: 50%;
|
68 |
+
transform: translateX(-50%);
|
69 |
+
}
|
70 |
+
|
71 |
+
&.swal2-bottom-start,
|
72 |
+
&.swal2-bottom-left {
|
73 |
+
bottom: 0;
|
74 |
+
left: 0;
|
75 |
+
}
|
76 |
+
|
77 |
+
&.swal2-bottom-end,
|
78 |
+
&.swal2-bottom-right {
|
79 |
+
right: 0;
|
80 |
+
bottom: 0;
|
81 |
+
}
|
82 |
+
}
|
83 |
+
}
|
84 |
+
|
85 |
+
@media print {
|
86 |
+
&.swal2-shown {
|
87 |
+
@include not('.swal2-no-backdrop', '.swal2-toast-shown') {
|
88 |
+
overflow-y: scroll !important;
|
89 |
+
|
90 |
+
> [aria-hidden='true'] {
|
91 |
+
display: none;
|
92 |
+
}
|
93 |
+
|
94 |
+
.swal2-container {
|
95 |
+
position: static !important;
|
96 |
+
}
|
97 |
+
}
|
98 |
+
}
|
99 |
+
}
|
100 |
+
}
|
assets/sweetalert2/src/scss/_core.scss
ADDED
@@ -0,0 +1,780 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.swal2-container {
|
2 |
+
// centering
|
3 |
+
display: flex;
|
4 |
+
position: fixed;
|
5 |
+
z-index: 1060;
|
6 |
+
top: 0;
|
7 |
+
right: 0;
|
8 |
+
bottom: 0;
|
9 |
+
left: 0;
|
10 |
+
flex-direction: row;
|
11 |
+
align-items: center;
|
12 |
+
justify-content: center;
|
13 |
+
padding: $swal2-container-padding;
|
14 |
+
overflow-x: hidden;
|
15 |
+
transition: $swal2-backdrop-transition;
|
16 |
+
|
17 |
+
// sweetalert2/issues/905
|
18 |
+
-webkit-overflow-scrolling: touch;
|
19 |
+
|
20 |
+
&.swal2-backdrop-show,
|
21 |
+
&.swal2-noanimation {
|
22 |
+
background: $swal2-backdrop;
|
23 |
+
}
|
24 |
+
|
25 |
+
&.swal2-backdrop-hide {
|
26 |
+
background: transparent !important;
|
27 |
+
}
|
28 |
+
|
29 |
+
&.swal2-top {
|
30 |
+
align-items: flex-start;
|
31 |
+
}
|
32 |
+
|
33 |
+
&.swal2-top-start,
|
34 |
+
&.swal2-top-left {
|
35 |
+
align-items: flex-start;
|
36 |
+
justify-content: flex-start;
|
37 |
+
}
|
38 |
+
|
39 |
+
&.swal2-top-end,
|
40 |
+
&.swal2-top-right {
|
41 |
+
align-items: flex-start;
|
42 |
+
justify-content: flex-end;
|
43 |
+
}
|
44 |
+
|
45 |
+
&.swal2-center {
|
46 |
+
align-items: center;
|
47 |
+
}
|
48 |
+
|
49 |
+
&.swal2-center-start,
|
50 |
+
&.swal2-center-left {
|
51 |
+
align-items: center;
|
52 |
+
justify-content: flex-start;
|
53 |
+
}
|
54 |
+
|
55 |
+
&.swal2-center-end,
|
56 |
+
&.swal2-center-right {
|
57 |
+
align-items: center;
|
58 |
+
justify-content: flex-end;
|
59 |
+
}
|
60 |
+
|
61 |
+
&.swal2-bottom {
|
62 |
+
align-items: flex-end;
|
63 |
+
}
|
64 |
+
|
65 |
+
&.swal2-bottom-start,
|
66 |
+
&.swal2-bottom-left {
|
67 |
+
align-items: flex-end;
|
68 |
+
justify-content: flex-start;
|
69 |
+
}
|
70 |
+
|
71 |
+
&.swal2-bottom-end,
|
72 |
+
&.swal2-bottom-right {
|
73 |
+
align-items: flex-end;
|
74 |
+
justify-content: flex-end;
|
75 |
+
}
|
76 |
+
|
77 |
+
&.swal2-bottom > :first-child,
|
78 |
+
&.swal2-bottom-start > :first-child,
|
79 |
+
&.swal2-bottom-left > :first-child,
|
80 |
+
&.swal2-bottom-end > :first-child,
|
81 |
+
&.swal2-bottom-right > :first-child {
|
82 |
+
margin-top: auto;
|
83 |
+
}
|
84 |
+
|
85 |
+
&.swal2-grow-fullscreen > .swal2-modal {
|
86 |
+
display: flex !important;
|
87 |
+
flex: 1;
|
88 |
+
align-self: stretch;
|
89 |
+
justify-content: center;
|
90 |
+
}
|
91 |
+
|
92 |
+
&.swal2-grow-row > .swal2-modal {
|
93 |
+
display: flex !important;
|
94 |
+
flex: 1;
|
95 |
+
align-content: center;
|
96 |
+
justify-content: center;
|
97 |
+
}
|
98 |
+
|
99 |
+
&.swal2-grow-column {
|
100 |
+
flex: 1;
|
101 |
+
flex-direction: column;
|
102 |
+
|
103 |
+
&.swal2-top,
|
104 |
+
&.swal2-center,
|
105 |
+
&.swal2-bottom {
|
106 |
+
align-items: center;
|
107 |
+
}
|
108 |
+
|
109 |
+
&.swal2-top-start,
|
110 |
+
&.swal2-center-start,
|
111 |
+
&.swal2-bottom-start,
|
112 |
+
&.swal2-top-left,
|
113 |
+
&.swal2-center-left,
|
114 |
+
&.swal2-bottom-left {
|
115 |
+
align-items: flex-start;
|
116 |
+
}
|
117 |
+
|
118 |
+
&.swal2-top-end,
|
119 |
+
&.swal2-center-end,
|
120 |
+
&.swal2-bottom-end,
|
121 |
+
&.swal2-top-right,
|
122 |
+
&.swal2-center-right,
|
123 |
+
&.swal2-bottom-right {
|
124 |
+
align-items: flex-end;
|
125 |
+
}
|
126 |
+
|
127 |
+
& > .swal2-modal {
|
128 |
+
display: flex !important;
|
129 |
+
flex: 1;
|
130 |
+
align-content: center;
|
131 |
+
justify-content: center;
|
132 |
+
}
|
133 |
+
}
|
134 |
+
|
135 |
+
&.swal2-no-transition {
|
136 |
+
transition: none !important;
|
137 |
+
}
|
138 |
+
|
139 |
+
@include not('.swal2-top',
|
140 |
+
'.swal2-top-start',
|
141 |
+
'.swal2-top-end',
|
142 |
+
'.swal2-top-left',
|
143 |
+
'.swal2-top-right',
|
144 |
+
'.swal2-center-start',
|
145 |
+
'.swal2-center-end',
|
146 |
+
'.swal2-center-left',
|
147 |
+
'.swal2-center-right',
|
148 |
+
'.swal2-bottom',
|
149 |
+
'.swal2-bottom-start',
|
150 |
+
'.swal2-bottom-end',
|
151 |
+
'.swal2-bottom-left',
|
152 |
+
'.swal2-bottom-right',
|
153 |
+
'.swal2-grow-fullscreen') {
|
154 |
+
& > .swal2-modal {
|
155 |
+
margin: auto;
|
156 |
+
}
|
157 |
+
}
|
158 |
+
|
159 |
+
@include ie {
|
160 |
+
.swal2-modal {
|
161 |
+
margin: 0 !important;
|
162 |
+
}
|
163 |
+
}
|
164 |
+
}
|
165 |
+
|
166 |
+
.swal2-popup {
|
167 |
+
display: none;
|
168 |
+
position: relative;
|
169 |
+
box-sizing: border-box;
|
170 |
+
flex-direction: column;
|
171 |
+
justify-content: center;
|
172 |
+
width: $swal2-width;
|
173 |
+
max-width: 100%;
|
174 |
+
padding: $swal2-padding;
|
175 |
+
border: $swal2-border;
|
176 |
+
border-radius: $swal2-border-radius;
|
177 |
+
background: $swal2-background;
|
178 |
+
font-family: $swal2-font;
|
179 |
+
font-size: $swal2-font-size;
|
180 |
+
|
181 |
+
&:focus {
|
182 |
+
outline: none;
|
183 |
+
}
|
184 |
+
|
185 |
+
&.swal2-loading {
|
186 |
+
overflow-y: hidden;
|
187 |
+
}
|
188 |
+
}
|
189 |
+
|
190 |
+
.swal2-header {
|
191 |
+
display: flex;
|
192 |
+
flex-direction: column;
|
193 |
+
align-items: center;
|
194 |
+
padding: $swal2-header-padding;
|
195 |
+
}
|
196 |
+
|
197 |
+
.swal2-title {
|
198 |
+
position: relative;
|
199 |
+
max-width: 100%;
|
200 |
+
margin: $swal2-title-margin;
|
201 |
+
padding: 0;
|
202 |
+
color: $swal2-title-color;
|
203 |
+
font-size: $swal2-title-font-size;
|
204 |
+
font-weight: 600;
|
205 |
+
text-align: center;
|
206 |
+
text-transform: none;
|
207 |
+
word-wrap: break-word;
|
208 |
+
}
|
209 |
+
|
210 |
+
.swal2-actions {
|
211 |
+
display: flex;
|
212 |
+
z-index: 1; // prevent sucess icon from overlapping buttons
|
213 |
+
box-sizing: border-box;
|
214 |
+
flex-wrap: $swal2-actions-flex-wrap;
|
215 |
+
align-items: $swal2-actions-align-items;
|
216 |
+
justify-content: $swal2-actions-justify-content;
|
217 |
+
width: $swal2-actions-width;
|
218 |
+
margin: $swal2-actions-margin;
|
219 |
+
padding: $swal2-actions-padding;
|
220 |
+
|
221 |
+
&:not(.swal2-loading) {
|
222 |
+
.swal2-styled {
|
223 |
+
&[disabled] {
|
224 |
+
opacity: .4;
|
225 |
+
}
|
226 |
+
|
227 |
+
&:hover {
|
228 |
+
background-image: linear-gradient($swal2-button-darken-hover, $swal2-button-darken-hover);
|
229 |
+
}
|
230 |
+
|
231 |
+
&:active {
|
232 |
+
background-image: linear-gradient($swal2-button-darken-active, $swal2-button-darken-active);
|
233 |
+
}
|
234 |
+
}
|
235 |
+
}
|
236 |
+
}
|
237 |
+
|
238 |
+
.swal2-loader {
|
239 |
+
display: none;
|
240 |
+
align-items: $swal2-loader-align-items;
|
241 |
+
justify-content: $swal2-loader-justify-content;
|
242 |
+
width: $swal2-loader-width;
|
243 |
+
height: $swal2-loader-height;
|
244 |
+
margin: $swal2-loader-margin;
|
245 |
+
animation: $swal2-loader-animation;
|
246 |
+
border-width: $swal2-loader-border-width;
|
247 |
+
border-style: $swal2-loader-border-style;
|
248 |
+
border-radius: $swal2-loader-border-radius;
|
249 |
+
border-color: $swal2-loader-border-color;
|
250 |
+
}
|
251 |
+
|
252 |
+
.swal2-styled {
|
253 |
+
margin: .3125em;
|
254 |
+
padding: .625em 2em;
|
255 |
+
box-shadow: none;
|
256 |
+
font-weight: 500;
|
257 |
+
|
258 |
+
&:not([disabled]) {
|
259 |
+
cursor: pointer;
|
260 |
+
}
|
261 |
+
|
262 |
+
&.swal2-confirm {
|
263 |
+
order: $swal2-confirm-button-order;
|
264 |
+
border: $swal2-confirm-button-border;
|
265 |
+
border-radius: $swal2-confirm-button-border-radius;
|
266 |
+
background: initial;
|
267 |
+
background-color: $swal2-confirm-button-background-color;
|
268 |
+
color: $swal2-confirm-button-color;
|
269 |
+
font-size: $swal2-confirm-button-font-size;
|
270 |
+
}
|
271 |
+
|
272 |
+
&.swal2-deny {
|
273 |
+
order: $swal2-deny-button-order;
|
274 |
+
border: $swal2-deny-button-border;
|
275 |
+
border-radius: $swal2-deny-button-border-radius;
|
276 |
+
background: initial;
|
277 |
+
background-color: $swal2-deny-button-background-color;
|
278 |
+
color: $swal2-deny-button-color;
|
279 |
+
font-size: $swal2-deny-button-font-size;
|
280 |
+
}
|
281 |
+
|
282 |
+
&.swal2-cancel {
|
283 |
+
order: $swal2-cancel-button-order;
|
284 |
+
border: $swal2-cancel-button-border;
|
285 |
+
border-radius: $swal2-cancel-button-border-radius;
|
286 |
+
background: initial;
|
287 |
+
background-color: $swal2-cancel-button-background-color;
|
288 |
+
color: $swal2-cancel-button-color;
|
289 |
+
font-size: $swal2-cancel-button-font-size;
|
290 |
+
}
|
291 |
+
|
292 |
+
&:focus {
|
293 |
+
outline: $swal2-button-focus-outline;
|
294 |
+
background-color: $swal2-button-focus-background-color;
|
295 |
+
box-shadow: $swal2-button-focus-box-shadow;
|
296 |
+
}
|
297 |
+
|
298 |
+
&::-moz-focus-inner {
|
299 |
+
border: 0;
|
300 |
+
}
|
301 |
+
}
|
302 |
+
|
303 |
+
.swal2-footer {
|
304 |
+
justify-content: center;
|
305 |
+
margin: $swal2-footer-margin;
|
306 |
+
padding: $swal2-footer-padding;
|
307 |
+
border-top: 1px solid $swal2-footer-border-color;
|
308 |
+
color: $swal2-footer-color;
|
309 |
+
font-size: $swal2-footer-font-size;
|
310 |
+
}
|
311 |
+
|
312 |
+
.swal2-timer-progress-bar-container {
|
313 |
+
position: absolute;
|
314 |
+
right: 0;
|
315 |
+
bottom: 0;
|
316 |
+
left: 0;
|
317 |
+
height: $swal2-timer-progress-bar-height;
|
318 |
+
overflow: hidden;
|
319 |
+
border-bottom-right-radius: $swal2-border-radius;
|
320 |
+
border-bottom-left-radius: $swal2-border-radius;
|
321 |
+
}
|
322 |
+
|
323 |
+
.swal2-timer-progress-bar {
|
324 |
+
width: 100%;
|
325 |
+
height: $swal2-timer-progress-bar-height;
|
326 |
+
background: $swal2-timer-progress-bar-background;
|
327 |
+
}
|
328 |
+
|
329 |
+
.swal2-image {
|
330 |
+
max-width: 100%;
|
331 |
+
margin: $swal2-image-margin;
|
332 |
+
}
|
333 |
+
|
334 |
+
.swal2-close {
|
335 |
+
position: $swal2-close-button-position;
|
336 |
+
z-index: 2; // sweetalert2/issues/1617
|
337 |
+
top: $swal2-close-button-gap;
|
338 |
+
right: $swal2-close-button-gap;
|
339 |
+
align-items: $swal2-close-button-align-items;
|
340 |
+
justify-content: $swal2-close-button-justify-content;
|
341 |
+
width: $swal2-close-button-width;
|
342 |
+
height: $swal2-close-button-height;
|
343 |
+
padding: 0;
|
344 |
+
overflow: hidden;
|
345 |
+
transition: $swal2-close-button-transition;
|
346 |
+
border: $swal2-close-button-border;
|
347 |
+
border-radius: $swal2-close-button-border-radius;
|
348 |
+
outline: $swal2-close-button-outline;
|
349 |
+
background: $swal2-close-button-background;
|
350 |
+
color: $swal2-close-button-color;
|
351 |
+
font-family: $swal2-close-button-font-family;
|
352 |
+
font-size: $swal2-close-button-font-size;
|
353 |
+
line-height: $swal2-close-button-line-height;
|
354 |
+
cursor: pointer;
|
355 |
+
|
356 |
+
&:hover {
|
357 |
+
transform: $swal2-close-button-hover-transform;
|
358 |
+
background: $swal2-close-button-hover-background;
|
359 |
+
color: $swal2-close-button-hover-color;
|
360 |
+
}
|
361 |
+
|
362 |
+
&::-moz-focus-inner {
|
363 |
+
border: 0;
|
364 |
+
}
|
365 |
+
}
|
366 |
+
|
367 |
+
.swal2-content {
|
368 |
+
z-index: 1; // prevent sucess icon overlapping the content
|
369 |
+
justify-content: $swal2-content-justify-content;
|
370 |
+
margin: $swal2-content-margin;
|
371 |
+
padding: $swal2-content-padding;
|
372 |
+
color: $swal2-content-color;
|
373 |
+
font-size: $swal2-content-font-size;
|
374 |
+
font-weight: $swal2-content-font-weight;
|
375 |
+
line-height: $swal2-content-line-height;
|
376 |
+
text-align: $swal2-content-text-align;
|
377 |
+
word-wrap: $swal2-content-word-wrap;
|
378 |
+
}
|
379 |
+
|
380 |
+
.swal2-input,
|
381 |
+
.swal2-file,
|
382 |
+
.swal2-textarea,
|
383 |
+
.swal2-select,
|
384 |
+
.swal2-radio,
|
385 |
+
.swal2-checkbox {
|
386 |
+
margin: $swal2-input-margin;
|
387 |
+
}
|
388 |
+
|
389 |
+
.swal2-input,
|
390 |
+
.swal2-file,
|
391 |
+
.swal2-textarea {
|
392 |
+
box-sizing: border-box;
|
393 |
+
width: $swal2-input-width;
|
394 |
+
transition: $swal2-input-transition;
|
395 |
+
border: $swal2-input-border;
|
396 |
+
border-radius: $swal2-input-border-radius;
|
397 |
+
background: $swal2-input-background;
|
398 |
+
box-shadow: $swal2-input-box-shadow;
|
399 |
+
color: $swal2-input-color;
|
400 |
+
font-size: $swal2-input-font-size;
|
401 |
+
|
402 |
+
&.swal2-inputerror {
|
403 |
+
border-color: $swal2-error !important;
|
404 |
+
box-shadow: 0 0 2px $swal2-error !important;
|
405 |
+
}
|
406 |
+
|
407 |
+
&:focus {
|
408 |
+
border: $swal2-input-focus-border;
|
409 |
+
outline: $swal2-input-focus-outline;
|
410 |
+
box-shadow: $swal2-input-focus-box-shadow;
|
411 |
+
}
|
412 |
+
|
413 |
+
&::placeholder {
|
414 |
+
color: lighten($swal2-black, 80);
|
415 |
+
}
|
416 |
+
}
|
417 |
+
|
418 |
+
.swal2-range {
|
419 |
+
margin: $swal2-input-margin;
|
420 |
+
background: $swal2-background;
|
421 |
+
|
422 |
+
input {
|
423 |
+
width: 80%;
|
424 |
+
}
|
425 |
+
|
426 |
+
output {
|
427 |
+
width: 20%;
|
428 |
+
color: $swal2-input-color;
|
429 |
+
font-weight: 600;
|
430 |
+
text-align: center;
|
431 |
+
}
|
432 |
+
|
433 |
+
input,
|
434 |
+
output {
|
435 |
+
height: $swal2-input-height;
|
436 |
+
padding: 0;
|
437 |
+
font-size: $swal2-input-font-size;
|
438 |
+
line-height: $swal2-input-height;
|
439 |
+
}
|
440 |
+
}
|
441 |
+
|
442 |
+
.swal2-input {
|
443 |
+
height: $swal2-input-height;
|
444 |
+
padding: $swal2-input-padding;
|
445 |
+
|
446 |
+
&[type='number'] {
|
447 |
+
max-width: 10em;
|
448 |
+
}
|
449 |
+
}
|
450 |
+
|
451 |
+
.swal2-file {
|
452 |
+
background: $swal2-input-background;
|
453 |
+
font-size: $swal2-input-font-size;
|
454 |
+
}
|
455 |
+
|
456 |
+
.swal2-textarea {
|
457 |
+
height: $swal2-textarea-height;
|
458 |
+
padding: $swal2-textarea-padding;
|
459 |
+
}
|
460 |
+
|
461 |
+
.swal2-select {
|
462 |
+
min-width: 50%;
|
463 |
+
max-width: 100%;
|
464 |
+
padding: .375em .625em;
|
465 |
+
background: $swal2-input-background;
|
466 |
+
color: $swal2-input-color;
|
467 |
+
font-size: $swal2-input-font-size;
|
468 |
+
}
|
469 |
+
|
470 |
+
.swal2-radio,
|
471 |
+
.swal2-checkbox {
|
472 |
+
align-items: center;
|
473 |
+
justify-content: center;
|
474 |
+
background: $swal2-background;
|
475 |
+
color: $swal2-input-color;
|
476 |
+
|
477 |
+
label {
|
478 |
+
margin: 0 .6em;
|
479 |
+
font-size: $swal2-input-font-size;
|
480 |
+
}
|
481 |
+
|
482 |
+
input {
|
483 |
+
margin: 0 .4em;
|
484 |
+
}
|
485 |
+
}
|
486 |
+
|
487 |
+
.swal2-input-label {
|
488 |
+
display: flex;
|
489 |
+
justify-content: $swal2-input-label-justify-content;
|
490 |
+
margin: $swal2-input-label-margin;
|
491 |
+
}
|
492 |
+
|
493 |
+
.swal2-validation-message {
|
494 |
+
display: none;
|
495 |
+
align-items: center;
|
496 |
+
justify-content: $swal2-validation-message-justify-content;
|
497 |
+
margin: $swal2-validation-message-margin;
|
498 |
+
padding: $swal2-validation-message-padding;
|
499 |
+
overflow: hidden;
|
500 |
+
background: $swal2-validation-message-background;
|
501 |
+
color: $swal2-validation-message-color;
|
502 |
+
font-size: $swal2-validation-message-font-size;
|
503 |
+
font-weight: $swal2-validation-message-font-weight;
|
504 |
+
|
505 |
+
&::before {
|
506 |
+
content: '!';
|
507 |
+
display: inline-block;
|
508 |
+
width: 1.5em;
|
509 |
+
min-width: 1.5em;
|
510 |
+
height: 1.5em;
|
511 |
+
margin: 0 .625em;
|
512 |
+
zoom: $swal2-validation-message-icon-zoom;
|
513 |
+
border-radius: 50%;
|
514 |
+
background-color: $swal2-validation-message-icon-background;
|
515 |
+
color: $swal2-validation-message-icon-color;
|
516 |
+
font-weight: 600;
|
517 |
+
line-height: 1.5em;
|
518 |
+
text-align: center;
|
519 |
+
}
|
520 |
+
}
|
521 |
+
|
522 |
+
.swal2-icon {
|
523 |
+
position: relative;
|
524 |
+
box-sizing: content-box;
|
525 |
+
justify-content: center;
|
526 |
+
width: $swal2-icon-size;
|
527 |
+
height: $swal2-icon-size;
|
528 |
+
margin: $swal2-icon-margin;
|
529 |
+
zoom: $swal2-icon-zoom;
|
530 |
+
border: .25em solid transparent;
|
531 |
+
border-radius: 50%;
|
532 |
+
font-family: $swal2-icon-font-family;
|
533 |
+
line-height: $swal2-icon-size;
|
534 |
+
cursor: default;
|
535 |
+
user-select: none;
|
536 |
+
|
537 |
+
.swal2-icon-content {
|
538 |
+
display: flex;
|
539 |
+
align-items: center;
|
540 |
+
font-size: 3.75em;
|
541 |
+
}
|
542 |
+
|
543 |
+
&.swal2-error {
|
544 |
+
border-color: $swal2-error;
|
545 |
+
color: $swal2-error;
|
546 |
+
|
547 |
+
.swal2-x-mark {
|
548 |
+
position: relative;
|
549 |
+
flex-grow: 1;
|
550 |
+
}
|
551 |
+
|
552 |
+
[class^='swal2-x-mark-line'] {
|
553 |
+
display: block;
|
554 |
+
position: absolute;
|
555 |
+
top: 2.3125em;
|
556 |
+
width: 2.9375em;
|
557 |
+
height: .3125em;
|
558 |
+
border-radius: .125em;
|
559 |
+
background-color: $swal2-error;
|
560 |
+
|
561 |
+
&[class$='left'] {
|
562 |
+
left: 1.0625em;
|
563 |
+
transform: rotate(45deg);
|
564 |
+
}
|
565 |
+
|
566 |
+
&[class$='right'] {
|
567 |
+
right: 1em;
|
568 |
+
transform: rotate(-45deg);
|
569 |
+
}
|
570 |
+
}
|
571 |
+
|
572 |
+
// Error icon animation
|
573 |
+
&.swal2-icon-show {
|
574 |
+
@if $swal2-icon-animations {
|
575 |
+
animation: swal2-animate-error-icon .5s;
|
576 |
+
|
577 |
+
.swal2-x-mark {
|
578 |
+
animation: swal2-animate-error-x-mark .5s;
|
579 |
+
}
|
580 |
+
}
|
581 |
+
}
|
582 |
+
}
|
583 |
+
|
584 |
+
&.swal2-warning {
|
585 |
+
border-color: lighten($swal2-warning, 7);
|
586 |
+
color: $swal2-warning;
|
587 |
+
}
|
588 |
+
|
589 |
+
&.swal2-info {
|
590 |
+
border-color: lighten($swal2-info, 20);
|
591 |
+
color: $swal2-info;
|
592 |
+
}
|
593 |
+
|
594 |
+
&.swal2-question {
|
595 |
+
border-color: lighten($swal2-question, 20);
|
596 |
+
color: $swal2-question;
|
597 |
+
}
|
598 |
+
|
599 |
+
&.swal2-success {
|
600 |
+
border-color: $swal2-success;
|
601 |
+
color: $swal2-success;
|
602 |
+
|
603 |
+
[class^='swal2-success-circular-line'] {
|
604 |
+
// Emulate moving circular line
|
605 |
+
position: absolute;
|
606 |
+
width: 3.75em;
|
607 |
+
height: 7.5em;
|
608 |
+
transform: rotate(45deg);
|
609 |
+
border-radius: 50%;
|
610 |
+
|
611 |
+
&[class$='left'] {
|
612 |
+
top: -.4375em;
|
613 |
+
left: -2.0635em;
|
614 |
+
transform: rotate(-45deg);
|
615 |
+
transform-origin: 3.75em 3.75em;
|
616 |
+
border-radius: 7.5em 0 0 7.5em;
|
617 |
+
}
|
618 |
+
|
619 |
+
&[class$='right'] {
|
620 |
+
top: -.6875em;
|
621 |
+
left: 1.875em;
|
622 |
+
transform: rotate(-45deg);
|
623 |
+
transform-origin: 0 3.75em;
|
624 |
+
border-radius: 0 7.5em 7.5em 0;
|
625 |
+
}
|
626 |
+
}
|
627 |
+
|
628 |
+
.swal2-success-ring {
|
629 |
+
// Ring
|
630 |
+
position: absolute;
|
631 |
+
z-index: 2;
|
632 |
+
top: -.25em;
|
633 |
+
left: -.25em;
|
634 |
+
box-sizing: content-box;
|
635 |
+
width: 100%;
|
636 |
+
height: 100%;
|
637 |
+
border: .25em solid $swal2-success-border;
|
638 |
+
border-radius: 50%;
|
639 |
+
}
|
640 |
+
|
641 |
+
.swal2-success-fix {
|
642 |
+
// Hide corners left from animation
|
643 |
+
position: absolute;
|
644 |
+
z-index: 1;
|
645 |
+
top: .5em;
|
646 |
+
left: 1.625em;
|
647 |
+
width: .4375em;
|
648 |
+
height: 5.625em;
|
649 |
+
transform: rotate(-45deg);
|
650 |
+
}
|
651 |
+
|
652 |
+
[class^='swal2-success-line'] {
|
653 |
+
display: block;
|
654 |
+
position: absolute;
|
655 |
+
z-index: 2;
|
656 |
+
height: .3125em;
|
657 |
+
border-radius: .125em;
|
658 |
+
background-color: $swal2-success;
|
659 |
+
|
660 |
+
&[class$='tip'] {
|
661 |
+
top: 2.875em;
|
662 |
+
left: .8125em;
|
663 |
+
width: 1.5625em;
|
664 |
+
transform: rotate(45deg);
|
665 |
+
}
|
666 |
+
|
667 |
+
&[class$='long'] {
|
668 |
+
top: 2.375em;
|
669 |
+
right: .5em;
|
670 |
+
width: 2.9375em;
|
671 |
+
transform: rotate(-45deg);
|
672 |
+
}
|
673 |
+
}
|
674 |
+
|
675 |
+
// Success icon animation
|
676 |
+
&.swal2-icon-show {
|
677 |
+
@if $swal2-icon-animations {
|
678 |
+
.swal2-success-line-tip {
|
679 |
+
animation: swal2-animate-success-line-tip .75s;
|
680 |
+
}
|
681 |
+
|
682 |
+
.swal2-success-line-long {
|
683 |
+
animation: swal2-animate-success-line-long .75s;
|
684 |
+
}
|
685 |
+
|
686 |
+
.swal2-success-circular-line-right {
|
687 |
+
animation: swal2-rotate-success-circular-line 4.25s ease-in;
|
688 |
+
}
|
689 |
+
}
|
690 |
+
}
|
691 |
+
}
|
692 |
+
}
|
693 |
+
|
694 |
+
.swal2-progress-steps {
|
695 |
+
flex-wrap: $swal2-progress-steps-flex-wrap;
|
696 |
+
align-items: $swal2-progress-steps-align-items;
|
697 |
+
max-width: $swal2-progress-steps-max-width;
|
698 |
+
margin: $swal2-progress-steps-margin;
|
699 |
+
padding: $swal2-progress-steps-padding;
|
700 |
+
background: $swal2-progress-steps-background;
|
701 |
+
font-weight: $swal2-progress-steps-font-weight;
|
702 |
+
|
703 |
+
li {
|
704 |
+
display: inline-block;
|
705 |
+
position: relative;
|
706 |
+
}
|
707 |
+
|
708 |
+
.swal2-progress-step {
|
709 |
+
z-index: 20;
|
710 |
+
flex-shrink: 0;
|
711 |
+
width: $swal2-progress-step-width;
|
712 |
+
height: $swal2-progress-step-height;
|
713 |
+
border-radius: $swal2-progress-step-border-radius;
|
714 |
+
background: $swal2-active-step-background;
|
715 |
+
color: $swal2-active-step-color;
|
716 |
+
line-height: $swal2-progress-step-height;
|
717 |
+
text-align: center;
|
718 |
+
|
719 |
+
&.swal2-active-progress-step {
|
720 |
+
background: $swal2-active-step-background;
|
721 |
+
|
722 |
+
~ .swal2-progress-step {
|
723 |
+
background: $swal2-progress-step-background;
|
724 |
+
color: $swal2-progress-step-color;
|
725 |
+
}
|
726 |
+
|
727 |
+
~ .swal2-progress-step-line {
|
728 |
+
background: $swal2-progress-step-background;
|
729 |
+
}
|
730 |
+
}
|
731 |
+
}
|
732 |
+
|
733 |
+
.swal2-progress-step-line {
|
734 |
+
z-index: 10;
|
735 |
+
flex-shrink: 0;
|
736 |
+
width: $swal2-progress-steps-distance;
|
737 |
+
height: .4em;
|
738 |
+
margin: 0 -1px;
|
739 |
+
background: $swal2-active-step-background;
|
740 |
+
}
|
741 |
+
}
|
742 |
+
|
743 |
+
// github.com/sweetalert2/sweetalert2/issues/268
|
744 |
+
[class^='swal2'] {
|
745 |
+
-webkit-tap-highlight-color: transparent;
|
746 |
+
}
|
747 |
+
|
748 |
+
.swal2-show {
|
749 |
+
animation: $swal2-show-animation;
|
750 |
+
}
|
751 |
+
|
752 |
+
.swal2-hide {
|
753 |
+
animation: $swal2-hide-animation;
|
754 |
+
}
|
755 |
+
|
756 |
+
.swal2-noanimation {
|
757 |
+
transition: none;
|
758 |
+
}
|
759 |
+
|
760 |
+
// Measure scrollbar width for padding body during modal show/hide
|
761 |
+
.swal2-scrollbar-measure {
|
762 |
+
position: absolute;
|
763 |
+
top: -9999px;
|
764 |
+
width: 50px;
|
765 |
+
height: 50px;
|
766 |
+
overflow: scroll;
|
767 |
+
}
|
768 |
+
|
769 |
+
// Right-to-left support
|
770 |
+
.swal2-rtl {
|
771 |
+
.swal2-close {
|
772 |
+
right: auto;
|
773 |
+
left: $swal2-close-button-gap;
|
774 |
+
}
|
775 |
+
|
776 |
+
.swal2-timer-progress-bar {
|
777 |
+
right: 0;
|
778 |
+
left: auto;
|
779 |
+
}
|
780 |
+
}
|
assets/sweetalert2/src/scss/_mixins.scss
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@mixin ie {
|
2 |
+
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
|
3 |
+
@content;
|
4 |
+
}
|
5 |
+
}
|
6 |
+
|
7 |
+
// https://stackoverflow.com/a/30250161
|
8 |
+
@mixin not($ignor-list...) {
|
9 |
+
@if (length($ignor-list) == 1) {
|
10 |
+
$ignor-list: nth($ignor-list, 1);
|
11 |
+
}
|
12 |
+
|
13 |
+
$not-output: '';
|
14 |
+
|
15 |
+
@each $not in $ignor-list {
|
16 |
+
$not-output: $not-output + ':not(#{$not})'; // stylelint-disable-line scss/no-duplicate-dollar-variables
|
17 |
+
}
|
18 |
+
|
19 |
+
&#{$not-output} {
|
20 |
+
@content;
|
21 |
+
}
|
22 |
+
}
|
assets/sweetalert2/src/scss/_polyfills.scss
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@import '../variables';
|
2 |
+
|
3 |
+
// Microsoft Edge
|
4 |
+
@supports (-ms-accelerator: true) {
|
5 |
+
.swal2-range {
|
6 |
+
input {
|
7 |
+
width: 100% !important;
|
8 |
+
}
|
9 |
+
|
10 |
+
output {
|
11 |
+
display: none;
|
12 |
+
}
|
13 |
+
}
|
14 |
+
}
|
15 |
+
|
16 |
+
// IE11
|
17 |
+
@media all and (-ms-high-contrast: none),
|
18 |
+
(-ms-high-contrast: active) {
|
19 |
+
.swal2-range {
|
20 |
+
input {
|
21 |
+
width: 100% !important;
|
22 |
+
}
|
23 |
+
|
24 |
+
output {
|
25 |
+
display: none;
|
26 |
+
}
|
27 |
+
}
|
28 |
+
}
|
29 |
+
|
30 |
+
// Firefox
|
31 |
+
@-moz-document url-prefix() {
|
32 |
+
.swal2-close {
|
33 |
+
&:focus {
|
34 |
+
outline: 2px solid $swal2-outline-color;
|
35 |
+
}
|
36 |
+
}
|
37 |
+
}
|
assets/sweetalert2/src/scss/_theming.scss
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// base file for including when performing theming
|
2 |
+
// doesn't include at-rules or root selectors (like body) which allows for more comprehensive extending
|
3 |
+
|
4 |
+
@import '../variables';
|
5 |
+
@import 'mixins';
|
6 |
+
@import 'toasts';
|
7 |
+
@import 'body';
|
8 |
+
@import 'core';
|
assets/sweetalert2/src/scss/_toasts-animations.scss
ADDED
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Animations
|
2 |
+
@keyframes swal2-toast-show {
|
3 |
+
0% {
|
4 |
+
transform: translateY(-.625em) rotateZ(2deg);
|
5 |
+
}
|
6 |
+
|
7 |
+
33% {
|
8 |
+
transform: translateY(0) rotateZ(-2deg);
|
9 |
+
}
|
10 |
+
|
11 |
+
66% {
|
12 |
+
transform: translateY(.3125em) rotateZ(2deg);
|
13 |
+
}
|
14 |
+
|
15 |
+
100% {
|
16 |
+
transform: translateY(0) rotateZ(0deg);
|
17 |
+
}
|
18 |
+
}
|
19 |
+
|
20 |
+
@keyframes swal2-toast-hide {
|
21 |
+
100% {
|
22 |
+
transform: rotateZ(1deg);
|
23 |
+
opacity: 0;
|
24 |
+
}
|
25 |
+
}
|
26 |
+
|
27 |
+
@keyframes swal2-toast-animate-success-line-tip {
|
28 |
+
0% {
|
29 |
+
top: .5625em;
|
30 |
+
left: .0625em;
|
31 |
+
width: 0;
|
32 |
+
}
|
33 |
+
|
34 |
+
54% {
|
35 |
+
top: .125em;
|
36 |
+
left: .125em;
|
37 |
+
width: 0;
|
38 |
+
}
|
39 |
+
|
40 |
+
70% {
|
41 |
+
top: .625em;
|
42 |
+
left: -.25em;
|
43 |
+
width: 1.625em;
|
44 |
+
}
|
45 |
+
|
46 |
+
84% {
|
47 |
+
top: 1.0625em;
|
48 |
+
left: .75em;
|
49 |
+
width: .5em;
|
50 |
+
}
|
51 |
+
|
52 |
+
100% {
|
53 |
+
top: 1.125em;
|
54 |
+
left: .1875em;
|
55 |
+
width: .75em;
|
56 |
+
}
|
57 |
+
}
|
58 |
+
|
59 |
+
@keyframes swal2-toast-animate-success-line-long {
|
60 |
+
0% {
|
61 |
+
top: 1.625em;
|
62 |
+
right: 1.375em;
|
63 |
+
width: 0;
|
64 |
+
}
|
65 |
+
|
66 |
+
65% {
|
67 |
+
top: 1.25em;
|
68 |
+
right: .9375em;
|
69 |
+
width: 0;
|
70 |
+
}
|
71 |
+
|
72 |
+
84% {
|
73 |
+
top: .9375em;
|
74 |
+
right: 0;
|
75 |
+
width: 1.125em;
|
76 |
+
}
|
77 |
+
|
78 |
+
100% {
|
79 |
+
top: .9375em;
|
80 |
+
right: .1875em;
|
81 |
+
width: 1.375em;
|
82 |
+
}
|
83 |
+
}
|
assets/sweetalert2/src/scss/_toasts-body.scss
ADDED
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@mixin sweetalert2-toasts-body() {
|
2 |
+
&.swal2-toast-shown {
|
3 |
+
.swal2-container {
|
4 |
+
background-color: transparent;
|
5 |
+
|
6 |
+
&.swal2-top {
|
7 |
+
top: 0;
|
8 |
+
right: auto;
|
9 |
+
bottom: auto;
|
10 |
+
left: 50%;
|
11 |
+
transform: translateX(-50%);
|
12 |
+
}
|
13 |
+
|
14 |
+
&.swal2-top-end,
|
15 |
+
&.swal2-top-right {
|
16 |
+
top: 0;
|
17 |
+
right: 0;
|
18 |
+
bottom: auto;
|
19 |
+
left: auto;
|
20 |
+
}
|
21 |
+
|
22 |
+
&.swal2-top-start,
|
23 |
+
&.swal2-top-left {
|
24 |
+
top: 0;
|
25 |
+
right: auto;
|
26 |
+
bottom: auto;
|
27 |
+
left: 0;
|
28 |
+
}
|
29 |
+
|
30 |
+
&.swal2-center-start,
|
31 |
+
&.swal2-center-left {
|
32 |
+
top: 50%;
|
33 |
+
right: auto;
|
34 |
+
bottom: auto;
|
35 |
+
left: 0;
|
36 |
+
transform: translateY(-50%);
|
37 |
+
}
|
38 |
+
|
39 |
+
&.swal2-center {
|
40 |
+
top: 50%;
|
41 |
+
right: auto;
|
42 |
+
bottom: auto;
|
43 |
+
left: 50%;
|
44 |
+
transform: translate(-50%, -50%);
|
45 |
+
}
|
46 |
+
|
47 |
+
&.swal2-center-end,
|
48 |
+
&.swal2-center-right {
|
49 |
+
top: 50%;
|
50 |
+
right: 0;
|
51 |
+
bottom: auto;
|
52 |
+
left: auto;
|
53 |
+
transform: translateY(-50%);
|
54 |
+
}
|
55 |
+
|
56 |
+
&.swal2-bottom-start,
|
57 |
+
&.swal2-bottom-left {
|
58 |
+
top: auto;
|
59 |
+
right: auto;
|
60 |
+
bottom: 0;
|
61 |
+
left: 0;
|
62 |
+
}
|
63 |
+
|
64 |
+
&.swal2-bottom {
|
65 |
+
top: auto;
|
66 |
+
right: auto;
|
67 |
+
bottom: 0;
|
68 |
+
left: 50%;
|
69 |
+
transform: translateX(-50%);
|
70 |
+
}
|
71 |
+
|
72 |
+
&.swal2-bottom-end,
|
73 |
+
&.swal2-bottom-right {
|
74 |
+
top: auto;
|
75 |
+
right: 0;
|
76 |
+
bottom: 0;
|
77 |
+
left: auto;
|
78 |
+
}
|
79 |
+
}
|
80 |
+
}
|
81 |
+
|
82 |
+
&.swal2-toast-column {
|
83 |
+
.swal2-toast {
|
84 |
+
flex-direction: column;
|
85 |
+
align-items: stretch;
|
86 |
+
|
87 |
+
.swal2-actions {
|
88 |
+
flex: 1;
|
89 |
+
align-self: stretch;
|
90 |
+
height: 2.2em;
|
91 |
+
margin-top: .3125em;
|
92 |
+
}
|
93 |
+
|
94 |
+
.swal2-loading {
|
95 |
+
justify-content: center;
|
96 |
+
}
|
97 |
+
|
98 |
+
.swal2-input {
|
99 |
+
height: 2em;
|
100 |
+
margin: .3125em auto;
|
101 |
+
font-size: $swal2-toast-input-font-size;
|
102 |
+
}
|
103 |
+
|
104 |
+
.swal2-validation-message {
|
105 |
+
font-size: $swal2-toast-validation-font-size;
|
106 |
+
}
|
107 |
+
}
|
108 |
+
}
|
109 |
+
}
|
assets/sweetalert2/src/scss/_toasts.scss
ADDED
@@ -0,0 +1,175 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.swal2-popup {
|
2 |
+
&.swal2-toast {
|
3 |
+
flex-direction: row;
|
4 |
+
align-items: center;
|
5 |
+
width: $swal2-toast-width;
|
6 |
+
padding: $swal2-toast-padding;
|
7 |
+
overflow-y: hidden;
|
8 |
+
background: $swal2-toast-background;
|
9 |
+
box-shadow: $swal2-toast-box-shadow;
|
10 |
+
|
11 |
+
.swal2-header {
|
12 |
+
flex-direction: row;
|
13 |
+
padding: $swal2-toast-header-padding;
|
14 |
+
}
|
15 |
+
|
16 |
+
.swal2-title {
|
17 |
+
flex-grow: 1;
|
18 |
+
justify-content: flex-start;
|
19 |
+
margin: $swal2-toast-title-margin;
|
20 |
+
font-size: $swal2-toast-title-font-size;
|
21 |
+
}
|
22 |
+
|
23 |
+
.swal2-footer {
|
24 |
+
margin: $swal2-toast-footer-margin;
|
25 |
+
padding: $swal2-toast-footer-margin;
|
26 |
+
font-size: $swal2-toast-footer-font-size;
|
27 |
+
}
|
28 |
+
|
29 |
+
.swal2-close {
|
30 |
+
position: static;
|
31 |
+
width: $swal2-toast-close-button-width;
|
32 |
+
height: $swal2-toast-close-button-height;
|
33 |
+
line-height: $swal2-toast-close-button-line-height;
|
34 |
+
}
|
35 |
+
|
36 |
+
.swal2-content {
|
37 |
+
justify-content: flex-start;
|
38 |
+
padding: $swal2-toast-content-padding;
|
39 |
+
font-size: $swal2-toast-content-font-size;
|
40 |
+
}
|
41 |
+
|
42 |
+
.swal2-icon {
|
43 |
+
width: 2em;
|
44 |
+
min-width: 2em;
|
45 |
+
height: 2em;
|
46 |
+
margin: 0;
|
47 |
+
|
48 |
+
.swal2-icon-content {
|
49 |
+
display: flex;
|
50 |
+
align-items: center;
|
51 |
+
font-size: 1.8em;
|
52 |
+
font-weight: bold;
|
53 |
+
|
54 |
+
@include ie {
|
55 |
+
font-size: .25em;
|
56 |
+
}
|
57 |
+
}
|
58 |
+
|
59 |
+
&.swal2-success {
|
60 |
+
.swal2-success-ring {
|
61 |
+
width: 2em;
|
62 |
+
height: 2em;
|
63 |
+
}
|
64 |
+
}
|
65 |
+
|
66 |
+
&.swal2-error {
|
67 |
+
[class^='swal2-x-mark-line'] {
|
68 |
+
top: .875em;
|
69 |
+
width: 1.375em;
|
70 |
+
|
71 |
+
&[class$='left'] {
|
72 |
+
left: .3125em;
|
73 |
+
}
|
74 |
+
|
75 |
+
&[class$='right'] {
|
76 |
+
right: .3125em;
|
77 |
+
}
|
78 |
+
}
|
79 |
+
}
|
80 |
+
}
|
81 |
+
|
82 |
+
.swal2-actions {
|
83 |
+
flex-basis: auto !important;
|
84 |
+
width: auto;
|
85 |
+
height: auto;
|
86 |
+
margin: 0 .3125em;
|
87 |
+
padding: 0;
|
88 |
+
}
|
89 |
+
|
90 |
+
.swal2-styled {
|
91 |
+
margin: 0 .3125em;
|
92 |
+
padding: .3125em .625em;
|
93 |
+
font-size: $swal2-toast-buttons-font-size;
|
94 |
+
|
95 |
+
&:focus {
|
96 |
+
box-shadow: $swal2-toast-button-focus-box-shadow;
|
97 |
+
}
|
98 |
+
}
|
99 |
+
|
100 |
+
.swal2-success {
|
101 |
+
border-color: $swal2-success;
|
102 |
+
|
103 |
+
[class^='swal2-success-circular-line'] { // Emulate moving circular line
|
104 |
+
position: absolute;
|
105 |
+
width: 1.6em;
|
106 |
+
height: 3em;
|
107 |
+
transform: rotate(45deg);
|
108 |
+
border-radius: 50%;
|
109 |
+
|
110 |
+
&[class$='left'] {
|
111 |
+
top: -.8em;
|
112 |
+
left: -.5em;
|
113 |
+
transform: rotate(-45deg);
|
114 |
+
transform-origin: 2em 2em;
|
115 |
+
border-radius: 4em 0 0 4em;
|
116 |
+
}
|
117 |
+
|
118 |
+
&[class$='right'] {
|
119 |
+
top: -.25em;
|
120 |
+
left: .9375em;
|
121 |
+
transform-origin: 0 1.5em;
|
122 |
+
border-radius: 0 4em 4em 0;
|
123 |
+
}
|
124 |
+
}
|
125 |
+
|
126 |
+
.swal2-success-ring {
|
127 |
+
width: 2em;
|
128 |
+
height: 2em;
|
129 |
+
}
|
130 |
+
|
131 |
+
.swal2-success-fix {
|
132 |
+
top: 0;
|
133 |
+
left: .4375em;
|
134 |
+
width: .4375em;
|
135 |
+
height: 2.6875em;
|
136 |
+
}
|
137 |
+
|
138 |
+
[class^='swal2-success-line'] {
|
139 |
+
height: .3125em;
|
140 |
+
|
141 |
+
&[class$='tip'] {
|
142 |
+
top: 1.125em;
|
143 |
+
left: .1875em;
|
144 |
+
width: .75em;
|
145 |
+
}
|
146 |
+
|
147 |
+
&[class$='long'] {
|
148 |
+
top: .9375em;
|
149 |
+
right: .1875em;
|
150 |
+
width: 1.375em;
|
151 |
+
}
|
152 |
+
}
|
153 |
+
|
154 |
+
&.swal2-icon-show {
|
155 |
+
@if $swal2-icon-animations {
|
156 |
+
.swal2-success-line-tip {
|
157 |
+
animation: swal2-toast-animate-success-line-tip .75s;
|
158 |
+
}
|
159 |
+
|
160 |
+
.swal2-success-line-long {
|
161 |
+
animation: swal2-toast-animate-success-line-long .75s;
|
162 |
+
}
|
163 |
+
}
|
164 |
+
}
|
165 |
+
}
|
166 |
+
|
167 |
+
&.swal2-show {
|
168 |
+
animation: $swal2-toast-show-animation;
|
169 |
+
}
|
170 |
+
|
171 |
+
&.swal2-hide {
|
172 |
+
animation: $swal2-toast-hide-animation;
|
173 |
+
}
|
174 |
+
}
|
175 |
+
}
|
assets/sweetalert2/src/staticMethods.js
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
export * from './staticMethods/argsToParams.js'
|
2 |
+
export * from './staticMethods/dom.js'
|
3 |
+
export * from './staticMethods/fire.js'
|
4 |
+
export * from './staticMethods/mixin.js'
|
5 |
+
export * from './staticMethods/queue.js'
|
6 |
+
export * from './staticMethods/showLoading.js'
|
7 |
+
export * from './staticMethods/timer.js'
|
8 |
+
export {
|
9 |
+
isValidParameter,
|
10 |
+
isUpdatableParameter,
|
11 |
+
isDeprecatedParameter
|
12 |
+
} from './utils/params.js'
|
assets/sweetalert2/src/staticMethods/argsToParams.js
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { error } from '../utils/utils.js'
|
2 |
+
|
3 |
+
const isJqueryElement = (elem) => typeof elem === 'object' && elem.jquery
|
4 |
+
const isElement = (elem) => elem instanceof Element || isJqueryElement(elem)
|
5 |
+
|
6 |
+
export const argsToParams = (args) => {
|
7 |
+
const params = {}
|
8 |
+
if (typeof args[0] === 'object' && !isElement(args[0])) {
|
9 |
+
Object.assign(params, args[0])
|
10 |
+
} else {
|
11 |
+
['title', 'html', 'icon'].forEach((name, index) => {
|
12 |
+
const arg = args[index]
|
13 |
+
if (typeof arg === 'string' || isElement(arg)) {
|
14 |
+
params[name] = arg
|
15 |
+
} else if (arg !== undefined) {
|
16 |
+
error(`Unexpected type of ${name}! Expected "string" or "Element", got ${typeof arg}`)
|
17 |
+
}
|
18 |
+
})
|
19 |
+
}
|
20 |
+
return params
|
21 |
+
}
|
assets/sweetalert2/src/staticMethods/dom.js
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import * as dom from '../utils/dom/index.js'
|
2 |
+
import * as domUtils from '../utils/dom/domUtils.js'
|
3 |
+
|
4 |
+
export {
|
5 |
+
getContainer,
|
6 |
+
getPopup,
|
7 |
+
getTitle,
|
8 |
+
getContent,
|
9 |
+
getHtmlContainer,
|
10 |
+
getImage,
|
11 |
+
getIcon,
|
12 |
+
getIcons,
|
13 |
+
getInputLabel,
|
14 |
+
getCloseButton,
|
15 |
+
getActions,
|
16 |
+
getConfirmButton,
|
17 |
+
getDenyButton,
|
18 |
+
getCancelButton,
|
19 |
+
getHeader,
|
20 |
+
getFooter,
|
21 |
+
getTimerProgressBar,
|
22 |
+
getFocusableElements,
|
23 |
+
getValidationMessage,
|
24 |
+
isLoading
|
25 |
+
} from '../utils/dom/index.js'
|
26 |
+
|
27 |
+
/*
|
28 |
+
* Global function to determine if SweetAlert2 popup is shown
|
29 |
+
*/
|
30 |
+
export const isVisible = () => {
|
31 |
+
return domUtils.isVisible(dom.getPopup())
|
32 |
+
}
|
33 |
+
|
34 |
+
/*
|
35 |
+
* Global function to click 'Confirm' button
|
36 |
+
*/
|
37 |
+
export const clickConfirm = () => dom.getConfirmButton() && dom.getConfirmButton().click()
|
38 |
+
|
39 |
+
/*
|
40 |
+
* Global function to click 'Deny' button
|
41 |
+
*/
|
42 |
+
export const clickDeny = () => dom.getDenyButton() && dom.getDenyButton().click()
|
43 |
+
|
44 |
+
/*
|
45 |
+
* Global function to click 'Cancel' button
|
46 |
+
*/
|
47 |
+
export const clickCancel = () => dom.getCancelButton() && dom.getCancelButton().click()
|
assets/sweetalert2/src/staticMethods/fire.js
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
export function fire (...args) {
|
2 |
+
const Swal = this
|
3 |
+
return new Swal(...args)
|
4 |
+
}
|
assets/sweetalert2/src/staticMethods/mixin.js
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Returns an extended version of `Swal` containing `params` as defaults.
|
3 |
+
* Useful for reusing Swal configuration.
|
4 |
+
*
|
5 |
+
* For example:
|
6 |
+
*
|
7 |
+
* Before:
|
8 |
+
* const textPromptOptions = { input: 'text', showCancelButton: true }
|
9 |
+
* const {value: firstName} = await Swal.fire({ ...textPromptOptions, title: 'What is your first name?' })
|
10 |
+
* const {value: lastName} = await Swal.fire({ ...textPromptOptions, title: 'What is your last name?' })
|
11 |
+
*
|
12 |
+
* After:
|
13 |
+
* const TextPrompt = Swal.mixin({ input: 'text', showCancelButton: true })
|
14 |
+
* const {value: firstName} = await TextPrompt('What is your first name?')
|
15 |
+
* const {value: lastName} = await TextPrompt('What is your last name?')
|
16 |
+
*
|
17 |
+
* @param mixinParams
|
18 |
+
*/
|
19 |
+
export function mixin (mixinParams) {
|
20 |
+
class MixinSwal extends this {
|
21 |
+
_main (params) {
|
22 |
+
return super._main(Object.assign({}, mixinParams, params))
|
23 |
+
}
|
24 |
+
}
|
25 |
+
|
26 |
+
return MixinSwal
|
27 |
+
}
|
assets/sweetalert2/src/staticMethods/queue.js
ADDED
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import * as dom from '../utils/dom/index.js'
|
2 |
+
|
3 |
+
// private global state for the queue feature
|
4 |
+
let currentSteps = []
|
5 |
+
|
6 |
+
/*
|
7 |
+
* Global function for chaining sweetAlert popups
|
8 |
+
*/
|
9 |
+
export const queue = function (steps) {
|
10 |
+
const Swal = this
|
11 |
+
currentSteps = steps
|
12 |
+
|
13 |
+
const resetAndResolve = (resolve, value) => {
|
14 |
+
currentSteps = []
|
15 |
+
resolve(value)
|
16 |
+
}
|
17 |
+
|
18 |
+
const queueResult = []
|
19 |
+
return new Promise((resolve) => {
|
20 |
+
(function step (i, callback) {
|
21 |
+
if (i < currentSteps.length) {
|
22 |
+
document.body.setAttribute('data-swal2-queue-step', i)
|
23 |
+
Swal.fire(currentSteps[i]).then((result) => {
|
24 |
+
if (typeof result.value !== 'undefined') {
|
25 |
+
queueResult.push(result.value)
|
26 |
+
step(i + 1, callback)
|
27 |
+
} else {
|
28 |
+
resetAndResolve(resolve, { dismiss: result.dismiss })
|
29 |
+
}
|
30 |
+
})
|
31 |
+
} else {
|
32 |
+
resetAndResolve(resolve, { value: queueResult })
|
33 |
+
}
|
34 |
+
})(0)
|
35 |
+
})
|
36 |
+
}
|
37 |
+
|
38 |
+
/*
|
39 |
+
* Global function for getting the index of current popup in queue
|
40 |
+
*/
|
41 |
+
export const getQueueStep = () => dom.getContainer() && dom.getContainer().getAttribute('data-queue-step')
|
42 |
+
|
43 |
+
/*
|
44 |
+
* Global function for inserting a popup to the queue
|
45 |
+
*/
|
46 |
+
export const insertQueueStep = (step, index) => {
|
47 |
+
if (index && index < currentSteps.length) {
|
48 |
+
return currentSteps.splice(index, 0, step)
|
49 |
+
}
|
50 |
+
return currentSteps.push(step)
|
51 |
+
}
|
52 |
+
|
53 |
+
/*
|
54 |
+
* Global function for deleting a popup from the queue
|
55 |
+
*/
|
56 |
+
export const deleteQueueStep = (index) => {
|
57 |
+
if (typeof currentSteps[index] !== 'undefined') {
|
58 |
+
currentSteps.splice(index, 1)
|
59 |
+
}
|
60 |
+
}
|
assets/sweetalert2/src/staticMethods/showLoading.js
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import * as dom from '../utils/dom/index.js'
|
2 |
+
import Swal from '../sweetalert2.js'
|
3 |
+
import { swalClasses } from '../utils/classes.js'
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Show spinner instead of Confirm button
|
7 |
+
*/
|
8 |
+
const showLoading = () => {
|
9 |
+
let popup = dom.getPopup()
|
10 |
+
if (!popup) {
|
11 |
+
Swal.fire()
|
12 |
+
}
|
13 |
+
popup = dom.getPopup()
|
14 |
+
const actions = dom.getActions()
|
15 |
+
const confirmButton = dom.getConfirmButton()
|
16 |
+
const loader = dom.getLoader()
|
17 |
+
|
18 |
+
dom.show(actions)
|
19 |
+
dom.hide(confirmButton)
|
20 |
+
dom.addClass([popup, actions], swalClasses.loading)
|
21 |
+
|
22 |
+
dom.show(loader)
|
23 |
+
|
24 |
+
popup.setAttribute('data-loading', true)
|
25 |
+
popup.setAttribute('aria-busy', true)
|
26 |
+
popup.focus()
|
27 |
+
}
|
28 |
+
|
29 |
+
export {
|
30 |
+
showLoading,
|
31 |
+
showLoading as enableLoading
|
32 |
+
}
|
assets/sweetalert2/src/staticMethods/timer.js
ADDED
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { animateTimerProgressBar, stopTimerProgressBar } from '../utils/dom/domUtils.js'
|
2 |
+
import globalState from '../globalState.js'
|
3 |
+
|
4 |
+
/**
|
5 |
+
* If `timer` parameter is set, returns number of milliseconds of timer remained.
|
6 |
+
* Otherwise, returns undefined.
|
7 |
+
*/
|
8 |
+
export const getTimerLeft = () => {
|
9 |
+
return globalState.timeout && globalState.timeout.getTimerLeft()
|
10 |
+
}
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Stop timer. Returns number of milliseconds of timer remained.
|
14 |
+
* If `timer` parameter isn't set, returns undefined.
|
15 |
+
*/
|
16 |
+
export const stopTimer = () => {
|
17 |
+
if (globalState.timeout) {
|
18 |
+
stopTimerProgressBar()
|
19 |
+
return globalState.timeout.stop()
|
20 |
+
}
|
21 |
+
}
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Resume timer. Returns number of milliseconds of timer remained.
|
25 |
+
* If `timer` parameter isn't set, returns undefined.
|
26 |
+
*/
|
27 |
+
export const resumeTimer = () => {
|
28 |
+
if (globalState.timeout) {
|
29 |
+
const remaining = globalState.timeout.start()
|
30 |
+
animateTimerProgressBar(remaining)
|
31 |
+
return remaining
|
32 |
+
}
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Resume timer. Returns number of milliseconds of timer remained.
|
37 |
+
* If `timer` parameter isn't set, returns undefined.
|
38 |
+
*/
|
39 |
+
export const toggleTimer = () => {
|
40 |
+
const timer = globalState.timeout
|
41 |
+
return timer && (timer.running ? stopTimer() : resumeTimer())
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Increase timer. Returns number of milliseconds of an updated timer.
|
46 |
+
* If `timer` parameter isn't set, returns undefined.
|
47 |
+
*/
|
48 |
+
export const increaseTimer = (n) => {
|
49 |
+
if (globalState.timeout) {
|
50 |
+
const remaining = globalState.timeout.increase(n)
|
51 |
+
animateTimerProgressBar(remaining, true)
|
52 |
+
return remaining
|
53 |
+
}
|
54 |
+
}
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Check if timer is running. Returns true if timer is running
|
58 |
+
* or false if timer is paused or stopped.
|
59 |
+
* If `timer` parameter isn't set, returns undefined
|
60 |
+
*/
|
61 |
+
export const isTimerRunning = () => {
|
62 |
+
return globalState.timeout && globalState.timeout.isRunning()
|
63 |
+
}
|
assets/sweetalert2/src/sweetalert2.js
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import SweetAlert from './SweetAlert.js'
|
2 |
+
|
3 |
+
const Swal = SweetAlert
|
4 |
+
Swal.default = Swal
|
5 |
+
|
6 |
+
export default Swal
|
assets/sweetalert2/src/sweetalert2.scss
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// SweetAlert2
|
2 |
+
// github.com/sweetalert2/sweetalert2
|
3 |
+
|
4 |
+
@import 'scss/theming';
|
5 |
+
@import 'scss/polyfills';
|
6 |
+
@import 'scss/animations';
|
7 |
+
|
8 |
+
body {
|
9 |
+
@include sweetalert2-body();
|
10 |
+
@include sweetalert2-toasts-body();
|
11 |
+
}
|
assets/sweetalert2/src/utils/DismissReason.js
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
export const DismissReason = Object.freeze({
|
2 |
+
cancel: 'cancel',
|
3 |
+
backdrop: 'backdrop',
|
4 |
+
close: 'close',
|
5 |
+
esc: 'esc',
|
6 |
+
timer: 'timer'
|
7 |
+
})
|
assets/sweetalert2/src/utils/Timer.js
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
export default class Timer {
|
2 |
+
constructor (callback, delay) {
|
3 |
+
this.callback = callback
|
4 |
+
this.remaining = delay
|
5 |
+
this.running = false
|
6 |
+
|
7 |
+
this.start()
|
8 |
+
}
|
9 |
+
|
10 |
+
start () {
|
11 |
+
if (!this.running) {
|
12 |
+
this.running = true
|
13 |
+
this.started = new Date()
|
14 |
+
this.id = setTimeout(this.callback, this.remaining)
|
15 |
+
}
|
16 |
+
return this.remaining
|
17 |
+
}
|
18 |
+
|
19 |
+
stop () {
|
20 |
+
if (this.running) {
|
21 |
+
this.running = false
|
22 |
+
clearTimeout(this.id)
|
23 |
+
this.remaining -= new Date() - this.started
|
24 |
+
}
|
25 |
+
return this.remaining
|
26 |
+
}
|
27 |
+
|
28 |
+
increase (n) {
|
29 |
+
const running = this.running
|
30 |
+
if (running) {
|
31 |
+
this.stop()
|
32 |
+
}
|
33 |
+
this.remaining += n
|
34 |
+
if (running) {
|
35 |
+
this.start()
|
36 |
+
}
|
37 |
+
return this.remaining
|
38 |
+
}
|
39 |
+
|
40 |
+
getTimerLeft () {
|
41 |
+
if (this.running) {
|
42 |
+
this.stop()
|
43 |
+
this.start()
|
44 |
+
}
|
45 |
+
return this.remaining
|
46 |
+
}
|
47 |
+
|
48 |
+
isRunning () {
|
49 |
+
return this.running
|
50 |
+
}
|
51 |
+
}
|
assets/sweetalert2/src/utils/aria.js
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { getContainer } from './dom/getters.js'
|
2 |
+
import { contains } from './dom/domUtils.js'
|
3 |
+
import { toArray } from './utils.js'
|
4 |
+
|
5 |
+
// From https://developer.paciellogroup.com/blog/2018/06/the-current-state-of-modal-dialog-accessibility/
|
6 |
+
// Adding aria-hidden="true" to elements outside of the active modal dialog ensures that
|
7 |
+
// elements not within the active modal dialog will not be surfaced if a user opens a screen
|
8 |
+
// reader’s list of elements (headings, form controls, landmarks, etc.) in the document.
|
9 |
+
|
10 |
+
export const setAriaHidden = () => {
|
11 |
+
const bodyChildren = toArray(document.body.children)
|
12 |
+
bodyChildren.forEach(el => {
|
13 |
+
if (el === getContainer() || contains(el, getContainer())) {
|
14 |
+
return
|
15 |
+
}
|
16 |
+
|
17 |
+
if (el.hasAttribute('aria-hidden')) {
|
18 |
+
el.setAttribute('data-previous-aria-hidden', el.getAttribute('aria-hidden'))
|
19 |
+
}
|
20 |
+
el.setAttribute('aria-hidden', 'true')
|
21 |
+
})
|
22 |
+
}
|
23 |
+
|
24 |
+
export const unsetAriaHidden = () => {
|
25 |
+
const bodyChildren = toArray(document.body.children)
|
26 |
+
bodyChildren.forEach(el => {
|
27 |
+
if (el.hasAttribute('data-previous-aria-hidden')) {
|
28 |
+
el.setAttribute('aria-hidden', el.getAttribute('data-previous-aria-hidden'))
|
29 |
+
el.removeAttribute('data-previous-aria-hidden')
|
30 |
+
} else {
|
31 |
+
el.removeAttribute('aria-hidden')
|
32 |
+
}
|
33 |
+
})
|
34 |
+
}
|
assets/sweetalert2/src/utils/classes.js
ADDED
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
export const swalPrefix = 'swal2-'
|
2 |
+
|
3 |
+
export const prefix = (items) => {
|
4 |
+
const result = {}
|
5 |
+
for (const i in items) {
|
6 |
+
result[items[i]] = swalPrefix + items[i]
|
7 |
+
}
|
8 |
+
return result
|
9 |
+
}
|
10 |
+
|
11 |
+
export const swalClasses = prefix([
|
12 |
+
'container',
|
13 |
+
'shown',
|
14 |
+
'height-auto',
|
15 |
+
'iosfix',
|
16 |
+
'popup',
|
17 |
+
'modal',
|
18 |
+
'no-backdrop',
|
19 |
+
'no-transition',
|
20 |
+
'toast',
|
21 |
+
'toast-shown',
|
22 |
+
'toast-column',
|
23 |
+
'show',
|
24 |
+
'hide',
|
25 |
+
'close',
|
26 |
+
'title',
|
27 |
+
'header',
|
28 |
+
'content',
|
29 |
+
'html-container',
|
30 |
+
'actions',
|
31 |
+
'confirm',
|
32 |
+
'deny',
|
33 |
+
'cancel',
|
34 |
+
'footer',
|
35 |
+
'icon',
|
36 |
+
'icon-content',
|
37 |
+
'image',
|
38 |
+
'input',
|
39 |
+
'file',
|
40 |
+
'range',
|
41 |
+
'select',
|
42 |
+
'radio',
|
43 |
+
'checkbox',
|
44 |
+
'label',
|
45 |
+
'textarea',
|
46 |
+
'inputerror',
|
47 |
+
'input-label',
|
48 |
+
'validation-message',
|
49 |
+
'progress-steps',
|
50 |
+
'active-progress-step',
|
51 |
+
'progress-step',
|
52 |
+
'progress-step-line',
|
53 |
+
'loader',
|
54 |
+
'loading',
|
55 |
+
'styled',
|
56 |
+
'top',
|
57 |
+
'top-start',
|
58 |
+
'top-end',
|
59 |
+
'top-left',
|
60 |
+
'top-right',
|
61 |
+
'center',
|
62 |
+
'center-start',
|
63 |
+
'center-end',
|
64 |
+
'center-left',
|
65 |
+
'center-right',
|
66 |
+
'bottom',
|
67 |
+
'bottom-start',
|
68 |
+
'bottom-end',
|
69 |
+
'bottom-left',
|
70 |
+
'bottom-right',
|
71 |
+
'grow-row',
|
72 |
+
'grow-column',
|
73 |
+
'grow-fullscreen',
|
74 |
+
'rtl',
|
75 |
+
'timer-progress-bar',
|
76 |
+
'timer-progress-bar-container',
|
77 |
+
'scrollbar-measure',
|
78 |
+
'icon-success',
|
79 |
+
'icon-warning',
|
80 |
+
'icon-info',
|
81 |
+
'icon-question',
|
82 |
+
'icon-error',
|
83 |
+
])
|
84 |
+
|
85 |
+
export const iconTypes = prefix([
|
86 |
+
'success',
|
87 |
+
'warning',
|
88 |
+
'info',
|
89 |
+
'question',
|
90 |
+
'error'
|
91 |
+
])
|
assets/sweetalert2/src/utils/defaultInputValidators.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
export default {
|
2 |
+
email: (string, validationMessage) => {
|
3 |
+
return /^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(string)
|
4 |
+
? Promise.resolve()
|
5 |
+
: Promise.resolve(validationMessage || 'Invalid email address')
|
6 |
+
},
|
7 |
+
url: (string, validationMessage) => {
|
8 |
+
// taken from https://stackoverflow.com/a/3809435 with a small change from #1306 and #2013
|
9 |
+
return /^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(string)
|
10 |
+
? Promise.resolve()
|
11 |
+
: Promise.resolve(validationMessage || 'Invalid URL')
|
12 |
+
}
|
13 |
+
}
|
assets/sweetalert2/src/utils/dom/animationEndEvent.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { isNodeEnv } from '../isNodeEnv.js'
|
2 |
+
|
3 |
+
export const animationEndEvent = (() => {
|
4 |
+
// Prevent run in Node env
|
5 |
+
/* istanbul ignore if */
|
6 |
+
if (isNodeEnv()) {
|
7 |
+
return false
|
8 |
+
}
|
9 |
+
|
10 |
+
const testEl = document.createElement('div')
|
11 |
+
const transEndEventNames = {
|
12 |
+
WebkitAnimation: 'webkitAnimationEnd',
|
13 |
+
OAnimation: 'oAnimationEnd oanimationend',
|
14 |
+
animation: 'animationend'
|
15 |
+
}
|
16 |
+
for (const i in transEndEventNames) {
|
17 |
+
if (Object.prototype.hasOwnProperty.call(transEndEventNames, i) && typeof testEl.style[i] !== 'undefined') {
|
18 |
+
return transEndEventNames[i]
|
19 |
+
}
|
20 |
+
}
|
21 |
+
|
22 |
+
return false
|
23 |
+
})()
|
assets/sweetalert2/src/utils/dom/domUtils.js
ADDED
@@ -0,0 +1,200 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { getTimerProgressBar } from './getters.js'
|
2 |
+
import { swalClasses, iconTypes } from '../classes.js'
|
3 |
+
import { toArray, objectValues, warn } from '../utils.js'
|
4 |
+
|
5 |
+
// Remember state in cases where opening and handling a modal will fiddle with it.
|
6 |
+
export const states = {
|
7 |
+
previousBodyPadding: null
|
8 |
+
}
|
9 |
+
|
10 |
+
export const setInnerHtml = (elem, html) => { // #1926
|
11 |
+
elem.textContent = ''
|
12 |
+
if (html) {
|
13 |
+
const parser = new DOMParser()
|
14 |
+
const parsed = parser.parseFromString(html, `text/html`)
|
15 |
+
toArray(parsed.querySelector('head').childNodes).forEach((child) => {
|
16 |
+
elem.appendChild(child)
|
17 |
+
})
|
18 |
+
toArray(parsed.querySelector('body').childNodes).forEach((child) => {
|
19 |
+
elem.appendChild(child)
|
20 |
+
})
|
21 |
+
}
|
22 |
+
}
|
23 |
+
|
24 |
+
export const hasClass = (elem, className) => {
|
25 |
+
if (!className) {
|
26 |
+
return false
|
27 |
+
}
|
28 |
+
const classList = className.split(/\s+/)
|
29 |
+
for (let i = 0; i < classList.length; i++) {
|
30 |
+
if (!elem.classList.contains(classList[i])) {
|
31 |
+
return false
|
32 |
+
}
|
33 |
+
}
|
34 |
+
return true
|
35 |
+
}
|
36 |
+
|
37 |
+
const removeCustomClasses = (elem, params) => {
|
38 |
+
toArray(elem.classList).forEach(className => {
|
39 |
+
if (
|
40 |
+
!objectValues(swalClasses).includes(className) &&
|
41 |
+
!objectValues(iconTypes).includes(className) &&
|
42 |
+
!objectValues(params.showClass).includes(className)
|
43 |
+
) {
|
44 |
+
elem.classList.remove(className)
|
45 |
+
}
|
46 |
+
})
|
47 |
+
}
|
48 |
+
|
49 |
+
export const applyCustomClass = (elem, params, className) => {
|
50 |
+
removeCustomClasses(elem, params)
|
51 |
+
|
52 |
+
if (params.customClass && params.customClass[className]) {
|
53 |
+
if (typeof params.customClass[className] !== 'string' && !params.customClass[className].forEach) {
|
54 |
+
return warn(`Invalid type of customClass.${className}! Expected string or iterable object, got "${typeof params.customClass[className]}"`)
|
55 |
+
}
|
56 |
+
|
57 |
+
addClass(elem, params.customClass[className])
|
58 |
+
}
|
59 |
+
}
|
60 |
+
|
61 |
+
export function getInput (content, inputType) {
|
62 |
+
if (!inputType) {
|
63 |
+
return null
|
64 |
+
}
|
65 |
+
switch (inputType) {
|
66 |
+
case 'select':
|
67 |
+
case 'textarea':
|
68 |
+
case 'file':
|
69 |
+
return getChildByClass(content, swalClasses[inputType])
|
70 |
+
case 'checkbox':
|
71 |
+
return content.querySelector(`.${swalClasses.checkbox} input`)
|
72 |
+
case 'radio':
|
73 |
+
return content.querySelector(`.${swalClasses.radio} input:checked`) ||
|
74 |
+
content.querySelector(`.${swalClasses.radio} input:first-child`)
|
75 |
+
case 'range':
|
76 |
+
return content.querySelector(`.${swalClasses.range} input`)
|
77 |
+
default:
|
78 |
+
return getChildByClass(content, swalClasses.input)
|
79 |
+
}
|
80 |
+
}
|
81 |
+
|
82 |
+
export const focusInput = (input) => {
|
83 |
+
input.focus()
|
84 |
+
|
85 |
+
// place cursor at end of text in text input
|
86 |
+
if (input.type !== 'file') {
|
87 |
+
// http://stackoverflow.com/a/2345915
|
88 |
+
const val = input.value
|
89 |
+
input.value = ''
|
90 |
+
input.value = val
|
91 |
+
}
|
92 |
+
}
|
93 |
+
|
94 |
+
export const toggleClass = (target, classList, condition) => {
|
95 |
+
if (!target || !classList) {
|
96 |
+
return
|
97 |
+
}
|
98 |
+
if (typeof classList === 'string') {
|
99 |
+
classList = classList.split(/\s+/).filter(Boolean)
|
100 |
+
}
|
101 |
+
classList.forEach((className) => {
|
102 |
+
if (target.forEach) {
|
103 |
+
target.forEach((elem) => {
|
104 |
+
condition ? elem.classList.add(className) : elem.classList.remove(className)
|
105 |
+
})
|
106 |
+
} else {
|
107 |
+
condition ? target.classList.add(className) : target.classList.remove(className)
|
108 |
+
}
|
109 |
+
})
|
110 |
+
}
|
111 |
+
|
112 |
+
export const addClass = (target, classList) => {
|
113 |
+
toggleClass(target, classList, true)
|
114 |
+
}
|
115 |
+
|
116 |
+
export const removeClass = (target, classList) => {
|
117 |
+
toggleClass(target, classList, false)
|
118 |
+
}
|
119 |
+
|
120 |
+
export const getChildByClass = (elem, className) => {
|
121 |
+
for (let i = 0; i < elem.childNodes.length; i++) {
|
122 |
+
if (hasClass(elem.childNodes[i], className)) {
|
123 |
+
return elem.childNodes[i]
|
124 |
+
}
|
125 |
+
}
|
126 |
+
}
|
127 |
+
|
128 |
+
export const applyNumericalStyle = (elem, property, value) => {
|
129 |
+
if (value || parseInt(value) === 0) {
|
130 |
+
elem.style[property] = (typeof value === 'number') ? `${value}px` : value
|
131 |
+
} else {
|
132 |
+
elem.style.removeProperty(property)
|
133 |
+
}
|
134 |
+
}
|
135 |
+
|
136 |
+
export const show = (elem, display = 'flex') => {
|
137 |
+
elem.style.display = display
|
138 |
+
}
|
139 |
+
|
140 |
+
export const hide = (elem) => {
|
141 |
+
elem.style.display = 'none'
|
142 |
+
}
|
143 |
+
|
144 |
+
export const setStyle = (parent, selector, property, value) => {
|
145 |
+
const el = parent.querySelector(selector)
|
146 |
+
if (el) {
|
147 |
+
el.style[property] = value
|
148 |
+
}
|
149 |
+
}
|
150 |
+
|
151 |
+
export const toggle = (elem, condition, display) => {
|
152 |
+
condition ? show(elem, display) : hide(elem)
|
153 |
+
}
|
154 |
+
|
155 |
+
// borrowed from jquery $(elem).is(':visible') implementation
|
156 |
+
export const isVisible = (elem) => !!(elem && (elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length))
|
157 |
+
|
158 |
+
/* istanbul ignore next */
|
159 |
+
export const isScrollable = (elem) => !!(elem.scrollHeight > elem.clientHeight)
|
160 |
+
|
161 |
+
// borrowed from https://stackoverflow.com/a/46352119
|
162 |
+
export const hasCssAnimation = (elem) => {
|
163 |
+
const style = window.getComputedStyle(elem)
|
164 |
+
|
165 |
+
const animDuration = parseFloat(style.getPropertyValue('animation-duration') || '0')
|
166 |
+
const transDuration = parseFloat(style.getPropertyValue('transition-duration') || '0')
|
167 |
+
|
168 |
+
return animDuration > 0 || transDuration > 0
|
169 |
+
}
|
170 |
+
|
171 |
+
export const contains = (haystack, needle) => {
|
172 |
+
if (typeof haystack.contains === 'function') {
|
173 |
+
return haystack.contains(needle)
|
174 |
+
}
|
175 |
+
}
|
176 |
+
|
177 |
+
export const animateTimerProgressBar = (timer, reset = false) => {
|
178 |
+
const timerProgressBar = getTimerProgressBar()
|
179 |
+
if (isVisible(timerProgressBar)) {
|
180 |
+
if (reset) {
|
181 |
+
timerProgressBar.style.transition = 'none'
|
182 |
+
timerProgressBar.style.width = '100%'
|
183 |
+
}
|
184 |
+
setTimeout(() => {
|
185 |
+
timerProgressBar.style.transition = `width ${timer / 1000}s linear`
|
186 |
+
timerProgressBar.style.width = '0%'
|
187 |
+
}, 10)
|
188 |
+
}
|
189 |
+
}
|
190 |
+
|
191 |
+
export const stopTimerProgressBar = () => {
|
192 |
+
const timerProgressBar = getTimerProgressBar()
|
193 |
+
const timerProgressBarWidth = parseInt(window.getComputedStyle(timerProgressBar).width)
|
194 |
+
timerProgressBar.style.removeProperty('transition')
|
195 |
+
timerProgressBar.style.width = '100%'
|
196 |
+
const timerProgressBarFullWidth = parseInt(window.getComputedStyle(timerProgressBar).width)
|
197 |
+
const timerProgressBarPercent = parseInt(timerProgressBarWidth / timerProgressBarFullWidth * 100)
|
198 |
+
timerProgressBar.style.removeProperty('transition')
|
199 |
+
timerProgressBar.style.width = `${timerProgressBarPercent}%`
|
200 |
+
}
|
assets/sweetalert2/src/utils/dom/getters.js
ADDED
@@ -0,0 +1,111 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { swalClasses } from '../classes.js'
|
2 |
+
import { uniqueArray, toArray } from '../utils.js'
|
3 |
+
import { isVisible } from './domUtils.js'
|
4 |
+
|
5 |
+
export const getContainer = () => document.body.querySelector(`.${swalClasses.container}`)
|
6 |
+
|
7 |
+
export const elementBySelector = (selectorString) => {
|
8 |
+
const container = getContainer()
|
9 |
+
return container ? container.querySelector(selectorString) : null
|
10 |
+
}
|
11 |
+
|
12 |
+
const elementByClass = (className) => {
|
13 |
+
return elementBySelector(`.${className}`)
|
14 |
+
}
|
15 |
+
|
16 |
+
export const getPopup = () => elementByClass(swalClasses.popup)
|
17 |
+
|
18 |
+
export const getIcons = () => {
|
19 |
+
const popup = getPopup()
|
20 |
+
return toArray(popup.querySelectorAll(`.${swalClasses.icon}`))
|
21 |
+
}
|
22 |
+
|
23 |
+
export const getIcon = () => {
|
24 |
+
const visibleIcon = getIcons().filter((icon) => isVisible(icon))
|
25 |
+
return visibleIcon.length ? visibleIcon[0] : null
|
26 |
+
}
|
27 |
+
|
28 |
+
export const getTitle = () => elementByClass(swalClasses.title)
|
29 |
+
|
30 |
+
export const getContent = () => elementByClass(swalClasses.content)
|
31 |
+
|
32 |
+
export const getHtmlContainer = () => elementByClass(swalClasses['html-container'])
|
33 |
+
|
34 |
+
export const getImage = () => elementByClass(swalClasses.image)
|
35 |
+
|
36 |
+
export const getProgressSteps = () => elementByClass(swalClasses['progress-steps'])
|
37 |
+
|
38 |
+
export const getValidationMessage = () => elementByClass(swalClasses['validation-message'])
|
39 |
+
|
40 |
+
export const getConfirmButton = () => elementBySelector(`.${swalClasses.actions} .${swalClasses.confirm}`)
|
41 |
+
|
42 |
+
export const getDenyButton = () => elementBySelector(`.${swalClasses.actions} .${swalClasses.deny}`)
|
43 |
+
|
44 |
+
export const getInputLabel = () => elementByClass(swalClasses['input-label'])
|
45 |
+
|
46 |
+
export const getLoader = () => elementBySelector(`.${swalClasses.loader}`)
|
47 |
+
|
48 |
+
export const getCancelButton = () => elementBySelector(`.${swalClasses.actions} .${swalClasses.cancel}`)
|
49 |
+
|
50 |
+
export const getActions = () => elementByClass(swalClasses.actions)
|
51 |
+
|
52 |
+
export const getHeader = () => elementByClass(swalClasses.header)
|
53 |
+
|
54 |
+
export const getFooter = () => elementByClass(swalClasses.footer)
|
55 |
+
|
56 |
+
export const getTimerProgressBar = () => elementByClass(swalClasses['timer-progress-bar'])
|
57 |
+
|
58 |
+
export const getCloseButton = () => elementByClass(swalClasses.close)
|
59 |
+
|
60 |
+
// https://github.com/jkup/focusable/blob/master/index.js
|
61 |
+
const focusable = `
|
62 |
+
a[href],
|
63 |
+
area[href],
|
64 |
+
input:not([disabled]),
|
65 |
+
select:not([disabled]),
|
66 |
+
textarea:not([disabled]),
|
67 |
+
button:not([disabled]),
|
68 |
+
iframe,
|
69 |
+
object,
|
70 |
+
embed,
|
71 |
+
[tabindex="0"],
|
72 |
+
[contenteditable],
|
73 |
+
audio[controls],
|
74 |
+
video[controls],
|
75 |
+
summary
|
76 |
+
`
|
77 |
+
|
78 |
+
export const getFocusableElements = () => {
|
79 |
+
const focusableElementsWithTabindex = toArray(
|
80 |
+
getPopup().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')
|
81 |
+
)
|
82 |
+
// sort according to tabindex
|
83 |
+
.sort((a, b) => {
|
84 |
+
a = parseInt(a.getAttribute('tabindex'))
|
85 |
+
b = parseInt(b.getAttribute('tabindex'))
|
86 |
+
if (a > b) {
|
87 |
+
return 1
|
88 |
+
} else if (a < b) {
|
89 |
+
return -1
|
90 |
+
}
|
91 |
+
return 0
|
92 |
+
})
|
93 |
+
|
94 |
+
const otherFocusableElements = toArray(
|
95 |
+
getPopup().querySelectorAll(focusable)
|
96 |
+
).filter(el => el.getAttribute('tabindex') !== '-1')
|
97 |
+
|
98 |
+
return uniqueArray(focusableElementsWithTabindex.concat(otherFocusableElements)).filter(el => isVisible(el))
|
99 |
+
}
|
100 |
+
|
101 |
+
export const isModal = () => {
|
102 |
+
return !isToast() && !document.body.classList.contains(swalClasses['no-backdrop'])
|
103 |
+
}
|
104 |
+
|
105 |
+
export const isToast = () => {
|
106 |
+
return document.body.classList.contains(swalClasses['toast-shown'])
|
107 |
+
}
|
108 |
+
|
109 |
+
export const isLoading = () => {
|
110 |
+
return getPopup().hasAttribute('data-loading')
|
111 |
+
}
|
assets/sweetalert2/src/utils/dom/index.js
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
export * from './domUtils.js'
|
2 |
+
export * from './init.js'
|
3 |
+
export * from './getters.js'
|
4 |
+
export * from './parseHtmlToContainer.js'
|
5 |
+
export * from './animationEndEvent.js'
|
6 |
+
export * from './measureScrollbar.js'
|
7 |
+
export * from './renderers/render.js'
|
assets/sweetalert2/src/utils/dom/init.js
ADDED
@@ -0,0 +1,150 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { swalClasses, iconTypes } from '../classes.js'
|
2 |
+
import { getContainer, getPopup, getContent } from './getters.js'
|
3 |
+
import { addClass, removeClass, getChildByClass, setInnerHtml } from './domUtils.js'
|
4 |
+
import { isNodeEnv } from '../isNodeEnv.js'
|
5 |
+
import { error } from '../utils.js'
|
6 |
+
import sweetAlert from '../../sweetalert2.js'
|
7 |
+
|
8 |
+
const sweetHTML = `
|
9 |
+
<div aria-labelledby="${swalClasses.title}" aria-describedby="${swalClasses.content}" class="${swalClasses.popup}" tabindex="-1">
|
10 |
+
<div class="${swalClasses.header}">
|
11 |
+
<ul class="${swalClasses['progress-steps']}"></ul>
|
12 |
+
<div class="${swalClasses.icon} ${iconTypes.error}"></div>
|
13 |
+
<div class="${swalClasses.icon} ${iconTypes.question}"></div>
|
14 |
+
<div class="${swalClasses.icon} ${iconTypes.warning}"></div>
|
15 |
+
<div class="${swalClasses.icon} ${iconTypes.info}"></div>
|
16 |
+
<div class="${swalClasses.icon} ${iconTypes.success}"></div>
|
17 |
+
<img class="${swalClasses.image}" />
|
18 |
+
<h2 class="${swalClasses.title}" id="${swalClasses.title}"></h2>
|
19 |
+
<button type="button" class="${swalClasses.close}"></button>
|
20 |
+
</div>
|
21 |
+
<div class="${swalClasses.content}">
|
22 |
+
<div id="${swalClasses.content}" class="${swalClasses['html-container']}"></div>
|
23 |
+
<input class="${swalClasses.input}" />
|
24 |
+
<input type="file" class="${swalClasses.file}" />
|
25 |
+
<div class="${swalClasses.range}">
|
26 |
+
<input type="range" />
|
27 |
+
<output></output>
|
28 |
+
</div>
|
29 |
+
<select class="${swalClasses.select}"></select>
|
30 |
+
<div class="${swalClasses.radio}"></div>
|
31 |
+
<label for="${swalClasses.checkbox}" class="${swalClasses.checkbox}">
|
32 |
+
<input type="checkbox" />
|
33 |
+
<span class="${swalClasses.label}"></span>
|
34 |
+
</label>
|
35 |
+
<textarea class="${swalClasses.textarea}"></textarea>
|
36 |
+
<div class="${swalClasses['validation-message']}" id="${swalClasses['validation-message']}"></div>
|
37 |
+
</div>
|
38 |
+
<div class="${swalClasses.actions}">
|
39 |
+
<div class="${swalClasses.loader}"></div>
|
40 |
+
<button type="button" class="${swalClasses.confirm}"></button>
|
41 |
+
<button type="button" class="${swalClasses.deny}"></button>
|
42 |
+
<button type="button" class="${swalClasses.cancel}"></button>
|
43 |
+
</div>
|
44 |
+
<div class="${swalClasses.footer}"></div>
|
45 |
+
<div class="${swalClasses['timer-progress-bar-container']}">
|
46 |
+
<div class="${swalClasses['timer-progress-bar']}"></div>
|
47 |
+
</div>
|
48 |
+
</div>
|
49 |
+
`.replace(/(^|\n)\s*/g, '')
|
50 |
+
|
51 |
+
const resetOldContainer = () => {
|
52 |
+
const oldContainer = getContainer()
|
53 |
+
if (!oldContainer) {
|
54 |
+
return false
|
55 |
+
}
|
56 |
+
|
57 |
+
oldContainer.parentNode.removeChild(oldContainer)
|
58 |
+
removeClass(
|
59 |
+
[document.documentElement, document.body],
|
60 |
+
[
|
61 |
+
swalClasses['no-backdrop'],
|
62 |
+
swalClasses['toast-shown'],
|
63 |
+
swalClasses['has-column']
|
64 |
+
]
|
65 |
+
)
|
66 |
+
|
67 |
+
return true
|
68 |
+
}
|
69 |
+
|
70 |
+
let oldInputVal // IE11 workaround, see #1109 for details
|
71 |
+
const resetValidationMessage = (e) => {
|
72 |
+
if (sweetAlert.isVisible() && oldInputVal !== e.target.value) {
|
73 |
+
sweetAlert.resetValidationMessage()
|
74 |
+
}
|
75 |
+
oldInputVal = e.target.value
|
76 |
+
}
|
77 |
+
|
78 |
+
const addInputChangeListeners = () => {
|
79 |
+
const content = getContent()
|
80 |
+
|
81 |
+
const input = getChildByClass(content, swalClasses.input)
|
82 |
+
const file = getChildByClass(content, swalClasses.file)
|
83 |
+
const range = content.querySelector(`.${swalClasses.range} input`)
|
84 |
+
const rangeOutput = content.querySelector(`.${swalClasses.range} output`)
|
85 |
+
const select = getChildByClass(content, swalClasses.select)
|
86 |
+
const checkbox = content.querySelector(`.${swalClasses.checkbox} input`)
|
87 |
+
const textarea = getChildByClass(content, swalClasses.textarea)
|
88 |
+
|
89 |
+
input.oninput = resetValidationMessage
|
90 |
+
file.onchange = resetValidationMessage
|
91 |
+
select.onchange = resetValidationMessage
|
92 |
+
checkbox.onchange = resetValidationMessage
|
93 |
+
textarea.oninput = resetValidationMessage
|
94 |
+
|
95 |
+
range.oninput = (e) => {
|
96 |
+
resetValidationMessage(e)
|
97 |
+
rangeOutput.value = range.value
|
98 |
+
}
|
99 |
+
|
100 |
+
range.onchange = (e) => {
|
101 |
+
resetValidationMessage(e)
|
102 |
+
range.nextSibling.value = range.value
|
103 |
+
}
|
104 |
+
}
|
105 |
+
|
106 |
+
const getTarget = (target) => typeof target === 'string' ? document.querySelector(target) : target
|
107 |
+
|
108 |
+
const setupAccessibility = (params) => {
|
109 |
+
const popup = getPopup()
|
110 |
+
|
111 |
+
popup.setAttribute('role', params.toast ? 'alert' : 'dialog')
|
112 |
+
popup.setAttribute('aria-live', params.toast ? 'polite' : 'assertive')
|
113 |
+
if (!params.toast) {
|
114 |
+
popup.setAttribute('aria-modal', 'true')
|
115 |
+
}
|
116 |
+
}
|
117 |
+
|
118 |
+
const setupRTL = (targetElement) => {
|
119 |
+
if (window.getComputedStyle(targetElement).direction === 'rtl') {
|
120 |
+
addClass(getContainer(), swalClasses.rtl)
|
121 |
+
}
|
122 |
+
}
|
123 |
+
|
124 |
+
/*
|
125 |
+
* Add modal + backdrop to DOM
|
126 |
+
*/
|
127 |
+
export const init = (params) => {
|
128 |
+
// Clean up the old popup container if it exists
|
129 |
+
const oldContainerExisted = resetOldContainer()
|
130 |
+
|
131 |
+
/* istanbul ignore if */
|
132 |
+
if (isNodeEnv()) {
|
133 |
+
error('SweetAlert2 requires document to initialize')
|
134 |
+
return
|
135 |
+
}
|
136 |
+
|
137 |
+
const container = document.createElement('div')
|
138 |
+
container.className = swalClasses.container
|
139 |
+
if (oldContainerExisted) {
|
140 |
+
addClass(container, swalClasses['no-transition'])
|
141 |
+
}
|
142 |
+
setInnerHtml(container, sweetHTML)
|
143 |
+
|
144 |
+
const targetElement = getTarget(params.target)
|
145 |
+
targetElement.appendChild(container)
|
146 |
+
|
147 |
+
setupAccessibility(params)
|
148 |
+
setupRTL(targetElement)
|
149 |
+
addInputChangeListeners()
|
150 |
+
}
|
assets/sweetalert2/src/utils/dom/inputUtils.js
ADDED
@@ -0,0 +1,156 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import * as dom from './index.js'
|
2 |
+
import { swalClasses } from '../classes.js'
|
3 |
+
import { getChildByClass } from './domUtils.js'
|
4 |
+
import { asPromise, error, hasToPromiseFn, isPromise } from '../utils.js'
|
5 |
+
import { showLoading } from '../../staticMethods/showLoading.js'
|
6 |
+
|
7 |
+
export const handleInputOptionsAndValue = (instance, params) => {
|
8 |
+
if (params.input === 'select' || params.input === 'radio') {
|
9 |
+
handleInputOptions(instance, params)
|
10 |
+
} else if (['text', 'email', 'number', 'tel', 'textarea'].includes(params.input) &&
|
11 |
+
(hasToPromiseFn(params.inputValue) || isPromise(params.inputValue))) {
|
12 |
+
handleInputValue(instance, params)
|
13 |
+
}
|
14 |
+
}
|
15 |
+
|
16 |
+
export const getInputValue = (instance, innerParams) => {
|
17 |
+
const input = instance.getInput()
|
18 |
+
if (!input) {
|
19 |
+
return null
|
20 |
+
}
|
21 |
+
switch (innerParams.input) {
|
22 |
+
case 'checkbox':
|
23 |
+
return getCheckboxValue(input)
|
24 |
+
case 'radio':
|
25 |
+
return getRadioValue(input)
|
26 |
+
case 'file':
|
27 |
+
return getFileValue(input)
|
28 |
+
default:
|
29 |
+
return innerParams.inputAutoTrim ? input.value.trim() : input.value
|
30 |
+
}
|
31 |
+
}
|
32 |
+
|
33 |
+
const getCheckboxValue = (input) => input.checked ? 1 : 0
|
34 |
+
|
35 |
+
const getRadioValue = (input) => input.checked ? input.value : null
|
36 |
+
|
37 |
+
const getFileValue = (input) => input.files.length ? (input.getAttribute('multiple') !== null ? input.files : input.files[0]) : null
|
38 |
+
|
39 |
+
const handleInputOptions = (instance, params) => {
|
40 |
+
const content = dom.getContent()
|
41 |
+
const processInputOptions = (inputOptions) => populateInputOptions[params.input](content, formatInputOptions(inputOptions), params)
|
42 |
+
if (hasToPromiseFn(params.inputOptions) || isPromise(params.inputOptions)) {
|
43 |
+
showLoading()
|
44 |
+
asPromise(params.inputOptions).then((inputOptions) => {
|
45 |
+
instance.hideLoading()
|
46 |
+
processInputOptions(inputOptions)
|
47 |
+
})
|
48 |
+
} else if (typeof params.inputOptions === 'object') {
|
49 |
+
processInputOptions(params.inputOptions)
|
50 |
+
} else {
|
51 |
+
error(`Unexpected type of inputOptions! Expected object, Map or Promise, got ${typeof params.inputOptions}`)
|
52 |
+
}
|
53 |
+
}
|
54 |
+
|
55 |
+
const handleInputValue = (instance, params) => {
|
56 |
+
const input = instance.getInput()
|
57 |
+
dom.hide(input)
|
58 |
+
asPromise(params.inputValue).then((inputValue) => {
|
59 |
+
input.value = params.input === 'number' ? parseFloat(inputValue) || 0 : `${inputValue}`
|
60 |
+
dom.show(input)
|
61 |
+
input.focus()
|
62 |
+
instance.hideLoading()
|
63 |
+
})
|
64 |
+
.catch((err) => {
|
65 |
+
error(`Error in inputValue promise: ${err}`)
|
66 |
+
input.value = ''
|
67 |
+
dom.show(input)
|
68 |
+
input.focus()
|
69 |
+
instance.hideLoading()
|
70 |
+
})
|
71 |
+
}
|
72 |
+
|
73 |
+
const populateInputOptions = {
|
74 |
+
select: (content, inputOptions, params) => {
|
75 |
+
const select = getChildByClass(content, swalClasses.select)
|
76 |
+
const renderOption = (parent, optionLabel, optionValue) => {
|
77 |
+
const option = document.createElement('option')
|
78 |
+
option.value = optionValue
|
79 |
+
dom.setInnerHtml(option, optionLabel)
|
80 |
+
if (params.inputValue.toString() === optionValue.toString()) {
|
81 |
+
option.selected = true
|
82 |
+
}
|
83 |
+
parent.appendChild(option)
|
84 |
+
}
|
85 |
+
inputOptions.forEach(inputOption => {
|
86 |
+
const optionValue = inputOption[0]
|
87 |
+
const optionLabel = inputOption[1]
|
88 |
+
// <optgroup> spec:
|
89 |
+
// https://www.w3.org/TR/html401/interact/forms.html#h-17.6
|
90 |
+
// "...all OPTGROUP elements must be specified directly within a SELECT element (i.e., groups may not be nested)..."
|
91 |
+
// check whether this is a <optgroup>
|
92 |
+
if (Array.isArray(optionLabel)) { // if it is an array, then it is an <optgroup>
|
93 |
+
const optgroup = document.createElement('optgroup')
|
94 |
+
optgroup.label = optionValue
|
95 |
+
optgroup.disabled = false // not configurable for now
|
96 |
+
select.appendChild(optgroup)
|
97 |
+
optionLabel.forEach(o => renderOption(optgroup, o[1], o[0]))
|
98 |
+
} else { // case of <option>
|
99 |
+
renderOption(select, optionLabel, optionValue)
|
100 |
+
}
|
101 |
+
})
|
102 |
+
select.focus()
|
103 |
+
},
|
104 |
+
|
105 |
+
radio: (content, inputOptions, params) => {
|
106 |
+
const radio = getChildByClass(content, swalClasses.radio)
|
107 |
+
inputOptions.forEach(inputOption => {
|
108 |
+
const radioValue = inputOption[0]
|
109 |
+
const radioLabel = inputOption[1]
|
110 |
+
const radioInput = document.createElement('input')
|
111 |
+
const radioLabelElement = document.createElement('label')
|
112 |
+
radioInput.type = 'radio'
|
113 |
+
radioInput.name = swalClasses.radio
|
114 |
+
radioInput.value = radioValue
|
115 |
+
if (params.inputValue.toString() === radioValue.toString()) {
|
116 |
+
radioInput.checked = true
|
117 |
+
}
|
118 |
+
const label = document.createElement('span')
|
119 |
+
dom.setInnerHtml(label, radioLabel)
|
120 |
+
label.className = swalClasses.label
|
121 |
+
radioLabelElement.appendChild(radioInput)
|
122 |
+
radioLabelElement.appendChild(label)
|
123 |
+
radio.appendChild(radioLabelElement)
|
124 |
+
})
|
125 |
+
const radios = radio.querySelectorAll('input')
|
126 |
+
if (radios.length) {
|
127 |
+
radios[0].focus()
|
128 |
+
}
|
129 |
+
}
|
130 |
+
}
|
131 |
+
|
132 |
+
/**
|
133 |
+
* Converts `inputOptions` into an array of `[value, label]`s
|
134 |
+
* @param inputOptions
|
135 |
+
*/
|
136 |
+
const formatInputOptions = (inputOptions) => {
|
137 |
+
const result = []
|
138 |
+
if (typeof Map !== 'undefined' && inputOptions instanceof Map) {
|
139 |
+
inputOptions.forEach((value, key) => {
|
140 |
+
let valueFormatted = value
|
141 |
+
if (typeof valueFormatted === 'object') { // case of <optgroup>
|
142 |
+
valueFormatted = formatInputOptions(valueFormatted)
|
143 |
+
}
|
144 |
+
result.push([key, valueFormatted])
|
145 |
+
})
|
146 |
+
} else {
|
147 |
+
Object.keys(inputOptions).forEach(key => {
|
148 |
+
let valueFormatted = inputOptions[key]
|
149 |
+
if (typeof valueFormatted === 'object') { // case of <optgroup>
|
150 |
+
valueFormatted = formatInputOptions(valueFormatted)
|
151 |
+
}
|
152 |
+
result.push([key, valueFormatted])
|
153 |
+
})
|
154 |
+
}
|
155 |
+
return result
|
156 |
+
}
|
assets/sweetalert2/src/utils/dom/measureScrollbar.js
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { swalClasses } from '../classes.js'
|
2 |
+
|
3 |
+
// Measure scrollbar width for padding body during modal show/hide
|
4 |
+
// https://github.com/twbs/bootstrap/blob/master/js/src/modal.js
|
5 |
+
export const measureScrollbar = () => {
|
6 |
+
const scrollDiv = document.createElement('div')
|
7 |
+
scrollDiv.className = swalClasses['scrollbar-measure']
|
8 |
+
document.body.appendChild(scrollDiv)
|
9 |
+
const scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth
|
10 |
+
document.body.removeChild(scrollDiv)
|
11 |
+
return scrollbarWidth
|
12 |
+
}
|
assets/sweetalert2/src/utils/dom/parseHtmlToContainer.js
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { setInnerHtml } from './domUtils.js'
|
2 |
+
|
3 |
+
export const parseHtmlToContainer = (param, target) => {
|
4 |
+
// DOM element
|
5 |
+
if (param instanceof HTMLElement) {
|
6 |
+
target.appendChild(param)
|
7 |
+
|
8 |
+
// Object
|
9 |
+
} else if (typeof param === 'object') {
|
10 |
+
handleObject(param, target)
|
11 |
+
|
12 |
+
// Plain string
|
13 |
+
} else if (param) {
|
14 |
+
setInnerHtml(target, param)
|
15 |
+
}
|
16 |
+
}
|
17 |
+
|
18 |
+
const handleObject = (param, target) => {
|
19 |
+
// JQuery element(s)
|
20 |
+
if (param.jquery) {
|
21 |
+
handleJqueryElem(target, param)
|
22 |
+
|
23 |
+
// For other objects use their string representation
|
24 |
+
} else {
|
25 |
+
setInnerHtml(target, param.toString())
|
26 |
+
}
|
27 |
+
}
|
28 |
+
|
29 |
+
const handleJqueryElem = (target, elem) => {
|
30 |
+
target.textContent = ''
|
31 |
+
if (0 in elem) {
|
32 |
+
for (let i = 0; i in elem; i++) {
|
33 |
+
target.appendChild(elem[i].cloneNode(true))
|
34 |
+
}
|
35 |
+
} else {
|
36 |
+
target.appendChild(elem.cloneNode(true))
|
37 |
+
}
|
38 |
+
}
|
assets/sweetalert2/src/utils/dom/renderers/render.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { getPopup } from '../getters.js'
|
2 |
+
import { renderActions } from './renderActions.js'
|
3 |
+
import { renderContainer } from './renderContainer.js'
|
4 |
+
import { renderContent } from './renderContent.js'
|
5 |
+
import { renderFooter } from './renderFooter.js'
|
6 |
+
import { renderHeader } from './renderHeader.js'
|
7 |
+
import { renderPopup } from './renderPopup.js'
|
8 |
+
|
9 |
+
export const render = (instance, params) => {
|
10 |
+
renderPopup(instance, params)
|
11 |
+
renderContainer(instance, params)
|
12 |
+
|
13 |
+
renderHeader(instance, params)
|
14 |
+
renderContent(instance, params)
|
15 |
+
renderActions(instance, params)
|
16 |
+
renderFooter(instance, params)
|
17 |
+
|
18 |
+
if (typeof params.didRender === 'function') {
|
19 |
+
params.didRender(getPopup())
|
20 |
+
} else if (typeof params.onRender === 'function') {
|
21 |
+
params.onRender(getPopup()) // @deprecated
|
22 |
+
}
|
23 |
+
}
|
assets/sweetalert2/src/utils/dom/renderers/renderActions.js
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { swalClasses } from '../../classes.js'
|
2 |
+
import * as dom from '../../dom/index.js'
|
3 |
+
import { capitalizeFirstLetter } from '../../utils.js'
|
4 |
+
|
5 |
+
export const renderActions = (instance, params) => {
|
6 |
+
const actions = dom.getActions()
|
7 |
+
const loader = dom.getLoader()
|
8 |
+
const confirmButton = dom.getConfirmButton()
|
9 |
+
const denyButton = dom.getDenyButton()
|
10 |
+
const cancelButton = dom.getCancelButton()
|
11 |
+
|
12 |
+
// Actions (buttons) wrapper
|
13 |
+
if (!params.showConfirmButton && !params.showDenyButton && !params.showCancelButton) {
|
14 |
+
dom.hide(actions)
|
15 |
+
}
|
16 |
+
|
17 |
+
// Custom class
|
18 |
+
dom.applyCustomClass(actions, params, 'actions')
|
19 |
+
|
20 |
+
// Render buttons
|
21 |
+
renderButton(confirmButton, 'confirm', params)
|
22 |
+
renderButton(denyButton, 'deny', params)
|
23 |
+
renderButton(cancelButton, 'cancel', params)
|
24 |
+
|
25 |
+
// Loader
|
26 |
+
loader.innerHTML = params.loaderHtml
|
27 |
+
|
28 |
+
if (params.buttonsStyling) {
|
29 |
+
handleButtonsStyling(confirmButton, denyButton, cancelButton, params)
|
30 |
+
} else {
|
31 |
+
dom.removeClass([confirmButton, denyButton, cancelButton], swalClasses.styled)
|
32 |
+
}
|
33 |
+
|
34 |
+
if (params.reverseButtons) {
|
35 |
+
actions.insertBefore(cancelButton, loader)
|
36 |
+
actions.insertBefore(denyButton, loader)
|
37 |
+
actions.insertBefore(confirmButton, loader)
|
38 |
+
}
|
39 |
+
}
|
40 |
+
|
41 |
+
function handleButtonsStyling (confirmButton, denyButton, cancelButton, params) {
|
42 |
+
dom.addClass([confirmButton, denyButton, cancelButton], swalClasses.styled)
|
43 |
+
|
44 |
+
// Buttons background colors
|
45 |
+
if (params.confirmButtonColor) {
|
46 |
+
confirmButton.style.backgroundColor = params.confirmButtonColor
|
47 |
+
}
|
48 |
+
if (params.denyButtonColor) {
|
49 |
+
denyButton.style.backgroundColor = params.denyButtonColor
|
50 |
+
}
|
51 |
+
if (params.cancelButtonColor) {
|
52 |
+
cancelButton.style.backgroundColor = params.cancelButtonColor
|
53 |
+
}
|
54 |
+
}
|
55 |
+
|
56 |
+
function renderButton (button, buttonType, params) {
|
57 |
+
dom.toggle(button, params[`show${capitalizeFirstLetter(buttonType)}Button`], 'inline-block')
|
58 |
+
dom.setInnerHtml(button, params[`${buttonType}ButtonText`]) // Set caption text
|
59 |
+
button.setAttribute('aria-label', params[`${buttonType}ButtonAriaLabel`]) // ARIA label
|
60 |
+
|
61 |
+
// Add buttons custom classes
|
62 |
+
button.className = swalClasses[buttonType]
|
63 |
+
dom.applyCustomClass(button, params, `${buttonType}Button`)
|
64 |
+
dom.addClass(button, params[`${buttonType}ButtonClass`])
|
65 |
+
}
|
assets/sweetalert2/src/utils/dom/renderers/renderCloseButton.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import * as dom from '../../dom/index.js'
|
2 |
+
|
3 |
+
export const renderCloseButton = (instance, params) => {
|
4 |
+
const closeButton = dom.getCloseButton()
|
5 |
+
|
6 |
+
dom.setInnerHtml(closeButton, params.closeButtonHtml)
|
7 |
+
|
8 |
+
// Custom class
|
9 |
+
dom.applyCustomClass(closeButton, params, 'closeButton')
|
10 |
+
|
11 |
+
dom.toggle(closeButton, params.showCloseButton)
|
12 |
+
closeButton.setAttribute('aria-label', params.closeButtonAriaLabel)
|
13 |
+
}
|
assets/sweetalert2/src/utils/dom/renderers/renderContainer.js
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { swalClasses } from '../../classes.js'
|
2 |
+
import { warn } from '../../utils.js'
|
3 |
+
import * as dom from '../../dom/index.js'
|
4 |
+
|
5 |
+
function handleBackdropParam (container, backdrop) {
|
6 |
+
if (typeof backdrop === 'string') {
|
7 |
+
container.style.background = backdrop
|
8 |
+
} else if (!backdrop) {
|
9 |
+
dom.addClass([document.documentElement, document.body], swalClasses['no-backdrop'])
|
10 |
+
}
|
11 |
+
}
|
12 |
+
|
13 |
+
function handlePositionParam (container, position) {
|
14 |
+
if (position in swalClasses) {
|
15 |
+
dom.addClass(container, swalClasses[position])
|
16 |
+
} else {
|
17 |
+
warn('The "position" parameter is not valid, defaulting to "center"')
|
18 |
+
dom.addClass(container, swalClasses.center)
|
19 |
+
}
|
20 |
+
}
|
21 |
+
|
22 |
+
function handleGrowParam (container, grow) {
|
23 |
+
if (grow && typeof grow === 'string') {
|
24 |
+
const growClass = `grow-${grow}`
|
25 |
+
if (growClass in swalClasses) {
|
26 |
+
dom.addClass(container, swalClasses[growClass])
|
27 |
+
}
|
28 |
+
}
|
29 |
+
}
|
30 |
+
|
31 |
+
export const renderContainer = (instance, params) => {
|
32 |
+
const container = dom.getContainer()
|
33 |
+
|
34 |
+
if (!container) {
|
35 |
+
return
|
36 |
+
}
|
37 |
+
|
38 |
+
handleBackdropParam(container, params.backdrop)
|
39 |
+
|
40 |
+
if (!params.backdrop && params.allowOutsideClick) {
|
41 |
+
warn('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`')
|
42 |
+
}
|
43 |
+
|
44 |
+
handlePositionParam(container, params.position)
|
45 |
+
handleGrowParam(container, params.grow)
|
46 |
+
|
47 |
+
// Custom class
|
48 |
+
dom.applyCustomClass(container, params, 'container')
|
49 |
+
|
50 |
+
// Set queue step attribute for getQueueStep() method
|
51 |
+
const queueStep = document.body.getAttribute('data-swal2-queue-step')
|
52 |
+
if (queueStep) {
|
53 |
+
container.setAttribute('data-queue-step', queueStep)
|
54 |
+
document.body.removeAttribute('data-swal2-queue-step')
|
55 |
+
}
|
56 |
+
}
|
assets/sweetalert2/src/utils/dom/renderers/renderContent.js
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { swalClasses } from '../../classes.js'
|
2 |
+
import * as dom from '../../dom/index.js'
|
3 |
+
import { renderInput } from './renderInput.js'
|
4 |
+
|
5 |
+
export const renderContent = (instance, params) => {
|
6 |
+
const content = dom.getContent().querySelector(`#${swalClasses.content}`)
|
7 |
+
|
8 |
+
// Content as HTML
|
9 |
+
if (params.html) {
|
10 |
+
dom.parseHtmlToContainer(params.html, content)
|
11 |
+
dom.show(content, 'block')
|
12 |
+
|
13 |
+
// Content as plain text
|
14 |
+
} else if (params.text) {
|
15 |
+
content.textContent = params.text
|
16 |
+
dom.show(content, 'block')
|
17 |
+
|
18 |
+
// No content
|
19 |
+
} else {
|
20 |
+
dom.hide(content)
|
21 |
+
}
|
22 |
+
|
23 |
+
renderInput(instance, params)
|
24 |
+
|
25 |
+
// Custom class
|
26 |
+
dom.applyCustomClass(dom.getContent(), params, 'content')
|
27 |
+
}
|
assets/sweetalert2/src/utils/dom/renderers/renderFooter.js
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import * as dom from '../../dom/index.js'
|
2 |
+
|
3 |
+
export const renderFooter = (instance, params) => {
|
4 |
+
const footer = dom.getFooter()
|
5 |
+
|
6 |
+
dom.toggle(footer, params.footer)
|
7 |
+
|
8 |
+
if (params.footer) {
|
9 |
+
dom.parseHtmlToContainer(params.footer, footer)
|
10 |
+
}
|
11 |
+
|
12 |
+
// Custom class
|
13 |
+
dom.applyCustomClass(footer, params, 'footer')
|
14 |
+
}
|
assets/sweetalert2/src/utils/dom/renderers/renderHeader.js
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import * as dom from '../../dom/index.js'
|
2 |
+
import { renderCloseButton } from './renderCloseButton.js'
|
3 |
+
import { renderIcon } from './renderIcon.js'
|
4 |
+
import { renderImage } from './renderImage.js'
|
5 |
+
import { renderProgressSteps } from './renderProgressSteps.js'
|
6 |
+
import { renderTitle } from './renderTitle.js'
|
7 |
+
|
8 |
+
export const renderHeader = (instance, params) => {
|
9 |
+
const header = dom.getHeader()
|
10 |
+
|
11 |
+
// Custom class
|
12 |
+
dom.applyCustomClass(header, params, 'header')
|
13 |
+
|
14 |
+
// Progress steps
|
15 |
+
renderProgressSteps(instance, params)
|
16 |
+
|
17 |
+
// Icon
|
18 |
+
renderIcon(instance, params)
|
19 |
+
|
20 |
+
// Image
|
21 |
+
renderImage(instance, params)
|
22 |
+
|
23 |
+
// Title
|
24 |
+
renderTitle(instance, params)
|
25 |
+
|
26 |
+
// Close button
|
27 |
+
renderCloseButton(instance, params)
|
28 |
+
}
|
assets/sweetalert2/src/utils/dom/renderers/renderIcon.js
ADDED
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { swalClasses, iconTypes } from '../../classes.js'
|
2 |
+
import { error } from '../../utils.js'
|
3 |
+
import * as dom from '../../dom/index.js'
|
4 |
+
import privateProps from '../../../privateProps.js'
|
5 |
+
|
6 |
+
export const renderIcon = (instance, params) => {
|
7 |
+
const innerParams = privateProps.innerParams.get(instance)
|
8 |
+
|
9 |
+
// if the given icon already rendered, apply the styling without re-rendering the icon
|
10 |
+
if (innerParams && params.icon === innerParams.icon && dom.getIcon()) {
|
11 |
+
applyStyles(dom.getIcon(), params)
|
12 |
+
return
|
13 |
+
}
|
14 |
+
|
15 |
+
hideAllIcons()
|
16 |
+
|
17 |
+
if (!params.icon) {
|
18 |
+
return
|
19 |
+
}
|
20 |
+
|
21 |
+
if (Object.keys(iconTypes).indexOf(params.icon) !== -1) {
|
22 |
+
const icon = dom.elementBySelector(`.${swalClasses.icon}.${iconTypes[params.icon]}`)
|
23 |
+
dom.show(icon)
|
24 |
+
|
25 |
+
// Custom or default content
|
26 |
+
setContent(icon, params)
|
27 |
+
|
28 |
+
applyStyles(icon, params)
|
29 |
+
|
30 |
+
// Animate icon
|
31 |
+
dom.addClass(icon, params.showClass.icon)
|
32 |
+
} else {
|
33 |
+
error(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${params.icon}"`)
|
34 |
+
}
|
35 |
+
}
|
36 |
+
|
37 |
+
const hideAllIcons = () => {
|
38 |
+
const icons = dom.getIcons()
|
39 |
+
for (let i = 0; i < icons.length; i++) {
|
40 |
+
dom.hide(icons[i])
|
41 |
+
}
|
42 |
+
}
|
43 |
+
|
44 |
+
const applyStyles = (icon, params) => {
|
45 |
+
// Icon color
|
46 |
+
setColor(icon, params)
|
47 |
+
|
48 |
+
// Success icon background color
|
49 |
+
adjustSuccessIconBackgoundColor()
|
50 |
+
|
51 |
+
// Custom class
|
52 |
+
dom.applyCustomClass(icon, params, 'icon')
|
53 |
+
}
|
54 |
+
|
55 |
+
// Adjust success icon background color to match the popup background color
|
56 |
+
const adjustSuccessIconBackgoundColor = () => {
|
57 |
+
const popup = dom.getPopup()
|
58 |
+
const popupBackgroundColor = window.getComputedStyle(popup).getPropertyValue('background-color')
|
59 |
+
const successIconParts = popup.querySelectorAll('[class^=swal2-success-circular-line], .swal2-success-fix')
|
60 |
+
for (let i = 0; i < successIconParts.length; i++) {
|
61 |
+
successIconParts[i].style.backgroundColor = popupBackgroundColor
|
62 |
+
}
|
63 |
+
}
|
64 |
+
|
65 |
+
const setContent = (icon, params) => {
|
66 |
+
icon.textContent = ''
|
67 |
+
|
68 |
+
if (params.iconHtml) {
|
69 |
+
dom.setInnerHtml(icon, iconContent(params.iconHtml))
|
70 |
+
} else if (params.icon === 'success') {
|
71 |
+
dom.setInnerHtml(icon, `
|
72 |
+
<div class="swal2-success-circular-line-left"></div>
|
73 |
+
<span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>
|
74 |
+
<div class="swal2-success-ring"></div> <div class="swal2-success-fix"></div>
|
75 |
+
<div class="swal2-success-circular-line-right"></div>
|
76 |
+
`)
|
77 |
+
} else if (params.icon === 'error') {
|
78 |
+
dom.setInnerHtml(icon, `
|
79 |
+
<span class="swal2-x-mark">
|
80 |
+
<span class="swal2-x-mark-line-left"></span>
|
81 |
+
<span class="swal2-x-mark-line-right"></span>
|
82 |
+
</span>
|
83 |
+
`)
|
84 |
+
} else {
|
85 |
+
const defaultIconHtml = {
|
86 |
+
question: '?',
|
87 |
+
warning: '!',
|
88 |
+
info: 'i'
|
89 |
+
}
|
90 |
+
dom.setInnerHtml(icon, iconContent(defaultIconHtml[params.icon]))
|
91 |
+
}
|
92 |
+
}
|
93 |
+
|
94 |
+
const setColor = (icon, params) => {
|
95 |
+
if (!params.iconColor) {
|
96 |
+
return
|
97 |
+
}
|
98 |
+
icon.style.color = params.iconColor
|
99 |
+
icon.style.borderColor = params.iconColor
|
100 |
+
for (const sel of ['.swal2-success-line-tip', '.swal2-success-line-long', '.swal2-x-mark-line-left', '.swal2-x-mark-line-right']) {
|
101 |
+
dom.setStyle(icon, sel, 'backgroundColor', params.iconColor)
|
102 |
+
}
|
103 |
+
dom.setStyle(icon, '.swal2-success-ring', 'borderColor', params.iconColor)
|
104 |
+
}
|
105 |
+
|
106 |
+
const iconContent = (content) => `<div class="${swalClasses['icon-content']}">${content}</div>`
|
assets/sweetalert2/src/utils/dom/renderers/renderImage.js
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { swalClasses } from '../../classes.js'
|
2 |
+
import * as dom from '../../dom/index.js'
|
3 |
+
|
4 |
+
export const renderImage = (instance, params) => {
|
5 |
+
const image = dom.getImage()
|
6 |
+
|
7 |
+
if (!params.imageUrl) {
|
8 |
+
return dom.hide(image)
|
9 |
+
}
|
10 |
+
|
11 |
+
dom.show(image, '')
|
12 |
+
|
13 |
+
// Src, alt
|
14 |
+
image.setAttribute('src', params.imageUrl)
|
15 |
+
image.setAttribute('alt', params.imageAlt)
|
16 |
+
|
17 |
+
// Width, height
|
18 |
+
dom.applyNumericalStyle(image, 'width', params.imageWidth)
|
19 |
+
dom.applyNumericalStyle(image, 'height', params.imageHeight)
|
20 |
+
|
21 |
+
// Class
|
22 |
+
image.className = swalClasses.image
|
23 |
+
dom.applyCustomClass(image, params, 'image')
|
24 |
+
}
|
assets/sweetalert2/src/utils/dom/renderers/renderInput.js
ADDED
@@ -0,0 +1,196 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { swalClasses } from '../../classes.js'
|
2 |
+
import { warn, error, isPromise } from '../../utils.js'
|
3 |
+
import * as dom from '../../dom/index.js'
|
4 |
+
import privateProps from '../../../privateProps.js'
|
5 |
+
|
6 |
+
const inputTypes = ['input', 'file', 'range', 'select', 'radio', 'checkbox', 'textarea']
|
7 |
+
|
8 |
+
export const renderInput = (instance, params) => {
|
9 |
+
const content = dom.getContent()
|
10 |
+
const innerParams = privateProps.innerParams.get(instance)
|
11 |
+
const rerender = !innerParams || params.input !== innerParams.input
|
12 |
+
|
13 |
+
inputTypes.forEach((inputType) => {
|
14 |
+
const inputClass = swalClasses[inputType]
|
15 |
+
const inputContainer = dom.getChildByClass(content, inputClass)
|
16 |
+
|
17 |
+
// set attributes
|
18 |
+
setAttributes(inputType, params.inputAttributes)
|
19 |
+
|
20 |
+
// set class
|
21 |
+
inputContainer.className = inputClass
|
22 |
+
|
23 |
+
if (rerender) {
|
24 |
+
dom.hide(inputContainer)
|
25 |
+
}
|
26 |
+
})
|
27 |
+
|
28 |
+
if (params.input) {
|
29 |
+
if (rerender) {
|
30 |
+
showInput(params)
|
31 |
+
}
|
32 |
+
// set custom class
|
33 |
+
setCustomClass(params)
|
34 |
+
}
|
35 |
+
}
|
36 |
+
|
37 |
+
const showInput = (params) => {
|
38 |
+
if (!renderInputType[params.input]) {
|
39 |
+
return error(`Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "${params.input}"`)
|
40 |
+
}
|
41 |
+
|
42 |
+
const inputContainer = getInputContainer(params.input)
|
43 |
+
const input = renderInputType[params.input](inputContainer, params)
|
44 |
+
dom.show(input)
|
45 |
+
|
46 |
+
// input autofocus
|
47 |
+
setTimeout(() => {
|
48 |
+
dom.focusInput(input)
|
49 |
+
})
|
50 |
+
}
|
51 |
+
|
52 |
+
const removeAttributes = (input) => {
|
53 |
+
for (let i = 0; i < input.attributes.length; i++) {
|
54 |
+
const attrName = input.attributes[i].name
|
55 |
+
if (!['type', 'value', 'style'].includes(attrName)) {
|
56 |
+
input.removeAttribute(attrName)
|
57 |
+
}
|
58 |
+
}
|
59 |
+
}
|
60 |
+
|
61 |
+
const setAttributes = (inputType, inputAttributes) => {
|
62 |
+
const input = dom.getInput(dom.getContent(), inputType)
|
63 |
+
if (!input) {
|
64 |
+
return
|
65 |
+
}
|
66 |
+
|
67 |
+
removeAttributes(input)
|
68 |
+
|
69 |
+
for (const attr in inputAttributes) {
|
70 |
+
// Do not set a placeholder for <input type="range">
|
71 |
+
// it'll crash Edge, #1298
|
72 |
+
if (inputType === 'range' && attr === 'placeholder') {
|
73 |
+
continue
|
74 |
+
}
|
75 |
+
|
76 |
+
input.setAttribute(attr, inputAttributes[attr])
|
77 |
+
}
|
78 |
+
}
|
79 |
+
|
80 |
+
const setCustomClass = (params) => {
|
81 |
+
const inputContainer = getInputContainer(params.input)
|
82 |
+
if (params.customClass) {
|
83 |
+
dom.addClass(inputContainer, params.customClass.input)
|
84 |
+
}
|
85 |
+
}
|
86 |
+
|
87 |
+
const setInputPlaceholder = (input, params) => {
|
88 |
+
if (!input.placeholder || params.inputPlaceholder) {
|
89 |
+
input.placeholder = params.inputPlaceholder
|
90 |
+
}
|
91 |
+
}
|
92 |
+
|
93 |
+
const setInputLabel = (input, prependTo, params) => {
|
94 |
+
if (params.inputLabel) {
|
95 |
+
input.id = swalClasses.input
|
96 |
+
const label = document.createElement('label')
|
97 |
+
const labelClass = swalClasses['input-label']
|
98 |
+
label.setAttribute('for', input.id)
|
99 |
+
label.className = labelClass
|
100 |
+
label.innerText = params.inputLabel
|
101 |
+
prependTo.insertAdjacentElement('beforebegin', label)
|
102 |
+
}
|
103 |
+
}
|
104 |
+
|
105 |
+
const getInputContainer = (inputType) => {
|
106 |
+
const inputClass = swalClasses[inputType] ? swalClasses[inputType] : swalClasses.input
|
107 |
+
return dom.getChildByClass(dom.getContent(), inputClass)
|
108 |
+
}
|
109 |
+
|
110 |
+
const renderInputType = {}
|
111 |
+
|
112 |
+
renderInputType.text =
|
113 |
+
renderInputType.email =
|
114 |
+
renderInputType.password =
|
115 |
+
renderInputType.number =
|
116 |
+
renderInputType.tel =
|
117 |
+
renderInputType.url = (input, params) => {
|
118 |
+
if (typeof params.inputValue === 'string' || typeof params.inputValue === 'number') {
|
119 |
+
input.value = params.inputValue
|
120 |
+
} else if (!isPromise(params.inputValue)) {
|
121 |
+
warn(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof params.inputValue}"`)
|
122 |
+
}
|
123 |
+
setInputLabel(input, input, params)
|
124 |
+
setInputPlaceholder(input, params)
|
125 |
+
input.type = params.input
|
126 |
+
return input
|
127 |
+
}
|
128 |
+
|
129 |
+
renderInputType.file = (input, params) => {
|
130 |
+
setInputLabel(input, input, params)
|
131 |
+
setInputPlaceholder(input, params)
|
132 |
+
return input
|
133 |
+
}
|
134 |
+
|
135 |
+
renderInputType.range = (range, params) => {
|
136 |
+
const rangeInput = range.querySelector('input')
|
137 |
+
const rangeOutput = range.querySelector('output')
|
138 |
+
rangeInput.value = params.inputValue
|
139 |
+
rangeInput.type = params.input
|
140 |
+
rangeOutput.value = params.inputValue
|
141 |
+
setInputLabel(rangeInput, range, params)
|
142 |
+
return range
|
143 |
+
}
|
144 |
+
|
145 |
+
renderInputType.select = (select, params) => {
|
146 |
+
select.textContent = ''
|
147 |
+
if (params.inputPlaceholder) {
|
148 |
+
const placeholder = document.createElement('option')
|
149 |
+
dom.setInnerHtml(placeholder, params.inputPlaceholder)
|
150 |
+
placeholder.value = ''
|
151 |
+
placeholder.disabled = true
|
152 |
+
placeholder.selected = true
|
153 |
+
select.appendChild(placeholder)
|
154 |
+
}
|
155 |
+
setInputLabel(select, select, params)
|
156 |
+
return select
|
157 |
+
}
|
158 |
+
|
159 |
+
renderInputType.radio = (radio) => {
|
160 |
+
radio.textContent = ''
|
161 |
+
return radio
|
162 |
+
}
|
163 |
+
|
164 |
+
renderInputType.checkbox = (checkboxContainer, params) => {
|
165 |
+
const checkbox = dom.getInput(dom.getContent(), 'checkbox')
|
166 |
+
checkbox.value = 1
|
167 |
+
checkbox.id = swalClasses.checkbox
|
168 |
+
checkbox.checked = Boolean(params.inputValue)
|
169 |
+
const label = checkboxContainer.querySelector('span')
|
170 |
+
dom.setInnerHtml(label, params.inputPlaceholder)
|
171 |
+
return checkboxContainer
|
172 |
+
}
|
173 |
+
|
174 |
+
renderInputType.textarea = (textarea, params) => {
|
175 |
+
textarea.value = params.inputValue
|
176 |
+
setInputPlaceholder(textarea, params)
|
177 |
+
setInputLabel(textarea, textarea, params)
|
178 |
+
|
179 |
+
if ('MutationObserver' in window) { // #1699
|
180 |
+
const initialPopupWidth = parseInt(window.getComputedStyle(dom.getPopup()).width)
|
181 |
+
const popupPadding = parseInt(window.getComputedStyle(dom.getPopup()).paddingLeft) + parseInt(window.getComputedStyle(dom.getPopup()).paddingRight)
|
182 |
+
const outputsize = () => {
|
183 |
+
const contentWidth = textarea.offsetWidth + popupPadding
|
184 |
+
if (contentWidth > initialPopupWidth) {
|
185 |
+
dom.getPopup().style.width = `${contentWidth}px`
|
186 |
+
} else {
|
187 |
+
dom.getPopup().style.width = null
|
188 |
+
}
|
189 |
+
}
|
190 |
+
new MutationObserver(outputsize).observe(textarea, {
|
191 |
+
attributes: true, attributeFilter: ['style']
|
192 |
+
})
|
193 |
+
}
|
194 |
+
|
195 |
+
return textarea
|
196 |
+
}
|
assets/sweetalert2/src/utils/dom/renderers/renderPopup.js
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { swalClasses } from '../../classes.js'
|
2 |
+
import * as dom from '../../dom/index.js'
|
3 |
+
|
4 |
+
export const renderPopup = (instance, params) => {
|
5 |
+
const popup = dom.getPopup()
|
6 |
+
|
7 |
+
// Width
|
8 |
+
dom.applyNumericalStyle(popup, 'width', params.width)
|
9 |
+
|
10 |
+
// Padding
|
11 |
+
dom.applyNumericalStyle(popup, 'padding', params.padding)
|
12 |
+
|
13 |
+
// Background
|
14 |
+
if (params.background) {
|
15 |
+
popup.style.background = params.background
|
16 |
+
}
|
17 |
+
|
18 |
+
// Classes
|
19 |
+
addClasses(popup, params)
|
20 |
+
}
|
21 |
+
|
22 |
+
const addClasses = (popup, params) => {
|
23 |
+
// Default Class + showClass when updating Swal.update({})
|
24 |
+
popup.className = `${swalClasses.popup} ${dom.isVisible(popup) ? params.showClass.popup : ''}`
|
25 |
+
|
26 |
+
if (params.toast) {
|
27 |
+
dom.addClass([document.documentElement, document.body], swalClasses['toast-shown'])
|
28 |
+
dom.addClass(popup, swalClasses.toast)
|
29 |
+
} else {
|
30 |
+
dom.addClass(popup, swalClasses.modal)
|
31 |
+
}
|
32 |
+
|
33 |
+
// Custom class
|
34 |
+
dom.applyCustomClass(popup, params, 'popup')
|
35 |
+
if (typeof params.customClass === 'string') {
|
36 |
+
dom.addClass(popup, params.customClass)
|
37 |
+
}
|
38 |
+
|
39 |
+
// Icon class (#1842)
|
40 |
+
if (params.icon) {
|
41 |
+
dom.addClass(popup, swalClasses[`icon-${params.icon}`])
|
42 |
+
}
|
43 |
+
}
|
assets/sweetalert2/src/utils/dom/renderers/renderProgressSteps.js
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { swalClasses } from '../../classes.js'
|
2 |
+
import { warn } from '../../utils.js'
|
3 |
+
import * as dom from '../../dom/index.js'
|
4 |
+
import { getQueueStep } from '../../../staticMethods/queue.js'
|
5 |
+
|
6 |
+
const createStepElement = (step) => {
|
7 |
+
const stepEl = document.createElement('li')
|
8 |
+
dom.addClass(stepEl, swalClasses['progress-step'])
|
9 |
+
dom.setInnerHtml(stepEl, step)
|
10 |
+
return stepEl
|
11 |
+
}
|
12 |
+
|
13 |
+
const createLineElement = (params) => {
|
14 |
+
const lineEl = document.createElement('li')
|
15 |
+
dom.addClass(lineEl, swalClasses['progress-step-line'])
|
16 |
+
if (params.progressStepsDistance) {
|
17 |
+
lineEl.style.width = params.progressStepsDistance
|
18 |
+
}
|
19 |
+
return lineEl
|
20 |
+
}
|
21 |
+
|
22 |
+
export const renderProgressSteps = (instance, params) => {
|
23 |
+
const progressStepsContainer = dom.getProgressSteps()
|
24 |
+
if (!params.progressSteps || params.progressSteps.length === 0) {
|
25 |
+
return dom.hide(progressStepsContainer)
|
26 |
+
}
|
27 |
+
|
28 |
+
dom.show(progressStepsContainer)
|
29 |
+
progressStepsContainer.textContent = ''
|
30 |
+
const currentProgressStep = parseInt(params.currentProgressStep === undefined ? getQueueStep() : params.currentProgressStep)
|
31 |
+
if (currentProgressStep >= params.progressSteps.length) {
|
32 |
+
warn(
|
33 |
+
'Invalid currentProgressStep parameter, it should be less than progressSteps.length ' +
|
34 |
+
'(currentProgressStep like JS arrays starts from 0)'
|
35 |
+
)
|
36 |
+
}
|
37 |
+
|
38 |
+
params.progressSteps.forEach((step, index) => {
|
39 |
+
const stepEl = createStepElement(step)
|
40 |
+
progressStepsContainer.appendChild(stepEl)
|
41 |
+
if (index === currentProgressStep) {
|
42 |
+
dom.addClass(stepEl, swalClasses['active-progress-step'])
|
43 |
+
}
|
44 |
+
|
45 |
+
if (index !== params.progressSteps.length - 1) {
|
46 |
+
const lineEl = createLineElement(params)
|
47 |
+
progressStepsContainer.appendChild(lineEl)
|
48 |
+
}
|
49 |
+
})
|
50 |
+
}
|
assets/sweetalert2/src/utils/dom/renderers/renderTitle.js
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import * as dom from '../../dom/index.js'
|
2 |
+
|
3 |
+
export const renderTitle = (instance, params) => {
|
4 |
+
const title = dom.getTitle()
|
5 |
+
|
6 |
+
dom.toggle(title, params.title || params.titleText)
|
7 |
+
|
8 |
+
if (params.title) {
|
9 |
+
dom.parseHtmlToContainer(params.title, title)
|
10 |
+
}
|
11 |
+
|
12 |
+
if (params.titleText) {
|
13 |
+
title.innerText = params.titleText
|
14 |
+
}
|
15 |
+
|
16 |
+
// Custom class
|
17 |
+
dom.applyCustomClass(title, params, 'title')
|
18 |
+
}
|
assets/sweetalert2/src/utils/ieFix.js
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* istanbul ignore file */
|
2 |
+
import * as dom from './dom/index.js'
|
3 |
+
|
4 |
+
// https://stackoverflow.com/a/21825207
|
5 |
+
const isIE11 = () => !!window.MSInputMethodContext && !!document.documentMode
|
6 |
+
|
7 |
+
// Fix IE11 centering sweetalert2/issues/933
|
8 |
+
const fixVerticalPositionIE = () => {
|
9 |
+
const container = dom.getContainer()
|
10 |
+
const popup = dom.getPopup()
|
11 |
+
|
12 |
+
container.style.removeProperty('align-items')
|
13 |
+
if (popup.offsetTop < 0) {
|
14 |
+
container.style.alignItems = 'flex-start'
|
15 |
+
}
|
16 |
+
}
|
17 |
+
|
18 |
+
export const IEfix = () => {
|
19 |
+
if (typeof window !== 'undefined' && isIE11()) {
|
20 |
+
fixVerticalPositionIE()
|
21 |
+
window.addEventListener('resize', fixVerticalPositionIE)
|
22 |
+
}
|
23 |
+
}
|
24 |
+
|
25 |
+
export const undoIEfix = () => {
|
26 |
+
if (typeof window !== 'undefined' && isIE11()) {
|
27 |
+
window.removeEventListener('resize', fixVerticalPositionIE)
|
28 |
+
}
|
29 |
+
}
|
assets/sweetalert2/src/utils/iosFix.js
ADDED
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* istanbul ignore file */
|
2 |
+
import * as dom from './dom/index.js'
|
3 |
+
import { swalClasses } from '../utils/classes.js'
|
4 |
+
|
5 |
+
// Fix iOS scrolling http://stackoverflow.com/q/39626302
|
6 |
+
|
7 |
+
export const iOSfix = () => {
|
8 |
+
const iOS = (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream) || (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1)
|
9 |
+
if (iOS && !dom.hasClass(document.body, swalClasses.iosfix)) {
|
10 |
+
const offset = document.body.scrollTop
|
11 |
+
document.body.style.top = `${offset * -1}px`
|
12 |
+
dom.addClass(document.body, swalClasses.iosfix)
|
13 |
+
lockBodyScroll()
|
14 |
+
addBottomPaddingForTallPopups() // #1948
|
15 |
+
}
|
16 |
+
}
|
17 |
+
|
18 |
+
const addBottomPaddingForTallPopups = () => {
|
19 |
+
const safari = !navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i)
|
20 |
+
if (safari) {
|
21 |
+
const bottomPanelHeight = 44
|
22 |
+
if (dom.getPopup().scrollHeight > window.innerHeight - bottomPanelHeight) {
|
23 |
+
dom.getContainer().style.paddingBottom = `${bottomPanelHeight}px`
|
24 |
+
}
|
25 |
+
}
|
26 |
+
}
|
27 |
+
|
28 |
+
const lockBodyScroll = () => { // #1246
|
29 |
+
const container = dom.getContainer()
|
30 |
+
let preventTouchMove
|
31 |
+
container.ontouchstart = (e) => {
|
32 |
+
preventTouchMove = shouldPreventTouchMove(e)
|
33 |
+
}
|
34 |
+
container.ontouchmove = (e) => {
|
35 |
+
if (preventTouchMove) {
|
36 |
+
e.preventDefault()
|
37 |
+
e.stopPropagation()
|
38 |
+
}
|
39 |
+
}
|
40 |
+
}
|
41 |
+
|
42 |
+
const shouldPreventTouchMove = (event) => {
|
43 |
+
const target = event.target
|
44 |
+
const container = dom.getContainer()
|
45 |
+
if (event.touches && event.touches.length && event.touches[0].touchType === 'stylus') { // #1786
|
46 |
+
return false
|
47 |
+
}
|
48 |
+
if (target === container) {
|
49 |
+
return true
|
50 |
+
}
|
51 |
+
if (
|
52 |
+
!dom.isScrollable(container) &&
|
53 |
+
target.tagName !== 'INPUT' && // #1603
|
54 |
+
!(
|
55 |
+
dom.isScrollable(dom.getContent()) && // #1944
|
56 |
+
dom.getContent().contains(target)
|
57 |
+
)
|
58 |
+
) {
|
59 |
+
return true
|
60 |
+
}
|
61 |
+
return false
|
62 |
+
}
|
63 |
+
|
64 |
+
export const undoIOSfix = () => {
|
65 |
+
if (dom.hasClass(document.body, swalClasses.iosfix)) {
|
66 |
+
const offset = parseInt(document.body.style.top, 10)
|
67 |
+
dom.removeClass(document.body, swalClasses.iosfix)
|
68 |
+
document.body.style.top = ''
|
69 |
+
document.body.scrollTop = (offset * -1)
|
70 |
+
}
|
71 |
+
}
|
assets/sweetalert2/src/utils/isNodeEnv.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
// Detect Node env
|
2 |
+
export const isNodeEnv = () => typeof window === 'undefined' || typeof document === 'undefined'
|
assets/sweetalert2/src/utils/openPopup.js
ADDED
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import * as dom from './dom/index.js'
|
2 |
+
import { swalClasses } from './classes.js'
|
3 |
+
import { fixScrollbar } from './scrollbarFix.js'
|
4 |
+
import { iOSfix } from './iosFix.js'
|
5 |
+
import { IEfix } from './ieFix.js'
|
6 |
+
import { setAriaHidden } from './aria.js'
|
7 |
+
import globalState from '../globalState.js'
|
8 |
+
|
9 |
+
export const SHOW_CLASS_TIMEOUT = 10
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Open popup, add necessary classes and styles, fix scrollbar
|
13 |
+
*
|
14 |
+
* @param params
|
15 |
+
*/
|
16 |
+
export const openPopup = (params) => {
|
17 |
+
const container = dom.getContainer()
|
18 |
+
const popup = dom.getPopup()
|
19 |
+
|
20 |
+
if (typeof params.willOpen === 'function') {
|
21 |
+
params.willOpen(popup)
|
22 |
+
} else if (typeof params.onBeforeOpen === 'function') {
|
23 |
+
params.onBeforeOpen(popup) // @deprecated
|
24 |
+
}
|
25 |
+
|
26 |
+
const bodyStyles = window.getComputedStyle(document.body)
|
27 |
+
const initialBodyOverflow = bodyStyles.overflowY
|
28 |
+
addClasses(container, popup, params)
|
29 |
+
|
30 |
+
// scrolling is 'hidden' until animation is done, after that 'auto'
|
31 |
+
setTimeout(() => {
|
32 |
+
setScrollingVisibility(container, popup)
|
33 |
+
}, SHOW_CLASS_TIMEOUT)
|
34 |
+
|
35 |
+
if (dom.isModal()) {
|
36 |
+
fixScrollContainer(container, params.scrollbarPadding, initialBodyOverflow)
|
37 |
+
setAriaHidden()
|
38 |
+
}
|
39 |
+
|
40 |
+
if (!dom.isToast() && !globalState.previousActiveElement) {
|
41 |
+
globalState.previousActiveElement = document.activeElement
|
42 |
+
}
|
43 |
+
|
44 |
+
runDidOpen(popup, params)
|
45 |
+
|
46 |
+
dom.removeClass(container, swalClasses['no-transition'])
|
47 |
+
}
|
48 |
+
|
49 |
+
const runDidOpen = (popup, params) => {
|
50 |
+
if (typeof params.didOpen === 'function') {
|
51 |
+
setTimeout(() => params.didOpen(popup))
|
52 |
+
} else if (typeof params.onOpen === 'function') {
|
53 |
+
setTimeout(() => params.onOpen(popup)) // @deprecated
|
54 |
+
}
|
55 |
+
}
|
56 |
+
|
57 |
+
const swalOpenAnimationFinished = (event) => {
|
58 |
+
const popup = dom.getPopup()
|
59 |
+
if (event.target !== popup) {
|
60 |
+
return
|
61 |
+
}
|
62 |
+
const container = dom.getContainer()
|
63 |
+
popup.removeEventListener(dom.animationEndEvent, swalOpenAnimationFinished)
|
64 |
+
container.style.overflowY = 'auto'
|
65 |
+
}
|
66 |
+
|
67 |
+
const setScrollingVisibility = (container, popup) => {
|
68 |
+
if (dom.animationEndEvent && dom.hasCssAnimation(popup)) {
|
69 |
+
container.style.overflowY = 'hidden'
|
70 |
+
popup.addEventListener(dom.animationEndEvent, swalOpenAnimationFinished)
|
71 |
+
} else {
|
72 |
+
container.style.overflowY = 'auto'
|
73 |
+
}
|
74 |
+
}
|
75 |
+
|
76 |
+
const fixScrollContainer = (container, scrollbarPadding, initialBodyOverflow) => {
|
77 |
+
iOSfix()
|
78 |
+
IEfix()
|
79 |
+
|
80 |
+
if (scrollbarPadding && initialBodyOverflow !== 'hidden') {
|
81 |
+
fixScrollbar()
|
82 |
+
}
|
83 |
+
|
84 |
+
// sweetalert2/issues/1247
|
85 |
+
setTimeout(() => {
|
86 |
+
container.scrollTop = 0
|
87 |
+
})
|
88 |
+
}
|
89 |
+
|
90 |
+
const addClasses = (container, popup, params) => {
|
91 |
+
dom.addClass(container, params.showClass.backdrop)
|
92 |
+
// the workaround with setting/unsetting opacity is needed for #2019 and 2059
|
93 |
+
popup.style.setProperty('opacity', '0', 'important')
|
94 |
+
dom.show(popup)
|
95 |
+
setTimeout(() => {
|
96 |
+
// Animate popup right after showing it
|
97 |
+
dom.addClass(popup, params.showClass.popup)
|
98 |
+
// and remove the opacity workaround
|
99 |
+
popup.style.removeProperty('opacity')
|
100 |
+
}, SHOW_CLASS_TIMEOUT) // 10ms in order to fix #2062
|
101 |
+
|
102 |
+
dom.addClass([document.documentElement, document.body], swalClasses.shown)
|
103 |
+
if (params.heightAuto && params.backdrop && !params.toast) {
|
104 |
+
dom.addClass([document.documentElement, document.body], swalClasses['height-auto'])
|
105 |
+
}
|
106 |
+
}
|
assets/sweetalert2/src/utils/params.js
ADDED
@@ -0,0 +1,219 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { warn, warnAboutDeprecation } from '../utils/utils.js'
|
2 |
+
|
3 |
+
export const defaultParams = {
|
4 |
+
title: '',
|
5 |
+
titleText: '',
|
6 |
+
text: '',
|
7 |
+
html: '',
|
8 |
+
footer: '',
|
9 |
+
icon: undefined,
|
10 |
+
iconColor: undefined,
|
11 |
+
iconHtml: undefined,
|
12 |
+
toast: false,
|
13 |
+
animation: true,
|
14 |
+
showClass: {
|
15 |
+
popup: 'swal2-show',
|
16 |
+
backdrop: 'swal2-backdrop-show',
|
17 |
+
icon: 'swal2-icon-show',
|
18 |
+
},
|
19 |
+
hideClass: {
|
20 |
+
popup: 'swal2-hide',
|
21 |
+
backdrop: 'swal2-backdrop-hide',
|
22 |
+
icon: 'swal2-icon-hide',
|
23 |
+
},
|
24 |
+
customClass: undefined,
|
25 |
+
target: 'body',
|
26 |
+
backdrop: true,
|
27 |
+
heightAuto: true,
|
28 |
+
allowOutsideClick: true,
|
29 |
+
allowEscapeKey: true,
|
30 |
+
allowEnterKey: true,
|
31 |
+
stopKeydownPropagation: true,
|
32 |
+
keydownListenerCapture: false,
|
33 |
+
showConfirmButton: true,
|
34 |
+
showDenyButton: false,
|
35 |
+
showCancelButton: false,
|
36 |
+
preConfirm: undefined,
|
37 |
+
confirmButtonText: 'OK',
|
38 |
+
confirmButtonAriaLabel: '',
|
39 |
+
confirmButtonColor: undefined,
|
40 |
+
denyButtonText: 'No',
|
41 |
+
denyButtonAriaLabel: '',
|
42 |
+
denyButtonColor: undefined,
|
43 |
+
cancelButtonText: 'Cancel',
|
44 |
+
cancelButtonAriaLabel: '',
|
45 |
+
cancelButtonColor: undefined,
|
46 |
+
buttonsStyling: true,
|
47 |
+
reverseButtons: false,
|
48 |
+
focusConfirm: true,
|
49 |
+
focusDeny: false,
|
50 |
+
focusCancel: false,
|
51 |
+
showCloseButton: false,
|
52 |
+
closeButtonHtml: '×',
|
53 |
+
closeButtonAriaLabel: 'Close this dialog',
|
54 |
+
loaderHtml: '',
|
55 |
+
showLoaderOnConfirm: false,
|
56 |
+
imageUrl: undefined,
|
57 |
+
imageWidth: undefined,
|
58 |
+
imageHeight: undefined,
|
59 |
+
imageAlt: '',
|
60 |
+
timer: undefined,
|
61 |
+
timerProgressBar: false,
|
62 |
+
width: undefined,
|
63 |
+
padding: undefined,
|
64 |
+
background: undefined,
|
65 |
+
input: undefined,
|
66 |
+
inputPlaceholder: '',
|
67 |
+
inputLabel: '',
|
68 |
+
inputValue: '',
|
69 |
+
inputOptions: {},
|
70 |
+
inputAutoTrim: true,
|
71 |
+
inputAttributes: {},
|
72 |
+
inputValidator: undefined,
|
73 |
+
returnInputValueOnDeny: false,
|
74 |
+
validationMessage: undefined,
|
75 |
+
grow: false,
|
76 |
+
position: 'center',
|
77 |
+
progressSteps: [],
|
78 |
+
currentProgressStep: undefined,
|
79 |
+
progressStepsDistance: undefined,
|
80 |
+
onBeforeOpen: undefined,
|
81 |
+
onOpen: undefined,
|
82 |
+
willOpen: undefined,
|
83 |
+
didOpen: undefined,
|
84 |
+
onRender: undefined,
|
85 |
+
didRender: undefined,
|
86 |
+
onClose: undefined,
|
87 |
+
onAfterClose: undefined,
|
88 |
+
willClose: undefined,
|
89 |
+
didClose: undefined,
|
90 |
+
onDestroy: undefined,
|
91 |
+
didDestroy: undefined,
|
92 |
+
scrollbarPadding: true
|
93 |
+
}
|
94 |
+
|
95 |
+
export const updatableParams = [
|
96 |
+
'allowEscapeKey',
|
97 |
+
'allowOutsideClick',
|
98 |
+
'background',
|
99 |
+
'buttonsStyling',
|
100 |
+
'cancelButtonAriaLabel',
|
101 |
+
'cancelButtonColor',
|
102 |
+
'cancelButtonText',
|
103 |
+
'closeButtonAriaLabel',
|
104 |
+
'closeButtonHtml',
|
105 |
+
'confirmButtonAriaLabel',
|
106 |
+
'confirmButtonColor',
|
107 |
+
'confirmButtonText',
|
108 |
+
'currentProgressStep',
|
109 |
+
'customClass',
|
110 |
+
'denyButtonAriaLabel',
|
111 |
+
'denyButtonColor',
|
112 |
+
'denyButtonText',
|
113 |
+
'didClose',
|
114 |
+
'didDestroy',
|
115 |
+
'footer',
|
116 |
+
'hideClass',
|
117 |
+
'html',
|
118 |
+
'icon',
|
119 |
+
'iconColor',
|
120 |
+
'imageAlt',
|
121 |
+
'imageHeight',
|
122 |
+
'imageUrl',
|
123 |
+
'imageWidth',
|
124 |
+
'onAfterClose',
|
125 |
+
'onClose',
|
126 |
+
'onDestroy',
|
127 |
+
'progressSteps',
|
128 |
+
'reverseButtons',
|
129 |
+
'showCancelButton',
|
130 |
+
'showCloseButton',
|
131 |
+
'showConfirmButton',
|
132 |
+
'showDenyButton',
|
133 |
+
'text',
|
134 |
+
'title',
|
135 |
+
'titleText',
|
136 |
+
'willClose',
|
137 |
+
]
|
138 |
+
|
139 |
+
export const deprecatedParams = {
|
140 |
+
animation: 'showClass" and "hideClass',
|
141 |
+
onBeforeOpen: 'willOpen',
|
142 |
+
onOpen: 'didOpen',
|
143 |
+
onRender: 'didRender',
|
144 |
+
onClose: 'willClose',
|
145 |
+
onAfterClose: 'didClose',
|
146 |
+
onDestroy: 'didDestroy',
|
147 |
+
}
|
148 |
+
|
149 |
+
const toastIncompatibleParams = [
|
150 |
+
'allowOutsideClick',
|
151 |
+
'allowEnterKey',
|
152 |
+
'backdrop',
|
153 |
+
'focusConfirm',
|
154 |
+
'focusDeny',
|
155 |
+
'focusCancel',
|
156 |
+
'heightAuto',
|
157 |
+
'keydownListenerCapture'
|
158 |
+
]
|
159 |
+
|
160 |
+
/**
|
161 |
+
* Is valid parameter
|
162 |
+
* @param {String} paramName
|
163 |
+
*/
|
164 |
+
export const isValidParameter = (paramName) => {
|
165 |
+
return Object.prototype.hasOwnProperty.call(defaultParams, paramName)
|
166 |
+
}
|
167 |
+
|
168 |
+
/**
|
169 |
+
* Is valid parameter for Swal.update() method
|
170 |
+
* @param {String} paramName
|
171 |
+
*/
|
172 |
+
export const isUpdatableParameter = (paramName) => {
|
173 |
+
return updatableParams.indexOf(paramName) !== -1
|
174 |
+
}
|
175 |
+
|
176 |
+
/**
|
177 |
+
* Is deprecated parameter
|
178 |
+
* @param {String} paramName
|
179 |
+
*/
|
180 |
+
export const isDeprecatedParameter = (paramName) => {
|
181 |
+
return deprecatedParams[paramName]
|
182 |
+
}
|
183 |
+
|
184 |
+
const checkIfParamIsValid = (param) => {
|
185 |
+
if (!isValidParameter(param)) {
|
186 |
+
warn(`Unknown parameter "${param}"`)
|
187 |
+
}
|
188 |
+
}
|
189 |
+
|
190 |
+
const checkIfToastParamIsValid = (param) => {
|
191 |
+
if (toastIncompatibleParams.includes(param)) {
|
192 |
+
warn(`The parameter "${param}" is incompatible with toasts`)
|
193 |
+
}
|
194 |
+
}
|
195 |
+
|
196 |
+
const checkIfParamIsDeprecated = (param) => {
|
197 |
+
if (isDeprecatedParameter(param)) {
|
198 |
+
warnAboutDeprecation(param, isDeprecatedParameter(param))
|
199 |
+
}
|
200 |
+
}
|
201 |
+
|
202 |
+
/**
|
203 |
+
* Show relevant warnings for given params
|
204 |
+
*
|
205 |
+
* @param params
|
206 |
+
*/
|
207 |
+
export const showWarningsForParams = (params) => {
|
208 |
+
for (const param in params) {
|
209 |
+
checkIfParamIsValid(param)
|
210 |
+
|
211 |
+
if (params.toast) {
|
212 |
+
checkIfToastParamIsValid(param)
|
213 |
+
}
|
214 |
+
|
215 |
+
checkIfParamIsDeprecated(param)
|
216 |
+
}
|
217 |
+
}
|
218 |
+
|
219 |
+
export default defaultParams
|
assets/sweetalert2/src/utils/scrollbarFix.js
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import * as dom from './dom/index.js'
|
2 |
+
|
3 |
+
export const fixScrollbar = () => {
|
4 |
+
// for queues, do not do this more than once
|
5 |
+
if (dom.states.previousBodyPadding !== null) {
|
6 |
+
return
|
7 |
+
}
|
8 |
+
// if the body has overflow
|
9 |
+
if (document.body.scrollHeight > window.innerHeight) {
|
10 |
+
// add padding so the content doesn't shift after removal of scrollbar
|
11 |
+
dom.states.previousBodyPadding = parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right'))
|
12 |
+
document.body.style.paddingRight = `${dom.states.previousBodyPadding + dom.measureScrollbar()}px`
|
13 |
+
}
|
14 |
+
}
|
15 |
+
|
16 |
+
export const undoScrollbar = () => {
|
17 |
+
if (dom.states.previousBodyPadding !== null) {
|
18 |
+
document.body.style.paddingRight = `${dom.states.previousBodyPadding}px`
|
19 |
+
dom.states.previousBodyPadding = null
|
20 |
+
}
|
21 |
+
}
|
assets/sweetalert2/src/utils/setParameters.js
ADDED
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { warn, callIfFunction } from './utils.js'
|
2 |
+
import * as dom from './dom/index.js'
|
3 |
+
import defaultInputValidators from './defaultInputValidators.js'
|
4 |
+
|
5 |
+
function setDefaultInputValidators (params) {
|
6 |
+
// Use default `inputValidator` for supported input types if not provided
|
7 |
+
if (!params.inputValidator) {
|
8 |
+
Object.keys(defaultInputValidators).forEach((key) => {
|
9 |
+
if (params.input === key) {
|
10 |
+
params.inputValidator = defaultInputValidators[key]
|
11 |
+
}
|
12 |
+
})
|
13 |
+
}
|
14 |
+
}
|
15 |
+
|
16 |
+
function validateCustomTargetElement (params) {
|
17 |
+
// Determine if the custom target element is valid
|
18 |
+
if (
|
19 |
+
!params.target ||
|
20 |
+
(typeof params.target === 'string' && !document.querySelector(params.target)) ||
|
21 |
+
(typeof params.target !== 'string' && !params.target.appendChild)
|
22 |
+
) {
|
23 |
+
warn('Target parameter is not valid, defaulting to "body"')
|
24 |
+
params.target = 'body'
|
25 |
+
}
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Set type, text and actions on popup
|
30 |
+
*
|
31 |
+
* @param params
|
32 |
+
* @returns {boolean}
|
33 |
+
*/
|
34 |
+
export default function setParameters (params) {
|
35 |
+
setDefaultInputValidators(params)
|
36 |
+
|
37 |
+
// showLoaderOnConfirm && preConfirm
|
38 |
+
if (params.showLoaderOnConfirm && !params.preConfirm) {
|
39 |
+
warn(
|
40 |
+
'showLoaderOnConfirm is set to true, but preConfirm is not defined.\n' +
|
41 |
+
'showLoaderOnConfirm should be used together with preConfirm, see usage example:\n' +
|
42 |
+
'https://sweetalert2.github.io/#ajax-request'
|
43 |
+
)
|
44 |
+
}
|
45 |
+
|
46 |
+
// params.animation will be actually used in renderPopup.js
|
47 |
+
// but in case when params.animation is a function, we need to call that function
|
48 |
+
// before popup (re)initialization, so it'll be possible to check Swal.isVisible()
|
49 |
+
// inside the params.animation function
|
50 |
+
params.animation = callIfFunction(params.animation)
|
51 |
+
|
52 |
+
validateCustomTargetElement(params)
|
53 |
+
|
54 |
+
// Replace newlines with <br> in title
|
55 |
+
if (typeof params.title === 'string') {
|
56 |
+
params.title = params.title.split('\n').join('<br />')
|
57 |
+
}
|
58 |
+
|
59 |
+
dom.init(params)
|
60 |
+
}
|
assets/sweetalert2/src/utils/utils.js
ADDED
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
export const consolePrefix = 'SweetAlert2:'
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Filter the unique values into a new array
|
5 |
+
* @param arr
|
6 |
+
*/
|
7 |
+
export const uniqueArray = (arr) => {
|
8 |
+
const result = []
|
9 |
+
for (let i = 0; i < arr.length; i++) {
|
10 |
+
if (result.indexOf(arr[i]) === -1) {
|
11 |
+
result.push(arr[i])
|
12 |
+
}
|
13 |
+
}
|
14 |
+
return result
|
15 |
+
}
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Capitalize the first letter of a string
|
19 |
+
* @param str
|
20 |
+
*/
|
21 |
+
export const capitalizeFirstLetter = (str) => str.charAt(0).toUpperCase() + str.slice(1)
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Returns the array of object values (Object.values isn't supported in IE11)
|
25 |
+
* @param obj
|
26 |
+
*/
|
27 |
+
export const objectValues = (obj) => Object.keys(obj).map(key => obj[key])
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Convert NodeList to Array
|
31 |
+
* @param nodeList
|
32 |
+
*/
|
33 |
+
export const toArray = (nodeList) => Array.prototype.slice.call(nodeList)
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Standardise console warnings
|
37 |
+
* @param message
|
38 |
+
*/
|
39 |
+
export const warn = (message) => {
|
40 |
+
console.warn(`${consolePrefix} ${message}`)
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Standardise console errors
|
45 |
+
* @param message
|
46 |
+
*/
|
47 |
+
export const error = (message) => {
|
48 |
+
console.error(`${consolePrefix} ${message}`)
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Private global state for `warnOnce`
|
53 |
+
* @type {Array}
|
54 |
+
* @private
|
55 |
+
*/
|
56 |
+
const previousWarnOnceMessages = []
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Show a console warning, but only if it hasn't already been shown
|
60 |
+
* @param message
|
61 |
+
*/
|
62 |
+
export const warnOnce = (message) => {
|
63 |
+
if (!previousWarnOnceMessages.includes(message)) {
|
64 |
+
previousWarnOnceMessages.push(message)
|
65 |
+
warn(message)
|
66 |
+
}
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Show a one-time console warning about deprecated params/methods
|
71 |
+
*/
|
72 |
+
export const warnAboutDeprecation = (deprecatedParam, useInstead) => {
|
73 |
+
warnOnce(`"${deprecatedParam}" is deprecated and will be removed in the next major release. Please use "${useInstead}" instead.`)
|
74 |
+
}
|
75 |
+
|
76 |
+
/**
|
77 |
+
* If `arg` is a function, call it (with no arguments or context) and return the result.
|
78 |
+
* Otherwise, just pass the value through
|
79 |
+
* @param arg
|
80 |
+
*/
|
81 |
+
export const callIfFunction = (arg) => typeof arg === 'function' ? arg() : arg
|
82 |
+
|
83 |
+
export const hasToPromiseFn = (arg) => arg && typeof arg.toPromise === 'function'
|
84 |
+
|
85 |
+
export const asPromise = (arg) => hasToPromiseFn(arg) ? arg.toPromise() : Promise.resolve(arg)
|
86 |
+
|
87 |
+
export const isPromise = (arg) => arg && Promise.resolve(arg) === arg
|
assets/sweetalert2/src/variables.scss
ADDED
@@ -0,0 +1,224 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
$swal2-white: #fff !default;
|
2 |
+
$swal2-black: #000 !default;
|
3 |
+
$swal2-outline-color: rgba(50, 100, 150, .4) !default;
|
4 |
+
|
5 |
+
// CONTAINER
|
6 |
+
$swal2-container-padding: .625em !default;
|
7 |
+
|
8 |
+
// BOX MODEL
|
9 |
+
$swal2-width: 32em !default;
|
10 |
+
$swal2-padding: 1.25em !default;
|
11 |
+
$swal2-border: none !default;
|
12 |
+
$swal2-border-radius: .3125em !default;
|
13 |
+
$swal2-box-shadow: #d9d9d9 !default;
|
14 |
+
|
15 |
+
// ANIMATIONS
|
16 |
+
$swal2-show-animation: swal2-show .3s !default;
|
17 |
+
$swal2-hide-animation: swal2-hide .15s forwards !default;
|
18 |
+
|
19 |
+
// BACKGROUND
|
20 |
+
$swal2-background: $swal2-white !default;
|
21 |
+
|
22 |
+
// TYPOGRAPHY
|
23 |
+
$swal2-font: inherit !default;
|
24 |
+
$swal2-font-size: 1rem !default;
|
25 |
+
|
26 |
+
// BACKDROP
|
27 |
+
$swal2-backdrop: rgba($swal2-black, .4) !default;
|
28 |
+
$swal2-backdrop-transition: background-color .1s !default;
|
29 |
+
|
30 |
+
// HEADER
|
31 |
+
$swal2-header-padding: 0 1.8em !default;
|
32 |
+
|
33 |
+
// ICONS
|
34 |
+
$swal2-icon-size: 5em !default;
|
35 |
+
$swal2-icon-animations: true !default;
|
36 |
+
$swal2-icon-margin: 1.25em auto 1.875em !default;
|
37 |
+
$swal2-icon-zoom: null !default;
|
38 |
+
$swal2-success: #a5dc86 !default;
|
39 |
+
$swal2-success-border: rgba($swal2-success, .3) !default;
|
40 |
+
$swal2-error: #f27474 !default;
|
41 |
+
$swal2-warning: #f8bb86 !default;
|
42 |
+
$swal2-info: #3fc3ee !default;
|
43 |
+
$swal2-question: #87adbd !default;
|
44 |
+
$swal2-icon-font-family: inherit !default;
|
45 |
+
|
46 |
+
// IMAGE
|
47 |
+
$swal2-image-margin: 1.25em auto !default;
|
48 |
+
|
49 |
+
// TITLE
|
50 |
+
$swal2-title-margin: 0 0 .4em !default;
|
51 |
+
$swal2-title-color: lighten($swal2-black, 35) !default;
|
52 |
+
$swal2-title-font-size: 1.875em !default;
|
53 |
+
|
54 |
+
// CONTENT
|
55 |
+
$swal2-content-justify-content: center !default;
|
56 |
+
$swal2-content-margin: 0 !default;
|
57 |
+
$swal2-content-padding: 0 1.6em !default;
|
58 |
+
$swal2-content-color: lighten($swal2-black, 33) !default;
|
59 |
+
$swal2-content-font-size: 1.125em !default;
|
60 |
+
$swal2-content-font-weight: normal !default;
|
61 |
+
$swal2-content-line-height: normal !default;
|
62 |
+
$swal2-content-text-align: center !default;
|
63 |
+
$swal2-content-word-wrap: break-word !default;
|
64 |
+
|
65 |
+
// INPUT
|
66 |
+
$swal2-input-margin: 1em auto !default;
|
67 |
+
$swal2-input-width: 100% !default;
|
68 |
+
$swal2-input-height: 2.625em !default;
|
69 |
+
$swal2-input-padding: 0 .75em !default;
|
70 |
+
$swal2-input-border: 1px solid lighten($swal2-black, 85) !default;
|
71 |
+
$swal2-input-border-radius: .1875em !default;
|
72 |
+
$swal2-input-box-shadow: inset 0 1px 1px rgba($swal2-black, .06) !default;
|
73 |
+
$swal2-input-focus-border: 1px solid #b4dbed !default;
|
74 |
+
$swal2-input-focus-outline: none !default;
|
75 |
+
$swal2-input-focus-box-shadow: 0 0 3px #c4e6f5 !default;
|
76 |
+
$swal2-input-font-size: 1.125em !default;
|
77 |
+
$swal2-input-background: inherit !default;
|
78 |
+
$swal2-input-color: inherit !default;
|
79 |
+
$swal2-input-transition: border-color .3s, box-shadow .3s !default;
|
80 |
+
|
81 |
+
// TEXTAREA SPECIFIC VARIABLES
|
82 |
+
$swal2-textarea-height: 6.75em !default;
|
83 |
+
$swal2-textarea-padding: .75em !default;
|
84 |
+
|
85 |
+
// INPUT LABEL
|
86 |
+
$swal2-input-label-margin: 1em auto !default;
|
87 |
+
$swal2-input-label-justify-content: center !default;
|
88 |
+
|
89 |
+
// VALIDATION MESSAGE
|
90 |
+
$swal2-validation-message-justify-content: center !default;
|
91 |
+
$swal2-validation-message-margin: 0 -2.7em !default;
|
92 |
+
$swal2-validation-message-padding: .625em !default;
|
93 |
+
$swal2-validation-message-background: lighten($swal2-black, 94) !default;
|
94 |
+
$swal2-validation-message-color: lighten($swal2-black, 40) !default;
|
95 |
+
$swal2-validation-message-font-size: 1em !default;
|
96 |
+
$swal2-validation-message-font-weight: 300 !default;
|
97 |
+
$swal2-validation-message-icon-background: $swal2-error !default;
|
98 |
+
$swal2-validation-message-icon-color: $swal2-white !default;
|
99 |
+
$swal2-validation-message-icon-zoom: null !default;
|
100 |
+
|
101 |
+
// PROGRESS STEPS
|
102 |
+
$swal2-progress-steps-flex-wrap: wrap !default;
|
103 |
+
$swal2-progress-steps-align-items: center !default;
|
104 |
+
$swal2-progress-steps-max-width: 100% !default;
|
105 |
+
$swal2-progress-steps-background: inherit !default;
|
106 |
+
$swal2-progress-steps-margin: 0 0 1.25em !default;
|
107 |
+
$swal2-progress-steps-padding: 0 !default;
|
108 |
+
$swal2-progress-steps-font-weight: 600 !default;
|
109 |
+
$swal2-progress-steps-distance: 2.5em !default;
|
110 |
+
$swal2-progress-step-width: 2em;
|
111 |
+
$swal2-progress-step-height: 2em;
|
112 |
+
$swal2-progress-step-border-radius: 2em;
|
113 |
+
$swal2-progress-step-background: #add8e6 !default;
|
114 |
+
$swal2-progress-step-color: $swal2-white !default;
|
115 |
+
$swal2-active-step-background: #2778c4 !default;
|
116 |
+
$swal2-active-step-color: $swal2-white !default;
|
117 |
+
|
118 |
+
// FOOTER
|
119 |
+
$swal2-footer-margin: 1.25em 0 0 !default;
|
120 |
+
$swal2-footer-padding: 1em 0 0 !default;
|
121 |
+
$swal2-footer-border-color: #eee !default;
|
122 |
+
$swal2-footer-color: lighten($swal2-black, 33) !default;
|
123 |
+
$swal2-footer-font-size: 1em !default;
|
124 |
+
|
125 |
+
// TIMER POGRESS BAR
|
126 |
+
$swal2-timer-progress-bar-height: .25em;
|
127 |
+
$swal2-timer-progress-bar-background: rgba($swal2-black, .2) !default;
|
128 |
+
|
129 |
+
// CLOSE BUTTON
|
130 |
+
$swal2-close-button-align-items: center !default;
|
131 |
+
$swal2-close-button-justify-content: center !default;
|
132 |
+
$swal2-close-button-width: 1.2em !default;
|
133 |
+
$swal2-close-button-height: 1.2em !default;
|
134 |
+
$swal2-close-button-line-height: 1.2 !default;
|
135 |
+
$swal2-close-button-position: absolute !default;
|
136 |
+
$swal2-close-button-gap: 0 !default;
|
137 |
+
$swal2-close-button-transition: color .1s ease-out !default;
|
138 |
+
$swal2-close-button-border: none !default;
|
139 |
+
$swal2-close-button-border-radius: 0 !default;
|
140 |
+
$swal2-close-button-outline: null !default;
|
141 |
+
$swal2-close-button-background: transparent !default;
|
142 |
+
$swal2-close-button-color: lighten($swal2-black, 80) !default;
|
143 |
+
$swal2-close-button-font-family: serif !default;
|
144 |
+
$swal2-close-button-font-size: 2.5em !default;
|
145 |
+
|
146 |
+
// CLOSE BUTTON:HOVER
|
147 |
+
$swal2-close-button-hover-transform: none !default;
|
148 |
+
$swal2-close-button-hover-color: $swal2-error !default;
|
149 |
+
$swal2-close-button-hover-background: transparent !default;
|
150 |
+
|
151 |
+
// ACTIONS
|
152 |
+
$swal2-actions-flex-wrap: wrap !default;
|
153 |
+
$swal2-actions-align-items: center !default;
|
154 |
+
$swal2-actions-justify-content: center !default;
|
155 |
+
$swal2-actions-width: 100% !default;
|
156 |
+
$swal2-actions-margin: 1.25em auto 0 !default;
|
157 |
+
$swal2-actions-padding: 0 1.6em !default;
|
158 |
+
|
159 |
+
// CONFIRM BUTTON
|
160 |
+
$swal2-confirm-button-order: null !default;
|
161 |
+
$swal2-confirm-button-border: 0 !default;
|
162 |
+
$swal2-confirm-button-border-radius: .25em !default;
|
163 |
+
$swal2-confirm-button-background-color: #2778c4 !default;
|
164 |
+
$swal2-confirm-button-color: $swal2-white !default;
|
165 |
+
$swal2-confirm-button-font-size: 1.0625em !default;
|
166 |
+
|
167 |
+
// DENY BUTTON
|
168 |
+
$swal2-deny-button-order: null !default;
|
169 |
+
$swal2-deny-button-border: 0 !default;
|
170 |
+
$swal2-deny-button-border-radius: .25em !default;
|
171 |
+
$swal2-deny-button-background-color: #d14529 !default;
|
172 |
+
$swal2-deny-button-color: $swal2-white !default;
|
173 |
+
$swal2-deny-button-font-size: 1.0625em !default;
|
174 |
+
|
175 |
+
// CANCEL BUTTON
|
176 |
+
$swal2-cancel-button-order: null !default;
|
177 |
+
$swal2-cancel-button-border: 0 !default;
|
178 |
+
$swal2-cancel-button-border-radius: .25em !default;
|
179 |
+
$swal2-cancel-button-background-color: #757575 !default;
|
180 |
+
$swal2-cancel-button-color: $swal2-white !default;
|
181 |
+
$swal2-cancel-button-font-size: 1.0625em !default;
|
182 |
+
|
183 |
+
// COMMON VARIABLES FOR CONFIRM AND CANCEL BUTTONS
|
184 |
+
$swal2-button-darken-hover: rgba($swal2-black, .1) !default;
|
185 |
+
$swal2-button-darken-active: rgba($swal2-black, .2) !default;
|
186 |
+
$swal2-button-focus-outline: none !default;
|
187 |
+
$swal2-button-focus-background-color: null !default;
|
188 |
+
$swal2-button-focus-box-shadow: 0 0 0 1px $swal2-background, 0 0 0 3px $swal2-outline-color !default;
|
189 |
+
|
190 |
+
// LOADER
|
191 |
+
$swal2-loader-align-items: center !default;
|
192 |
+
$swal2-loader-justify-content: center !default;
|
193 |
+
$swal2-loader-width: 2.2em !default;
|
194 |
+
$swal2-loader-height: 2.2em !default;
|
195 |
+
$swal2-loader-margin: 0 1.875em !default;
|
196 |
+
$swal2-loader-animation: swal2-rotate-loading 1.5s linear 0s infinite normal !default;
|
197 |
+
$swal2-loader-border-width: .25em !default;
|
198 |
+
$swal2-loader-border-style: solid !default;
|
199 |
+
$swal2-loader-border-radius: 100% !default;
|
200 |
+
$swal2-loader-border-color: #2778c4 transparent #2778c4 transparent !default;
|
201 |
+
|
202 |
+
// TOASTS
|
203 |
+
$swal2-toast-show-animation: swal2-toast-show .5s !default;
|
204 |
+
$swal2-toast-hide-animation: swal2-toast-hide .1s forwards !default;
|
205 |
+
$swal2-toast-border: none !default;
|
206 |
+
$swal2-toast-box-shadow: 0 0 .625em #d9d9d9 !default;
|
207 |
+
$swal2-toast-background: $swal2-white !default;
|
208 |
+
$swal2-toast-close-button-width: .8em !default;
|
209 |
+
$swal2-toast-close-button-height: .8em !default;
|
210 |
+
$swal2-toast-close-button-line-height: .8 !default;
|
211 |
+
$swal2-toast-width: auto !default;
|
212 |
+
$swal2-toast-padding: .625em !default;
|
213 |
+
$swal2-toast-header-padding: 0 !default;
|
214 |
+
$swal2-toast-title-margin: 0 .6em !default;
|
215 |
+
$swal2-toast-title-font-size: 1em !default;
|
216 |
+
$swal2-toast-content-padding: 0 !default;
|
217 |
+
$swal2-toast-content-font-size: 1em !default;
|
218 |
+
$swal2-toast-input-font-size: 1em !default;
|
219 |
+
$swal2-toast-validation-font-size: 1em !default;
|
220 |
+
$swal2-toast-buttons-font-size: 1em !default;
|
221 |
+
$swal2-toast-button-focus-box-shadow: 0 0 0 1px $swal2-background, 0 0 0 3px $swal2-outline-color !default;
|
222 |
+
$swal2-toast-footer-margin: .5em 0 0 !default;
|
223 |
+
$swal2-toast-footer-padding: .5em 0 0 !default;
|
224 |
+
$swal2-toast-footer-font-size: .8em !default;
|
assets/sweetalert2/sweetalert2.d.ts
ADDED
@@ -0,0 +1,1152 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
declare module 'sweetalert2' {
|
2 |
+
/**
|
3 |
+
* A namespace inside the default function, containing utility function for controlling the currently-displayed
|
4 |
+
* popup.
|
5 |
+
*
|
6 |
+
* Example:
|
7 |
+
* ```
|
8 |
+
* Swal.fire('Hey user!', 'You are the rockstar!', 'info');
|
9 |
+
*
|
10 |
+
* Swal.update({
|
11 |
+
* icon: 'success'
|
12 |
+
* })
|
13 |
+
* ```
|
14 |
+
*/
|
15 |
+
namespace Swal {
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Function to display a SweetAlert2 popup, with an object of options, all being optional.
|
19 |
+
* See the `SweetAlertOptions` interface for the list of accepted fields and values.
|
20 |
+
*
|
21 |
+
* Example:
|
22 |
+
* ```
|
23 |
+
* Swal.fire({
|
24 |
+
* title: 'Auto close alert!',
|
25 |
+
* text: 'I will close in 2 seconds.',
|
26 |
+
* timer: 2000
|
27 |
+
* })
|
28 |
+
* ```
|
29 |
+
*/
|
30 |
+
function fire<T = any>(options: SweetAlertOptions<T>): Promise<SweetAlertResult<Awaited<T>>>;
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Function to display a simple SweetAlert2 popup.
|
34 |
+
*
|
35 |
+
* Example:
|
36 |
+
* ```
|
37 |
+
* Swal.fire('The Internet?', 'That thing is still around?', 'question');
|
38 |
+
* ```
|
39 |
+
*/
|
40 |
+
function fire<T = any>(title?: string, html?: string, icon?: SweetAlertIcon): Promise<SweetAlertResult<Awaited<T>>>;
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Reuse configuration by creating a `Swal` instance.
|
44 |
+
*
|
45 |
+
* Example:
|
46 |
+
* ```
|
47 |
+
* const Toast = Swal.mixin({
|
48 |
+
* toast: true,
|
49 |
+
* position: 'top-end',
|
50 |
+
* timer: 3000,
|
51 |
+
* timerProgressBar: true
|
52 |
+
* })
|
53 |
+
* Toast.fire('Something interesting happened', '', 'info')
|
54 |
+
* ```
|
55 |
+
*
|
56 |
+
* @param options the default options to set for this instance.
|
57 |
+
*/
|
58 |
+
function mixin(options: SweetAlertOptions): typeof Swal;
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Determines if a popup is shown.
|
62 |
+
*/
|
63 |
+
function isVisible(): boolean;
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Updates popup options.
|
67 |
+
* See the `SweetAlertOptions` interface for the list of accepted fields and values.
|
68 |
+
*
|
69 |
+
* Example:
|
70 |
+
* ```
|
71 |
+
* Swal.update({
|
72 |
+
* icon: 'error'
|
73 |
+
* })
|
74 |
+
* ```
|
75 |
+
*/
|
76 |
+
function update(options: Pick<SweetAlertOptions, SweetAlertUpdatableParameters>): void;
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Closes the currently open SweetAlert2 popup programmatically.
|
80 |
+
*
|
81 |
+
* @param result The promise originally returned by `Swal.fire()` will be resolved with this value.
|
82 |
+
* If no object is given, the promise is resolved with an empty `SweetAlertResult` object.
|
83 |
+
*/
|
84 |
+
function close(result?: SweetAlertResult): void;
|
85 |
+
|
86 |
+
/**
|
87 |
+
* Gets the popup.
|
88 |
+
*/
|
89 |
+
function getPopup(): HTMLElement | null;
|
90 |
+
|
91 |
+
/**
|
92 |
+
* Gets the popup title.
|
93 |
+
*/
|
94 |
+
function getTitle(): HTMLElement | null;
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Gets the popup header.
|
98 |
+
*/
|
99 |
+
function getHeader(): HTMLElement | null;
|
100 |
+
|
101 |
+
/**
|
102 |
+
* Gets progress steps.
|
103 |
+
*/
|
104 |
+
function getProgressSteps(): HTMLElement | null;
|
105 |
+
|
106 |
+
/**
|
107 |
+
* Gets the popup content.
|
108 |
+
*/
|
109 |
+
function getContent(): HTMLElement | null;
|
110 |
+
|
111 |
+
/**
|
112 |
+
* Gets the DOM element where the `html`/`text` parameter is rendered to.
|
113 |
+
*/
|
114 |
+
function getHtmlContainer(): HTMLElement | null;
|
115 |
+
|
116 |
+
/**
|
117 |
+
* Gets the image.
|
118 |
+
*/
|
119 |
+
function getImage(): HTMLElement | null;
|
120 |
+
|
121 |
+
/**
|
122 |
+
* Gets the close button.
|
123 |
+
*/
|
124 |
+
function getCloseButton(): HTMLElement | null;
|
125 |
+
|
126 |
+
/**
|
127 |
+
* Gets the current visible icon.
|
128 |
+
*/
|
129 |
+
function getIcon(): HTMLElement | null;
|
130 |
+
|
131 |
+
/**
|
132 |
+
* Gets all icons. The current visible icon will have `style="display: flex"`,
|
133 |
+
* all other will be hidden by `style="display: none"`.
|
134 |
+
*/
|
135 |
+
function getIcons(): readonly HTMLElement[];
|
136 |
+
|
137 |
+
/**
|
138 |
+
* Gets the "Confirm" button.
|
139 |
+
*/
|
140 |
+
function getConfirmButton(): HTMLElement | null;
|
141 |
+
|
142 |
+
/**
|
143 |
+
* Gets the "Deny" button.
|
144 |
+
*/
|
145 |
+
function getDenyButton(): HTMLElement | null;
|
146 |
+
|
147 |
+
/**
|
148 |
+
* Gets the "Cancel" button.
|
149 |
+
*/
|
150 |
+
function getCancelButton(): HTMLElement | null;
|
151 |
+
|
152 |
+
/**
|
153 |
+
* Gets actions (buttons) wrapper.
|
154 |
+
*/
|
155 |
+
function getActions(): HTMLElement | null;
|
156 |
+
|
157 |
+
/**
|
158 |
+
* Gets the popup footer.
|
159 |
+
*/
|
160 |
+
function getFooter(): HTMLElement | null;
|
161 |
+
|
162 |
+
/**
|
163 |
+
* Gets the timer progress bar (see the `timerProgressBar` param).
|
164 |
+
*/
|
165 |
+
function getTimerProgressBar(): HTMLElement | null;
|
166 |
+
|
167 |
+
/**
|
168 |
+
* Gets all focusable elements in the popup.
|
169 |
+
*/
|
170 |
+
function getFocusableElements(): readonly HTMLElement[];
|
171 |
+
|
172 |
+
/**
|
173 |
+
* Enables "Confirm" and "Cancel" buttons.
|
174 |
+
*/
|
175 |
+
function enableButtons(): void;
|
176 |
+
|
177 |
+
/**
|
178 |
+
* Disables "Confirm" and "Cancel" buttons.
|
179 |
+
*/
|
180 |
+
function disableButtons(): void;
|
181 |
+
|
182 |
+
/**
|
183 |
+
* Disables buttons and show loader. This is useful with AJAX requests.
|
184 |
+
*/
|
185 |
+
function showLoading(): void;
|
186 |
+
|
187 |
+
/**
|
188 |
+
* Enables buttons and hide loader.
|
189 |
+
*/
|
190 |
+
function hideLoading(): void;
|
191 |
+
|
192 |
+
/**
|
193 |
+
* Determines if popup is in the loading state.
|
194 |
+
*/
|
195 |
+
function isLoading(): boolean;
|
196 |
+
|
197 |
+
/**
|
198 |
+
* Clicks the "Confirm" button programmatically.
|
199 |
+
*/
|
200 |
+
function clickConfirm(): void;
|
201 |
+
|
202 |
+
/**
|
203 |
+
* Clicks the "Deny" button programmatically.
|
204 |
+
*/
|
205 |
+
function clickDeny(): void;
|
206 |
+
|
207 |
+
/**
|
208 |
+
* Clicks the "Cancel" button programmatically.
|
209 |
+
*/
|
210 |
+
function clickCancel(): void;
|
211 |
+
|
212 |
+
/**
|
213 |
+
* Shows a validation message.
|
214 |
+
*
|
215 |
+
* @param validationMessage The validation message.
|
216 |
+
*/
|
217 |
+
function showValidationMessage(validationMessage: string): void;
|
218 |
+
|
219 |
+
/**
|
220 |
+
* Hides validation message.
|
221 |
+
*/
|
222 |
+
function resetValidationMessage(): void;
|
223 |
+
|
224 |
+
/**
|
225 |
+
* Gets the input DOM node, this method works with input parameter.
|
226 |
+
*/
|
227 |
+
function getInput(): HTMLInputElement | null;
|
228 |
+
|
229 |
+
/**
|
230 |
+
* Disables the popup input. A disabled input element is unusable and un-clickable.
|
231 |
+
*/
|
232 |
+
function disableInput(): void;
|
233 |
+
|
234 |
+
/**
|
235 |
+
* Enables the popup input.
|
236 |
+
*/
|
237 |
+
function enableInput(): void;
|
238 |
+
|
239 |
+
/**
|
240 |
+
* Gets the validation message container.
|
241 |
+
*/
|
242 |
+
function getValidationMessage(): HTMLElement | null;
|
243 |
+
|
244 |
+
/**
|
245 |
+
* If `timer` parameter is set, returns number of milliseconds of timer remained.
|
246 |
+
* Otherwise, returns undefined.
|
247 |
+
*/
|
248 |
+
function getTimerLeft(): number | undefined;
|
249 |
+
|
250 |
+
/**
|
251 |
+
* Stop timer. Returns number of milliseconds of timer remained.
|
252 |
+
* If `timer` parameter isn't set, returns `undefined`.
|
253 |
+
*/
|
254 |
+
function stopTimer(): number | undefined;
|
255 |
+
|
256 |
+
/**
|
257 |
+
* Resume timer. Returns number of milliseconds of timer remained.
|
258 |
+
* If `timer` parameter isn't set, returns `undefined`.
|
259 |
+
*/
|
260 |
+
function resumeTimer(): number | undefined;
|
261 |
+
|
262 |
+
/**
|
263 |
+
* Toggle timer. Returns number of milliseconds of timer remained.
|
264 |
+
* If `timer` parameter isn't set, returns `undefined`.
|
265 |
+
*/
|
266 |
+
function toggleTimer(): number | undefined;
|
267 |
+
|
268 |
+
/**
|
269 |
+
* Check if timer is running. Returns true if timer is running,
|
270 |
+
* and false is timer is paused / stopped.
|
271 |
+
* If `timer` parameter isn't set, returns `undefined`.
|
272 |
+
*/
|
273 |
+
function isTimerRunning(): boolean | undefined;
|
274 |
+
|
275 |
+
/**
|
276 |
+
* Increase timer. Returns number of milliseconds of an updated timer.
|
277 |
+
* If `timer` parameter isn't set, returns `undefined`.
|
278 |
+
*
|
279 |
+
* @param n The number of milliseconds to add to the currect timer
|
280 |
+
*/
|
281 |
+
function increaseTimer(n: number): number | undefined;
|
282 |
+
|
283 |
+
/**
|
284 |
+
* Provide an array of SweetAlert2 parameters to show multiple popups, one popup after another.
|
285 |
+
*
|
286 |
+
* @param steps The steps' configuration.
|
287 |
+
*/
|
288 |
+
function queue<T>(steps: readonly (SweetAlertOptions | string)[]): Promise<T>;
|
289 |
+
|
290 |
+
/**
|
291 |
+
* Gets the index of current popup in queue. When there's no active queue, `null` will be returned.
|
292 |
+
*/
|
293 |
+
function getQueueStep(): string | null;
|
294 |
+
|
295 |
+
/**
|
296 |
+
* Inserts a popup in the queue.
|
297 |
+
*
|
298 |
+
* @param step The step configuration (same object as in the `Swal.fire()` call).
|
299 |
+
* @param index The index to insert the step at.
|
300 |
+
* By default a popup will be added to the end of a queue.
|
301 |
+
*/
|
302 |
+
function insertQueueStep(step: SweetAlertOptions, index?: number): number;
|
303 |
+
|
304 |
+
/**
|
305 |
+
* Deletes the popup at the specified index in the queue.
|
306 |
+
*
|
307 |
+
* @param index The popup index in the queue.
|
308 |
+
*/
|
309 |
+
function deleteQueueStep(index: number): void;
|
310 |
+
|
311 |
+
/**
|
312 |
+
* Determines if a given parameter name is valid.
|
313 |
+
*
|
314 |
+
* @param paramName The parameter to check
|
315 |
+
*/
|
316 |
+
function isValidParameter(paramName: string): paramName is keyof SweetAlertOptions;
|
317 |
+
|
318 |
+
/**
|
319 |
+
* Determines if a given parameter name is valid for `Swal.update()` method.
|
320 |
+
*
|
321 |
+
* @param paramName The parameter to check
|
322 |
+
*/
|
323 |
+
function isUpdatableParameter(paramName: string): paramName is SweetAlertUpdatableParameters;
|
324 |
+
|
325 |
+
/**
|
326 |
+
* Normalizes the arguments you can give to Swal.fire() in an object of type SweetAlertOptions.
|
327 |
+
*
|
328 |
+
* Example:
|
329 |
+
* ```
|
330 |
+
* Swal.argsToParams(['title', 'text']); //=> { title: 'title', text: 'text' }
|
331 |
+
* Swal.argsToParams([{ title: 'title', text: 'text' }]); //=> { title: 'title', text: 'text' }
|
332 |
+
* ```
|
333 |
+
*
|
334 |
+
* @param params The array of arguments to normalize.
|
335 |
+
*/
|
336 |
+
function argsToParams<T>(params: SweetAlertArrayOptions | readonly [SweetAlertOptions<T>]): SweetAlertOptions<T>;
|
337 |
+
|
338 |
+
/**
|
339 |
+
* An enum of possible reasons that can explain an alert dismissal.
|
340 |
+
*/
|
341 |
+
enum DismissReason {
|
342 |
+
cancel, backdrop, close, esc, timer
|
343 |
+
}
|
344 |
+
|
345 |
+
/**
|
346 |
+
* SweetAlert2's version
|
347 |
+
*/
|
348 |
+
const version: string
|
349 |
+
}
|
350 |
+
|
351 |
+
interface SweetAlertHideShowClass {
|
352 |
+
backdrop?: string;
|
353 |
+
icon?: string;
|
354 |
+
popup?: string;
|
355 |
+
}
|
356 |
+
|
357 |
+
type Awaited<T> = T extends Promise<infer U> ? U : T;
|
358 |
+
|
359 |
+
type SyncOrAsync<T> = T | Promise<T> | { toPromise: () => T };
|
360 |
+
|
361 |
+
type ValueOrThunk<T> = T | (() => T);
|
362 |
+
|
363 |
+
export type SweetAlertArrayOptions = readonly [string?, string?, SweetAlertIcon?];
|
364 |
+
|
365 |
+
export type SweetAlertGrow = 'row' | 'column' | 'fullscreen' | false;
|
366 |
+
|
367 |
+
export type SweetAlertHideClass = SweetAlertHideShowClass;
|
368 |
+
|
369 |
+
export type SweetAlertShowClass = Readonly<SweetAlertHideShowClass>;
|
370 |
+
|
371 |
+
export type SweetAlertIcon = 'success' | 'error' | 'warning' | 'info' | 'question';
|
372 |
+
|
373 |
+
export type SweetAlertInput =
|
374 |
+
'text' | 'email' | 'password' | 'number' | 'tel' | 'range' | 'textarea' | 'select' | 'radio' | 'checkbox' |
|
375 |
+
'file' | 'url';
|
376 |
+
|
377 |
+
export type SweetAlertPosition =
|
378 |
+
'top' | 'top-start' | 'top-end' | 'top-left' | 'top-right' |
|
379 |
+
'center' | 'center-start' | 'center-end' | 'center-left' | 'center-right' |
|
380 |
+
'bottom' | 'bottom-start' | 'bottom-end' | 'bottom-left' | 'bottom-right';
|
381 |
+
|
382 |
+
export type SweetAlertUpdatableParameters =
|
383 |
+
| 'allowEscapeKey'
|
384 |
+
| 'allowOutsideClick'
|
385 |
+
| 'buttonsStyling'
|
386 |
+
| 'cancelButtonAriaLabel'
|
387 |
+
| 'cancelButtonColor'
|
388 |
+
| 'cancelButtonText'
|
389 |
+
| 'closeButtonAriaLabel'
|
390 |
+
| 'closeButtonHtml'
|
391 |
+
| 'confirmButtonAriaLabel'
|
392 |
+
| 'confirmButtonColor'
|
393 |
+
| 'confirmButtonText'
|
394 |
+
| 'currentProgressStep'
|
395 |
+
| 'customClass'
|
396 |
+
| 'denyButtonAriaLabel'
|
397 |
+
| 'denyButtonColor'
|
398 |
+
| 'denyButtonText'
|
399 |
+
| 'didClose'
|
400 |
+
| 'didDestroy'
|
401 |
+
| 'footer'
|
402 |
+
| 'hideClass'
|
403 |
+
| 'html'
|
404 |
+
| 'icon'
|
405 |
+
| 'imageAlt'
|
406 |
+
| 'imageHeight'
|
407 |
+
| 'imageUrl'
|
408 |
+
| 'imageWidth'
|
409 |
+
| 'onAfterClose'
|
410 |
+
| 'onClose'
|
411 |
+
| 'onDestroy'
|
412 |
+
| 'progressSteps'
|
413 |
+
| 'reverseButtons'
|
414 |
+
| 'showCancelButton'
|
415 |
+
| 'showCloseButton'
|
416 |
+
| 'showConfirmButton'
|
417 |
+
| 'showDenyButton'
|
418 |
+
| 'text'
|
419 |
+
| 'title'
|
420 |
+
| 'titleText'
|
421 |
+
| 'willClose';
|
422 |
+
|
423 |
+
export interface SweetAlertCustomClass {
|
424 |
+
container?: string;
|
425 |
+
popup?: string;
|
426 |
+
header?: string;
|
427 |
+
title?: string;
|
428 |
+
closeButton?: string;
|
429 |
+
icon?: string;
|
430 |
+
image?: string;
|
431 |
+
content?: string;
|
432 |
+
input?: string;
|
433 |
+
validationMessage?: string;
|
434 |
+
actions?: string;
|
435 |
+
confirmButton?: string;
|
436 |
+
denyButton?: string;
|
437 |
+
cancelButton?: string;
|
438 |
+
footer?: string;
|
439 |
+
}
|
440 |
+
|
441 |
+
export interface SweetAlertResult<T = any> {
|
442 |
+
readonly isConfirmed: boolean;
|
443 |
+
readonly isDenied: boolean;
|
444 |
+
readonly isDismissed: boolean;
|
445 |
+
readonly value?: T;
|
446 |
+
readonly dismiss?: Swal.DismissReason;
|
447 |
+
}
|
448 |
+
|
449 |
+
export interface SweetAlertOptions<PreConfirmResult = any, PreConfirmCallbackValue = any> {
|
450 |
+
/**
|
451 |
+
* The title of the popup, as HTML.
|
452 |
+
* It can either be added to the object under the key `title` or passed as the first parameter of `Swal.fire()`.
|
453 |
+
*
|
454 |
+
* @default ''
|
455 |
+
*/
|
456 |
+
title?: string | HTMLElement | JQuery;
|
457 |
+
|
458 |
+
/**
|
459 |
+
* The title of the popup, as text. Useful to avoid HTML injection.
|
460 |
+
*
|
461 |
+
* @default ''
|
462 |
+
*/
|
463 |
+
titleText?: string;
|
464 |
+
|
465 |
+
/**
|
466 |
+
* A description for the popup.
|
467 |
+
* If `text` and `html` parameters are provided in the same time, `text` will be used.
|
468 |
+
*
|
469 |
+
* @default ''
|
470 |
+
*/
|
471 |
+
text?: string;
|
472 |
+
|
473 |
+
/**
|
474 |
+
* A HTML description for the popup.
|
475 |
+
* It can either be added to the object under the key `html` or passed as the second parameter of `Swal.fire()`.
|
476 |
+
*
|
477 |
+
* @default ''
|
478 |
+
*/
|
479 |
+
html?: string | HTMLElement | JQuery;
|
480 |
+
|
481 |
+
/**
|
482 |
+
* The icon of the popup.
|
483 |
+
* SweetAlert2 comes with 5 built-in icons which will show a corresponding icon animation:
|
484 |
+
* `'warning'`, `'error'`, `'success'`, `'info'` and `'question'`.
|
485 |
+
* It can either be put to the object under the key `icon` or passed as the third parameter of `Swal.fire()`.
|
486 |
+
*
|
487 |
+
* @default undefined
|
488 |
+
*/
|
489 |
+
icon?: SweetAlertIcon;
|
490 |
+
|
491 |
+
/**
|
492 |
+
* Use this to change the color of the icon.
|
493 |
+
*
|
494 |
+
* @default undefined
|
495 |
+
*/
|
496 |
+
iconColor?: string;
|
497 |
+
|
498 |
+
/**
|
499 |
+
* The custom HTML content for an icon.
|
500 |
+
*
|
501 |
+
* Example:
|
502 |
+
* ```
|
503 |
+
* Swal.fire({
|
504 |
+
* icon: 'error',
|
505 |
+
* iconHtml: '<i class="fas fa-bug"></i>'
|
506 |
+
* })
|
507 |
+
* ```
|
508 |
+
*
|
509 |
+
* @default undefined
|
510 |
+
*/
|
511 |
+
iconHtml?: string;
|
512 |
+
|
513 |
+
/**
|
514 |
+
* The footer of the popup, as HTML.
|
515 |
+
*
|
516 |
+
* @default ''
|
517 |
+
*/
|
518 |
+
footer?: string | HTMLElement | JQuery;
|
519 |
+
|
520 |
+
/**
|
521 |
+
* Whether or not SweetAlert2 should show a full screen click-to-dismiss backdrop.
|
522 |
+
* Either a boolean value or a css background value (hex, rgb, rgba, url, etc.)
|
523 |
+
*
|
524 |
+
* @default true
|
525 |
+
*/
|
526 |
+
backdrop?: boolean | string;
|
527 |
+
|
528 |
+
/**
|
529 |
+
* Whether or not an alert should be treated as a toast notification.
|
530 |
+
* This option is normally coupled with the `position` and `timer` parameters.
|
531 |
+
* Toasts are NEVER autofocused.
|
532 |
+
*
|
533 |
+
* @default false
|
534 |
+
*/
|
535 |
+
toast?: boolean;
|
536 |
+
|
537 |
+
/**
|
538 |
+
* The container element for adding popup into (query selector only).
|
539 |
+
*
|
540 |
+
* @default 'body'
|
541 |
+
*/
|
542 |
+
target?: string | HTMLElement;
|
543 |
+
|
544 |
+
/**
|
545 |
+
* Input field type, can be `'text'`, `'email'`, `'password'`, `'number'`, `'tel'`, `'range'`, `'textarea'`,
|
546 |
+
* `'select'`, `'radio'`, `'checkbox'`, `'file'` and `'url'`.
|
547 |
+
*
|
548 |
+
* @default undefined
|
549 |
+
*/
|
550 |
+
input?: SweetAlertInput;
|
551 |
+
|
552 |
+
/**
|
553 |
+
* Popup width, including paddings (`box-sizing: border-box`). Can be in px or %.
|
554 |
+
*
|
555 |
+
* @default undefined
|
556 |
+
*/
|
557 |
+
width?: number | string;
|
558 |
+
|
559 |
+
/**
|
560 |
+
* Popup padding.
|
561 |
+
*
|
562 |
+
* @default undefined
|
563 |
+
*/
|
564 |
+
padding?: number | string;
|
565 |
+
|
566 |
+
/**
|
567 |
+
* Popup background (CSS `background` property).
|
568 |
+
*
|
569 |
+
* @default undefined
|
570 |
+
*/
|
571 |
+
background?: string;
|
572 |
+
|
573 |
+
/**
|
574 |
+
* Popup position
|
575 |
+
*
|
576 |
+
* @default 'center'
|
577 |
+
*/
|
578 |
+
position?: SweetAlertPosition;
|
579 |
+
|
580 |
+
/**
|
581 |
+
* Popup grow direction
|
582 |
+
*
|
583 |
+
* @default false
|
584 |
+
*/
|
585 |
+
grow?: SweetAlertGrow;
|
586 |
+
|
587 |
+
/**
|
588 |
+
* CSS classes for animations when showing a popup (fade in)
|
589 |
+
* @default { popup: 'swal2-show', backdrop: 'swal2-backdrop-show', icon: 'swal2-icon-show', }
|
590 |
+
*/
|
591 |
+
showClass?: SweetAlertShowClass;
|
592 |
+
|
593 |
+
/**
|
594 |
+
* CSS classes for animations when hiding a popup (fade out)
|
595 |
+
* @default { popup: 'swal2-hide', backdrop: 'swal2-backdrop-hide', icon: 'swal2-icon-hide' }
|
596 |
+
*/
|
597 |
+
hideClass?: SweetAlertHideClass;
|
598 |
+
|
599 |
+
/**
|
600 |
+
* A custom CSS class for the popup.
|
601 |
+
* If a string value is provided, the classname will be applied to the popup.
|
602 |
+
* If an object is provided, the classnames will be applied to the corresponding fields:
|
603 |
+
*
|
604 |
+
* Example:
|
605 |
+
* ```
|
606 |
+
* Swal.fire({
|
607 |
+
* customClass: {
|
608 |
+
* container: 'container-class',
|
609 |
+
* popup: 'popup-class',
|
610 |
+
* header: 'header-class',
|
611 |
+
* title: 'title-class',
|
612 |
+
* closeButton: 'close-button-class',
|
613 |
+
* icon: 'icon-class',
|
614 |
+
* image: 'image-class',
|
615 |
+
* content: 'content-class',
|
616 |
+
* input: 'input-class',
|
617 |
+
* validationMessage: 'validation-message-class',
|
618 |
+
* actions: 'actions-class',
|
619 |
+
* confirmButton: 'confirm-button-class',
|
620 |
+
* denyButton: 'deny-button-class',
|
621 |
+
* cancelButton: 'cancel-button-class',
|
622 |
+
* footer: 'footer-class'
|
623 |
+
* }
|
624 |
+
* })
|
625 |
+
* ```
|
626 |
+
*
|
627 |
+
* @default undefined
|
628 |
+
*/
|
629 |
+
customClass?: SweetAlertCustomClass;
|
630 |
+
|
631 |
+
/**
|
632 |
+
* Auto close timer of the popup. Set in ms (milliseconds).
|
633 |
+
*
|
634 |
+
* @default undefined
|
635 |
+
*/
|
636 |
+
timer?: number;
|
637 |
+
|
638 |
+
/**
|
639 |
+
* If set to `true`, the timer will have a progress bar at the bottom of a popup.
|
640 |
+
* Mostly, this feature is useful with toasts.
|
641 |
+
*
|
642 |
+
* @default false
|
643 |
+
*/
|
644 |
+
timerProgressBar?: boolean;
|
645 |
+
|
646 |
+
/**
|
647 |
+
* If set to `false`, popup CSS animation will be disabled.
|
648 |
+
*
|
649 |
+
* @deprecated
|
650 |
+
* @default true
|
651 |
+
*/
|
652 |
+
animation?: ValueOrThunk<boolean>;
|
653 |
+
|
654 |
+
/**
|
655 |
+
* By default, SweetAlert2 sets html's and body's CSS `height` to `auto !important`.
|
656 |
+
* If this behavior isn't compatible with your project's layout, set `heightAuto` to `false`.
|
657 |
+
*
|
658 |
+
* @default true
|
659 |
+
*/
|
660 |
+
heightAuto?: boolean;
|
661 |
+
|
662 |
+
/**
|
663 |
+
* If set to `false`, the user can't dismiss the popup by clicking outside it.
|
664 |
+
* You can also pass a custom function returning a boolean value, e.g. if you want
|
665 |
+
* to disable outside clicks for the loading state of a popup.
|
666 |
+
*
|
667 |
+
* @default true
|
668 |
+
*/
|
669 |
+
allowOutsideClick?: ValueOrThunk<boolean>;
|
670 |
+
|
671 |
+
/**
|
672 |
+
* If set to `false`, the user can't dismiss the popup by pressing the Escape key.
|
673 |
+
* You can also pass a custom function returning a boolean value, e.g. if you want
|
674 |
+
* to disable the escape key for the loading state of a popup.
|
675 |
+
*
|
676 |
+
* @default true
|
677 |
+
*/
|
678 |
+
allowEscapeKey?: ValueOrThunk<boolean>;
|
679 |
+
|
680 |
+
/**
|
681 |
+
* If set to `false`, the user can't confirm the popup by pressing the Enter or Space keys,
|
682 |
+
* unless they manually focus the confirm button.
|
683 |
+
* You can also pass a custom function returning a boolean value.
|
684 |
+
*
|
685 |
+
* @default true
|
686 |
+
*/
|
687 |
+
allowEnterKey?: ValueOrThunk<boolean>;
|
688 |
+
|
689 |
+
/**
|
690 |
+
* If set to `false`, SweetAlert2 will allow keydown events propagation to the document.
|
691 |
+
*
|
692 |
+
* @default true
|
693 |
+
*/
|
694 |
+
stopKeydownPropagation?: boolean;
|
695 |
+
|
696 |
+
/**
|
697 |
+
* Useful for those who are using SweetAlert2 along with Bootstrap modals.
|
698 |
+
* By default keydownListenerCapture is `false` which means when a user hits `Esc`,
|
699 |
+
* both SweetAlert2 and Bootstrap modals will be closed.
|
700 |
+
* Set `keydownListenerCapture` to `true` to fix that behavior.
|
701 |
+
*
|
702 |
+
* @default false
|
703 |
+
*/
|
704 |
+
keydownListenerCapture?: boolean;
|
705 |
+
|
706 |
+
/**
|
707 |
+
* If set to `false`, the "Confirm" button will not be shown.
|
708 |
+
* It can be useful when you're using custom HTML description.
|
709 |
+
*
|
710 |
+
* @default true
|
711 |
+
*/
|
712 |
+
showConfirmButton?: boolean;
|
713 |
+
|
714 |
+
/**
|
715 |
+
* If set to `true`, the "Deny" button will be shown, which the user can click on to deny the popup.
|
716 |
+
*
|
717 |
+
* @default false
|
718 |
+
*/
|
719 |
+
showDenyButton?: boolean;
|
720 |
+
|
721 |
+
/**
|
722 |
+
* If set to `true`, the "Cancel" button will be shown, which the user can click on to dismiss the popup.
|
723 |
+
*
|
724 |
+
* @default false
|
725 |
+
*/
|
726 |
+
showCancelButton?: boolean;
|
727 |
+
|
728 |
+
/**
|
729 |
+
* Use this to change the text on the "Confirm" button.
|
730 |
+
*
|
731 |
+
* @default 'OK'
|
732 |
+
*/
|
733 |
+
confirmButtonText?: string;
|
734 |
+
|
735 |
+
/**
|
736 |
+
* Use this to change the text on the "Confirm" button.
|
737 |
+
*
|
738 |
+
* @default 'No'
|
739 |
+
*/
|
740 |
+
denyButtonText?: string;
|
741 |
+
|
742 |
+
/**
|
743 |
+
* Use this to change the text on the "Cancel" button.
|
744 |
+
*
|
745 |
+
* @default 'Cancel'
|
746 |
+
*/
|
747 |
+
cancelButtonText?: string;
|
748 |
+
|
749 |
+
/**
|
750 |
+
* Use this to change the background color of the "Confirm" button.
|
751 |
+
*
|
752 |
+
* @default undefined
|
753 |
+
*/
|
754 |
+
confirmButtonColor?: string;
|
755 |
+
|
756 |
+
/**
|
757 |
+
* Use this to change the background color of the "Deny" button.
|
758 |
+
*
|
759 |
+
* @default undefined
|
760 |
+
*/
|
761 |
+
denyButtonColor?: string;
|
762 |
+
|
763 |
+
/**
|
764 |
+
* Use this to change the background color of the "Cancel" button.
|
765 |
+
*
|
766 |
+
* @default undefined
|
767 |
+
*/
|
768 |
+
cancelButtonColor?: string;
|
769 |
+
|
770 |
+
/**
|
771 |
+
* Use this to change the `aria-label` for the "Confirm" button.
|
772 |
+
*
|
773 |
+
* @default ''
|
774 |
+
*/
|
775 |
+
confirmButtonAriaLabel?: string;
|
776 |
+
|
777 |
+
/**
|
778 |
+
* Use this to change the `aria-label` for the "Deny" button.
|
779 |
+
*
|
780 |
+
* @default ''
|
781 |
+
*/
|
782 |
+
denyButtonAriaLabel?: string;
|
783 |
+
|
784 |
+
/**
|
785 |
+
* Use this to change the `aria-label` for the "Cancel" button.
|
786 |
+
*
|
787 |
+
* @default ''
|
788 |
+
*/
|
789 |
+
cancelButtonAriaLabel?: string;
|
790 |
+
|
791 |
+
/**
|
792 |
+
* Whether to apply the default SweetAlert2 styling to buttons.
|
793 |
+
* If you want to use your own classes (e.g. Bootstrap classes) set this parameter to `false`.
|
794 |
+
*
|
795 |
+
* @default true
|
796 |
+
*/
|
797 |
+
buttonsStyling?: boolean;
|
798 |
+
|
799 |
+
/**
|
800 |
+
* Set to `true` if you want to invert default buttons positions.
|
801 |
+
*
|
802 |
+
* @default false
|
803 |
+
*/
|
804 |
+
reverseButtons?: boolean;
|
805 |
+
|
806 |
+
/**
|
807 |
+
* Set to `false` if you want to focus the first element in tab order instead of the "Confirm" button by default.
|
808 |
+
*
|
809 |
+
* @default true
|
810 |
+
*/
|
811 |
+
focusConfirm?: boolean;
|
812 |
+
|
813 |
+
/**
|
814 |
+
* Set to `true` if you want to focus the "Deny" button by default.
|
815 |
+
*
|
816 |
+
* @default false
|
817 |
+
*/
|
818 |
+
focusDeny?: boolean;
|
819 |
+
|
820 |
+
/**
|
821 |
+
* Set to `true` if you want to focus the "Cancel" button by default.
|
822 |
+
*
|
823 |
+
* @default false
|
824 |
+
*/
|
825 |
+
focusCancel?: boolean;
|
826 |
+
|
827 |
+
/**
|
828 |
+
* Set to `true` to show close button.
|
829 |
+
*
|
830 |
+
* @default false
|
831 |
+
*/
|
832 |
+
showCloseButton?: boolean;
|
833 |
+
|
834 |
+
/**
|
835 |
+
* Use this to change the HTML content of the close button.
|
836 |
+
*
|
837 |
+
* @default '×'
|
838 |
+
*/
|
839 |
+
closeButtonHtml?: string;
|
840 |
+
|
841 |
+
/**
|
842 |
+
* Use this to change the `aria-label` for the close button.
|
843 |
+
*
|
844 |
+
* @default 'Close this dialog'
|
845 |
+
*/
|
846 |
+
closeButtonAriaLabel?: string;
|
847 |
+
|
848 |
+
/**
|
849 |
+
* Use this to change the HTML content of the loader.
|
850 |
+
*
|
851 |
+
* @default ''
|
852 |
+
*/
|
853 |
+
loaderHtml?: string;
|
854 |
+
|
855 |
+
/**
|
856 |
+
* Set to `true` to disable buttons and show that something is loading. Useful for AJAX requests.
|
857 |
+
*
|
858 |
+
* @default false
|
859 |
+
*/
|
860 |
+
showLoaderOnConfirm?: boolean;
|
861 |
+
|
862 |
+
/**
|
863 |
+
* Function to execute before confirm, may be async (Promise-returning) or sync.
|
864 |
+
*
|
865 |
+
* Example:
|
866 |
+
* ```
|
867 |
+
* Swal.fire({
|
868 |
+
* title: 'Multiple inputs',
|
869 |
+
* html:
|
870 |
+
* '<input id="swal-input1" class="swal2-input">' +
|
871 |
+
* '<input id="swal-input2" class="swal2-input">',
|
872 |
+
* focusConfirm: false,
|
873 |
+
* preConfirm: () => [
|
874 |
+
* document.querySelector('#swal-input1').value,
|
875 |
+
* document.querySelector('#swal-input2').value
|
876 |
+
* ]
|
877 |
+
* }).then(result => Swal.fire(JSON.stringify(result));
|
878 |
+
* ```
|
879 |
+
*
|
880 |
+
* @default undefined
|
881 |
+
*/
|
882 |
+
preConfirm?(inputValue: PreConfirmCallbackValue): PreConfirmResult;
|
883 |
+
|
884 |
+
/**
|
885 |
+
* Add an image to the popup. Should contain a string with the path or URL to the image.
|
886 |
+
*
|
887 |
+
* @default undefined
|
888 |
+
*/
|
889 |
+
imageUrl?: string;
|
890 |
+
|
891 |
+
/**
|
892 |
+
* If imageUrl is set, you can specify imageWidth to describes image width in px.
|
893 |
+
*
|
894 |
+
* @default undefined
|
895 |
+
*/
|
896 |
+
imageWidth?: number;
|
897 |
+
|
898 |
+
/**
|
899 |
+
* If imageUrl is set, you can specify imageHeight to describes image height in px.
|
900 |
+
*
|
901 |
+
* @default undefined
|
902 |
+
*/
|
903 |
+
imageHeight?: number;
|
904 |
+
|
905 |
+
/**
|
906 |
+
* An alternative text for the custom image icon.
|
907 |
+
*
|
908 |
+
* @default ''
|
909 |
+
*/
|
910 |
+
imageAlt?: string;
|
911 |
+
|
912 |
+
/**
|
913 |
+
* Input field label.
|
914 |
+
*
|
915 |
+
* @default ''
|
916 |
+
*/
|
917 |
+
inputLabel?: string;
|
918 |
+
|
919 |
+
/**
|
920 |
+
* Input field placeholder.
|
921 |
+
*
|
922 |
+
* @default ''
|
923 |
+
*/
|
924 |
+
inputPlaceholder?: string;
|
925 |
+
|
926 |
+
/**
|
927 |
+
* Input field initial value.
|
928 |
+
*
|
929 |
+
* @default ''
|
930 |
+
*/
|
931 |
+
inputValue?: SyncOrAsync<string | number | boolean>;
|
932 |
+
|
933 |
+
/**
|
934 |
+
* If the `input` parameter is set to `'select'` or `'radio'`, you can provide options.
|
935 |
+
* Object keys will represent options values, object values will represent options text values.
|
936 |
+
* @default {}
|
937 |
+
*/
|
938 |
+
inputOptions?: SyncOrAsync<ReadonlyMap<string, string> | Record<string, any>>;
|
939 |
+
|
940 |
+
/**
|
941 |
+
* Automatically remove whitespaces from both ends of a result string.
|
942 |
+
* Set this parameter to `false` to disable auto-trimming.
|
943 |
+
*
|
944 |
+
* @default true
|
945 |
+
*/
|
946 |
+
inputAutoTrim?: boolean;
|
947 |
+
|
948 |
+
/**
|
949 |
+
* HTML input attributes (e.g. `min`, `max`, `step`, `accept`), that are added to the input field.
|
950 |
+
*
|
951 |
+
* Example:
|
952 |
+
* ```
|
953 |
+
* Swal.fire({
|
954 |
+
* title: 'Select a file',
|
955 |
+
* input: 'file',
|
956 |
+
* inputAttributes: {
|
957 |
+
* accept: 'image/*'
|
958 |
+
* }
|
959 |
+
* })
|
960 |
+
* ```
|
961 |
+
*
|
962 |
+
* @default {}
|
963 |
+
*/
|
964 |
+
inputAttributes?: Record<string, string>;
|
965 |
+
|
966 |
+
/**
|
967 |
+
* Validator for input field, may be async (Promise-returning) or sync.
|
968 |
+
*
|
969 |
+
* Example:
|
970 |
+
* ```
|
971 |
+
* Swal.fire({
|
972 |
+
* title: 'Select color',
|
973 |
+
* input: 'radio',
|
974 |
+
* inputValidator: result => !result && 'You need to select something!'
|
975 |
+
* })
|
976 |
+
* ```
|
977 |
+
*
|
978 |
+
* @default undefined
|
979 |
+
*/
|
980 |
+
inputValidator?(inputValue: string): SyncOrAsync<string | null>;
|
981 |
+
|
982 |
+
/**
|
983 |
+
* If you want to return the input value as `result.value` when denying the popup, set to `true`.
|
984 |
+
* Otherwise, the denying will set `result.value` to `false`.
|
985 |
+
*
|
986 |
+
* @default false
|
987 |
+
*/
|
988 |
+
returnInputValueOnDeny?: boolean;
|
989 |
+
|
990 |
+
/**
|
991 |
+
* A custom validation message for default validators (email, url).
|
992 |
+
*
|
993 |
+
* Example:
|
994 |
+
* ```
|
995 |
+
* Swal.fire({
|
996 |
+
* input: 'email',
|
997 |
+
* validationMessage: 'Adresse e-mail invalide'
|
998 |
+
* })
|
999 |
+
* ```
|
1000 |
+
*
|
1001 |
+
* @default undefined
|
1002 |
+
*/
|
1003 |
+
validationMessage?: string;
|
1004 |
+
|
1005 |
+
/**
|
1006 |
+
* Progress steps, useful for popup queues.
|
1007 |
+
*
|
1008 |
+
* @default []
|
1009 |
+
*/
|
1010 |
+
progressSteps?: readonly string[];
|
1011 |
+
|
1012 |
+
/**
|
1013 |
+
* Current active progress step.
|
1014 |
+
*
|
1015 |
+
* @default undefined
|
1016 |
+
*/
|
1017 |
+
currentProgressStep?: string;
|
1018 |
+
|
1019 |
+
/**
|
1020 |
+
* Distance between progress steps.
|
1021 |
+
*
|
1022 |
+
* @default undefined
|
1023 |
+
*/
|
1024 |
+
progressStepsDistance?: string;
|
1025 |
+
|
1026 |
+
/**
|
1027 |
+
* @deprecated Use drop-in replacement `willOpen` instead.
|
1028 |
+
* @default undefined
|
1029 |
+
*/
|
1030 |
+
onBeforeOpen?(popup: HTMLElement): void;
|
1031 |
+
|
1032 |
+
/**
|
1033 |
+
* @deprecated Use drop-in replacement `didOpen` instead.
|
1034 |
+
* @default undefined
|
1035 |
+
*/
|
1036 |
+
onOpen?(popup: HTMLElement): void;
|
1037 |
+
|
1038 |
+
/**
|
1039 |
+
* Popup lifecycle hook. Synchronously runs before the popup is shown on screen.
|
1040 |
+
*
|
1041 |
+
* @default undefined
|
1042 |
+
* @param popup The popup DOM element.
|
1043 |
+
*/
|
1044 |
+
willOpen?(popup: HTMLElement): void;
|
1045 |
+
|
1046 |
+
/**
|
1047 |
+
* Popup lifecycle hook. Asynchronously runs after the popup has been shown on screen.
|
1048 |
+
*
|
1049 |
+
* @default undefined
|
1050 |
+
* @param popup The popup DOM element.
|
1051 |
+
*/
|
1052 |
+
didOpen?(popup: HTMLElement): void;
|
1053 |
+
|
1054 |
+
/**
|
1055 |
+
* @deprecated Use drop-in replacement `didRender` instead.
|
1056 |
+
* @default undefined
|
1057 |
+
*/
|
1058 |
+
onRender?(popup: HTMLElement): void;
|
1059 |
+
|
1060 |
+
/**
|
1061 |
+
* Popup lifecycle hook. Synchronously runs after the popup DOM has been updated (ie. just before the popup is
|
1062 |
+
* repainted on the screen).
|
1063 |
+
* Typically, this will happen after `Swal.fire()` or `Swal.update()`.
|
1064 |
+
* If you want to perform changes in the popup's DOM, that survive `Swal.update()`, prefer `didRender` over
|
1065 |
+
* `willOpen`.
|
1066 |
+
*
|
1067 |
+
* @default undefined
|
1068 |
+
* @param popup The popup DOM element.
|
1069 |
+
*/
|
1070 |
+
didRender?(popup: HTMLElement): void;
|
1071 |
+
|
1072 |
+
/**
|
1073 |
+
* @deprecated Use drop-in replacement `willClose` instead.
|
1074 |
+
* @default undefined
|
1075 |
+
*/
|
1076 |
+
onClose?(popup: HTMLElement): void;
|
1077 |
+
|
1078 |
+
/**
|
1079 |
+
* @deprecated Use drop-in replacement `didClose` instead.
|
1080 |
+
* @default undefined
|
1081 |
+
*/
|
1082 |
+
onAfterClose?(): void;
|
1083 |
+
|
1084 |
+
/**
|
1085 |
+
* Popup lifecycle hook. Synchronously runs when the popup closes by user interaction (and not due to another popup
|
1086 |
+
* being fired).
|
1087 |
+
*
|
1088 |
+
* @default undefined
|
1089 |
+
* @param popup The popup DOM element.
|
1090 |
+
*/
|
1091 |
+
willClose?(popup: HTMLElement): void;
|
1092 |
+
|
1093 |
+
/**
|
1094 |
+
* Popup lifecycle hook. Asynchronously runs after the popup has been disposed by user interaction (and not due to
|
1095 |
+
* another popup being fired).
|
1096 |
+
*
|
1097 |
+
* @default undefined
|
1098 |
+
*/
|
1099 |
+
didClose?(): void;
|
1100 |
+
|
1101 |
+
/**
|
1102 |
+
* @deprecated Use drop-in replacement `didDestroy` instead.
|
1103 |
+
* @default undefined
|
1104 |
+
*/
|
1105 |
+
onDestroy?(): void;
|
1106 |
+
|
1107 |
+
/**
|
1108 |
+
* Popup lifecycle hook. Synchronously runs after popup has been destroyed either by user interaction or by another
|
1109 |
+
* popup.
|
1110 |
+
* If you have cleanup operations that you need to reliably execute each time a popup is closed, prefer
|
1111 |
+
* `didDestroy` over `didClose`.
|
1112 |
+
*
|
1113 |
+
* @default undefined
|
1114 |
+
*/
|
1115 |
+
didDestroy?(): void;
|
1116 |
+
|
1117 |
+
/**
|
1118 |
+
* Set to `false` to disable body padding adjustment when scrollbar is present.
|
1119 |
+
*
|
1120 |
+
* @default true
|
1121 |
+
*/
|
1122 |
+
scrollbarPadding?: boolean;
|
1123 |
+
}
|
1124 |
+
|
1125 |
+
export default Swal
|
1126 |
+
}
|
1127 |
+
|
1128 |
+
declare module 'sweetalert2/*/sweetalert2.js' {
|
1129 |
+
export * from 'sweetalert2'
|
1130 |
+
// "export *" does not matches the default export, so do it explicitly.
|
1131 |
+
export { default } from 'sweetalert2' // eslint-disable-line
|
1132 |
+
}
|
1133 |
+
|
1134 |
+
declare module 'sweetalert2/*/sweetalert2.all.js' {
|
1135 |
+
export * from 'sweetalert2'
|
1136 |
+
// "export *" does not matches the default export, so do it explicitly.
|
1137 |
+
export { default } from 'sweetalert2' // eslint-disable-line
|
1138 |
+
}
|
1139 |
+
|
1140 |
+
/**
|
1141 |
+
* These interfaces aren't provided by SweetAlert2, but its definitions use them.
|
1142 |
+
* They will be merged with 'true' definitions.
|
1143 |
+
*/
|
1144 |
+
|
1145 |
+
interface JQuery {
|
1146 |
+
}
|
1147 |
+
|
1148 |
+
interface Promise<T> {
|
1149 |
+
}
|
1150 |
+
|
1151 |
+
interface Map<K, V> {
|
1152 |
+
}
|
classes/Debug.php
CHANGED
@@ -57,15 +57,21 @@ class Debug
|
|
57 |
$markedJsListForUnload = array_unique(Main::instance()->allUnloadedAssets['js']);
|
58 |
|
59 |
$allDebugOptions = array(
|
60 |
-
// CSS
|
61 |
-
'wpacu_no_css_unload'
|
62 |
-
'wpacu_no_css_minify'
|
63 |
-
'wpacu_no_css_combine'
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
|
70 |
// Others
|
71 |
'wpacu_no_frontend_show' => 'Do not show the bottom CSS/JS managing list',
|
57 |
$markedJsListForUnload = array_unique(Main::instance()->allUnloadedAssets['js']);
|
58 |
|
59 |
$allDebugOptions = array(
|
60 |
+
// [For CSS]
|
61 |
+
'wpacu_no_css_unload' => 'Do not apply any CSS unload rules',
|
62 |
+
'wpacu_no_css_minify' => 'Do not minify any CSS',
|
63 |
+
'wpacu_no_css_combine' => 'Do not combine any CSS',
|
64 |
+
|
65 |
+
'wpacu_no_css_preload_basic' => 'Do not preload any CSS (Basic)',
|
66 |
+
// [/For CSS]
|
67 |
+
|
68 |
+
// [For JS]
|
69 |
+
'wpacu_no_js_unload' => 'Do not apply any JavaScript unload rules',
|
70 |
+
'wpacu_no_js_minify' => 'Do not minify any JavaScript',
|
71 |
+
'wpacu_no_js_combine' => 'Do not combine any JavaScript',
|
72 |
+
|
73 |
+
'wpacu_no_js_preload_basic' => 'Do not preload any JS (Basic)',
|
74 |
+
// [/For JS]
|
75 |
|
76 |
// Others
|
77 |
'wpacu_no_frontend_show' => 'Do not show the bottom CSS/JS managing list',
|
classes/FileSystem.php
CHANGED
@@ -1,6 +1,9 @@
|
|
1 |
<?php
|
2 |
namespace WpAssetCleanUp;
|
3 |
|
|
|
|
|
|
|
4 |
/**
|
5 |
* Class FileSystem
|
6 |
* @package WpAssetCleanUp
|
@@ -74,6 +77,12 @@ class FileSystem
|
|
74 |
*/
|
75 |
public static function file_put_contents($localPathToFile, $contents)
|
76 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
// Fallback
|
78 |
if (! self::init()) {
|
79 |
$return = @file_put_contents($localPathToFile, $contents);
|
1 |
<?php
|
2 |
namespace WpAssetCleanUp;
|
3 |
|
4 |
+
use WpAssetCleanUp\OptimiseAssets\OptimizeCss;
|
5 |
+
use WpAssetCleanUp\OptimiseAssets\OptimizeJs;
|
6 |
+
|
7 |
/**
|
8 |
* Class FileSystem
|
9 |
* @package WpAssetCleanUp
|
77 |
*/
|
78 |
public static function file_put_contents($localPathToFile, $contents)
|
79 |
{
|
80 |
+
if ( (strpos($localPathToFile, WP_CONTENT_DIR . OptimizeCss::getRelPathCssCacheDir()) !== false && ! is_dir(dirname($localPathToFile)))
|
81 |
+
|| (strpos($localPathToFile, WP_CONTENT_DIR . OptimizeJs::getRelPathJsCacheDir()) !== false && ! is_dir(dirname($localPathToFile)))
|
82 |
+
) {
|
83 |
+
@mkdir(dirname($localPathToFile), 0755, true );
|
84 |
+
}
|
85 |
+
|
86 |
// Fallback
|
87 |
if (! self::init()) {
|
88 |
$return = @file_put_contents($localPathToFile, $contents);
|
classes/HardcodedAssets.php
CHANGED
@@ -61,6 +61,10 @@ class HardcodedAssets
|
|
61 |
ob_start();
|
62 |
|
63 |
add_action('shutdown', static function() {
|
|
|
|
|
|
|
|
|
64 |
$htmlSource = '';
|
65 |
|
66 |
// We'll need to get the number of ob levels we're in, so that we can iterate over each, collecting
|
@@ -71,40 +75,9 @@ class HardcodedAssets
|
|
71 |
$htmlSource .= ob_get_clean();
|
72 |
}
|
73 |
|
74 |
-
echo
|
75 |
-
}, 0);
|
76 |
-
}
|
77 |
|
78 |
-
|
79 |
-
* @param $htmlSource
|
80 |
-
*
|
81 |
-
* @return string|string[]
|
82 |
-
*/
|
83 |
-
public static function addHardcodedAssetsForEditFrontEndView($htmlSource)
|
84 |
-
{
|
85 |
-
if ( ! ($anyHardCodedAssets = ObjectCache::wpacu_cache_get('wpacu_hardcoded_assets_encoded')) ) {
|
86 |
-
$htmlSource = str_replace( '{wpacu_assets_collapsible_wrap_hardcoded_list}', '', $htmlSource);
|
87 |
-
return $htmlSource;
|
88 |
-
}
|
89 |
-
|
90 |
-
$jsonH = base64_decode($anyHardCodedAssets);
|
91 |
-
|
92 |
-
$wpacuPrintHardcodedManagementList = static function($jsonH) {
|
93 |
-
$data = ObjectCache::wpacu_cache_get('wpacu_settings_frontend_data') ?: array();
|
94 |
-
$data['do_not_print_list'] = true;
|
95 |
-
$data['all']['hardcoded'] = (array)json_decode($jsonH, ARRAY_A);
|
96 |
-
ob_start();
|
97 |
-
include_once WPACU_PLUGIN_DIR.'/templates/meta-box-loaded-assets/_assets-hardcoded-list.php'; // generate $hardcodedTagsOutput
|
98 |
-
return ob_get_clean();
|
99 |
-
};
|
100 |
-
|
101 |
-
$htmlSource = str_replace(
|
102 |
-
'{wpacu_assets_collapsible_wrap_hardcoded_list}',
|
103 |
-
$wpacuPrintHardcodedManagementList($jsonH), // call the function to return the HTML output
|
104 |
-
$htmlSource
|
105 |
-
);
|
106 |
-
|
107 |
-
return $htmlSource;
|
108 |
}
|
109 |
|
110 |
/**
|
@@ -365,10 +338,7 @@ class HardcodedAssets
|
|
365 |
|
366 |
$tagsWithinConditionalComments = self::extractHtmlFromConditionalComments( $htmlSourceAlt );
|
367 |
|
368 |
-
if (
|
369 |
-
// Triggered within the front-end view (when admin is logged-in and manages the assets)
|
370 |
-
ObjectCache::wpacu_cache_set( 'wpacu_hardcoded_content_within_conditional_comments', $tagsWithinConditionalComments );
|
371 |
-
} elseif (Main::instance()->isGetAssetsCall) {
|
372 |
// AJAX call within the Dashboard
|
373 |
$hardCodedAssets['within_conditional_comments'] = $tagsWithinConditionalComments;
|
374 |
}
|
@@ -549,4 +519,75 @@ class HardcodedAssets
|
|
549 |
|
550 |
return false;
|
551 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
552 |
}
|
61 |
ob_start();
|
62 |
|
63 |
add_action('shutdown', static function() {
|
64 |
+
if (! defined('NEXTEND_SMARTSLIDER_3_URL_PATH')) {
|
65 |
+
ob_flush();
|
66 |
+
}
|
67 |
+
|
68 |
$htmlSource = '';
|
69 |
|
70 |
// We'll need to get the number of ob levels we're in, so that we can iterate over each, collecting
|
75 |
$htmlSource .= ob_get_clean();
|
76 |
}
|
77 |
|
78 |
+
echo OptimizeCommon::alterHtmlSource($htmlSource);
|
|
|
|
|
79 |
|
80 |
+
}, 0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
}
|
82 |
|
83 |
/**
|
338 |
|
339 |
$tagsWithinConditionalComments = self::extractHtmlFromConditionalComments( $htmlSourceAlt );
|
340 |
|
341 |
+
if (Main::instance()->isGetAssetsCall) {
|
|
|
|
|
|
|
342 |
// AJAX call within the Dashboard
|
343 |
$hardCodedAssets['within_conditional_comments'] = $tagsWithinConditionalComments;
|
344 |
}
|
519 |
|
520 |
return false;
|
521 |
}
|
522 |
+
|
523 |
+
/**
|
524 |
+
* @param $data
|
525 |
+
*
|
526 |
+
* @return string
|
527 |
+
*/
|
528 |
+
public static function getHardCodedManageAreaForFrontEndView($data)
|
529 |
+
{
|
530 |
+
$dataSettingsFrontEnd = ObjectCache::wpacu_cache_get('wpacu_settings_frontend_data') ?: array();
|
531 |
+
$dataSettingsFrontEnd['page_unload_text'] = $data['page_unload_text'];
|
532 |
+
// The following string will be replaced by the values got the from the AJAX call to /?wpassetcleanup_load=1&wpacu_just_hardcoded
|
533 |
+
$dataWpacuSettingsFrontend = base64_encode(json_encode($dataSettingsFrontEnd));
|
534 |
+
$imgLoadingSpinnerUrl = admin_url('images/spinner.gif');
|
535 |
+
|
536 |
+
$currentHardcodedAssetRules = '';
|
537 |
+
|
538 |
+
// When the form is submitted it will clear some values if they are not sent anymore which can happen with a failed AJAX call to retrieve the list of hardcoded assets
|
539 |
+
// Place the current values to the area in case the AJAX call fails and it won't print the list
|
540 |
+
// If the user presses "Update", it won't clear any existing rules
|
541 |
+
// If the list is printed, obviously it will be with all the fields in place as they should be
|
542 |
+
foreach (array('current', 'load_exceptions', 'handle_unload_regex', 'handle_load_regex', 'handle_load_logged_in') as $ruleKey) {
|
543 |
+
foreach ( array( 'styles', 'scripts' ) as $assetType ) {
|
544 |
+
if ( isset( $dataSettingsFrontEnd[$ruleKey][ $assetType ] ) && ! empty( $dataSettingsFrontEnd[$ruleKey][$assetType] ) ) {
|
545 |
+
// Go through the values, depending on how the array is structured
|
546 |
+
// handle_unload_regex, handle_load_regex
|
547 |
+
if (in_array($ruleKey, array('handle_unload_regex', 'handle_load_regex'))) {
|
548 |
+
foreach ( $dataSettingsFrontEnd[ $ruleKey ][ $assetType ] as $assetHandle => $assetValues ) {
|
549 |
+
if ( strpos( $assetHandle, 'wpacu_hardcoded_' ) !== false ) {
|
550 |
+
if ($ruleKey === 'handle_unload_regex') {
|
551 |
+
$enableValue = isset( $assetValues['enable'] ) ? $assetValues['enable'] : '';
|
552 |
+
$regExValue = isset( $assetValues['value'] ) ? $assetValues['value'] : '';
|
553 |
+
$currentHardcodedAssetRules .= '<input type="hidden" name="wpacu_handle_unload_regex[' . $assetType . '][' . $assetHandle . '][enable]" value="' . $enableValue . '" />';
|
554 |
+
$currentHardcodedAssetRules .= '<input type="hidden" name="wpacu_handle_unload_regex[' . $assetType . '][' . $assetHandle . '][value]" value="' . esc_attr( $regExValue ) . '" />';
|
555 |
+
} elseif ($ruleKey === 'handle_load_regex') {
|
556 |
+
$enableValue = isset( $assetValues['enable'] ) ? $assetValues['enable'] : '';
|
557 |
+
$regExValue = isset( $assetValues['value'] ) ? $assetValues['value'] : '';
|
558 |
+
$currentHardcodedAssetRules .= '<input type="hidden" name="wpacu_handle_load_regex[' . $assetType . '][' . $assetHandle . '][enable]" value="' . $enableValue . '" />';
|
559 |
+
$currentHardcodedAssetRules .= '<input type="hidden" name="wpacu_handle_load_regex[' . $assetType . '][' . $assetHandle . '][value]" value="' . esc_attr( $regExValue ) . '" />';
|
560 |
+
}
|
561 |
+
}
|
562 |
+
}
|
563 |
+
} else {
|
564 |
+
// current, load_exceptions, handle_load_logged_in
|
565 |
+
foreach ( $dataSettingsFrontEnd[ $ruleKey ][ $assetType ] as $assetHandle ) {
|
566 |
+
if ( strpos( $assetHandle, 'wpacu_hardcoded_' ) !== false ) {
|
567 |
+
if ( $ruleKey === 'current' ) {
|
568 |
+
$currentHardcodedAssetRules .= '<input type="hidden" name="wpassetcleanup[' . $assetType . '][]" value="' . $assetHandle . '" />';
|
569 |
+
} elseif ( $ruleKey === 'load_exceptions' ) {
|
570 |
+
$currentHardcodedAssetRules .= '<input type="hidden" name="wpacu_styles_load_it[]" value="' . $assetHandle . '" />';
|
571 |
+
} elseif ($ruleKey === 'handle_load_logged_in') {
|
572 |
+
$currentHardcodedAssetRules .= '<input type="hidden" name="wpacu_load_it_logged_in['.$assetType.']['.$assetHandle.']" value="1" />';
|
573 |
+
}
|
574 |
+
}
|
575 |
+
}
|
576 |
+
}
|
577 |
+
}
|
578 |
+
}
|
579 |
+
}
|
580 |
+
|
581 |
+
$hardcodedManageAreaHtml = <<<HTML
|
582 |
+
<div class="wpacu-assets-collapsible-wrap wpacu-wrap-area wpacu-hardcoded" id="wpacu-assets-collapsible-wrap-hardcoded-list" data-wpacu-settings-frontend="{$dataWpacuSettingsFrontend}">
|
583 |
+
<a class="wpacu-assets-collapsible wpacu-assets-collapsible-active" href="#" style="padding: 15px 15px 15px 44px;"><span class="dashicons dashicons-code-standards"></span> Hardcoded (non-enqueued) Styles & Scripts</a>
|
584 |
+
<div class="wpacu-assets-collapsible-content" style="max-height: inherit;">
|
585 |
+
<div style="padding: 20px 0; margin: 0;"><img src="{$imgLoadingSpinnerUrl}" align="top" width="20" height="20" alt="" /> The list of hardcoded assets is fetched... Please wait...</div>
|
586 |
+
{$currentHardcodedAssetRules}
|
587 |
+
</div>
|
588 |
+
</div>
|
589 |
+
HTML;
|
590 |
+
|
591 |
+
return $hardcodedManageAreaHtml;
|
592 |
+
}
|
593 |
}
|
classes/Main.php
CHANGED
@@ -276,8 +276,15 @@ class Main
|
|
276 |
add_action('wp_ajax_'.WPACU_PLUGIN_ID.'_get_external_file_size', array($this, 'ajaxGetExternalFileSize'));
|
277 |
|
278 |
// Early Triggers
|
279 |
-
|
280 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
281 |
|
282 |
// Fetch Assets AJAX Call? Make sure the output is as clean as possible (no plugins interfering with it)
|
283 |
// It can also be used for debugging purposes (via /?wpacu_clean_load) when you want to view all the CSS/JS
|
@@ -473,7 +480,10 @@ SQL;
|
|
473 |
// Save CSS/JS list that is printed in the <BODY>
|
474 |
add_action('wp_print_footer_scripts', array($this, 'saveFooterAssets'), 100000000);
|
475 |
add_action('wp_footer', array($this, 'printScriptsStyles'), (PHP_INT_MAX - 1));
|
476 |
-
|
|
|
|
|
|
|
477 |
|
478 |
if ( is_admin() ) {
|
479 |
$metaboxes = new MetaBoxes;
|
@@ -635,7 +645,7 @@ SQL;
|
|
635 |
*/
|
636 |
public function maybeFilterAssetObject($object, $assetType)
|
637 |
{
|
638 |
-
if ( isset($_GET['wpacu_clean_load']) ) {
|
639 |
return $object; // this is for debugging purposes, load the original source
|
640 |
}
|
641 |
|
@@ -643,11 +653,6 @@ SQL;
|
|
643 |
return $object;
|
644 |
}
|
645 |
|
646 |
-
if ( ! isset($object->ver) ) {
|
647 |
-
global $wp_version;
|
648 |
-
$object->ver = $wp_version;
|
649 |
-
}
|
650 |
-
|
651 |
$filterTagName = 'wpacu_'.$object->handle.'_'.$assetType.'_handle_data';
|
652 |
|
653 |
if ( has_filter($filterTagName) ) {
|
@@ -657,11 +662,9 @@ SQL;
|
|
657 |
if ( isset($originData['src'], $newData['src']) && $newData['src'] !== $originData['src'] ) {
|
658 |
$object->src = $newData['src'];
|
659 |
$object->src_origin = $originData['src'];
|
660 |
-
}
|
661 |
|
662 |
-
|
663 |
-
$object->
|
664 |
-
$object->ver_origin = $originData['ver'];
|
665 |
}
|
666 |
}
|
667 |
|
@@ -849,7 +852,8 @@ SQL;
|
|
849 |
|
850 |
// Ignore auto generated handles for the hardcoded CSS as they were added for reference purposes
|
851 |
// They will get stripped later on via OptimizeCommon.php
|
852 |
-
|
|
|
853 |
continue;
|
854 |
}
|
855 |
|
@@ -1124,6 +1128,27 @@ SQL;
|
|
1124 |
$this->allUnloadedAssets['js'][] = $handle;
|
1125 |
}
|
1126 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1127 |
// Special Action for 'jquery-migrate' handler as its tied to 'jquery'
|
1128 |
if ($handle === 'jquery-migrate' && isset($this->wpAllScripts['registered']['jquery'])) {
|
1129 |
$jQueryRegScript = $this->wpAllScripts['registered']['jquery'];
|
@@ -1147,15 +1172,6 @@ SQL;
|
|
1147 |
continue;
|
1148 |
}
|
1149 |
|
1150 |
-
// Ignore auto generated handles for the hardcoded CSS as they were added for reference purposes
|
1151 |
-
if (strpos($handle, 'wpacu_hardcoded_script_src_') === 0) {
|
1152 |
-
continue;
|
1153 |
-
}
|
1154 |
-
|
1155 |
-
if (strpos($handle, 'wpacu_hardcoded_script_inline_') === 0) {
|
1156 |
-
continue;
|
1157 |
-
}
|
1158 |
-
|
1159 |
wp_deregister_script($handle);
|
1160 |
wp_dequeue_script($handle);
|
1161 |
}
|
@@ -1997,7 +2013,7 @@ SQL;
|
|
1997 |
|
1998 |
ObjectCache::wpacu_cache_set('wpacu_settings_frontend_data', $data);
|
1999 |
$this->parseTemplate('settings-frontend', $data, true);
|
2000 |
-
} elseif ($isDashboardEditView) {
|
2001 |
// AJAX call (not the classic WP one) from the WP Dashboard
|
2002 |
// Send the altered value that has the initial position too
|
2003 |
|
@@ -2023,6 +2039,15 @@ SQL;
|
|
2023 |
// and we need the non-minified version of the DOM (e.g. to determine the position of the elements)
|
2024 |
exit();
|
2025 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026 |
}
|
2027 |
|
2028 |
/* [wpacu_timing] */ Misc::scriptExecTimer($wpacuTimingName, 'end'); /* [/wpacu_timing] */
|
@@ -2246,6 +2271,44 @@ SQL;
|
|
2246 |
exit();
|
2247 |
}
|
2248 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2249 |
/**
|
2250 |
* @return false|mixed|string|void
|
2251 |
*/
|
@@ -2783,6 +2846,11 @@ SQL;
|
|
2783 |
return $this->currentPostId;
|
2784 |
}
|
2785 |
|
|
|
|
|
|
|
|
|
|
|
2786 |
// Are we on the `Shop` page from WooCommerce?
|
2787 |
// Only check option if function `is_shop` exists
|
2788 |
$wooCommerceShopPageId = function_exists('is_shop') ? get_option('woocommerce_shop_page_id') : 0;
|
276 |
add_action('wp_ajax_'.WPACU_PLUGIN_ID.'_get_external_file_size', array($this, 'ajaxGetExternalFileSize'));
|
277 |
|
278 |
// Early Triggers
|
279 |
+
$wpacuAction = Misc::isElementorMaintenanceModeOn() ? 'template_redirect' : 'wp';
|
280 |
+
|
281 |
+
if ($wpacuAction === 'wp') {
|
282 |
+
add_action( 'wp', array( $this, 'setVarsBeforeUpdate' ), 8 );
|
283 |
+
add_action( 'wp', array( $this, 'setVarsAfterAnyUpdate' ), 10 );
|
284 |
+
} else {
|
285 |
+
add_action( 'template_redirect', array( $this, 'setVarsBeforeUpdate' ), 12 ); // over 11 which is set in Elementor's maintenance-mode.php
|
286 |
+
add_action( 'template_redirect', array( $this, 'setVarsAfterAnyUpdate' ), 13 );
|
287 |
+
}
|
288 |
|
289 |
// Fetch Assets AJAX Call? Make sure the output is as clean as possible (no plugins interfering with it)
|
290 |
// It can also be used for debugging purposes (via /?wpacu_clean_load) when you want to view all the CSS/JS
|
480 |
// Save CSS/JS list that is printed in the <BODY>
|
481 |
add_action('wp_print_footer_scripts', array($this, 'saveFooterAssets'), 100000000);
|
482 |
add_action('wp_footer', array($this, 'printScriptsStyles'), (PHP_INT_MAX - 1));
|
483 |
+
|
484 |
+
// Send an AJAX request to get the list of the loaded hardcoded scripts and styles and print it
|
485 |
+
add_action( 'wp_ajax_' . WPACU_PLUGIN_ID . '_print_loaded_hardcoded_assets', array( $this, 'ajaxPrintLoadedHardcodedAssets' ) );
|
486 |
+
}
|
487 |
|
488 |
if ( is_admin() ) {
|
489 |
$metaboxes = new MetaBoxes;
|
645 |
*/
|
646 |
public function maybeFilterAssetObject($object, $assetType)
|
647 |
{
|
648 |
+
if ( isset($_GET['wpacu_clean_load']) || isset($_GET['wpacu_load_original']) ) {
|
649 |
return $object; // this is for debugging purposes, load the original source
|
650 |
}
|
651 |
|
653 |
return $object;
|
654 |
}
|
655 |
|
|
|
|
|
|
|
|
|
|
|
656 |
$filterTagName = 'wpacu_'.$object->handle.'_'.$assetType.'_handle_data';
|
657 |
|
658 |
if ( has_filter($filterTagName) ) {
|
662 |
if ( isset($originData['src'], $newData['src']) && $newData['src'] !== $originData['src'] ) {
|
663 |
$object->src = $newData['src'];
|
664 |
$object->src_origin = $originData['src'];
|
|
|
665 |
|
666 |
+
$object->ver = $newData['ver'] ? $newData['ver'] : null;
|
667 |
+
$object->ver_origin = isset($originData['ver']) ? $originData['ver'] : null;
|
|
|
668 |
}
|
669 |
}
|
670 |
|
852 |
|
853 |
// Ignore auto generated handles for the hardcoded CSS as they were added for reference purposes
|
854 |
// They will get stripped later on via OptimizeCommon.php
|
855 |
+
// This is in case there are references from using the Pro version
|
856 |
+
if (strpos($handle, 'wpacu_hardcoded_link_') === 0) {
|
857 |
continue;
|
858 |
}
|
859 |
|
1128 |
$this->allUnloadedAssets['js'][] = $handle;
|
1129 |
}
|
1130 |
|
1131 |
+
// Ignore auto generated handles for the hardcoded CSS as they were added for reference purposes
|
1132 |
+
// They will get stripped later on via OptimizeCommon.php
|
1133 |
+
// The handle is used just for reference for later stripping via altering the DOM
|
1134 |
+
if (strpos($handle, 'wpacu_hardcoded_script_inline_') !== false) {
|
1135 |
+
// [wpacu_pro]
|
1136 |
+
$saveMarkedHandles = ObjectCache::wpacu_cache_get('wpacu_hardcoded_scripts_inline') ?: array();
|
1137 |
+
$saveMarkedHandles[] = $handle;
|
1138 |
+
ObjectCache::wpacu_cache_set( 'wpacu_hardcoded_scripts_inline', $saveMarkedHandles );
|
1139 |
+
// [/wpacu_pro]
|
1140 |
+
continue;
|
1141 |
+
}
|
1142 |
+
|
1143 |
+
if (strpos($handle, 'wpacu_hardcoded_script_src_') !== false) {
|
1144 |
+
// [wpacu_pro]
|
1145 |
+
$saveMarkedHandles = ObjectCache::wpacu_cache_get('wpacu_hardcoded_scripts_src') ?: array();
|
1146 |
+
$saveMarkedHandles[] = $handle;
|
1147 |
+
ObjectCache::wpacu_cache_set( 'wpacu_hardcoded_scripts_src', $saveMarkedHandles );
|
1148 |
+
// [/wpacu_pro]
|
1149 |
+
continue;
|
1150 |
+
}
|
1151 |
+
|
1152 |
// Special Action for 'jquery-migrate' handler as its tied to 'jquery'
|
1153 |
if ($handle === 'jquery-migrate' && isset($this->wpAllScripts['registered']['jquery'])) {
|
1154 |
$jQueryRegScript = $this->wpAllScripts['registered']['jquery'];
|
1172 |
continue;
|
1173 |
}
|
1174 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1175 |
wp_deregister_script($handle);
|
1176 |
wp_dequeue_script($handle);
|
1177 |
}
|
2013 |
|
2014 |
ObjectCache::wpacu_cache_set('wpacu_settings_frontend_data', $data);
|
2015 |
$this->parseTemplate('settings-frontend', $data, true);
|
2016 |
+
} elseif ($isDashboardEditView && ! array_key_exists('wpacu_just_hardcoded', $_GET)) {
|
2017 |
// AJAX call (not the classic WP one) from the WP Dashboard
|
2018 |
// Send the altered value that has the initial position too
|
2019 |
|
2039 |
// and we need the non-minified version of the DOM (e.g. to determine the position of the elements)
|
2040 |
exit();
|
2041 |
});
|
2042 |
+
} elseif ($isDashboardEditView && array_key_exists('wpacu_just_hardcoded', $_GET)) {
|
2043 |
+
// AJAX call just for the hardcoded assets
|
2044 |
+
echo self::START_DEL_HARDCODED . '{wpacu_hardcoded_assets}' . self::END_DEL_HARDCODED; // Make the user aware of any hardcoded CSS/JS (if any)
|
2045 |
+
|
2046 |
+
add_action('shutdown', static function() {
|
2047 |
+
// Do not allow further processes as cache plugins such as W3 Total Cache could alter the source code
|
2048 |
+
// and we need the non-minified version of the DOM (e.g. to determine the position of the elements)
|
2049 |
+
exit();
|
2050 |
+
});
|
2051 |
}
|
2052 |
|
2053 |
/* [wpacu_timing] */ Misc::scriptExecTimer($wpacuTimingName, 'end'); /* [/wpacu_timing] */
|
2271 |
exit();
|
2272 |
}
|
2273 |
|
2274 |
+
/**
|
2275 |
+
*
|
2276 |
+
*/
|
2277 |
+
public function ajaxPrintLoadedHardcodedAssets()
|
2278 |
+
{
|
2279 |
+
$wpacuListH = Misc::getVar('post', 'wpacu_list_h');
|
2280 |
+
$wpacuSettingsJson = base64_decode(Misc::getVar('post', 'wpacu_settings'));
|
2281 |
+
$wpacuSettings = (array)json_decode($wpacuSettingsJson, ARRAY_A);
|
2282 |
+
|
2283 |
+
// Only set the following variables if there is at least one hardcoded LINK/STYLE/SCRIPT
|
2284 |
+
$jsonH = base64_decode( $wpacuListH );
|
2285 |
+
|
2286 |
+
$wpacuPrintHardcodedManagementList = static function($jsonH, $wpacuSettings) {
|
2287 |
+
$data = $wpacuSettings ?: array();
|
2288 |
+
$data['do_not_print_list'] = true;
|
2289 |
+
$data['print_outer_html'] = false;
|
2290 |
+
$data['all']['hardcoded'] = (array)json_decode($jsonH, ARRAY_A);
|
2291 |
+
$totalHardcodedTags = 0; // default
|
2292 |
+
if (isset($data['all']['hardcoded']['within_conditional_comments']) && ! empty($data['all']['hardcoded']['within_conditional_comments'])) {
|
2293 |
+
ObjectCache::wpacu_cache_set( 'wpacu_hardcoded_content_within_conditional_comments', $data['all']['hardcoded']['within_conditional_comments'] );
|
2294 |
+
}
|
2295 |
+
|
2296 |
+
ob_start();
|
2297 |
+
// $totalHardcodedTags is set here
|
2298 |
+
include_once WPACU_PLUGIN_DIR.'/templates/meta-box-loaded-assets/_assets-hardcoded-list.php'; // generate $hardcodedTagsOutput
|
2299 |
+
$output = ob_get_clean();
|
2300 |
+
|
2301 |
+
return json_encode( array(
|
2302 |
+
'output' => $output,
|
2303 |
+
'total_hardcoded_assets' => $totalHardcodedTags
|
2304 |
+
) );
|
2305 |
+
};
|
2306 |
+
|
2307 |
+
echo $wpacuPrintHardcodedManagementList( $jsonH, $wpacuSettings );
|
2308 |
+
|
2309 |
+
exit();
|
2310 |
+
}
|
2311 |
+
|
2312 |
/**
|
2313 |
* @return false|mixed|string|void
|
2314 |
*/
|
2846 |
return $this->currentPostId;
|
2847 |
}
|
2848 |
|
2849 |
+
if (Misc::isElementorMaintenanceModeOnForCurrentAdmin() && defined('WPACU_IS_ELEMENTOR_MAINTENANCE_MODE_TEMPLATE_ID')) {
|
2850 |
+
$this->currentPostId = WPACU_IS_ELEMENTOR_MAINTENANCE_MODE_TEMPLATE_ID;
|
2851 |
+
return $this->currentPostId;
|
2852 |
+
}
|
2853 |
+
|
2854 |
// Are we on the `Shop` page from WooCommerce?
|
2855 |
// Only check option if function `is_shop` exists
|
2856 |
$wooCommerceShopPageId = function_exists('is_shop') ? get_option('woocommerce_shop_page_id') : 0;
|
classes/Maintenance.php
CHANGED
@@ -66,11 +66,23 @@ class Maintenance
|
|
66 |
*/
|
67 |
public static function triggerDailyScheduleEvents()
|
68 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
// Check if there are too many .css /.js combined files in the caching directory and change settings
|
70 |
// to prevent the appending of the inline CSS/JS code that is likely the culprit of so many files
|
71 |
$settingsClass = new Settings();
|
72 |
-
$settings = $settingsClass->getAll();
|
73 |
$settingsClass::toggleAppendInlineAssocCodeHiddenSettings($settings, true);
|
|
|
74 |
}
|
75 |
|
76 |
/**
|
66 |
*/
|
67 |
public static function triggerDailyScheduleEvents()
|
68 |
{
|
69 |
+
// WordPress Version below 5.5? Skip appending CSS/JS code to the combine CSS/JS list
|
70 |
+
if ( ! Misc::isWpVersionAtLeast('5.5') ) {
|
71 |
+
$settingsClass = new Settings();
|
72 |
+
$optionsToUpdate = array(
|
73 |
+
'_combine_loaded_css_append_handle_extra' => '',
|
74 |
+
'_combine_loaded_js_append_handle_extra' => ''
|
75 |
+
);
|
76 |
+
$settingsClass->updateOption(array_keys($optionsToUpdate), array_values($optionsToUpdate));
|
77 |
+
return;
|
78 |
+
}
|
79 |
+
|
80 |
// Check if there are too many .css /.js combined files in the caching directory and change settings
|
81 |
// to prevent the appending of the inline CSS/JS code that is likely the culprit of so many files
|
82 |
$settingsClass = new Settings();
|
83 |
+
$settings = $settingsClass->getAll(true);
|
84 |
$settingsClass::toggleAppendInlineAssocCodeHiddenSettings($settings, true);
|
85 |
+
|
86 |
}
|
87 |
|
88 |
/**
|
classes/Misc.php
CHANGED
@@ -181,6 +181,44 @@ class Misc
|
|
181 |
return $postUrl;
|
182 |
}
|
183 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
184 |
/**
|
185 |
* @return mixed
|
186 |
*/
|
@@ -188,6 +226,11 @@ class Misc
|
|
188 |
{
|
189 |
// Docs: https://codex.wordpress.org/Conditional_Tags
|
190 |
|
|
|
|
|
|
|
|
|
|
|
191 |
// "Your latest posts" -> sometimes it works as is_front_page(), sometimes as is_home())
|
192 |
// "A static page (select below)" -> In this case is_front_page() should work
|
193 |
|
@@ -1154,6 +1197,33 @@ SQL;
|
|
1154 |
return array(); // no relevant files
|
1155 |
}
|
1156 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1157 |
/**
|
1158 |
* @param $list
|
1159 |
* @param string $for
|
181 |
return $postUrl;
|
182 |
}
|
183 |
|
184 |
+
/**
|
185 |
+
* @return bool
|
186 |
+
*/
|
187 |
+
public static function isElementorMaintenanceModeOn()
|
188 |
+
{
|
189 |
+
// Elementor's maintenance or coming soon mode
|
190 |
+
if (class_exists('\Elementor\Maintenance_Mode') && Misc::isPluginActive('elementor/elementor.php')) {
|
191 |
+
try {
|
192 |
+
$elementorMaintenanceMode = \Elementor\Maintenance_Mode::get( 'mode' ); // if any
|
193 |
+
if ( $elementorMaintenanceMode && in_array($elementorMaintenanceMode, array('maintenance', 'coming_soon')) ) {
|
194 |
+
return true;
|
195 |
+
}
|
196 |
+
} catch (\Exception $err) {}
|
197 |
+
}
|
198 |
+
|
199 |
+
return false;
|
200 |
+
}
|
201 |
+
|
202 |
+
/**
|
203 |
+
* @return bool
|
204 |
+
*/
|
205 |
+
public static function isElementorMaintenanceModeOnForCurrentAdmin()
|
206 |
+
{
|
207 |
+
if (class_exists('\Elementor\Maintenance_Mode') && Misc::isPluginActive('elementor/elementor.php')) {
|
208 |
+
try {
|
209 |
+
// Elementor Template ID (Chosen for maintenance or coming soon mode)
|
210 |
+
$elementorMaintenanceModeTemplateId = \Elementor\Maintenance_Mode::get( 'template_id' );
|
211 |
+
|
212 |
+
if ( isset( $GLOBALS['post']->ID ) && (int)$elementorMaintenanceModeTemplateId === (int)$GLOBALS['post']->ID ) {
|
213 |
+
define( 'WPACU_IS_ELEMENTOR_MAINTENANCE_MODE_TEMPLATE_ID', $elementorMaintenanceModeTemplateId );
|
214 |
+
return true;
|
215 |
+
}
|
216 |
+
} catch (\Exception $err) {}
|
217 |
+
}
|
218 |
+
|
219 |
+
return false;
|
220 |
+
}
|
221 |
+
|
222 |
/**
|
223 |
* @return mixed
|
224 |
*/
|
226 |
{
|
227 |
// Docs: https://codex.wordpress.org/Conditional_Tags
|
228 |
|
229 |
+
// Elementor's Maintenance Mode is ON
|
230 |
+
if (defined('WPACU_IS_ELEMENTOR_MAINTENANCE_MODE_TEMPLATE_ID')) {
|
231 |
+
return false;
|
232 |
+
}
|
233 |
+
|
234 |
// "Your latest posts" -> sometimes it works as is_front_page(), sometimes as is_home())
|
235 |
// "A static page (select below)" -> In this case is_front_page() should work
|
236 |
|
1197 |
return array(); // no relevant files
|
1198 |
}
|
1199 |
|
1200 |
+
/**
|
1201 |
+
* @param $targetDir
|
1202 |
+
*/
|
1203 |
+
public static function rmDir($targetDir)
|
1204 |
+
{
|
1205 |
+
if (! is_dir($targetDir)) {
|
1206 |
+
return;
|
1207 |
+
}
|
1208 |
+
|
1209 |
+
$totalFiles = count(scandir($targetDir)) - 2; // exclude . and ..
|
1210 |
+
|
1211 |
+
if ($totalFiles < 1) { // could be 0 or negative
|
1212 |
+
@rmdir($targetDir); // @ was appended just in case
|
1213 |
+
}
|
1214 |
+
}
|
1215 |
+
|
1216 |
+
/**
|
1217 |
+
* @param $targetVersion
|
1218 |
+
*
|
1219 |
+
* @return bool
|
1220 |
+
*/
|
1221 |
+
public static function isWpVersionAtLeast($targetVersion)
|
1222 |
+
{
|
1223 |
+
global $wp_version;
|
1224 |
+
return ( version_compare($wp_version, $targetVersion) >= 0 );
|
1225 |
+
}
|
1226 |
+
|
1227 |
/**
|
1228 |
* @param $list
|
1229 |
* @param string $for
|
classes/OptimiseAssets/CombineCss.php
CHANGED
@@ -129,7 +129,7 @@ class CombineCss
|
|
129 |
if ( $localAssetPath ) {
|
130 |
$styleExtra = array();
|
131 |
|
132 |
-
if (isset($linkAttributes['data-wpacu-style-handle'], $wpacuRegisteredStyles[$linkAttributes['data-wpacu-style-handle']]->extra) &&
|
133 |
$styleExtra = $wpacuRegisteredStyles[$linkAttributes['data-wpacu-style-handle']]->extra;
|
134 |
}
|
135 |
|
@@ -471,7 +471,7 @@ HTML;
|
|
471 |
$finalShaOneContent = implode('', $combinedUriPaths);
|
472 |
|
473 |
// Is '_combine_loaded_css_append_handle_extra' turned ON?
|
474 |
-
if (
|
475 |
$afterContentForAll = '';
|
476 |
|
477 |
foreach ($localAssetsExtra as $values) {
|
@@ -536,7 +536,7 @@ HTML;
|
|
536 |
*/
|
537 |
public static function stripTagAndAnyInlineAssocCode($targetedLinkTag, $wpacuRegisteredStyles, $replaceWith, $htmlSource)
|
538 |
{
|
539 |
-
if (
|
540 |
$scriptExtrasHtml = OptimizeCss::getInlineAssociatedWithLinkHandle($targetedLinkTag, $wpacuRegisteredStyles, 'tag', 'html');
|
541 |
$scriptExtraAfterHtml = (isset($scriptExtrasHtml['after']) && $scriptExtrasHtml['after']) ? "\n".$scriptExtrasHtml['after'] : '';
|
542 |
|
129 |
if ( $localAssetPath ) {
|
130 |
$styleExtra = array();
|
131 |
|
132 |
+
if (isset($linkAttributes['data-wpacu-style-handle'], $wpacuRegisteredStyles[$linkAttributes['data-wpacu-style-handle']]->extra) && OptimizeCommon::appendInlineCodeToCombineAssetType('css')) {
|
133 |
$styleExtra = $wpacuRegisteredStyles[$linkAttributes['data-wpacu-style-handle']]->extra;
|
134 |
}
|
135 |
|
471 |
$finalShaOneContent = implode('', $combinedUriPaths);
|
472 |
|
473 |
// Is '_combine_loaded_css_append_handle_extra' turned ON?
|
474 |
+
if ( OptimizeCommon::appendInlineCodeToCombineAssetType('css') && ! empty($localAssetsExtra) ) {
|
475 |
$afterContentForAll = '';
|
476 |
|
477 |
foreach ($localAssetsExtra as $values) {
|
536 |
*/
|
537 |
public static function stripTagAndAnyInlineAssocCode($targetedLinkTag, $wpacuRegisteredStyles, $replaceWith, $htmlSource)
|
538 |
{
|
539 |
+
if (OptimizeCommon::appendInlineCodeToCombineAssetType('css')) {
|
540 |
$scriptExtrasHtml = OptimizeCss::getInlineAssociatedWithLinkHandle($targetedLinkTag, $wpacuRegisteredStyles, 'tag', 'html');
|
541 |
$scriptExtraAfterHtml = (isset($scriptExtrasHtml['after']) && $scriptExtrasHtml['after']) ? "\n".$scriptExtrasHtml['after'] : '';
|
542 |
|
classes/OptimiseAssets/CombineJs.php
CHANGED
@@ -143,7 +143,7 @@ class CombineJs
|
|
143 |
}
|
144 |
|
145 |
// Once an inline SCRIPT (with few exceptions below), except the ones associated with an enqueued script tag (with "src") is stumbled upon, a new combined group in the HEAD tag will be formed
|
146 |
-
if ($handleToCheck &&
|
147 |
$getInlineAssociatedWithHandle = OptimizeJs::getInlineAssociatedWithScriptHandle($handleToCheck, $wpacuRegisteredScripts, 'handle');
|
148 |
|
149 |
if ( ($getInlineAssociatedWithHandle['data'] || $getInlineAssociatedWithHandle['before'] || $getInlineAssociatedWithHandle['after'])
|
@@ -203,7 +203,7 @@ class CombineJs
|
|
203 |
if ( $localAssetPath = OptimizeCommon::getLocalAssetPath( $src, 'js' ) ) {
|
204 |
$scriptExtra = array();
|
205 |
|
206 |
-
if (isset($scriptAttributes['data-wpacu-script-handle'], $wpacuRegisteredScripts[$scriptAttributes['data-wpacu-script-handle']]->extra) &&
|
207 |
$scriptExtra = $wpacuRegisteredScripts[$scriptAttributes['data-wpacu-script-handle']]->extra;
|
208 |
}
|
209 |
|
@@ -447,6 +447,11 @@ HTML;
|
|
447 |
$htmlAfterFirstCombinedDeferScriptMaybeChanged = $htmlAfterFirstCombinedDeferScript;
|
448 |
}
|
449 |
|
|
|
|
|
|
|
|
|
|
|
450 |
$domTag = new \DOMDocument();
|
451 |
libxml_use_internal_errors(true);
|
452 |
|
@@ -591,10 +596,10 @@ HTML;
|
|
591 |
$contentToAddToCombinedFile = '/*!'.str_replace(ABSPATH, '/', $localAssetsPath)."*/\n";
|
592 |
|
593 |
// This includes the extra from 'data' (CDATA added via wp_localize_script()) & 'before' as they are both printed BEFORE the SCRIPT tag
|
594 |
-
$contentToAddToCombinedFile .= self::appendToCombineJs('before', $localAssetsExtra, $assetHref, $pathToAssetDir);
|
595 |
-
$contentToAddToCombinedFile .= OptimizeJs::maybeDoJsFixes($jsContent, $pathToAssetDir . '/') . "\n";
|
596 |
// This includes the inline 'after' the SCRIPT tag
|
597 |
-
$contentToAddToCombinedFile .= self::appendToCombineJs('after', $localAssetsExtra, $assetHref, $pathToAssetDir);
|
598 |
|
599 |
$finalJsContents .= $contentToAddToCombinedFile;
|
600 |
}
|
@@ -622,7 +627,7 @@ HTML;
|
|
622 |
$finalShaOneContent = implode('', $combinedUriPaths);
|
623 |
|
624 |
// Is '_combine_loaded_js_append_handle_extra' turned ON?
|
625 |
-
if (
|
626 |
$afterContentForAll = '';
|
627 |
|
628 |
foreach ( $localAssetsExtra as $values ) {
|
@@ -710,6 +715,28 @@ HTML;
|
|
710 |
return $extraContentToAppend;
|
711 |
}
|
712 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
713 |
/**
|
714 |
* @param $scriptTag
|
715 |
* @param $wpacuRegisteredScripts
|
@@ -720,7 +747,7 @@ HTML;
|
|
720 |
*/
|
721 |
public static function stripTagAndAnyInlineAssocCode($scriptTag, $wpacuRegisteredScripts, $replaceWith, $htmlSource)
|
722 |
{
|
723 |
-
if (
|
724 |
$scriptExtrasValue = OptimizeJs::getInlineAssociatedWithScriptHandle($scriptTag, $wpacuRegisteredScripts, 'tag', 'value');
|
725 |
|
726 |
$scriptExtraCdataValue = (isset($scriptExtrasValue['data']) && $scriptExtrasValue['data']) ? $scriptExtrasValue['data'] : '';
|
@@ -776,7 +803,7 @@ HTML;
|
|
776 |
public static function isInlineJsCombineable($jsInlineValue)
|
777 |
{
|
778 |
// The common WordPress nonce
|
779 |
-
if (strpos($jsInlineValue, '
|
780 |
return false;
|
781 |
}
|
782 |
|
143 |
}
|
144 |
|
145 |
// Once an inline SCRIPT (with few exceptions below), except the ones associated with an enqueued script tag (with "src") is stumbled upon, a new combined group in the HEAD tag will be formed
|
146 |
+
if ($handleToCheck && OptimizeCommon::appendInlineCodeToCombineAssetType('js')) {
|
147 |
$getInlineAssociatedWithHandle = OptimizeJs::getInlineAssociatedWithScriptHandle($handleToCheck, $wpacuRegisteredScripts, 'handle');
|
148 |
|
149 |
if ( ($getInlineAssociatedWithHandle['data'] || $getInlineAssociatedWithHandle['before'] || $getInlineAssociatedWithHandle['after'])
|
203 |
if ( $localAssetPath = OptimizeCommon::getLocalAssetPath( $src, 'js' ) ) {
|
204 |
$scriptExtra = array();
|
205 |
|
206 |
+
if (isset($scriptAttributes['data-wpacu-script-handle'], $wpacuRegisteredScripts[$scriptAttributes['data-wpacu-script-handle']]->extra) && OptimizeCommon::appendInlineCodeToCombineAssetType('js')) {
|
207 |
$scriptExtra = $wpacuRegisteredScripts[$scriptAttributes['data-wpacu-script-handle']]->extra;
|
208 |
}
|
209 |
|
447 |
$htmlAfterFirstCombinedDeferScriptMaybeChanged = $htmlAfterFirstCombinedDeferScript;
|
448 |
}
|
449 |
|
450 |
+
// It means to combine took place for any reason (e.g. only one JS file loaded in the HEAD and one in the BODY)
|
451 |
+
if (! isset($htmlAfterFirstCombinedDeferScript)) {
|
452 |
+
return $htmlSource;
|
453 |
+
}
|
454 |
+
|
455 |
$domTag = new \DOMDocument();
|
456 |
libxml_use_internal_errors(true);
|
457 |
|
596 |
$contentToAddToCombinedFile = '/*!'.str_replace(ABSPATH, '/', $localAssetsPath)."*/\n";
|
597 |
|
598 |
// This includes the extra from 'data' (CDATA added via wp_localize_script()) & 'before' as they are both printed BEFORE the SCRIPT tag
|
599 |
+
$contentToAddToCombinedFile .= self::maybeWrapBetweenTryCatch(self::appendToCombineJs('before', $localAssetsExtra, $assetHref, $pathToAssetDir), $assetHref);
|
600 |
+
$contentToAddToCombinedFile .= self::maybeWrapBetweenTryCatch(OptimizeJs::maybeDoJsFixes($jsContent, $pathToAssetDir . '/'), $assetHref) . "\n";
|
601 |
// This includes the inline 'after' the SCRIPT tag
|
602 |
+
$contentToAddToCombinedFile .= self::maybeWrapBetweenTryCatch(self::appendToCombineJs('after', $localAssetsExtra, $assetHref, $pathToAssetDir), $assetHref);
|
603 |
|
604 |
$finalJsContents .= $contentToAddToCombinedFile;
|
605 |
}
|
627 |
$finalShaOneContent = implode('', $combinedUriPaths);
|
628 |
|
629 |
// Is '_combine_loaded_js_append_handle_extra' turned ON?
|
630 |
+
if ( OptimizeCommon::appendInlineCodeToCombineAssetType('js') && ! empty($localAssetsExtra) ) {
|
631 |
$afterContentForAll = '';
|
632 |
|
633 |
foreach ( $localAssetsExtra as $values ) {
|
715 |
return $extraContentToAppend;
|
716 |
}
|
717 |
|
718 |
+
/**
|
719 |
+
* @param $jsCode
|
720 |
+
* @param $sourceUrl
|
721 |
+
*
|
722 |
+
* @return string
|
723 |
+
*/
|
724 |
+
public static function maybeWrapBetweenTryCatch($jsCode, $sourceUrl)
|
725 |
+
{
|
726 |
+
if ($jsCode && Main::instance()->settings['combine_loaded_js_try_catch']) {
|
727 |
+
$jsCodeWithTryCatch = <<<JS
|
728 |
+
try {
|
729 |
+
{$jsCode}
|
730 |
+
} catch (err) {
|
731 |
+
console.log("Asset CleanUp - There is a JavaScript error related to the following source: {$sourceUrl} - Error: " + err.message);
|
732 |
+
}
|
733 |
+
JS;
|
734 |
+
return $jsCodeWithTryCatch;
|
735 |
+
}
|
736 |
+
|
737 |
+
return $jsCode;
|
738 |
+
}
|
739 |
+
|
740 |
/**
|
741 |
* @param $scriptTag
|
742 |
* @param $wpacuRegisteredScripts
|
747 |
*/
|
748 |
public static function stripTagAndAnyInlineAssocCode($scriptTag, $wpacuRegisteredScripts, $replaceWith, $htmlSource)
|
749 |
{
|
750 |
+
if (OptimizeCommon::appendInlineCodeToCombineAssetType('js')) {
|
751 |
$scriptExtrasValue = OptimizeJs::getInlineAssociatedWithScriptHandle($scriptTag, $wpacuRegisteredScripts, 'tag', 'value');
|
752 |
|
753 |
$scriptExtraCdataValue = (isset($scriptExtrasValue['data']) && $scriptExtrasValue['data']) ? $scriptExtrasValue['data'] : '';
|
803 |
public static function isInlineJsCombineable($jsInlineValue)
|
804 |
{
|
805 |
// The common WordPress nonce
|
806 |
+
if (strpos($jsInlineValue, 'nonce') !== false) {
|
807 |
return false;
|
808 |
}
|
809 |
|
classes/OptimiseAssets/FontsGoogle.php
CHANGED
@@ -159,7 +159,7 @@ class FontsGoogle
|
|
159 |
}
|
160 |
|
161 |
/*
|
162 |
-
* Remove Google Fonts
|
163 |
*/
|
164 |
if (Main::instance()->settings['google_fonts_remove']) {
|
165 |
return FontsGoogleRemove::cleanHtmlSource($htmlSource);
|
@@ -168,90 +168,92 @@ class FontsGoogle
|
|
168 |
/*
|
169 |
* Optimize Google Fonts
|
170 |
*/
|
|
|
|
|
|
|
|
|
171 |
|
172 |
-
|
173 |
-
|
174 |
-
$altHtmlSource = preg_replace('/<!--(.|\s)*?-->/', '', $altHtmlSource);
|
175 |
|
176 |
-
|
177 |
-
|
|
|
178 |
|
179 |
-
|
180 |
-
|
181 |
-
$finalCombinableLinks = $preloadedLinks = array();
|
182 |
|
183 |
-
|
184 |
-
|
|
|
|
|
|
|
|
|
185 |
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
continue;
|
191 |
-
}
|
192 |
|
193 |
-
|
194 |
-
|
195 |
-
continue;
|
196 |
-
}
|
197 |
|
198 |
-
|
199 |
-
|
|
|
200 |
|
201 |
-
|
202 |
-
|
203 |
-
|
|
|
|
|
204 |
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
}
|
209 |
-
// [END] Remove invalid requests with no font family
|
210 |
|
211 |
-
|
212 |
-
|
213 |
-
$newLinkHref = $finalLinkHref = self::alterGoogleFontLink($linkHrefOriginal);
|
214 |
|
215 |
-
|
216 |
-
|
|
|
|
|
217 |
|
218 |
-
|
219 |
-
|
|
|
220 |
}
|
221 |
-
}
|
222 |
|
223 |
-
|
224 |
-
|| strpos($finalLinkTag, 'data-wpacu-to-be-preloaded-basic')) {
|
225 |
-
$preloadedLinks[] = $finalLinkHref;
|
226 |
}
|
227 |
|
228 |
-
$finalCombinableLinks[] = array('href' => $finalLinkHref, 'tag' => $finalLinkTag);
|
229 |
-
}
|
230 |
-
|
159 |
}
|
160 |
|
161 |
/*
|
162 |
+
* Remove Google Fonts? Stop here as optimization is no longer relevant
|
163 |
*/
|
164 |
if (Main::instance()->settings['google_fonts_remove']) {
|
165 |
return FontsGoogleRemove::cleanHtmlSource($htmlSource);
|
168 |
/*
|
169 |
* Optimize Google Fonts
|
170 |
*/
|
171 |
+
if (Main::instance()->settings['google_fonts_combine'] && stripos($htmlSource, self::$containsStr) !== false) {
|
172 |
+
// Cleaner HTML Source
|
173 |
+
$altHtmlSource = preg_replace( '@<(script|style|noscript)[^>]*?>.*?</\\1>@si', '', $htmlSource ); // strip irrelevant tags for the collection
|
174 |
+
$altHtmlSource = preg_replace( '/<!--[^>]*' . preg_quote( self::$containsStr, '/' ) . '.*?-->/', '', $altHtmlSource ); // strip any comments containing the string
|
175 |
|
176 |
+
// Get all valid LINKs that have the $string within them
|
177 |
+
preg_match_all( '#<link[^>]*' . self::$matchesStr . '.*(>)#Usmi', $altHtmlSource, $matchesFromLinkTags, PREG_SET_ORDER );
|
|
|
178 |
|
179 |
+
// Needs to match at least one to carry on with the replacements
|
180 |
+
if ( isset( $matchesFromLinkTags[0] ) && ! empty( $matchesFromLinkTags[0] ) ) {
|
181 |
+
$finalCombinableLinks = $preloadedLinks = array();
|
182 |
|
183 |
+
foreach ( $matchesFromLinkTags as $linkTagArray ) {
|
184 |
+
$linkTag = $finalLinkTag = trim( trim( $linkTagArray[0], '"\'' ) );
|
|
|
185 |
|
186 |
+
// Extra checks to make sure it's a valid LINK tag
|
187 |
+
if ( ( strpos( $linkTag, "'" ) !== false && ( substr_count( $linkTag, "'" ) % 2 ) )
|
188 |
+
|| ( strpos( $linkTag, '"' ) !== false && ( substr_count( $linkTag, '"' ) % 2 ) )
|
189 |
+
|| ( trim( strip_tags( $linkTag ) ) !== '' ) ) {
|
190 |
+
continue;
|
191 |
+
}
|
192 |
|
193 |
+
// Check if the CSS has any 'data-wpacu-skip' attribute; if it does, do not continue and leave it as it is (non-combined)
|
194 |
+
if ( preg_match( '#data-wpacu-skip([=>/ ])#i', $linkTag ) ) {
|
195 |
+
continue;
|
196 |
+
}
|
|
|
|
|
197 |
|
198 |
+
preg_match_all( '#href=(["\'])' . '(.*)' . '(["\'])#Usmi', $linkTag, $outputMatches );
|
199 |
+
$linkHrefOriginal = $finalLinkHref = trim( $outputMatches[2][0], '"\'' );
|
|
|
|
|
200 |
|
201 |
+
// [START] Remove invalid requests with no font family
|
202 |
+
$urlParse = parse_url( str_replace( '&', '&', $linkHrefOriginal ), PHP_URL_QUERY );
|
203 |
+
parse_str( $urlParse, $qStr );
|
204 |
|
205 |
+
if ( isset( $qStr['family'] ) && ! $qStr['family'] ) {
|
206 |
+
$htmlSource = str_replace( $linkTag, '', $htmlSource );
|
207 |
+
continue;
|
208 |
+
}
|
209 |
+
// [END] Remove invalid requests with no font family
|
210 |
|
211 |
+
// If anything is set apart from '[none set]', proceed
|
212 |
+
if ( Main::instance()->settings['google_fonts_display'] ) {
|
213 |
+
$newLinkHref = $finalLinkHref = self::alterGoogleFontLink( $linkHrefOriginal );
|
|
|
|
|
214 |
|
215 |
+
if ( $newLinkHref !== $linkHrefOriginal ) {
|
216 |
+
$finalLinkTag = str_replace( $linkHrefOriginal, $newLinkHref, $linkTag );
|
|
|
217 |
|
218 |
+
// Finally, alter the HTML source
|
219 |
+
$htmlSource = str_replace( $linkTag, $finalLinkTag, $htmlSource );
|
220 |
+
}
|
221 |
+
}
|
222 |
|
223 |
+
if ( preg_match( '/rel=(["\'])preload(["\'])/i', $finalLinkTag )
|
224 |
+
|| strpos( $finalLinkTag, 'data-wpacu-to-be-preloaded-basic' ) ) {
|
225 |
+
$preloadedLinks[] = $finalLinkHref;
|
226 |
}
|
|
|
227 |
|
228 |
+
$finalCombinableLinks[] = array( 'href' => $finalLinkHref, 'tag' => $finalLinkTag );
|
|
|
|
|
229 |
}
|
230 |
|
|
|
|
|
|