UNPKG

notiflix

Version:

Notiflix is a dependency-free, secure, and lightweight JavaScript library built with pure JavaScript, offering client-side non-blocking notifications, popup boxes, loading indicators, and more.

665 lines (601 loc) 116 kB
/*! * Notiflix (https://notiflix.github.io) * Version: 3.2.8 * Author: Furkan (https://github.com/furcan) * Copyright 2019 - 2025 Notiflix, MIT License (https://opensource.org/licenses/MIT) */ /* global define */ (function (root, factory) { if (typeof define === 'function' && define.amd) { define([], function () { return factory(root); }); } else if (typeof module === 'object' && typeof module.exports === 'object') { module.exports = factory(root); } else { root.Notiflix = factory(root); } })(typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : this, function (window) { 'use strict'; // COMMON: SSR check: begin if (typeof window === 'undefined' && typeof window.document === 'undefined') { return false; } // COMMON: SSR check: end // COMMON: Variables: begin var notiflixNamespace = 'Notiflix'; var notiflixConsoleDocs = '\n\nVisit documentation page to learn more: https://notiflix.github.io/documentation'; var defaultFontFamily = '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif'; // COMMON: Variables: end // NOTIFY: Default Settings: begin var typesNotify = { Success: 'Success', Failure: 'Failure', Warning: 'Warning', Info: 'Info', }; var newNotifySettings; var notifySettings = { wrapID: 'NotiflixNotifyWrap', // can not customizable overlayID: 'NotiflixNotifyOverlay', // can not customizable width: '280px', position: 'right-top', // 'right-top' - 'right-bottom' - 'left-top' - 'left-bottom' - 'center-top' - 'center-bottom' - 'center-center' distance: '10px', opacity: 1, borderRadius: '5px', rtl: false, timeout: 3000, messageMaxLength: 110, backOverlay: false, backOverlayColor: 'rgba(0,0,0,0.5)', plainText: true, showOnlyTheLastOne: false, clickToClose: false, pauseOnHover: true, ID: 'NotiflixNotify', className: 'notiflix-notify', zindex: 4001, fontFamily: 'Quicksand', fontSize: '13px', cssAnimation: true, cssAnimationDuration: 400, cssAnimationStyle: 'fade', // 'fade' - 'zoom' - 'from-right' - 'from-top' - 'from-bottom' - 'from-left' closeButton: false, useIcon: true, useFontAwesome: false, fontAwesomeIconStyle: 'basic', // 'basic' - 'shadow' fontAwesomeIconSize: '34px', success: { background: '#32c682', textColor: '#fff', childClassName: 'notiflix-notify-success', notiflixIconColor: 'rgba(0,0,0,0.2)', fontAwesomeClassName: 'fas fa-check-circle', fontAwesomeIconColor: 'rgba(0,0,0,0.2)', backOverlayColor: 'rgba(50,198,130,0.2)', }, failure: { background: '#ff5549', textColor: '#fff', childClassName: 'notiflix-notify-failure', notiflixIconColor: 'rgba(0,0,0,0.2)', fontAwesomeClassName: 'fas fa-times-circle', fontAwesomeIconColor: 'rgba(0,0,0,0.2)', backOverlayColor: 'rgba(255,85,73,0.2)', }, warning: { background: '#eebf31', textColor: '#fff', childClassName: 'notiflix-notify-warning', notiflixIconColor: 'rgba(0,0,0,0.2)', fontAwesomeClassName: 'fas fa-exclamation-circle', fontAwesomeIconColor: 'rgba(0,0,0,0.2)', backOverlayColor: 'rgba(238,191,49,0.2)', }, info: { background: '#26c0d3', textColor: '#fff', childClassName: 'notiflix-notify-info', notiflixIconColor: 'rgba(0,0,0,0.2)', fontAwesomeClassName: 'fas fa-info-circle', fontAwesomeIconColor: 'rgba(0,0,0,0.2)', backOverlayColor: 'rgba(38,192,211,0.2)', }, }; // NOTIFY: Default Settings: end // REPORT: Default Settings: begin var typesReport = { Success: 'Success', Failure: 'Failure', Warning: 'Warning', Info: 'Info', }; var newReportSettings; var reportSettings = { ID: 'NotiflixReportWrap', // can not customizable className: 'notiflix-report', width: '320px', backgroundColor: '#f8f8f8', borderRadius: '25px', rtl: false, zindex: 4002, backOverlay: true, backOverlayColor: 'rgba(0,0,0,0.5)', backOverlayClickToClose: false, fontFamily: 'Quicksand', svgSize: '110px', plainText: true, titleFontSize: '16px', titleMaxLength: 34, messageFontSize: '13px', messageMaxLength: 400, buttonFontSize: '14px', buttonMaxLength: 34, cssAnimation: true, cssAnimationDuration: 360, cssAnimationStyle: 'fade', // 'fade' - 'zoom' success: { svgColor: '#32c682', titleColor: '#1e1e1e', messageColor: '#242424', buttonBackground: '#32c682', buttonColor: '#fff', backOverlayColor: 'rgba(50,198,130,0.2)', }, failure: { svgColor: '#ff5549', titleColor: '#1e1e1e', messageColor: '#242424', buttonBackground: '#ff5549', buttonColor: '#fff', backOverlayColor: 'rgba(255,85,73,0.2)', }, warning: { svgColor: '#eebf31', titleColor: '#1e1e1e', messageColor: '#242424', buttonBackground: '#eebf31', buttonColor: '#fff', backOverlayColor: 'rgba(238,191,49,0.2)', }, info: { svgColor: '#26c0d3', titleColor: '#1e1e1e', messageColor: '#242424', buttonBackground: '#26c0d3', buttonColor: '#fff', backOverlayColor: 'rgba(38,192,211,0.2)', }, }; // REPORT: Default Settings: end // CONFIRM: Default Settings: begin var typesConfirm = { Show: 'Show', Ask: 'Ask', Prompt: 'Prompt', }; var newConfirmSettings; var confirmSettings = { ID: 'NotiflixConfirmWrap', // can not customizable className: 'notiflix-confirm', width: '300px', zindex: 4003, position: 'center', // 'center' - 'center-top' - 'center-bottom' - 'right-top' - 'right-center' - 'right-bottom' - 'left-top' - 'left-center' - 'left-bottom' distance: '10px', backgroundColor: '#f8f8f8', borderRadius: '25px', backOverlay: true, backOverlayColor: 'rgba(0,0,0,0.5)', rtl: false, fontFamily: 'Quicksand', cssAnimation: true, cssAnimationDuration: 300, cssAnimationStyle: 'fade', // 'zoom' - 'fade' plainText: true, titleColor: '#32c682', titleFontSize: '16px', titleMaxLength: 34, messageColor: '#1e1e1e', messageFontSize: '14px', messageMaxLength: 110, buttonsFontSize: '15px', buttonsMaxLength: 34, okButtonColor: '#f8f8f8', okButtonBackground: '#32c682', cancelButtonColor: '#f8f8f8', cancelButtonBackground: '#a9a9a9', }; // CONFIRM: Default Settings: end // LOADING: Default Settings: begin var typesLoading = { Standard: 'Standard', Hourglass: 'Hourglass', Circle: 'Circle', Arrows: 'Arrows', Dots: 'Dots', Pulse: 'Pulse', Custom: 'Custom', Notiflix: 'Notiflix', }; var newLoadingSettings; var loadingSettings = { ID: 'NotiflixLoadingWrap', // can not customizable className: 'notiflix-loading', zindex: 4000, backgroundColor: 'rgba(0,0,0,0.8)', rtl: false, fontFamily: 'Quicksand', cssAnimation: true, cssAnimationDuration: 400, clickToClose: false, customSvgUrl: null, customSvgCode: null, svgSize: '80px', svgColor: '#32c682', messageID: 'NotiflixLoadingMessage', messageFontSize: '15px', messageMaxLength: 34, messageColor: '#dcdcdc', }; // LOADING: Default Settings: end // BLOCK: Default Settings: begin var typesBlock = { Standard: 'Standard', Hourglass: 'Hourglass', Circle: 'Circle', Arrows: 'Arrows', Dots: 'Dots', Pulse: 'Pulse', }; var newBlockSettings; var blockSettings = { ID: 'NotiflixBlockWrap', // can not customizable querySelectorLimit: 200, className: 'notiflix-block', position: 'absolute', zindex: 1000, backgroundColor: 'rgba(255,255,255,0.9)', rtl: false, fontFamily: 'Quicksand', cssAnimation: true, cssAnimationDuration: 300, svgSize: '45px', svgColor: '#383838', messageFontSize: '14px', messageMaxLength: 34, messageColor: '#383838', }; // BLOCK: Default Settings: end // COMMON: Console Error: begin var commonConsoleError = function (message) { return console.error('%c ' + notiflixNamespace + ' Error ', 'padding:2px;border-radius:20px;color:#fff;background:#ff5549', '\n' + message + notiflixConsoleDocs); }; // COMMON: Console Error: end // COMMON: Console Log: begin var commonConsoleLog = function (message) { return console.log('%c ' + notiflixNamespace + ' Info ', 'padding:2px;border-radius:20px;color:#fff;background:#26c0d3', '\n' + message + notiflixConsoleDocs); }; // COMMON: Console Log: end // COMMON: Check Head or Body: begin var commonCheckHeadOrBody = function (element) { if (!element) { element = 'head'; } if (window.document[element] === undefined) { commonConsoleError('\nNotiflix needs to be appended to the "<' + element + '>" element, but you called it before the "<' + element + '>" element has been created.'); return false; } return true; }; // COMMON: Check Head or Body: end // COMMON: Set Internal CSS Codes: begin var commonSetInternalCSSCodes = function (getInternalCSSCodes, styleElementId) { // check doc head if (!commonCheckHeadOrBody('head')) { return false; } // internal css if (getInternalCSSCodes() !== null && !window.document.getElementById(styleElementId)) { var internalCSS = window.document.createElement('style'); internalCSS.id = styleElementId; internalCSS.innerHTML = getInternalCSSCodes(); window.document.head.appendChild(internalCSS); } }; // COMMON: Set Internal CSS Codes: end // COMMON: Extend Options: begin var commonExtendOptions = function () { // variables var extended = {}; var deep = false; var i = 0; // check if a deep merge if (Object.prototype.toString.call(arguments[0]) === '[object Boolean]') { deep = arguments[0]; i++; } // merge the object into the extended object var merge = function (obj) { for (var prop in obj) { if (Object.prototype.hasOwnProperty.call(obj, prop)) { // if property is an object, merge properties if (deep && Object.prototype.toString.call(obj[prop]) === '[object Object]') { extended[prop] = commonExtendOptions(extended[prop], obj[prop]); } else { extended[prop] = obj[prop]; } } } }; // loop through each object and conduct a merge for (; i < arguments.length; i++) { merge(arguments[i]); } return extended; }; // COMMON: Extend Options: end // COMMON: Get Plaintext: begin var commonGetPlaintext = function (html) { var htmlPool = window.document.createElement('div'); htmlPool.innerHTML = html; return htmlPool.textContent || htmlPool.innerText || ''; }; // COMMON: Get Plaintext: end // REPORT: SVG Icon Success: begin var reportSvgIconSuccess = function (width, color) { if (!width) { width = '110px'; } if (!color) { color = '#32c682'; } var reportSvgSuccess = '<svg xmlns="http://www.w3.org/2000/svg" id="NXReportSuccess" width="' + width + '" height="' + width + '" fill="' + color + '" viewBox="0 0 120 120"><style>@-webkit-keyframes NXReportSuccess1-animation{0%{-webkit-transform:translate(60px,57.7px) scale(.5,.5) translate(-60px,-57.7px);transform:translate(60px,57.7px) scale(.5,.5) translate(-60px,-57.7px)}50%,to{-webkit-transform:translate(60px,57.7px) scale(1,1) translate(-60px,-57.7px);transform:translate(60px,57.7px) scale(1,1) translate(-60px,-57.7px)}60%{-webkit-transform:translate(60px,57.7px) scale(.95,.95) translate(-60px,-57.7px);transform:translate(60px,57.7px) scale(.95,.95) translate(-60px,-57.7px)}}@keyframes NXReportSuccess1-animation{0%{-webkit-transform:translate(60px,57.7px) scale(.5,.5) translate(-60px,-57.7px);transform:translate(60px,57.7px) scale(.5,.5) translate(-60px,-57.7px)}50%,to{-webkit-transform:translate(60px,57.7px) scale(1,1) translate(-60px,-57.7px);transform:translate(60px,57.7px) scale(1,1) translate(-60px,-57.7px)}60%{-webkit-transform:translate(60px,57.7px) scale(.95,.95) translate(-60px,-57.7px);transform:translate(60px,57.7px) scale(.95,.95) translate(-60px,-57.7px)}}@-webkit-keyframes NXReportSuccess4-animation{0%{opacity:0}50%,to{opacity:1}}@keyframes NXReportSuccess4-animation{0%{opacity:0}50%,to{opacity:1}}@-webkit-keyframes NXReportSuccess3-animation{0%{opacity:0}40%,to{opacity:1}}@keyframes NXReportSuccess3-animation{0%{opacity:0}40%,to{opacity:1}}@-webkit-keyframes NXReportSuccess2-animation{0%{-webkit-transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px);transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px)}40%,to{-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px);transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)}60%{-webkit-transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px);transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px)}}@keyframes NXReportSuccess2-animation{0%{-webkit-transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px);transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px)}40%,to{-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px);transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)}60%{-webkit-transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px);transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px)}}#NXReportSuccess *{-webkit-animation-duration:1.2s;animation-duration:1.2s;-webkit-animation-timing-function:cubic-bezier(0,0,1,1);animation-timing-function:cubic-bezier(0,0,1,1)}</style><g style="-webkit-animation-name:NXReportSuccess2-animation;animation-name:NXReportSuccess2-animation;-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px);-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1)"><path d="M60 115.38C29.46 115.38 4.62 90.54 4.62 60 4.62 29.46 29.46 4.62 60 4.62c30.54 0 55.38 24.84 55.38 55.38 0 30.54-24.84 55.38-55.38 55.38zM60 0C26.92 0 0 26.92 0 60s26.92 60 60 60 60-26.92 60-60S93.08 0 60 0z" style="-webkit-animation-name:NXReportSuccess3-animation;animation-name:NXReportSuccess3-animation;-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1)" fill="inherit" data-animator-group="true" data-animator-type="2"/></g><g style="-webkit-animation-name:NXReportSuccess1-animation;animation-name:NXReportSuccess1-animation;-webkit-transform:translate(60px,57.7px) scale(1,1) translate(-60px,-57.7px);-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1)"><path d="M88.27 35.39L52.8 75.29 31.43 58.2c-.98-.81-2.44-.63-3.24.36-.79.99-.63 2.44.36 3.24l23.08 18.46c.43.34.93.51 1.44.51.64 0 1.27-.26 1.74-.78l36.91-41.53a2.3 2.3 0 0 0-.19-3.26c-.95-.86-2.41-.77-3.26.19z" style="-webkit-animation-name:NXReportSuccess4-animation;animation-name:NXReportSuccess4-animation;-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1)" fill="inherit" data-animator-group="true" data-animator-type="2"/></g></svg>'; return reportSvgSuccess; }; // REPORT: SVG Icon Success: end // REPORT: SVG Icon Failure: begin var reportSvgIconFailure = function (width, color) { if (!width) { width = '110px'; } if (!color) { color = '#ff5549'; } var reportSvgFailure = '<svg xmlns="http://www.w3.org/2000/svg" id="NXReportFailure" width="' + width + '" height="' + width + '" fill="' + color + '" viewBox="0 0 120 120"><style>@-webkit-keyframes NXReportFailure2-animation{0%{opacity:0}40%,to{opacity:1}}@keyframes NXReportFailure2-animation{0%{opacity:0}40%,to{opacity:1}}@-webkit-keyframes NXReportFailure1-animation{0%{-webkit-transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px);transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px)}40%,to{-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px);transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)}60%{-webkit-transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px);transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px)}}@keyframes NXReportFailure1-animation{0%{-webkit-transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px);transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px)}40%,to{-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px);transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)}60%{-webkit-transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px);transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px)}}@-webkit-keyframes NXReportFailure3-animation{0%{-webkit-transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px);transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px)}50%,to{-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px);transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)}60%{-webkit-transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px);transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px)}}@keyframes NXReportFailure3-animation{0%{-webkit-transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px);transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px)}50%,to{-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px);transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)}60%{-webkit-transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px);transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px)}}@-webkit-keyframes NXReportFailure4-animation{0%{opacity:0}50%,to{opacity:1}}@keyframes NXReportFailure4-animation{0%{opacity:0}50%,to{opacity:1}}#NXReportFailure *{-webkit-animation-duration:1.2s;animation-duration:1.2s;-webkit-animation-timing-function:cubic-bezier(0,0,1,1);animation-timing-function:cubic-bezier(0,0,1,1)}</style><g style="-webkit-animation-name:NXReportFailure1-animation;animation-name:NXReportFailure1-animation;-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1);-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)"><path d="M4.35 34.95c0-16.82 13.78-30.6 30.6-30.6h50.1c16.82 0 30.6 13.78 30.6 30.6v50.1c0 16.82-13.78 30.6-30.6 30.6h-50.1c-16.82 0-30.6-13.78-30.6-30.6v-50.1zM34.95 120h50.1c19.22 0 34.95-15.73 34.95-34.95v-50.1C120 15.73 104.27 0 85.05 0h-50.1C15.73 0 0 15.73 0 34.95v50.1C0 104.27 15.73 120 34.95 120z" style="-webkit-animation-name:NXReportFailure2-animation;animation-name:NXReportFailure2-animation;-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1)" fill="inherit" data-animator-group="true" data-animator-type="2"/></g><g style="-webkit-animation-name:NXReportFailure3-animation;animation-name:NXReportFailure3-animation;-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1);-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)"><path d="M82.4 37.6c-.9-.9-2.37-.9-3.27 0L60 56.73 40.86 37.6a2.306 2.306 0 0 0-3.26 3.26L56.73 60 37.6 79.13c-.9.9-.9 2.37 0 3.27.45.45 1.04.68 1.63.68.59 0 1.18-.23 1.63-.68L60 63.26 79.13 82.4c.45.45 1.05.68 1.64.68.58 0 1.18-.23 1.63-.68.9-.9.9-2.37 0-3.27L63.26 60 82.4 40.86c.9-.91.9-2.36 0-3.26z" style="-webkit-animation-name:NXReportFailure4-animation;animation-name:NXReportFailure4-animation;-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1)" fill="inherit" data-animator-group="true" data-animator-type="2"/></g></svg>'; return reportSvgFailure; }; // REPORT: SVG Icon Failure: end // REPORT: SVG Icon Warning: begin var reportSvgIconWarning = function (width, color) { if (!width) { width = '110px'; } if (!color) { color = '#eebf31'; } var reportSvgWarning = '<svg xmlns="http://www.w3.org/2000/svg" id="NXReportWarning" width="' + width + '" height="' + width + '" fill="' + color + '" viewBox="0 0 120 120"><style>@-webkit-keyframes NXReportWarning2-animation{0%{opacity:0}40%,to{opacity:1}}@keyframes NXReportWarning2-animation{0%{opacity:0}40%,to{opacity:1}}@-webkit-keyframes NXReportWarning1-animation{0%{-webkit-transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px);transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px)}40%,to{-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px);transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)}60%{-webkit-transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px);transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px)}}@keyframes NXReportWarning1-animation{0%{-webkit-transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px);transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px)}40%,to{-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px);transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)}60%{-webkit-transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px);transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px)}}@-webkit-keyframes NXReportWarning3-animation{0%{-webkit-transform:translate(60px,66.6px) scale(.5,.5) translate(-60px,-66.6px);transform:translate(60px,66.6px) scale(.5,.5) translate(-60px,-66.6px)}50%,to{-webkit-transform:translate(60px,66.6px) scale(1,1) translate(-60px,-66.6px);transform:translate(60px,66.6px) scale(1,1) translate(-60px,-66.6px)}60%{-webkit-transform:translate(60px,66.6px) scale(.95,.95) translate(-60px,-66.6px);transform:translate(60px,66.6px) scale(.95,.95) translate(-60px,-66.6px)}}@keyframes NXReportWarning3-animation{0%{-webkit-transform:translate(60px,66.6px) scale(.5,.5) translate(-60px,-66.6px);transform:translate(60px,66.6px) scale(.5,.5) translate(-60px,-66.6px)}50%,to{-webkit-transform:translate(60px,66.6px) scale(1,1) translate(-60px,-66.6px);transform:translate(60px,66.6px) scale(1,1) translate(-60px,-66.6px)}60%{-webkit-transform:translate(60px,66.6px) scale(.95,.95) translate(-60px,-66.6px);transform:translate(60px,66.6px) scale(.95,.95) translate(-60px,-66.6px)}}@-webkit-keyframes NXReportWarning4-animation{0%{opacity:0}50%,to{opacity:1}}@keyframes NXReportWarning4-animation{0%{opacity:0}50%,to{opacity:1}}#NXReportWarning *{-webkit-animation-duration:1.2s;animation-duration:1.2s;-webkit-animation-timing-function:cubic-bezier(0,0,1,1);animation-timing-function:cubic-bezier(0,0,1,1)}</style><g style="-webkit-animation-name:NXReportWarning1-animation;animation-name:NXReportWarning1-animation;-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1);-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)"><path d="M115.46 106.15l-54.04-93.8c-.61-1.06-2.23-1.06-2.84 0l-54.04 93.8c-.62 1.07.21 2.29 1.42 2.29h108.08c1.21 0 2.04-1.22 1.42-2.29zM65.17 10.2l54.04 93.8c2.28 3.96-.65 8.78-5.17 8.78H5.96c-4.52 0-7.45-4.82-5.17-8.78l54.04-93.8c2.28-3.95 8.03-4 10.34 0z" style="-webkit-animation-name:NXReportWarning2-animation;animation-name:NXReportWarning2-animation;-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1)" fill="inherit" data-animator-group="true" data-animator-type="2"/></g><g style="-webkit-animation-name:NXReportWarning3-animation;animation-name:NXReportWarning3-animation;-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1);-webkit-transform:translate(60px,66.6px) scale(1,1) translate(-60px,-66.6px)"><path d="M57.83 94.01c0 1.2.97 2.17 2.17 2.17s2.17-.97 2.17-2.17v-3.2c0-1.2-.97-2.17-2.17-2.17s-2.17.97-2.17 2.17v3.2zm0-14.15c0 1.2.97 2.17 2.17 2.17s2.17-.97 2.17-2.17V39.21c0-1.2-.97-2.17-2.17-2.17s-2.17.97-2.17 2.17v40.65z" style="-webkit-animation-name:NXReportWarning4-animation;animation-name:NXReportWarning4-animation;-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1)" fill="inherit" data-animator-group="true" data-animator-type="2"/></g></svg>'; return reportSvgWarning; }; // REPORT: SVG Icon Warning: end // REPORT: SVG Icon Info: begin var reportSvgIconInfo = function (width, color) { if (!width) { width = '110px'; } if (!color) { color = '#26c0d3'; } var reportSvgInfo = '<svg xmlns="http://www.w3.org/2000/svg" id="NXReportInfo" width="' + width + '" height="' + width + '" fill="' + color + '" viewBox="0 0 120 120"><style>@-webkit-keyframes NXReportInfo4-animation{0%{opacity:0}50%,to{opacity:1}}@keyframes NXReportInfo4-animation{0%{opacity:0}50%,to{opacity:1}}@-webkit-keyframes NXReportInfo3-animation{0%{-webkit-transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px);transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px)}50%,to{-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px);transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)}60%{-webkit-transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px);transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px)}}@keyframes NXReportInfo3-animation{0%{-webkit-transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px);transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px)}50%,to{-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px);transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)}60%{-webkit-transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px);transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px)}}@-webkit-keyframes NXReportInfo2-animation{0%{opacity:0}40%,to{opacity:1}}@keyframes NXReportInfo2-animation{0%{opacity:0}40%,to{opacity:1}}@-webkit-keyframes NXReportInfo1-animation{0%{-webkit-transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px);transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px)}40%,to{-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px);transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)}60%{-webkit-transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px);transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px)}}@keyframes NXReportInfo1-animation{0%{-webkit-transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px);transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px)}40%,to{-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px);transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)}60%{-webkit-transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px);transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px)}}#NXReportInfo *{-webkit-animation-duration:1.2s;animation-duration:1.2s;-webkit-animation-timing-function:cubic-bezier(0,0,1,1);animation-timing-function:cubic-bezier(0,0,1,1)}</style><g style="-webkit-animation-name:NXReportInfo1-animation;animation-name:NXReportInfo1-animation;-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1);-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)"><path d="M60 115.38C29.46 115.38 4.62 90.54 4.62 60 4.62 29.46 29.46 4.62 60 4.62c30.54 0 55.38 24.84 55.38 55.38 0 30.54-24.84 55.38-55.38 55.38zM60 0C26.92 0 0 26.92 0 60s26.92 60 60 60 60-26.92 60-60S93.08 0 60 0z" style="-webkit-animation-name:NXReportInfo2-animation;animation-name:NXReportInfo2-animation;-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1)" fill="inherit" data-animator-group="true" data-animator-type="2"/></g><g style="-webkit-animation-name:NXReportInfo3-animation;animation-name:NXReportInfo3-animation;-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1);-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)"><path d="M57.75 43.85c0-1.24 1.01-2.25 2.25-2.25s2.25 1.01 2.25 2.25v48.18c0 1.24-1.01 2.25-2.25 2.25s-2.25-1.01-2.25-2.25V43.85zm0-15.88c0-1.24 1.01-2.25 2.25-2.25s2.25 1.01 2.25 2.25v3.32c0 1.25-1.01 2.25-2.25 2.25s-2.25-1-2.25-2.25v-3.32z" style="-webkit-animation-name:NXReportInfo4-animation;animation-name:NXReportInfo4-animation;-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1)" fill="inherit" data-animator-group="true" data-animator-type="2"/></g></svg>'; return reportSvgInfo; }; // REPORT: SVG Icon Info: end // LOADING && BLOCK: SVG Icon Standard: begin var loadingAndBlockSvgIconStandard = function (width, color) { if (!width) { width = '60px'; } if (!color) { color = '#32c682'; } var standard = '<svg xmlns="http://www.w3.org/2000/svg" stroke="' + color + '" width="' + width + '" height="' + width + '" transform="scale(.8)" viewBox="0 0 38 38"><g fill="none" fill-rule="evenodd" stroke-width="2" transform="translate(1 1)"><circle cx="18" cy="18" r="18" stroke-opacity=".25"/><path d="M36 18c0-9.94-8.06-18-18-18"><animateTransform attributeName="transform" dur="1s" from="0 18 18" repeatCount="indefinite" to="360 18 18" type="rotate"/></path></g></svg>'; return standard; }; // LOADING && BLOCK: SVG Icon Standard: end // LOADING && BLOCK: SVG Icon Hourglass: begin var loadingAndBlockSvgIconHourglass = function (width, color) { if (!width) { width = '60px'; } if (!color) { color = '#32c682'; } var hourglass = '<svg xmlns="http://www.w3.org/2000/svg" id="NXLoadingHourglass" fill="' + color + '" width="' + width + '" height="' + width + '" viewBox="0 0 200 200"><style>@-webkit-keyframes NXhourglass5-animation{0%{-webkit-transform:scale(1,1);transform:scale(1,1)}16.67%{-webkit-transform:scale(1,.8);transform:scale(1,.8)}33.33%{-webkit-transform:scale(.88,.6);transform:scale(.88,.6)}37.5%{-webkit-transform:scale(.85,.55);transform:scale(.85,.55)}41.67%{-webkit-transform:scale(.8,.5);transform:scale(.8,.5)}45.83%{-webkit-transform:scale(.75,.45);transform:scale(.75,.45)}50%{-webkit-transform:scale(.7,.4);transform:scale(.7,.4)}54.17%{-webkit-transform:scale(.6,.35);transform:scale(.6,.35)}58.33%{-webkit-transform:scale(.5,.3);transform:scale(.5,.3)}83.33%,to{-webkit-transform:scale(.2,0);transform:scale(.2,0)}}@keyframes NXhourglass5-animation{0%{-webkit-transform:scale(1,1);transform:scale(1,1)}16.67%{-webkit-transform:scale(1,.8);transform:scale(1,.8)}33.33%{-webkit-transform:scale(.88,.6);transform:scale(.88,.6)}37.5%{-webkit-transform:scale(.85,.55);transform:scale(.85,.55)}41.67%{-webkit-transform:scale(.8,.5);transform:scale(.8,.5)}45.83%{-webkit-transform:scale(.75,.45);transform:scale(.75,.45)}50%{-webkit-transform:scale(.7,.4);transform:scale(.7,.4)}54.17%{-webkit-transform:scale(.6,.35);transform:scale(.6,.35)}58.33%{-webkit-transform:scale(.5,.3);transform:scale(.5,.3)}83.33%,to{-webkit-transform:scale(.2,0);transform:scale(.2,0)}}@-webkit-keyframes NXhourglass3-animation{0%{-webkit-transform:scale(1,.02);transform:scale(1,.02)}79.17%,to{-webkit-transform:scale(1,1);transform:scale(1,1)}}@keyframes NXhourglass3-animation{0%{-webkit-transform:scale(1,.02);transform:scale(1,.02)}79.17%,to{-webkit-transform:scale(1,1);transform:scale(1,1)}}@-webkit-keyframes NXhourglass1-animation{0%,83.33%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(180deg);transform:rotate(180deg)}}@keyframes NXhourglass1-animation{0%,83.33%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(180deg);transform:rotate(180deg)}}#NXLoadingHourglass *{-webkit-animation-duration:1.2s;animation-duration:1.2s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-timing-function:cubic-bezier(0,0,1,1);animation-timing-function:cubic-bezier(0,0,1,1)}</style><g data-animator-group="true" data-animator-type="1" style="-webkit-animation-name:NXhourglass1-animation;animation-name:NXhourglass1-animation;-webkit-transform-origin:50% 50%;transform-origin:50% 50%;transform-box:fill-box"><g id="NXhourglass2" fill="inherit"><g data-animator-group="true" data-animator-type="2" style="-webkit-animation-name:NXhourglass3-animation;animation-name:NXhourglass3-animation;-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1);-webkit-transform-origin:50% 100%;transform-origin:50% 100%;transform-box:fill-box" opacity=".4"><path id="NXhourglass4" d="M100 100l-34.38 32.08v31.14h68.76v-31.14z"/></g><g data-animator-group="true" data-animator-type="2" style="-webkit-animation-name:NXhourglass5-animation;animation-name:NXhourglass5-animation;-webkit-transform-origin:50% 100%;transform-origin:50% 100%;transform-box:fill-box" opacity=".4"><path id="NXhourglass6" d="M100 100L65.62 67.92V36.78h68.76v31.14z"/></g><path d="M51.14 38.89h8.33v14.93c0 15.1 8.29 28.99 23.34 39.1 1.88 1.25 3.04 3.97 3.04 7.08s-1.16 5.83-3.04 7.09c-15.05 10.1-23.34 23.99-23.34 39.09v14.93h-8.33a4.859 4.859 0 1 0 0 9.72h97.72a4.859 4.859 0 1 0 0-9.72h-8.33v-14.93c0-15.1-8.29-28.99-23.34-39.09-1.88-1.26-3.04-3.98-3.04-7.09s1.16-5.83 3.04-7.08c15.05-10.11 23.34-24 23.34-39.1V38.89h8.33a4.859 4.859 0 1 0 0-9.72H51.14a4.859 4.859 0 1 0 0 9.72zm79.67 14.93c0 15.87-11.93 26.25-19.04 31.03-4.6 3.08-7.34 8.75-7.34 15.15 0 6.41 2.74 12.07 7.34 15.15 7.11 4.78 19.04 15.16 19.04 31.03v14.93H69.19v-14.93c0-15.87 11.93-26.25 19.04-31.02 4.6-3.09 7.34-8.75 7.34-15.16 0-6.4-2.74-12.07-7.34-15.15-7.11-4.78-19.04-15.16-19.04-31.03V38.89h61.62v14.93z"/></g></g></svg>'; return hourglass; }; // LOADING && BLOCK: SVG Icon Hourglass: end // LOADING && BLOCK: SVG Icon Circle: begin var loadingAndBlockSvgIconCircle = function (width, color) { if (!width) { width = '60px'; } if (!color) { color = '#32c682'; } var circle = '<svg xmlns="http://www.w3.org/2000/svg" width="' + width + '" height="' + width + '" viewBox="25 25 50 50" style="-webkit-animation:rotate 2s linear infinite;animation:rotate 2s linear infinite;height:' + width + ';-webkit-transform-origin:center center;-ms-transform-origin:center center;transform-origin:center center;width:' + width + ';position:absolute;top:0;left:0;margin:auto"><style>@-webkit-keyframes rotate{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes dash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35}to{stroke-dasharray:89,200;stroke-dashoffset:-124}}@keyframes dash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35}to{stroke-dasharray:89,200;stroke-dashoffset:-124}}</style><circle cx="50" cy="50" r="20" fill="none" stroke="' + color + '" stroke-width="2" style="-webkit-animation:dash 1.5s ease-in-out infinite,color 1.5s ease-in-out infinite;animation:dash 1.5s ease-in-out infinite,color 1.5s ease-in-out infinite" stroke-dasharray="150 200" stroke-dashoffset="-10" stroke-linecap="round"/></svg>'; return circle; }; // LOADING && BLOCK: SVG Icon Circle: end // LOADING && BLOCK: SVG Icon Arrows: begin var loadingAndBlockSvgIconArrows = function (width, color) { if (!width) { width = '60px'; } if (!color) { color = '#32c682'; } var arrows = '<svg xmlns="http://www.w3.org/2000/svg" fill="' + color + '" width="' + width + '" height="' + width + '" viewBox="0 0 128 128"><g><path fill="inherit" d="M109.25 55.5h-36l12-12a29.54 29.54 0 0 0-49.53 12H18.75A46.04 46.04 0 0 1 96.9 31.84l12.35-12.34v36zm-90.5 17h36l-12 12a29.54 29.54 0 0 0 49.53-12h16.97A46.04 46.04 0 0 1 31.1 96.16L18.74 108.5v-36z"/><animateTransform attributeName="transform" dur="1.5s" from="0 64 64" repeatCount="indefinite" to="360 64 64" type="rotate"/></g></svg>'; return arrows; }; // LOADING && BLOCK: SVG Icon Arrows: end // LOADING && BLOCK: SVG Icon Dots: begin var loadingAndBlockSvgIconDots = function (width, color) { if (!width) { width = '60px'; } if (!color) { color = '#32c682'; } var dots = '<svg xmlns="http://www.w3.org/2000/svg" fill="' + color + '" width="' + width + '" height="' + width + '" viewBox="0 0 100 100"><g transform="translate(25 50)"><circle r="9" fill="inherit" transform="scale(.239)"><animateTransform attributeName="transform" begin="-0.266s" calcMode="spline" dur="0.8s" keySplines="0.3 0 0.7 1;0.3 0 0.7 1" keyTimes="0;0.5;1" repeatCount="indefinite" type="scale" values="0;1;0"/></circle></g><g transform="translate(50 50)"><circle r="9" fill="inherit" transform="scale(.00152)"><animateTransform attributeName="transform" begin="-0.133s" calcMode="spline" dur="0.8s" keySplines="0.3 0 0.7 1;0.3 0 0.7 1" keyTimes="0;0.5;1" repeatCount="indefinite" type="scale" values="0;1;0"/></circle></g><g transform="translate(75 50)"><circle r="9" fill="inherit" transform="scale(.299)"><animateTransform attributeName="transform" begin="0s" calcMode="spline" dur="0.8s" keySplines="0.3 0 0.7 1;0.3 0 0.7 1" keyTimes="0;0.5;1" repeatCount="indefinite" type="scale" values="0;1;0"/></circle></g></svg>'; return dots; }; // LOADING && BLOCK: SVG Icon Dots: end // LOADING && BLOCK: SVG Icon Pulse: begin var loadingAndBlockSvgIconPulse = function (width, color) { if (!width) { width = '60px'; } if (!color) { color = '#32c682'; } var pulse = '<svg xmlns="http://www.w3.org/2000/svg" stroke="' + color + '" width="' + width + '" height="' + width + '" viewBox="0 0 44 44"><g fill="none" fill-rule="evenodd" stroke-width="2"><circle cx="22" cy="22" r="1"><animate attributeName="r" begin="0s" calcMode="spline" dur="1.8s" keySplines="0.165, 0.84, 0.44, 1" keyTimes="0; 1" repeatCount="indefinite" values="1; 20"/><animate attributeName="stroke-opacity" begin="0s" calcMode="spline" dur="1.8s" keySplines="0.3, 0.61, 0.355, 1" keyTimes="0; 1" repeatCount="indefinite" values="1; 0"/></circle><circle cx="22" cy="22" r="1"><animate attributeName="r" begin="-0.9s" calcMode="spline" dur="1.8s" keySplines="0.165, 0.84, 0.44, 1" keyTimes="0; 1" repeatCount="indefinite" values="1; 20"/><animate attributeName="stroke-opacity" begin="-0.9s" calcMode="spline" dur="1.8s" keySplines="0.3, 0.61, 0.355, 1" keyTimes="0; 1" repeatCount="indefinite" values="1; 0"/></circle></g></svg>'; return pulse; }; // LOADING && BLOCK: SVG Icon Pulse: end // LOADING && BLOCK: SVG Icon Notiflix: begin var loadingAndBlockSvgIconNotiflix = function (width, white, green) { if (!width) { width = '60px'; } if (!white) { white = '#f8f8f8'; } if (!green) { green = '#32c682'; } var notiflixIcon = '<svg xmlns="http://www.w3.org/2000/svg" id="NXLoadingNotiflixLib" width="' + width + '" height="' + width + '" viewBox="0 0 200 200"><defs><style>@keyframes notiflix-n{0%{stroke-dashoffset:1000}to{stroke-dashoffset:0}}@keyframes notiflix-x{0%{stroke-dashoffset:1000}to{stroke-dashoffset:0}}@keyframes notiflix-dot{0%,to{stroke-width:0}50%{stroke-width:12}}.nx-icon-line{stroke:' + white + ';stroke-width:12;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:22;fill:none}</style></defs><path d="M47.97 135.05a6.5 6.5 0 1 1 0 13 6.5 6.5 0 0 1 0-13z" style="animation-name:notiflix-dot;animation-timing-function:ease-in-out;animation-duration:1.25s;animation-iteration-count:infinite;animation-direction:normal" fill="' + green + '" stroke="' + green + '" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22" stroke-width="12"/><path class="nx-icon-line" d="M10.14 144.76V87.55c0-5.68-4.54-41.36 37.83-41.36 42.36 0 37.82 35.68 37.82 41.36v57.21" style="animation-name:notiflix-n;animation-timing-function:linear;animation-duration:2.5s;animation-delay:0s;animation-iteration-count:infinite;animation-direction:normal" stroke-dasharray="500"/><path class="nx-icon-line" d="M115.06 144.49c24.98-32.68 49.96-65.35 74.94-98.03M114.89 46.6c25.09 32.58 50.19 65.17 75.29 97.75" style="animation-name:notiflix-x;animation-timing-function:linear;animation-duration:2.5s;animation-delay:.2s;animation-iteration-count:infinite;animation-direction:normal" stroke-dasharray="500"/></svg>'; return notiflixIcon; }; // LOADING && BLOCK: SVG Icon Notiflix: end // NOTIFY: Get Internal CSS Codes: begin var notifyGetInternalCSSCodes = function () { var notifyCSS = ''; return notifyCSS || null; }; // NOTIFY: Get Internal CSS Codes: end // NOTIFY: Create: begin var notifyCreateCounter = 0; var notifyCreate = function (notifyType, message, callbackOrOptions, options) { // check doc body if (!commonCheckHeadOrBody('body')) { return false; } // if not initialized pretend like init if (!newNotifySettings) { Notiflix.Notify.init({}); } // create a backup for new settings var newNotifySettingsBackup = commonExtendOptions(true, newNotifySettings, {}); // check callbackOrOptions and options: begin if ((typeof callbackOrOptions === 'object' && !Array.isArray(callbackOrOptions)) || (typeof options === 'object' && !Array.isArray(options))) { // new options var newOptions = {}; if (typeof callbackOrOptions === 'object') { newOptions = callbackOrOptions; } else if (typeof options === 'object') { newOptions = options; } // extend new settings with the new options newNotifySettings = commonExtendOptions(true, newNotifySettings, newOptions); } // check callbackOrOptions and options: end // notify type var theType = newNotifySettings[notifyType.toLocaleLowerCase('en')]; // notify counter notifyCreateCounter++; // check the message: begin if (typeof message !== 'string') { message = 'Notiflix ' + notifyType; } // check the message: end // if plainText is true => HTML tags not allowed: begin if (newNotifySettings.plainText) { message = commonGetPlaintext(message); // message plain text } // if plainText is true => HTML tags not allowed: end // if plainText is false but the message length more than messageMaxLength => Possible HTML tags error: begin if (!newNotifySettings.plainText && message.length > newNotifySettings.messageMaxLength) { // extend settings for error massage newNotifySettings = commonExtendOptions(true, newNotifySettings, { closeButton: true, messageMaxLength: 150 }); // error message message = 'Possible HTML Tags Error: The "plainText" option is "false" and the notification content length is more than the "messageMaxLength" option.'; } // if plainText is false but the message length more than messageMaxLength => Possible HTML tags error: end // check message max length: begin if (message.length > newNotifySettings.messageMaxLength) { message = message.substring(0, newNotifySettings.messageMaxLength) + '...'; } // check message max length: end // font awesome icon style: begin if (newNotifySettings.fontAwesomeIconStyle === 'shadow') { theType.fontAwesomeIconColor = theType.background; } // font awesome icon style: end // if cssAnimation is false => duration: begin if (!newNotifySettings.cssAnimation) { newNotifySettings.cssAnimationDuration = 0; } // if cssAnimation is false => duration: end // notify wrap: begin var ntflxNotifyWrap = window.document.getElementById(notifySettings.wrapID) || window.document.createElement('div'); ntflxNotifyWrap.id = notifySettings.wrapID; ntflxNotifyWrap.style.width = newNotifySettings.width; ntflxNotifyWrap.style.zIndex = newNotifySettings.zindex; ntflxNotifyWrap.style.opacity = newNotifySettings.opacity; // wrap position: begin if (newNotifySettings.position === 'center-center') { ntflxNotifyWrap.style.left = newNotifySettings.distance; ntflxNotifyWrap.style.top = newNotifySettings.distance; ntflxNotifyWrap.style.right = newNotifySettings.distance; ntflxNotifyWrap.style.bottom = newNotifySettings.distance; ntflxNotifyWrap.style.margin = 'auto'; ntflxNotifyWrap.classList.add('nx-flex-center-center'); ntflxNotifyWrap.style.maxHeight = 'calc((100vh - ' + newNotifySettings.distance + ') - ' + newNotifySettings.distance + ')'; ntflxNotifyWrap.style.display = 'flex'; ntflxNotifyWrap.style.flexWrap = 'wrap'; ntflxNotifyWrap.style.flexDirection = 'column'; ntflxNotifyWrap.style.justifyContent = 'center'; ntflxNotifyWrap.style.alignItems = 'center'; ntflxNotifyWrap.style.pointerEvents = 'none'; } else if (newNotifySettings.position === 'center-top') { ntflxNotifyWrap.style.left = newNotifySettings.distance; ntflxNotifyWrap.style.right = newNotifySettings.distance; ntflxNotifyWrap.style.top = newNotifySettings.distance; ntflxNotifyWrap.style.bottom = 'auto'; ntflxNotifyWrap.style.margin = 'auto'; } else if (newNotifySettings.position === 'center-bottom') { ntflxNotifyWrap.style.left = newNotifySettings.distance; ntflxNotifyWrap.style.right = newNotifySettings.distance; ntflxNotifyWrap.style.bottom = newNotifySettings.distance; ntflxNotifyWrap.style.top = 'auto'; ntflxNotifyWrap.style.margin = 'auto'; } else if (newNotifySettings.position === 'right-bottom') { ntflxNotifyWrap.style.right = newNotifySettings.distance; ntflxNotifyWrap.style.bottom = newNotifySettings.distance; ntflxNotifyWrap.style.top = 'auto'; ntflxNotifyWrap.style.left = 'auto'; } else if (newNotifySettings.position === 'left-top') { ntflxNotifyWrap.style.left = newNotifySettings.distance; ntflxNotifyWrap.style.top = newNotifySettings.distance; ntflxNotifyWrap.style.right = 'auto'; ntflxNotifyWrap.style.bottom = 'auto'; } else if (newNotifySettings.position === 'left-bottom') { ntflxNotifyWrap.style.left = newNotifySettings.distance; ntflxNotifyWrap.style.bottom = newNotifySettings.distance; ntflxNotifyWrap.style.top = 'auto'; ntflxNotifyWrap.style.right = 'auto'; } else { // 'right-top' or else ntflxNotifyWrap.style.right = newNotifySettings.distance; ntflxNotifyWrap.style.top = newNotifySettings.distance; ntflxNotifyWrap.style.left = 'auto'; ntflxNotifyWrap.style.bottom = 'auto'; } // wrap position: end // if background overlay is true: begin if (newNotifySettings.backOverlay) { var ntflxNotifyOverlay = window.document.getElementById(notifySettings.overlayID) || window.document.createElement('div'); ntflxNotifyOverlay.id = notifySettings.overlayID; ntflxNotifyOverlay.style.width = '100%'; ntflxNotifyOverlay.style.height = '100%'; ntflxNotifyOverlay.style.position = 'fixed'; ntflxNotifyOverlay.style.zIndex = newNotifySettings.zindex - 1; ntflxNotifyOverlay.style.left = 0; ntflxNotifyOverlay.style.top = 0; ntflxNotifyOverlay.style.right = 0; ntflxNotifyOverlay.style.bottom = 0; ntflxNotifyOverlay.style.background = theType.backOverlayColor || newNotifySettings.backOverlayColor; ntflxNotifyOverlay.className = newNotifySettings.cssAnimation ? 'nx-with-animation' : ''; ntflxNotifyOverlay.style.animationDuration = newNotifySettings.cssAnimation ? newNotifySettings.cssAnimationDuration + 'ms' : ''; if (!window.document.getElementById(notifySettings.overlayID)) { window.document.body.appendChild(ntflxNotifyOverlay); } } // if background overlay is true: end if (!window.document.getElementById(notifySettings.wrapID)) { window.document.body.appendChild(ntflxNotifyWrap); } // notify wrap: end // notify content: begin var ntflxNotify = window.document.createElement('div'); ntflxNotify.id = newNotifySettings.ID + '-' + notifyCreateCounter; ntflxNotify.className = newNotifySettings.className + ' ' + theType.childClassName + ' ' + (newNotifySettings.cssAnimation ? 'nx-with-animation' : '') + ' ' + (newNotifySettings.useIcon ? 'nx-with-icon' : '') + ' nx-' + newNotifySettings.cssAnimationStyle + ' ' + (newNotifySettings.closeButton && typeof callbackOrOptions !== 'function' ? 'nx-with-close-button' : '') + ' ' + (typeof callbackOrOptions === 'function' ? 'nx-with-callback' : '') + ' ' + (newNotifySettings.clickToClose ? 'nx-notify-click-to-close' : ''); ntflxNotify.style.fontSize = newNotifySettings.fontSize; ntflxNotify.style.color = theType.textColor; ntflxNotify.style.background = theType.background; ntflxNotify.style.borderRadius = newNotifySettings.borderRadius; ntflxNotify.style.pointerEvents = 'all'; // rtl: begin if (newNotifySettings.rtl) { ntflxNotify.setAttribute('dir', 'rtl'); ntflxNotify.classList.add('nx-rtl-on'); } // rtl: end // font-family: begin ntflxNotify.style.fontFamily = '"' + newNotifySettings.fontFamily + '", ' + defaultFontFamily; // font-family: end // use css animation: begin if (newNotifySettings.cssAnimation) { ntflxNotify.style.animationDuration = newNotifySettings.cssAnimationDuration + 'ms'; } // use css animation: end // close button element: begin var closeButtonHTML = ''; if (newNotifySettings.closeButton && typeof callbackOrOptions !== 'function') { closeButtonHTML = '<span class="nx-close-button"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><g><path fill="' + theType.notiflixIconColor + '" d=