Comparing version 1.4.3 to 1.4.4
@@ -27,2 +27,4 @@ import React from 'react'; | ||
default?: string; | ||
content?: string; | ||
icon?: string; | ||
} | ||
@@ -36,2 +38,7 @@ interface ToastIcons { | ||
} | ||
interface Action { | ||
label: string; | ||
onClick: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void; | ||
actionButtonStyle?: React.CSSProperties; | ||
} | ||
interface ToastT { | ||
@@ -50,10 +57,4 @@ id: number | string; | ||
important?: boolean; | ||
action?: { | ||
label: React.ReactNode; | ||
onClick: (event: React.MouseEvent<HTMLButtonElement>) => void; | ||
}; | ||
cancel?: { | ||
label: React.ReactNode; | ||
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void; | ||
}; | ||
action?: Action | React.ReactNode; | ||
cancel?: Action | React.ReactNode; | ||
onDismiss?: (toast: ToastT) => void; | ||
@@ -130,4 +131,4 @@ onAutoClose?: (toast: ToastT) => void; | ||
declare const Toaster: (props: ToasterProps) => React.JSX.Element; | ||
declare const Toaster: (props: ToasterProps) => JSX.Element; | ||
export { ExternalToast, ToastT, Toaster, toast }; |
@@ -1,3 +0,9 @@ | ||
"use client";var $t=Object.create;var Q=Object.defineProperty;var _t=Object.getOwnPropertyDescriptor;var Ut=Object.getOwnPropertyNames;var Wt=Object.getPrototypeOf,Vt=Object.prototype.hasOwnProperty;var Kt=(s,e)=>{for(var t in e)Q(s,t,{get:e[t],enumerable:!0})},Mt=(s,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let m of Ut(e))!Vt.call(s,m)&&m!==t&&Q(s,m,{get:()=>e[m],enumerable:!(n=_t(e,m))||n.enumerable});return s};var Z=(s,e,t)=>(t=s!=null?$t(Wt(s)):{},Mt(e||!s||!s.__esModule?Q(t,"default",{value:s,enumerable:!0}):t,s)),Xt=s=>Mt(Q({},"__esModule",{value:!0}),s);var ce={};Kt(ce,{Toaster:()=>de,toast:()=>Ct});module.exports=Xt(ce);var a=Z(require("react")),Rt=Z(require("react-dom"));function ut(s,{insertAt:e}={}){if(!s||typeof document=="undefined")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",e==="top"&&t.firstChild?t.insertBefore(n,t.firstChild):t.appendChild(n),n.styleSheet?n.styleSheet.cssText=s:n.appendChild(document.createTextNode(s))}ut(`html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}html[dir=rtl],[data-sonner-toaster][dir=rtl]{--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999}[data-sonner-toaster][data-x-position=right]{right:max(var(--offset),env(safe-area-inset-right))}[data-sonner-toaster][data-x-position=left]{left:max(var(--offset),env(safe-area-inset-left))}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translate(-50%)}[data-sonner-toaster][data-y-position=top]{top:max(var(--offset),env(safe-area-inset-top))}[data-sonner-toaster][data-y-position=bottom]{bottom:max(var(--offset),env(safe-area-inset-bottom))}[data-sonner-toast]{--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}[data-sonner-toast][data-y-position=top]{top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}[data-sonner-toast] [data-description]{font-weight:400;line-height:1.4;color:inherit}[data-sonner-toast] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast] [data-icon]>*{flex-shrink:0}[data-sonner-toast] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast] [data-button]:focus-visible{box-shadow:0 0 0 2px #0006}[data-sonner-toast] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toast][data-theme=dark] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;background:var(--gray1);color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]:focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}[data-sonner-toast] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]:before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]:before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]:before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]:before{content:"";position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast]:after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y: translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y: translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]:before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - 32px)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true] [data-sonner-toast][data-type=success],[data-rich-colors=true] [data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true] [data-sonner-toast][data-type=info],[data-rich-colors=true] [data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true] [data-sonner-toast][data-type=warning],[data-rich-colors=true] [data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true] [data-sonner-toast][data-type=error],[data-rich-colors=true] [data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} | ||
`);var E=Z(require("react")),Nt=s=>{switch(s){case"success":return Gt;case"info":return Ot;case"warning":return qt;case"error":return Qt;default:return null}},Jt=Array(12).fill(0),Dt=({visible:s})=>E.default.createElement("div",{className:"sonner-loading-wrapper","data-visible":s},E.default.createElement("div",{className:"sonner-spinner"},Jt.map((e,t)=>E.default.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${t}`})))),Gt=E.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},E.default.createElement("path",{fillRule:"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",clipRule:"evenodd"})),qt=E.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},E.default.createElement("path",{fillRule:"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",clipRule:"evenodd"})),Ot=E.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},E.default.createElement("path",{fillRule:"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",clipRule:"evenodd"})),Qt=E.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},E.default.createElement("path",{fillRule:"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",clipRule:"evenodd"}));var ft=Z(require("react")),Pt=()=>{let[s,e]=ft.default.useState(!1);return ft.default.useEffect(()=>{let t=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",t),()=>window.removeEventListener("visibilitychange",t)},[]),s};var mt=1,pt=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)});this.publish=e=>{this.subscribers.forEach(t=>t(e))};this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]};this.create=e=>{var p;let{message:t,...n}=e,m=typeof(e==null?void 0:e.id)=="number"||((p=e.id)==null?void 0:p.length)>0?e.id:mt++,h=this.toasts.find(i=>i.id===m),f=e.dismissible===void 0?!0:e.dismissible;return h?this.toasts=this.toasts.map(i=>i.id===m?(this.publish({...i,...e,id:m,title:t}),{...i,...e,id:m,dismissible:f,title:t}):i):this.addToast({title:t,...n,dismissible:f,id:m}),m};this.dismiss=e=>(e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e);this.message=(e,t)=>this.create({...t,message:e});this.error=(e,t)=>this.create({...t,message:e,type:"error"});this.success=(e,t)=>this.create({...t,type:"success",message:e});this.info=(e,t)=>this.create({...t,type:"info",message:e});this.warning=(e,t)=>this.create({...t,type:"warning",message:e});this.loading=(e,t)=>this.create({...t,type:"loading",message:e});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}));let m=e instanceof Promise?e:e(),h=n!==void 0;return m.then(f=>{if(f&&typeof f.ok=="boolean"&&!f.ok){h=!1;let p=typeof t.error=="function"?t.error(`HTTP error! status: ${f.status}`):t.error,i=typeof t.description=="function"?t.description(`HTTP error! status: ${f.status}`):t.description;this.create({id:n,type:"error",message:p,description:i})}else if(t.success!==void 0){h=!1;let p=typeof t.success=="function"?t.success(f):t.success,i=typeof t.description=="function"?t.description(f):t.description;this.create({id:n,type:"success",message:p,description:i})}}).catch(f=>{if(t.error!==void 0){h=!1;let p=typeof t.error=="function"?t.error(f):t.error,i=typeof t.description=="function"?t.description(f):t.description;this.create({id:n,type:"error",message:p,description:i})}}).finally(()=>{var f;h&&(this.dismiss(n),n=void 0),(f=t.finally)==null||f.call(t)}),n};this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||mt++;return this.create({jsx:e(n),id:n,...t}),n};this.subscribers=[],this.toasts=[]}},S=new pt,Zt=(s,e)=>{let t=(e==null?void 0:e.id)||mt++;return S.addToast({title:s,...e,id:t}),t},te=Zt,Ct=Object.assign(te,{success:S.success,info:S.info,warning:S.warning,error:S.error,custom:S.custom,message:S.message,promise:S.promise,dismiss:S.dismiss,loading:S.loading});var ee=3,ae="32px",oe=4e3,se=356,Lt=14,ne=20,re=200;function ie(...s){return s.filter(Boolean).join(" ")}var le=s=>{var xt,Tt,wt,Et,St,kt,It;let{invert:e,toast:t,unstyled:n,interacting:m,setHeights:h,visibleToasts:f,heights:p,index:i,toasts:tt,expanded:F,removeToast:U,closeButton:W,style:r,cancelButtonStyle:V,actionButtonStyle:et,className:at="",descriptionClassName:ot="",duration:K,position:st,gap:nt=Lt,loadingIcon:I,expandByDefault:R,classNames:l,icons:x,closeButtonAriaLabel:rt="Close toast",pauseWhenPageIsHidden:X,cn:T}=s,[L,J]=a.default.useState(!1),[G,z]=a.default.useState(!1),[C,q]=a.default.useState(!1),[B,A]=a.default.useState(!1),[it,d]=a.default.useState(0),[g,b]=a.default.useState(0),D=a.default.useRef(null),w=a.default.useRef(null),u=i===0,$=i+1<=f,y=t.type,P=t.dismissible!==!1,_=t.className||"",zt=t.descriptionClassName||"",O=a.default.useMemo(()=>p.findIndex(o=>o.toastId===t.id)||0,[p,t.id]),At=a.default.useMemo(()=>{var o;return(o=t.closeButton)!=null?o:W},[t.closeButton,W]),gt=a.default.useMemo(()=>t.duration||K||oe,[t.duration,K]),lt=a.default.useRef(0),Y=a.default.useRef(0),ht=a.default.useRef(0),j=a.default.useRef(null),[bt,Yt]=st.split("-"),yt=a.default.useMemo(()=>p.reduce((o,c,v)=>v>=O?o:o+c.height,0),[p,O]),vt=Pt(),jt=t.invert||e,dt=y==="loading";Y.current=a.default.useMemo(()=>O*nt+yt,[O,yt]),a.default.useEffect(()=>{J(!0)},[]),a.default.useLayoutEffect(()=>{if(!L)return;let o=w.current,c=o.style.height;o.style.height="auto";let v=o.getBoundingClientRect().height;o.style.height=c,b(v),h(M=>M.find(k=>k.toastId===t.id)?M.map(k=>k.toastId===t.id?{...k,height:v}:k):[{toastId:t.id,height:v,position:t.position},...M])},[L,t.title,t.description,h,t.id]);let H=a.default.useCallback(()=>{z(!0),d(Y.current),h(o=>o.filter(c=>c.toastId!==t.id)),setTimeout(()=>{U(t)},re)},[t,U,h,Y]);a.default.useEffect(()=>{if(t.promise&&y==="loading"||t.duration===1/0||t.type==="loading")return;let o,c=gt;return F||m||X&&vt?(()=>{if(ht.current<lt.current){let N=new Date().getTime()-lt.current;c=c-N}ht.current=new Date().getTime()})():(()=>{lt.current=new Date().getTime(),o=setTimeout(()=>{var N;(N=t.onAutoClose)==null||N.call(t,t),H()},c)})(),()=>clearTimeout(o)},[F,m,R,t,gt,H,t.promise,y,X,vt]),a.default.useEffect(()=>{let o=w.current;if(o){let c=o.getBoundingClientRect().height;return b(c),h(v=>[{toastId:t.id,height:c,position:t.position},...v]),()=>h(v=>v.filter(M=>M.toastId!==t.id))}},[h,t.id]),a.default.useEffect(()=>{t.delete&&H()},[H,t.delete]);function Ft(){return x!=null&&x.loading?a.default.createElement("div",{className:"loader","data-visible":y==="loading"},x.loading):I?a.default.createElement("div",{className:"sonner-loader","data-visible":y==="loading"},I):a.default.createElement(Dt,{visible:y==="loading"})}return a.default.createElement("li",{"aria-live":t.important?"assertive":"polite","aria-atomic":"true",role:"status",tabIndex:0,ref:w,className:T(at,_,l==null?void 0:l.toast,(xt=t==null?void 0:t.classNames)==null?void 0:xt.toast,l==null?void 0:l.default,l==null?void 0:l[y],(Tt=t==null?void 0:t.classNames)==null?void 0:Tt[y]),"data-sonner-toast":"","data-styled":!(t.jsx||t.unstyled||n),"data-mounted":L,"data-promise":!!t.promise,"data-removed":G,"data-visible":$,"data-y-position":bt,"data-x-position":Yt,"data-index":i,"data-front":u,"data-swiping":C,"data-dismissible":P,"data-type":y,"data-invert":jt,"data-swipe-out":B,"data-expanded":!!(F||R&&L),style:{"--index":i,"--toasts-before":i,"--z-index":tt.length-i,"--offset":`${G?it:Y.current}px`,"--initial-height":R?"auto":`${g}px`,...r,...t.style},onPointerDown:o=>{dt||!P||(D.current=new Date,d(Y.current),o.target.setPointerCapture(o.pointerId),o.target.tagName!=="BUTTON"&&(q(!0),j.current={x:o.clientX,y:o.clientY}))},onPointerUp:()=>{var M,N,k,ct;if(B||!P)return;j.current=null;let o=Number(((M=w.current)==null?void 0:M.style.getPropertyValue("--swipe-amount").replace("px",""))||0),c=new Date().getTime()-((N=D.current)==null?void 0:N.getTime()),v=Math.abs(o)/c;if(Math.abs(o)>=ne||v>.11){d(Y.current),(k=t.onDismiss)==null||k.call(t,t),H(),A(!0);return}(ct=w.current)==null||ct.style.setProperty("--swipe-amount","0px"),q(!1)},onPointerMove:o=>{var Bt;if(!j.current||!P)return;let c=o.clientY-j.current.y,v=o.clientX-j.current.x,N=(bt==="top"?Math.min:Math.max)(0,c),k=o.pointerType==="touch"?10:2;Math.abs(N)>k?(Bt=w.current)==null||Bt.style.setProperty("--swipe-amount",`${c}px`):Math.abs(v)>k&&(j.current=null)}},At&&!t.jsx?a.default.createElement("button",{"aria-label":rt,"data-disabled":dt,"data-close-button":!0,onClick:dt||!P?()=>{}:()=>{var o;H(),(o=t.onDismiss)==null||o.call(t,t)},className:T(l==null?void 0:l.closeButton,(wt=t==null?void 0:t.classNames)==null?void 0:wt.closeButton)},a.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},a.default.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),a.default.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))):null,t.jsx||a.default.isValidElement(t.title)?t.jsx||t.title:a.default.createElement(a.default.Fragment,null,y||t.icon||t.promise?a.default.createElement("div",{"data-icon":""},t.promise||t.type==="loading"&&!t.icon?t.icon||(x==null?void 0:x.loading)||Ft():null,t.type!=="loading"?t.icon||(x==null?void 0:x[y])||Nt(y):null):null,a.default.createElement("div",{"data-content":""},a.default.createElement("div",{"data-title":"",className:T(l==null?void 0:l.title,(Et=t==null?void 0:t.classNames)==null?void 0:Et.title)},t.title),t.description?a.default.createElement("div",{"data-description":"",className:T(ot,zt,l==null?void 0:l.description,(St=t==null?void 0:t.classNames)==null?void 0:St.description)},t.description):null),t.cancel?a.default.createElement("button",{"data-button":!0,"data-cancel":!0,style:t.cancelButtonStyle||V,onClick:o=>{var c;P&&(H(),(c=t.cancel)!=null&&c.onClick&&t.cancel.onClick(o))},className:T(l==null?void 0:l.cancelButton,(kt=t==null?void 0:t.classNames)==null?void 0:kt.cancelButton)},t.cancel.label):null,t.action?a.default.createElement("button",{"data-button":"",style:t.actionButtonStyle||et,onClick:o=>{var c;(c=t.action)==null||c.onClick(o),!o.defaultPrevented&&H()},className:T(l==null?void 0:l.actionButton,(It=t==null?void 0:t.classNames)==null?void 0:It.actionButton)},t.action.label):null))};function Ht(){if(typeof window=="undefined"||typeof document=="undefined")return"ltr";let s=document.documentElement.getAttribute("dir");return s==="auto"||!s?window.getComputedStyle(document.documentElement).direction:s}var de=s=>{let{invert:e,position:t="bottom-right",hotkey:n=["altKey","KeyT"],expand:m,closeButton:h,className:f,offset:p,theme:i="light",richColors:tt,duration:F,style:U,visibleToasts:W=ee,toastOptions:r,dir:V=Ht(),gap:et,loadingIcon:at,icons:ot,containerAriaLabel:K="Notifications",pauseWhenPageIsHidden:st,cn:nt=ie}=s,[I,R]=a.default.useState([]),l=a.default.useMemo(()=>Array.from(new Set([t].concat(I.filter(d=>d.position).map(d=>d.position)))),[I,t]),[x,rt]=a.default.useState([]),[X,T]=a.default.useState(!1),[L,J]=a.default.useState(!1),[G,z]=a.default.useState(i!=="system"?i:typeof window!="undefined"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),C=a.default.useRef(null),q=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),B=a.default.useRef(null),A=a.default.useRef(!1),it=a.default.useCallback(d=>R(g=>g.filter(({id:b})=>b!==d.id)),[]);return a.default.useEffect(()=>S.subscribe(d=>{if(d.dismiss){R(g=>g.map(b=>b.id===d.id?{...b,delete:!0}:b));return}setTimeout(()=>{Rt.default.flushSync(()=>{R(g=>{let b=g.findIndex(D=>D.id===d.id);return b!==-1?[...g.slice(0,b),{...g[b],...d},...g.slice(b+1)]:[d,...g]})})})}),[]),a.default.useEffect(()=>{if(i!=="system"){z(i);return}i==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?z("dark"):z("light")),typeof window!="undefined"&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",({matches:d})=>{z(d?"dark":"light")})},[i]),a.default.useEffect(()=>{I.length<=1&&T(!1)},[I]),a.default.useEffect(()=>{let d=g=>{var D,w;n.every(u=>g[u]||g.code===u)&&(T(!0),(D=C.current)==null||D.focus()),g.code==="Escape"&&(document.activeElement===C.current||(w=C.current)!=null&&w.contains(document.activeElement))&&T(!1)};return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[n]),a.default.useEffect(()=>{if(C.current)return()=>{B.current&&(B.current.focus({preventScroll:!0}),B.current=null,A.current=!1)}},[C.current]),I.length?a.default.createElement("section",{"aria-label":`${K} ${q}`,tabIndex:-1},l.map((d,g)=>{var w;let[b,D]=d.split("-");return a.default.createElement("ol",{key:d,dir:V==="auto"?Ht():V,tabIndex:-1,ref:C,className:f,"data-sonner-toaster":!0,"data-theme":G,"data-rich-colors":tt,"data-y-position":b,"data-x-position":D,style:{"--front-toast-height":`${((w=x[0])==null?void 0:w.height)||0}px`,"--offset":typeof p=="number"?`${p}px`:p||ae,"--width":`${se}px`,"--gap":`${Lt}px`,...U},onBlur:u=>{A.current&&!u.currentTarget.contains(u.relatedTarget)&&(A.current=!1,B.current&&(B.current.focus({preventScroll:!0}),B.current=null))},onFocus:u=>{u.target instanceof HTMLElement&&u.target.dataset.dismissible==="false"||A.current||(A.current=!0,B.current=u.relatedTarget)},onMouseEnter:()=>T(!0),onMouseMove:()=>T(!0),onMouseLeave:()=>{L||T(!1)},onPointerDown:u=>{u.target instanceof HTMLElement&&u.target.dataset.dismissible==="false"||J(!0)},onPointerUp:()=>J(!1)},I.filter(u=>!u.position&&g===0||u.position===d).map((u,$)=>{var y,P;return a.default.createElement(le,{key:u.id,icons:ot,index:$,toast:u,duration:(y=r==null?void 0:r.duration)!=null?y:F,className:r==null?void 0:r.className,descriptionClassName:r==null?void 0:r.descriptionClassName,invert:e,visibleToasts:W,closeButton:(P=r==null?void 0:r.closeButton)!=null?P:h,interacting:L,position:d,style:r==null?void 0:r.style,unstyled:r==null?void 0:r.unstyled,classNames:r==null?void 0:r.classNames,cancelButtonStyle:r==null?void 0:r.cancelButtonStyle,actionButtonStyle:r==null?void 0:r.actionButtonStyle,removeToast:it,toasts:I.filter(_=>_.position==u.position),heights:x.filter(_=>_.position==u.position),setHeights:rt,expandByDefault:m,gap:et,loadingIcon:at,expanded:X,pauseWhenPageIsHidden:st,cn:nt})}))})):null};0&&(module.exports={Toaster,toast}); | ||
"use client";var nn=Object.create;var Zt=Object.defineProperty;var on=Object.getOwnPropertyDescriptor;var an=Object.getOwnPropertyNames;var rn=Object.getPrototypeOf,sn=Object.prototype.hasOwnProperty;var ln=(a,n)=>{for(var t in n)Zt(a,t,{get:n[t],enumerable:!0})},Ce=(a,n,t,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let u of an(n))!sn.call(a,u)&&u!==t&&Zt(a,u,{get:()=>n[u],enumerable:!(r=on(n,u))||r.enumerable});return a};var Jt=(a,n,t)=>(t=a!=null?nn(rn(a)):{},Ce(n||!a||!a.__esModule?Zt(t,"default",{value:a,enumerable:!0}):t,a)),cn=a=>Ce(Zt({},"__esModule",{value:!0}),a);var $n={};ln($n,{Toaster:()=>jn,toast:()=>Ke});module.exports=cn($n);var s=Jt(require("react")),Ze=Jt(require("react-dom"));var{entries:Fe,setPrototypeOf:Le,isFrozen:dn,getPrototypeOf:un,getOwnPropertyDescriptor:fn}=Object,{freeze:O,seal:X,create:ze}=Object,{apply:ue,construct:fe}=typeof Reflect!="undefined"&&Reflect;O||(O=function(n){return n});X||(X=function(n){return n});ue||(ue=function(n,t,r){return n.apply(t,r)});fe||(fe=function(n,t){return new n(...t)});var Qt=F(Array.prototype.forEach),Me=F(Array.prototype.pop),jt=F(Array.prototype.push),ne=F(String.prototype.toLowerCase),se=F(String.prototype.toString),Pe=F(String.prototype.match),$t=F(String.prototype.replace),mn=F(String.prototype.indexOf),pn=F(String.prototype.trim),tt=F(Object.prototype.hasOwnProperty),U=F(RegExp.prototype.test),Vt=gn(TypeError);function F(a){return function(n){for(var t=arguments.length,r=new Array(t>1?t-1:0),u=1;u<t;u++)r[u-1]=arguments[u];return ue(a,n,r)}}function gn(a){return function(){for(var n=arguments.length,t=new Array(n),r=0;r<n;r++)t[r]=arguments[r];return fe(a,t)}}function d(a,n){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ne;Le&&Le(a,null);let r=n.length;for(;r--;){let u=n[r];if(typeof u=="string"){let E=t(u);E!==u&&(dn(n)||(n[r]=E),u=E)}a[u]=!0}return a}function hn(a){for(let n=0;n<a.length;n++)tt(a,n)||(a[n]=null);return a}function Nt(a){let n=ze(null);for(let[t,r]of Fe(a))tt(a,t)&&(Array.isArray(r)?n[t]=hn(r):r&&typeof r=="object"&&r.constructor===Object?n[t]=Nt(r):n[t]=r);return n}function te(a,n){for(;a!==null;){let r=fn(a,n);if(r){if(r.get)return F(r.get);if(typeof r.value=="function")return F(r.value)}a=un(a)}function t(){return null}return t}var Oe=O(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ie=O(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),le=O(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Tn=O(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),ce=O(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),bn=O(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ke=O(["#text"]),Be=O(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),de=O(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),He=O(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ee=O(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),yn=X(/\{\{[\w\W]*|[\w\W]*\}\}/gm),En=X(/<%[\w\W]*|[\w\W]*%>/gm),wn=X(/\${[\w\W]*}/gm),xn=X(/^data-[\-\w.\u00B7-\uFFFF]/),vn=X(/^aria-[\-\w]+$/),We=X(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),An=X(/^(?:\w+script|data):/i),_n=X(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ye=X(/^html$/i),Sn=X(/^[a-z][a-z\d]*(-[a-z\d]+)+$/i),Ue=Object.freeze({__proto__:null,MUSTACHE_EXPR:yn,ERB_EXPR:En,TMPLIT_EXPR:wn,DATA_ATTR:xn,ARIA_ATTR:vn,IS_ALLOWED_URI:We,IS_SCRIPT_OR_DATA:An,ATTR_WHITESPACE:_n,DOCTYPE_NAME:Ye,CUSTOM_ELEMENT:Sn}),Rn=function(){return typeof window=="undefined"?null:window},Nn=function(n,t){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let r=null,u="data-tt-policy-suffix";t&&t.hasAttribute(u)&&(r=t.getAttribute(u));let E="dompurify"+(r?"#"+r:"");try{return n.createPolicy(E,{createHTML(y){return y},createScriptURL(y){return y}})}catch(y){return console.warn("TrustedTypes policy "+E+" could not be created."),null}};function Ge(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Rn(),n=l=>Ge(l);if(n.version="3.0.10",n.removed=[],!a||!a.document||a.document.nodeType!==9)return n.isSupported=!1,n;let{document:t}=a,r=t,u=r.currentScript,{DocumentFragment:E,HTMLTemplateElement:y,Node:A,Element:T,NodeFilter:mt,NamedNodeMap:wt=a.NamedNodeMap||a.MozNamedAttrMap,HTMLFormElement:Dt,DOMParser:It,trustedTypes:m}=a,st=T.prototype,Ct=te(st,"cloneNode"),Bt=te(st,"nextSibling"),Ht=te(st,"childNodes"),pt=te(st,"parentNode");if(typeof y=="function"){let l=t.createElement("template");l.content&&l.content.ownerDocument&&(t=l.content.ownerDocument)}let R,it="",{implementation:k,createNodeIterator:lt,createDocumentFragment:p,getElementsByTagName:z}=t,{importNode:Ut}=r,P={};n.isSupported=typeof Fe=="function"&&typeof pt=="function"&&k&&k.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:N,ERB_EXPR:Z,TMPLIT_EXPR:gt,DATA_ATTR:Lt,ARIA_ATTR:ct,IS_SCRIPT_OR_DATA:et,ATTR_WHITESPACE:xt,CUSTOM_ELEMENT:W}=Ue,{IS_ALLOWED_URI:nt}=Ue,v=null,b=d({},[...Oe,...ie,...le,...ce,...ke]),f=null,D=d({},[...Be,...de,...He,...ee]),g=Object.seal(ze(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),C=null,w=null,ht=!0,I=!0,Y=!1,Tt=!0,bt=!1,G=!1,Ft=!1,Mt=!1,ot=!1,J=!1,vt=!1,dt=!0,zt=!1,oe="user-content-",Pt=!0,yt=!1,Et={},at=null,Q=d({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Kt=null,Wt=d({},["audio","video","img","source","image","track"]),Ot=null,Yt=d({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),At="http://www.w3.org/1998/Math/MathML",_t="http://www.w3.org/2000/svg",j="http://www.w3.org/1999/xhtml",ut=j,kt=!1,c=null,_=d({},[At,_t,j],se),S=null,$=["application/xhtml+xml","text/html"],V="text/html",h=null,rt=null,qt=t.createElement("form"),Te=function(e){return e instanceof RegExp||e instanceof Function},ae=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(rt&&rt===e)){if((!e||typeof e!="object")&&(e={}),e=Nt(e),S=$.indexOf(e.PARSER_MEDIA_TYPE)===-1?V:e.PARSER_MEDIA_TYPE,h=S==="application/xhtml+xml"?se:ne,v=tt(e,"ALLOWED_TAGS")?d({},e.ALLOWED_TAGS,h):b,f=tt(e,"ALLOWED_ATTR")?d({},e.ALLOWED_ATTR,h):D,c=tt(e,"ALLOWED_NAMESPACES")?d({},e.ALLOWED_NAMESPACES,se):_,Ot=tt(e,"ADD_URI_SAFE_ATTR")?d(Nt(Yt),e.ADD_URI_SAFE_ATTR,h):Yt,Kt=tt(e,"ADD_DATA_URI_TAGS")?d(Nt(Wt),e.ADD_DATA_URI_TAGS,h):Wt,at=tt(e,"FORBID_CONTENTS")?d({},e.FORBID_CONTENTS,h):Q,C=tt(e,"FORBID_TAGS")?d({},e.FORBID_TAGS,h):{},w=tt(e,"FORBID_ATTR")?d({},e.FORBID_ATTR,h):{},Et=tt(e,"USE_PROFILES")?e.USE_PROFILES:!1,ht=e.ALLOW_ARIA_ATTR!==!1,I=e.ALLOW_DATA_ATTR!==!1,Y=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Tt=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,bt=e.SAFE_FOR_TEMPLATES||!1,G=e.WHOLE_DOCUMENT||!1,ot=e.RETURN_DOM||!1,J=e.RETURN_DOM_FRAGMENT||!1,vt=e.RETURN_TRUSTED_TYPE||!1,Mt=e.FORCE_BODY||!1,dt=e.SANITIZE_DOM!==!1,zt=e.SANITIZE_NAMED_PROPS||!1,Pt=e.KEEP_CONTENT!==!1,yt=e.IN_PLACE||!1,nt=e.ALLOWED_URI_REGEXP||We,ut=e.NAMESPACE||j,g=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Te(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(g.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Te(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(g.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(g.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),bt&&(I=!1),J&&(ot=!0),Et&&(v=d({},ke),f=[],Et.html===!0&&(d(v,Oe),d(f,Be)),Et.svg===!0&&(d(v,ie),d(f,de),d(f,ee)),Et.svgFilters===!0&&(d(v,le),d(f,de),d(f,ee)),Et.mathMl===!0&&(d(v,ce),d(f,He),d(f,ee))),e.ADD_TAGS&&(v===b&&(v=Nt(v)),d(v,e.ADD_TAGS,h)),e.ADD_ATTR&&(f===D&&(f=Nt(f)),d(f,e.ADD_ATTR,h)),e.ADD_URI_SAFE_ATTR&&d(Ot,e.ADD_URI_SAFE_ATTR,h),e.FORBID_CONTENTS&&(at===Q&&(at=Nt(at)),d(at,e.FORBID_CONTENTS,h)),Pt&&(v["#text"]=!0),G&&d(v,["html","head","body"]),v.table&&(d(v,["tbody"]),delete C.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!="function")throw Vt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Vt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');R=e.TRUSTED_TYPES_POLICY,it=R.createHTML("")}else R===void 0&&(R=Nn(m,u)),R!==null&&typeof it=="string"&&(it=R.createHTML(""));O&&O(e),rt=e}},be=d({},["mi","mo","mn","ms","mtext"]),ye=d({},["foreignobject","desc","title","annotation-xml"]),Je=d({},["title","style","font","a","script"]),Ee=d({},[...ie,...le,...Tn]),we=d({},[...ce,...bn]),Qe=function(e){let o=pt(e);(!o||!o.tagName)&&(o={namespaceURI:ut,tagName:"template"});let i=ne(e.tagName),x=ne(o.tagName);return c[e.namespaceURI]?e.namespaceURI===_t?o.namespaceURI===j?i==="svg":o.namespaceURI===At?i==="svg"&&(x==="annotation-xml"||be[x]):!!Ee[i]:e.namespaceURI===At?o.namespaceURI===j?i==="math":o.namespaceURI===_t?i==="math"&&ye[x]:!!we[i]:e.namespaceURI===j?o.namespaceURI===_t&&!ye[x]||o.namespaceURI===At&&!be[x]?!1:!we[i]&&(Je[i]||!Ee[i]):!!(S==="application/xhtml+xml"&&c[e.namespaceURI]):!1},St=function(e){jt(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(o){e.remove()}},re=function(e,o){try{jt(n.removed,{attribute:o.getAttributeNode(e),from:o})}catch(i){jt(n.removed,{attribute:null,from:o})}if(o.removeAttribute(e),e==="is"&&!f[e])if(ot||J)try{St(o)}catch(i){}else try{o.setAttribute(e,"")}catch(i){}},xe=function(e){let o=null,i=null;if(Mt)e="<remove></remove>"+e;else{let M=Pe(e,/^[\r\n\t ]+/);i=M&&M[0]}S==="application/xhtml+xml"&&ut===j&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");let x=R?R.createHTML(e):e;if(ut===j)try{o=new It().parseFromString(x,S)}catch(M){}if(!o||!o.documentElement){o=k.createDocument(ut,"template",null);try{o.documentElement.innerHTML=kt?it:x}catch(M){}}let L=o.body||o.documentElement;return e&&i&&L.insertBefore(t.createTextNode(i),L.childNodes[0]||null),ut===j?z.call(o,G?"html":"body")[0]:G?o.documentElement:L},ve=function(e){return lt.call(e.ownerDocument||e,e,mt.SHOW_ELEMENT|mt.SHOW_COMMENT|mt.SHOW_TEXT|mt.SHOW_PROCESSING_INSTRUCTION,null)},tn=function(e){return e instanceof Dt&&(typeof e.nodeName!="string"||typeof e.textContent!="string"||typeof e.removeChild!="function"||!(e.attributes instanceof wt)||typeof e.removeAttribute!="function"||typeof e.setAttribute!="function"||typeof e.namespaceURI!="string"||typeof e.insertBefore!="function"||typeof e.hasChildNodes!="function")},Ae=function(e){return typeof A=="function"&&e instanceof A},ft=function(e,o,i){P[e]&&Qt(P[e],x=>{x.call(n,o,i,rt)})},_e=function(e){let o=null;if(ft("beforeSanitizeElements",e,null),tn(e))return St(e),!0;let i=h(e.nodeName);if(ft("uponSanitizeElement",e,{tagName:i,allowedTags:v}),e.hasChildNodes()&&!Ae(e.firstElementChild)&&U(/<[/\w]/g,e.innerHTML)&&U(/<[/\w]/g,e.textContent))return St(e),!0;if(!v[i]||C[i]){if(!C[i]&&Re(i)&&(g.tagNameCheck instanceof RegExp&&U(g.tagNameCheck,i)||g.tagNameCheck instanceof Function&&g.tagNameCheck(i)))return!1;if(Pt&&!at[i]){let x=pt(e)||e.parentNode,L=Ht(e)||e.childNodes;if(L&&x){let M=L.length;for(let B=M-1;B>=0;--B)x.insertBefore(Ct(L[B],!0),Bt(e))}}return St(e),!0}return e instanceof T&&!Qe(e)||(i==="noscript"||i==="noembed"||i==="noframes")&&U(/<\/no(script|embed|frames)/i,e.innerHTML)?(St(e),!0):(bt&&e.nodeType===3&&(o=e.textContent,Qt([N,Z,gt],x=>{o=$t(o,x," ")}),e.textContent!==o&&(jt(n.removed,{element:e.cloneNode()}),e.textContent=o)),ft("afterSanitizeElements",e,null),!1)},Se=function(e,o,i){if(dt&&(o==="id"||o==="name")&&(i in t||i in qt))return!1;if(!(I&&!w[o]&&U(Lt,o))){if(!(ht&&U(ct,o))){if(!f[o]||w[o]){if(!(Re(e)&&(g.tagNameCheck instanceof RegExp&&U(g.tagNameCheck,e)||g.tagNameCheck instanceof Function&&g.tagNameCheck(e))&&(g.attributeNameCheck instanceof RegExp&&U(g.attributeNameCheck,o)||g.attributeNameCheck instanceof Function&&g.attributeNameCheck(o))||o==="is"&&g.allowCustomizedBuiltInElements&&(g.tagNameCheck instanceof RegExp&&U(g.tagNameCheck,i)||g.tagNameCheck instanceof Function&&g.tagNameCheck(i))))return!1}else if(!Ot[o]){if(!U(nt,$t(i,xt,""))){if(!((o==="src"||o==="xlink:href"||o==="href")&&e!=="script"&&mn(i,"data:")===0&&Kt[e])){if(!(Y&&!U(et,$t(i,xt,"")))){if(i)return!1}}}}}}return!0},Re=function(e){return e!=="annotation-xml"&&Pe(e,W)},Ne=function(e){ft("beforeSanitizeAttributes",e,null);let{attributes:o}=e;if(!o)return;let i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:f},x=o.length;for(;x--;){let L=o[x],{name:M,namespaceURI:B,value:Rt}=L,Gt=h(M),H=M==="value"?Rt:pn(Rt);if(i.attrName=Gt,i.attrValue=H,i.keepAttr=!0,i.forceKeepAttr=void 0,ft("uponSanitizeAttribute",e,i),H=i.attrValue,i.forceKeepAttr||(re(M,e),!i.keepAttr))continue;if(!Tt&&U(/\/>/i,H)){re(M,e);continue}bt&&Qt([N,Z,gt],Ie=>{H=$t(H,Ie," ")});let De=h(e.nodeName);if(Se(De,Gt,H)){if(zt&&(Gt==="id"||Gt==="name")&&(re(M,e),H=oe+H),R&&typeof m=="object"&&typeof m.getAttributeType=="function"&&!B)switch(m.getAttributeType(De,Gt)){case"TrustedHTML":{H=R.createHTML(H);break}case"TrustedScriptURL":{H=R.createScriptURL(H);break}}try{B?e.setAttributeNS(B,M,H):e.setAttribute(M,H),Me(n.removed)}catch(Ie){}}}ft("afterSanitizeAttributes",e,null)},en=function l(e){let o=null,i=ve(e);for(ft("beforeSanitizeShadowDOM",e,null);o=i.nextNode();)ft("uponSanitizeShadowNode",o,null),!_e(o)&&(o.content instanceof E&&l(o.content),Ne(o));ft("afterSanitizeShadowDOM",e,null)};return n.sanitize=function(l){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=null,i=null,x=null,L=null;if(kt=!l,kt&&(l="<!-->"),typeof l!="string"&&!Ae(l))if(typeof l.toString=="function"){if(l=l.toString(),typeof l!="string")throw Vt("dirty is not a string, aborting")}else throw Vt("toString is not a function");if(!n.isSupported)return l;if(Ft||ae(e),n.removed=[],typeof l=="string"&&(yt=!1),yt){if(l.nodeName){let Rt=h(l.nodeName);if(!v[Rt]||C[Rt])throw Vt("root node is forbidden and cannot be sanitized in-place")}}else if(l instanceof A)o=xe("<!---->"),i=o.ownerDocument.importNode(l,!0),i.nodeType===1&&i.nodeName==="BODY"||i.nodeName==="HTML"?o=i:o.appendChild(i);else{if(!ot&&!bt&&!G&&l.indexOf("<")===-1)return R&&vt?R.createHTML(l):l;if(o=xe(l),!o)return ot?null:vt?it:""}o&&Mt&&St(o.firstChild);let M=ve(yt?l:o);for(;x=M.nextNode();)_e(x)||(x.content instanceof E&&en(x.content),Ne(x));if(yt)return l;if(ot){if(J)for(L=p.call(o.ownerDocument);o.firstChild;)L.appendChild(o.firstChild);else L=o;return(f.shadowroot||f.shadowrootmode)&&(L=Ut.call(r,L,!0)),L}let B=G?o.outerHTML:o.innerHTML;return G&&v["!doctype"]&&o.ownerDocument&&o.ownerDocument.doctype&&o.ownerDocument.doctype.name&&U(Ye,o.ownerDocument.doctype.name)&&(B="<!DOCTYPE "+o.ownerDocument.doctype.name+`> | ||
`+B),bt&&Qt([N,Z,gt],Rt=>{B=$t(B,Rt," ")}),R&&vt?R.createHTML(B):B},n.setConfig=function(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ae(l),Ft=!0},n.clearConfig=function(){rt=null,Ft=!1},n.isValidAttribute=function(l,e,o){rt||ae({});let i=h(l),x=h(e);return Se(i,x,o)},n.addHook=function(l,e){typeof e=="function"&&(P[l]=P[l]||[],jt(P[l],e))},n.removeHook=function(l){if(P[l])return Me(P[l])},n.removeHooks=function(l){P[l]&&(P[l]=[])},n.removeAllHooks=function(){P={}},n}var je=Ge();var K=Jt(require("react")),$e=a=>{switch(a){case"success":return In;case"info":return Ln;case"warning":return Cn;case"error":return Mn;default:return null}},Dn=Array(12).fill(0),Ve=({visible:a})=>K.default.createElement("div",{className:"sonner-loading-wrapper","data-visible":a},K.default.createElement("div",{className:"sonner-spinner"},Dn.map((n,t)=>K.default.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${t}`})))),In=K.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},K.default.createElement("path",{fillRule:"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",clipRule:"evenodd"})),Cn=K.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},K.default.createElement("path",{fillRule:"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",clipRule:"evenodd"})),Ln=K.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},K.default.createElement("path",{fillRule:"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",clipRule:"evenodd"})),Mn=K.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},K.default.createElement("path",{fillRule:"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",clipRule:"evenodd"}));var me=Jt(require("react")),Xe=()=>{let[a,n]=me.default.useState(!1);return me.default.useEffect(()=>{let t=()=>{n(document.hidden)};return document.addEventListener("visibilitychange",t),()=>window.removeEventListener("visibilitychange",t)},[]),a};var pe=1,ge=class{constructor(){this.subscribe=n=>(this.subscribers.push(n),()=>{let t=this.subscribers.indexOf(n);this.subscribers.splice(t,1)});this.publish=n=>{this.subscribers.forEach(t=>t(n))};this.addToast=n=>{this.publish(n),this.toasts=[...this.toasts,n]};this.create=n=>{var A;let{message:t,...r}=n,u=typeof(n==null?void 0:n.id)=="number"||((A=n.id)==null?void 0:A.length)>0?n.id:pe++,E=this.toasts.find(T=>T.id===u),y=n.dismissible===void 0?!0:n.dismissible;return E?this.toasts=this.toasts.map(T=>T.id===u?(this.publish({...T,...n,id:u,title:t}),{...T,...n,id:u,dismissible:y,title:t}):T):this.addToast({title:t,...r,dismissible:y,id:u}),u};this.dismiss=n=>(n||this.toasts.forEach(t=>{this.subscribers.forEach(r=>r({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:n,dismiss:!0})),n);this.message=(n,t)=>this.create({...t,message:n});this.error=(n,t)=>this.create({...t,message:n,type:"error"});this.success=(n,t)=>this.create({...t,type:"success",message:n});this.info=(n,t)=>this.create({...t,type:"info",message:n});this.warning=(n,t)=>this.create({...t,type:"warning",message:n});this.loading=(n,t)=>this.create({...t,type:"loading",message:n});this.promise=(n,t)=>{if(!t)return;let r;t.loading!==void 0&&(r=this.create({...t,promise:n,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let u=n instanceof Promise?n:n(),E=r!==void 0;return u.then(y=>{if(y&&typeof y.ok=="boolean"&&!y.ok){E=!1;let A=typeof t.error=="function"?t.error(`HTTP error! status: ${y.status}`):t.error,T=typeof t.description=="function"?t.description(`HTTP error! status: ${y.status}`):t.description;this.create({id:r,type:"error",message:A,description:T})}else if(t.success!==void 0){E=!1;let A=typeof t.success=="function"?t.success(y):t.success,T=typeof t.description=="function"?t.description(y):t.description;this.create({id:r,type:"success",message:A,description:T})}}).catch(y=>{if(t.error!==void 0){E=!1;let A=typeof t.error=="function"?t.error(y):t.error,T=typeof t.description=="function"?t.description(y):t.description;this.create({id:r,type:"error",message:A,description:T})}}).finally(()=>{var y;E&&(this.dismiss(r),r=void 0),(y=t.finally)==null||y.call(t)}),r};this.custom=(n,t)=>{let r=(t==null?void 0:t.id)||pe++;return this.create({jsx:n(r),id:r,...t}),r};this.subscribers=[],this.toasts=[]}},q=new ge,Pn=(a,n)=>{let t=(n==null?void 0:n.id)||pe++;return q.addToast({title:a,...n,id:t}),t},On=Pn,Ke=Object.assign(On,{success:q.success,info:q.info,warning:q.warning,error:q.error,custom:q.custom,message:q.message,promise:q.promise,dismiss:q.dismiss,loading:q.loading});function he(a,{insertAt:n}={}){if(!a||typeof document=="undefined")return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",n==="top"&&t.firstChild?t.insertBefore(r,t.firstChild):t.appendChild(r),r.styleSheet?r.styleSheet.cssText=a:r.appendChild(document.createTextNode(a))}he(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;background:var(--gray1);color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true] [data-sonner-toast][data-type=success],[data-rich-colors=true] [data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true] [data-sonner-toast][data-type=info],[data-rich-colors=true] [data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true] [data-sonner-toast][data-type=warning],[data-rich-colors=true] [data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true] [data-sonner-toast][data-type=error],[data-rich-colors=true] [data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} | ||
`);function Xt(a){return a.label!==void 0&&typeof a.onClick=="function"}var kn=3,Bn="32px",Hn=4e3,Un=356,Fn=14,zn=20,Wn=200;function Yn(...a){return a.filter(Boolean).join(" ")}var Gn=a=>{var Ot,Yt,At,_t,j,ut,kt;let{invert:n,toast:t,unstyled:r,interacting:u,setHeights:E,visibleToasts:y,heights:A,index:T,toasts:mt,expanded:wt,removeToast:Dt,closeButton:It,style:m,cancelButtonStyle:st,actionButtonStyle:Ct,className:Bt="",descriptionClassName:Ht="",duration:pt,position:R,gap:it,loadingIcon:k,expandByDefault:lt,classNames:p,icons:z,closeButtonAriaLabel:Ut="Close toast",pauseWhenPageIsHidden:P,cn:N}=a,[Z,gt]=s.default.useState(!1),[Lt,ct]=s.default.useState(!1),[et,xt]=s.default.useState(!1),[W,nt]=s.default.useState(!1),[v,b]=s.default.useState(0),[f,D]=s.default.useState(0),g=s.default.useRef(null),C=s.default.useRef(null),w=T===0,ht=T+1<=y,I=t.type,Y=t.dismissible!==!1,Tt=t.className||"",bt=t.descriptionClassName||"",G=s.default.useMemo(()=>A.findIndex(c=>c.toastId===t.id)||0,[A,t.id]),Ft=s.default.useMemo(()=>{var c;return(c=t.closeButton)!=null?c:It},[t.closeButton,It]),Mt=s.default.useMemo(()=>t.duration||pt||Hn,[t.duration,pt]),ot=s.default.useRef(0),J=s.default.useRef(0),vt=s.default.useRef(0),dt=s.default.useRef(null),[zt,oe]=R.split("-"),Pt=s.default.useMemo(()=>A.reduce((c,_,S)=>S>=G?c:c+_.height,0),[A,G]),yt=Xe(),Et=t.invert||n,at=I==="loading";J.current=s.default.useMemo(()=>G*it+Pt,[G,Pt]),s.default.useEffect(()=>{gt(!0)},[]),s.default.useLayoutEffect(()=>{if(!Z)return;let c=C.current,_=c.style.height;c.style.height="auto";let S=c.getBoundingClientRect().height;c.style.height=_,D(S),E($=>$.find(h=>h.toastId===t.id)?$.map(h=>h.toastId===t.id?{...h,height:S}:h):[{toastId:t.id,height:S,position:t.position},...$])},[Z,t.title,t.description,E,t.id]);let Q=s.default.useCallback(()=>{ct(!0),b(J.current),E(c=>c.filter(_=>_.toastId!==t.id)),setTimeout(()=>{Dt(t)},Wn)},[t,Dt,E,J]);s.default.useEffect(()=>{if(t.promise&&I==="loading"||t.duration===1/0||t.type==="loading")return;let c,_=Mt;return wt||u||P&&yt?(()=>{if(vt.current<ot.current){let V=new Date().getTime()-ot.current;_=_-V}vt.current=new Date().getTime()})():(()=>{_!==1/0&&(ot.current=new Date().getTime(),c=setTimeout(()=>{var V;(V=t.onAutoClose)==null||V.call(t,t),Q()},_))})(),()=>clearTimeout(c)},[wt,u,lt,t,Mt,Q,t.promise,I,P,yt]),s.default.useEffect(()=>{let c=C.current;if(c){let _=c.getBoundingClientRect().height;return D(_),E(S=>[{toastId:t.id,height:_,position:t.position},...S]),()=>E(S=>S.filter($=>$.toastId!==t.id))}},[E,t.id]),s.default.useEffect(()=>{t.delete&&Q()},[Q,t.delete]);function Kt(){return z!=null&&z.loading?s.default.createElement("div",{className:"sonner-loader","data-visible":I==="loading"},z.loading):k?s.default.createElement("div",{className:"sonner-loader","data-visible":I==="loading"},k):s.default.createElement(Ve,{visible:I==="loading"})}function Wt(c){return{__html:je.sanitize(c)}}return s.default.createElement("li",{"aria-live":t.important?"assertive":"polite","aria-atomic":"true",role:"status",tabIndex:0,ref:C,className:N(Bt,Tt,p==null?void 0:p.toast,(Ot=t==null?void 0:t.classNames)==null?void 0:Ot.toast,p==null?void 0:p.default,p==null?void 0:p[I],(Yt=t==null?void 0:t.classNames)==null?void 0:Yt[I]),"data-sonner-toast":"","data-styled":!(t.jsx||t.unstyled||r),"data-mounted":Z,"data-promise":!!t.promise,"data-removed":Lt,"data-visible":ht,"data-y-position":zt,"data-x-position":oe,"data-index":T,"data-front":w,"data-swiping":et,"data-dismissible":Y,"data-type":I,"data-invert":Et,"data-swipe-out":W,"data-expanded":!!(wt||lt&&Z),style:{"--index":T,"--toasts-before":T,"--z-index":mt.length-T,"--offset":`${Lt?v:J.current}px`,"--initial-height":lt?"auto":`${f}px`,...m,...t.style},onPointerDown:c=>{at||!Y||(g.current=new Date,b(J.current),c.target.setPointerCapture(c.pointerId),c.target.tagName!=="BUTTON"&&(xt(!0),dt.current={x:c.clientX,y:c.clientY}))},onPointerUp:()=>{var $,V,h,rt;if(W||!Y)return;dt.current=null;let c=Number((($=C.current)==null?void 0:$.style.getPropertyValue("--swipe-amount").replace("px",""))||0),_=new Date().getTime()-((V=g.current)==null?void 0:V.getTime()),S=Math.abs(c)/_;if(Math.abs(c)>=zn||S>.11){b(J.current),(h=t.onDismiss)==null||h.call(t,t),Q(),nt(!0);return}(rt=C.current)==null||rt.style.setProperty("--swipe-amount","0px"),xt(!1)},onPointerMove:c=>{var qt;if(!dt.current||!Y)return;let _=c.clientY-dt.current.y,S=c.clientX-dt.current.x,V=(zt==="top"?Math.min:Math.max)(0,_),h=c.pointerType==="touch"?10:2;Math.abs(V)>h?(qt=C.current)==null||qt.style.setProperty("--swipe-amount",`${_}px`):Math.abs(S)>h&&(dt.current=null)}},Ft&&!t.jsx?s.default.createElement("button",{"aria-label":Ut,"data-disabled":at,"data-close-button":!0,onClick:at||!Y?()=>{}:()=>{var c;Q(),(c=t.onDismiss)==null||c.call(t,t)},className:N(p==null?void 0:p.closeButton,(At=t==null?void 0:t.classNames)==null?void 0:At.closeButton)},s.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},s.default.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),s.default.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))):null,t.jsx||s.default.isValidElement(t.title)?t.jsx||t.title:s.default.createElement(s.default.Fragment,null,I||t.icon||t.promise?s.default.createElement("div",{"data-icon":"",className:N(p==null?void 0:p.icon)},t.promise||t.type==="loading"&&!t.icon?t.icon||Kt():null,t.type!=="loading"?t.icon||(z==null?void 0:z[I])||$e(I):null):null,s.default.createElement("div",{"data-content":"",className:N(p==null?void 0:p.content)},s.default.createElement("div",{"data-title":"",className:N(p==null?void 0:p.title,(_t=t==null?void 0:t.classNames)==null?void 0:_t.title),dangerouslySetInnerHTML:Wt(t.title)}),t.description?s.default.createElement("div",{"data-description":"",className:N(Ht,bt,p==null?void 0:p.description,(j=t==null?void 0:t.classNames)==null?void 0:j.description),dangerouslySetInnerHTML:Wt(t.description)}):null),s.default.isValidElement(t.cancel)?t.cancel:t.cancel&&Xt(t.cancel)?s.default.createElement("button",{"data-button":!0,"data-cancel":!0,style:t.cancelButtonStyle||st,onClick:c=>{Xt(t.cancel)&&Y&&(Q(),t.cancel.onClick(c))},className:N(p==null?void 0:p.cancelButton,(ut=t==null?void 0:t.classNames)==null?void 0:ut.cancelButton)},t.cancel.label):null,s.default.isValidElement(t.action)?t.action:t.action&&Xt(t.action)?s.default.createElement("button",{"data-button":"",style:t.actionButtonStyle||Ct,onClick:c=>{Xt(t.action)&&(t.action.onClick(c),!c.defaultPrevented&&Q())},className:N(p==null?void 0:p.actionButton,(kt=t==null?void 0:t.classNames)==null?void 0:kt.actionButton)},t.action.label):null))};function qe(){if(typeof window=="undefined"||typeof document=="undefined")return"ltr";let a=document.documentElement.getAttribute("dir");return a==="auto"||!a?window.getComputedStyle(document.documentElement).direction:a}var jn=a=>{let{invert:n,position:t="bottom-right",hotkey:r=["altKey","KeyT"],expand:u,closeButton:E,className:y,offset:A,theme:T="light",richColors:mt,duration:wt,style:Dt,visibleToasts:It=kn,toastOptions:m,dir:st=qe(),gap:Ct=Fn,loadingIcon:Bt,icons:Ht,containerAriaLabel:pt="Notifications",pauseWhenPageIsHidden:R,cn:it=Yn}=a,[k,lt]=s.default.useState([]),p=s.default.useMemo(()=>Array.from(new Set([t].concat(k.filter(b=>b.position).map(b=>b.position)))),[k,t]),[z,Ut]=s.default.useState([]),[P,N]=s.default.useState(!1),[Z,gt]=s.default.useState(!1),[Lt,ct]=s.default.useState(T!=="system"?T:typeof window!="undefined"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),et=s.default.useRef(null),xt=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),W=s.default.useRef(null),nt=s.default.useRef(!1),v=s.default.useCallback(b=>lt(f=>f.filter(({id:D})=>D!==b.id)),[]);return s.default.useEffect(()=>q.subscribe(b=>{if(b.dismiss){lt(f=>f.map(D=>D.id===b.id?{...D,delete:!0}:D));return}setTimeout(()=>{Ze.default.flushSync(()=>{lt(f=>{let D=f.findIndex(g=>g.id===b.id);return D!==-1?[...f.slice(0,D),{...f[D],...b},...f.slice(D+1)]:[b,...f]})})})}),[]),s.default.useEffect(()=>{if(T!=="system"){ct(T);return}T==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?ct("dark"):ct("light")),typeof window!="undefined"&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",({matches:b})=>{ct(b?"dark":"light")})},[T]),s.default.useEffect(()=>{k.length<=1&&N(!1)},[k]),s.default.useEffect(()=>{let b=f=>{var g,C;r.every(w=>f[w]||f.code===w)&&(N(!0),(g=et.current)==null||g.focus()),f.code==="Escape"&&(document.activeElement===et.current||(C=et.current)!=null&&C.contains(document.activeElement))&&N(!1)};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[r]),s.default.useEffect(()=>{if(et.current)return()=>{W.current&&(W.current.focus({preventScroll:!0}),W.current=null,nt.current=!1)}},[et.current]),k.length?s.default.createElement("section",{"aria-label":`${pt} ${xt}`,tabIndex:-1},p.map((b,f)=>{var C;let[D,g]=b.split("-");return s.default.createElement("ol",{key:b,dir:st==="auto"?qe():st,tabIndex:-1,ref:et,className:y,"data-sonner-toaster":!0,"data-theme":Lt,"data-rich-colors":mt,"data-y-position":D,"data-x-position":g,style:{"--front-toast-height":`${((C=z[0])==null?void 0:C.height)||0}px`,"--offset":typeof A=="number"?`${A}px`:A||Bn,"--width":`${Un}px`,"--gap":`${Ct}px`,...Dt},onBlur:w=>{nt.current&&!w.currentTarget.contains(w.relatedTarget)&&(nt.current=!1,W.current&&(W.current.focus({preventScroll:!0}),W.current=null))},onFocus:w=>{w.target instanceof HTMLElement&&w.target.dataset.dismissible==="false"||nt.current||(nt.current=!0,W.current=w.relatedTarget)},onMouseEnter:()=>N(!0),onMouseMove:()=>N(!0),onMouseLeave:()=>{Z||N(!1)},onPointerDown:w=>{w.target instanceof HTMLElement&&w.target.dataset.dismissible==="false"||gt(!0)},onPointerUp:()=>gt(!1)},k.filter(w=>!w.position&&f===0||w.position===b).map((w,ht)=>{var I,Y;return s.default.createElement(Gn,{key:w.id,icons:Ht,index:ht,toast:w,duration:(I=m==null?void 0:m.duration)!=null?I:wt,className:m==null?void 0:m.className,descriptionClassName:m==null?void 0:m.descriptionClassName,invert:n,visibleToasts:It,closeButton:(Y=m==null?void 0:m.closeButton)!=null?Y:E,interacting:Z,position:b,style:m==null?void 0:m.style,unstyled:m==null?void 0:m.unstyled,classNames:m==null?void 0:m.classNames,cancelButtonStyle:m==null?void 0:m.cancelButtonStyle,actionButtonStyle:m==null?void 0:m.actionButtonStyle,removeToast:v,toasts:k.filter(Tt=>Tt.position==w.position),heights:z.filter(Tt=>Tt.position==w.position),setHeights:Ut,expandByDefault:u,gap:Ct,loadingIcon:Bt,expanded:P,pauseWhenPageIsHidden:R,cn:it})}))})):null};0&&(module.exports={Toaster,toast}); | ||
/*! Bundled license information: | ||
dompurify/dist/purify.es.mjs: | ||
(*! @license DOMPurify 3.0.10 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.10/LICENSE *) | ||
*/ | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "sonner", | ||
"version": "1.4.3", | ||
"version": "1.4.4", | ||
"description": "An opinionated toast component for React.", | ||
@@ -41,4 +41,6 @@ "exports": { | ||
"@playwright/test": "^1.30.0", | ||
"@types/dompurify": "^3.0.5", | ||
"@types/node": "^18.11.13", | ||
"@types/react": "^18.0.26", | ||
"dompurify": "^3.0.9", | ||
"prettier": "^2.8.4", | ||
@@ -55,3 +57,3 @@ "react": "^18.2.0", | ||
}, | ||
"packageManager": "pnpm@6.32.11" | ||
"packageManager": "pnpm@8.12.1" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
446576
519
11
8