You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
56 KiB
2 lines
56 KiB
2 years ago
|
System.register(["./preview-legacy.713764d2.js","./index-legacy.190ca0d6.js","./preload-helper-legacy.3a841cdc.js","./useAnimate-legacy.13c846f4.js","./plugin-vue_export-helper-legacy.7bb61c33.js"],(function(e){"use strict";var t,r,n,o,i,a,c,s,l,u,p,f,y,d,h,m,g,b,v,S,O,w,E,A,j,P,R,x,N,k,C,T,_,D,U,F,I,B,L,M,W,q;return{setters:[function(e){t=e.r},function(e){r=e.ap,n=e.aq,o=e.ar,i=e.as,a=e.at,c=e.au,s=e.av,l=e.aw,u=e.ax,p=e.ay,f=e.a8,y=e.r,d=e.N},function(e){h=e.S,m=e.E,g=e.a8,b=e.d,v=e.w,S=e.o,O=e.aE,w=e.y,E=e.D,A=e.aj,j=e.$,P=e.a1,R=e.a2,x=e.r,N=e.q,k=e.x,C=e.b,T=e.e,_=e.aL,D=e.N,U=e.k,F=e.H,I=e.j,B=e.aK,L=e.aR,M=e.t},function(e){W=e.u},function(e){q=e._}],execute:function(){let $=0;const[z,H]=n("toast"),J=["show","overlay","teleport","transition","overlayClass","overlayStyle","closeOnClickOverlay"],V={icon:String,show:Boolean,type:i("text"),overlay:Boolean,message:a,iconSize:a,duration:c(2e3),position:i("middle"),teleport:[String,Object],className:s,iconPrefix:String,transition:i("van-fade"),loadingType:String,forbidClick:Boolean,overlayClass:s,overlayStyle:Object,closeOnClick:Boolean,closeOnClickOverlay:Boolean};var G=b({name:z,props:V,emits:["update:show"],setup(e,{emit:t}){let r,n=!1;const i=()=>{const t=e.show&&e.forbidClick;n!==t&&(n=t,n?($||document.body.classList.add("van-toast--unclickable"),$++):$&&($--,$||document.body.classList.remove("van-toast--unclickable")))},a=e=>t("update:show",e),c=()=>{e.closeOnClick&&a(!1)},s=()=>clearTimeout(r),p=()=>{const{icon:t,type:r,iconSize:n,iconPrefix:o,loadingType:i}=e;return t||"success"===r||"fail"===r?w(l,{name:t||r,size:n,class:H("icon"),classPrefix:o},null):"loading"===r?w(u,{class:H("loading"),size:n,type:i},null):void 0},f=()=>{const{type:t,message:r}=e;if(j(r)&&""!==r)return"html"===t?w("div",{key:0,class:H("text"),innerHTML:String(r)},null):w("div",{class:H("text")},[r])};return v((()=>[e.show,e.forbidClick]),i),v((()=>[e.show,e.type,e.message,e.duration]),(()=>{s(),e.show&&e.duration>0&&(r=setTimeout((()=>{a(!1)}),e.duration))})),S(i),O(i),()=>w(o,E({class:[H([e.position,{[e.type]:!e.icon}]),e.className],lockScroll:!1,onClick:c,onClosed:s,"onUpdate:show":a},A(e,J)),{default:()=>[p(),f()]})}});const Q={icon:"",type:"text",message:"",className:"",overlay:!1,onClose:void 0,onOpened:void 0,duration:2e3,teleport:"body",iconSize:void 0,iconPrefix:void 0,position:"middle",transition:"van-fade",forbidClick:!1,loadingType:void 0,overlayClass:"",overlayStyle:void 0,closeOnClick:!1,closeOnClickOverlay:!1};let K=[],X=!1,Y=g({},Q);const Z=new Map;function ee(e){return R(e)?e:{message:e}}function te(){const{instance:e,unmount:t}=function(e){const t=h(e),r=document.createElement("div");return document.body.appendChild(r),{instance:t.mount(r),unmount(){t.unmount(),document.body.removeChild(r)}}}({setup(){const n=x(""),{open:o,state:i,close:a,toggle:c}=function(){const e=m({show:!1}),t=t=>{e.show=t},n=r=>{g(e,r,{transitionAppear:!0}),t(!0)},o=()=>t(!1);return r({open:n,close:o,toggle:t}),{open:n,close:o,state:e,toggle:t}}(),s=()=>{X&&(K=K.filter((t=>t!==e)),t())};return v(n,(e=>{i.message=e})),N().render=()=>w(G,E(i,{onClosed:s,"onUpdate:show":c}),null),{open:o,clear:a,message:n}}});return e}function re(e={}){if(!P)return{};const t=function(){if(!K.length||X){const e=te();K.push(e)}return K[K.length-1]}(),r=ee(e);return t.open(g({},Y,Z.get(r.type||Y.type),r)),t}const ne=e=>t=>re(g({type:e},ee(t)));re.loading=ne("loading"),re.success=ne("success"),re.fail=ne("fail"),re.clear=e=>{var t;K.length&&(e?(K.forEach((e=>{e.clear()})),K=[]):X?null==(t=K.shift())||t.clear():K[0].clear())},re.setDefaultOptions=function(e,t){"string"==typeof e?Z.set(e,t):g(Y,e)},re.resetDefaultOptions=e=>{"string"==typeof e?Z.delete(e):(Y=g({},Q),Z.clear())},re.allowMultiple=(e=!0)=>{X=e},re.install=e=>{e.use(p(G)),e.config.globalProperties.$toast=re};var oe,ie={exports:{}},ae=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}},ce=ae,se=Object.prototype.toString,le=(oe=Object.create(null),function(e){var t=se.call(e);return oe[t]||(o
|