text: !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t["vc-toast"]=e()}(this,function(){"use strict";var t={name:"vc-toast",props:{message:String,className:{type:String,default:""},position:{type:String,default:"middle"},iconClass:{type:String,default:""},mask:{type:Boolean,default:!1}},data:function(){return{show:!1}},computed:{styles:function(){return{padding:this.iconClass?".6em 2em":".4em .8em"}}},methods:{afterLeave:function(){this.__destroy&&this.$destroy(),this.$el.parentNode.removeChild(this.$el)},touchmove:function(t){t.preventDefault(),t.stopPropagation()}}},e=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{class:t.className},[t.mask?s("div",{staticClass:"vc-toast-mask",on:{touchmove:t.touchmove}}):t._e(),t._v(" "),s("transition",{attrs:{name:"vc-toast"},on:{"after-leave":t.afterLeave}},[s("div",{directives:[{name:"show",rawName:"v-show",value:t.show,expression:"show"}],class:["vc-toast","is-"+this.position],style:t.styles},[""!==t.iconClass?s("i",{staticClass:"vc-toast-icon",class:t.iconClass}):t._e(),t._v(" "),s("span",{staticClass:"vc-toast-text"},[t._v(t._s(t.message))])])])],1)};var s,o,n,i,u=(s=void 0!==e?{render:e,staticRenderFns:[]}:{},n=!1,"undefined"!=typeof __vue_create_injector_ssr__&&__vue_create_injector_ssr__,(i=((o=void 0)===t?{}:t)||{}).render||(i.render=s.render,i.staticRenderFns=s.staticRenderFns,i._compiled=!0,n&&(i.functional=!0)),i._scopeId=o,i),l=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var s=arguments[e];for(var o in s)Object.prototype.hasOwnProperty.call(s,o)&&(t[o]=s[o])}return t},f=["top","middle","bottom"],p={message:"",position:"middle",duration:3e3,className:"",iconClass:"",override:!0,mask:!1},m=void 0,a=void 0;function v(t){return this.show||(a.appendChild(this.$mount().$el),this.__setData(t),this.show=!0),this}function h(){var t=this;this.show&&(this.show=!1,m.recycle(this,function(){t.__destroy=!0}))}function _(e){var s=this;Object.keys(p).forEach(function(t){s[t]=e[t]})}function r(t,e){var s,o,n,i,a,r,c=l({},p,e),d=(s=t.extend(u),Object.assign(s.prototype,{__show:v,close:h,__setData:_}),s);return o=function(){return new d},n=Math.random().toString(36).slice(2),i={},a=[],r=0,m={pick:function(t){var e=a.length?a.shift():o(r++);return t=t||n,e.pid=e.pid||r,i[t]||(i[t]=[]),i[t].push(e),e},recycle:function(t,e){var s=t.position,o=i[s].indexOf(t);~o&&i[s].splice(o,1),3<t.pid?e&&e():a.push(t)},getInUseInstances:function(t){return i[t||n]||[]}},function(t){"string"==typeof t&&(t={message:t});var e=l({},c,t);~f.indexOf(e.position)||(e.position="middle"),e.override&&m.getInUseInstances(e.position).forEach(function(t){t.close(),clearTimeout(t.timeoutId)});var s=m.pick(e.position).__show(e);return e.duration&&0<e.duration-0&&(s.timeoutId=setTimeout(function(){return s.close()},e.duration)),s}}return{install:function(t,e){t.$toast=t.prototype.$toast=r(t,e),a=document.body||document.querySelector("body")||document.body.getElementsByTagName("body")[0]}}});
  