Server : Apache/2.4.18 (Ubuntu) System : Linux canvaswebdesign 3.13.0-71-generic #114-Ubuntu SMP Tue Dec 1 02:34:22 UTC 2015 x86_64 User : oppastar ( 1041) PHP Version : 7.0.33-0ubuntu0.16.04.15 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, Directory : /var/www/rabbithabit.com/public_html/themes/3/swal_alert/src/ |
Upload File : |
import { error } from './utils/utils.js' import { DismissReason } from './utils/DismissReason.js' import * as staticMethods from './staticMethods.js' import * as instanceMethods from './instanceMethods.js' import privateProps from './privateProps.js' let currentInstance // SweetAlert constructor function SweetAlert (...args) { // Prevent run in Node env /* istanbul ignore if */ if (typeof window === 'undefined') { return } // Check for the existence of Promise /* istanbul ignore if */ if (typeof Promise === 'undefined') { error('This package requires a Promise library, please include a shim to enable it in this browser (See: https://github.com/sweetalert2/sweetalert2/wiki/Migration-from-SweetAlert-to-SweetAlert2#1-ie-support)') } currentInstance = this const outerParams = Object.freeze(this.constructor.argsToParams(args)) Object.defineProperties(this, { params: { value: outerParams, writable: false, enumerable: true, configurable: true } }) const promise = this._main(this.params) privateProps.promise.set(this, promise) } // `catch` cannot be the name of a module export, so we define our thenable methods here instead SweetAlert.prototype.then = function (onFulfilled) { const promise = privateProps.promise.get(this) return promise.then(onFulfilled) } SweetAlert.prototype.finally = function (onFinally) { const promise = privateProps.promise.get(this) return promise.finally(onFinally) } // Assign instance methods from src/instanceMethods/*.js to prototype Object.assign(SweetAlert.prototype, instanceMethods) // Assign static methods from src/staticMethods/*.js to constructor Object.assign(SweetAlert, staticMethods) // Proxy to instance methods to constructor, for now, for backwards compatibility Object.keys(instanceMethods).forEach(key => { SweetAlert[key] = function (...args) { if (currentInstance) { return currentInstance[key](...args) } } }) SweetAlert.DismissReason = DismissReason SweetAlert.version = '9.5.2' export default SweetAlert