./output/100.64.0.2_run/100.64.0.2_8083_1_initial_page.html:100:`+s):o.stack=s}catch{}}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Zr(this.defaults,n);const{transitional:o,paramsSerializer:r,headers:s}=n;o!==void 0&&ul.assertOptions(o,{silentJSONParsing:Jn.transitional(Jn.boolean),forcedJSONParsing:Jn.transitional(Jn.boolean),clarifyTimeoutError:Jn.transitional(Jn.boolean)},!1),r!=null&&(W.isFunction(r)?n.paramsSerializer={serialize:r}:ul.assertOptions(r,{encode:Jn.function,serialize:Jn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ul.assertOptions(n,{baseUrl:Jn.spelling("baseURL"),withXsrfToken:Jn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=s&&W.merge(s.common,s[n.method]);s&&W.forEach(["delete","get","head","post","put","patch","common"],m=>{delete s[m]}),n.headers=gn.concat(i,s);const a=[];let l=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(l=l&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const u=[];this.interceptors.response.forEach(function(g){u.push(g.fulfilled,g.rejected)});let c,d=0,p;if(!l){const m=[mm.bind(this),void 0];for(m.unshift(...a),m.push(...u),p=m.length,c=Promise.resolve(n);d<p;)c=c.then(m[d++],m[d++]);return c}p=a.length;let h=n;for(d=0;d<p;){const m=a[d++],g=a[d++];try{h=m(h)}catch(v){g.call(this,v);break}}try{c=mm.call(this,h)}catch(m){return Promise.reject(m)}for(d=0,p=u.length;d<p;)c=c.then(u[d++],u[d++]);return c}getUri(t){t=Zr(this.defaults,t);const n=n_(t.baseURL,t.url,t.allowAbsoluteUrls);return Xb(n,t.params,t.paramsSerializer)}};W.forEach(["delete","get","head","options"],function(t){Wr.prototype[t]=function(n,o){return this.request(Zr(o||{},{method:t,url:n,data:(o||{}).data}))}});W.forEach(["post","put","patch"],function(t){function n(o){return function(s,i,a){return this.request(Zr(a||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}Wr.prototype[t]=n(),Wr.prototype[t+"Form"]=n(!0)});let AR=class l_{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const o=this;this.promise.then(r=>{if(!o._listeners)return;let s=o._listeners.length;for(;s-- >0;)o._listeners[s](r);o._listeners=null}),this.promise.then=r=>{let s;const i=new Promise(a=>{o.subscribe(a),s=a}).then(r);return i.cancel=function(){o.unsubscribe(s)},i},t(function(s,i,a){o.reason||(o.reason=new ii(s,i,a),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=o=>{t.abort(o)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new l_(function(r){t=r}),cancel:t}}};function OR(e){return function(n){return e.apply(null,n)}}function TR(e){return W.isObject(e)&&e.isAxiosError===!0}const Ud={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ud).forEach(([e,t])=>{Ud[t]=e});function u_(e){const t=new Wr(e),n=Lb(Wr.prototype.request,t);return W.extend(n,Wr.prototype,t,{allOwnKeys:!0}),W.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return u_(Zr(e,r))},n}const xt=u_(Aa);xt.Axios=Wr;xt.CanceledError=ii;xt.CancelToken=AR;xt.isCancel=e_;xt.VERSION=a_;xt.toFormData=Du;xt.AxiosError=Ve;xt.Cancel=xt.CanceledError;xt.all=function(t){return Promise.all(t)};xt.spread=OR;xt.isAxiosError=TR;xt.mergeConfig=Zr;xt.AxiosHeaders=gn;xt.formToJSON=e=>Zb(W.isHTMLForm(e)?new FormData(e):e);xt.getAdapter=i_.getAdapter;xt.HttpStatusCode=Ud;xt.default=xt;const{Axios:DL,AxiosError:RL,CanceledError:BL,isCancel:ML,CancelToken:qL,VERSION:$L,all:FL,Cancel:LL,isAxiosError:NL,spread:jL,toFormData:VL,AxiosHeaders:UL,HttpStatusCode:HL,formToJSON:zL,getAdapter:KL,mergeConfig:WL}=xt;let Hd=1;var PR=class{constructor(){Mt(this,"subscribers");Mt(this,"toasts");Mt(this,"dismissedToasts");Mt(this,"subscribe",e=>(this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}));Mt(this,"publish",e=>{this.subscribers.forEach(t=>t(e))});Mt(this,"addToast",e=>{this.publish(e),this.toasts=[...this.toasts,e]});Mt(this,"create",e=>{var i;const{message:t,...n}=e,o=typeof e.id=="number"||e.id&&((i=e.id)==null?void 0:i.length)>0?e.id:Hd++,r=this.toasts.find(a=>a.id===o),s=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),r?this.toasts=this.toasts.map(a=>a.id===o?(this.publish({...a,...e,id:o,title:t}),{...a,...e,id:o,dismissible:s,title:t}):a):this.addToast({title:t,...n,dismissible:s,id:o}),o});Mt(this,"dismiss",e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),e));Mt(this,"message",(e,t)=>this.create({...t,message:e,type:"default"}));Mt(this,"error",(e,t)=>this.create({...t,type:"error",message:e}));Mt(this,"success",(e,t)=>this.create({...t,type:"success",message:e}));Mt(this,"info",(e,t)=>this.create({...t,type:"info",message:e}));Mt(this,"warning",(e,t)=>this.create({...t,type:"warning",message:e}));Mt(this,"loading",(e,t)=>this.create({...t,type:"loading",message:e}));Mt(this,"promise",(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));const o=Promise.resolve(e instanceof Function?e():e);let r=n!==void 0,s;const i=o.then(async l=>{if(s=["resolve",l],so(l))r=!1,this.create({id:n,type:"default",message:l});else if(IR(l)&&!l.ok){r=!1;const c=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description,h=typeof c=="object"&&!so(c)?c:{message:c||"",id:n||""};this.create({id:n,type:"error",description:d,...h})}else if(l instanceof Error){r=!1;const c=typeof t.error=="function"?await t.error(l):t.error,d=typeof t.description=="function"?await t.description(l):t.description,h=typeof c=="object"&&!so(c)?c:{message:c||"",id:n||""};this.create({id:n,type:"error",description:d,...h})}else if(t.success!==void 0){r=!1;const c=typeof t.success=="function"?await t.success(l):t.success,d=typeof t.description=="function"?await t.description(l):t.description,h=typeof c=="object"&&!so(c)?c:{message:c||"",id:n||""};this.create({id:n,type:"success",description:d,...h})}}).catch(async l=>{if(s=["reject",l],t.error!==void 0){r=!1;const u=typeof t.error=="function"?await t.error(l):t.error,c=typeof t.description=="function"?await t.description(l):t.description,p=typeof u=="object"&&!so(u)?u:{message:u||"",id:n||""};this.create({id:n,type:"error",description:c,...p})}}).finally(()=>{var l;r&&(this.dismiss(n),n=void 0),(l=t.finally)==null||l.call(t)}),a=()=>new Promise((l,u)=>i.then(()=>s[0]==="reject"?u(s[1]):l(s[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})});Mt(this,"custom",(e,t)=>{const n=(t==null?void 0:t.id)||Hd++;return this.publish({component:e,id:n,...t}),n});Mt(this,"getActiveToasts",()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)));this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}};const hn=new PR;function kR(e,t){const n=(t==null?void 0:t.id)||Hd++;return hn.create({message:e,id:n,type:"default",...t}),n}const IR=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",DR=kR,RR=()=>hn.toasts,BR=()=>hn.getActiveToasts(),Bi=Object.assign(DR,{success:hn.success,info:hn.info,warning:hn.warning,error:hn.error,custom:hn.custom,message:hn.message,promise:hn.promise,dismiss:hn.dismiss,loading:hn.loading},{getHistory:RR,getToasts:BR});function Wa(e){return e.label!==void 0}const MR=3,c_="24px",d_="16px",vm=4e3,qR=356,$R=14,FR=45,f_=200;function LR(){const e=N(!1);return ut(()=>{const t=()=>{e.value=document.hidden};return document.addEventListener("visibilitychange",t),()=>window.removeEventListener("visibilitychange",t)}),{isDocumentHidden:e}}function Go(...e){return e.filter(Boolean).join(" ")}function NR(e){const[t,n]=e.split("-"),o=[];return t&&o.push(t),n&&o.push(n),o}function jR(e,t){const n={};return[e,t].forEach((o,r)=>{const s=r===1,i=s?"--mobile-offset":"--offset",a=s?d_:c_;function l(u){["top","right","bottom","left"].forEach(c=>{n[`${i}-${c}`]=typeof u=="number"?`${u}px`:u})}typeof o=="number"||typeof o=="string"?l(o):typeof o=="object"?["top","right","bottom","left"].forEach(u=>{o[u]===void 0?n[`${i}-${u}`]=a:n[`${i}-${u}`]=typeof o[u]=="number"?`${o[u]}px`:o[u]}):l(a)}),n}const VR=["data-rich-colors","data-styled","data-mounted","data-promise","data-swiped","data-removed","data-visible","data-y-position","data-x-position","data-index","data-front","data-swiping","data-dismissible","data-type","data-invert","data-swipe-out","data-swipe-direction","data-expanded"],UR=["aria-label","data-disabled"];var HR=F({__name:"Toast",props:{toast:{},toasts:{},index:{},swipeDirections:{},expanded:{type:Boolean},invert:{type:Boolean},heights:{},gap:{},position:{},visibleToasts:{},expandByDefault:{type:Boolean},closeButton:{type:Boolean},interacting:{type:Boolean},style:{},cancelButtonStyle:{},actionButtonStyle:{},duration:{},class:{},unstyled:{type:Boolean},descriptionClass:{},loadingIcon:{},classes:{},icons:{},closeButtonAriaLabel:{},defaultRichColors:{type:Boolean}},emits:["update:heights","update:height","removeToast"],setup(e,{emit:t}){const n=e,o=t,r=N(null),s=N(null),i=N(!1),a=N(!1),l=N(!1),u=N(!1),c=N(!1),d=N(0),p=N(0),h=N(n.toast.duration||n.duration||vm),m=N(null),g=N(null),v=U(()=>n.index===0),y=U(()=>n.index+1<=n.visibleToasts),b=U(()=>n.toast.type),_=U(()=>n.toast.dismissible!==!1),O=U(()=>n.toast.class||""),T=U(()=>n.descriptionClass||""),A=U(()=>{const x=n.toast.position||n.position,H=n.heights.filter(X=>X.position===x).findIndex(X=>X.toastId===n.toast.id);return H>=0?H:0}),D=U(()=>{const x=n.toast.position||n.position;return n.heights.filter(H=>H.position===x).reduce((H,X,pe)=>pe>=A.value?H:H+X.height,0)}),P=U(()=>A.value*n.gap+D.value||0),w=U(()=>n.toast.closeButton??n.closeButton),k=U(()=>n.toast.duration||n.duration||vm),$=N(0),R=N(0),G=N(null),J=U(()=>n.position.split("-")),ne=U(()=>J.value[0]),ae=U(()=>J.value[1]),re=U(()=>typeof n.toast.title!="string"),L=U(()=>typeof n.toast.description!="string"),{isDocumentHidden:oe}=LR(),Y=U(()=>b.value&&b.value==="loading");je(()=>{i.value=!0,h.value=k.value}),ut(async()=>{if(!i.value||!g.value)return;await We();const x=g.value,z=x.style.height;x.style.height="auto";const H=x.getBoundingClientRect().height;x.style.height=z,p.value=H,o("update:height",{toastId:n.toast.id,height:H,position:n.toast.position||n.position})});function ee(){a.value=!0,d.value=P.value,setTimeout(()=>{o("removeToast",n.toast)},f_)}function le(){var x,z;if(Y.value||!_.value)return{};ee(),(z=(x=n.toast).onDismiss)==null||z.call(x,n.toast)}function ye(x){Y.value||!_.value||(m.value=new Date,d.value=P.value,x.target.setPointerCapture(x.pointerId),x.target.tagName!=="BUTTON"&&(l.value=!0,G.value={x:x.clientX,y:x.clientY}))}function me(){var S,I,j,K,Z,Q,ue;if(u.value||!_.value)return;G.value=null;const x=Number(((S=g.value)==null?void 0:S.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),z=Number(((I=g.value)==null?void 0:I.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),H=new Date().getTime()-(((j=m.value)==null?void 0:j.getTime())||0),X=r.value==="x"?x:z,pe=Math.abs(X)/H;if(Math.abs(X)>=FR||pe>.11){d.value=P.value,(Z=(K=n.toast).onDismiss)==null||Z.call(K,n.toast),r.value==="x"?s.value=x>0?"right":"left":s.value=z>0?"down":"up",ee(),u.value=!0;return}else(Q=g.value)==null||Q.style.setProperty("--swipe-amount-x","0px"),(ue=g.value)==null||ue.style.setProperty("--swipe-amount-y","0px");c.value=!1,l.value=!1,r.value=null}function Pe(x){var j,K,Z,Q;if(!G.value||!_.value||(((K=(j=window==null?void 0:window.getSelection())==null?void 0:j.toString())==null?void 0:K.length)??!1))return;const H=x.clientY-G.value.y,X=x.clientX-G.value.x,pe=n.swipeDirections??NR(n.position);!r.value&&(Math.abs(X)>1||Math.abs(H)>1)&&(r.value=Math.abs(X)>Math.abs(H)?"x":"y");let S={x:0,y:0};const I=ue=>1/(1.5+Math.abs(ue)/20);if(r.value==="y"){if(pe.includes("top")||pe.includes("bottom"))if(pe.includes("top")&&H<0||pe.includes("bottom")&&H>0)S.y=H;else{const ue=H*I(H);S.y=Math.abs(ue)<Math.abs(H)?ue:H}}else if(r.value==="x"&&(pe.includes("left")||pe.includes("right")))if(pe.includes("left")&&X<0||pe.includes("right")&&X>0)S.x=X;else{const ue=X*I(X);S.x=Math.abs(ue)<Math.abs(X)?ue:X}(Math.abs(S.x)>0||Math.abs(S.y)>0)&&(c.value=!0),(Z=g.value)==null||Z.style.setProperty("--swipe-amount-x",`${S.x}px`),(Q=g.value)==null||Q.style.setProperty("--swipe-amount-y",`${S.y}px`)}je(()=>{if(i.value=!0,!g.value)return;const x=g.value.getBoundingClientRect().height;p.value=x;const z=[{toastId:n.toast.id,height:x,position:n.toast.position},...n.heights];o("update:heights",z)}),Ys(()=>{g.value&&o("removeToast",n.toast)}),ut(x=>{if(n.toast.promise&&b.value==="loading"||n.toast.duration===1/0||n.toast.type==="loading")return;let z;const H=()=>{if(R.value<$.value){const pe=new Date().getTime()-$.value;h.value=h.value-pe}R.value=new Date().getTime()},X=()=>{h.value!==1/0&&($.value=new Date().getTime(),z=setTimeout(()=>{var pe,S;(S=(pe=n.toast).onAutoClose)==null||S.call(pe,n.toast),ee()},h.value))};n.expanded||n.interacting||oe.value?H():X(),x(()=>{clearTimeout(z)})}),Ce(()=>n.toast.delete,x=>{x!==void 0&&x&&ee()},{deep:!0});function Se(){l.value=!1,r.value=null,G.value=null}return(x,z)=>{var H,X,pe,S,I,j,K,Z,Q,ue,fe,de,se,xe,ge,Ee,ke,He,tt,Ye,At,mt,$t,Ft,yn,Cr,Bt;return C(),ie("li",{tabindex:"0",ref_key:"toastRef",ref:g,class:qe(f(Go)(n.class,O.value,(H=x.classes)==null?void 0:H.toast,(X=x.toast.classes)==null?void 0:X.toast,(pe=x.classes)==null?void 0:pe[b.value],(I=(S=x.toast)==null?void 0:S.classes)==null?void 0:I[b.value])),"data-sonner-toast":"","data-rich-colors":x.toast.richColors??x.defaultRichColors,"data-styled":!(x.toast.component||(j=x.toast)!=null&&j.unstyled||x.unstyled),"data-mounted":i.value,"data-promise":!!x.toast.promise,"data-swiped":c.value,"data-removed":a.value,"data-visible":y.value,"data-y-position":ne.value,"data-x-position":ae.value,"data-index":x.index,"data-front":v.value,"data-swiping":l.value,"data-dismissible":_.value,"data-type":b.value,"data-invert":x.toast.invert||x.invert,"data-swipe-out":u.value,"data-swipe-direction":s.value,"data-expanded":!!(x.expanded||x.expandByDefault&&i.value),style:Pt({"--index":x.index,"--toasts-before":x.index,"--z-index":x.toasts.length-x.index,"--offset":`${a.value?d.value:P.value}px`,"--initial-height":x.expandByDefault?"auto":`${p.value}px`,...x.style,...n.toast.style}),onDragend:Se,onPointerdown:ye,onPointerup:me,onPointermove:Pe},[w.value&&!x.toast.component&&b.value!=="loading"?(C(),ie("button",{key:0,"aria-label":x.closeButtonAriaLabel||"Close toast","data-disabled":Y.value,"data-close-button":"true",class:qe(f(Go)((K=x.classes)==null?void 0:K.closeButton,(Q=(Z=x.toast)==null?void 0:Z.classes)==null?void 0:Q.closeButton)),onClick:le},[(ue=x.icons)!=null&&ue.close?(C(),B(ro((fe=x.icons)==null?void 0:fe.close),{key:0})):V(x.$slots,"close-icon",{key:1})],10,UR)):Be("v-if",!0),x.toast.component?(C(),B(ro(x.toast.component),te({key:1},x.toast.componentProps,{onCloseToast:le}),null,16)):(C(),ie(Ie,{key:2},[b.value!=="default"||x.toast.icon||x.toast.promise?(C(),ie("div",{key:0,"data-icon":"",class:qe(f(Go)((de=x.classes)==null?void 0:de.icon,(xe=(se=x.toast)==null?void 0:se.classes)==null?void 0:xe.icon))},[x.toast.icon?(C(),B(ro(x.toast.icon),{key:0})):(C(),ie(Ie,{key:1},[b.value==="loading"?V(x.$slots,"loading-icon",{key:0}):b.value==="success"?V(x.$slots,"success-icon",{key:1}):b.value==="error"?V(x.$slots,"error-icon",{key:2}):b.value==="warning"?V(x.$slots,"warning-icon",{key:3}):b.value==="info"?V(x.$slots,"info-icon",{key:4}):Be("v-if",!0)],64))],2)):Be("v-if",!0),ce("div",{"data-content":"",class:qe(f(Go)((ge=x.classes)==null?void 0:ge.content,(ke=(Ee=x.toast)==null?void 0:Ee.classes)==null?void 0:ke.content))},[ce("div",{"data-title":"",class:qe(f(Go)((He=x.classes)==null?void 0:He.title,(tt=x.toast.classes)==null?void 0:tt.title))},[re.value?(C(),B(ro(x.toast.title),ct(te({key:0},x.toast.componentProps)),null,16)):(C(),ie(Ie,{key:1},[rt(Ne(x.toast.title),1)],64))],2),x.toast.description?(C(),ie("div",{key:0,"data-description":"",class:qe(f(Go)(x.descriptionClass,T.value,(Ye=x.classes)==null?void 0:Ye.description,(At=x.toast.classes)==null?void 0:At.description))},[L.value?(C(),B(ro(x.toast.description),ct(te({key:0},x.toast.componentProps)),null,16)):(C(),ie(Ie,{key:1},[rt(Ne(x.toast.description),1)],64))],2)):Be("v-if",!0)],2),x.toast.cancel?(C(),ie("button",{key:1,style:Pt(x.toast.cancelButtonStyle||x.cancelButtonStyle),class:qe(f(Go)((mt=x.classes)==null?void 0:mt.cancelButton,($t=x.toast.classes)==null?void 0:$t.cancelButton)),"data-button":"","data-cancel":"",onClick:z[0]||(z[0]=Lt=>{var Qn,Yn;f(Wa)(x.toast.cancel)&&_.value&&((Yn=(Qn=x.toast.cancel).onClick)==null||Yn.call(Qn,Lt),ee())})},Ne(f(Wa)(x.toast.cancel)?(Ft=x.toast.cancel)==null?void 0:Ft.label:x.toast.cancel),7)):Be("v-if",!0),x.toast.action?(C(),ie("button",{key:2,style:Pt(x.toast.actionButtonStyle||x.actionButtonStyle),class:qe(f(Go)((yn=x.classes)==null?void 0:yn.actionButton,(Cr=x.toast.classes)==null?void 0:Cr.actionButton)),"data-button":"","data-action":"",onClick:z[1]||(z[1]=Lt=>{var Qn,Yn;f(Wa)(x.toast.action)&&((Yn=(Qn=x.toast.action).onClick)==null||Yn.call(Qn,Lt),!Lt.defaultPrevented&&ee())})},Ne(f(Wa)(x.toast.action)?(Bt=x.toast.action)==null?void 0:Bt.label:x.toast.action),7)):Be("v-if",!0)],64))],46,VR)}}}),zR=HR,Oa=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n};const KR={},WR={xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stoke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"};function GR(e,t){return C(),ie("svg",WR,t[0]||(t[0]=[ce("line",{x1:"18",y1:"6",x2:"6",y2:"18"},null,-1),ce("line",{x1:"6",y1:"6",x2:"18",y2:"18"},null,-1)]))}var QR=Oa(KR,[["render",GR]]);const YR=["data-visible"],XR={class:"sonner-spinner"};var JR=F({__name:"Loader",props:{visible:{type:Boolean}},setup(e){const t=Array(12).fill(0);return(n,o)=>(C(),ie("div",{class:"sonner-loading-wrapper","data-visible":n.visible},[ce("div",XR,[(C(!0),ie(Ie,null,wt(f(t),r=>(C(),ie("div",{key:`spinner-bar-${r}`,class:"sonner-loading-bar"}))),128))])],8,YR))}}),ZR=JR;const eB={},tB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function nB(e,t){return C(),ie("svg",tB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z","clip-rule":"evenodd"},null,-1)]))}var oB=Oa(eB,[["render",nB]]);const rB={},sB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function iB(e,t){return C(),ie("svg",sB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z","clip-rule":"evenodd"},null,-1)]))}var aB=Oa(rB,[["render",iB]]);const lB={},uB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"};function cB(e,t){return C(),ie("svg",uB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z","clip-rule":"evenodd"},null,-1)]))}var dB=Oa(lB,[["render",cB]]);const fB={},pB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function hB(e,t){return C(),ie("svg",pB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z","clip-rule":"evenodd"},null,-1)]))}var mB=Oa(fB,[["render",hB]]);const gB=["aria-label"],vB=["data-sonner-theme","dir","data-theme","data-rich-colors","data-y-position","data-x-position","data-lifted"],yB=typeof window<"u"&&typeof document<"u";function bB(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var _B=F({name:"Toaster",inheritAttrs:!1,__name:"Toaster",props:{invert:{type:Boolean,default:!1},theme:{default:"light"},position:{default:"bottom-right"},hotkey:{default:()=>["altKey","KeyT"]},richColors:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},duration:{},gap:{default:$R},visibleToasts:{default:MR},closeButton:{type:Boolean,default:!1},toastOptions:{default:()=>({})},class:{default:""},style:{},offset:{default:c_},mobileOffset:{default:d_},dir:{default:"auto"},swipeDirections:{},icons:{},containerAriaLabel:{default:"Notifications"}},setup(e){const t=e,n=g0(),o=N([]);function r(w,k){return o.value.filter($=>!$.position&&k===0||$.position===w)}const s=U(()=>{const w=o.value.filter(k=>k.position).map(k=>k.position);return w.length>0?Array.from(new Set([t.position].concat(w))):[t.position]}),i=U(()=>{const w={};return s.value.forEach(k=>{w[k]=o.value.filter($=>$.position===k)}),w}),a=N([]),l=N(!1),u=N(!1),c=N(t.theme!=="system"?t.theme:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),d=N(null),p=N(null),h=N(!1),m=t.hotkey.join("+").replace(/Key/g,"").replace(/Digit/g,"");function g(w){var k;(k=o.value.find($=>$.id===w.id))!=null&&k.delete||hn.dismiss(w.id),o.value=o.value.filter(({id:$})=>$!==w.id),setTimeout(()=>{o.value.find($=>$.id===w.id)||(a.value=a.value.filter($=>$.toastId!==w.id))},f_+50)}function v(w){var k,$;h.value&&!(($=(k=w.currentTarget)==null?void 0:k.contains)!=null&&$.call(k,w.relatedTarget))&&(h.value=!1,p.value&&(p.value.focus({preventScroll:!0}),p.value=null))}function y(w){w.target instanceof HTMLElement&&w.target.dataset.dismissible==="false"||h.value||(h.value=!0,p.value=w.relatedTarget)}function b(w){w.target&&w.target instanceof HTMLElement&&w.target.dataset.dismissible==="false"||(u.value=!0)}ut(w=>{const k=hn.subscribe($=>{if($.dismiss){requestAnimationFrame(()=>{o.value=o.value.map(R=>R.id===$.id?{...R,delete:!0}:R)});return}We(()=>{const R=o.value.findIndex(G=>G.id===$.id);R!==-1?o.value=[...o.value.slice(0,R),{...o.value[R],...$},...o.value.slice(R+1)]:o.value=[$,...o.value]})});w(k)}),ut(w=>{if(typeof window>"u")return;if(t.theme!=="system"){c.value=t.theme;return}const k=window.matchMedia("(prefers-color-scheme: dark)"),$=G=>{c.value=G?"dark":"light"};$(k.matches);const R=G=>{$(G.matches)};try{k.addEventListener("change",R)}catch{k.addListener(R)}w(()=>{try{k.removeEventListener("change",R)}catch{k.removeListener(R)}})}),ut(()=>{d.value&&p.value&&(p.value.focus({preventScroll:!0}),p.value=null,h.value=!1)}),ut(()=>{o.value.length<=1&&(l.value=!1)}),ut(w=>{function k($){const R=t.hotkey.every(ne=>$[ne]||$.code===ne),G=Array.isArray(d.value)?d.value[0]:d.value;R&&(l.value=!0,G==null||G.focus());const J=document.activeElement===d.value||(G==null?void 0:G.contains(document.activeElement));$.code==="Escape"&&J&&(l.value=!1)}yB&&(document.addEventListener("keydown",k),w(()=>{document.removeEventListener("keydown",k)}))});function _(){l.value=!0}function O(){u.value||(l.value=!1)}function T(){l.value=!1}function A(){u.value=!1}function D(w){a.value=w}function P(w){const k=a.value.findIndex($=>$.toastId===w.toastId);if(k!==-1)a.value[k]=w;else{const $=a.value.findIndex(R=>R.position===w.position);$!==-1?a.value.splice($,0,w):a.value.unshift(w)}}return(w,k)=>(C(),ie(Ie,null,[Be(" Remove item from normal navigation flow, only available via hotkey "),ce("section",{"aria-label":`${w.containerAriaLabel} ${f(m)}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},[(C(!0),ie(Ie,null,wt(s.value,($,R)=>{var G;return C(),ie("ol",te({key:$,ref_for:!0,ref_key:"listRef",ref:d,"data-sonner-toaster":"","data-sonner-theme":c.value,class:t.class,dir:w.dir==="auto"?bB():w.dir,tabIndex:-1,"data-theme":w.theme,"data-rich-colors":w.richColors,"data-y-position":$.split("-")[0],"data-x-position":$.split("-")[1],"data-lifted":l.value&&o.value.length>1&&!w.expand,style:{"--front-toast-height":`${((G=a.value[0])==null?void 0:G.height)||0}px`,"--width":`${f(qR)}px`,"--gap":`${w.gap}px`,...w.style,...f(n).style,...f(jR)(w.offset,w.mobileOffset)}},w.$attrs,{onBlur:v,onFocus:y,onMouseenter:_,onMousemove:_,onMouseleave:O,onDragend:T,onPointerdown:b,onPointerup:A}),[(C(!0),ie(Ie,null,wt(r($,R),(J,ne)=>{var ae,re,L,oe,Y,ee,le,ye,me,Pe;return C(),B(zR,{key:J.id,heights:a.value,icons:w.icons,index:ne,toast:J,defaultRichColors:w.richColors,duration:((ae=w.toastOptions)==null?void 0:ae.duration)??w.duration,class:qe(((re=w.toastOptions)==null?void 0:re.class)??""),descriptionClass:(L=w.toastOptions)==null?void 0:L.descriptionClass,invert:w.invert,visibleToasts:w.visibleToasts,closeButton:((oe=w.toastOptions)==null?void 0:oe.closeButton)??w.closeButton,interacting:u.value,position:$,style:Pt((Y=w.toastOptions)==null?void 0:Y.style),unstyled:(ee=w.toastOptions)==null?void 0:ee.unstyled,classes:(le=w.toastOptions)==null?void 0:le.classes,cancelButtonStyle:(ye=w.toastOptions)==null?void 0:ye.cancelButtonStyle,actionButtonStyle:(me=w.toastOptions)==null?void 0:me.actionButtonStyle,"close-button-aria-label":(Pe=w.toastOptions)==null?void 0:Pe.closeButtonAriaLabel,toasts:i.value[$],expandByDefault:w.expand,gap:w.gap,expanded:l.value,swipeDirections:t.swipeDirections,"onUpdate:heights":D,"onUpdate:height":P,onRemoveToast:g},{"close-icon":E(()=>[V(w.$slots,"close-icon",{},()=>[q(QR)])]),"loading-icon":E(()=>[V(w.$slots,"loading-icon",{},()=>[q(ZR,{visible:J.type==="loading"},null,8,["visible"])])]),"success-icon":E(()=>[V(w.$slots,"success-icon",{},()=>[q(oB)])]),"error-icon":E(()=>[V(w.$slots,"error-icon",{},()=>[q(mB)])]),"warning-icon":E(()=>[V(w.$slots,"warning-icon",{},()=>[q(dB)])]),"info-icon":E(()=>[V(w.$slots,"info-icon",{},()=>[q(aB)])]),_:2},1032,["heights","icons","index","toast","defaultRichColors","duration","class","descriptionClass","invert","visibleToasts","closeButton","interacting","position","style","unstyled","classes","cancelButtonStyle","actionButtonStyle","close-button-aria-label","toasts","expandByDefault","gap","expanded","swipeDirections"])}),128))],16,vB)}),128))],8,gB)],2112))}}),wB=_B;const ko=xt.create({baseURL:"https://api.beenglish.eu.org/DesignScreenshot/admin-api",timeout:12e4,headers:{"Content-Type":"application/json"}});let bc=!1;const _c=[],SB=async()=>{try{const e=localStorage.getItem("refreshToken");if(!e)throw new Error("No refresh token found");const t=await xt.post(`/system/auth/refresh-token?refreshToken=${e}`),{token:n,refreshToken:o}=t.data;return localStorage.setItem("accessToken",n),localStorage.setItem("refreshToken",o),n}catch(e){return localStorage.removeItem("accessToken"),localStorage.removeItem("refreshToken"),window.location.href="/auth",Promise.reject(e)}};ko.interceptors.request.use(e=>{const t=localStorage.getItem("accessToken");return t&&e.headers&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e));ko.interceptors.response.use(async e=>{const{data:t,status:n}=e;if(n!==200)return Bi.error(t.msg||"请求失败"),Promise.reject(new Error(t.msg||"请求失败"));if(t.code===401){const o=e.config;if(!o._retry){if(bc)return new Promise(r=>{_c.push(s=>{o.headers&&(o.headers.Authorization=`Bearer ${s}`),r(ko(o))})});o._retry=!0,bc=!0;try{const r=await SB();return o.headers&&(o.headers.Authorization=`Bearer ${r}`),_c.forEach(s=>s(r)),_c.length=0,ko(o)}catch(r){return Promise.reject(r)}finally{bc=!1}}}return t.code===0?t.data:(Bi.error(t.msg||"请求失败"),Promise.reject(new Error(t.msg||"请求失败")))},e=>{const t=e.message||"网络错误";return Bi.error(t),Promise.reject(e)});const wr=(e,t)=>ko.get(e,{params:t}),Sr=(e,t,n)=>ko.post(e,t,n),p_=(e,t)=>ko.put(e,t),h_=(e,t)=>ko.delete(e,{params:t}),GL=(e,t)=>ko.post(e,t,{headers:{"Content-Type":"multipart/form-data"}}),CB=e=>wr("/admin/app/page",e),xB=e=>wr("/admin/app/get-app-details",{appId:e}),EB=e=>wr("/admin/app/list",e),QL=e=>Sr("/admin/app/create",e),YL=e=>p_("/admin/app/update",e),XL=e=>h_("/admin/app/delete",e),ep=Symbol("platform"),m_=bf("app",()=>{const e=N([]);return{apps:e,fetchApps:async n=>{const o=await EB({platform:n});e.value=o}}});/*!
./output/100.64.0.2_run/100.64.0.2_8083_3_credentials_filled.html:100:`+s):o.stack=s}catch{}}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Zr(this.defaults,n);const{transitional:o,paramsSerializer:r,headers:s}=n;o!==void 0&&ul.assertOptions(o,{silentJSONParsing:Jn.transitional(Jn.boolean),forcedJSONParsing:Jn.transitional(Jn.boolean),clarifyTimeoutError:Jn.transitional(Jn.boolean)},!1),r!=null&&(W.isFunction(r)?n.paramsSerializer={serialize:r}:ul.assertOptions(r,{encode:Jn.function,serialize:Jn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ul.assertOptions(n,{baseUrl:Jn.spelling("baseURL"),withXsrfToken:Jn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=s&&W.merge(s.common,s[n.method]);s&&W.forEach(["delete","get","head","post","put","patch","common"],m=>{delete s[m]}),n.headers=gn.concat(i,s);const a=[];let l=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(l=l&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const u=[];this.interceptors.response.forEach(function(g){u.push(g.fulfilled,g.rejected)});let c,d=0,p;if(!l){const m=[mm.bind(this),void 0];for(m.unshift(...a),m.push(...u),p=m.length,c=Promise.resolve(n);d<p;)c=c.then(m[d++],m[d++]);return c}p=a.length;let h=n;for(d=0;d<p;){const m=a[d++],g=a[d++];try{h=m(h)}catch(v){g.call(this,v);break}}try{c=mm.call(this,h)}catch(m){return Promise.reject(m)}for(d=0,p=u.length;d<p;)c=c.then(u[d++],u[d++]);return c}getUri(t){t=Zr(this.defaults,t);const n=n_(t.baseURL,t.url,t.allowAbsoluteUrls);return Xb(n,t.params,t.paramsSerializer)}};W.forEach(["delete","get","head","options"],function(t){Wr.prototype[t]=function(n,o){return this.request(Zr(o||{},{method:t,url:n,data:(o||{}).data}))}});W.forEach(["post","put","patch"],function(t){function n(o){return function(s,i,a){return this.request(Zr(a||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}Wr.prototype[t]=n(),Wr.prototype[t+"Form"]=n(!0)});let AR=class l_{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const o=this;this.promise.then(r=>{if(!o._listeners)return;let s=o._listeners.length;for(;s-- >0;)o._listeners[s](r);o._listeners=null}),this.promise.then=r=>{let s;const i=new Promise(a=>{o.subscribe(a),s=a}).then(r);return i.cancel=function(){o.unsubscribe(s)},i},t(function(s,i,a){o.reason||(o.reason=new ii(s,i,a),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=o=>{t.abort(o)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new l_(function(r){t=r}),cancel:t}}};function OR(e){return function(n){return e.apply(null,n)}}function TR(e){return W.isObject(e)&&e.isAxiosError===!0}const Ud={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ud).forEach(([e,t])=>{Ud[t]=e});function u_(e){const t=new Wr(e),n=Lb(Wr.prototype.request,t);return W.extend(n,Wr.prototype,t,{allOwnKeys:!0}),W.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return u_(Zr(e,r))},n}const xt=u_(Aa);xt.Axios=Wr;xt.CanceledError=ii;xt.CancelToken=AR;xt.isCancel=e_;xt.VERSION=a_;xt.toFormData=Du;xt.AxiosError=Ve;xt.Cancel=xt.CanceledError;xt.all=function(t){return Promise.all(t)};xt.spread=OR;xt.isAxiosError=TR;xt.mergeConfig=Zr;xt.AxiosHeaders=gn;xt.formToJSON=e=>Zb(W.isHTMLForm(e)?new FormData(e):e);xt.getAdapter=i_.getAdapter;xt.HttpStatusCode=Ud;xt.default=xt;const{Axios:DL,AxiosError:RL,CanceledError:BL,isCancel:ML,CancelToken:qL,VERSION:$L,all:FL,Cancel:LL,isAxiosError:NL,spread:jL,toFormData:VL,AxiosHeaders:UL,HttpStatusCode:HL,formToJSON:zL,getAdapter:KL,mergeConfig:WL}=xt;let Hd=1;var PR=class{constructor(){Mt(this,"subscribers");Mt(this,"toasts");Mt(this,"dismissedToasts");Mt(this,"subscribe",e=>(this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}));Mt(this,"publish",e=>{this.subscribers.forEach(t=>t(e))});Mt(this,"addToast",e=>{this.publish(e),this.toasts=[...this.toasts,e]});Mt(this,"create",e=>{var i;const{message:t,...n}=e,o=typeof e.id=="number"||e.id&&((i=e.id)==null?void 0:i.length)>0?e.id:Hd++,r=this.toasts.find(a=>a.id===o),s=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),r?this.toasts=this.toasts.map(a=>a.id===o?(this.publish({...a,...e,id:o,title:t}),{...a,...e,id:o,dismissible:s,title:t}):a):this.addToast({title:t,...n,dismissible:s,id:o}),o});Mt(this,"dismiss",e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),e));Mt(this,"message",(e,t)=>this.create({...t,message:e,type:"default"}));Mt(this,"error",(e,t)=>this.create({...t,type:"error",message:e}));Mt(this,"success",(e,t)=>this.create({...t,type:"success",message:e}));Mt(this,"info",(e,t)=>this.create({...t,type:"info",message:e}));Mt(this,"warning",(e,t)=>this.create({...t,type:"warning",message:e}));Mt(this,"loading",(e,t)=>this.create({...t,type:"loading",message:e}));Mt(this,"promise",(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));const o=Promise.resolve(e instanceof Function?e():e);let r=n!==void 0,s;const i=o.then(async l=>{if(s=["resolve",l],so(l))r=!1,this.create({id:n,type:"default",message:l});else if(IR(l)&&!l.ok){r=!1;const c=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description,h=typeof c=="object"&&!so(c)?c:{message:c||"",id:n||""};this.create({id:n,type:"error",description:d,...h})}else if(l instanceof Error){r=!1;const c=typeof t.error=="function"?await t.error(l):t.error,d=typeof t.description=="function"?await t.description(l):t.description,h=typeof c=="object"&&!so(c)?c:{message:c||"",id:n||""};this.create({id:n,type:"error",description:d,...h})}else if(t.success!==void 0){r=!1;const c=typeof t.success=="function"?await t.success(l):t.success,d=typeof t.description=="function"?await t.description(l):t.description,h=typeof c=="object"&&!so(c)?c:{message:c||"",id:n||""};this.create({id:n,type:"success",description:d,...h})}}).catch(async l=>{if(s=["reject",l],t.error!==void 0){r=!1;const u=typeof t.error=="function"?await t.error(l):t.error,c=typeof t.description=="function"?await t.description(l):t.description,p=typeof u=="object"&&!so(u)?u:{message:u||"",id:n||""};this.create({id:n,type:"error",description:c,...p})}}).finally(()=>{var l;r&&(this.dismiss(n),n=void 0),(l=t.finally)==null||l.call(t)}),a=()=>new Promise((l,u)=>i.then(()=>s[0]==="reject"?u(s[1]):l(s[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})});Mt(this,"custom",(e,t)=>{const n=(t==null?void 0:t.id)||Hd++;return this.publish({component:e,id:n,...t}),n});Mt(this,"getActiveToasts",()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)));this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}};const hn=new PR;function kR(e,t){const n=(t==null?void 0:t.id)||Hd++;return hn.create({message:e,id:n,type:"default",...t}),n}const IR=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",DR=kR,RR=()=>hn.toasts,BR=()=>hn.getActiveToasts(),Bi=Object.assign(DR,{success:hn.success,info:hn.info,warning:hn.warning,error:hn.error,custom:hn.custom,message:hn.message,promise:hn.promise,dismiss:hn.dismiss,loading:hn.loading},{getHistory:RR,getToasts:BR});function Wa(e){return e.label!==void 0}const MR=3,c_="24px",d_="16px",vm=4e3,qR=356,$R=14,FR=45,f_=200;function LR(){const e=N(!1);return ut(()=>{const t=()=>{e.value=document.hidden};return document.addEventListener("visibilitychange",t),()=>window.removeEventListener("visibilitychange",t)}),{isDocumentHidden:e}}function Go(...e){return e.filter(Boolean).join(" ")}function NR(e){const[t,n]=e.split("-"),o=[];return t&&o.push(t),n&&o.push(n),o}function jR(e,t){const n={};return[e,t].forEach((o,r)=>{const s=r===1,i=s?"--mobile-offset":"--offset",a=s?d_:c_;function l(u){["top","right","bottom","left"].forEach(c=>{n[`${i}-${c}`]=typeof u=="number"?`${u}px`:u})}typeof o=="number"||typeof o=="string"?l(o):typeof o=="object"?["top","right","bottom","left"].forEach(u=>{o[u]===void 0?n[`${i}-${u}`]=a:n[`${i}-${u}`]=typeof o[u]=="number"?`${o[u]}px`:o[u]}):l(a)}),n}const VR=["data-rich-colors","data-styled","data-mounted","data-promise","data-swiped","data-removed","data-visible","data-y-position","data-x-position","data-index","data-front","data-swiping","data-dismissible","data-type","data-invert","data-swipe-out","data-swipe-direction","data-expanded"],UR=["aria-label","data-disabled"];var HR=F({__name:"Toast",props:{toast:{},toasts:{},index:{},swipeDirections:{},expanded:{type:Boolean},invert:{type:Boolean},heights:{},gap:{},position:{},visibleToasts:{},expandByDefault:{type:Boolean},closeButton:{type:Boolean},interacting:{type:Boolean},style:{},cancelButtonStyle:{},actionButtonStyle:{},duration:{},class:{},unstyled:{type:Boolean},descriptionClass:{},loadingIcon:{},classes:{},icons:{},closeButtonAriaLabel:{},defaultRichColors:{type:Boolean}},emits:["update:heights","update:height","removeToast"],setup(e,{emit:t}){const n=e,o=t,r=N(null),s=N(null),i=N(!1),a=N(!1),l=N(!1),u=N(!1),c=N(!1),d=N(0),p=N(0),h=N(n.toast.duration||n.duration||vm),m=N(null),g=N(null),v=U(()=>n.index===0),y=U(()=>n.index+1<=n.visibleToasts),b=U(()=>n.toast.type),_=U(()=>n.toast.dismissible!==!1),O=U(()=>n.toast.class||""),T=U(()=>n.descriptionClass||""),A=U(()=>{const x=n.toast.position||n.position,H=n.heights.filter(X=>X.position===x).findIndex(X=>X.toastId===n.toast.id);return H>=0?H:0}),D=U(()=>{const x=n.toast.position||n.position;return n.heights.filter(H=>H.position===x).reduce((H,X,pe)=>pe>=A.value?H:H+X.height,0)}),P=U(()=>A.value*n.gap+D.value||0),w=U(()=>n.toast.closeButton??n.closeButton),k=U(()=>n.toast.duration||n.duration||vm),$=N(0),R=N(0),G=N(null),J=U(()=>n.position.split("-")),ne=U(()=>J.value[0]),ae=U(()=>J.value[1]),re=U(()=>typeof n.toast.title!="string"),L=U(()=>typeof n.toast.description!="string"),{isDocumentHidden:oe}=LR(),Y=U(()=>b.value&&b.value==="loading");je(()=>{i.value=!0,h.value=k.value}),ut(async()=>{if(!i.value||!g.value)return;await We();const x=g.value,z=x.style.height;x.style.height="auto";const H=x.getBoundingClientRect().height;x.style.height=z,p.value=H,o("update:height",{toastId:n.toast.id,height:H,position:n.toast.position||n.position})});function ee(){a.value=!0,d.value=P.value,setTimeout(()=>{o("removeToast",n.toast)},f_)}function le(){var x,z;if(Y.value||!_.value)return{};ee(),(z=(x=n.toast).onDismiss)==null||z.call(x,n.toast)}function ye(x){Y.value||!_.value||(m.value=new Date,d.value=P.value,x.target.setPointerCapture(x.pointerId),x.target.tagName!=="BUTTON"&&(l.value=!0,G.value={x:x.clientX,y:x.clientY}))}function me(){var S,I,j,K,Z,Q,ue;if(u.value||!_.value)return;G.value=null;const x=Number(((S=g.value)==null?void 0:S.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),z=Number(((I=g.value)==null?void 0:I.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),H=new Date().getTime()-(((j=m.value)==null?void 0:j.getTime())||0),X=r.value==="x"?x:z,pe=Math.abs(X)/H;if(Math.abs(X)>=FR||pe>.11){d.value=P.value,(Z=(K=n.toast).onDismiss)==null||Z.call(K,n.toast),r.value==="x"?s.value=x>0?"right":"left":s.value=z>0?"down":"up",ee(),u.value=!0;return}else(Q=g.value)==null||Q.style.setProperty("--swipe-amount-x","0px"),(ue=g.value)==null||ue.style.setProperty("--swipe-amount-y","0px");c.value=!1,l.value=!1,r.value=null}function Pe(x){var j,K,Z,Q;if(!G.value||!_.value||(((K=(j=window==null?void 0:window.getSelection())==null?void 0:j.toString())==null?void 0:K.length)??!1))return;const H=x.clientY-G.value.y,X=x.clientX-G.value.x,pe=n.swipeDirections??NR(n.position);!r.value&&(Math.abs(X)>1||Math.abs(H)>1)&&(r.value=Math.abs(X)>Math.abs(H)?"x":"y");let S={x:0,y:0};const I=ue=>1/(1.5+Math.abs(ue)/20);if(r.value==="y"){if(pe.includes("top")||pe.includes("bottom"))if(pe.includes("top")&&H<0||pe.includes("bottom")&&H>0)S.y=H;else{const ue=H*I(H);S.y=Math.abs(ue)<Math.abs(H)?ue:H}}else if(r.value==="x"&&(pe.includes("left")||pe.includes("right")))if(pe.includes("left")&&X<0||pe.includes("right")&&X>0)S.x=X;else{const ue=X*I(X);S.x=Math.abs(ue)<Math.abs(X)?ue:X}(Math.abs(S.x)>0||Math.abs(S.y)>0)&&(c.value=!0),(Z=g.value)==null||Z.style.setProperty("--swipe-amount-x",`${S.x}px`),(Q=g.value)==null||Q.style.setProperty("--swipe-amount-y",`${S.y}px`)}je(()=>{if(i.value=!0,!g.value)return;const x=g.value.getBoundingClientRect().height;p.value=x;const z=[{toastId:n.toast.id,height:x,position:n.toast.position},...n.heights];o("update:heights",z)}),Ys(()=>{g.value&&o("removeToast",n.toast)}),ut(x=>{if(n.toast.promise&&b.value==="loading"||n.toast.duration===1/0||n.toast.type==="loading")return;let z;const H=()=>{if(R.value<$.value){const pe=new Date().getTime()-$.value;h.value=h.value-pe}R.value=new Date().getTime()},X=()=>{h.value!==1/0&&($.value=new Date().getTime(),z=setTimeout(()=>{var pe,S;(S=(pe=n.toast).onAutoClose)==null||S.call(pe,n.toast),ee()},h.value))};n.expanded||n.interacting||oe.value?H():X(),x(()=>{clearTimeout(z)})}),Ce(()=>n.toast.delete,x=>{x!==void 0&&x&&ee()},{deep:!0});function Se(){l.value=!1,r.value=null,G.value=null}return(x,z)=>{var H,X,pe,S,I,j,K,Z,Q,ue,fe,de,se,xe,ge,Ee,ke,He,tt,Ye,At,mt,$t,Ft,yn,Cr,Bt;return C(),ie("li",{tabindex:"0",ref_key:"toastRef",ref:g,class:qe(f(Go)(n.class,O.value,(H=x.classes)==null?void 0:H.toast,(X=x.toast.classes)==null?void 0:X.toast,(pe=x.classes)==null?void 0:pe[b.value],(I=(S=x.toast)==null?void 0:S.classes)==null?void 0:I[b.value])),"data-sonner-toast":"","data-rich-colors":x.toast.richColors??x.defaultRichColors,"data-styled":!(x.toast.component||(j=x.toast)!=null&&j.unstyled||x.unstyled),"data-mounted":i.value,"data-promise":!!x.toast.promise,"data-swiped":c.value,"data-removed":a.value,"data-visible":y.value,"data-y-position":ne.value,"data-x-position":ae.value,"data-index":x.index,"data-front":v.value,"data-swiping":l.value,"data-dismissible":_.value,"data-type":b.value,"data-invert":x.toast.invert||x.invert,"data-swipe-out":u.value,"data-swipe-direction":s.value,"data-expanded":!!(x.expanded||x.expandByDefault&&i.value),style:Pt({"--index":x.index,"--toasts-before":x.index,"--z-index":x.toasts.length-x.index,"--offset":`${a.value?d.value:P.value}px`,"--initial-height":x.expandByDefault?"auto":`${p.value}px`,...x.style,...n.toast.style}),onDragend:Se,onPointerdown:ye,onPointerup:me,onPointermove:Pe},[w.value&&!x.toast.component&&b.value!=="loading"?(C(),ie("button",{key:0,"aria-label":x.closeButtonAriaLabel||"Close toast","data-disabled":Y.value,"data-close-button":"true",class:qe(f(Go)((K=x.classes)==null?void 0:K.closeButton,(Q=(Z=x.toast)==null?void 0:Z.classes)==null?void 0:Q.closeButton)),onClick:le},[(ue=x.icons)!=null&&ue.close?(C(),B(ro((fe=x.icons)==null?void 0:fe.close),{key:0})):V(x.$slots,"close-icon",{key:1})],10,UR)):Be("v-if",!0),x.toast.component?(C(),B(ro(x.toast.component),te({key:1},x.toast.componentProps,{onCloseToast:le}),null,16)):(C(),ie(Ie,{key:2},[b.value!=="default"||x.toast.icon||x.toast.promise?(C(),ie("div",{key:0,"data-icon":"",class:qe(f(Go)((de=x.classes)==null?void 0:de.icon,(xe=(se=x.toast)==null?void 0:se.classes)==null?void 0:xe.icon))},[x.toast.icon?(C(),B(ro(x.toast.icon),{key:0})):(C(),ie(Ie,{key:1},[b.value==="loading"?V(x.$slots,"loading-icon",{key:0}):b.value==="success"?V(x.$slots,"success-icon",{key:1}):b.value==="error"?V(x.$slots,"error-icon",{key:2}):b.value==="warning"?V(x.$slots,"warning-icon",{key:3}):b.value==="info"?V(x.$slots,"info-icon",{key:4}):Be("v-if",!0)],64))],2)):Be("v-if",!0),ce("div",{"data-content":"",class:qe(f(Go)((ge=x.classes)==null?void 0:ge.content,(ke=(Ee=x.toast)==null?void 0:Ee.classes)==null?void 0:ke.content))},[ce("div",{"data-title":"",class:qe(f(Go)((He=x.classes)==null?void 0:He.title,(tt=x.toast.classes)==null?void 0:tt.title))},[re.value?(C(),B(ro(x.toast.title),ct(te({key:0},x.toast.componentProps)),null,16)):(C(),ie(Ie,{key:1},[rt(Ne(x.toast.title),1)],64))],2),x.toast.description?(C(),ie("div",{key:0,"data-description":"",class:qe(f(Go)(x.descriptionClass,T.value,(Ye=x.classes)==null?void 0:Ye.description,(At=x.toast.classes)==null?void 0:At.description))},[L.value?(C(),B(ro(x.toast.description),ct(te({key:0},x.toast.componentProps)),null,16)):(C(),ie(Ie,{key:1},[rt(Ne(x.toast.description),1)],64))],2)):Be("v-if",!0)],2),x.toast.cancel?(C(),ie("button",{key:1,style:Pt(x.toast.cancelButtonStyle||x.cancelButtonStyle),class:qe(f(Go)((mt=x.classes)==null?void 0:mt.cancelButton,($t=x.toast.classes)==null?void 0:$t.cancelButton)),"data-button":"","data-cancel":"",onClick:z[0]||(z[0]=Lt=>{var Qn,Yn;f(Wa)(x.toast.cancel)&&_.value&&((Yn=(Qn=x.toast.cancel).onClick)==null||Yn.call(Qn,Lt),ee())})},Ne(f(Wa)(x.toast.cancel)?(Ft=x.toast.cancel)==null?void 0:Ft.label:x.toast.cancel),7)):Be("v-if",!0),x.toast.action?(C(),ie("button",{key:2,style:Pt(x.toast.actionButtonStyle||x.actionButtonStyle),class:qe(f(Go)((yn=x.classes)==null?void 0:yn.actionButton,(Cr=x.toast.classes)==null?void 0:Cr.actionButton)),"data-button":"","data-action":"",onClick:z[1]||(z[1]=Lt=>{var Qn,Yn;f(Wa)(x.toast.action)&&((Yn=(Qn=x.toast.action).onClick)==null||Yn.call(Qn,Lt),!Lt.defaultPrevented&&ee())})},Ne(f(Wa)(x.toast.action)?(Bt=x.toast.action)==null?void 0:Bt.label:x.toast.action),7)):Be("v-if",!0)],64))],46,VR)}}}),zR=HR,Oa=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n};const KR={},WR={xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stoke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"};function GR(e,t){return C(),ie("svg",WR,t[0]||(t[0]=[ce("line",{x1:"18",y1:"6",x2:"6",y2:"18"},null,-1),ce("line",{x1:"6",y1:"6",x2:"18",y2:"18"},null,-1)]))}var QR=Oa(KR,[["render",GR]]);const YR=["data-visible"],XR={class:"sonner-spinner"};var JR=F({__name:"Loader",props:{visible:{type:Boolean}},setup(e){const t=Array(12).fill(0);return(n,o)=>(C(),ie("div",{class:"sonner-loading-wrapper","data-visible":n.visible},[ce("div",XR,[(C(!0),ie(Ie,null,wt(f(t),r=>(C(),ie("div",{key:`spinner-bar-${r}`,class:"sonner-loading-bar"}))),128))])],8,YR))}}),ZR=JR;const eB={},tB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function nB(e,t){return C(),ie("svg",tB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z","clip-rule":"evenodd"},null,-1)]))}var oB=Oa(eB,[["render",nB]]);const rB={},sB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function iB(e,t){return C(),ie("svg",sB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z","clip-rule":"evenodd"},null,-1)]))}var aB=Oa(rB,[["render",iB]]);const lB={},uB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"};function cB(e,t){return C(),ie("svg",uB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z","clip-rule":"evenodd"},null,-1)]))}var dB=Oa(lB,[["render",cB]]);const fB={},pB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function hB(e,t){return C(),ie("svg",pB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z","clip-rule":"evenodd"},null,-1)]))}var mB=Oa(fB,[["render",hB]]);const gB=["aria-label"],vB=["data-sonner-theme","dir","data-theme","data-rich-colors","data-y-position","data-x-position","data-lifted"],yB=typeof window<"u"&&typeof document<"u";function bB(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var _B=F({name:"Toaster",inheritAttrs:!1,__name:"Toaster",props:{invert:{type:Boolean,default:!1},theme:{default:"light"},position:{default:"bottom-right"},hotkey:{default:()=>["altKey","KeyT"]},richColors:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},duration:{},gap:{default:$R},visibleToasts:{default:MR},closeButton:{type:Boolean,default:!1},toastOptions:{default:()=>({})},class:{default:""},style:{},offset:{default:c_},mobileOffset:{default:d_},dir:{default:"auto"},swipeDirections:{},icons:{},containerAriaLabel:{default:"Notifications"}},setup(e){const t=e,n=g0(),o=N([]);function r(w,k){return o.value.filter($=>!$.position&&k===0||$.position===w)}const s=U(()=>{const w=o.value.filter(k=>k.position).map(k=>k.position);return w.length>0?Array.from(new Set([t.position].concat(w))):[t.position]}),i=U(()=>{const w={};return s.value.forEach(k=>{w[k]=o.value.filter($=>$.position===k)}),w}),a=N([]),l=N(!1),u=N(!1),c=N(t.theme!=="system"?t.theme:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),d=N(null),p=N(null),h=N(!1),m=t.hotkey.join("+").replace(/Key/g,"").replace(/Digit/g,"");function g(w){var k;(k=o.value.find($=>$.id===w.id))!=null&&k.delete||hn.dismiss(w.id),o.value=o.value.filter(({id:$})=>$!==w.id),setTimeout(()=>{o.value.find($=>$.id===w.id)||(a.value=a.value.filter($=>$.toastId!==w.id))},f_+50)}function v(w){var k,$;h.value&&!(($=(k=w.currentTarget)==null?void 0:k.contains)!=null&&$.call(k,w.relatedTarget))&&(h.value=!1,p.value&&(p.value.focus({preventScroll:!0}),p.value=null))}function y(w){w.target instanceof HTMLElement&&w.target.dataset.dismissible==="false"||h.value||(h.value=!0,p.value=w.relatedTarget)}function b(w){w.target&&w.target instanceof HTMLElement&&w.target.dataset.dismissible==="false"||(u.value=!0)}ut(w=>{const k=hn.subscribe($=>{if($.dismiss){requestAnimationFrame(()=>{o.value=o.value.map(R=>R.id===$.id?{...R,delete:!0}:R)});return}We(()=>{const R=o.value.findIndex(G=>G.id===$.id);R!==-1?o.value=[...o.value.slice(0,R),{...o.value[R],...$},...o.value.slice(R+1)]:o.value=[$,...o.value]})});w(k)}),ut(w=>{if(typeof window>"u")return;if(t.theme!=="system"){c.value=t.theme;return}const k=window.matchMedia("(prefers-color-scheme: dark)"),$=G=>{c.value=G?"dark":"light"};$(k.matches);const R=G=>{$(G.matches)};try{k.addEventListener("change",R)}catch{k.addListener(R)}w(()=>{try{k.removeEventListener("change",R)}catch{k.removeListener(R)}})}),ut(()=>{d.value&&p.value&&(p.value.focus({preventScroll:!0}),p.value=null,h.value=!1)}),ut(()=>{o.value.length<=1&&(l.value=!1)}),ut(w=>{function k($){const R=t.hotkey.every(ne=>$[ne]||$.code===ne),G=Array.isArray(d.value)?d.value[0]:d.value;R&&(l.value=!0,G==null||G.focus());const J=document.activeElement===d.value||(G==null?void 0:G.contains(document.activeElement));$.code==="Escape"&&J&&(l.value=!1)}yB&&(document.addEventListener("keydown",k),w(()=>{document.removeEventListener("keydown",k)}))});function _(){l.value=!0}function O(){u.value||(l.value=!1)}function T(){l.value=!1}function A(){u.value=!1}function D(w){a.value=w}function P(w){const k=a.value.findIndex($=>$.toastId===w.toastId);if(k!==-1)a.value[k]=w;else{const $=a.value.findIndex(R=>R.position===w.position);$!==-1?a.value.splice($,0,w):a.value.unshift(w)}}return(w,k)=>(C(),ie(Ie,null,[Be(" Remove item from normal navigation flow, only available via hotkey "),ce("section",{"aria-label":`${w.containerAriaLabel} ${f(m)}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},[(C(!0),ie(Ie,null,wt(s.value,($,R)=>{var G;return C(),ie("ol",te({key:$,ref_for:!0,ref_key:"listRef",ref:d,"data-sonner-toaster":"","data-sonner-theme":c.value,class:t.class,dir:w.dir==="auto"?bB():w.dir,tabIndex:-1,"data-theme":w.theme,"data-rich-colors":w.richColors,"data-y-position":$.split("-")[0],"data-x-position":$.split("-")[1],"data-lifted":l.value&&o.value.length>1&&!w.expand,style:{"--front-toast-height":`${((G=a.value[0])==null?void 0:G.height)||0}px`,"--width":`${f(qR)}px`,"--gap":`${w.gap}px`,...w.style,...f(n).style,...f(jR)(w.offset,w.mobileOffset)}},w.$attrs,{onBlur:v,onFocus:y,onMouseenter:_,onMousemove:_,onMouseleave:O,onDragend:T,onPointerdown:b,onPointerup:A}),[(C(!0),ie(Ie,null,wt(r($,R),(J,ne)=>{var ae,re,L,oe,Y,ee,le,ye,me,Pe;return C(),B(zR,{key:J.id,heights:a.value,icons:w.icons,index:ne,toast:J,defaultRichColors:w.richColors,duration:((ae=w.toastOptions)==null?void 0:ae.duration)??w.duration,class:qe(((re=w.toastOptions)==null?void 0:re.class)??""),descriptionClass:(L=w.toastOptions)==null?void 0:L.descriptionClass,invert:w.invert,visibleToasts:w.visibleToasts,closeButton:((oe=w.toastOptions)==null?void 0:oe.closeButton)??w.closeButton,interacting:u.value,position:$,style:Pt((Y=w.toastOptions)==null?void 0:Y.style),unstyled:(ee=w.toastOptions)==null?void 0:ee.unstyled,classes:(le=w.toastOptions)==null?void 0:le.classes,cancelButtonStyle:(ye=w.toastOptions)==null?void 0:ye.cancelButtonStyle,actionButtonStyle:(me=w.toastOptions)==null?void 0:me.actionButtonStyle,"close-button-aria-label":(Pe=w.toastOptions)==null?void 0:Pe.closeButtonAriaLabel,toasts:i.value[$],expandByDefault:w.expand,gap:w.gap,expanded:l.value,swipeDirections:t.swipeDirections,"onUpdate:heights":D,"onUpdate:height":P,onRemoveToast:g},{"close-icon":E(()=>[V(w.$slots,"close-icon",{},()=>[q(QR)])]),"loading-icon":E(()=>[V(w.$slots,"loading-icon",{},()=>[q(ZR,{visible:J.type==="loading"},null,8,["visible"])])]),"success-icon":E(()=>[V(w.$slots,"success-icon",{},()=>[q(oB)])]),"error-icon":E(()=>[V(w.$slots,"error-icon",{},()=>[q(mB)])]),"warning-icon":E(()=>[V(w.$slots,"warning-icon",{},()=>[q(dB)])]),"info-icon":E(()=>[V(w.$slots,"info-icon",{},()=>[q(aB)])]),_:2},1032,["heights","icons","index","toast","defaultRichColors","duration","class","descriptionClass","invert","visibleToasts","closeButton","interacting","position","style","unstyled","classes","cancelButtonStyle","actionButtonStyle","close-button-aria-label","toasts","expandByDefault","gap","expanded","swipeDirections"])}),128))],16,vB)}),128))],8,gB)],2112))}}),wB=_B;const ko=xt.create({baseURL:"https://api.beenglish.eu.org/DesignScreenshot/admin-api",timeout:12e4,headers:{"Content-Type":"application/json"}});let bc=!1;const _c=[],SB=async()=>{try{const e=localStorage.getItem("refreshToken");if(!e)throw new Error("No refresh token found");const t=await xt.post(`/system/auth/refresh-token?refreshToken=${e}`),{token:n,refreshToken:o}=t.data;return localStorage.setItem("accessToken",n),localStorage.setItem("refreshToken",o),n}catch(e){return localStorage.removeItem("accessToken"),localStorage.removeItem("refreshToken"),window.location.href="/auth",Promise.reject(e)}};ko.interceptors.request.use(e=>{const t=localStorage.getItem("accessToken");return t&&e.headers&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e));ko.interceptors.response.use(async e=>{const{data:t,status:n}=e;if(n!==200)return Bi.error(t.msg||"请求失败"),Promise.reject(new Error(t.msg||"请求失败"));if(t.code===401){const o=e.config;if(!o._retry){if(bc)return new Promise(r=>{_c.push(s=>{o.headers&&(o.headers.Authorization=`Bearer ${s}`),r(ko(o))})});o._retry=!0,bc=!0;try{const r=await SB();return o.headers&&(o.headers.Authorization=`Bearer ${r}`),_c.forEach(s=>s(r)),_c.length=0,ko(o)}catch(r){return Promise.reject(r)}finally{bc=!1}}}return t.code===0?t.data:(Bi.error(t.msg||"请求失败"),Promise.reject(new Error(t.msg||"请求失败")))},e=>{const t=e.message||"网络错误";return Bi.error(t),Promise.reject(e)});const wr=(e,t)=>ko.get(e,{params:t}),Sr=(e,t,n)=>ko.post(e,t,n),p_=(e,t)=>ko.put(e,t),h_=(e,t)=>ko.delete(e,{params:t}),GL=(e,t)=>ko.post(e,t,{headers:{"Content-Type":"multipart/form-data"}}),CB=e=>wr("/admin/app/page",e),xB=e=>wr("/admin/app/get-app-details",{appId:e}),EB=e=>wr("/admin/app/list",e),QL=e=>Sr("/admin/app/create",e),YL=e=>p_("/admin/app/update",e),XL=e=>h_("/admin/app/delete",e),ep=Symbol("platform"),m_=bf("app",()=>{const e=N([]);return{apps:e,fetchApps:async n=>{const o=await EB({platform:n});e.value=o}}});/*!
./output/100.64.0.2_run/100.64.0.2_8083_4_after_login.html:100:`+s):o.stack=s}catch{}}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Zr(this.defaults,n);const{transitional:o,paramsSerializer:r,headers:s}=n;o!==void 0&&ul.assertOptions(o,{silentJSONParsing:Jn.transitional(Jn.boolean),forcedJSONParsing:Jn.transitional(Jn.boolean),clarifyTimeoutError:Jn.transitional(Jn.boolean)},!1),r!=null&&(W.isFunction(r)?n.paramsSerializer={serialize:r}:ul.assertOptions(r,{encode:Jn.function,serialize:Jn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ul.assertOptions(n,{baseUrl:Jn.spelling("baseURL"),withXsrfToken:Jn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=s&&W.merge(s.common,s[n.method]);s&&W.forEach(["delete","get","head","post","put","patch","common"],m=>{delete s[m]}),n.headers=gn.concat(i,s);const a=[];let l=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(l=l&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const u=[];this.interceptors.response.forEach(function(g){u.push(g.fulfilled,g.rejected)});let c,d=0,p;if(!l){const m=[mm.bind(this),void 0];for(m.unshift(...a),m.push(...u),p=m.length,c=Promise.resolve(n);d<p;)c=c.then(m[d++],m[d++]);return c}p=a.length;let h=n;for(d=0;d<p;){const m=a[d++],g=a[d++];try{h=m(h)}catch(v){g.call(this,v);break}}try{c=mm.call(this,h)}catch(m){return Promise.reject(m)}for(d=0,p=u.length;d<p;)c=c.then(u[d++],u[d++]);return c}getUri(t){t=Zr(this.defaults,t);const n=n_(t.baseURL,t.url,t.allowAbsoluteUrls);return Xb(n,t.params,t.paramsSerializer)}};W.forEach(["delete","get","head","options"],function(t){Wr.prototype[t]=function(n,o){return this.request(Zr(o||{},{method:t,url:n,data:(o||{}).data}))}});W.forEach(["post","put","patch"],function(t){function n(o){return function(s,i,a){return this.request(Zr(a||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}Wr.prototype[t]=n(),Wr.prototype[t+"Form"]=n(!0)});let AR=class l_{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const o=this;this.promise.then(r=>{if(!o._listeners)return;let s=o._listeners.length;for(;s-- >0;)o._listeners[s](r);o._listeners=null}),this.promise.then=r=>{let s;const i=new Promise(a=>{o.subscribe(a),s=a}).then(r);return i.cancel=function(){o.unsubscribe(s)},i},t(function(s,i,a){o.reason||(o.reason=new ii(s,i,a),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=o=>{t.abort(o)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new l_(function(r){t=r}),cancel:t}}};function OR(e){return function(n){return e.apply(null,n)}}function TR(e){return W.isObject(e)&&e.isAxiosError===!0}const Ud={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ud).forEach(([e,t])=>{Ud[t]=e});function u_(e){const t=new Wr(e),n=Lb(Wr.prototype.request,t);return W.extend(n,Wr.prototype,t,{allOwnKeys:!0}),W.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return u_(Zr(e,r))},n}const xt=u_(Aa);xt.Axios=Wr;xt.CanceledError=ii;xt.CancelToken=AR;xt.isCancel=e_;xt.VERSION=a_;xt.toFormData=Du;xt.AxiosError=Ve;xt.Cancel=xt.CanceledError;xt.all=function(t){return Promise.all(t)};xt.spread=OR;xt.isAxiosError=TR;xt.mergeConfig=Zr;xt.AxiosHeaders=gn;xt.formToJSON=e=>Zb(W.isHTMLForm(e)?new FormData(e):e);xt.getAdapter=i_.getAdapter;xt.HttpStatusCode=Ud;xt.default=xt;const{Axios:DL,AxiosError:RL,CanceledError:BL,isCancel:ML,CancelToken:qL,VERSION:$L,all:FL,Cancel:LL,isAxiosError:NL,spread:jL,toFormData:VL,AxiosHeaders:UL,HttpStatusCode:HL,formToJSON:zL,getAdapter:KL,mergeConfig:WL}=xt;let Hd=1;var PR=class{constructor(){Mt(this,"subscribers");Mt(this,"toasts");Mt(this,"dismissedToasts");Mt(this,"subscribe",e=>(this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}));Mt(this,"publish",e=>{this.subscribers.forEach(t=>t(e))});Mt(this,"addToast",e=>{this.publish(e),this.toasts=[...this.toasts,e]});Mt(this,"create",e=>{var i;const{message:t,...n}=e,o=typeof e.id=="number"||e.id&&((i=e.id)==null?void 0:i.length)>0?e.id:Hd++,r=this.toasts.find(a=>a.id===o),s=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),r?this.toasts=this.toasts.map(a=>a.id===o?(this.publish({...a,...e,id:o,title:t}),{...a,...e,id:o,dismissible:s,title:t}):a):this.addToast({title:t,...n,dismissible:s,id:o}),o});Mt(this,"dismiss",e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),e));Mt(this,"message",(e,t)=>this.create({...t,message:e,type:"default"}));Mt(this,"error",(e,t)=>this.create({...t,type:"error",message:e}));Mt(this,"success",(e,t)=>this.create({...t,type:"success",message:e}));Mt(this,"info",(e,t)=>this.create({...t,type:"info",message:e}));Mt(this,"warning",(e,t)=>this.create({...t,type:"warning",message:e}));Mt(this,"loading",(e,t)=>this.create({...t,type:"loading",message:e}));Mt(this,"promise",(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));const o=Promise.resolve(e instanceof Function?e():e);let r=n!==void 0,s;const i=o.then(async l=>{if(s=["resolve",l],so(l))r=!1,this.create({id:n,type:"default",message:l});else if(IR(l)&&!l.ok){r=!1;const c=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description,h=typeof c=="object"&&!so(c)?c:{message:c||"",id:n||""};this.create({id:n,type:"error",description:d,...h})}else if(l instanceof Error){r=!1;const c=typeof t.error=="function"?await t.error(l):t.error,d=typeof t.description=="function"?await t.description(l):t.description,h=typeof c=="object"&&!so(c)?c:{message:c||"",id:n||""};this.create({id:n,type:"error",description:d,...h})}else if(t.success!==void 0){r=!1;const c=typeof t.success=="function"?await t.success(l):t.success,d=typeof t.description=="function"?await t.description(l):t.description,h=typeof c=="object"&&!so(c)?c:{message:c||"",id:n||""};this.create({id:n,type:"success",description:d,...h})}}).catch(async l=>{if(s=["reject",l],t.error!==void 0){r=!1;const u=typeof t.error=="function"?await t.error(l):t.error,c=typeof t.description=="function"?await t.description(l):t.description,p=typeof u=="object"&&!so(u)?u:{message:u||"",id:n||""};this.create({id:n,type:"error",description:c,...p})}}).finally(()=>{var l;r&&(this.dismiss(n),n=void 0),(l=t.finally)==null||l.call(t)}),a=()=>new Promise((l,u)=>i.then(()=>s[0]==="reject"?u(s[1]):l(s[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})});Mt(this,"custom",(e,t)=>{const n=(t==null?void 0:t.id)||Hd++;return this.publish({component:e,id:n,...t}),n});Mt(this,"getActiveToasts",()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)));this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}};const hn=new PR;function kR(e,t){const n=(t==null?void 0:t.id)||Hd++;return hn.create({message:e,id:n,type:"default",...t}),n}const IR=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",DR=kR,RR=()=>hn.toasts,BR=()=>hn.getActiveToasts(),Bi=Object.assign(DR,{success:hn.success,info:hn.info,warning:hn.warning,error:hn.error,custom:hn.custom,message:hn.message,promise:hn.promise,dismiss:hn.dismiss,loading:hn.loading},{getHistory:RR,getToasts:BR});function Wa(e){return e.label!==void 0}const MR=3,c_="24px",d_="16px",vm=4e3,qR=356,$R=14,FR=45,f_=200;function LR(){const e=N(!1);return ut(()=>{const t=()=>{e.value=document.hidden};return document.addEventListener("visibilitychange",t),()=>window.removeEventListener("visibilitychange",t)}),{isDocumentHidden:e}}function Go(...e){return e.filter(Boolean).join(" ")}function NR(e){const[t,n]=e.split("-"),o=[];return t&&o.push(t),n&&o.push(n),o}function jR(e,t){const n={};return[e,t].forEach((o,r)=>{const s=r===1,i=s?"--mobile-offset":"--offset",a=s?d_:c_;function l(u){["top","right","bottom","left"].forEach(c=>{n[`${i}-${c}`]=typeof u=="number"?`${u}px`:u})}typeof o=="number"||typeof o=="string"?l(o):typeof o=="object"?["top","right","bottom","left"].forEach(u=>{o[u]===void 0?n[`${i}-${u}`]=a:n[`${i}-${u}`]=typeof o[u]=="number"?`${o[u]}px`:o[u]}):l(a)}),n}const VR=["data-rich-colors","data-styled","data-mounted","data-promise","data-swiped","data-removed","data-visible","data-y-position","data-x-position","data-index","data-front","data-swiping","data-dismissible","data-type","data-invert","data-swipe-out","data-swipe-direction","data-expanded"],UR=["aria-label","data-disabled"];var HR=F({__name:"Toast",props:{toast:{},toasts:{},index:{},swipeDirections:{},expanded:{type:Boolean},invert:{type:Boolean},heights:{},gap:{},position:{},visibleToasts:{},expandByDefault:{type:Boolean},closeButton:{type:Boolean},interacting:{type:Boolean},style:{},cancelButtonStyle:{},actionButtonStyle:{},duration:{},class:{},unstyled:{type:Boolean},descriptionClass:{},loadingIcon:{},classes:{},icons:{},closeButtonAriaLabel:{},defaultRichColors:{type:Boolean}},emits:["update:heights","update:height","removeToast"],setup(e,{emit:t}){const n=e,o=t,r=N(null),s=N(null),i=N(!1),a=N(!1),l=N(!1),u=N(!1),c=N(!1),d=N(0),p=N(0),h=N(n.toast.duration||n.duration||vm),m=N(null),g=N(null),v=U(()=>n.index===0),y=U(()=>n.index+1<=n.visibleToasts),b=U(()=>n.toast.type),_=U(()=>n.toast.dismissible!==!1),O=U(()=>n.toast.class||""),T=U(()=>n.descriptionClass||""),A=U(()=>{const x=n.toast.position||n.position,H=n.heights.filter(X=>X.position===x).findIndex(X=>X.toastId===n.toast.id);return H>=0?H:0}),D=U(()=>{const x=n.toast.position||n.position;return n.heights.filter(H=>H.position===x).reduce((H,X,pe)=>pe>=A.value?H:H+X.height,0)}),P=U(()=>A.value*n.gap+D.value||0),w=U(()=>n.toast.closeButton??n.closeButton),k=U(()=>n.toast.duration||n.duration||vm),$=N(0),R=N(0),G=N(null),J=U(()=>n.position.split("-")),ne=U(()=>J.value[0]),ae=U(()=>J.value[1]),re=U(()=>typeof n.toast.title!="string"),L=U(()=>typeof n.toast.description!="string"),{isDocumentHidden:oe}=LR(),Y=U(()=>b.value&&b.value==="loading");je(()=>{i.value=!0,h.value=k.value}),ut(async()=>{if(!i.value||!g.value)return;await We();const x=g.value,z=x.style.height;x.style.height="auto";const H=x.getBoundingClientRect().height;x.style.height=z,p.value=H,o("update:height",{toastId:n.toast.id,height:H,position:n.toast.position||n.position})});function ee(){a.value=!0,d.value=P.value,setTimeout(()=>{o("removeToast",n.toast)},f_)}function le(){var x,z;if(Y.value||!_.value)return{};ee(),(z=(x=n.toast).onDismiss)==null||z.call(x,n.toast)}function ye(x){Y.value||!_.value||(m.value=new Date,d.value=P.value,x.target.setPointerCapture(x.pointerId),x.target.tagName!=="BUTTON"&&(l.value=!0,G.value={x:x.clientX,y:x.clientY}))}function me(){var S,I,j,K,Z,Q,ue;if(u.value||!_.value)return;G.value=null;const x=Number(((S=g.value)==null?void 0:S.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),z=Number(((I=g.value)==null?void 0:I.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),H=new Date().getTime()-(((j=m.value)==null?void 0:j.getTime())||0),X=r.value==="x"?x:z,pe=Math.abs(X)/H;if(Math.abs(X)>=FR||pe>.11){d.value=P.value,(Z=(K=n.toast).onDismiss)==null||Z.call(K,n.toast),r.value==="x"?s.value=x>0?"right":"left":s.value=z>0?"down":"up",ee(),u.value=!0;return}else(Q=g.value)==null||Q.style.setProperty("--swipe-amount-x","0px"),(ue=g.value)==null||ue.style.setProperty("--swipe-amount-y","0px");c.value=!1,l.value=!1,r.value=null}function Pe(x){var j,K,Z,Q;if(!G.value||!_.value||(((K=(j=window==null?void 0:window.getSelection())==null?void 0:j.toString())==null?void 0:K.length)??!1))return;const H=x.clientY-G.value.y,X=x.clientX-G.value.x,pe=n.swipeDirections??NR(n.position);!r.value&&(Math.abs(X)>1||Math.abs(H)>1)&&(r.value=Math.abs(X)>Math.abs(H)?"x":"y");let S={x:0,y:0};const I=ue=>1/(1.5+Math.abs(ue)/20);if(r.value==="y"){if(pe.includes("top")||pe.includes("bottom"))if(pe.includes("top")&&H<0||pe.includes("bottom")&&H>0)S.y=H;else{const ue=H*I(H);S.y=Math.abs(ue)<Math.abs(H)?ue:H}}else if(r.value==="x"&&(pe.includes("left")||pe.includes("right")))if(pe.includes("left")&&X<0||pe.includes("right")&&X>0)S.x=X;else{const ue=X*I(X);S.x=Math.abs(ue)<Math.abs(X)?ue:X}(Math.abs(S.x)>0||Math.abs(S.y)>0)&&(c.value=!0),(Z=g.value)==null||Z.style.setProperty("--swipe-amount-x",`${S.x}px`),(Q=g.value)==null||Q.style.setProperty("--swipe-amount-y",`${S.y}px`)}je(()=>{if(i.value=!0,!g.value)return;const x=g.value.getBoundingClientRect().height;p.value=x;const z=[{toastId:n.toast.id,height:x,position:n.toast.position},...n.heights];o("update:heights",z)}),Ys(()=>{g.value&&o("removeToast",n.toast)}),ut(x=>{if(n.toast.promise&&b.value==="loading"||n.toast.duration===1/0||n.toast.type==="loading")return;let z;const H=()=>{if(R.value<$.value){const pe=new Date().getTime()-$.value;h.value=h.value-pe}R.value=new Date().getTime()},X=()=>{h.value!==1/0&&($.value=new Date().getTime(),z=setTimeout(()=>{var pe,S;(S=(pe=n.toast).onAutoClose)==null||S.call(pe,n.toast),ee()},h.value))};n.expanded||n.interacting||oe.value?H():X(),x(()=>{clearTimeout(z)})}),Ce(()=>n.toast.delete,x=>{x!==void 0&&x&&ee()},{deep:!0});function Se(){l.value=!1,r.value=null,G.value=null}return(x,z)=>{var H,X,pe,S,I,j,K,Z,Q,ue,fe,de,se,xe,ge,Ee,ke,He,tt,Ye,At,mt,$t,Ft,yn,Cr,Bt;return C(),ie("li",{tabindex:"0",ref_key:"toastRef",ref:g,class:qe(f(Go)(n.class,O.value,(H=x.classes)==null?void 0:H.toast,(X=x.toast.classes)==null?void 0:X.toast,(pe=x.classes)==null?void 0:pe[b.value],(I=(S=x.toast)==null?void 0:S.classes)==null?void 0:I[b.value])),"data-sonner-toast":"","data-rich-colors":x.toast.richColors??x.defaultRichColors,"data-styled":!(x.toast.component||(j=x.toast)!=null&&j.unstyled||x.unstyled),"data-mounted":i.value,"data-promise":!!x.toast.promise,"data-swiped":c.value,"data-removed":a.value,"data-visible":y.value,"data-y-position":ne.value,"data-x-position":ae.value,"data-index":x.index,"data-front":v.value,"data-swiping":l.value,"data-dismissible":_.value,"data-type":b.value,"data-invert":x.toast.invert||x.invert,"data-swipe-out":u.value,"data-swipe-direction":s.value,"data-expanded":!!(x.expanded||x.expandByDefault&&i.value),style:Pt({"--index":x.index,"--toasts-before":x.index,"--z-index":x.toasts.length-x.index,"--offset":`${a.value?d.value:P.value}px`,"--initial-height":x.expandByDefault?"auto":`${p.value}px`,...x.style,...n.toast.style}),onDragend:Se,onPointerdown:ye,onPointerup:me,onPointermove:Pe},[w.value&&!x.toast.component&&b.value!=="loading"?(C(),ie("button",{key:0,"aria-label":x.closeButtonAriaLabel||"Close toast","data-disabled":Y.value,"data-close-button":"true",class:qe(f(Go)((K=x.classes)==null?void 0:K.closeButton,(Q=(Z=x.toast)==null?void 0:Z.classes)==null?void 0:Q.closeButton)),onClick:le},[(ue=x.icons)!=null&&ue.close?(C(),B(ro((fe=x.icons)==null?void 0:fe.close),{key:0})):V(x.$slots,"close-icon",{key:1})],10,UR)):Be("v-if",!0),x.toast.component?(C(),B(ro(x.toast.component),te({key:1},x.toast.componentProps,{onCloseToast:le}),null,16)):(C(),ie(Ie,{key:2},[b.value!=="default"||x.toast.icon||x.toast.promise?(C(),ie("div",{key:0,"data-icon":"",class:qe(f(Go)((de=x.classes)==null?void 0:de.icon,(xe=(se=x.toast)==null?void 0:se.classes)==null?void 0:xe.icon))},[x.toast.icon?(C(),B(ro(x.toast.icon),{key:0})):(C(),ie(Ie,{key:1},[b.value==="loading"?V(x.$slots,"loading-icon",{key:0}):b.value==="success"?V(x.$slots,"success-icon",{key:1}):b.value==="error"?V(x.$slots,"error-icon",{key:2}):b.value==="warning"?V(x.$slots,"warning-icon",{key:3}):b.value==="info"?V(x.$slots,"info-icon",{key:4}):Be("v-if",!0)],64))],2)):Be("v-if",!0),ce("div",{"data-content":"",class:qe(f(Go)((ge=x.classes)==null?void 0:ge.content,(ke=(Ee=x.toast)==null?void 0:Ee.classes)==null?void 0:ke.content))},[ce("div",{"data-title":"",class:qe(f(Go)((He=x.classes)==null?void 0:He.title,(tt=x.toast.classes)==null?void 0:tt.title))},[re.value?(C(),B(ro(x.toast.title),ct(te({key:0},x.toast.componentProps)),null,16)):(C(),ie(Ie,{key:1},[rt(Ne(x.toast.title),1)],64))],2),x.toast.description?(C(),ie("div",{key:0,"data-description":"",class:qe(f(Go)(x.descriptionClass,T.value,(Ye=x.classes)==null?void 0:Ye.description,(At=x.toast.classes)==null?void 0:At.description))},[L.value?(C(),B(ro(x.toast.description),ct(te({key:0},x.toast.componentProps)),null,16)):(C(),ie(Ie,{key:1},[rt(Ne(x.toast.description),1)],64))],2)):Be("v-if",!0)],2),x.toast.cancel?(C(),ie("button",{key:1,style:Pt(x.toast.cancelButtonStyle||x.cancelButtonStyle),class:qe(f(Go)((mt=x.classes)==null?void 0:mt.cancelButton,($t=x.toast.classes)==null?void 0:$t.cancelButton)),"data-button":"","data-cancel":"",onClick:z[0]||(z[0]=Lt=>{var Qn,Yn;f(Wa)(x.toast.cancel)&&_.value&&((Yn=(Qn=x.toast.cancel).onClick)==null||Yn.call(Qn,Lt),ee())})},Ne(f(Wa)(x.toast.cancel)?(Ft=x.toast.cancel)==null?void 0:Ft.label:x.toast.cancel),7)):Be("v-if",!0),x.toast.action?(C(),ie("button",{key:2,style:Pt(x.toast.actionButtonStyle||x.actionButtonStyle),class:qe(f(Go)((yn=x.classes)==null?void 0:yn.actionButton,(Cr=x.toast.classes)==null?void 0:Cr.actionButton)),"data-button":"","data-action":"",onClick:z[1]||(z[1]=Lt=>{var Qn,Yn;f(Wa)(x.toast.action)&&((Yn=(Qn=x.toast.action).onClick)==null||Yn.call(Qn,Lt),!Lt.defaultPrevented&&ee())})},Ne(f(Wa)(x.toast.action)?(Bt=x.toast.action)==null?void 0:Bt.label:x.toast.action),7)):Be("v-if",!0)],64))],46,VR)}}}),zR=HR,Oa=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n};const KR={},WR={xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stoke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"};function GR(e,t){return C(),ie("svg",WR,t[0]||(t[0]=[ce("line",{x1:"18",y1:"6",x2:"6",y2:"18"},null,-1),ce("line",{x1:"6",y1:"6",x2:"18",y2:"18"},null,-1)]))}var QR=Oa(KR,[["render",GR]]);const YR=["data-visible"],XR={class:"sonner-spinner"};var JR=F({__name:"Loader",props:{visible:{type:Boolean}},setup(e){const t=Array(12).fill(0);return(n,o)=>(C(),ie("div",{class:"sonner-loading-wrapper","data-visible":n.visible},[ce("div",XR,[(C(!0),ie(Ie,null,wt(f(t),r=>(C(),ie("div",{key:`spinner-bar-${r}`,class:"sonner-loading-bar"}))),128))])],8,YR))}}),ZR=JR;const eB={},tB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function nB(e,t){return C(),ie("svg",tB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z","clip-rule":"evenodd"},null,-1)]))}var oB=Oa(eB,[["render",nB]]);const rB={},sB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function iB(e,t){return C(),ie("svg",sB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z","clip-rule":"evenodd"},null,-1)]))}var aB=Oa(rB,[["render",iB]]);const lB={},uB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"};function cB(e,t){return C(),ie("svg",uB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z","clip-rule":"evenodd"},null,-1)]))}var dB=Oa(lB,[["render",cB]]);const fB={},pB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function hB(e,t){return C(),ie("svg",pB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z","clip-rule":"evenodd"},null,-1)]))}var mB=Oa(fB,[["render",hB]]);const gB=["aria-label"],vB=["data-sonner-theme","dir","data-theme","data-rich-colors","data-y-position","data-x-position","data-lifted"],yB=typeof window<"u"&&typeof document<"u";function bB(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var _B=F({name:"Toaster",inheritAttrs:!1,__name:"Toaster",props:{invert:{type:Boolean,default:!1},theme:{default:"light"},position:{default:"bottom-right"},hotkey:{default:()=>["altKey","KeyT"]},richColors:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},duration:{},gap:{default:$R},visibleToasts:{default:MR},closeButton:{type:Boolean,default:!1},toastOptions:{default:()=>({})},class:{default:""},style:{},offset:{default:c_},mobileOffset:{default:d_},dir:{default:"auto"},swipeDirections:{},icons:{},containerAriaLabel:{default:"Notifications"}},setup(e){const t=e,n=g0(),o=N([]);function r(w,k){return o.value.filter($=>!$.position&&k===0||$.position===w)}const s=U(()=>{const w=o.value.filter(k=>k.position).map(k=>k.position);return w.length>0?Array.from(new Set([t.position].concat(w))):[t.position]}),i=U(()=>{const w={};return s.value.forEach(k=>{w[k]=o.value.filter($=>$.position===k)}),w}),a=N([]),l=N(!1),u=N(!1),c=N(t.theme!=="system"?t.theme:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),d=N(null),p=N(null),h=N(!1),m=t.hotkey.join("+").replace(/Key/g,"").replace(/Digit/g,"");function g(w){var k;(k=o.value.find($=>$.id===w.id))!=null&&k.delete||hn.dismiss(w.id),o.value=o.value.filter(({id:$})=>$!==w.id),setTimeout(()=>{o.value.find($=>$.id===w.id)||(a.value=a.value.filter($=>$.toastId!==w.id))},f_+50)}function v(w){var k,$;h.value&&!(($=(k=w.currentTarget)==null?void 0:k.contains)!=null&&$.call(k,w.relatedTarget))&&(h.value=!1,p.value&&(p.value.focus({preventScroll:!0}),p.value=null))}function y(w){w.target instanceof HTMLElement&&w.target.dataset.dismissible==="false"||h.value||(h.value=!0,p.value=w.relatedTarget)}function b(w){w.target&&w.target instanceof HTMLElement&&w.target.dataset.dismissible==="false"||(u.value=!0)}ut(w=>{const k=hn.subscribe($=>{if($.dismiss){requestAnimationFrame(()=>{o.value=o.value.map(R=>R.id===$.id?{...R,delete:!0}:R)});return}We(()=>{const R=o.value.findIndex(G=>G.id===$.id);R!==-1?o.value=[...o.value.slice(0,R),{...o.value[R],...$},...o.value.slice(R+1)]:o.value=[$,...o.value]})});w(k)}),ut(w=>{if(typeof window>"u")return;if(t.theme!=="system"){c.value=t.theme;return}const k=window.matchMedia("(prefers-color-scheme: dark)"),$=G=>{c.value=G?"dark":"light"};$(k.matches);const R=G=>{$(G.matches)};try{k.addEventListener("change",R)}catch{k.addListener(R)}w(()=>{try{k.removeEventListener("change",R)}catch{k.removeListener(R)}})}),ut(()=>{d.value&&p.value&&(p.value.focus({preventScroll:!0}),p.value=null,h.value=!1)}),ut(()=>{o.value.length<=1&&(l.value=!1)}),ut(w=>{function k($){const R=t.hotkey.every(ne=>$[ne]||$.code===ne),G=Array.isArray(d.value)?d.value[0]:d.value;R&&(l.value=!0,G==null||G.focus());const J=document.activeElement===d.value||(G==null?void 0:G.contains(document.activeElement));$.code==="Escape"&&J&&(l.value=!1)}yB&&(document.addEventListener("keydown",k),w(()=>{document.removeEventListener("keydown",k)}))});function _(){l.value=!0}function O(){u.value||(l.value=!1)}function T(){l.value=!1}function A(){u.value=!1}function D(w){a.value=w}function P(w){const k=a.value.findIndex($=>$.toastId===w.toastId);if(k!==-1)a.value[k]=w;else{const $=a.value.findIndex(R=>R.position===w.position);$!==-1?a.value.splice($,0,w):a.value.unshift(w)}}return(w,k)=>(C(),ie(Ie,null,[Be(" Remove item from normal navigation flow, only available via hotkey "),ce("section",{"aria-label":`${w.containerAriaLabel} ${f(m)}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},[(C(!0),ie(Ie,null,wt(s.value,($,R)=>{var G;return C(),ie("ol",te({key:$,ref_for:!0,ref_key:"listRef",ref:d,"data-sonner-toaster":"","data-sonner-theme":c.value,class:t.class,dir:w.dir==="auto"?bB():w.dir,tabIndex:-1,"data-theme":w.theme,"data-rich-colors":w.richColors,"data-y-position":$.split("-")[0],"data-x-position":$.split("-")[1],"data-lifted":l.value&&o.value.length>1&&!w.expand,style:{"--front-toast-height":`${((G=a.value[0])==null?void 0:G.height)||0}px`,"--width":`${f(qR)}px`,"--gap":`${w.gap}px`,...w.style,...f(n).style,...f(jR)(w.offset,w.mobileOffset)}},w.$attrs,{onBlur:v,onFocus:y,onMouseenter:_,onMousemove:_,onMouseleave:O,onDragend:T,onPointerdown:b,onPointerup:A}),[(C(!0),ie(Ie,null,wt(r($,R),(J,ne)=>{var ae,re,L,oe,Y,ee,le,ye,me,Pe;return C(),B(zR,{key:J.id,heights:a.value,icons:w.icons,index:ne,toast:J,defaultRichColors:w.richColors,duration:((ae=w.toastOptions)==null?void 0:ae.duration)??w.duration,class:qe(((re=w.toastOptions)==null?void 0:re.class)??""),descriptionClass:(L=w.toastOptions)==null?void 0:L.descriptionClass,invert:w.invert,visibleToasts:w.visibleToasts,closeButton:((oe=w.toastOptions)==null?void 0:oe.closeButton)??w.closeButton,interacting:u.value,position:$,style:Pt((Y=w.toastOptions)==null?void 0:Y.style),unstyled:(ee=w.toastOptions)==null?void 0:ee.unstyled,classes:(le=w.toastOptions)==null?void 0:le.classes,cancelButtonStyle:(ye=w.toastOptions)==null?void 0:ye.cancelButtonStyle,actionButtonStyle:(me=w.toastOptions)==null?void 0:me.actionButtonStyle,"close-button-aria-label":(Pe=w.toastOptions)==null?void 0:Pe.closeButtonAriaLabel,toasts:i.value[$],expandByDefault:w.expand,gap:w.gap,expanded:l.value,swipeDirections:t.swipeDirections,"onUpdate:heights":D,"onUpdate:height":P,onRemoveToast:g},{"close-icon":E(()=>[V(w.$slots,"close-icon",{},()=>[q(QR)])]),"loading-icon":E(()=>[V(w.$slots,"loading-icon",{},()=>[q(ZR,{visible:J.type==="loading"},null,8,["visible"])])]),"success-icon":E(()=>[V(w.$slots,"success-icon",{},()=>[q(oB)])]),"error-icon":E(()=>[V(w.$slots,"error-icon",{},()=>[q(mB)])]),"warning-icon":E(()=>[V(w.$slots,"warning-icon",{},()=>[q(dB)])]),"info-icon":E(()=>[V(w.$slots,"info-icon",{},()=>[q(aB)])]),_:2},1032,["heights","icons","index","toast","defaultRichColors","duration","class","descriptionClass","invert","visibleToasts","closeButton","interacting","position","style","unstyled","classes","cancelButtonStyle","actionButtonStyle","close-button-aria-label","toasts","expandByDefault","gap","expanded","swipeDirections"])}),128))],16,vB)}),128))],8,gB)],2112))}}),wB=_B;const ko=xt.create({baseURL:"https://api.beenglish.eu.org/DesignScreenshot/admin-api",timeout:12e4,headers:{"Content-Type":"application/json"}});let bc=!1;const _c=[],SB=async()=>{try{const e=localStorage.getItem("refreshToken");if(!e)throw new Error("No refresh token found");const t=await xt.post(`/system/auth/refresh-token?refreshToken=${e}`),{token:n,refreshToken:o}=t.data;return localStorage.setItem("accessToken",n),localStorage.setItem("refreshToken",o),n}catch(e){return localStorage.removeItem("accessToken"),localStorage.removeItem("refreshToken"),window.location.href="/auth",Promise.reject(e)}};ko.interceptors.request.use(e=>{const t=localStorage.getItem("accessToken");return t&&e.headers&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e));ko.interceptors.response.use(async e=>{const{data:t,status:n}=e;if(n!==200)return Bi.error(t.msg||"请求失败"),Promise.reject(new Error(t.msg||"请求失败"));if(t.code===401){const o=e.config;if(!o._retry){if(bc)return new Promise(r=>{_c.push(s=>{o.headers&&(o.headers.Authorization=`Bearer ${s}`),r(ko(o))})});o._retry=!0,bc=!0;try{const r=await SB();return o.headers&&(o.headers.Authorization=`Bearer ${r}`),_c.forEach(s=>s(r)),_c.length=0,ko(o)}catch(r){return Promise.reject(r)}finally{bc=!1}}}return t.code===0?t.data:(Bi.error(t.msg||"请求失败"),Promise.reject(new Error(t.msg||"请求失败")))},e=>{const t=e.message||"网络错误";return Bi.error(t),Promise.reject(e)});const wr=(e,t)=>ko.get(e,{params:t}),Sr=(e,t,n)=>ko.post(e,t,n),p_=(e,t)=>ko.put(e,t),h_=(e,t)=>ko.delete(e,{params:t}),GL=(e,t)=>ko.post(e,t,{headers:{"Content-Type":"multipart/form-data"}}),CB=e=>wr("/admin/app/page",e),xB=e=>wr("/admin/app/get-app-details",{appId:e}),EB=e=>wr("/admin/app/list",e),QL=e=>Sr("/admin/app/create",e),YL=e=>p_("/admin/app/update",e),XL=e=>h_("/admin/app/delete",e),ep=Symbol("platform"),m_=bf("app",()=>{const e=N([]);return{apps:e,fetchApps:async n=>{const o=await EB({platform:n});e.value=o}}});/*!
./output/test_run/login_page.html:100:`+s):o.stack=s}catch{}}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Zr(this.defaults,n);const{transitional:o,paramsSerializer:r,headers:s}=n;o!==void 0&&ul.assertOptions(o,{silentJSONParsing:Jn.transitional(Jn.boolean),forcedJSONParsing:Jn.transitional(Jn.boolean),clarifyTimeoutError:Jn.transitional(Jn.boolean)},!1),r!=null&&(W.isFunction(r)?n.paramsSerializer={serialize:r}:ul.assertOptions(r,{encode:Jn.function,serialize:Jn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ul.assertOptions(n,{baseUrl:Jn.spelling("baseURL"),withXsrfToken:Jn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=s&&W.merge(s.common,s[n.method]);s&&W.forEach(["delete","get","head","post","put","patch","common"],m=>{delete s[m]}),n.headers=gn.concat(i,s);const a=[];let l=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(l=l&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const u=[];this.interceptors.response.forEach(function(g){u.push(g.fulfilled,g.rejected)});let c,d=0,p;if(!l){const m=[mm.bind(this),void 0];for(m.unshift(...a),m.push(...u),p=m.length,c=Promise.resolve(n);d<p;)c=c.then(m[d++],m[d++]);return c}p=a.length;let h=n;for(d=0;d<p;){const m=a[d++],g=a[d++];try{h=m(h)}catch(v){g.call(this,v);break}}try{c=mm.call(this,h)}catch(m){return Promise.reject(m)}for(d=0,p=u.length;d<p;)c=c.then(u[d++],u[d++]);return c}getUri(t){t=Zr(this.defaults,t);const n=n_(t.baseURL,t.url,t.allowAbsoluteUrls);return Xb(n,t.params,t.paramsSerializer)}};W.forEach(["delete","get","head","options"],function(t){Wr.prototype[t]=function(n,o){return this.request(Zr(o||{},{method:t,url:n,data:(o||{}).data}))}});W.forEach(["post","put","patch"],function(t){function n(o){return function(s,i,a){return this.request(Zr(a||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}Wr.prototype[t]=n(),Wr.prototype[t+"Form"]=n(!0)});let AR=class l_{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const o=this;this.promise.then(r=>{if(!o._listeners)return;let s=o._listeners.length;for(;s-- >0;)o._listeners[s](r);o._listeners=null}),this.promise.then=r=>{let s;const i=new Promise(a=>{o.subscribe(a),s=a}).then(r);return i.cancel=function(){o.unsubscribe(s)},i},t(function(s,i,a){o.reason||(o.reason=new ii(s,i,a),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=o=>{t.abort(o)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new l_(function(r){t=r}),cancel:t}}};function OR(e){return function(n){return e.apply(null,n)}}function TR(e){return W.isObject(e)&&e.isAxiosError===!0}const Ud={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ud).forEach(([e,t])=>{Ud[t]=e});function u_(e){const t=new Wr(e),n=Lb(Wr.prototype.request,t);return W.extend(n,Wr.prototype,t,{allOwnKeys:!0}),W.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return u_(Zr(e,r))},n}const xt=u_(Aa);xt.Axios=Wr;xt.CanceledError=ii;xt.CancelToken=AR;xt.isCancel=e_;xt.VERSION=a_;xt.toFormData=Du;xt.AxiosError=Ve;xt.Cancel=xt.CanceledError;xt.all=function(t){return Promise.all(t)};xt.spread=OR;xt.isAxiosError=TR;xt.mergeConfig=Zr;xt.AxiosHeaders=gn;xt.formToJSON=e=>Zb(W.isHTMLForm(e)?new FormData(e):e);xt.getAdapter=i_.getAdapter;xt.HttpStatusCode=Ud;xt.default=xt;const{Axios:DL,AxiosError:RL,CanceledError:BL,isCancel:ML,CancelToken:qL,VERSION:$L,all:FL,Cancel:LL,isAxiosError:NL,spread:jL,toFormData:VL,AxiosHeaders:UL,HttpStatusCode:HL,formToJSON:zL,getAdapter:KL,mergeConfig:WL}=xt;let Hd=1;var PR=class{constructor(){Mt(this,"subscribers");Mt(this,"toasts");Mt(this,"dismissedToasts");Mt(this,"subscribe",e=>(this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}));Mt(this,"publish",e=>{this.subscribers.forEach(t=>t(e))});Mt(this,"addToast",e=>{this.publish(e),this.toasts=[...this.toasts,e]});Mt(this,"create",e=>{var i;const{message:t,...n}=e,o=typeof e.id=="number"||e.id&&((i=e.id)==null?void 0:i.length)>0?e.id:Hd++,r=this.toasts.find(a=>a.id===o),s=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),r?this.toasts=this.toasts.map(a=>a.id===o?(this.publish({...a,...e,id:o,title:t}),{...a,...e,id:o,dismissible:s,title:t}):a):this.addToast({title:t,...n,dismissible:s,id:o}),o});Mt(this,"dismiss",e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),e));Mt(this,"message",(e,t)=>this.create({...t,message:e,type:"default"}));Mt(this,"error",(e,t)=>this.create({...t,type:"error",message:e}));Mt(this,"success",(e,t)=>this.create({...t,type:"success",message:e}));Mt(this,"info",(e,t)=>this.create({...t,type:"info",message:e}));Mt(this,"warning",(e,t)=>this.create({...t,type:"warning",message:e}));Mt(this,"loading",(e,t)=>this.create({...t,type:"loading",message:e}));Mt(this,"promise",(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));const o=Promise.resolve(e instanceof Function?e():e);let r=n!==void 0,s;const i=o.then(async l=>{if(s=["resolve",l],so(l))r=!1,this.create({id:n,type:"default",message:l});else if(IR(l)&&!l.ok){r=!1;const c=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description,h=typeof c=="object"&&!so(c)?c:{message:c||"",id:n||""};this.create({id:n,type:"error",description:d,...h})}else if(l instanceof Error){r=!1;const c=typeof t.error=="function"?await t.error(l):t.error,d=typeof t.description=="function"?await t.description(l):t.description,h=typeof c=="object"&&!so(c)?c:{message:c||"",id:n||""};this.create({id:n,type:"error",description:d,...h})}else if(t.success!==void 0){r=!1;const c=typeof t.success=="function"?await t.success(l):t.success,d=typeof t.description=="function"?await t.description(l):t.description,h=typeof c=="object"&&!so(c)?c:{message:c||"",id:n||""};this.create({id:n,type:"success",description:d,...h})}}).catch(async l=>{if(s=["reject",l],t.error!==void 0){r=!1;const u=typeof t.error=="function"?await t.error(l):t.error,c=typeof t.description=="function"?await t.description(l):t.description,p=typeof u=="object"&&!so(u)?u:{message:u||"",id:n||""};this.create({id:n,type:"error",description:c,...p})}}).finally(()=>{var l;r&&(this.dismiss(n),n=void 0),(l=t.finally)==null||l.call(t)}),a=()=>new Promise((l,u)=>i.then(()=>s[0]==="reject"?u(s[1]):l(s[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})});Mt(this,"custom",(e,t)=>{const n=(t==null?void 0:t.id)||Hd++;return this.publish({component:e,id:n,...t}),n});Mt(this,"getActiveToasts",()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)));this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}};const hn=new PR;function kR(e,t){const n=(t==null?void 0:t.id)||Hd++;return hn.create({message:e,id:n,type:"default",...t}),n}const IR=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",DR=kR,RR=()=>hn.toasts,BR=()=>hn.getActiveToasts(),Bi=Object.assign(DR,{success:hn.success,info:hn.info,warning:hn.warning,error:hn.error,custom:hn.custom,message:hn.message,promise:hn.promise,dismiss:hn.dismiss,loading:hn.loading},{getHistory:RR,getToasts:BR});function Wa(e){return e.label!==void 0}const MR=3,c_="24px",d_="16px",vm=4e3,qR=356,$R=14,FR=45,f_=200;function LR(){const e=N(!1);return ut(()=>{const t=()=>{e.value=document.hidden};return document.addEventListener("visibilitychange",t),()=>window.removeEventListener("visibilitychange",t)}),{isDocumentHidden:e}}function Go(...e){return e.filter(Boolean).join(" ")}function NR(e){const[t,n]=e.split("-"),o=[];return t&&o.push(t),n&&o.push(n),o}function jR(e,t){const n={};return[e,t].forEach((o,r)=>{const s=r===1,i=s?"--mobile-offset":"--offset",a=s?d_:c_;function l(u){["top","right","bottom","left"].forEach(c=>{n[`${i}-${c}`]=typeof u=="number"?`${u}px`:u})}typeof o=="number"||typeof o=="string"?l(o):typeof o=="object"?["top","right","bottom","left"].forEach(u=>{o[u]===void 0?n[`${i}-${u}`]=a:n[`${i}-${u}`]=typeof o[u]=="number"?`${o[u]}px`:o[u]}):l(a)}),n}const VR=["data-rich-colors","data-styled","data-mounted","data-promise","data-swiped","data-removed","data-visible","data-y-position","data-x-position","data-index","data-front","data-swiping","data-dismissible","data-type","data-invert","data-swipe-out","data-swipe-direction","data-expanded"],UR=["aria-label","data-disabled"];var HR=F({__name:"Toast",props:{toast:{},toasts:{},index:{},swipeDirections:{},expanded:{type:Boolean},invert:{type:Boolean},heights:{},gap:{},position:{},visibleToasts:{},expandByDefault:{type:Boolean},closeButton:{type:Boolean},interacting:{type:Boolean},style:{},cancelButtonStyle:{},actionButtonStyle:{},duration:{},class:{},unstyled:{type:Boolean},descriptionClass:{},loadingIcon:{},classes:{},icons:{},closeButtonAriaLabel:{},defaultRichColors:{type:Boolean}},emits:["update:heights","update:height","removeToast"],setup(e,{emit:t}){const n=e,o=t,r=N(null),s=N(null),i=N(!1),a=N(!1),l=N(!1),u=N(!1),c=N(!1),d=N(0),p=N(0),h=N(n.toast.duration||n.duration||vm),m=N(null),g=N(null),v=U(()=>n.index===0),y=U(()=>n.index+1<=n.visibleToasts),b=U(()=>n.toast.type),_=U(()=>n.toast.dismissible!==!1),O=U(()=>n.toast.class||""),T=U(()=>n.descriptionClass||""),A=U(()=>{const x=n.toast.position||n.position,H=n.heights.filter(X=>X.position===x).findIndex(X=>X.toastId===n.toast.id);return H>=0?H:0}),D=U(()=>{const x=n.toast.position||n.position;return n.heights.filter(H=>H.position===x).reduce((H,X,pe)=>pe>=A.value?H:H+X.height,0)}),P=U(()=>A.value*n.gap+D.value||0),w=U(()=>n.toast.closeButton??n.closeButton),k=U(()=>n.toast.duration||n.duration||vm),$=N(0),R=N(0),G=N(null),J=U(()=>n.position.split("-")),ne=U(()=>J.value[0]),ae=U(()=>J.value[1]),re=U(()=>typeof n.toast.title!="string"),L=U(()=>typeof n.toast.description!="string"),{isDocumentHidden:oe}=LR(),Y=U(()=>b.value&&b.value==="loading");je(()=>{i.value=!0,h.value=k.value}),ut(async()=>{if(!i.value||!g.value)return;await We();const x=g.value,z=x.style.height;x.style.height="auto";const H=x.getBoundingClientRect().height;x.style.height=z,p.value=H,o("update:height",{toastId:n.toast.id,height:H,position:n.toast.position||n.position})});function ee(){a.value=!0,d.value=P.value,setTimeout(()=>{o("removeToast",n.toast)},f_)}function le(){var x,z;if(Y.value||!_.value)return{};ee(),(z=(x=n.toast).onDismiss)==null||z.call(x,n.toast)}function ye(x){Y.value||!_.value||(m.value=new Date,d.value=P.value,x.target.setPointerCapture(x.pointerId),x.target.tagName!=="BUTTON"&&(l.value=!0,G.value={x:x.clientX,y:x.clientY}))}function me(){var S,I,j,K,Z,Q,ue;if(u.value||!_.value)return;G.value=null;const x=Number(((S=g.value)==null?void 0:S.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),z=Number(((I=g.value)==null?void 0:I.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),H=new Date().getTime()-(((j=m.value)==null?void 0:j.getTime())||0),X=r.value==="x"?x:z,pe=Math.abs(X)/H;if(Math.abs(X)>=FR||pe>.11){d.value=P.value,(Z=(K=n.toast).onDismiss)==null||Z.call(K,n.toast),r.value==="x"?s.value=x>0?"right":"left":s.value=z>0?"down":"up",ee(),u.value=!0;return}else(Q=g.value)==null||Q.style.setProperty("--swipe-amount-x","0px"),(ue=g.value)==null||ue.style.setProperty("--swipe-amount-y","0px");c.value=!1,l.value=!1,r.value=null}function Pe(x){var j,K,Z,Q;if(!G.value||!_.value||(((K=(j=window==null?void 0:window.getSelection())==null?void 0:j.toString())==null?void 0:K.length)??!1))return;const H=x.clientY-G.value.y,X=x.clientX-G.value.x,pe=n.swipeDirections??NR(n.position);!r.value&&(Math.abs(X)>1||Math.abs(H)>1)&&(r.value=Math.abs(X)>Math.abs(H)?"x":"y");let S={x:0,y:0};const I=ue=>1/(1.5+Math.abs(ue)/20);if(r.value==="y"){if(pe.includes("top")||pe.includes("bottom"))if(pe.includes("top")&&H<0||pe.includes("bottom")&&H>0)S.y=H;else{const ue=H*I(H);S.y=Math.abs(ue)<Math.abs(H)?ue:H}}else if(r.value==="x"&&(pe.includes("left")||pe.includes("right")))if(pe.includes("left")&&X<0||pe.includes("right")&&X>0)S.x=X;else{const ue=X*I(X);S.x=Math.abs(ue)<Math.abs(X)?ue:X}(Math.abs(S.x)>0||Math.abs(S.y)>0)&&(c.value=!0),(Z=g.value)==null||Z.style.setProperty("--swipe-amount-x",`${S.x}px`),(Q=g.value)==null||Q.style.setProperty("--swipe-amount-y",`${S.y}px`)}je(()=>{if(i.value=!0,!g.value)return;const x=g.value.getBoundingClientRect().height;p.value=x;const z=[{toastId:n.toast.id,height:x,position:n.toast.position},...n.heights];o("update:heights",z)}),Ys(()=>{g.value&&o("removeToast",n.toast)}),ut(x=>{if(n.toast.promise&&b.value==="loading"||n.toast.duration===1/0||n.toast.type==="loading")return;let z;const H=()=>{if(R.value<$.value){const pe=new Date().getTime()-$.value;h.value=h.value-pe}R.value=new Date().getTime()},X=()=>{h.value!==1/0&&($.value=new Date().getTime(),z=setTimeout(()=>{var pe,S;(S=(pe=n.toast).onAutoClose)==null||S.call(pe,n.toast),ee()},h.value))};n.expanded||n.interacting||oe.value?H():X(),x(()=>{clearTimeout(z)})}),Ce(()=>n.toast.delete,x=>{x!==void 0&&x&&ee()},{deep:!0});function Se(){l.value=!1,r.value=null,G.value=null}return(x,z)=>{var H,X,pe,S,I,j,K,Z,Q,ue,fe,de,se,xe,ge,Ee,ke,He,tt,Ye,At,mt,$t,Ft,yn,Cr,Bt;return C(),ie("li",{tabindex:"0",ref_key:"toastRef",ref:g,class:qe(f(Go)(n.class,O.value,(H=x.classes)==null?void 0:H.toast,(X=x.toast.classes)==null?void 0:X.toast,(pe=x.classes)==null?void 0:pe[b.value],(I=(S=x.toast)==null?void 0:S.classes)==null?void 0:I[b.value])),"data-sonner-toast":"","data-rich-colors":x.toast.richColors??x.defaultRichColors,"data-styled":!(x.toast.component||(j=x.toast)!=null&&j.unstyled||x.unstyled),"data-mounted":i.value,"data-promise":!!x.toast.promise,"data-swiped":c.value,"data-removed":a.value,"data-visible":y.value,"data-y-position":ne.value,"data-x-position":ae.value,"data-index":x.index,"data-front":v.value,"data-swiping":l.value,"data-dismissible":_.value,"data-type":b.value,"data-invert":x.toast.invert||x.invert,"data-swipe-out":u.value,"data-swipe-direction":s.value,"data-expanded":!!(x.expanded||x.expandByDefault&&i.value),style:Pt({"--index":x.index,"--toasts-before":x.index,"--z-index":x.toasts.length-x.index,"--offset":`${a.value?d.value:P.value}px`,"--initial-height":x.expandByDefault?"auto":`${p.value}px`,...x.style,...n.toast.style}),onDragend:Se,onPointerdown:ye,onPointerup:me,onPointermove:Pe},[w.value&&!x.toast.component&&b.value!=="loading"?(C(),ie("button",{key:0,"aria-label":x.closeButtonAriaLabel||"Close toast","data-disabled":Y.value,"data-close-button":"true",class:qe(f(Go)((K=x.classes)==null?void 0:K.closeButton,(Q=(Z=x.toast)==null?void 0:Z.classes)==null?void 0:Q.closeButton)),onClick:le},[(ue=x.icons)!=null&&ue.close?(C(),B(ro((fe=x.icons)==null?void 0:fe.close),{key:0})):V(x.$slots,"close-icon",{key:1})],10,UR)):Be("v-if",!0),x.toast.component?(C(),B(ro(x.toast.component),te({key:1},x.toast.componentProps,{onCloseToast:le}),null,16)):(C(),ie(Ie,{key:2},[b.value!=="default"||x.toast.icon||x.toast.promise?(C(),ie("div",{key:0,"data-icon":"",class:qe(f(Go)((de=x.classes)==null?void 0:de.icon,(xe=(se=x.toast)==null?void 0:se.classes)==null?void 0:xe.icon))},[x.toast.icon?(C(),B(ro(x.toast.icon),{key:0})):(C(),ie(Ie,{key:1},[b.value==="loading"?V(x.$slots,"loading-icon",{key:0}):b.value==="success"?V(x.$slots,"success-icon",{key:1}):b.value==="error"?V(x.$slots,"error-icon",{key:2}):b.value==="warning"?V(x.$slots,"warning-icon",{key:3}):b.value==="info"?V(x.$slots,"info-icon",{key:4}):Be("v-if",!0)],64))],2)):Be("v-if",!0),ce("div",{"data-content":"",class:qe(f(Go)((ge=x.classes)==null?void 0:ge.content,(ke=(Ee=x.toast)==null?void 0:Ee.classes)==null?void 0:ke.content))},[ce("div",{"data-title":"",class:qe(f(Go)((He=x.classes)==null?void 0:He.title,(tt=x.toast.classes)==null?void 0:tt.title))},[re.value?(C(),B(ro(x.toast.title),ct(te({key:0},x.toast.componentProps)),null,16)):(C(),ie(Ie,{key:1},[rt(Ne(x.toast.title),1)],64))],2),x.toast.description?(C(),ie("div",{key:0,"data-description":"",class:qe(f(Go)(x.descriptionClass,T.value,(Ye=x.classes)==null?void 0:Ye.description,(At=x.toast.classes)==null?void 0:At.description))},[L.value?(C(),B(ro(x.toast.description),ct(te({key:0},x.toast.componentProps)),null,16)):(C(),ie(Ie,{key:1},[rt(Ne(x.toast.description),1)],64))],2)):Be("v-if",!0)],2),x.toast.cancel?(C(),ie("button",{key:1,style:Pt(x.toast.cancelButtonStyle||x.cancelButtonStyle),class:qe(f(Go)((mt=x.classes)==null?void 0:mt.cancelButton,($t=x.toast.classes)==null?void 0:$t.cancelButton)),"data-button":"","data-cancel":"",onClick:z[0]||(z[0]=Lt=>{var Qn,Yn;f(Wa)(x.toast.cancel)&&_.value&&((Yn=(Qn=x.toast.cancel).onClick)==null||Yn.call(Qn,Lt),ee())})},Ne(f(Wa)(x.toast.cancel)?(Ft=x.toast.cancel)==null?void 0:Ft.label:x.toast.cancel),7)):Be("v-if",!0),x.toast.action?(C(),ie("button",{key:2,style:Pt(x.toast.actionButtonStyle||x.actionButtonStyle),class:qe(f(Go)((yn=x.classes)==null?void 0:yn.actionButton,(Cr=x.toast.classes)==null?void 0:Cr.actionButton)),"data-button":"","data-action":"",onClick:z[1]||(z[1]=Lt=>{var Qn,Yn;f(Wa)(x.toast.action)&&((Yn=(Qn=x.toast.action).onClick)==null||Yn.call(Qn,Lt),!Lt.defaultPrevented&&ee())})},Ne(f(Wa)(x.toast.action)?(Bt=x.toast.action)==null?void 0:Bt.label:x.toast.action),7)):Be("v-if",!0)],64))],46,VR)}}}),zR=HR,Oa=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n};const KR={},WR={xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stoke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"};function GR(e,t){return C(),ie("svg",WR,t[0]||(t[0]=[ce("line",{x1:"18",y1:"6",x2:"6",y2:"18"},null,-1),ce("line",{x1:"6",y1:"6",x2:"18",y2:"18"},null,-1)]))}var QR=Oa(KR,[["render",GR]]);const YR=["data-visible"],XR={class:"sonner-spinner"};var JR=F({__name:"Loader",props:{visible:{type:Boolean}},setup(e){const t=Array(12).fill(0);return(n,o)=>(C(),ie("div",{class:"sonner-loading-wrapper","data-visible":n.visible},[ce("div",XR,[(C(!0),ie(Ie,null,wt(f(t),r=>(C(),ie("div",{key:`spinner-bar-${r}`,class:"sonner-loading-bar"}))),128))])],8,YR))}}),ZR=JR;const eB={},tB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function nB(e,t){return C(),ie("svg",tB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z","clip-rule":"evenodd"},null,-1)]))}var oB=Oa(eB,[["render",nB]]);const rB={},sB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function iB(e,t){return C(),ie("svg",sB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z","clip-rule":"evenodd"},null,-1)]))}var aB=Oa(rB,[["render",iB]]);const lB={},uB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"};function cB(e,t){return C(),ie("svg",uB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z","clip-rule":"evenodd"},null,-1)]))}var dB=Oa(lB,[["render",cB]]);const fB={},pB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function hB(e,t){return C(),ie("svg",pB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z","clip-rule":"evenodd"},null,-1)]))}var mB=Oa(fB,[["render",hB]]);const gB=["aria-label"],vB=["data-sonner-theme","dir","data-theme","data-rich-colors","data-y-position","data-x-position","data-lifted"],yB=typeof window<"u"&&typeof document<"u";function bB(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var _B=F({name:"Toaster",inheritAttrs:!1,__name:"Toaster",props:{invert:{type:Boolean,default:!1},theme:{default:"light"},position:{default:"bottom-right"},hotkey:{default:()=>["altKey","KeyT"]},richColors:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},duration:{},gap:{default:$R},visibleToasts:{default:MR},closeButton:{type:Boolean,default:!1},toastOptions:{default:()=>({})},class:{default:""},style:{},offset:{default:c_},mobileOffset:{default:d_},dir:{default:"auto"},swipeDirections:{},icons:{},containerAriaLabel:{default:"Notifications"}},setup(e){const t=e,n=g0(),o=N([]);function r(w,k){return o.value.filter($=>!$.position&&k===0||$.position===w)}const s=U(()=>{const w=o.value.filter(k=>k.position).map(k=>k.position);return w.length>0?Array.from(new Set([t.position].concat(w))):[t.position]}),i=U(()=>{const w={};return s.value.forEach(k=>{w[k]=o.value.filter($=>$.position===k)}),w}),a=N([]),l=N(!1),u=N(!1),c=N(t.theme!=="system"?t.theme:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),d=N(null),p=N(null),h=N(!1),m=t.hotkey.join("+").replace(/Key/g,"").replace(/Digit/g,"");function g(w){var k;(k=o.value.find($=>$.id===w.id))!=null&&k.delete||hn.dismiss(w.id),o.value=o.value.filter(({id:$})=>$!==w.id),setTimeout(()=>{o.value.find($=>$.id===w.id)||(a.value=a.value.filter($=>$.toastId!==w.id))},f_+50)}function v(w){var k,$;h.value&&!(($=(k=w.currentTarget)==null?void 0:k.contains)!=null&&$.call(k,w.relatedTarget))&&(h.value=!1,p.value&&(p.value.focus({preventScroll:!0}),p.value=null))}function y(w){w.target instanceof HTMLElement&&w.target.dataset.dismissible==="false"||h.value||(h.value=!0,p.value=w.relatedTarget)}function b(w){w.target&&w.target instanceof HTMLElement&&w.target.dataset.dismissible==="false"||(u.value=!0)}ut(w=>{const k=hn.subscribe($=>{if($.dismiss){requestAnimationFrame(()=>{o.value=o.value.map(R=>R.id===$.id?{...R,delete:!0}:R)});return}We(()=>{const R=o.value.findIndex(G=>G.id===$.id);R!==-1?o.value=[...o.value.slice(0,R),{...o.value[R],...$},...o.value.slice(R+1)]:o.value=[$,...o.value]})});w(k)}),ut(w=>{if(typeof window>"u")return;if(t.theme!=="system"){c.value=t.theme;return}const k=window.matchMedia("(prefers-color-scheme: dark)"),$=G=>{c.value=G?"dark":"light"};$(k.matches);const R=G=>{$(G.matches)};try{k.addEventListener("change",R)}catch{k.addListener(R)}w(()=>{try{k.removeEventListener("change",R)}catch{k.removeListener(R)}})}),ut(()=>{d.value&&p.value&&(p.value.focus({preventScroll:!0}),p.value=null,h.value=!1)}),ut(()=>{o.value.length<=1&&(l.value=!1)}),ut(w=>{function k($){const R=t.hotkey.every(ne=>$[ne]||$.code===ne),G=Array.isArray(d.value)?d.value[0]:d.value;R&&(l.value=!0,G==null||G.focus());const J=document.activeElement===d.value||(G==null?void 0:G.contains(document.activeElement));$.code==="Escape"&&J&&(l.value=!1)}yB&&(document.addEventListener("keydown",k),w(()=>{document.removeEventListener("keydown",k)}))});function _(){l.value=!0}function O(){u.value||(l.value=!1)}function T(){l.value=!1}function A(){u.value=!1}function D(w){a.value=w}function P(w){const k=a.value.findIndex($=>$.toastId===w.toastId);if(k!==-1)a.value[k]=w;else{const $=a.value.findIndex(R=>R.position===w.position);$!==-1?a.value.splice($,0,w):a.value.unshift(w)}}return(w,k)=>(C(),ie(Ie,null,[Be(" Remove item from normal navigation flow, only available via hotkey "),ce("section",{"aria-label":`${w.containerAriaLabel} ${f(m)}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},[(C(!0),ie(Ie,null,wt(s.value,($,R)=>{var G;return C(),ie("ol",te({key:$,ref_for:!0,ref_key:"listRef",ref:d,"data-sonner-toaster":"","data-sonner-theme":c.value,class:t.class,dir:w.dir==="auto"?bB():w.dir,tabIndex:-1,"data-theme":w.theme,"data-rich-colors":w.richColors,"data-y-position":$.split("-")[0],"data-x-position":$.split("-")[1],"data-lifted":l.value&&o.value.length>1&&!w.expand,style:{"--front-toast-height":`${((G=a.value[0])==null?void 0:G.height)||0}px`,"--width":`${f(qR)}px`,"--gap":`${w.gap}px`,...w.style,...f(n).style,...f(jR)(w.offset,w.mobileOffset)}},w.$attrs,{onBlur:v,onFocus:y,onMouseenter:_,onMousemove:_,onMouseleave:O,onDragend:T,onPointerdown:b,onPointerup:A}),[(C(!0),ie(Ie,null,wt(r($,R),(J,ne)=>{var ae,re,L,oe,Y,ee,le,ye,me,Pe;return C(),B(zR,{key:J.id,heights:a.value,icons:w.icons,index:ne,toast:J,defaultRichColors:w.richColors,duration:((ae=w.toastOptions)==null?void 0:ae.duration)??w.duration,class:qe(((re=w.toastOptions)==null?void 0:re.class)??""),descriptionClass:(L=w.toastOptions)==null?void 0:L.descriptionClass,invert:w.invert,visibleToasts:w.visibleToasts,closeButton:((oe=w.toastOptions)==null?void 0:oe.closeButton)??w.closeButton,interacting:u.value,position:$,style:Pt((Y=w.toastOptions)==null?void 0:Y.style),unstyled:(ee=w.toastOptions)==null?void 0:ee.unstyled,classes:(le=w.toastOptions)==null?void 0:le.classes,cancelButtonStyle:(ye=w.toastOptions)==null?void 0:ye.cancelButtonStyle,actionButtonStyle:(me=w.toastOptions)==null?void 0:me.actionButtonStyle,"close-button-aria-label":(Pe=w.toastOptions)==null?void 0:Pe.closeButtonAriaLabel,toasts:i.value[$],expandByDefault:w.expand,gap:w.gap,expanded:l.value,swipeDirections:t.swipeDirections,"onUpdate:heights":D,"onUpdate:height":P,onRemoveToast:g},{"close-icon":E(()=>[V(w.$slots,"close-icon",{},()=>[q(QR)])]),"loading-icon":E(()=>[V(w.$slots,"loading-icon",{},()=>[q(ZR,{visible:J.type==="loading"},null,8,["visible"])])]),"success-icon":E(()=>[V(w.$slots,"success-icon",{},()=>[q(oB)])]),"error-icon":E(()=>[V(w.$slots,"error-icon",{},()=>[q(mB)])]),"warning-icon":E(()=>[V(w.$slots,"warning-icon",{},()=>[q(dB)])]),"info-icon":E(()=>[V(w.$slots,"info-icon",{},()=>[q(aB)])]),_:2},1032,["heights","icons","index","toast","defaultRichColors","duration","class","descriptionClass","invert","visibleToasts","closeButton","interacting","position","style","unstyled","classes","cancelButtonStyle","actionButtonStyle","close-button-aria-label","toasts","expandByDefault","gap","expanded","swipeDirections"])}),128))],16,vB)}),128))],8,gB)],2112))}}),wB=_B;const ko=xt.create({baseURL:"https://api.beenglish.eu.org/DesignScreenshot/admin-api",timeout:12e4,headers:{"Content-Type":"application/json"}});let bc=!1;const _c=[],SB=async()=>{try{const e=localStorage.getItem("refreshToken");if(!e)throw new Error("No refresh token found");const t=await xt.post(`/system/auth/refresh-token?refreshToken=${e}`),{token:n,refreshToken:o}=t.data;return localStorage.setItem("accessToken",n),localStorage.setItem("refreshToken",o),n}catch(e){return localStorage.removeItem("accessToken"),localStorage.removeItem("refreshToken"),window.location.href="/auth",Promise.reject(e)}};ko.interceptors.request.use(e=>{const t=localStorage.getItem("accessToken");return t&&e.headers&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e));ko.interceptors.response.use(async e=>{const{data:t,status:n}=e;if(n!==200)return Bi.error(t.msg||"请求失败"),Promise.reject(new Error(t.msg||"请求失败"));if(t.code===401){const o=e.config;if(!o._retry){if(bc)return new Promise(r=>{_c.push(s=>{o.headers&&(o.headers.Authorization=`Bearer ${s}`),r(ko(o))})});o._retry=!0,bc=!0;try{const r=await SB();return o.headers&&(o.headers.Authorization=`Bearer ${r}`),_c.forEach(s=>s(r)),_c.length=0,ko(o)}catch(r){return Promise.reject(r)}finally{bc=!1}}}return t.code===0?t.data:(Bi.error(t.msg||"请求失败"),Promise.reject(new Error(t.msg||"请求失败")))},e=>{const t=e.message||"网络错误";return Bi.error(t),Promise.reject(e)});const wr=(e,t)=>ko.get(e,{params:t}),Sr=(e,t,n)=>ko.post(e,t,n),p_=(e,t)=>ko.put(e,t),h_=(e,t)=>ko.delete(e,{params:t}),GL=(e,t)=>ko.post(e,t,{headers:{"Content-Type":"multipart/form-data"}}),CB=e=>wr("/admin/app/page",e),xB=e=>wr("/admin/app/get-app-details",{appId:e}),EB=e=>wr("/admin/app/list",e),QL=e=>Sr("/admin/app/create",e),YL=e=>p_("/admin/app/update",e),XL=e=>h_("/admin/app/delete",e),ep=Symbol("platform"),m_=bf("app",()=>{const e=N([]);return{apps:e,fetchApps:async n=>{const o=await EB({platform:n});e.value=o}}});/*!
./output/test_run/homepage_after_login.html:100:`+s):o.stack=s}catch{}}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Zr(this.defaults,n);const{transitional:o,paramsSerializer:r,headers:s}=n;o!==void 0&&ul.assertOptions(o,{silentJSONParsing:Jn.transitional(Jn.boolean),forcedJSONParsing:Jn.transitional(Jn.boolean),clarifyTimeoutError:Jn.transitional(Jn.boolean)},!1),r!=null&&(W.isFunction(r)?n.paramsSerializer={serialize:r}:ul.assertOptions(r,{encode:Jn.function,serialize:Jn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ul.assertOptions(n,{baseUrl:Jn.spelling("baseURL"),withXsrfToken:Jn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=s&&W.merge(s.common,s[n.method]);s&&W.forEach(["delete","get","head","post","put","patch","common"],m=>{delete s[m]}),n.headers=gn.concat(i,s);const a=[];let l=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(l=l&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const u=[];this.interceptors.response.forEach(function(g){u.push(g.fulfilled,g.rejected)});let c,d=0,p;if(!l){const m=[mm.bind(this),void 0];for(m.unshift(...a),m.push(...u),p=m.length,c=Promise.resolve(n);d<p;)c=c.then(m[d++],m[d++]);return c}p=a.length;let h=n;for(d=0;d<p;){const m=a[d++],g=a[d++];try{h=m(h)}catch(v){g.call(this,v);break}}try{c=mm.call(this,h)}catch(m){return Promise.reject(m)}for(d=0,p=u.length;d<p;)c=c.then(u[d++],u[d++]);return c}getUri(t){t=Zr(this.defaults,t);const n=n_(t.baseURL,t.url,t.allowAbsoluteUrls);return Xb(n,t.params,t.paramsSerializer)}};W.forEach(["delete","get","head","options"],function(t){Wr.prototype[t]=function(n,o){return this.request(Zr(o||{},{method:t,url:n,data:(o||{}).data}))}});W.forEach(["post","put","patch"],function(t){function n(o){return function(s,i,a){return this.request(Zr(a||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}Wr.prototype[t]=n(),Wr.prototype[t+"Form"]=n(!0)});let AR=class l_{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const o=this;this.promise.then(r=>{if(!o._listeners)return;let s=o._listeners.length;for(;s-- >0;)o._listeners[s](r);o._listeners=null}),this.promise.then=r=>{let s;const i=new Promise(a=>{o.subscribe(a),s=a}).then(r);return i.cancel=function(){o.unsubscribe(s)},i},t(function(s,i,a){o.reason||(o.reason=new ii(s,i,a),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=o=>{t.abort(o)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new l_(function(r){t=r}),cancel:t}}};function OR(e){return function(n){return e.apply(null,n)}}function TR(e){return W.isObject(e)&&e.isAxiosError===!0}const Ud={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ud).forEach(([e,t])=>{Ud[t]=e});function u_(e){const t=new Wr(e),n=Lb(Wr.prototype.request,t);return W.extend(n,Wr.prototype,t,{allOwnKeys:!0}),W.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return u_(Zr(e,r))},n}const xt=u_(Aa);xt.Axios=Wr;xt.CanceledError=ii;xt.CancelToken=AR;xt.isCancel=e_;xt.VERSION=a_;xt.toFormData=Du;xt.AxiosError=Ve;xt.Cancel=xt.CanceledError;xt.all=function(t){return Promise.all(t)};xt.spread=OR;xt.isAxiosError=TR;xt.mergeConfig=Zr;xt.AxiosHeaders=gn;xt.formToJSON=e=>Zb(W.isHTMLForm(e)?new FormData(e):e);xt.getAdapter=i_.getAdapter;xt.HttpStatusCode=Ud;xt.default=xt;const{Axios:DL,AxiosError:RL,CanceledError:BL,isCancel:ML,CancelToken:qL,VERSION:$L,all:FL,Cancel:LL,isAxiosError:NL,spread:jL,toFormData:VL,AxiosHeaders:UL,HttpStatusCode:HL,formToJSON:zL,getAdapter:KL,mergeConfig:WL}=xt;let Hd=1;var PR=class{constructor(){Mt(this,"subscribers");Mt(this,"toasts");Mt(this,"dismissedToasts");Mt(this,"subscribe",e=>(this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}));Mt(this,"publish",e=>{this.subscribers.forEach(t=>t(e))});Mt(this,"addToast",e=>{this.publish(e),this.toasts=[...this.toasts,e]});Mt(this,"create",e=>{var i;const{message:t,...n}=e,o=typeof e.id=="number"||e.id&&((i=e.id)==null?void 0:i.length)>0?e.id:Hd++,r=this.toasts.find(a=>a.id===o),s=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),r?this.toasts=this.toasts.map(a=>a.id===o?(this.publish({...a,...e,id:o,title:t}),{...a,...e,id:o,dismissible:s,title:t}):a):this.addToast({title:t,...n,dismissible:s,id:o}),o});Mt(this,"dismiss",e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),e));Mt(this,"message",(e,t)=>this.create({...t,message:e,type:"default"}));Mt(this,"error",(e,t)=>this.create({...t,type:"error",message:e}));Mt(this,"success",(e,t)=>this.create({...t,type:"success",message:e}));Mt(this,"info",(e,t)=>this.create({...t,type:"info",message:e}));Mt(this,"warning",(e,t)=>this.create({...t,type:"warning",message:e}));Mt(this,"loading",(e,t)=>this.create({...t,type:"loading",message:e}));Mt(this,"promise",(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));const o=Promise.resolve(e instanceof Function?e():e);let r=n!==void 0,s;const i=o.then(async l=>{if(s=["resolve",l],so(l))r=!1,this.create({id:n,type:"default",message:l});else if(IR(l)&&!l.ok){r=!1;const c=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description,h=typeof c=="object"&&!so(c)?c:{message:c||"",id:n||""};this.create({id:n,type:"error",description:d,...h})}else if(l instanceof Error){r=!1;const c=typeof t.error=="function"?await t.error(l):t.error,d=typeof t.description=="function"?await t.description(l):t.description,h=typeof c=="object"&&!so(c)?c:{message:c||"",id:n||""};this.create({id:n,type:"error",description:d,...h})}else if(t.success!==void 0){r=!1;const c=typeof t.success=="function"?await t.success(l):t.success,d=typeof t.description=="function"?await t.description(l):t.description,h=typeof c=="object"&&!so(c)?c:{message:c||"",id:n||""};this.create({id:n,type:"success",description:d,...h})}}).catch(async l=>{if(s=["reject",l],t.error!==void 0){r=!1;const u=typeof t.error=="function"?await t.error(l):t.error,c=typeof t.description=="function"?await t.description(l):t.description,p=typeof u=="object"&&!so(u)?u:{message:u||"",id:n||""};this.create({id:n,type:"error",description:c,...p})}}).finally(()=>{var l;r&&(this.dismiss(n),n=void 0),(l=t.finally)==null||l.call(t)}),a=()=>new Promise((l,u)=>i.then(()=>s[0]==="reject"?u(s[1]):l(s[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})});Mt(this,"custom",(e,t)=>{const n=(t==null?void 0:t.id)||Hd++;return this.publish({component:e,id:n,...t}),n});Mt(this,"getActiveToasts",()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)));this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}};const hn=new PR;function kR(e,t){const n=(t==null?void 0:t.id)||Hd++;return hn.create({message:e,id:n,type:"default",...t}),n}const IR=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",DR=kR,RR=()=>hn.toasts,BR=()=>hn.getActiveToasts(),Bi=Object.assign(DR,{success:hn.success,info:hn.info,warning:hn.warning,error:hn.error,custom:hn.custom,message:hn.message,promise:hn.promise,dismiss:hn.dismiss,loading:hn.loading},{getHistory:RR,getToasts:BR});function Wa(e){return e.label!==void 0}const MR=3,c_="24px",d_="16px",vm=4e3,qR=356,$R=14,FR=45,f_=200;function LR(){const e=N(!1);return ut(()=>{const t=()=>{e.value=document.hidden};return document.addEventListener("visibilitychange",t),()=>window.removeEventListener("visibilitychange",t)}),{isDocumentHidden:e}}function Go(...e){return e.filter(Boolean).join(" ")}function NR(e){const[t,n]=e.split("-"),o=[];return t&&o.push(t),n&&o.push(n),o}function jR(e,t){const n={};return[e,t].forEach((o,r)=>{const s=r===1,i=s?"--mobile-offset":"--offset",a=s?d_:c_;function l(u){["top","right","bottom","left"].forEach(c=>{n[`${i}-${c}`]=typeof u=="number"?`${u}px`:u})}typeof o=="number"||typeof o=="string"?l(o):typeof o=="object"?["top","right","bottom","left"].forEach(u=>{o[u]===void 0?n[`${i}-${u}`]=a:n[`${i}-${u}`]=typeof o[u]=="number"?`${o[u]}px`:o[u]}):l(a)}),n}const VR=["data-rich-colors","data-styled","data-mounted","data-promise","data-swiped","data-removed","data-visible","data-y-position","data-x-position","data-index","data-front","data-swiping","data-dismissible","data-type","data-invert","data-swipe-out","data-swipe-direction","data-expanded"],UR=["aria-label","data-disabled"];var HR=F({__name:"Toast",props:{toast:{},toasts:{},index:{},swipeDirections:{},expanded:{type:Boolean},invert:{type:Boolean},heights:{},gap:{},position:{},visibleToasts:{},expandByDefault:{type:Boolean},closeButton:{type:Boolean},interacting:{type:Boolean},style:{},cancelButtonStyle:{},actionButtonStyle:{},duration:{},class:{},unstyled:{type:Boolean},descriptionClass:{},loadingIcon:{},classes:{},icons:{},closeButtonAriaLabel:{},defaultRichColors:{type:Boolean}},emits:["update:heights","update:height","removeToast"],setup(e,{emit:t}){const n=e,o=t,r=N(null),s=N(null),i=N(!1),a=N(!1),l=N(!1),u=N(!1),c=N(!1),d=N(0),p=N(0),h=N(n.toast.duration||n.duration||vm),m=N(null),g=N(null),v=U(()=>n.index===0),y=U(()=>n.index+1<=n.visibleToasts),b=U(()=>n.toast.type),_=U(()=>n.toast.dismissible!==!1),O=U(()=>n.toast.class||""),T=U(()=>n.descriptionClass||""),A=U(()=>{const x=n.toast.position||n.position,H=n.heights.filter(X=>X.position===x).findIndex(X=>X.toastId===n.toast.id);return H>=0?H:0}),D=U(()=>{const x=n.toast.position||n.position;return n.heights.filter(H=>H.position===x).reduce((H,X,pe)=>pe>=A.value?H:H+X.height,0)}),P=U(()=>A.value*n.gap+D.value||0),w=U(()=>n.toast.closeButton??n.closeButton),k=U(()=>n.toast.duration||n.duration||vm),$=N(0),R=N(0),G=N(null),J=U(()=>n.position.split("-")),ne=U(()=>J.value[0]),ae=U(()=>J.value[1]),re=U(()=>typeof n.toast.title!="string"),L=U(()=>typeof n.toast.description!="string"),{isDocumentHidden:oe}=LR(),Y=U(()=>b.value&&b.value==="loading");je(()=>{i.value=!0,h.value=k.value}),ut(async()=>{if(!i.value||!g.value)return;await We();const x=g.value,z=x.style.height;x.style.height="auto";const H=x.getBoundingClientRect().height;x.style.height=z,p.value=H,o("update:height",{toastId:n.toast.id,height:H,position:n.toast.position||n.position})});function ee(){a.value=!0,d.value=P.value,setTimeout(()=>{o("removeToast",n.toast)},f_)}function le(){var x,z;if(Y.value||!_.value)return{};ee(),(z=(x=n.toast).onDismiss)==null||z.call(x,n.toast)}function ye(x){Y.value||!_.value||(m.value=new Date,d.value=P.value,x.target.setPointerCapture(x.pointerId),x.target.tagName!=="BUTTON"&&(l.value=!0,G.value={x:x.clientX,y:x.clientY}))}function me(){var S,I,j,K,Z,Q,ue;if(u.value||!_.value)return;G.value=null;const x=Number(((S=g.value)==null?void 0:S.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),z=Number(((I=g.value)==null?void 0:I.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),H=new Date().getTime()-(((j=m.value)==null?void 0:j.getTime())||0),X=r.value==="x"?x:z,pe=Math.abs(X)/H;if(Math.abs(X)>=FR||pe>.11){d.value=P.value,(Z=(K=n.toast).onDismiss)==null||Z.call(K,n.toast),r.value==="x"?s.value=x>0?"right":"left":s.value=z>0?"down":"up",ee(),u.value=!0;return}else(Q=g.value)==null||Q.style.setProperty("--swipe-amount-x","0px"),(ue=g.value)==null||ue.style.setProperty("--swipe-amount-y","0px");c.value=!1,l.value=!1,r.value=null}function Pe(x){var j,K,Z,Q;if(!G.value||!_.value||(((K=(j=window==null?void 0:window.getSelection())==null?void 0:j.toString())==null?void 0:K.length)??!1))return;const H=x.clientY-G.value.y,X=x.clientX-G.value.x,pe=n.swipeDirections??NR(n.position);!r.value&&(Math.abs(X)>1||Math.abs(H)>1)&&(r.value=Math.abs(X)>Math.abs(H)?"x":"y");let S={x:0,y:0};const I=ue=>1/(1.5+Math.abs(ue)/20);if(r.value==="y"){if(pe.includes("top")||pe.includes("bottom"))if(pe.includes("top")&&H<0||pe.includes("bottom")&&H>0)S.y=H;else{const ue=H*I(H);S.y=Math.abs(ue)<Math.abs(H)?ue:H}}else if(r.value==="x"&&(pe.includes("left")||pe.includes("right")))if(pe.includes("left")&&X<0||pe.includes("right")&&X>0)S.x=X;else{const ue=X*I(X);S.x=Math.abs(ue)<Math.abs(X)?ue:X}(Math.abs(S.x)>0||Math.abs(S.y)>0)&&(c.value=!0),(Z=g.value)==null||Z.style.setProperty("--swipe-amount-x",`${S.x}px`),(Q=g.value)==null||Q.style.setProperty("--swipe-amount-y",`${S.y}px`)}je(()=>{if(i.value=!0,!g.value)return;const x=g.value.getBoundingClientRect().height;p.value=x;const z=[{toastId:n.toast.id,height:x,position:n.toast.position},...n.heights];o("update:heights",z)}),Ys(()=>{g.value&&o("removeToast",n.toast)}),ut(x=>{if(n.toast.promise&&b.value==="loading"||n.toast.duration===1/0||n.toast.type==="loading")return;let z;const H=()=>{if(R.value<$.value){const pe=new Date().getTime()-$.value;h.value=h.value-pe}R.value=new Date().getTime()},X=()=>{h.value!==1/0&&($.value=new Date().getTime(),z=setTimeout(()=>{var pe,S;(S=(pe=n.toast).onAutoClose)==null||S.call(pe,n.toast),ee()},h.value))};n.expanded||n.interacting||oe.value?H():X(),x(()=>{clearTimeout(z)})}),Ce(()=>n.toast.delete,x=>{x!==void 0&&x&&ee()},{deep:!0});function Se(){l.value=!1,r.value=null,G.value=null}return(x,z)=>{var H,X,pe,S,I,j,K,Z,Q,ue,fe,de,se,xe,ge,Ee,ke,He,tt,Ye,At,mt,$t,Ft,yn,Cr,Bt;return C(),ie("li",{tabindex:"0",ref_key:"toastRef",ref:g,class:qe(f(Go)(n.class,O.value,(H=x.classes)==null?void 0:H.toast,(X=x.toast.classes)==null?void 0:X.toast,(pe=x.classes)==null?void 0:pe[b.value],(I=(S=x.toast)==null?void 0:S.classes)==null?void 0:I[b.value])),"data-sonner-toast":"","data-rich-colors":x.toast.richColors??x.defaultRichColors,"data-styled":!(x.toast.component||(j=x.toast)!=null&&j.unstyled||x.unstyled),"data-mounted":i.value,"data-promise":!!x.toast.promise,"data-swiped":c.value,"data-removed":a.value,"data-visible":y.value,"data-y-position":ne.value,"data-x-position":ae.value,"data-index":x.index,"data-front":v.value,"data-swiping":l.value,"data-dismissible":_.value,"data-type":b.value,"data-invert":x.toast.invert||x.invert,"data-swipe-out":u.value,"data-swipe-direction":s.value,"data-expanded":!!(x.expanded||x.expandByDefault&&i.value),style:Pt({"--index":x.index,"--toasts-before":x.index,"--z-index":x.toasts.length-x.index,"--offset":`${a.value?d.value:P.value}px`,"--initial-height":x.expandByDefault?"auto":`${p.value}px`,...x.style,...n.toast.style}),onDragend:Se,onPointerdown:ye,onPointerup:me,onPointermove:Pe},[w.value&&!x.toast.component&&b.value!=="loading"?(C(),ie("button",{key:0,"aria-label":x.closeButtonAriaLabel||"Close toast","data-disabled":Y.value,"data-close-button":"true",class:qe(f(Go)((K=x.classes)==null?void 0:K.closeButton,(Q=(Z=x.toast)==null?void 0:Z.classes)==null?void 0:Q.closeButton)),onClick:le},[(ue=x.icons)!=null&&ue.close?(C(),B(ro((fe=x.icons)==null?void 0:fe.close),{key:0})):V(x.$slots,"close-icon",{key:1})],10,UR)):Be("v-if",!0),x.toast.component?(C(),B(ro(x.toast.component),te({key:1},x.toast.componentProps,{onCloseToast:le}),null,16)):(C(),ie(Ie,{key:2},[b.value!=="default"||x.toast.icon||x.toast.promise?(C(),ie("div",{key:0,"data-icon":"",class:qe(f(Go)((de=x.classes)==null?void 0:de.icon,(xe=(se=x.toast)==null?void 0:se.classes)==null?void 0:xe.icon))},[x.toast.icon?(C(),B(ro(x.toast.icon),{key:0})):(C(),ie(Ie,{key:1},[b.value==="loading"?V(x.$slots,"loading-icon",{key:0}):b.value==="success"?V(x.$slots,"success-icon",{key:1}):b.value==="error"?V(x.$slots,"error-icon",{key:2}):b.value==="warning"?V(x.$slots,"warning-icon",{key:3}):b.value==="info"?V(x.$slots,"info-icon",{key:4}):Be("v-if",!0)],64))],2)):Be("v-if",!0),ce("div",{"data-content":"",class:qe(f(Go)((ge=x.classes)==null?void 0:ge.content,(ke=(Ee=x.toast)==null?void 0:Ee.classes)==null?void 0:ke.content))},[ce("div",{"data-title":"",class:qe(f(Go)((He=x.classes)==null?void 0:He.title,(tt=x.toast.classes)==null?void 0:tt.title))},[re.value?(C(),B(ro(x.toast.title),ct(te({key:0},x.toast.componentProps)),null,16)):(C(),ie(Ie,{key:1},[rt(Ne(x.toast.title),1)],64))],2),x.toast.description?(C(),ie("div",{key:0,"data-description":"",class:qe(f(Go)(x.descriptionClass,T.value,(Ye=x.classes)==null?void 0:Ye.description,(At=x.toast.classes)==null?void 0:At.description))},[L.value?(C(),B(ro(x.toast.description),ct(te({key:0},x.toast.componentProps)),null,16)):(C(),ie(Ie,{key:1},[rt(Ne(x.toast.description),1)],64))],2)):Be("v-if",!0)],2),x.toast.cancel?(C(),ie("button",{key:1,style:Pt(x.toast.cancelButtonStyle||x.cancelButtonStyle),class:qe(f(Go)((mt=x.classes)==null?void 0:mt.cancelButton,($t=x.toast.classes)==null?void 0:$t.cancelButton)),"data-button":"","data-cancel":"",onClick:z[0]||(z[0]=Lt=>{var Qn,Yn;f(Wa)(x.toast.cancel)&&_.value&&((Yn=(Qn=x.toast.cancel).onClick)==null||Yn.call(Qn,Lt),ee())})},Ne(f(Wa)(x.toast.cancel)?(Ft=x.toast.cancel)==null?void 0:Ft.label:x.toast.cancel),7)):Be("v-if",!0),x.toast.action?(C(),ie("button",{key:2,style:Pt(x.toast.actionButtonStyle||x.actionButtonStyle),class:qe(f(Go)((yn=x.classes)==null?void 0:yn.actionButton,(Cr=x.toast.classes)==null?void 0:Cr.actionButton)),"data-button":"","data-action":"",onClick:z[1]||(z[1]=Lt=>{var Qn,Yn;f(Wa)(x.toast.action)&&((Yn=(Qn=x.toast.action).onClick)==null||Yn.call(Qn,Lt),!Lt.defaultPrevented&&ee())})},Ne(f(Wa)(x.toast.action)?(Bt=x.toast.action)==null?void 0:Bt.label:x.toast.action),7)):Be("v-if",!0)],64))],46,VR)}}}),zR=HR,Oa=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n};const KR={},WR={xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stoke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"};function GR(e,t){return C(),ie("svg",WR,t[0]||(t[0]=[ce("line",{x1:"18",y1:"6",x2:"6",y2:"18"},null,-1),ce("line",{x1:"6",y1:"6",x2:"18",y2:"18"},null,-1)]))}var QR=Oa(KR,[["render",GR]]);const YR=["data-visible"],XR={class:"sonner-spinner"};var JR=F({__name:"Loader",props:{visible:{type:Boolean}},setup(e){const t=Array(12).fill(0);return(n,o)=>(C(),ie("div",{class:"sonner-loading-wrapper","data-visible":n.visible},[ce("div",XR,[(C(!0),ie(Ie,null,wt(f(t),r=>(C(),ie("div",{key:`spinner-bar-${r}`,class:"sonner-loading-bar"}))),128))])],8,YR))}}),ZR=JR;const eB={},tB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function nB(e,t){return C(),ie("svg",tB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z","clip-rule":"evenodd"},null,-1)]))}var oB=Oa(eB,[["render",nB]]);const rB={},sB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function iB(e,t){return C(),ie("svg",sB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z","clip-rule":"evenodd"},null,-1)]))}var aB=Oa(rB,[["render",iB]]);const lB={},uB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"};function cB(e,t){return C(),ie("svg",uB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z","clip-rule":"evenodd"},null,-1)]))}var dB=Oa(lB,[["render",cB]]);const fB={},pB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function hB(e,t){return C(),ie("svg",pB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z","clip-rule":"evenodd"},null,-1)]))}var mB=Oa(fB,[["render",hB]]);const gB=["aria-label"],vB=["data-sonner-theme","dir","data-theme","data-rich-colors","data-y-position","data-x-position","data-lifted"],yB=typeof window<"u"&&typeof document<"u";function bB(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var _B=F({name:"Toaster",inheritAttrs:!1,__name:"Toaster",props:{invert:{type:Boolean,default:!1},theme:{default:"light"},position:{default:"bottom-right"},hotkey:{default:()=>["altKey","KeyT"]},richColors:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},duration:{},gap:{default:$R},visibleToasts:{default:MR},closeButton:{type:Boolean,default:!1},toastOptions:{default:()=>({})},class:{default:""},style:{},offset:{default:c_},mobileOffset:{default:d_},dir:{default:"auto"},swipeDirections:{},icons:{},containerAriaLabel:{default:"Notifications"}},setup(e){const t=e,n=g0(),o=N([]);function r(w,k){return o.value.filter($=>!$.position&&k===0||$.position===w)}const s=U(()=>{const w=o.value.filter(k=>k.position).map(k=>k.position);return w.length>0?Array.from(new Set([t.position].concat(w))):[t.position]}),i=U(()=>{const w={};return s.value.forEach(k=>{w[k]=o.value.filter($=>$.position===k)}),w}),a=N([]),l=N(!1),u=N(!1),c=N(t.theme!=="system"?t.theme:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),d=N(null),p=N(null),h=N(!1),m=t.hotkey.join("+").replace(/Key/g,"").replace(/Digit/g,"");function g(w){var k;(k=o.value.find($=>$.id===w.id))!=null&&k.delete||hn.dismiss(w.id),o.value=o.value.filter(({id:$})=>$!==w.id),setTimeout(()=>{o.value.find($=>$.id===w.id)||(a.value=a.value.filter($=>$.toastId!==w.id))},f_+50)}function v(w){var k,$;h.value&&!(($=(k=w.currentTarget)==null?void 0:k.contains)!=null&&$.call(k,w.relatedTarget))&&(h.value=!1,p.value&&(p.value.focus({preventScroll:!0}),p.value=null))}function y(w){w.target instanceof HTMLElement&&w.target.dataset.dismissible==="false"||h.value||(h.value=!0,p.value=w.relatedTarget)}function b(w){w.target&&w.target instanceof HTMLElement&&w.target.dataset.dismissible==="false"||(u.value=!0)}ut(w=>{const k=hn.subscribe($=>{if($.dismiss){requestAnimationFrame(()=>{o.value=o.value.map(R=>R.id===$.id?{...R,delete:!0}:R)});return}We(()=>{const R=o.value.findIndex(G=>G.id===$.id);R!==-1?o.value=[...o.value.slice(0,R),{...o.value[R],...$},...o.value.slice(R+1)]:o.value=[$,...o.value]})});w(k)}),ut(w=>{if(typeof window>"u")return;if(t.theme!=="system"){c.value=t.theme;return}const k=window.matchMedia("(prefers-color-scheme: dark)"),$=G=>{c.value=G?"dark":"light"};$(k.matches);const R=G=>{$(G.matches)};try{k.addEventListener("change",R)}catch{k.addListener(R)}w(()=>{try{k.removeEventListener("change",R)}catch{k.removeListener(R)}})}),ut(()=>{d.value&&p.value&&(p.value.focus({preventScroll:!0}),p.value=null,h.value=!1)}),ut(()=>{o.value.length<=1&&(l.value=!1)}),ut(w=>{function k($){const R=t.hotkey.every(ne=>$[ne]||$.code===ne),G=Array.isArray(d.value)?d.value[0]:d.value;R&&(l.value=!0,G==null||G.focus());const J=document.activeElement===d.value||(G==null?void 0:G.contains(document.activeElement));$.code==="Escape"&&J&&(l.value=!1)}yB&&(document.addEventListener("keydown",k),w(()=>{document.removeEventListener("keydown",k)}))});function _(){l.value=!0}function O(){u.value||(l.value=!1)}function T(){l.value=!1}function A(){u.value=!1}function D(w){a.value=w}function P(w){const k=a.value.findIndex($=>$.toastId===w.toastId);if(k!==-1)a.value[k]=w;else{const $=a.value.findIndex(R=>R.position===w.position);$!==-1?a.value.splice($,0,w):a.value.unshift(w)}}return(w,k)=>(C(),ie(Ie,null,[Be(" Remove item from normal navigation flow, only available via hotkey "),ce("section",{"aria-label":`${w.containerAriaLabel} ${f(m)}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},[(C(!0),ie(Ie,null,wt(s.value,($,R)=>{var G;return C(),ie("ol",te({key:$,ref_for:!0,ref_key:"listRef",ref:d,"data-sonner-toaster":"","data-sonner-theme":c.value,class:t.class,dir:w.dir==="auto"?bB():w.dir,tabIndex:-1,"data-theme":w.theme,"data-rich-colors":w.richColors,"data-y-position":$.split("-")[0],"data-x-position":$.split("-")[1],"data-lifted":l.value&&o.value.length>1&&!w.expand,style:{"--front-toast-height":`${((G=a.value[0])==null?void 0:G.height)||0}px`,"--width":`${f(qR)}px`,"--gap":`${w.gap}px`,...w.style,...f(n).style,...f(jR)(w.offset,w.mobileOffset)}},w.$attrs,{onBlur:v,onFocus:y,onMouseenter:_,onMousemove:_,onMouseleave:O,onDragend:T,onPointerdown:b,onPointerup:A}),[(C(!0),ie(Ie,null,wt(r($,R),(J,ne)=>{var ae,re,L,oe,Y,ee,le,ye,me,Pe;return C(),B(zR,{key:J.id,heights:a.value,icons:w.icons,index:ne,toast:J,defaultRichColors:w.richColors,duration:((ae=w.toastOptions)==null?void 0:ae.duration)??w.duration,class:qe(((re=w.toastOptions)==null?void 0:re.class)??""),descriptionClass:(L=w.toastOptions)==null?void 0:L.descriptionClass,invert:w.invert,visibleToasts:w.visibleToasts,closeButton:((oe=w.toastOptions)==null?void 0:oe.closeButton)??w.closeButton,interacting:u.value,position:$,style:Pt((Y=w.toastOptions)==null?void 0:Y.style),unstyled:(ee=w.toastOptions)==null?void 0:ee.unstyled,classes:(le=w.toastOptions)==null?void 0:le.classes,cancelButtonStyle:(ye=w.toastOptions)==null?void 0:ye.cancelButtonStyle,actionButtonStyle:(me=w.toastOptions)==null?void 0:me.actionButtonStyle,"close-button-aria-label":(Pe=w.toastOptions)==null?void 0:Pe.closeButtonAriaLabel,toasts:i.value[$],expandByDefault:w.expand,gap:w.gap,expanded:l.value,swipeDirections:t.swipeDirections,"onUpdate:heights":D,"onUpdate:height":P,onRemoveToast:g},{"close-icon":E(()=>[V(w.$slots,"close-icon",{},()=>[q(QR)])]),"loading-icon":E(()=>[V(w.$slots,"loading-icon",{},()=>[q(ZR,{visible:J.type==="loading"},null,8,["visible"])])]),"success-icon":E(()=>[V(w.$slots,"success-icon",{},()=>[q(oB)])]),"error-icon":E(()=>[V(w.$slots,"error-icon",{},()=>[q(mB)])]),"warning-icon":E(()=>[V(w.$slots,"warning-icon",{},()=>[q(dB)])]),"info-icon":E(()=>[V(w.$slots,"info-icon",{},()=>[q(aB)])]),_:2},1032,["heights","icons","index","toast","defaultRichColors","duration","class","descriptionClass","invert","visibleToasts","closeButton","interacting","position","style","unstyled","classes","cancelButtonStyle","actionButtonStyle","close-button-aria-label","toasts","expandByDefault","gap","expanded","swipeDirections"])}),128))],16,vB)}),128))],8,gB)],2112))}}),wB=_B;const ko=xt.create({baseURL:"https://api.beenglish.eu.org/DesignScreenshot/admin-api",timeout:12e4,headers:{"Content-Type":"application/json"}});let bc=!1;const _c=[],SB=async()=>{try{const e=localStorage.getItem("refreshToken");if(!e)throw new Error("No refresh token found");const t=await xt.post(`/system/auth/refresh-token?refreshToken=${e}`),{token:n,refreshToken:o}=t.data;return localStorage.setItem("accessToken",n),localStorage.setItem("refreshToken",o),n}catch(e){return localStorage.removeItem("accessToken"),localStorage.removeItem("refreshToken"),window.location.href="/auth",Promise.reject(e)}};ko.interceptors.request.use(e=>{const t=localStorage.getItem("accessToken");return t&&e.headers&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e));ko.interceptors.response.use(async e=>{const{data:t,status:n}=e;if(n!==200)return Bi.error(t.msg||"请求失败"),Promise.reject(new Error(t.msg||"请求失败"));if(t.code===401){const o=e.config;if(!o._retry){if(bc)return new Promise(r=>{_c.push(s=>{o.headers&&(o.headers.Authorization=`Bearer ${s}`),r(ko(o))})});o._retry=!0,bc=!0;try{const r=await SB();return o.headers&&(o.headers.Authorization=`Bearer ${r}`),_c.forEach(s=>s(r)),_c.length=0,ko(o)}catch(r){return Promise.reject(r)}finally{bc=!1}}}return t.code===0?t.data:(Bi.error(t.msg||"请求失败"),Promise.reject(new Error(t.msg||"请求失败")))},e=>{const t=e.message||"网络错误";return Bi.error(t),Promise.reject(e)});const wr=(e,t)=>ko.get(e,{params:t}),Sr=(e,t,n)=>ko.post(e,t,n),p_=(e,t)=>ko.put(e,t),h_=(e,t)=>ko.delete(e,{params:t}),GL=(e,t)=>ko.post(e,t,{headers:{"Content-Type":"multipart/form-data"}}),CB=e=>wr("/admin/app/page",e),xB=e=>wr("/admin/app/get-app-details",{appId:e}),EB=e=>wr("/admin/app/list",e),QL=e=>Sr("/admin/app/create",e),YL=e=>p_("/admin/app/update",e),XL=e=>h_("/admin/app/delete",e),ep=Symbol("platform"),m_=bf("app",()=>{const e=N([]);return{apps:e,fetchApps:async n=>{const o=await EB({platform:n});e.value=o}}});/*!
./output/user_info_run/2_homepage_after_login.html:100:`+s):o.stack=s}catch{}}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Zr(this.defaults,n);const{transitional:o,paramsSerializer:r,headers:s}=n;o!==void 0&&ul.assertOptions(o,{silentJSONParsing:Jn.transitional(Jn.boolean),forcedJSONParsing:Jn.transitional(Jn.boolean),clarifyTimeoutError:Jn.transitional(Jn.boolean)},!1),r!=null&&(W.isFunction(r)?n.paramsSerializer={serialize:r}:ul.assertOptions(r,{encode:Jn.function,serialize:Jn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ul.assertOptions(n,{baseUrl:Jn.spelling("baseURL"),withXsrfToken:Jn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=s&&W.merge(s.common,s[n.method]);s&&W.forEach(["delete","get","head","post","put","patch","common"],m=>{delete s[m]}),n.headers=gn.concat(i,s);const a=[];let l=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(l=l&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const u=[];this.interceptors.response.forEach(function(g){u.push(g.fulfilled,g.rejected)});let c,d=0,p;if(!l){const m=[mm.bind(this),void 0];for(m.unshift(...a),m.push(...u),p=m.length,c=Promise.resolve(n);d<p;)c=c.then(m[d++],m[d++]);return c}p=a.length;let h=n;for(d=0;d<p;){const m=a[d++],g=a[d++];try{h=m(h)}catch(v){g.call(this,v);break}}try{c=mm.call(this,h)}catch(m){return Promise.reject(m)}for(d=0,p=u.length;d<p;)c=c.then(u[d++],u[d++]);return c}getUri(t){t=Zr(this.defaults,t);const n=n_(t.baseURL,t.url,t.allowAbsoluteUrls);return Xb(n,t.params,t.paramsSerializer)}};W.forEach(["delete","get","head","options"],function(t){Wr.prototype[t]=function(n,o){return this.request(Zr(o||{},{method:t,url:n,data:(o||{}).data}))}});W.forEach(["post","put","patch"],function(t){function n(o){return function(s,i,a){return this.request(Zr(a||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}Wr.prototype[t]=n(),Wr.prototype[t+"Form"]=n(!0)});let AR=class l_{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const o=this;this.promise.then(r=>{if(!o._listeners)return;let s=o._listeners.length;for(;s-- >0;)o._listeners[s](r);o._listeners=null}),this.promise.then=r=>{let s;const i=new Promise(a=>{o.subscribe(a),s=a}).then(r);return i.cancel=function(){o.unsubscribe(s)},i},t(function(s,i,a){o.reason||(o.reason=new ii(s,i,a),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=o=>{t.abort(o)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new l_(function(r){t=r}),cancel:t}}};function OR(e){return function(n){return e.apply(null,n)}}function TR(e){return W.isObject(e)&&e.isAxiosError===!0}const Ud={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ud).forEach(([e,t])=>{Ud[t]=e});function u_(e){const t=new Wr(e),n=Lb(Wr.prototype.request,t);return W.extend(n,Wr.prototype,t,{allOwnKeys:!0}),W.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return u_(Zr(e,r))},n}const xt=u_(Aa);xt.Axios=Wr;xt.CanceledError=ii;xt.CancelToken=AR;xt.isCancel=e_;xt.VERSION=a_;xt.toFormData=Du;xt.AxiosError=Ve;xt.Cancel=xt.CanceledError;xt.all=function(t){return Promise.all(t)};xt.spread=OR;xt.isAxiosError=TR;xt.mergeConfig=Zr;xt.AxiosHeaders=gn;xt.formToJSON=e=>Zb(W.isHTMLForm(e)?new FormData(e):e);xt.getAdapter=i_.getAdapter;xt.HttpStatusCode=Ud;xt.default=xt;const{Axios:DL,AxiosError:RL,CanceledError:BL,isCancel:ML,CancelToken:qL,VERSION:$L,all:FL,Cancel:LL,isAxiosError:NL,spread:jL,toFormData:VL,AxiosHeaders:UL,HttpStatusCode:HL,formToJSON:zL,getAdapter:KL,mergeConfig:WL}=xt;let Hd=1;var PR=class{constructor(){Mt(this,"subscribers");Mt(this,"toasts");Mt(this,"dismissedToasts");Mt(this,"subscribe",e=>(this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}));Mt(this,"publish",e=>{this.subscribers.forEach(t=>t(e))});Mt(this,"addToast",e=>{this.publish(e),this.toasts=[...this.toasts,e]});Mt(this,"create",e=>{var i;const{message:t,...n}=e,o=typeof e.id=="number"||e.id&&((i=e.id)==null?void 0:i.length)>0?e.id:Hd++,r=this.toasts.find(a=>a.id===o),s=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),r?this.toasts=this.toasts.map(a=>a.id===o?(this.publish({...a,...e,id:o,title:t}),{...a,...e,id:o,dismissible:s,title:t}):a):this.addToast({title:t,...n,dismissible:s,id:o}),o});Mt(this,"dismiss",e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),e));Mt(this,"message",(e,t)=>this.create({...t,message:e,type:"default"}));Mt(this,"error",(e,t)=>this.create({...t,type:"error",message:e}));Mt(this,"success",(e,t)=>this.create({...t,type:"success",message:e}));Mt(this,"info",(e,t)=>this.create({...t,type:"info",message:e}));Mt(this,"warning",(e,t)=>this.create({...t,type:"warning",message:e}));Mt(this,"loading",(e,t)=>this.create({...t,type:"loading",message:e}));Mt(this,"promise",(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));const o=Promise.resolve(e instanceof Function?e():e);let r=n!==void 0,s;const i=o.then(async l=>{if(s=["resolve",l],so(l))r=!1,this.create({id:n,type:"default",message:l});else if(IR(l)&&!l.ok){r=!1;const c=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description,h=typeof c=="object"&&!so(c)?c:{message:c||"",id:n||""};this.create({id:n,type:"error",description:d,...h})}else if(l instanceof Error){r=!1;const c=typeof t.error=="function"?await t.error(l):t.error,d=typeof t.description=="function"?await t.description(l):t.description,h=typeof c=="object"&&!so(c)?c:{message:c||"",id:n||""};this.create({id:n,type:"error",description:d,...h})}else if(t.success!==void 0){r=!1;const c=typeof t.success=="function"?await t.success(l):t.success,d=typeof t.description=="function"?await t.description(l):t.description,h=typeof c=="object"&&!so(c)?c:{message:c||"",id:n||""};this.create({id:n,type:"success",description:d,...h})}}).catch(async l=>{if(s=["reject",l],t.error!==void 0){r=!1;const u=typeof t.error=="function"?await t.error(l):t.error,c=typeof t.description=="function"?await t.description(l):t.description,p=typeof u=="object"&&!so(u)?u:{message:u||"",id:n||""};this.create({id:n,type:"error",description:c,...p})}}).finally(()=>{var l;r&&(this.dismiss(n),n=void 0),(l=t.finally)==null||l.call(t)}),a=()=>new Promise((l,u)=>i.then(()=>s[0]==="reject"?u(s[1]):l(s[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})});Mt(this,"custom",(e,t)=>{const n=(t==null?void 0:t.id)||Hd++;return this.publish({component:e,id:n,...t}),n});Mt(this,"getActiveToasts",()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)));this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}};const hn=new PR;function kR(e,t){const n=(t==null?void 0:t.id)||Hd++;return hn.create({message:e,id:n,type:"default",...t}),n}const IR=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",DR=kR,RR=()=>hn.toasts,BR=()=>hn.getActiveToasts(),Bi=Object.assign(DR,{success:hn.success,info:hn.info,warning:hn.warning,error:hn.error,custom:hn.custom,message:hn.message,promise:hn.promise,dismiss:hn.dismiss,loading:hn.loading},{getHistory:RR,getToasts:BR});function Wa(e){return e.label!==void 0}const MR=3,c_="24px",d_="16px",vm=4e3,qR=356,$R=14,FR=45,f_=200;function LR(){const e=N(!1);return ut(()=>{const t=()=>{e.value=document.hidden};return document.addEventListener("visibilitychange",t),()=>window.removeEventListener("visibilitychange",t)}),{isDocumentHidden:e}}function Go(...e){return e.filter(Boolean).join(" ")}function NR(e){const[t,n]=e.split("-"),o=[];return t&&o.push(t),n&&o.push(n),o}function jR(e,t){const n={};return[e,t].forEach((o,r)=>{const s=r===1,i=s?"--mobile-offset":"--offset",a=s?d_:c_;function l(u){["top","right","bottom","left"].forEach(c=>{n[`${i}-${c}`]=typeof u=="number"?`${u}px`:u})}typeof o=="number"||typeof o=="string"?l(o):typeof o=="object"?["top","right","bottom","left"].forEach(u=>{o[u]===void 0?n[`${i}-${u}`]=a:n[`${i}-${u}`]=typeof o[u]=="number"?`${o[u]}px`:o[u]}):l(a)}),n}const VR=["data-rich-colors","data-styled","data-mounted","data-promise","data-swiped","data-removed","data-visible","data-y-position","data-x-position","data-index","data-front","data-swiping","data-dismissible","data-type","data-invert","data-swipe-out","data-swipe-direction","data-expanded"],UR=["aria-label","data-disabled"];var HR=F({__name:"Toast",props:{toast:{},toasts:{},index:{},swipeDirections:{},expanded:{type:Boolean},invert:{type:Boolean},heights:{},gap:{},position:{},visibleToasts:{},expandByDefault:{type:Boolean},closeButton:{type:Boolean},interacting:{type:Boolean},style:{},cancelButtonStyle:{},actionButtonStyle:{},duration:{},class:{},unstyled:{type:Boolean},descriptionClass:{},loadingIcon:{},classes:{},icons:{},closeButtonAriaLabel:{},defaultRichColors:{type:Boolean}},emits:["update:heights","update:height","removeToast"],setup(e,{emit:t}){const n=e,o=t,r=N(null),s=N(null),i=N(!1),a=N(!1),l=N(!1),u=N(!1),c=N(!1),d=N(0),p=N(0),h=N(n.toast.duration||n.duration||vm),m=N(null),g=N(null),v=U(()=>n.index===0),y=U(()=>n.index+1<=n.visibleToasts),b=U(()=>n.toast.type),_=U(()=>n.toast.dismissible!==!1),O=U(()=>n.toast.class||""),T=U(()=>n.descriptionClass||""),A=U(()=>{const x=n.toast.position||n.position,H=n.heights.filter(X=>X.position===x).findIndex(X=>X.toastId===n.toast.id);return H>=0?H:0}),D=U(()=>{const x=n.toast.position||n.position;return n.heights.filter(H=>H.position===x).reduce((H,X,pe)=>pe>=A.value?H:H+X.height,0)}),P=U(()=>A.value*n.gap+D.value||0),w=U(()=>n.toast.closeButton??n.closeButton),k=U(()=>n.toast.duration||n.duration||vm),$=N(0),R=N(0),G=N(null),J=U(()=>n.position.split("-")),ne=U(()=>J.value[0]),ae=U(()=>J.value[1]),re=U(()=>typeof n.toast.title!="string"),L=U(()=>typeof n.toast.description!="string"),{isDocumentHidden:oe}=LR(),Y=U(()=>b.value&&b.value==="loading");je(()=>{i.value=!0,h.value=k.value}),ut(async()=>{if(!i.value||!g.value)return;await We();const x=g.value,z=x.style.height;x.style.height="auto";const H=x.getBoundingClientRect().height;x.style.height=z,p.value=H,o("update:height",{toastId:n.toast.id,height:H,position:n.toast.position||n.position})});function ee(){a.value=!0,d.value=P.value,setTimeout(()=>{o("removeToast",n.toast)},f_)}function le(){var x,z;if(Y.value||!_.value)return{};ee(),(z=(x=n.toast).onDismiss)==null||z.call(x,n.toast)}function ye(x){Y.value||!_.value||(m.value=new Date,d.value=P.value,x.target.setPointerCapture(x.pointerId),x.target.tagName!=="BUTTON"&&(l.value=!0,G.value={x:x.clientX,y:x.clientY}))}function me(){var S,I,j,K,Z,Q,ue;if(u.value||!_.value)return;G.value=null;const x=Number(((S=g.value)==null?void 0:S.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),z=Number(((I=g.value)==null?void 0:I.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),H=new Date().getTime()-(((j=m.value)==null?void 0:j.getTime())||0),X=r.value==="x"?x:z,pe=Math.abs(X)/H;if(Math.abs(X)>=FR||pe>.11){d.value=P.value,(Z=(K=n.toast).onDismiss)==null||Z.call(K,n.toast),r.value==="x"?s.value=x>0?"right":"left":s.value=z>0?"down":"up",ee(),u.value=!0;return}else(Q=g.value)==null||Q.style.setProperty("--swipe-amount-x","0px"),(ue=g.value)==null||ue.style.setProperty("--swipe-amount-y","0px");c.value=!1,l.value=!1,r.value=null}function Pe(x){var j,K,Z,Q;if(!G.value||!_.value||(((K=(j=window==null?void 0:window.getSelection())==null?void 0:j.toString())==null?void 0:K.length)??!1))return;const H=x.clientY-G.value.y,X=x.clientX-G.value.x,pe=n.swipeDirections??NR(n.position);!r.value&&(Math.abs(X)>1||Math.abs(H)>1)&&(r.value=Math.abs(X)>Math.abs(H)?"x":"y");let S={x:0,y:0};const I=ue=>1/(1.5+Math.abs(ue)/20);if(r.value==="y"){if(pe.includes("top")||pe.includes("bottom"))if(pe.includes("top")&&H<0||pe.includes("bottom")&&H>0)S.y=H;else{const ue=H*I(H);S.y=Math.abs(ue)<Math.abs(H)?ue:H}}else if(r.value==="x"&&(pe.includes("left")||pe.includes("right")))if(pe.includes("left")&&X<0||pe.includes("right")&&X>0)S.x=X;else{const ue=X*I(X);S.x=Math.abs(ue)<Math.abs(X)?ue:X}(Math.abs(S.x)>0||Math.abs(S.y)>0)&&(c.value=!0),(Z=g.value)==null||Z.style.setProperty("--swipe-amount-x",`${S.x}px`),(Q=g.value)==null||Q.style.setProperty("--swipe-amount-y",`${S.y}px`)}je(()=>{if(i.value=!0,!g.value)return;const x=g.value.getBoundingClientRect().height;p.value=x;const z=[{toastId:n.toast.id,height:x,position:n.toast.position},...n.heights];o("update:heights",z)}),Ys(()=>{g.value&&o("removeToast",n.toast)}),ut(x=>{if(n.toast.promise&&b.value==="loading"||n.toast.duration===1/0||n.toast.type==="loading")return;let z;const H=()=>{if(R.value<$.value){const pe=new Date().getTime()-$.value;h.value=h.value-pe}R.value=new Date().getTime()},X=()=>{h.value!==1/0&&($.value=new Date().getTime(),z=setTimeout(()=>{var pe,S;(S=(pe=n.toast).onAutoClose)==null||S.call(pe,n.toast),ee()},h.value))};n.expanded||n.interacting||oe.value?H():X(),x(()=>{clearTimeout(z)})}),Ce(()=>n.toast.delete,x=>{x!==void 0&&x&&ee()},{deep:!0});function Se(){l.value=!1,r.value=null,G.value=null}return(x,z)=>{var H,X,pe,S,I,j,K,Z,Q,ue,fe,de,se,xe,ge,Ee,ke,He,tt,Ye,At,mt,$t,Ft,yn,Cr,Bt;return C(),ie("li",{tabindex:"0",ref_key:"toastRef",ref:g,class:qe(f(Go)(n.class,O.value,(H=x.classes)==null?void 0:H.toast,(X=x.toast.classes)==null?void 0:X.toast,(pe=x.classes)==null?void 0:pe[b.value],(I=(S=x.toast)==null?void 0:S.classes)==null?void 0:I[b.value])),"data-sonner-toast":"","data-rich-colors":x.toast.richColors??x.defaultRichColors,"data-styled":!(x.toast.component||(j=x.toast)!=null&&j.unstyled||x.unstyled),"data-mounted":i.value,"data-promise":!!x.toast.promise,"data-swiped":c.value,"data-removed":a.value,"data-visible":y.value,"data-y-position":ne.value,"data-x-position":ae.value,"data-index":x.index,"data-front":v.value,"data-swiping":l.value,"data-dismissible":_.value,"data-type":b.value,"data-invert":x.toast.invert||x.invert,"data-swipe-out":u.value,"data-swipe-direction":s.value,"data-expanded":!!(x.expanded||x.expandByDefault&&i.value),style:Pt({"--index":x.index,"--toasts-before":x.index,"--z-index":x.toasts.length-x.index,"--offset":`${a.value?d.value:P.value}px`,"--initial-height":x.expandByDefault?"auto":`${p.value}px`,...x.style,...n.toast.style}),onDragend:Se,onPointerdown:ye,onPointerup:me,onPointermove:Pe},[w.value&&!x.toast.component&&b.value!=="loading"?(C(),ie("button",{key:0,"aria-label":x.closeButtonAriaLabel||"Close toast","data-disabled":Y.value,"data-close-button":"true",class:qe(f(Go)((K=x.classes)==null?void 0:K.closeButton,(Q=(Z=x.toast)==null?void 0:Z.classes)==null?void 0:Q.closeButton)),onClick:le},[(ue=x.icons)!=null&&ue.close?(C(),B(ro((fe=x.icons)==null?void 0:fe.close),{key:0})):V(x.$slots,"close-icon",{key:1})],10,UR)):Be("v-if",!0),x.toast.component?(C(),B(ro(x.toast.component),te({key:1},x.toast.componentProps,{onCloseToast:le}),null,16)):(C(),ie(Ie,{key:2},[b.value!=="default"||x.toast.icon||x.toast.promise?(C(),ie("div",{key:0,"data-icon":"",class:qe(f(Go)((de=x.classes)==null?void 0:de.icon,(xe=(se=x.toast)==null?void 0:se.classes)==null?void 0:xe.icon))},[x.toast.icon?(C(),B(ro(x.toast.icon),{key:0})):(C(),ie(Ie,{key:1},[b.value==="loading"?V(x.$slots,"loading-icon",{key:0}):b.value==="success"?V(x.$slots,"success-icon",{key:1}):b.value==="error"?V(x.$slots,"error-icon",{key:2}):b.value==="warning"?V(x.$slots,"warning-icon",{key:3}):b.value==="info"?V(x.$slots,"info-icon",{key:4}):Be("v-if",!0)],64))],2)):Be("v-if",!0),ce("div",{"data-content":"",class:qe(f(Go)((ge=x.classes)==null?void 0:ge.content,(ke=(Ee=x.toast)==null?void 0:Ee.classes)==null?void 0:ke.content))},[ce("div",{"data-title":"",class:qe(f(Go)((He=x.classes)==null?void 0:He.title,(tt=x.toast.classes)==null?void 0:tt.title))},[re.value?(C(),B(ro(x.toast.title),ct(te({key:0},x.toast.componentProps)),null,16)):(C(),ie(Ie,{key:1},[rt(Ne(x.toast.title),1)],64))],2),x.toast.description?(C(),ie("div",{key:0,"data-description":"",class:qe(f(Go)(x.descriptionClass,T.value,(Ye=x.classes)==null?void 0:Ye.description,(At=x.toast.classes)==null?void 0:At.description))},[L.value?(C(),B(ro(x.toast.description),ct(te({key:0},x.toast.componentProps)),null,16)):(C(),ie(Ie,{key:1},[rt(Ne(x.toast.description),1)],64))],2)):Be("v-if",!0)],2),x.toast.cancel?(C(),ie("button",{key:1,style:Pt(x.toast.cancelButtonStyle||x.cancelButtonStyle),class:qe(f(Go)((mt=x.classes)==null?void 0:mt.cancelButton,($t=x.toast.classes)==null?void 0:$t.cancelButton)),"data-button":"","data-cancel":"",onClick:z[0]||(z[0]=Lt=>{var Qn,Yn;f(Wa)(x.toast.cancel)&&_.value&&((Yn=(Qn=x.toast.cancel).onClick)==null||Yn.call(Qn,Lt),ee())})},Ne(f(Wa)(x.toast.cancel)?(Ft=x.toast.cancel)==null?void 0:Ft.label:x.toast.cancel),7)):Be("v-if",!0),x.toast.action?(C(),ie("button",{key:2,style:Pt(x.toast.actionButtonStyle||x.actionButtonStyle),class:qe(f(Go)((yn=x.classes)==null?void 0:yn.actionButton,(Cr=x.toast.classes)==null?void 0:Cr.actionButton)),"data-button":"","data-action":"",onClick:z[1]||(z[1]=Lt=>{var Qn,Yn;f(Wa)(x.toast.action)&&((Yn=(Qn=x.toast.action).onClick)==null||Yn.call(Qn,Lt),!Lt.defaultPrevented&&ee())})},Ne(f(Wa)(x.toast.action)?(Bt=x.toast.action)==null?void 0:Bt.label:x.toast.action),7)):Be("v-if",!0)],64))],46,VR)}}}),zR=HR,Oa=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n};const KR={},WR={xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stoke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"};function GR(e,t){return C(),ie("svg",WR,t[0]||(t[0]=[ce("line",{x1:"18",y1:"6",x2:"6",y2:"18"},null,-1),ce("line",{x1:"6",y1:"6",x2:"18",y2:"18"},null,-1)]))}var QR=Oa(KR,[["render",GR]]);const YR=["data-visible"],XR={class:"sonner-spinner"};var JR=F({__name:"Loader",props:{visible:{type:Boolean}},setup(e){const t=Array(12).fill(0);return(n,o)=>(C(),ie("div",{class:"sonner-loading-wrapper","data-visible":n.visible},[ce("div",XR,[(C(!0),ie(Ie,null,wt(f(t),r=>(C(),ie("div",{key:`spinner-bar-${r}`,class:"sonner-loading-bar"}))),128))])],8,YR))}}),ZR=JR;const eB={},tB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function nB(e,t){return C(),ie("svg",tB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z","clip-rule":"evenodd"},null,-1)]))}var oB=Oa(eB,[["render",nB]]);const rB={},sB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function iB(e,t){return C(),ie("svg",sB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z","clip-rule":"evenodd"},null,-1)]))}var aB=Oa(rB,[["render",iB]]);const lB={},uB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"};function cB(e,t){return C(),ie("svg",uB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z","clip-rule":"evenodd"},null,-1)]))}var dB=Oa(lB,[["render",cB]]);const fB={},pB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function hB(e,t){return C(),ie("svg",pB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z","clip-rule":"evenodd"},null,-1)]))}var mB=Oa(fB,[["render",hB]]);const gB=["aria-label"],vB=["data-sonner-theme","dir","data-theme","data-rich-colors","data-y-position","data-x-position","data-lifted"],yB=typeof window<"u"&&typeof document<"u";function bB(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var _B=F({name:"Toaster",inheritAttrs:!1,__name:"Toaster",props:{invert:{type:Boolean,default:!1},theme:{default:"light"},position:{default:"bottom-right"},hotkey:{default:()=>["altKey","KeyT"]},richColors:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},duration:{},gap:{default:$R},visibleToasts:{default:MR},closeButton:{type:Boolean,default:!1},toastOptions:{default:()=>({})},class:{default:""},style:{},offset:{default:c_},mobileOffset:{default:d_},dir:{default:"auto"},swipeDirections:{},icons:{},containerAriaLabel:{default:"Notifications"}},setup(e){const t=e,n=g0(),o=N([]);function r(w,k){return o.value.filter($=>!$.position&&k===0||$.position===w)}const s=U(()=>{const w=o.value.filter(k=>k.position).map(k=>k.position);return w.length>0?Array.from(new Set([t.position].concat(w))):[t.position]}),i=U(()=>{const w={};return s.value.forEach(k=>{w[k]=o.value.filter($=>$.position===k)}),w}),a=N([]),l=N(!1),u=N(!1),c=N(t.theme!=="system"?t.theme:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),d=N(null),p=N(null),h=N(!1),m=t.hotkey.join("+").replace(/Key/g,"").replace(/Digit/g,"");function g(w){var k;(k=o.value.find($=>$.id===w.id))!=null&&k.delete||hn.dismiss(w.id),o.value=o.value.filter(({id:$})=>$!==w.id),setTimeout(()=>{o.value.find($=>$.id===w.id)||(a.value=a.value.filter($=>$.toastId!==w.id))},f_+50)}function v(w){var k,$;h.value&&!(($=(k=w.currentTarget)==null?void 0:k.contains)!=null&&$.call(k,w.relatedTarget))&&(h.value=!1,p.value&&(p.value.focus({preventScroll:!0}),p.value=null))}function y(w){w.target instanceof HTMLElement&&w.target.dataset.dismissible==="false"||h.value||(h.value=!0,p.value=w.relatedTarget)}function b(w){w.target&&w.target instanceof HTMLElement&&w.target.dataset.dismissible==="false"||(u.value=!0)}ut(w=>{const k=hn.subscribe($=>{if($.dismiss){requestAnimationFrame(()=>{o.value=o.value.map(R=>R.id===$.id?{...R,delete:!0}:R)});return}We(()=>{const R=o.value.findIndex(G=>G.id===$.id);R!==-1?o.value=[...o.value.slice(0,R),{...o.value[R],...$},...o.value.slice(R+1)]:o.value=[$,...o.value]})});w(k)}),ut(w=>{if(typeof window>"u")return;if(t.theme!=="system"){c.value=t.theme;return}const k=window.matchMedia("(prefers-color-scheme: dark)"),$=G=>{c.value=G?"dark":"light"};$(k.matches);const R=G=>{$(G.matches)};try{k.addEventListener("change",R)}catch{k.addListener(R)}w(()=>{try{k.removeEventListener("change",R)}catch{k.removeListener(R)}})}),ut(()=>{d.value&&p.value&&(p.value.focus({preventScroll:!0}),p.value=null,h.value=!1)}),ut(()=>{o.value.length<=1&&(l.value=!1)}),ut(w=>{function k($){const R=t.hotkey.every(ne=>$[ne]||$.code===ne),G=Array.isArray(d.value)?d.value[0]:d.value;R&&(l.value=!0,G==null||G.focus());const J=document.activeElement===d.value||(G==null?void 0:G.contains(document.activeElement));$.code==="Escape"&&J&&(l.value=!1)}yB&&(document.addEventListener("keydown",k),w(()=>{document.removeEventListener("keydown",k)}))});function _(){l.value=!0}function O(){u.value||(l.value=!1)}function T(){l.value=!1}function A(){u.value=!1}function D(w){a.value=w}function P(w){const k=a.value.findIndex($=>$.toastId===w.toastId);if(k!==-1)a.value[k]=w;else{const $=a.value.findIndex(R=>R.position===w.position);$!==-1?a.value.splice($,0,w):a.value.unshift(w)}}return(w,k)=>(C(),ie(Ie,null,[Be(" Remove item from normal navigation flow, only available via hotkey "),ce("section",{"aria-label":`${w.containerAriaLabel} ${f(m)}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},[(C(!0),ie(Ie,null,wt(s.value,($,R)=>{var G;return C(),ie("ol",te({key:$,ref_for:!0,ref_key:"listRef",ref:d,"data-sonner-toaster":"","data-sonner-theme":c.value,class:t.class,dir:w.dir==="auto"?bB():w.dir,tabIndex:-1,"data-theme":w.theme,"data-rich-colors":w.richColors,"data-y-position":$.split("-")[0],"data-x-position":$.split("-")[1],"data-lifted":l.value&&o.value.length>1&&!w.expand,style:{"--front-toast-height":`${((G=a.value[0])==null?void 0:G.height)||0}px`,"--width":`${f(qR)}px`,"--gap":`${w.gap}px`,...w.style,...f(n).style,...f(jR)(w.offset,w.mobileOffset)}},w.$attrs,{onBlur:v,onFocus:y,onMouseenter:_,onMousemove:_,onMouseleave:O,onDragend:T,onPointerdown:b,onPointerup:A}),[(C(!0),ie(Ie,null,wt(r($,R),(J,ne)=>{var ae,re,L,oe,Y,ee,le,ye,me,Pe;return C(),B(zR,{key:J.id,heights:a.value,icons:w.icons,index:ne,toast:J,defaultRichColors:w.richColors,duration:((ae=w.toastOptions)==null?void 0:ae.duration)??w.duration,class:qe(((re=w.toastOptions)==null?void 0:re.class)??""),descriptionClass:(L=w.toastOptions)==null?void 0:L.descriptionClass,invert:w.invert,visibleToasts:w.visibleToasts,closeButton:((oe=w.toastOptions)==null?void 0:oe.closeButton)??w.closeButton,interacting:u.value,position:$,style:Pt((Y=w.toastOptions)==null?void 0:Y.style),unstyled:(ee=w.toastOptions)==null?void 0:ee.unstyled,classes:(le=w.toastOptions)==null?void 0:le.classes,cancelButtonStyle:(ye=w.toastOptions)==null?void 0:ye.cancelButtonStyle,actionButtonStyle:(me=w.toastOptions)==null?void 0:me.actionButtonStyle,"close-button-aria-label":(Pe=w.toastOptions)==null?void 0:Pe.closeButtonAriaLabel,toasts:i.value[$],expandByDefault:w.expand,gap:w.gap,expanded:l.value,swipeDirections:t.swipeDirections,"onUpdate:heights":D,"onUpdate:height":P,onRemoveToast:g},{"close-icon":E(()=>[V(w.$slots,"close-icon",{},()=>[q(QR)])]),"loading-icon":E(()=>[V(w.$slots,"loading-icon",{},()=>[q(ZR,{visible:J.type==="loading"},null,8,["visible"])])]),"success-icon":E(()=>[V(w.$slots,"success-icon",{},()=>[q(oB)])]),"error-icon":E(()=>[V(w.$slots,"error-icon",{},()=>[q(mB)])]),"warning-icon":E(()=>[V(w.$slots,"warning-icon",{},()=>[q(dB)])]),"info-icon":E(()=>[V(w.$slots,"info-icon",{},()=>[q(aB)])]),_:2},1032,["heights","icons","index","toast","defaultRichColors","duration","class","descriptionClass","invert","visibleToasts","closeButton","interacting","position","style","unstyled","classes","cancelButtonStyle","actionButtonStyle","close-button-aria-label","toasts","expandByDefault","gap","expanded","swipeDirections"])}),128))],16,vB)}),128))],8,gB)],2112))}}),wB=_B;const ko=xt.create({baseURL:"https://api.beenglish.eu.org/DesignScreenshot/admin-api",timeout:12e4,headers:{"Content-Type":"application/json"}});let bc=!1;const _c=[],SB=async()=>{try{const e=localStorage.getItem("refreshToken");if(!e)throw new Error("No refresh token found");const t=await xt.post(`/system/auth/refresh-token?refreshToken=${e}`),{token:n,refreshToken:o}=t.data;return localStorage.setItem("accessToken",n),localStorage.setItem("refreshToken",o),n}catch(e){return localStorage.removeItem("accessToken"),localStorage.removeItem("refreshToken"),window.location.href="/auth",Promise.reject(e)}};ko.interceptors.request.use(e=>{const t=localStorage.getItem("accessToken");return t&&e.headers&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e));ko.interceptors.response.use(async e=>{const{data:t,status:n}=e;if(n!==200)return Bi.error(t.msg||"请求失败"),Promise.reject(new Error(t.msg||"请求失败"));if(t.code===401){const o=e.config;if(!o._retry){if(bc)return new Promise(r=>{_c.push(s=>{o.headers&&(o.headers.Authorization=`Bearer ${s}`),r(ko(o))})});o._retry=!0,bc=!0;try{const r=await SB();return o.headers&&(o.headers.Authorization=`Bearer ${r}`),_c.forEach(s=>s(r)),_c.length=0,ko(o)}catch(r){return Promise.reject(r)}finally{bc=!1}}}return t.code===0?t.data:(Bi.error(t.msg||"请求失败"),Promise.reject(new Error(t.msg||"请求失败")))},e=>{const t=e.message||"网络错误";return Bi.error(t),Promise.reject(e)});const wr=(e,t)=>ko.get(e,{params:t}),Sr=(e,t,n)=>ko.post(e,t,n),p_=(e,t)=>ko.put(e,t),h_=(e,t)=>ko.delete(e,{params:t}),GL=(e,t)=>ko.post(e,t,{headers:{"Content-Type":"multipart/form-data"}}),CB=e=>wr("/admin/app/page",e),xB=e=>wr("/admin/app/get-app-details",{appId:e}),EB=e=>wr("/admin/app/list",e),QL=e=>Sr("/admin/app/create",e),YL=e=>p_("/admin/app/update",e),XL=e=>h_("/admin/app/delete",e),ep=Symbol("platform"),m_=bf("app",()=>{const e=N([]);return{apps:e,fetchApps:async n=>{const o=await EB({platform:n});e.value=o}}});/*!
./output/user_info_run/1_login_page.html:100:`+s):o.stack=s}catch{}}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Zr(this.defaults,n);const{transitional:o,paramsSerializer:r,headers:s}=n;o!==void 0&&ul.assertOptions(o,{silentJSONParsing:Jn.transitional(Jn.boolean),forcedJSONParsing:Jn.transitional(Jn.boolean),clarifyTimeoutError:Jn.transitional(Jn.boolean)},!1),r!=null&&(W.isFunction(r)?n.paramsSerializer={serialize:r}:ul.assertOptions(r,{encode:Jn.function,serialize:Jn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ul.assertOptions(n,{baseUrl:Jn.spelling("baseURL"),withXsrfToken:Jn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=s&&W.merge(s.common,s[n.method]);s&&W.forEach(["delete","get","head","post","put","patch","common"],m=>{delete s[m]}),n.headers=gn.concat(i,s);const a=[];let l=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(l=l&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const u=[];this.interceptors.response.forEach(function(g){u.push(g.fulfilled,g.rejected)});let c,d=0,p;if(!l){const m=[mm.bind(this),void 0];for(m.unshift(...a),m.push(...u),p=m.length,c=Promise.resolve(n);d<p;)c=c.then(m[d++],m[d++]);return c}p=a.length;let h=n;for(d=0;d<p;){const m=a[d++],g=a[d++];try{h=m(h)}catch(v){g.call(this,v);break}}try{c=mm.call(this,h)}catch(m){return Promise.reject(m)}for(d=0,p=u.length;d<p;)c=c.then(u[d++],u[d++]);return c}getUri(t){t=Zr(this.defaults,t);const n=n_(t.baseURL,t.url,t.allowAbsoluteUrls);return Xb(n,t.params,t.paramsSerializer)}};W.forEach(["delete","get","head","options"],function(t){Wr.prototype[t]=function(n,o){return this.request(Zr(o||{},{method:t,url:n,data:(o||{}).data}))}});W.forEach(["post","put","patch"],function(t){function n(o){return function(s,i,a){return this.request(Zr(a||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}Wr.prototype[t]=n(),Wr.prototype[t+"Form"]=n(!0)});let AR=class l_{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const o=this;this.promise.then(r=>{if(!o._listeners)return;let s=o._listeners.length;for(;s-- >0;)o._listeners[s](r);o._listeners=null}),this.promise.then=r=>{let s;const i=new Promise(a=>{o.subscribe(a),s=a}).then(r);return i.cancel=function(){o.unsubscribe(s)},i},t(function(s,i,a){o.reason||(o.reason=new ii(s,i,a),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=o=>{t.abort(o)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new l_(function(r){t=r}),cancel:t}}};function OR(e){return function(n){return e.apply(null,n)}}function TR(e){return W.isObject(e)&&e.isAxiosError===!0}const Ud={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ud).forEach(([e,t])=>{Ud[t]=e});function u_(e){const t=new Wr(e),n=Lb(Wr.prototype.request,t);return W.extend(n,Wr.prototype,t,{allOwnKeys:!0}),W.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return u_(Zr(e,r))},n}const xt=u_(Aa);xt.Axios=Wr;xt.CanceledError=ii;xt.CancelToken=AR;xt.isCancel=e_;xt.VERSION=a_;xt.toFormData=Du;xt.AxiosError=Ve;xt.Cancel=xt.CanceledError;xt.all=function(t){return Promise.all(t)};xt.spread=OR;xt.isAxiosError=TR;xt.mergeConfig=Zr;xt.AxiosHeaders=gn;xt.formToJSON=e=>Zb(W.isHTMLForm(e)?new FormData(e):e);xt.getAdapter=i_.getAdapter;xt.HttpStatusCode=Ud;xt.default=xt;const{Axios:DL,AxiosError:RL,CanceledError:BL,isCancel:ML,CancelToken:qL,VERSION:$L,all:FL,Cancel:LL,isAxiosError:NL,spread:jL,toFormData:VL,AxiosHeaders:UL,HttpStatusCode:HL,formToJSON:zL,getAdapter:KL,mergeConfig:WL}=xt;let Hd=1;var PR=class{constructor(){Mt(this,"subscribers");Mt(this,"toasts");Mt(this,"dismissedToasts");Mt(this,"subscribe",e=>(this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}));Mt(this,"publish",e=>{this.subscribers.forEach(t=>t(e))});Mt(this,"addToast",e=>{this.publish(e),this.toasts=[...this.toasts,e]});Mt(this,"create",e=>{var i;const{message:t,...n}=e,o=typeof e.id=="number"||e.id&&((i=e.id)==null?void 0:i.length)>0?e.id:Hd++,r=this.toasts.find(a=>a.id===o),s=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),r?this.toasts=this.toasts.map(a=>a.id===o?(this.publish({...a,...e,id:o,title:t}),{...a,...e,id:o,dismissible:s,title:t}):a):this.addToast({title:t,...n,dismissible:s,id:o}),o});Mt(this,"dismiss",e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),e));Mt(this,"message",(e,t)=>this.create({...t,message:e,type:"default"}));Mt(this,"error",(e,t)=>this.create({...t,type:"error",message:e}));Mt(this,"success",(e,t)=>this.create({...t,type:"success",message:e}));Mt(this,"info",(e,t)=>this.create({...t,type:"info",message:e}));Mt(this,"warning",(e,t)=>this.create({...t,type:"warning",message:e}));Mt(this,"loading",(e,t)=>this.create({...t,type:"loading",message:e}));Mt(this,"promise",(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));const o=Promise.resolve(e instanceof Function?e():e);let r=n!==void 0,s;const i=o.then(async l=>{if(s=["resolve",l],so(l))r=!1,this.create({id:n,type:"default",message:l});else if(IR(l)&&!l.ok){r=!1;const c=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description,h=typeof c=="object"&&!so(c)?c:{message:c||"",id:n||""};this.create({id:n,type:"error",description:d,...h})}else if(l instanceof Error){r=!1;const c=typeof t.error=="function"?await t.error(l):t.error,d=typeof t.description=="function"?await t.description(l):t.description,h=typeof c=="object"&&!so(c)?c:{message:c||"",id:n||""};this.create({id:n,type:"error",description:d,...h})}else if(t.success!==void 0){r=!1;const c=typeof t.success=="function"?await t.success(l):t.success,d=typeof t.description=="function"?await t.description(l):t.description,h=typeof c=="object"&&!so(c)?c:{message:c||"",id:n||""};this.create({id:n,type:"success",description:d,...h})}}).catch(async l=>{if(s=["reject",l],t.error!==void 0){r=!1;const u=typeof t.error=="function"?await t.error(l):t.error,c=typeof t.description=="function"?await t.description(l):t.description,p=typeof u=="object"&&!so(u)?u:{message:u||"",id:n||""};this.create({id:n,type:"error",description:c,...p})}}).finally(()=>{var l;r&&(this.dismiss(n),n=void 0),(l=t.finally)==null||l.call(t)}),a=()=>new Promise((l,u)=>i.then(()=>s[0]==="reject"?u(s[1]):l(s[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})});Mt(this,"custom",(e,t)=>{const n=(t==null?void 0:t.id)||Hd++;return this.publish({component:e,id:n,...t}),n});Mt(this,"getActiveToasts",()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)));this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}};const hn=new PR;function kR(e,t){const n=(t==null?void 0:t.id)||Hd++;return hn.create({message:e,id:n,type:"default",...t}),n}const IR=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",DR=kR,RR=()=>hn.toasts,BR=()=>hn.getActiveToasts(),Bi=Object.assign(DR,{success:hn.success,info:hn.info,warning:hn.warning,error:hn.error,custom:hn.custom,message:hn.message,promise:hn.promise,dismiss:hn.dismiss,loading:hn.loading},{getHistory:RR,getToasts:BR});function Wa(e){return e.label!==void 0}const MR=3,c_="24px",d_="16px",vm=4e3,qR=356,$R=14,FR=45,f_=200;function LR(){const e=N(!1);return ut(()=>{const t=()=>{e.value=document.hidden};return document.addEventListener("visibilitychange",t),()=>window.removeEventListener("visibilitychange",t)}),{isDocumentHidden:e}}function Go(...e){return e.filter(Boolean).join(" ")}function NR(e){const[t,n]=e.split("-"),o=[];return t&&o.push(t),n&&o.push(n),o}function jR(e,t){const n={};return[e,t].forEach((o,r)=>{const s=r===1,i=s?"--mobile-offset":"--offset",a=s?d_:c_;function l(u){["top","right","bottom","left"].forEach(c=>{n[`${i}-${c}`]=typeof u=="number"?`${u}px`:u})}typeof o=="number"||typeof o=="string"?l(o):typeof o=="object"?["top","right","bottom","left"].forEach(u=>{o[u]===void 0?n[`${i}-${u}`]=a:n[`${i}-${u}`]=typeof o[u]=="number"?`${o[u]}px`:o[u]}):l(a)}),n}const VR=["data-rich-colors","data-styled","data-mounted","data-promise","data-swiped","data-removed","data-visible","data-y-position","data-x-position","data-index","data-front","data-swiping","data-dismissible","data-type","data-invert","data-swipe-out","data-swipe-direction","data-expanded"],UR=["aria-label","data-disabled"];var HR=F({__name:"Toast",props:{toast:{},toasts:{},index:{},swipeDirections:{},expanded:{type:Boolean},invert:{type:Boolean},heights:{},gap:{},position:{},visibleToasts:{},expandByDefault:{type:Boolean},closeButton:{type:Boolean},interacting:{type:Boolean},style:{},cancelButtonStyle:{},actionButtonStyle:{},duration:{},class:{},unstyled:{type:Boolean},descriptionClass:{},loadingIcon:{},classes:{},icons:{},closeButtonAriaLabel:{},defaultRichColors:{type:Boolean}},emits:["update:heights","update:height","removeToast"],setup(e,{emit:t}){const n=e,o=t,r=N(null),s=N(null),i=N(!1),a=N(!1),l=N(!1),u=N(!1),c=N(!1),d=N(0),p=N(0),h=N(n.toast.duration||n.duration||vm),m=N(null),g=N(null),v=U(()=>n.index===0),y=U(()=>n.index+1<=n.visibleToasts),b=U(()=>n.toast.type),_=U(()=>n.toast.dismissible!==!1),O=U(()=>n.toast.class||""),T=U(()=>n.descriptionClass||""),A=U(()=>{const x=n.toast.position||n.position,H=n.heights.filter(X=>X.position===x).findIndex(X=>X.toastId===n.toast.id);return H>=0?H:0}),D=U(()=>{const x=n.toast.position||n.position;return n.heights.filter(H=>H.position===x).reduce((H,X,pe)=>pe>=A.value?H:H+X.height,0)}),P=U(()=>A.value*n.gap+D.value||0),w=U(()=>n.toast.closeButton??n.closeButton),k=U(()=>n.toast.duration||n.duration||vm),$=N(0),R=N(0),G=N(null),J=U(()=>n.position.split("-")),ne=U(()=>J.value[0]),ae=U(()=>J.value[1]),re=U(()=>typeof n.toast.title!="string"),L=U(()=>typeof n.toast.description!="string"),{isDocumentHidden:oe}=LR(),Y=U(()=>b.value&&b.value==="loading");je(()=>{i.value=!0,h.value=k.value}),ut(async()=>{if(!i.value||!g.value)return;await We();const x=g.value,z=x.style.height;x.style.height="auto";const H=x.getBoundingClientRect().height;x.style.height=z,p.value=H,o("update:height",{toastId:n.toast.id,height:H,position:n.toast.position||n.position})});function ee(){a.value=!0,d.value=P.value,setTimeout(()=>{o("removeToast",n.toast)},f_)}function le(){var x,z;if(Y.value||!_.value)return{};ee(),(z=(x=n.toast).onDismiss)==null||z.call(x,n.toast)}function ye(x){Y.value||!_.value||(m.value=new Date,d.value=P.value,x.target.setPointerCapture(x.pointerId),x.target.tagName!=="BUTTON"&&(l.value=!0,G.value={x:x.clientX,y:x.clientY}))}function me(){var S,I,j,K,Z,Q,ue;if(u.value||!_.value)return;G.value=null;const x=Number(((S=g.value)==null?void 0:S.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),z=Number(((I=g.value)==null?void 0:I.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),H=new Date().getTime()-(((j=m.value)==null?void 0:j.getTime())||0),X=r.value==="x"?x:z,pe=Math.abs(X)/H;if(Math.abs(X)>=FR||pe>.11){d.value=P.value,(Z=(K=n.toast).onDismiss)==null||Z.call(K,n.toast),r.value==="x"?s.value=x>0?"right":"left":s.value=z>0?"down":"up",ee(),u.value=!0;return}else(Q=g.value)==null||Q.style.setProperty("--swipe-amount-x","0px"),(ue=g.value)==null||ue.style.setProperty("--swipe-amount-y","0px");c.value=!1,l.value=!1,r.value=null}function Pe(x){var j,K,Z,Q;if(!G.value||!_.value||(((K=(j=window==null?void 0:window.getSelection())==null?void 0:j.toString())==null?void 0:K.length)??!1))return;const H=x.clientY-G.value.y,X=x.clientX-G.value.x,pe=n.swipeDirections??NR(n.position);!r.value&&(Math.abs(X)>1||Math.abs(H)>1)&&(r.value=Math.abs(X)>Math.abs(H)?"x":"y");let S={x:0,y:0};const I=ue=>1/(1.5+Math.abs(ue)/20);if(r.value==="y"){if(pe.includes("top")||pe.includes("bottom"))if(pe.includes("top")&&H<0||pe.includes("bottom")&&H>0)S.y=H;else{const ue=H*I(H);S.y=Math.abs(ue)<Math.abs(H)?ue:H}}else if(r.value==="x"&&(pe.includes("left")||pe.includes("right")))if(pe.includes("left")&&X<0||pe.includes("right")&&X>0)S.x=X;else{const ue=X*I(X);S.x=Math.abs(ue)<Math.abs(X)?ue:X}(Math.abs(S.x)>0||Math.abs(S.y)>0)&&(c.value=!0),(Z=g.value)==null||Z.style.setProperty("--swipe-amount-x",`${S.x}px`),(Q=g.value)==null||Q.style.setProperty("--swipe-amount-y",`${S.y}px`)}je(()=>{if(i.value=!0,!g.value)return;const x=g.value.getBoundingClientRect().height;p.value=x;const z=[{toastId:n.toast.id,height:x,position:n.toast.position},...n.heights];o("update:heights",z)}),Ys(()=>{g.value&&o("removeToast",n.toast)}),ut(x=>{if(n.toast.promise&&b.value==="loading"||n.toast.duration===1/0||n.toast.type==="loading")return;let z;const H=()=>{if(R.value<$.value){const pe=new Date().getTime()-$.value;h.value=h.value-pe}R.value=new Date().getTime()},X=()=>{h.value!==1/0&&($.value=new Date().getTime(),z=setTimeout(()=>{var pe,S;(S=(pe=n.toast).onAutoClose)==null||S.call(pe,n.toast),ee()},h.value))};n.expanded||n.interacting||oe.value?H():X(),x(()=>{clearTimeout(z)})}),Ce(()=>n.toast.delete,x=>{x!==void 0&&x&&ee()},{deep:!0});function Se(){l.value=!1,r.value=null,G.value=null}return(x,z)=>{var H,X,pe,S,I,j,K,Z,Q,ue,fe,de,se,xe,ge,Ee,ke,He,tt,Ye,At,mt,$t,Ft,yn,Cr,Bt;return C(),ie("li",{tabindex:"0",ref_key:"toastRef",ref:g,class:qe(f(Go)(n.class,O.value,(H=x.classes)==null?void 0:H.toast,(X=x.toast.classes)==null?void 0:X.toast,(pe=x.classes)==null?void 0:pe[b.value],(I=(S=x.toast)==null?void 0:S.classes)==null?void 0:I[b.value])),"data-sonner-toast":"","data-rich-colors":x.toast.richColors??x.defaultRichColors,"data-styled":!(x.toast.component||(j=x.toast)!=null&&j.unstyled||x.unstyled),"data-mounted":i.value,"data-promise":!!x.toast.promise,"data-swiped":c.value,"data-removed":a.value,"data-visible":y.value,"data-y-position":ne.value,"data-x-position":ae.value,"data-index":x.index,"data-front":v.value,"data-swiping":l.value,"data-dismissible":_.value,"data-type":b.value,"data-invert":x.toast.invert||x.invert,"data-swipe-out":u.value,"data-swipe-direction":s.value,"data-expanded":!!(x.expanded||x.expandByDefault&&i.value),style:Pt({"--index":x.index,"--toasts-before":x.index,"--z-index":x.toasts.length-x.index,"--offset":`${a.value?d.value:P.value}px`,"--initial-height":x.expandByDefault?"auto":`${p.value}px`,...x.style,...n.toast.style}),onDragend:Se,onPointerdown:ye,onPointerup:me,onPointermove:Pe},[w.value&&!x.toast.component&&b.value!=="loading"?(C(),ie("button",{key:0,"aria-label":x.closeButtonAriaLabel||"Close toast","data-disabled":Y.value,"data-close-button":"true",class:qe(f(Go)((K=x.classes)==null?void 0:K.closeButton,(Q=(Z=x.toast)==null?void 0:Z.classes)==null?void 0:Q.closeButton)),onClick:le},[(ue=x.icons)!=null&&ue.close?(C(),B(ro((fe=x.icons)==null?void 0:fe.close),{key:0})):V(x.$slots,"close-icon",{key:1})],10,UR)):Be("v-if",!0),x.toast.component?(C(),B(ro(x.toast.component),te({key:1},x.toast.componentProps,{onCloseToast:le}),null,16)):(C(),ie(Ie,{key:2},[b.value!=="default"||x.toast.icon||x.toast.promise?(C(),ie("div",{key:0,"data-icon":"",class:qe(f(Go)((de=x.classes)==null?void 0:de.icon,(xe=(se=x.toast)==null?void 0:se.classes)==null?void 0:xe.icon))},[x.toast.icon?(C(),B(ro(x.toast.icon),{key:0})):(C(),ie(Ie,{key:1},[b.value==="loading"?V(x.$slots,"loading-icon",{key:0}):b.value==="success"?V(x.$slots,"success-icon",{key:1}):b.value==="error"?V(x.$slots,"error-icon",{key:2}):b.value==="warning"?V(x.$slots,"warning-icon",{key:3}):b.value==="info"?V(x.$slots,"info-icon",{key:4}):Be("v-if",!0)],64))],2)):Be("v-if",!0),ce("div",{"data-content":"",class:qe(f(Go)((ge=x.classes)==null?void 0:ge.content,(ke=(Ee=x.toast)==null?void 0:Ee.classes)==null?void 0:ke.content))},[ce("div",{"data-title":"",class:qe(f(Go)((He=x.classes)==null?void 0:He.title,(tt=x.toast.classes)==null?void 0:tt.title))},[re.value?(C(),B(ro(x.toast.title),ct(te({key:0},x.toast.componentProps)),null,16)):(C(),ie(Ie,{key:1},[rt(Ne(x.toast.title),1)],64))],2),x.toast.description?(C(),ie("div",{key:0,"data-description":"",class:qe(f(Go)(x.descriptionClass,T.value,(Ye=x.classes)==null?void 0:Ye.description,(At=x.toast.classes)==null?void 0:At.description))},[L.value?(C(),B(ro(x.toast.description),ct(te({key:0},x.toast.componentProps)),null,16)):(C(),ie(Ie,{key:1},[rt(Ne(x.toast.description),1)],64))],2)):Be("v-if",!0)],2),x.toast.cancel?(C(),ie("button",{key:1,style:Pt(x.toast.cancelButtonStyle||x.cancelButtonStyle),class:qe(f(Go)((mt=x.classes)==null?void 0:mt.cancelButton,($t=x.toast.classes)==null?void 0:$t.cancelButton)),"data-button":"","data-cancel":"",onClick:z[0]||(z[0]=Lt=>{var Qn,Yn;f(Wa)(x.toast.cancel)&&_.value&&((Yn=(Qn=x.toast.cancel).onClick)==null||Yn.call(Qn,Lt),ee())})},Ne(f(Wa)(x.toast.cancel)?(Ft=x.toast.cancel)==null?void 0:Ft.label:x.toast.cancel),7)):Be("v-if",!0),x.toast.action?(C(),ie("button",{key:2,style:Pt(x.toast.actionButtonStyle||x.actionButtonStyle),class:qe(f(Go)((yn=x.classes)==null?void 0:yn.actionButton,(Cr=x.toast.classes)==null?void 0:Cr.actionButton)),"data-button":"","data-action":"",onClick:z[1]||(z[1]=Lt=>{var Qn,Yn;f(Wa)(x.toast.action)&&((Yn=(Qn=x.toast.action).onClick)==null||Yn.call(Qn,Lt),!Lt.defaultPrevented&&ee())})},Ne(f(Wa)(x.toast.action)?(Bt=x.toast.action)==null?void 0:Bt.label:x.toast.action),7)):Be("v-if",!0)],64))],46,VR)}}}),zR=HR,Oa=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n};const KR={},WR={xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stoke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"};function GR(e,t){return C(),ie("svg",WR,t[0]||(t[0]=[ce("line",{x1:"18",y1:"6",x2:"6",y2:"18"},null,-1),ce("line",{x1:"6",y1:"6",x2:"18",y2:"18"},null,-1)]))}var QR=Oa(KR,[["render",GR]]);const YR=["data-visible"],XR={class:"sonner-spinner"};var JR=F({__name:"Loader",props:{visible:{type:Boolean}},setup(e){const t=Array(12).fill(0);return(n,o)=>(C(),ie("div",{class:"sonner-loading-wrapper","data-visible":n.visible},[ce("div",XR,[(C(!0),ie(Ie,null,wt(f(t),r=>(C(),ie("div",{key:`spinner-bar-${r}`,class:"sonner-loading-bar"}))),128))])],8,YR))}}),ZR=JR;const eB={},tB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function nB(e,t){return C(),ie("svg",tB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z","clip-rule":"evenodd"},null,-1)]))}var oB=Oa(eB,[["render",nB]]);const rB={},sB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function iB(e,t){return C(),ie("svg",sB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z","clip-rule":"evenodd"},null,-1)]))}var aB=Oa(rB,[["render",iB]]);const lB={},uB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"};function cB(e,t){return C(),ie("svg",uB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z","clip-rule":"evenodd"},null,-1)]))}var dB=Oa(lB,[["render",cB]]);const fB={},pB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function hB(e,t){return C(),ie("svg",pB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z","clip-rule":"evenodd"},null,-1)]))}var mB=Oa(fB,[["render",hB]]);const gB=["aria-label"],vB=["data-sonner-theme","dir","data-theme","data-rich-colors","data-y-position","data-x-position","data-lifted"],yB=typeof window<"u"&&typeof document<"u";function bB(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var _B=F({name:"Toaster",inheritAttrs:!1,__name:"Toaster",props:{invert:{type:Boolean,default:!1},theme:{default:"light"},position:{default:"bottom-right"},hotkey:{default:()=>["altKey","KeyT"]},richColors:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},duration:{},gap:{default:$R},visibleToasts:{default:MR},closeButton:{type:Boolean,default:!1},toastOptions:{default:()=>({})},class:{default:""},style:{},offset:{default:c_},mobileOffset:{default:d_},dir:{default:"auto"},swipeDirections:{},icons:{},containerAriaLabel:{default:"Notifications"}},setup(e){const t=e,n=g0(),o=N([]);function r(w,k){return o.value.filter($=>!$.position&&k===0||$.position===w)}const s=U(()=>{const w=o.value.filter(k=>k.position).map(k=>k.position);return w.length>0?Array.from(new Set([t.position].concat(w))):[t.position]}),i=U(()=>{const w={};return s.value.forEach(k=>{w[k]=o.value.filter($=>$.position===k)}),w}),a=N([]),l=N(!1),u=N(!1),c=N(t.theme!=="system"?t.theme:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),d=N(null),p=N(null),h=N(!1),m=t.hotkey.join("+").replace(/Key/g,"").replace(/Digit/g,"");function g(w){var k;(k=o.value.find($=>$.id===w.id))!=null&&k.delete||hn.dismiss(w.id),o.value=o.value.filter(({id:$})=>$!==w.id),setTimeout(()=>{o.value.find($=>$.id===w.id)||(a.value=a.value.filter($=>$.toastId!==w.id))},f_+50)}function v(w){var k,$;h.value&&!(($=(k=w.currentTarget)==null?void 0:k.contains)!=null&&$.call(k,w.relatedTarget))&&(h.value=!1,p.value&&(p.value.focus({preventScroll:!0}),p.value=null))}function y(w){w.target instanceof HTMLElement&&w.target.dataset.dismissible==="false"||h.value||(h.value=!0,p.value=w.relatedTarget)}function b(w){w.target&&w.target instanceof HTMLElement&&w.target.dataset.dismissible==="false"||(u.value=!0)}ut(w=>{const k=hn.subscribe($=>{if($.dismiss){requestAnimationFrame(()=>{o.value=o.value.map(R=>R.id===$.id?{...R,delete:!0}:R)});return}We(()=>{const R=o.value.findIndex(G=>G.id===$.id);R!==-1?o.value=[...o.value.slice(0,R),{...o.value[R],...$},...o.value.slice(R+1)]:o.value=[$,...o.value]})});w(k)}),ut(w=>{if(typeof window>"u")return;if(t.theme!=="system"){c.value=t.theme;return}const k=window.matchMedia("(prefers-color-scheme: dark)"),$=G=>{c.value=G?"dark":"light"};$(k.matches);const R=G=>{$(G.matches)};try{k.addEventListener("change",R)}catch{k.addListener(R)}w(()=>{try{k.removeEventListener("change",R)}catch{k.removeListener(R)}})}),ut(()=>{d.value&&p.value&&(p.value.focus({preventScroll:!0}),p.value=null,h.value=!1)}),ut(()=>{o.value.length<=1&&(l.value=!1)}),ut(w=>{function k($){const R=t.hotkey.every(ne=>$[ne]||$.code===ne),G=Array.isArray(d.value)?d.value[0]:d.value;R&&(l.value=!0,G==null||G.focus());const J=document.activeElement===d.value||(G==null?void 0:G.contains(document.activeElement));$.code==="Escape"&&J&&(l.value=!1)}yB&&(document.addEventListener("keydown",k),w(()=>{document.removeEventListener("keydown",k)}))});function _(){l.value=!0}function O(){u.value||(l.value=!1)}function T(){l.value=!1}function A(){u.value=!1}function D(w){a.value=w}function P(w){const k=a.value.findIndex($=>$.toastId===w.toastId);if(k!==-1)a.value[k]=w;else{const $=a.value.findIndex(R=>R.position===w.position);$!==-1?a.value.splice($,0,w):a.value.unshift(w)}}return(w,k)=>(C(),ie(Ie,null,[Be(" Remove item from normal navigation flow, only available via hotkey "),ce("section",{"aria-label":`${w.containerAriaLabel} ${f(m)}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},[(C(!0),ie(Ie,null,wt(s.value,($,R)=>{var G;return C(),ie("ol",te({key:$,ref_for:!0,ref_key:"listRef",ref:d,"data-sonner-toaster":"","data-sonner-theme":c.value,class:t.class,dir:w.dir==="auto"?bB():w.dir,tabIndex:-1,"data-theme":w.theme,"data-rich-colors":w.richColors,"data-y-position":$.split("-")[0],"data-x-position":$.split("-")[1],"data-lifted":l.value&&o.value.length>1&&!w.expand,style:{"--front-toast-height":`${((G=a.value[0])==null?void 0:G.height)||0}px`,"--width":`${f(qR)}px`,"--gap":`${w.gap}px`,...w.style,...f(n).style,...f(jR)(w.offset,w.mobileOffset)}},w.$attrs,{onBlur:v,onFocus:y,onMouseenter:_,onMousemove:_,onMouseleave:O,onDragend:T,onPointerdown:b,onPointerup:A}),[(C(!0),ie(Ie,null,wt(r($,R),(J,ne)=>{var ae,re,L,oe,Y,ee,le,ye,me,Pe;return C(),B(zR,{key:J.id,heights:a.value,icons:w.icons,index:ne,toast:J,defaultRichColors:w.richColors,duration:((ae=w.toastOptions)==null?void 0:ae.duration)??w.duration,class:qe(((re=w.toastOptions)==null?void 0:re.class)??""),descriptionClass:(L=w.toastOptions)==null?void 0:L.descriptionClass,invert:w.invert,visibleToasts:w.visibleToasts,closeButton:((oe=w.toastOptions)==null?void 0:oe.closeButton)??w.closeButton,interacting:u.value,position:$,style:Pt((Y=w.toastOptions)==null?void 0:Y.style),unstyled:(ee=w.toastOptions)==null?void 0:ee.unstyled,classes:(le=w.toastOptions)==null?void 0:le.classes,cancelButtonStyle:(ye=w.toastOptions)==null?void 0:ye.cancelButtonStyle,actionButtonStyle:(me=w.toastOptions)==null?void 0:me.actionButtonStyle,"close-button-aria-label":(Pe=w.toastOptions)==null?void 0:Pe.closeButtonAriaLabel,toasts:i.value[$],expandByDefault:w.expand,gap:w.gap,expanded:l.value,swipeDirections:t.swipeDirections,"onUpdate:heights":D,"onUpdate:height":P,onRemoveToast:g},{"close-icon":E(()=>[V(w.$slots,"close-icon",{},()=>[q(QR)])]),"loading-icon":E(()=>[V(w.$slots,"loading-icon",{},()=>[q(ZR,{visible:J.type==="loading"},null,8,["visible"])])]),"success-icon":E(()=>[V(w.$slots,"success-icon",{},()=>[q(oB)])]),"error-icon":E(()=>[V(w.$slots,"error-icon",{},()=>[q(mB)])]),"warning-icon":E(()=>[V(w.$slots,"warning-icon",{},()=>[q(dB)])]),"info-icon":E(()=>[V(w.$slots,"info-icon",{},()=>[q(aB)])]),_:2},1032,["heights","icons","index","toast","defaultRichColors","duration","class","descriptionClass","invert","visibleToasts","closeButton","interacting","position","style","unstyled","classes","cancelButtonStyle","actionButtonStyle","close-button-aria-label","toasts","expandByDefault","gap","expanded","swipeDirections"])}),128))],16,vB)}),128))],8,gB)],2112))}}),wB=_B;const ko=xt.create({baseURL:"https://api.beenglish.eu.org/DesignScreenshot/admin-api",timeout:12e4,headers:{"Content-Type":"application/json"}});let bc=!1;const _c=[],SB=async()=>{try{const e=localStorage.getItem("refreshToken");if(!e)throw new Error("No refresh token found");const t=await xt.post(`/system/auth/refresh-token?refreshToken=${e}`),{token:n,refreshToken:o}=t.data;return localStorage.setItem("accessToken",n),localStorage.setItem("refreshToken",o),n}catch(e){return localStorage.removeItem("accessToken"),localStorage.removeItem("refreshToken"),window.location.href="/auth",Promise.reject(e)}};ko.interceptors.request.use(e=>{const t=localStorage.getItem("accessToken");return t&&e.headers&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e));ko.interceptors.response.use(async e=>{const{data:t,status:n}=e;if(n!==200)return Bi.error(t.msg||"请求失败"),Promise.reject(new Error(t.msg||"请求失败"));if(t.code===401){const o=e.config;if(!o._retry){if(bc)return new Promise(r=>{_c.push(s=>{o.headers&&(o.headers.Authorization=`Bearer ${s}`),r(ko(o))})});o._retry=!0,bc=!0;try{const r=await SB();return o.headers&&(o.headers.Authorization=`Bearer ${r}`),_c.forEach(s=>s(r)),_c.length=0,ko(o)}catch(r){return Promise.reject(r)}finally{bc=!1}}}return t.code===0?t.data:(Bi.error(t.msg||"请求失败"),Promise.reject(new Error(t.msg||"请求失败")))},e=>{const t=e.message||"网络错误";return Bi.error(t),Promise.reject(e)});const wr=(e,t)=>ko.get(e,{params:t}),Sr=(e,t,n)=>ko.post(e,t,n),p_=(e,t)=>ko.put(e,t),h_=(e,t)=>ko.delete(e,{params:t}),GL=(e,t)=>ko.post(e,t,{headers:{"Content-Type":"multipart/form-data"}}),CB=e=>wr("/admin/app/page",e),xB=e=>wr("/admin/app/get-app-details",{appId:e}),EB=e=>wr("/admin/app/list",e),QL=e=>Sr("/admin/app/create",e),YL=e=>p_("/admin/app/update",e),XL=e=>h_("/admin/app/delete",e),ep=Symbol("platform"),m_=bf("app",()=>{const e=N([]);return{apps:e,fetchApps:async n=>{const o=await EB({platform:n});e.value=o}}});/*!
./src/main/resources/application-test.yaml:2:  port: 7778
./src/main/resources/application-dev.yaml:2:  port: 7778
./src/main/resources/code-generation-rules.yaml:252:  workspace_path: "F:\fxsb\DesignScreenshot"  # 项目根目录路径
./src/main/resources/data-validation-rules.yaml:3:  workspace_path: "F:\fxsb\DesignScreenshot"  # 项目根目录路径
./user_data/pkcs11.txt:3:parameters=configdir='sql:F:\\fxsb\\DesignScreenshot\\user_data' certPrefix='' keyPrefix='' secmod='secmod.db' flags=optimizeSpace updatedir='' updateCertPrefix='' updateKeyPrefix='' updateid='' updateTokenDescription='' 
./project_config.md:34:    - **服务端口:** `server.port` 配置为 `7778`。
./project_config.md:52:2.  确保端口 `7778` 未被占用。
./project_config.md:64:curl -X POST http://localhost:7778/admin-api/automations/perform \
./conversation_log.md:53:*   在尝试通过 `mvn spring-boot:run` 启动应用时，遇到了端口 `7778` 被占用的错误。
./file/android/duolingo.json:1010:        "hotspotWidth": 0.912091187778916,
./file/web/duolingo.json:8374:        "hotspotHeight": 0.0982846777879341,
./file/iOS/telegram.json:451:        "hotspotHeight": 0.0577786912047732,
./file/iOS/telegram.json:4152:        "hotspotY": 0.143283607777786,
./file/iOS/telegram.json:7940:        "screenId": "b216356f-3510-4d85-b7c7-ad4a87778f25",
./rust-backend/src/main.rs:79:        "https://mini.beenglish.eu.org,https://beenglish.eu.org,https://api.beenglish.eu.org,http://localhost:5173,http://127.0.0.1:5173,http://100.64.0.2:8083".into()
./rust-backend/src/main.rs:113:    // and Caddy is the only public entry point.
./rust-backend/src/main.rs:1127:    let port:u16=env::var("PORT").ok().and_then(|v|v.parse().ok()).unwrap_or(7778);
./rust-backend/src/main.rs:1172:    let addr=SocketAddr::new(bind_ip,port); info!(%addr,admin_username=%configured_admin_username,allowlist_enabled,allowlist_entries,"DesignScreenshot Rust API starting"); let listener=tokio::net::TcpListener::bind(addr).await?; axum::serve(listener,app.into_make_service_with_connect_info::<SocketAddr>()).with_graceful_shutdown(async{let _=tokio::signal::ctrl_c().await;}).await?; Ok(())
./rust-backend/Cargo.lock:1258:checksum = "e058c7de0b26af77780c769414d6257830bb240f3c38477dbc2c16e5f54d6d4c"
./rust-backend/README.md:1:# DesignScreenshot Rust API
./rust-backend/README.md:14:Copy `.env.example` to `/root/DesignScreenshot/.env.rust` on the server and set `DATABASE_URL` and `ADMIN_PASSWORD`. The deployment script validates these values before stopping the running service.
./rust-backend/README.md:24:- `PORT`: HTTP port, default `7778`.
./rust-backend/README.md:41:The Rust service currently implements the API surface used by `DesignScreenshotVue`: a single configured administrator login and token refresh, user info, apps, app details, app categories, app sections, screens, favorites, app-info creation, and file URL upload. Registration, Penpot, and social-login endpoints are intentionally not exposed.
./rust-backend/README.md:54:- Production binds Rust to loopback only. Caddy overwrites `X-Forwarded-For`/`X-Real-IP`, and the IP allowlist middleware trusts those headers only from a loopback peer, preventing direct clients from spoofing proxy headers.
./file/iOS/duolingo.json:11795:        "hotspotY": 0.542697777814711,
./pom.xml:12:    <artifactId>DesignScreenshot</artifactId>
./pom.xml:14:    <name>DesignScreenshot</name>
./pom.xml:15:    <description>DesignScreenshot</description>
./pom.xml:424:                <mainClass>com.fxsb.designscreenshot.DesignScreenshotApplication</mainClass>
./sql/postgresql/design-screenshot.sql:1530:INSERT INTO "public"."system_oauth2_refresh_token" VALUES (488249351225349, 488204372488197, '284f65dc589c4cfd9d52630ba9377782', 1, 'default', NULL, NULL, '2023-12-07 17:51:43', NULL, '2023-11-30 17:51:43', NULL, '2023-11-30 17:51:43', 0);
./processID.sh:4:echo "Starting DesignScreenshot Rust service..."
./processID.sh:6:CODE_PATH="/root/DesignScreenshot"
./processID.sh:12:LOG_PATH="/root/logs/DesignScreenshot-rust.log"
./processID.sh:13:PING_URL="http://127.0.0.1:7778/health"
./processID.sh:52:  pkill -f "DesignScreenshot.jar" 2>/dev/null || true
./processID.sh:57:  while pgrep -f "${RUN_BINARY}" >/dev/null 2>&1 || pgrep -f "DesignScreenshot.jar" >/dev/null 2>&1; do
./processID.sh:61:      pkill -9 -f "DesignScreenshot.jar" 2>/dev/null || true
./processID.sh:88:echo "DesignScreenshot Rust service started successfully. PID=${APP_PID}"
./sql/mysql/design-screenshot.sql:944:INSERT INTO `system_oauth2_access_token` VALUES (488249351229445, 488204372488197, 1, 'a06b2486c9e34e9280476df5c56dfb4e', NULL, '284f65dc589c4cfd9d52630ba9377782', 'default', NULL, '2023-11-30 22:51:43', NULL, '2023-11-30 17:51:43', NULL, '2023-11-30 17:51:43', b'0');
./sql/mysql/design-screenshot.sql:1377:INSERT INTO `system_oauth2_refresh_token` VALUES (488249351225349, 488204372488197, '284f65dc589c4cfd9d52630ba9377782', 1, 'default', NULL, NULL, '2023-12-07 17:51:43', NULL, '2023-11-30 17:51:43', NULL, '2023-11-30 17:51:43', b'0');

--- deploy workflow ---
name: Deploy DesignScreenshot Rust API

on:
  push:
    branches: [master]

jobs:
  build:
    runs-on: arm
    container:
      image: catthehacker/ubuntu:act-latest
    env:
      RUNNER_TOOL_CACHE: /toolcache
      CARGO_HOME: /toolcache/cargo
      CARGO_TARGET_DIR: /toolcache/design-screenshot-target
    steps:
      - uses: actions/checkout@v4

      - name: Install Rust 1.89
        uses: dtolnay/rust-toolchain@1.89.0

      - name: Build release binary
        working-directory: rust-backend
        run: cargo build --release --locked

      - name: Stage release binary
        run: cp "${CARGO_TARGET_DIR}/release/design-screenshot-api" rust-backend/design-screenshot-api

      - name: Upload startup script
        uses: up9cloud/action-rsync@master
        env:
          USER: root
          HOST: 144.24.60.0
          KEY: ${{secrets.USAARMLOGIN_SSH_KEY}}
          SOURCE: ./processID.sh
          TARGET: /root/DesignScreenshot/
          ARGS: -az --exclude=/.git/
          SSH_ARGS: "-p 22 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
          VERBOSE: true

      - name: Upload Rust binary and restart
        uses: up9cloud/action-rsync@master
        env:
          USER: root
          HOST: 144.24.60.0
          KEY: ${{secrets.USAARMLOGIN_SSH_KEY}}
          SOURCE: rust-backend/design-screenshot-api
          TARGET: /root/DesignScreenshot/target/
          ARGS: -az
          SSH_ARGS: "-p 22 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
          VERBOSE: true
          POST_SCRIPT: |
            cd /root/DesignScreenshot/
            chmod +x ./processID.sh ./target/design-screenshot-api
            ./processID.sh
