module.exports = /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) /******/ return installedModules[moduleId].exports; /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ // Flag the module as loaded /******/ module.l = true; /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ // identity function for calling harmony imports with the correct context /******/ __webpack_require__.i = function(value) { return value; }; /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { /******/ configurable: false, /******/ enumerable: true, /******/ get: getter /******/ }); /******/ } /******/ }; /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = 242); /******/ }) /************************************************************************/ /******/ ({ /***/ 0: /***/ function(module, exports) { /* globals __VUE_SSR_CONTEXT__ */ // this module is a runtime utility for cleaner component module output and will // be included in the final webpack user bundle module.exports = function normalizeComponent ( rawScriptExports, compiledTemplate, injectStyles, scopeId, moduleIdentifier /* server only */ ) { var esModule var scriptExports = rawScriptExports = rawScriptExports || {} // ES6 modules interop var type = typeof rawScriptExports.default if (type === 'object' || type === 'function') { esModule = rawScriptExports scriptExports = rawScriptExports.default } // Vue.extend constructor export interop var options = typeof scriptExports === 'function' ? scriptExports.options : scriptExports // render functions if (compiledTemplate) { options.render = compiledTemplate.render options.staticRenderFns = compiledTemplate.staticRenderFns } // scopedId if (scopeId) { options._scopeId = scopeId } var hook if (moduleIdentifier) { // server build hook = function (context) { // 2.3 injection context = context || // cached call (this.$vnode && this.$vnode.ssrContext) || // stateful (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional // 2.2 with runInNewContext: true if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { context = __VUE_SSR_CONTEXT__ } // inject component styles if (injectStyles) { injectStyles.call(this, context) } // register component module identifier for async chunk inferrence if (context && context._registeredComponents) { context._registeredComponents.add(moduleIdentifier) } } // used by ssr in case component is cached and beforeCreate // never gets called options._ssrRegister = hook } else if (injectStyles) { hook = injectStyles } if (hook) { var functional = options.functional var existing = functional ? options.render : options.beforeCreate if (!functional) { // inject component registration as beforeCreate hook options.beforeCreate = existing ? [].concat(existing, hook) : [hook] } else { // register for functioal component in vue file options.render = function renderWithStyleInjection (h, context) { hook.call(context) return existing(h, context) } } } return { esModule: esModule, exports: scriptExports, options: options } } /***/ }, /***/ 1: /***/ function(module, exports) { module.exports = require("vue"); /***/ }, /***/ 101: /***/ function(module, exports) { // removed by extract-text-webpack-plugin /***/ }, /***/ 164: /***/ function(module, exports, __webpack_require__) { function injectStyle (ssrContext) { __webpack_require__(101) } var Component = __webpack_require__(0)( /* script */ __webpack_require__(86), /* template */ __webpack_require__(170), /* styles */ injectStyle, /* scopeId */ null, /* moduleIdentifier (server only) */ null ) module.exports = Component.exports /***/ }, /***/ 170: /***/ function(module, exports) { module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; return _c('transition', { attrs: { "name": "mint-toast-pop" } }, [_c('div', { directives: [{ name: "show", rawName: "v-show", value: (_vm.visible), expression: "visible" }], staticClass: "mint-toast", class: _vm.customClass, style: ({ 'padding': _vm.iconClass === '' ? '10px' : '20px' }) }, [(_vm.iconClass !== '') ? _c('i', { staticClass: "mint-toast-icon", class: _vm.iconClass }) : _vm._e(), _vm._v(" "), _c('span', { staticClass: "mint-toast-text", style: ({ 'padding-top': _vm.iconClass === '' ? '0' : '10px' }) }, [_vm._v(_vm._s(_vm.message))])])]) },staticRenderFns: []} /***/ }, /***/ 242: /***/ function(module, exports, __webpack_require__) { module.exports = __webpack_require__(50); /***/ }, /***/ 50: /***/ function(module, exports, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__src_toast_js__ = __webpack_require__(94); Object.defineProperty(exports, "__esModule", { value: true }); /* harmony reexport (binding) */ __webpack_require__.d(exports, "default", function() { return __WEBPACK_IMPORTED_MODULE_0__src_toast_js__["a"]; }); /***/ }, /***/ 86: /***/ function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // /* harmony default export */ exports["default"] = { props: { message: String, className: { type: String, default: '' }, position: { type: String, default: 'middle' }, iconClass: { type: String, default: '' } }, data: function data() { return { visible: false }; }, computed: { customClass: function customClass() { var classes = []; switch (this.position) { case 'top': classes.push('is-placetop'); break; case 'bottom': classes.push('is-placebottom'); break; default: classes.push('is-placemiddle'); } classes.push(this.className); return classes.join(' '); } } }; /***/ }, /***/ 94: /***/ function(module, exports, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_vue__); var ToastConstructor = __WEBPACK_IMPORTED_MODULE_0_vue___default.a.extend(__webpack_require__(164)); var toastPool = []; var getAnInstance = function () { if (toastPool.length > 0) { var instance = toastPool[0]; toastPool.splice(0, 1); return instance; } return new ToastConstructor({ el: document.createElement('div') }); }; var returnAnInstance = function (instance) { if (instance) { toastPool.push(instance); } }; var removeDom = function (event) { if (event.target.parentNode) { event.target.parentNode.removeChild(event.target); } }; ToastConstructor.prototype.close = function() { this.visible = false; this.$el.addEventListener('transitionend', removeDom); this.closed = true; returnAnInstance(this); }; var Toast = function (options) { if ( options === void 0 ) options = {}; var duration = options.duration || 3000; var instance = getAnInstance(); instance.closed = false; clearTimeout(instance.timer); instance.message = typeof options === 'string' ? options : options.message; instance.position = options.position || 'middle'; instance.className = options.className || ''; instance.iconClass = options.iconClass || ''; document.body.appendChild(instance.$el); __WEBPACK_IMPORTED_MODULE_0_vue___default.a.nextTick(function() { instance.visible = true; instance.$el.removeEventListener('transitionend', removeDom); ~duration && (instance.timer = setTimeout(function() { if (instance.closed) return; instance.close(); }, duration)); }); return instance; }; /* harmony default export */ exports["a"] = Toast; /***/ } /******/ });