dtoaster
Version:
2 lines • 21 kB
JavaScript
(function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["dtoaster"]=e():t["dtoaster"]=e()})("undefined"!==typeof self?self:this,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="fb15")}({"00ee":function(t,e,n){var r=n("b622"),o=r("toStringTag"),i={};i[o]="z",t.exports="[object z]"===String(i)},"06cf":function(t,e,n){var r=n("83ab"),o=n("d1e7"),i=n("5c6c"),c=n("fc6a"),a=n("a04b"),u=n("5135"),s=n("0cfb"),f=Object.getOwnPropertyDescriptor;e.f=r?f:function(t,e){if(t=c(t),e=a(e),s)try{return f(t,e)}catch(n){}if(u(t,e))return i(!o.f.call(t,e),t[e])}},"0967":function(t,e,n){},"0cfb":function(t,e,n){var r=n("83ab"),o=n("d039"),i=n("cc12");t.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},"0d51":function(t,e){t.exports=function(t){try{return String(t)}catch(e){return"Object"}}},1626:function(t,e){t.exports=function(t){return"function"===typeof t}},"1be4":function(t,e,n){var r=n("d066");t.exports=r("document","documentElement")},"1d80":function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},"23cb":function(t,e,n){var r=n("a691"),o=Math.max,i=Math.min;t.exports=function(t,e){var n=r(t);return n<0?o(n+e,0):i(n,e)}},"23e7":function(t,e,n){var r=n("da84"),o=n("06cf").f,i=n("9112"),c=n("6eeb"),a=n("ce4e"),u=n("e893"),s=n("94ca");t.exports=function(t,e){var n,f,p,d,l,v,b=t.target,h=t.global,y=t.stat;if(f=h?r:y?r[b]||a(b,{}):(r[b]||{}).prototype,f)for(p in e){if(l=e[p],t.noTargetGet?(v=o(f,p),d=v&&v.value):d=f[p],n=s(h?p:b+(y?".":"#")+p,t.forced),!n&&void 0!==d){if(typeof l===typeof d)continue;u(l,d)}(t.sham||d&&d.sham)&&i(l,"sham",!0),c(f,p,l,t)}}},"241c":function(t,e,n){var r=n("ca84"),o=n("7839"),i=o.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},2532:function(t,e,n){"use strict";var r=n("23e7"),o=n("5a34"),i=n("1d80"),c=n("577e"),a=n("ab13");r({target:"String",proto:!0,forced:!a("includes")},{includes:function(t){return!!~c(i(this)).indexOf(c(o(t)),arguments.length>1?arguments[1]:void 0)}})},"2d00":function(t,e,n){var r,o,i=n("da84"),c=n("342f"),a=i.process,u=i.Deno,s=a&&a.versions||u&&u.version,f=s&&s.v8;f?(r=f.split("."),o=r[0]<4?1:r[0]+r[1]):c&&(r=c.match(/Edge\/(\d+)/),(!r||r[1]>=74)&&(r=c.match(/Chrome\/(\d+)/),r&&(o=r[1]))),t.exports=o&&+o},"342f":function(t,e,n){var r=n("d066");t.exports=r("navigator","userAgent")||""},"37e8":function(t,e,n){var r=n("83ab"),o=n("9bf2"),i=n("825a"),c=n("df75");t.exports=r?Object.defineProperties:function(t,e){i(t);var n,r=c(e),a=r.length,u=0;while(a>u)o.f(t,n=r[u++],e[n]);return t}},"44ad":function(t,e,n){var r=n("d039"),o=n("c6b6"),i="".split;t.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?i.call(t,""):Object(t)}:Object},"44d2":function(t,e,n){var r=n("b622"),o=n("7c73"),i=n("9bf2"),c=r("unscopables"),a=Array.prototype;void 0==a[c]&&i.f(a,c,{configurable:!0,value:o(null)}),t.exports=function(t){a[c][t]=!0}},"44e7":function(t,e,n){var r=n("861d"),o=n("c6b6"),i=n("b622"),c=i("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[c])?!!e:"RegExp"==o(t))}},"485a":function(t,e,n){var r=n("1626"),o=n("861d");t.exports=function(t,e){var n,i;if("string"===e&&r(n=t.toString)&&!o(i=n.call(t)))return i;if(r(n=t.valueOf)&&!o(i=n.call(t)))return i;if("string"!==e&&r(n=t.toString)&&!o(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},4930:function(t,e,n){var r=n("2d00"),o=n("d039");t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},"4d64":function(t,e,n){var r=n("fc6a"),o=n("50c4"),i=n("23cb"),c=function(t){return function(e,n,c){var a,u=r(e),s=o(u.length),f=i(c,s);if(t&&n!=n){while(s>f)if(a=u[f++],a!=a)return!0}else for(;s>f;f++)if((t||f in u)&&u[f]===n)return t||f||0;return!t&&-1}};t.exports={includes:c(!0),indexOf:c(!1)}},"50c4":function(t,e,n){var r=n("a691"),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},5135:function(t,e,n){var r=n("7b0b"),o={}.hasOwnProperty;t.exports=Object.hasOwn||function(t,e){return o.call(r(t),e)}},5692:function(t,e,n){var r=n("c430"),o=n("c6cd");(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.18.1",mode:r?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},"56ef":function(t,e,n){var r=n("d066"),o=n("241c"),i=n("7418"),c=n("825a");t.exports=r("Reflect","ownKeys")||function(t){var e=o.f(c(t)),n=i.f;return n?e.concat(n(t)):e}},"577e":function(t,e,n){var r=n("f5df");t.exports=function(t){if("Symbol"===r(t))throw TypeError("Cannot convert a Symbol value to a string");return String(t)}},"59ed":function(t,e,n){var r=n("1626"),o=n("0d51");t.exports=function(t){if(r(t))return t;throw TypeError(o(t)+" is not a function")}},"5a34":function(t,e,n){var r=n("44e7");t.exports=function(t){if(r(t))throw TypeError("The method doesn't accept regular expressions");return t}},"5c6c":function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"5e77":function(t,e,n){var r=n("83ab"),o=n("5135"),i=Function.prototype,c=r&&Object.getOwnPropertyDescriptor,a=o(i,"name"),u=a&&"something"===function(){}.name,s=a&&(!r||r&&c(i,"name").configurable);t.exports={EXISTS:a,PROPER:u,CONFIGURABLE:s}},"69f3":function(t,e,n){var r,o,i,c=n("7f9a"),a=n("da84"),u=n("861d"),s=n("9112"),f=n("5135"),p=n("c6cd"),d=n("f772"),l=n("d012"),v="Object already initialized",b=a.WeakMap,h=function(t){return i(t)?o(t):r(t,{})},y=function(t){return function(e){var n;if(!u(e)||(n=o(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}};if(c||p.state){var g=p.state||(p.state=new b),m=g.get,x=g.has,S=g.set;r=function(t,e){if(x.call(g,t))throw new TypeError(v);return e.facade=t,S.call(g,t,e),e},o=function(t){return m.call(g,t)||{}},i=function(t){return x.call(g,t)}}else{var w=d("state");l[w]=!0,r=function(t,e){if(f(t,w))throw new TypeError(v);return e.facade=t,s(t,w,e),e},o=function(t){return f(t,w)?t[w]:{}},i=function(t){return f(t,w)}}t.exports={set:r,get:o,has:i,enforce:h,getterFor:y}},"6eeb":function(t,e,n){var r=n("da84"),o=n("1626"),i=n("5135"),c=n("9112"),a=n("ce4e"),u=n("8925"),s=n("69f3"),f=n("5e77").CONFIGURABLE,p=s.get,d=s.enforce,l=String(String).split("String");(t.exports=function(t,e,n,u){var s,p=!!u&&!!u.unsafe,v=!!u&&!!u.enumerable,b=!!u&&!!u.noTargetGet,h=u&&void 0!==u.name?u.name:e;o(n)&&("Symbol("===String(h).slice(0,7)&&(h="["+String(h).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!i(n,"name")||f&&n.name!==h)&&c(n,"name",h),s=d(n),s.source||(s.source=l.join("string"==typeof h?h:""))),t!==r?(p?!b&&t[e]&&(v=!0):delete t[e],v?t[e]=n:c(t,e,n)):v?t[e]=n:a(e,n)})(Function.prototype,"toString",(function(){return o(this)&&p(this).source||u(this)}))},7418:function(t,e){e.f=Object.getOwnPropertySymbols},7839:function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7b0b":function(t,e,n){var r=n("1d80");t.exports=function(t){return Object(r(t))}},"7c73":function(t,e,n){var r,o=n("825a"),i=n("37e8"),c=n("7839"),a=n("d012"),u=n("1be4"),s=n("cc12"),f=n("f772"),p=">",d="<",l="prototype",v="script",b=f("IE_PROTO"),h=function(){},y=function(t){return d+v+p+t+d+"/"+v+p},g=function(t){t.write(y("")),t.close();var e=t.parentWindow.Object;return t=null,e},m=function(){var t,e=s("iframe"),n="java"+v+":";return e.style.display="none",u.appendChild(e),e.src=String(n),t=e.contentWindow.document,t.open(),t.write(y("document.F=Object")),t.close(),t.F},x=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}x="undefined"!=typeof document?document.domain&&r?g(r):m():g(r);var t=c.length;while(t--)delete x[l][c[t]];return x()};a[b]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(h[l]=o(t),n=new h,h[l]=null,n[b]=t):n=x(),void 0===e?n:i(n,e)}},"7f9a":function(t,e,n){var r=n("da84"),o=n("1626"),i=n("8925"),c=r.WeakMap;t.exports=o(c)&&/native code/.test(i(c))},"825a":function(t,e,n){var r=n("861d");t.exports=function(t){if(r(t))return t;throw TypeError(String(t)+" is not an object")}},"83ab":function(t,e,n){var r=n("d039");t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},"861d":function(t,e,n){var r=n("1626");t.exports=function(t){return"object"===typeof t?null!==t:r(t)}},8875:function(t,e,n){var r,o,i;(function(n,c){o=[],r=c,i="function"===typeof r?r.apply(e,o):r,void 0===i||(t.exports=i)})("undefined"!==typeof self&&self,(function(){function t(){var e=Object.getOwnPropertyDescriptor(document,"currentScript");if(!e&&"currentScript"in document&&document.currentScript)return document.currentScript;if(e&&e.get!==t&&document.currentScript)return document.currentScript;try{throw new Error}catch(l){var n,r,o,i=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,c=/@([^@]*):(\d+):(\d+)\s*$/gi,a=i.exec(l.stack)||c.exec(l.stack),u=a&&a[1]||!1,s=a&&a[2]||!1,f=document.location.href.replace(document.location.hash,""),p=document.getElementsByTagName("script");u===f&&(n=document.documentElement.outerHTML,r=new RegExp("(?:[^\\n]+?\\n){0,"+(s-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),o=n.replace(r,"$1").trim());for(var d=0;d<p.length;d++){if("interactive"===p[d].readyState)return p[d];if(p[d].src===u)return p[d];if(u===f&&p[d].innerHTML&&p[d].innerHTML.trim()===o)return p[d]}return null}}return t}))},8925:function(t,e,n){var r=n("1626"),o=n("c6cd"),i=Function.toString;r(o.inspectSource)||(o.inspectSource=function(t){return i.call(t)}),t.exports=o.inspectSource},"90e3":function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++n+r).toString(36)}},9112:function(t,e,n){var r=n("83ab"),o=n("9bf2"),i=n("5c6c");t.exports=r?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},9370:function(t,e,n){"use strict";n("0967")},"94ca":function(t,e,n){var r=n("d039"),o=n("1626"),i=/#|\.prototype\./,c=function(t,e){var n=u[a(t)];return n==f||n!=s&&(o(e)?r(e):!!e)},a=c.normalize=function(t){return String(t).replace(i,".").toLowerCase()},u=c.data={},s=c.NATIVE="N",f=c.POLYFILL="P";t.exports=c},"9bf2":function(t,e,n){var r=n("83ab"),o=n("0cfb"),i=n("825a"),c=n("a04b"),a=Object.defineProperty;e.f=r?a:function(t,e,n){if(i(t),e=c(e),i(n),o)try{return a(t,e,n)}catch(r){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},a04b:function(t,e,n){var r=n("c04e"),o=n("d9b5");t.exports=function(t){var e=r(t,"string");return o(e)?e:String(e)}},a691:function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},ab13:function(t,e,n){var r=n("b622"),o=r("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[o]=!1,"/./"[t](e)}catch(r){}}return!1}},b622:function(t,e,n){var r=n("da84"),o=n("5692"),i=n("5135"),c=n("90e3"),a=n("4930"),u=n("fdbf"),s=o("wks"),f=r.Symbol,p=u?f:f&&f.withoutSetter||c;t.exports=function(t){return i(s,t)&&(a||"string"==typeof s[t])||(a&&i(f,t)?s[t]=f[t]:s[t]=p("Symbol."+t)),s[t]}},c04e:function(t,e,n){var r=n("861d"),o=n("d9b5"),i=n("dc4a"),c=n("485a"),a=n("b622"),u=a("toPrimitive");t.exports=function(t,e){if(!r(t)||o(t))return t;var n,a=i(t,u);if(a){if(void 0===e&&(e="default"),n=a.call(t,e),!r(n)||o(n))return n;throw TypeError("Can't convert object to primitive value")}return void 0===e&&(e="number"),c(t,e)}},c430:function(t,e){t.exports=!1},c6b6:function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},c6cd:function(t,e,n){var r=n("da84"),o=n("ce4e"),i="__core-js_shared__",c=r[i]||o(i,{});t.exports=c},c8ba:function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}t.exports=n},ca84:function(t,e,n){var r=n("5135"),o=n("fc6a"),i=n("4d64").indexOf,c=n("d012");t.exports=function(t,e){var n,a=o(t),u=0,s=[];for(n in a)!r(c,n)&&r(a,n)&&s.push(n);while(e.length>u)r(a,n=e[u++])&&(~i(s,n)||s.push(n));return s}},caad:function(t,e,n){"use strict";var r=n("23e7"),o=n("4d64").includes,i=n("44d2");r({target:"Array",proto:!0},{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i("includes")},cc12:function(t,e,n){var r=n("da84"),o=n("861d"),i=r.document,c=o(i)&&o(i.createElement);t.exports=function(t){return c?i.createElement(t):{}}},ce4e:function(t,e,n){var r=n("da84");t.exports=function(t,e){try{Object.defineProperty(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},d012:function(t,e){t.exports={}},d039:function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},d066:function(t,e,n){var r=n("da84"),o=n("1626"),i=function(t){return o(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?i(r[t]):r[t]&&r[t][e]}},d1e7:function(t,e,n){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);e.f=i?function(t){var e=o(this,t);return!!e&&e.enumerable}:r},d9b5:function(t,e,n){var r=n("1626"),o=n("d066"),i=n("fdbf");t.exports=i?function(t){return"symbol"==typeof t}:function(t){var e=o("Symbol");return r(e)&&Object(t)instanceof e}},da84:function(t,e,n){(function(e){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||function(){return this}()||Function("return this")()}).call(this,n("c8ba"))},dc4a:function(t,e,n){var r=n("59ed");t.exports=function(t,e){var n=t[e];return null==n?void 0:r(n)}},df75:function(t,e,n){var r=n("ca84"),o=n("7839");t.exports=Object.keys||function(t){return r(t,o)}},e893:function(t,e,n){var r=n("5135"),o=n("56ef"),i=n("06cf"),c=n("9bf2");t.exports=function(t,e){for(var n=o(e),a=c.f,u=i.f,s=0;s<n.length;s++){var f=n[s];r(t,f)||a(t,f,u(e,f))}}},f5df:function(t,e,n){var r=n("00ee"),o=n("1626"),i=n("c6b6"),c=n("b622"),a=c("toStringTag"),u="Arguments"==i(function(){return arguments}()),s=function(t,e){try{return t[e]}catch(n){}};t.exports=r?i:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=s(e=Object(t),a))?n:u?i(e):"Object"==(r=i(e))&&o(e.callee)?"Arguments":r}},f772:function(t,e,n){var r=n("5692"),o=n("90e3"),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},fb15:function(t,e,n){"use strict";if(n.r(e),"undefined"!==typeof window){var r=window.document.currentScript,o=n("8875");r=o(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:o});var i=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);i&&(n.p=i[1])}var c=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("transition",{attrs:{name:"dtoast-"+t.adaptedTransition,appear:""},on:{"after-enter":t.afterTransitionEnter,"after-leave":t.afterTransitionLeave}},[t.visible?n("div",{staticClass:"dtoast-dub",style:null!=t.$props._style?t.$props._style:t.adaptedStyle},[n("div",{staticClass:"dt-struct"},[n("div",{staticClass:"dt-icon"},[n("i",{class:t.$props.icon,style:{color:t.$props.color,"font-size":t.$props.icon_size}})]),n("div",{staticClass:"dt-body"},[n("span",{staticClass:"dt-body-heading"},[t._v(t._s(t.$props.heading))]),n("span",{staticClass:"dt-body-content"},[t._v(t._s(t.$props.content))])]),n("div",{staticClass:"dt-action"},[n("svg",{style:{fill:t.$props.color},attrs:{width:"15px",height:"15px",viewBox:"0 0 24 24"},on:{click:t.hide}},[n("g",{attrs:{"data-name":"Layer 2"}},[n("g",{attrs:{"data-name":"close"}},[n("rect",{attrs:{width:"24",height:"24",transform:"rotate(180 12 12)",opacity:"0"}}),n("path",{attrs:{d:"M13.41 12l4.3-4.29a1 1 0 1 0-1.42-1.42L12 10.59l-4.29-4.3a1 1 0 0 0-1.42 1.42l4.3 4.29-4.3 4.29a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l4.29-4.3 4.29 4.3a1 1 0 0 0 1.42 0 1 1 0 0 0 0-1.42z"}})])])])])]),t.show_progress_timeout?n("div",{staticClass:"dt-progress",style:{background:t.$props.progress_background}},[n("div",{staticClass:"dt-thumb",style:{background:t.$props.progress_thumb_bg,width:(t.$props.position.includes("left")?100-t.elapsed_ms/t.$props.duration*100:t.elapsed_ms/t.$props.duration*100)+"%"}})]):t._e()]):t._e()])},a=[],u=(n("caad"),n("2532"),{name:"Toast",props:{containerVerticalOffset:{type:String,default:"35px"},containerSideOffset:{type:String,default:"5px"},toastVerticalOffset:{type:String,default:"5px"},position:{type:String,default:"top-right"},width:{type:String,default:"300px"},height:{type:String,default:"75px"},name:{type:String},heading:{type:String},content:{type:String},icon:{type:String},icon_size:{type:String,default:"23px"},transition:{type:String,default:"slide"},duration:{type:String,default:"1000"},background:{type:String,default:"black"},progress_background:{type:String,default:"tomato"},progress_thumb_bg:{type:String,default:"red"},color:{type:String,default:"white"},_style:{type:Object,default:null},show_progress_timeout:{type:String,default:"true"}},beforeMount:function(){var t=document.querySelector(".dtoast-ctn.dtoast-".concat(this.position));t||(t=document.createElement("div"),t.classList.add("dtoast-ctn"),t.classList.add("dtoast-".concat(this.position)),t.style.overflow="hidden",t.style.zIndex="9999999",this.$props.position.includes("top")?t.style.marginTop=this.$props.containerVerticalOffset:t.style.marginBottom=this.$props.containerVerticalOffset,this.$props.position.includes("left")?t.style.marginLeft=this.$props.containerSideOffset:t.style.marginRight=this.$props.containerSideOffset,document.body.appendChild(t)),t.appendChild(this.$el)},beforeDestroy:function(){this.$el.remove()},mounted:function(){this.visible=!0},computed:{adaptedStyle:function(){var t={background:this.$props.background,color:this.$props.color,width:this.$props.width,"min-height":this.$props.height};return t[this.$props.position.includes("top")?"margin-bottom":"margin-top"]=this.$props.toastVerticalOffset,t},adaptedTransition:function(){var t=this.$props.transition;return this.$props.position.includes("left")?t+="-left":t+="-right",t}},methods:{afterTransitionEnter:function(){var t=this,e=setInterval((function(){t.elapsed_ms>=t.$props.duration?clearInterval(e):t.elapsed_ms+=4.1}),1);setTimeout((function(){t.hide()}),this.$props.duration)},afterTransitionLeave:function(){this.$emit("hidden")},hide:function(){this.visible=!1}},data:function(){return{visible:!1,elapsed_ms:0}}}),s=u;n("9370");function f(t,e,n,r,o,i,c,a){var u,s="function"===typeof t?t.options:t;if(e&&(s.render=e,s.staticRenderFns=n,s._compiled=!0),r&&(s.functional=!0),i&&(s._scopeId="data-v-"+i),c?(u=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(c)},s._ssrRegister=u):o&&(u=a?function(){o.call(this,(s.functional?this.parent:this).$root.$options.shadowRoot)}:o),u)if(s.functional){s._injectStyles=u;var f=s.render;s.render=function(t,e){return u.call(e),f(t,e)}}else{var p=s.beforeCreate;s.beforeCreate=p?[].concat(p,u):[u]}return{exports:t,options:s}}var p=f(s,c,a,!1,null,null,null),d=p.exports;const l={install:function(t,e){function n(n){return new Promise((function(r,o){const i=t.extend(d);var c=e;if(void 0!=e.presets&&e.presets.length>0&&void 0!=n.preset){var a=e.presets.findIndex(t=>t.name==n.preset);if(-1==a)return void o({error:!0,what:"Unknown preset"});c=Object.assign(c,e.presets[a])}c=Object.assign(c,n);var u=new i({el:document.createElement("div"),propsData:c});u.$on("hidden",()=>{u.$destroy()}),r({error:!1,what:"Success",reward:u})}))}e||(e={}),t.prototype.$dtoast={pop(t){return n(t)}}}};var v=l;e["default"]=v},fc6a:function(t,e,n){var r=n("44ad"),o=n("1d80");t.exports=function(t){return r(o(t))}},fdbf:function(t,e,n){var r=n("4930");t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}})}));
//# sourceMappingURL=dtoaster.umd.min.js.map