1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="84f3c36a-dc36-50b2-93cf-1a3536e80315")}catch(e){}}(); 3import{c as x,j as R,a as j}from"./query-client-Db26lpf9.js";import{a as vt}from"./colorMode-Cxdri96c.js";import{n as xt}from"./X.es-D9OlAykS.js";import{O as Et,az as bt,ac as It,ae as St,au as K,aA as Pt,aB as ot,Q as w,m as Rt,W as Mt,r as q,aC as Ot,as as wt,ay as Ct,aD as H,a as Dt,x as D,y as _,a1 as kt,a0 as at,t as nt,a2 as ct,aE as z,aF as At,aG as Ft}from"./index.es5-CLo5NeoE.js";import{a as Nt,T as X}from"./button-BMs0znqD.js";import{S as _t}from"./stack-DnyKiET0.js";import{a as Gt}from"./icon-CI_sFJfH.js";import{H as Wt}from"./h-stack-mI2egpfG.js";import{r as O}from"./chunk-62JRHF6Z-DtXrgJCW.js";import{c as Ht}from"./create-slot-recipe-context-Cq2nnnE6.js";import{c as Ut}from"./factory-B_cS-oen.js";import{t as Lt}from"./dismissable-layer-BTcmXS8Q.js";var Vt=Object.defineProperty,lt=t=>{throw TypeError(t)},$t=(t,e,r)=>e in t?Vt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,M=(t,e,r)=>$t(t,typeof e!="symbol"?e+"":e,r),Bt=(t,e,r)=>e.has(t)||lt("Cannot "+r),Q=(t,e,r)=>(Bt(t,e,"read from private field"),e.get(t)),jt=(t,e,r)=>e.has(t)?lt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),U=()=>performance.now(),L,Kt=class{constructor(t){this.onTick=t,M(this,"frameId",null),M(this,"pausedAtMs",null),M(this,"context"),M(this,"cancelFrame",()=>{this.frameId!==null&&(cancelAnimationFrame(this.frameId),this.frameId=null)}),M(this,"setStartMs",e=>{this.context.startMs=e}),M(this,"start",()=>{if(this.frameId!==null)return;const e=U();this.pausedAtMs!==null?(this.context.startMs+=e-this.pausedAtMs,this.pausedAtMs=null):this.context.startMs=e,this.frameId=requestAnimationFrame(Q(this,L))}),M(this,"pause",()=>{this.frameId!==null&&(this.cancelFrame(),this.pausedAtMs=U())}),M(this,"stop",()=>{this.frameId!==null&&(this.cancelFrame(),this.pausedAtMs=null)}),jt(this,L,e=>{if(this.context.now=e,this.context.deltaMs=e-this.context.startMs,this.onTick(this.context)===!1){this.stop();return}this.frameId=requestAnimationFrame(Q(this,L))}),this.context={now:0,startMs:U(),deltaMs:0}}get elapsedMs(){return this.pausedAtMs!==null?this.pausedAtMs-this.context.startMs:U()-this.context.startMs}};L=new WeakMap;function $(t,e){const r=new Kt(({deltaMs:s})=>{if(s>=e)return t(),!1});return r.start(),()=>r.stop()}var qt=Et("toast").parts("group","root","title","description","actionTrigger","closeTrigger"),C=qt.build(),zt=t=>`toast-group:${t}`,Y=(t,e)=>t.getById(`toast-group:${e}`),ut=t=>`toast:${t.id}`,Z=t=>t.getById(ut(t)),J=t=>`toast:${t.id}:title`,tt=t=>`toast:${t.id}:description`,Xt=t=>`toast${t.id}:close`,et={info:5e3,error:5e3,success:2e3,loading:1/0,DEFAULT:5e3};function B(t,e){return t??et[e]??et.DEFAULT}var Qt=t=>typeof t=="string"?{left:t,right:t,bottom:t,top:t}:t;function Yt(t,e){var b;const{prop:r,computed:s,context:i}=t,{offsets:n,gap:c}=r("store").attrs,l=i.get("heights"),u=Qt(n),p=r("dir")==="rtl",d=e.replace("-start",p?"-right":"-left").replace("-end",p?"-left":"-right"),g=d.includes("right"),y=d.includes("left"),f={position:"fixed",pointerEvents:s("count")>0?void 0:"none",display:"flex",flexDirection:"column","--gap":`${c}px`,"--first-height":`${((b=l[0])==null?void 0:b.height)||0}px`,"--viewport-offset-left":u.left,"--viewport-offset-right":u.right,"--viewport-offset-top":u.top,"--viewport-offset-bottom":u.bottom,zIndex:bt};let h="center";if(g&&(h="flex-end"),y&&(h="flex-start"),f.alignItems=h,d.includes("top")){const v=u.top;f.top=`max(env(safe-area-inset-top, 0px), ${v})`}if(d.includes("bottom")){const v=u.bottom;f.bottom=`max(env(safe-area-inset-bottom, 0px), ${v})`}if(!d.includes("left")){const v=u.right;f.insetInlineEnd=`calc(env(safe-area-inset-right, 0px) + ${v})`}if(!d.includes("right")){const v=u.left;f.insetInlineStart=`calc(env(safe-area-inset-left, 0px) + ${v})`}return f}function Zt(t,e){const{prop:r,context:s,computed:i}
vendor: 4,932 bytes, line 3
3=t,n=r("parent"),c=n.computed("placement"),{gap:l}=n.prop("store").attrs,[u]=c.split("-"),p=s.get("mounted"),d=s.get("remainingTime"),g=i("height"),y=i("frontmost"),f=!y,h=!r("stacked"),b=r("stacked"),I=r("type")==="loading"?Number.MAX_SAFE_INTEGER:d,G=i("heightIndex")*l+i("heightBefore"),A={position:"absolute",pointerEvents:"auto","--opacity":"0","--remove-delay":`${r("removeDelay")}ms`,"--duration":`${I}ms`,"--initial-height":`${g}px`,"--offset":`${G}px`,"--index":r("index"),"--z-index":i("zIndex"),"--lift-amount":"calc(var(--lift) * var(--gap))","--y":"100%","--x":"0"},m=F=>Object.assign(A,F);return u==="top"?m({top:"0","--sign":"-1","--y":"-100%","--lift":"1"}):u==="bottom"&&m({bottom:"0","--sign":"1","--y":"100%","--lift":"-1"}),p&&(m({"--y":"0","--opacity":"1"}),b&&m({"--y":"calc(var(--lift) * var(--offset))","--height":"var(--initial-height)"})),e||m({"--opacity":"0",pointerEvents:"none"}),f&&h&&(m({"--base-scale":"var(--index) * 0.05 + 1","--y":"calc(var(--lift-amount) * var(--index))","--scale":"calc(-1 * var(--base-scale))","--height":"var(--first-height)"}),e||m({"--y":"calc(var(--sign) * 40%)"})),f&&b&&!e&&m({"--y":"calc(var(--lift) * var(--offset) + var(--lift) * -100%)"}),y&&!e&&m({"--y":"calc(var(--lift) * -100%)"}),A}function Jt(t,e){const{computed:r}=t,s={position:"absolute",inset:"0",scale:"1 2",pointerEvents:e?"none":"auto"},i=n=>Object.assign(s,n);return r("frontmost")&&!e&&i({height:"calc(var(--initial-height) + 80%)"}),s}function te(){return{position:"absolute",left:"0",height:"calc(var(--gap) + 2px)",bottom:"100%",width:"100%"}}function ee(t,e){const{context:r,prop:s,send:i,refs:n,computed:c}=t;return{getCount(){return r.get("toasts").length},getToasts(){return r.get("toasts")},getGroupProps(l={}){const{label:u="Notifications"}=l,{hotkey:p}=s("store").attrs,d=p.join("+").replace(/Key/g,"").replace(/Digit/g,""),g=c("placement"),[y,f="center"]=g.split("-");return e.element({...C.group.attrs,dir:s("dir"),tabIndex:-1,"aria-label":`${g} ${u} ${d}`,id:zt(g),"data-placement":g,"data-side":y,"data-align":f,"aria-live":"polite",role:"region",style:Yt(t,g),onMouseEnter(){n.get("ignoreMouseTimer").isActive()||i({type:"REGION.POINTER_ENTER",placement:g})},onMouseMove(){n.get("ignoreMouseTimer").isActive()||i({type:"REGION.POINTER_ENTER",placement:g})},onMouseLeave(){n.get("ignoreMouseTimer").isActive()||i({type:"REGION.POINTER_LEAVE",placement:g})},onFocus(h){i({type:"REGION.FOCUS",target:h.relatedTarget})},onBlur(h){n.get("isFocusWithin")&&!It(h.currentTarget,h.relatedTarget)&&queueMicrotask(()=>i({type:"REGION.BLUR"}))}})},subscribe(l){return s("store").subscribe(()=>l(r.get("toasts")))}}}var{guards:se,createMachine:re}=St(),{and:ie}=se,oe=re({props({props:t}){return{dir:"ltr",id:ot(),...t,store:t.store}},initialState({prop:t}){return t("store").attrs.overlap?"overlap":"stack"},refs(){return{lastFocusedEl:null,isFocusWithin:!1,isPointerWithin:!1,ignoreMouseTimer:Pt.create(),dismissableCleanup:void 0}},context({bindable:t}){return{toasts:t(()=>({defaultValue:[],sync:!0,hash:e=>e.map(r=>r.id).join(",")})),heights:t(()=>({defaultValue:[],sync:!0}))}},computed:{count:({context:t})=>t.get("toasts").length,overlap:({prop:t})=>t("store").attrs.overlap,placement:({prop:t})=>t("store").attrs.placement},effects:["subscribeToStore","trackDocumentVisibility","trackHotKeyPress"],watch({track:t,context:e,action:r}){t([()=>e.hash("toasts")],()=>{queueMicrotask(()=>{r(["collapsedIfEmpty","setDismissableBranch"])})})},exit:["clearDismissableBranch","clearLastFocusedEl","clearMouseEventTimer"],on:{"DOC.HOTKEY":{actions:["focusRegionEl"]},"REGION.BLUR":[{guard:ie("isOverlapping","isPointerOut"),target:"overlap",actions:["collapseToasts","resumeToasts","restoreFocusIfPointerOut"]},{guard:"isPointerOut",target:"stack",actions:["resumeToasts","restoreFocusIfPointerOut"]},{actions:["clearFocusWithin"]}],"TOAST.REMOVE":{actions:["removeToast","removeHeight","ignoreMouseEventsTemporarily"]},"TOAST.PAUSE":{actions:["pauseToasts"]}},states:{stack:{on:{"REGION.POINTER_LEAVE":[{guard:"isOverlapping",target:"overlap",actions:["clearPointerWithin","resumeToasts","collapseToasts"]},{actions:["clearPointerWithin","resumeToasts"]}],"REGION.OVERLAP":{target:"overlap",actions:["collapseToasts"]},"REGION.FOCUS":{actions:["setLastFocusedEl","pauseToasts"]},"REGION.POINTER_ENTER":{actions:["setPointerWithin","pauseToasts"]}}},overlap:{on:{"REGION.STACK":{target:"stack",actions:["expandToasts"]},"REGION.POINTER_ENTER":{target:"stack",actions:["setPointerWithin","pauseToasts","expandToasts"]},"REGION.FOCUS":{target:"stack",actions:["setLastFocusedEl","pauseToasts","expandToasts"]}}}},implementations:{guards:{isOverlapping:({computed:t})=>t("overlap"),isPointerOut:({refs:t})=>!t.get("isPointerWithin")},effects:{subscribeToStore({context:t,prop:e}){const r=e("store");return t.set("toasts",r.getVisibleToasts()),r.subscribe(s=>{if(s.dismiss){t.set("toasts",i=>i.filter(n=>
3n.id!==s.id));return}t.set("toasts",i=>{const n=i.findIndex(c=>c.id===s.id);return n!==-1?[...i.slice(0,n),{...i[n],...s},...i.slice(n+1)]:[s,...i]})})},trackHotKeyPress({prop:t,send:e}){return K(document,"keydown",s=>{const{hotkey:i}=t("store").attrs;i.every(c=>s[c]||s.code===c)&&e({type:"DOC.HOTKEY"})},{capture:!0})},trackDocumentVisibility({prop:t,send:e,scope:r}){const{pauseOnPageIdle:s}=t("store").attrs;if(!s)return;const i=r.getDoc();return K(i,"visibilitychange",()=>{const n=i.visibilityState==="hidden";e({type:n?"PAUSE_ALL":"RESUME_ALL"})})}},actions:{setDismissableBranch({refs:t,context:e,computed:r,scope:s}){var p;const i=e.get("toasts"),n=r("placement"),c=i.length>0;if(!c){(p=t.get("dismissableCleanup"))==null||p();return}if(c&&t.get("dismissableCleanup"))return;const u=Lt(()=>Y(s,n),{defer:!0});t.set("dismissableCleanup",u)},clearDismissableBranch({refs:t}){var e;(e=t.get("dismissableCleanup"))==null||e()},focusRegionEl({scope:t,computed:e}){queueMicrotask(()=>{var r;(r=Y(t,e("placement")))==null||r.focus()})},pauseToasts({prop:t}){t("store").pause()},resumeToasts({prop:t}){t("store").resume()},expandToasts({prop:t}){t("store").expand()},collapseToasts({prop:t}
3){t("store").collapse()},removeToast({prop:t,event:e}){t("store").remove(e.id)},removeHeight({event:t,context:e}){(t==null?void 0:t.id)!=null&&queueMicrotask(()=>{e.set("heights",r=>r.filter(s=>s.id!==t.id))})},collapsedIfEmpty({send:t,computed:e}){!e("overlap")||e("count")>1||t({type:"REGION.OVERLAP"})},setLastFocusedEl({refs:t,event:e}){t.get("isFocusWithin")||!e.target||(t.set("isFocusWithin",!0),t.set("lastFocusedEl",e.target))},restoreFocusIfPointerOut({refs:t}){var e;!t.get("lastFocusedEl")||t.get("isPointerWithin")||((e=t.get("lastFocusedEl"))==null||e.focus({preventScroll:!0}),t.set("lastFocusedEl",null),t.set("isFocusWithin",!1))},setPointerWithin({refs:t}){t.set("isPointerWithin",!0)},clearPointerWithin({refs:t}){var e;t.set("isPointerWithin",!1),t.get("lastFocusedEl")&&!t.get("isFocusWithin")&&((e=t.get("lastFocusedEl"))==null||e.focus({preventScroll:!0}),t.set("lastFocusedEl",null))},clearFocusWithin({refs:t}){t.set("isFocusWithin",!1)},clearLastFocusedEl({refs:t}){var e;t.get("lastFocusedEl")&&((e=t.get("lastFocusedEl"))==null||e.focus({preventScroll:!0}),t.set("lastFocusedEl",null),t.set("isFocusWithin",!1))},ignoreMouseEventsTemporarily({refs:t}){t.get("ignoreMouseTimer").request()},clearMouseEventTimer({refs:t}){t.get("ignoreMouseTimer").cancel()}}}});function ae(t,e){const{state:r,send:s,prop:i,scope:n,context:c,computed:l}=t,u=r.hasTag("visible"),p=r.hasTag("paused"),d=c.get("mounted"),g=l("frontmost"),y=i("parent").computed("placement"),f=i("type"),h=i("stacked"),b=i("title"),v=i("description"),I=i("action"),[G,A="center"]=y.split("-");return{type:f,title:b,description:v,placement:y,visible:u,paused:p,closable:!!i("closable"),pause(){s({type:"PAUSE"})},resume(){s({type:"RESUME"})},dismiss(){s({type:"DISMISS",src:"programmatic"})},getRootProps(){return e.element({...C.root.attrs,dir:i("dir"),id:ut(n),"data-state":u?"open":"closed","data-type":f,"data-placement":y,"data-align":A,"data-side":G,"data-mounted":w(d),"data-paused":w(p),"data-first":w(g),"data-sibling":w(!g),"data-stack":w(h),"data-overlap":w(!h),role:"status","aria-atomic":"true","aria-describedby":v?tt(n):void 0,"aria-labelledby":b?J(n):void 0,tabIndex:0,style:Zt(t,u),onKeyDown(m){m.defaultPrevented||m.key=="Escape"&&(s({type:"DISMISS",src:"keyboard"}),m.preventDefault())}})},getGhostBeforeProps(){return e.element({"data-ghost":"before",style:Jt(t,u)})},getGhostAfterProps(){return e.element({"data-ghost":"after",style:te()})},getTitleProps(){return e.element({...C.title.attrs,id:J(n)})},getDescriptionProps(){return e.element({...C.description.attrs,id:tt(n)})},getActionTriggerProps(){return e.button({...C.actionTrigger.attrs,type:"button",onClick(m){var F;m.defaultPrevented||((F=I==null?void 0:I.onClick)==null||F.call(I),s({type:"DISMISS",src:"user"}))}})},getCloseTriggerProps(){return e.button({id:Xt(n),...C.closeTrigger.attrs,type:"button","aria-label":"Dismiss notification",onClick(m){m.defaultPrevented||s({type:"DISMISS",src:"user"})}})}}}var{not:ne}=Mt(),ce=Rt({props({props:t}){return Ot(t,["id","type","parent","removeDelay"],"toast"),{closable:!0,...t,duration:B(t.duration,t.type)}},initialState({prop:t}){return t("type")==="loading"||t("duration")===1/0?"visible:persist":"visible"},context({prop:t,bindable:e}){return{remainingTime:e(()=>({defaultValue:B(t("duration"),t("type"))})),createdAt:e(()=>({defaultValue:Date.now()})),mounted:e(()=>({defaultValue:!1})),initialHeight:e(()=>({defaultValue:0}))}},refs(){return{closeTimerStartTime:Date.now(),lastCloseStartTimerStartTime:0}},computed:{zIndex:({prop:t})=>{const e=t("parent").context.get("toasts"),r=e.findIndex(s=>s.id===t("id"));return e.length-r},height:({prop:t})=>{const r=t("parent").context.get("heights").find(s=>s.id===t("id"));return(r==null?void 0:r.height)??0},heightIndex:({prop:t})=>t("parent").context.get("heights").findIndex(r=>
vendor: 1,387 bytes, line 3
3r.id===t("id")),frontmost:({prop:t})=>t("index")===0,heightBefore:({prop:t})=>{const e=t("parent").context.get("heights"),r=e.findIndex(s=>s.id===t("id"));return e.reduce((s,i,n)=>n>=r?s:s+i.height,0)},shouldPersist:({prop:t})=>t("type")==="loading"||t("duration")===1/0},watch({track:t,prop:e,send:r}){t([()=>e("message")],()=>{const s=e("message");s&&r({type:s,src:"programmatic"})}),t([()=>e("type"),()=>e("duration")],()=>{r({type:"UPDATE"})})},on:{UPDATE:[{guard:"shouldPersist",target:"visible:persist",actions:["resetCloseTimer"]},{target:"visible:updating",actions:["resetCloseTimer"]}],MEASURE:{actions:["measureHeight"]}},entry:["setMounted","measureHeight","invokeOnVisible"],effects:["trackHeight"],states:{"visible:updating":{tags:["visible","updating"],effects:["waitForNextTick"],on:{SHOW:{target:"visible"}}},"visible:persist":{tags:["visible","paused"],on:{RESUME:{guard:ne("isLoadingType"),target:"visible",actions:["setCloseTimer"]},DISMISS:{target:"dismissing"}}},visible:{tags:["visible"],effects:["waitForDuration"],on:{DISMISS:{target:"dismissing"},PAUSE:{target:"visible:persist",actions:["syncRemainingTime"]}}},dismissing:{entry:["invokeOnDismiss"],effects:["waitForRemoveDelay"],on:{REMOVE:{target:"unmounted",actions:["notifyParentToRemove"]}}},unmounted:{entry:["invokeOnUnmount"]}},implementations:{effects:{waitForRemoveDelay({prop:t,send:e}){return $(()=>
3{e({type:"REMOVE",src:"timer"})},t("removeDelay"))},waitForDuration({send:t,context:e,computed:r}){if(!r("shouldPersist"))return $(()=>{t({type:"DISMISS",src:"timer"})},e.get("remainingTime"))},waitForNextTick({send:t}){return $(()=>{t({type:"SHOW",src:"timer"})},0)},trackHeight({scope:t,prop:e}){let r;return q(()=>{const s=Z(t);if(!s)return;const i=()=>{const l=s.style.height;s.style.height="auto";const u=s.getBoundingClientRect().height;s.style.height=l;const p={id:e("id"),height:u};st(e("parent"),p)},n=t.getWin(),c=new n.MutationObserver(i);c.observe(s,{childList:!0,subtree:!0,characterData:!0}),r=()=>c.disconnect()}),()=>r==null?void 0:r()}},guards:{isLoadingType:({prop:t})=>t("type")==="loading",shouldPersist:({computed:t})=>t("shouldPersist")},actions:{setMounted({context:t}){q(()=>{t.set("mounted",!0)})},measureHeight({scope:t,prop:e,context:r}){queueMicrotask(()=>{const s=Z(t);if(!s)return;const i=s.style.height;s.style.height="auto";const n=s.getBoundingClientRect().height;s.style.height=i,r.set("initialHeight",n);const c={id:e("id"),height:n};st(e("parent"),c)})},setCloseTimer({refs:t}){t.set("closeTimerStartTime",Date.now())},resetCloseTimer({context:t,refs:e,prop:r}){e.set("closeTimerStartTime",Date.now()),t.set("remainingTime",B(r("duration"),r("type")))},syncRemainingTime({context:t,refs:e}){t.set("remainingTime",r=>{const s=e.get("closeTimerStartTime"),i=Date.now()-s;return e.set("lastCloseStartTimerStartTime",Date.now()),r-i})},notifyParentToRemove({prop:t}){t("parent").send({type:"TOAST.REMOVE",id:t("id")})},invokeOnDismiss({prop:t,event:e}){var r;(r=t("onStatusChange"))==null||r({status:"dismissing",src:e.src})},invokeOnUnmount({prop:t}){var e;(e=t("onStatusChange"))==null||e({status:"unmounted"})},invokeOnVisible({prop:t}){var e;(e=t("onStatusChange"))==null||e({status:"visible"})}}}});function st(t,e){const{id:r,height:s}=e;t.context.set("heights",i=>i.find(c=>c.id===r)?i.map(c=>c.id===r?{...c,height:s}:c):[{id:r,height:s},...i])}var le=(t,e)=>({...e,...wt(t)});function ue(t={}){const e=le(t,{placement:"bottom",overlap:!1,max:24,gap:16,offsets:"1rem",hotkey:["altKey","KeyT"],removeDelay:200,pauseOnPageIdle:!0});let r=[],s=[],i=new Set,n=[];const c=o=>(r.push(o),()=>{const a=r.indexOf(o);r.splice(a,1)}),l=o=>(r.forEach(a=>a(o)),o),u=o=>{if(s.length>=e.max){n.push(o);return}l(o),s.unshift(o)},p=()=>{for(;n.length>0&&s.length<e.max;){const o=n.shift();o&&(l(o),s.unshift(o))}},d=o=>{const a=o.id??`toast:${ot()}`,S=s.find(E=>E.id===a);return i.has(a)&&i.delete(a),S?s=s.map(E=>E.id===a?l({...E,...o,id:a}):E):u({id:a,duration:e.duration,removeDelay:e.removeDelay,type:"info",...o,stacked:!e.overlap,gap:e.gap}),a},g=o=>(i.add(o),o?(r.forEach(a=>a({id:o,dismiss:!0})),s=s.filter(a=>a.id!==o),p()):(s.forEach(a=>{r.forEach(S=>S({id:a.id,dismiss:!0}))}),s=[],n=[]),o);return{attrs:e,subscribe:c,create:d,update:(o,a)=>d({id:o,...a}),remove:g,dismiss:o=>{o!=null?s=s.map(a=>a.id===o?l({...a,message:"DISMISS"}):a):s=s.map(a=>l({...a,message:"DISMISS"}))},error:o=>d({...o,type:"error"}),success:o=>d({...o,type:"success"}),info:o=>d({...o,type:"info"}),warning:o=>d({...o,type:"warning"}),loading:o=>d({...o,type:"loading"}),getVisibleToasts:()=>s.filter(o=>!i.has(o.id)),getCount:()=>s.length,promise:(o,a,S={})=>{if(!a||!a.loading){Ct("[zag-js > toast] toaster.promise() requires at least a 'loading' option to be specified");return}const E=d({...S,...a.loading,promise:o,type:"loading"});let W=!0,N;const Tt=H(o).then(async T=>{if(N=["resolve",T],de(T)&&!T.ok){W=!1;const P=H(a.error,`HTTP Error! status: ${T.status}`);d({...S,...P,id:E,type:"error"})}else if(a.success!==void 0){W=!1;const P=H(a.success,T);d({...S,...P,id:E,type:"success"})}}).catch(async T=>{if(N=["reject",T],a.error!==void 0){W=!1;const P=H(a.error,T);d({...S,...P,id:E,type:"error"})}}).finally(()=>{var T;W&&g(E),(T=a.finally)==null||T.call(a)});return{id:E,unwrap:()=>new Promise((T,P)=>Tt.then(()=>N[0]==="reject"?P(N[1]):T(N[1])).catch(P))}},pause:o=>{o!=null?s=s.map(a=>a.id===o?l({...a,message:"PAUSE"}):a):s=s.map(a=>l({...a,message:"PAUSE"}))},resume:o=>{o!=null?s=s.map(a=>a.id===o?l({...a,message:"RESUME"}):a):s=s.map(a=>l({...a,message:"RESUME"}))},isVisible:o=>!i.has(o)&&!!s.find(a=>a.id===o),isDismissed:o=>i.has(o),expand:()=>{s=s.map(o=>l({...o,stacked:!0}))},collapse:()=>{s=s.map(o=>l({...o,stacked:!1}))}}}var de=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",rt={connect:ee,machine:oe};const ge=t=>
3ue(t),[pe,k]=Dt({name:"ToastContext",hookName:"useToastContext",providerName:"<ToastProvider />"}),dt=O.forwardRef((t,e)=>{const r=k(),s=D(r.getActionTriggerProps(),t);return x.jsx(_.button,{...s,ref:e})});dt.displayName="ToastActionTrigger";const gt=O.forwardRef((t,e)=>{const r=k(),s=D(r.getCloseTriggerProps(),t);return x.jsx(_.button,{...s,ref:e})});gt.displayName="ToastCloseTrigger";const pt=O.forwardRef((t,e)=>{const r=k(),s=D(r.getDescriptionProps(),t);return x.jsx(_.div,{...s,ref:e})});pt.displayName="ToastDescription";const mt=O.forwardRef((t,e)=>{const r=k(),s=D(r.getRootProps(),t);return x.jsxs("div",{...s,ref:e,children:[x.jsx("div",{...r.getGhostBeforeProps()}),t.children,x.jsx("div",{...r.getGhostAfterProps()})]})});mt.displayName="ToastRoot";const ft=O.forwardRef((t,e)=>{const r=k(),s=D(r.getTitleProps(),t);return x.jsx(_.div,{...s,ref:e})});ft.displayName="ToastTitle";const ht=O.forwardRef((t,e)=>{const{toaster:r,children:s,...i}=t,n=kt(),c=at(),l=nt(rt.machine,{store:r,id:O.useId(),dir:n==null?void 0:n.dir,getRootNode:c==null?void 0:c.getRootNode}),u=rt.connect(l,ct),p=D(u.getGroupProps(),i);return x.jsx(_.div,{...p,ref:e,children:u.getToasts().map((d,g)=>x.jsx(yt,{value:d,parent:l,index:g,children:y=>s(y)},d.id))})});ht.displayName="Toaster";const yt=t=>{const e=at(),r={...t.value,parent:t.parent,index:t.index,getRootNode:e.getRootNode},s=nt(ce,{...r}),i=ae(s,ct);return x.jsx(pe,{value:i,children:t.children(t.value)})};yt.displayName="ToastActor";const{withProvider:me,withContext:V,useStyles:fe}=Ht({key:"toast"}),he=Ut(ht,{},{forwardAsChild:!0}),ye=me(mt,"root",{forwardAsChild:!0});V(gt,"closeTrigger",{forwardAsChild:!0,defaultProps:{children:x.jsx(Ft,{})}});V(ft,"title",{forwardAsChild:!0});V(pt,"description",{forwardAsChild:!0});V(dt,"actionTrigger",{forwardAsChild:!0});const Te={warning:z,success:At,error:z},ve=O.forwardRef(function(e,r){const{unstyled:s,...i}=e,n=k(),c=fe(),l=Te[n.type];return l?x.jsx(l,{ref:r,...i,css:[s?void 0:c.indicator,e.css]}):null}),it=ge({placement:"top-end",pauseOnPageIdle:!0,max:1,offsets:{top:"64px",bottom:"0",left:"0",right:"10px"}}),He=()=>{const t=vt("gray.50","gray.600");return R(he,{toaster:it,"data-cy":"_toaster_Toaster",children:e=>{var r;return R(ye,{width:{base:"90vw",md:"sm"},bg:t,boxShadow:"0px 0px 1px 0px rgba(0, 0, 0, 0.24), 0px 12px 24px 0px rgba(0, 0, 0, 0.20)",children:j(Wt,{gap:8,px:8,py:8,alignItems:"start",w:"100%","data-cy":"_toaster_HStack",children:[e.type==="loading"?R(Nt,{mt:7,mr:6,size:"xl",color:"blue.solid","data-cy":"_toaster_Spinner"}):R(ve,{color:"text.primary",boxSize:16,mt:5}),j(_t,{gap:1,flex:1,maxWidth:"100%","data-cy":"_toaster_Stack",children:[e.title&&R(X,{textStyle:"UI.14.semi",color:"text.primary","data-cy":"_toaster_Text",children:e.title}),e.description&&R(X,{textStyle:"UI.12.reg",color:"text.secondary","data-cy":"_toaster_Text_5",children:e.description})]}),((r=e.meta)==null?void 0:r.closable)&&R(Gt,{variant:"textOnly",size:"md",boxSize:16,asChild:!0,onClick:()=>it.dismiss(),"data-cy":"_toaster_IconButton",children:R(xt,{"data-cy":"_toaster_X"})})]})})}})};export{He as G,$ as s,it as t}; 4 5//# debugId=84f3c36a-dc36-50b2-93cf-1a3536e80315
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.