1import{C as N,E as O,i2 as B,c as F,y as P,pB as L,p as V,m5 as I,i as k,I as E,mM as U,ws as _,xw as $,n as x,xx as A}from"./commonChunk.Cv2kmTxS.js";import{C as H}from"./2_EventOthersChunk.BOusZw25.js";import{b as M}from"./vendorChunk.T8IiCkLt.js";import{d as W,g as C,o as q,a as Z,b as m,m as z,r as D,e as Q,v as R,n as T}from"../vendors/vendor-stable.LjFvjOII.js";import"../vendors/vendor-swiper.CY4X6ze3.js";import"./1_PromotionChunk.I1eQfJBG.js";import"./1_AgentCenterChunk.azDnJss5.js";import"./0_WithdrawChunk.d9VmZ3M9.js";import"./0_RechargeCommonChunk.n7g7kS5_.js";import"./0_EntryLoginRegisterChunk.BE1vfMXJ.js";import"./1_MineChunk.CgY8skgk.js";import"./1_EmbeddedGameChunk.DWiR7WL0.js";import"../vendors/[email protected]";import"./1_PromoteChunk.CjhPD0o6.js";import"./1_ClubRebateChunk.BDcnQXag.js";import"./2_EventDialogsChunk.xBk8svuH.js";import"./1_SearchGameChunk.Bp8d6fmF.js";const Y={show:{type:Boolean,default:!1},icon:{type:[Object,Function],default:void 0},loadingColor:{type:String,required:!1},message:{type:[String,Object,Function],default:""},className:{type:O,default:null},type:{type:String,default:"info"},overlay:{type:Boolean,default:!1},overlayClass:{type:O,default:""},overlayStyle:{type:Object,default:null},duration:{type:Number,default:2e3},zIndex:{type:[Number,String]},closeOnClickOverlay:{type:Boolean,default:!1},transition:{type:String,default:N.Zoom},teleport:{type:[String,Element,Boolean],default:!1}};M('<symbol aria-hidden="true" viewBox="64 64 896 896" id="ui-exclamation-circle-a39166"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" /></symbol>',"ui-exclamation-circle-a39166");const G="ui-exclamation-circle-a39166";M('<symbol aria-hidden="true" viewBox="64 64 896 896" id="ui-info-circle-18d58c"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" /></symbol>',"ui-info-circle-18d58c");const J="ui-info-circle-18d58c",[K,d]=F("toast");var f=function(e){return e.Success="success",e.Info="info",e.Error="error",e.Warn="warn",e.Loading="loading",e}(f||{});let h=0;const X={[f.Success]:H,[f.Info]:J,[f.Warn]:G,[f.Error]:B};function ee(e){e?(h||document.body.classList.add("unclickable"),h++):h&&(h--,h||document.body.classList.remove("unclickable"))}const te=["show","overlay","teleport","transition","overlayClass","overlayStyle","closeOnClickOverlay","zIndex"],ne=W({name:K,props:Y,emits:["update:show"],setup(e,{emit:n}){let s;const c=P();let i=!1;const o=()=>{const t=e.show&&e.overlay;i!==t&&(i=t,ee(i))},r=t=>n("update:show",t),y=()=>clearTimeout(s),p=()=>{const{type:t,icon:a}=e;if(!I(a))return k(a)?a==null?void 0:a():a;if(t===f.Success||t===f.Info||t===f.Warn||t===f.Error)return m("div",{class:[d("toast--icon"),d(`toast--${t}`)]},[m(E,{name:X[t]},null)]);if(t===f.Loading)return m("div",{class:[d("toast--icon"),d("toast--loading")]},[m(U,{color:e.loadingColor},null)])},b=()=>{const{message:t}=e;if(t!==""&&!I(t)){const a=k(t)?t==null?void 0:t():t;return m("div",{class:[d("toast-message"),c.rtlClass]},[a])}};return C(()=>[e.show,e.overlay],o),C(()=>[e.show,e.type,e.message,e.duration],()=>{y(),e.show&&e.duration>0&&(s=setTimeout(()=>{r(!1)},e.duration))}),q(o),Z(o),()=>{var t;return m(L,z({lockScroll:!1,class:[d("toast"),d("toast--container"),d(`toast--${(t=e.type)!=null?t:""}`),e.className],onClosed:y,"onUpdate:show":r},V(e,te)),{default:()=>[m("div",{class:d("toast--instance")},[p(),b()])]})}}}),oe={icon:void 0,type:"info",message:"",className:"",overlay:!1,onClose:void 0,onOpened:void 0,duration:2e3,teleport:!1,transition:N.Zoom,overlayClass:"",overlayStyle:void 0,closeOnClick:!1,zIndex:5e3,closeOnClickOverlay:!1};let u=[];function w(e){return A(e)?e:{message:e}}function se(){const{instance:e,unmount:n}=$({setup(){const s=D(""),c=Q({show:!1});let i=x;const o=a=>{c.show=a},r=a=>{Object.assign(c,a),o(!0)},y=()=>{o(!1),p(x)},p=a=>{i=a},b=()=>{i(),u=u.filter(a=>a!==e),j(),n()},t=()=>m(ne,z(c,{onClosed:b,"onUpdate:show":o}),null);return C(s,a=>{c.message=a}),R().render=t,{open:r,close:y,message:s,setNext:p}}});return e}function ae(){const e=se();return u.push(e),e}function j(){const e=[];let n=0;const s=u.reduce((i,o)=>{var p;
1const r=(p=o.$el.parentNode)==null?void 0:p.querySelector(".ui-toast__toast--instance");e.push(r);const y=r?r.clientHeight+10:0;return n+=y,[...i,y]},[]);let c=-n/2;e.forEach((i,o)=>{o>0&&(c=c+s[o-1]),i&&(i.style.transform=`translateY(${c+s[o]/2}px)`)})}function S(e){const n=_();if(n.value==="visible"){e();return}const s=C(n,c=>{c==="visible"&&(s(),e())})}function l(e={},n="flush"){n==="flush"&&ce(!0);const s=u[u.length-1],c=ae(),i=w(e),o=()=>{u.includes(c)&&(c.open(Object.assign({},oe,i)),T(j))};return n==="overlay"||n==="flush"?S(o):n==="push"&&(s?s.setNext(()=>S(o)):S(o)),c}const g=e=>(n,s="flush")=>l(Object.assign({type:e},w(n)),s),v=e=>(n,s="flush")=>new Promise(c=>{const i=w(n),o=i.onClosed;let r;i.onClosed=()=>{o==null||o(),c(r)},r=l(Object.assign({type:e},i),s)});l.info=g("info");l.loading=g("loading");l.success=g("success");l.warn=g("warn");l.error=g("error");l.infoSync=v("info");l.loadingSync=v("loading");l.successSync=v("success");l.warnSync=v("warn");l.errorSync=v("error");const ce=e=>{var n;u.length&&(e?(u.forEach(s=>{s.close()}),u=[]):(n=u.shift())==null||n.close())};export{ce as closeToast,l as showToast};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.