Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Romeo-Rosete/awesome-go #21

Merged
merged 4 commits into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions 2743-b40257244f3e248a.js.download
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2743],{93341:function(e,n,r){"use strict";r.d(n,{j:function(){return i}});var t=r(75965);r(91710);let i=e=>(0,t.jsxs)("svg",{viewBox:"0 0 40 40",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,t.jsx)("path",{d:"M8.40391 25.2768C8.40391 27.5895 6.51466 29.4788 4.20196 29.4788C1.88925 29.4788 0 27.5895 0 25.2768C0 22.9641 1.88925 21.0749 4.20196 21.0749H8.40391V25.2768Z",fill:"#E01E5A"}),(0,t.jsx)("path",{d:"M10.5212 25.2768C10.5212 22.9641 12.4105 21.0749 14.7232 21.0749C17.0359 21.0749 18.9251 22.9641 18.9251 25.2768V35.798C18.9251 38.1107 17.0359 40 14.7232 40C12.4105 40 10.5212 38.1107 10.5212 35.798V25.2768Z",fill:"#E01E5A"}),(0,t.jsx)("path",{d:"M14.7232 8.40391C12.4105 8.40391 10.5212 6.51466 10.5212 4.20196C10.5212 1.88925 12.4105 0 14.7232 0C17.0359 0 18.9251 1.88925 18.9251 4.20196V8.40391H14.7232Z",fill:"#36C5F0"}),(0,t.jsx)("path",{d:"M14.7231 10.5212C17.0358 10.5212 18.9251 12.4104 18.9251 14.7231C18.9251 17.0358 17.0358 18.9251 14.7231 18.9251H4.20195C1.88925 18.9251 0 17.0358 0 14.7231C0 12.4104 1.88925 10.5212 4.20195 10.5212H14.7231Z",fill:"#36C5F0"}),(0,t.jsx)("path",{d:"M31.5961 14.7231C31.5961 12.4104 33.4853 10.5212 35.798 10.5212C38.1107 10.5212 40 12.4104 40 14.7231C40 17.0358 38.1107 18.9251 35.798 18.9251H31.5961V14.7231Z",fill:"#2EB67D"}),(0,t.jsx)("path",{d:"M29.4789 14.7231C29.4789 17.0358 27.5896 18.9251 25.2769 18.9251C22.9642 18.9251 21.075 17.0358 21.075 14.7231V4.20195C21.075 1.88925 22.9642 0 25.2769 0C27.5896 0 29.4789 1.88925 29.4789 4.20195V14.7231Z",fill:"#2EB67D"}),(0,t.jsx)("path",{d:"M25.2769 31.5961C27.5896 31.5961 29.4789 33.4853 29.4789 35.798C29.4789 38.1107 27.5896 40 25.2769 40C22.9642 40 21.075 38.1107 21.075 35.798V31.5961H25.2769Z",fill:"#ECB22E"}),(0,t.jsx)("path",{d:"M25.2769 29.4788C22.9642 29.4788 21.075 27.5895 21.075 25.2768C21.075 22.9641 22.9642 21.0749 25.2769 21.0749H35.7981C38.1108 21.0749 40 22.9641 40 25.2768C40 27.5895 38.1108 29.4788 35.7981 29.4788H25.2769Z",fill:"#ECB22E"})]})},634:function(e,n,r){"use strict";r.d(n,{A:function(){return l}});var t=r(75965),i=r(18145),s=r(60031),a=r(91710);let l=()=>{let[e,n]=a.useState(!1),r=a.useRef(null);return a.useEffect(()=>{let t=()=>{var e;n(!1),null===(e=r.current)||void 0===e||e.focus()};if(e)return addEventListener("resize",t),()=>removeEventListener("resize",t)},[e]),(0,t.jsxs)(s.J2.Root,{open:e,onOpenChange:e=>n(e),children:[(0,t.jsx)(s.J2.Trigger,{"aria-label":"Send feedback",children:(0,t.jsxs)(s.zx,{ref:r,ghost:!0,color:"gray",size:"2",children:[(0,t.jsx)(i.oqE,{})," Feedback?"]})}),(0,t.jsx)(s.J2.Content,{align:"center",collisionPadding:8,height:"180px",size:"1",width:"320px",children:(0,t.jsx)(o,{onCancel:()=>n(!1)})})]})},o=e=>{let{onCancel:n}=e,[r,l]=a.useState(()=>window.localStorage.getItem("@workos/feedback")||""),[o,c]=a.useState("idle");return(a.useEffect(()=>{window.localStorage.setItem("@workos/feedback",r)},[r]),"success"===o)?(0,t.jsxs)(s.kC,{align:"center",direction:"column",gap:"2",height:"100%",justify:"center",pb:"2",px:"9",style:{textAlign:"center"},children:[(0,t.jsx)(i.TkB,{height:"24",width:"24"}),(0,t.jsxs)(s.kC,{align:"center",direction:"column",children:[(0,t.jsx)(s.xv,{size:"2",weight:"bold",children:"Thank you!"}),(0,t.jsx)(s.xv,{as:"p",color:"gray",size:"2",children:"Your feedback helps us improve\xa0WorkOS."})]})]}):"error"===o?(0,t.jsxs)(s.kC,{align:"center",direction:"column",gap:"2",height:"100%",justify:"center",pb:"2",px:"8",style:{textAlign:"center"},children:[(0,t.jsx)(i.FsW,{height:"24",width:"24"}),(0,t.jsxs)(s.kC,{align:"center",direction:"column",children:[(0,t.jsx)(s.xv,{size:"2",weight:"bold",children:"Huh, something went wrong"}),(0,t.jsx)(s.xv,{as:"p",color:"gray",size:"2",children:"We saved your message in this browser. Please retry later."})]})]}):(0,t.jsx)("form",{style:{display:"contents"},onSubmit:async e=>{var n;if(e.preventDefault(),r){c("submitting");try{if((await fetch("".concat("https://api.workos.com","/feedback"),{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:r,page:window.location.href})})).ok)l(""),c("success");else throw Error("Couldn’t fetch the API.")}catch(e){c("error")}return}null===(n=e.currentTarget.querySelector("textarea"))||void 0===n||n.focus()},children:(0,t.jsxs)(s.kC,{direction:"column",gap:"3",height:"100%",children:[(0,t.jsx)(s.xu,{asChild:!0,flexGrow:"1",children:(0,t.jsx)(s.Kx,{name:"feedback",placeholder:"Help us improve the dashboard",state:"submitting"===o?"read-only":"normal",value:r,onChange:e=>l(e.target.value)})}),(0,t.jsxs)(s.kC,{gap:"2",justify:"end",children:[(0,t.jsx)(s.zx,{color:"gray",size:"1",onClick:()=>n(),children:"Cancel"}),(0,t.jsx)(s.zx,{color:"purple",size:"1",state:"submitting"===o?"loading":"normal",type:"submit",children:"Send"})]})]})})}},73498:function(e,n,r){"use strict";r.d(n,{L:function(){return h}});var t=r(75965),i=r(18145),s=r(60031);r(91710);var a=r(4355),l=r(93341),o=r(24453);let c=e=>{let{iconSize:n="1",headingSize:r="2"}=e,{status:i,inviteToSlackChannel:c,generateSlackChannel:d,url:h}=(0,o.H)();switch(i){case"pending":case"not-authorized-to-create":return null;case"integration-complete":return(0,t.jsx)(s.Zb,{asChild:!0,variant:"ghost",children:(0,t.jsx)("a",{href:null!=h?h:void 0,rel:"noreferrer",target:"_blank",children:(0,t.jsxs)(s.kC,{align:"center",gap:"4",children:[(0,t.jsx)(s.gW,{size:n,children:(0,t.jsx)(l.j,{})}),(0,t.jsxs)(s.xu,{children:[(0,t.jsx)(s.X6,{as:"h4",size:r,children:(0,t.jsx)(s.kC,{align:"center",gap:"1",children:"Open your shared Slack channel"})}),(0,t.jsx)(s.xv,{as:"p",size:"2",style:{maxWidth:360},children:"Depending on your Slack permissions you may need an invite to join."})]})]})})});case"requires-invite":return(0,t.jsx)(s.Zb,{asChild:!0,variant:"ghost",children:(0,t.jsx)("button",{onClick:c,children:(0,t.jsxs)(s.kC,{align:"center",gap:"4",children:[(0,t.jsx)(s.gW,{size:n,children:(0,t.jsx)(l.j,{})}),(0,t.jsxs)(s.xu,{children:[(0,t.jsx)(s.X6,{as:"h4",size:r,children:(0,t.jsx)(s.kC,{align:"center",gap:"1",children:"Request an invite"})}),(0,t.jsx)(s.xv,{as:"p",size:"2",style:{maxWidth:360},children:"Join your team’s shared Slack channel with WorkOS."})]})]})})});case"generating-channel":return(0,t.jsx)(s.Zb,{variant:"ghost",children:(0,t.jsxs)(s.kC,{align:"center",gap:"4",children:[(0,t.jsx)(s.gW,{size:n,children:(0,t.jsx)(l.j,{})}),(0,t.jsxs)(s.xu,{children:[(0,t.jsx)(s.X6,{as:"h4",size:r,style:{color:"var(--gray-11)"},children:(0,t.jsx)(s.kC,{align:"center",gap:"1",children:"Creating your channel..."})}),(0,t.jsx)(s.xv,{as:"p",color:"gray",size:"2",style:{maxWidth:360},children:"Once created, you’ll receive an invitation via email to join the Slack channel."})]})]})});case"requires-channel":return(0,t.jsx)(s.Zb,{asChild:!0,variant:"ghost",children:(0,t.jsx)("button",{onClick:d,children:(0,t.jsxs)(s.kC,{align:"center",gap:"4",children:[(0,t.jsx)(s.gW,{size:n,children:(0,t.jsx)(l.j,{})}),(0,t.jsxs)(s.xu,{children:[(0,t.jsx)(s.X6,{as:"h4",size:r,children:(0,t.jsx)(s.kC,{align:"center",gap:"1",children:"Create a shared Slack channel"})}),(0,t.jsx)(s.xv,{as:"p",size:"2",style:{maxWidth:360},children:"Get personalized integration support directly with our engineers."})]})]})})});default:return(0,a.unreachable)(i)}};var d=r(28921);let h=e=>{let{children:n}=e,[r]=(0,d.l)();return(0,t.jsxs)(s.J2.Root,{children:[(0,t.jsx)(s.J2.Trigger,{"aria-label":"Help",children:n}),(0,t.jsx)(s.J2.Content,{align:"center",collisionPadding:8,size:"3",width:"380px",children:(0,t.jsxs)(s.rj,{columns:"1",gap:"5",children:[(0,t.jsx)(c,{}),(0,t.jsx)(s.Zb,{asChild:!0,size:"1",variant:"ghost",children:(0,t.jsx)("a",{href:"https://workos.com/docs",rel:"noreferrer",target:"_blank",children:(0,t.jsxs)(s.kC,{align:"center",gap:"4",children:[(0,t.jsx)(s.gW,{size:"1",children:(0,t.jsx)(i.LOy,{strokeWidth:1.5})}),(0,t.jsxs)("div",{children:[(0,t.jsx)(s.X6,{as:"h4",size:"2",children:(0,t.jsxs)(s.kC,{align:"center",gap:"1",children:["Read the docs",(0,t.jsx)(i.s7Z,{style:{color:"var(--gray-11)"}})]})}),(0,t.jsx)(s.xv,{as:"p",size:"2",children:"Extensive guides for each feature and a\xa0complete API\xa0reference."})]})]})})}),(0,t.jsx)(s.Zb,{asChild:!0,size:"1",variant:"ghost",children:(0,t.jsx)("button",{onClick:()=>r(),children:(0,t.jsxs)(s.kC,{align:"center",gap:"4",children:[(0,t.jsx)(s.gW,{size:"1",children:(0,t.jsx)(i._MN,{strokeWidth:1.5})}),(0,t.jsxs)("div",{children:[(0,t.jsx)(s.X6,{as:"h4",size:"2",children:"Contact us"}),(0,t.jsx)(s.xv,{as:"p",size:"2",children:"Need help with something else? Contact\xa0our support\xa0team."})]})]})})})]})})]})}},92979:function(e,n,r){"use strict";r.r(n),r.d(n,{PageLoading:function(){return l}});var t=r(75965),i=r(60031),s=r(91710),a=r(376);let l=e=>{let{metadata:n,triggerTimer:r=!1}=e;return s.useEffect(()=>{if(r){let e=setTimeout(()=>{(0,a.D)(Error("PageLoading component has been mounted for more than 15 seconds"),{tags:n})},15e3);return()=>{clearTimeout(e)}}},[n,r]),(0,t.jsx)(i.kC,{align:"center",justify:"center",style:{minHeight:"100vh"},width:"100%",children:(0,t.jsx)(i.Ex,{})})}},65010:function(e,n,r){"use strict";r.r(n),r.d(n,{Root:function(){return m}});var t=r(75965),i=r(18145),s=r(60031);r(91710);var a=r(72360),l=r(77058),o=r(84114);let c=()=>{var e,n;let r=(0,l.useRouter)(),{user:i}=(0,o.useAuth)();return i?(0,t.jsxs)(s.h_.fC,{children:[(0,t.jsx)(s.h_.xz,{children:(0,t.jsx)(s.hU,{"aria-label":"Your profile",children:(0,t.jsx)(s.qE.f,{src:"/api/avatar?name=".concat(null!==(e=i.name)&&void 0!==e?e:i.email),children:(0,t.jsx)(s.qE.x,{children:(null!==(n=i.name)&&void 0!==n?n:i.email).toUpperCase()[0]})})})}),(0,t.jsxs)(s.h_.VY,{align:"end",style:{minWidth:148},children:[(0,t.jsxs)(s.kC,{align:"start",direction:"column",m:"3",children:[(0,t.jsx)(s.xv,{highContrast:!0,size:"2",trim:"start",weight:"bold",children:i.name}),(0,t.jsx)(s.xv,{color:"gray",size:"2",children:i.email})]}),(0,t.jsx)(s.h_.Z0,{}),(0,t.jsx)(s.h_.ck,{onSelect:()=>r.push("/settings/user"),children:"User Settings"}),(0,t.jsx)(s.h_.ck,{onSelect:()=>r.push("/settings/team"),children:"Workspace Settings"}),(0,t.jsx)(s.h_.Z0,{}),(0,t.jsx)(s.h_.ck,{onSelect:()=>{window.location.replace("/api/logout")},children:"Sign out"})]})]}):null};var d=r(634),h=r(91623),u=r(47423),x=r(89352);let g=()=>{let{theme:e,setTheme:n,resolvedTheme:r}=(0,h.F)();return(0,t.jsx)(s.Tl,{theme:e,onThemeChange:e=>{n(e),(0,u.HV)({theme:e}),x.c.identify({theme:"system"===e?r:e})}})};var p=r(73498),j=r(75800),f=r.n(j);let m=e=>{let{children:n}=e;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("header",{className:f().PageRootHeader,children:(0,t.jsxs)(s.kC,{align:"center",gap:"1",height:"100%",justify:"between",pr:{initial:"4",sm:"5"},children:[(0,t.jsx)(a.O.g7,{children:(0,t.jsx)(s.kC,{display:{initial:"none",sm:"flex"},pl:{initial:"4",sm:"5"},width:"100%",style:{flexShrink:1,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}})}),(0,t.jsxs)(s.kC,{align:"center",display:{initial:"none",sm:"flex"},gap:"4",height:"100%",justify:"end",width:"100%",children:[(0,t.jsx)(s.kC,{display:{initial:"none",sm:"flex"},children:(0,t.jsx)(p.L,{children:(0,t.jsxs)(s.zx,{ghost:!0,color:"gray",size:"2",children:[(0,t.jsx)(i.pjG,{})," Help"]})})}),(0,t.jsx)(s.kC,{display:{initial:"none",sm:"flex"},children:(0,t.jsx)(d.A,{})}),(0,t.jsx)(s.rU,{color:"gray",href:"https://workos.com/docs",size:"2",target:"_blank",children:(0,t.jsxs)(s.kC,{align:"center",gap:"1",slot:"span",children:[(0,t.jsx)(i.LOy,{}),"Docs"]})}),(0,t.jsx)(g,{}),(0,t.jsx)(c,{})]})]})}),(0,t.jsx)("main",{children:(0,t.jsx)(s.xu,{pb:"9",pt:{initial:"5",sm:"4"},px:"5",style:{margin:"0 auto",maxWidth:"72rem"},children:n})})]})}},24453:function(e,n,r){"use strict";r.d(n,{H:function(){return o}});var t=r(10782),i=r(14097),s=r(41620),a=r(64136),l=r(48863);function o(){var e,n;let{showToast:r}=(0,l.pm)(),o=(0,s.useTeamHasFeature)("feature:support:slack"),{data:c,refetch:d,isSuccess:h}=(0,i.NN8)(void 0,{enabled:o,staleTime:(0,t.Z)(5),select:e=>e.currentTeam}),u=null==c?void 0:c.slackChannels[0],x=null==c?void 0:c.unassociatedSlackChannels[0],g=(0,i.r1z)(),p=(0,i.VZT)(),j=h&&!!u,f=null!==(e=null==u?void 0:u.externalChannelId)&&void 0!==e?e:null,m=null!==(n=null==u?void 0:u.slackTeamId)&&void 0!==n?n:null,v=j&&!!f;return{status:o&&!h?"pending":o&&(u||!x)?v&&m?"integration-complete":v?"requires-invite":j&&!f?"generating-channel":"requires-channel":"not-authorized-to-create",url:f&&m?"https://slack.com/app_redirect?channel=".concat(f,"&team=").concat(m):null,inviteToSlackChannel:()=>p.mutate({},{onSuccess:()=>{d(),r({title:"Invite requested successfully",description:"Check your email for an invitation to join the channel."})},onError:e=>{(0,a.H)(e)}}),generateSlackChannel:()=>g.mutate({},{onSuccess:()=>{d()},onError:e=>{(0,a.H)(e)}})}}},28921:function(e,n,r){"use strict";r.d(n,{l:function(){return c}});var t=r(16070),i=r.n(t),s=r(19107),a=r(84114);let l=e=>{let n=e=>n=>(0,s.hasProperty)(e)(n)&&i().function_(n[e]);return i().object(e)&&n("identify")(e)&&n("show")(e)&&n("activate")(e)},o=e=>i().object(e)&&(0,s.hasProperty)("zE")(e)&&l(e.zE);function c(e){let{user:n}=(0,a.useAuth)();return[function(){if(o(window)){let e=n?{name:n.name,email:n.email}:{};window.zE.identify(e),window.zE.show(),window.zE.activate();return}let r=(null==e?void 0:e.emailSupport)?null==e?void 0:e.emailSupport:"support@workos.com";window.location.assign("mailto:".concat(r))}]}},64136:function(e,n,r){"use strict";r.d(n,{H:function(){return i}});var t=r(376);let i=e=>{if(e instanceof Error&&e.message.includes("Forbidden resource:"))return;let n=JSON.stringify(e);(0,t.D)(e instanceof Error?e:n)}},47423:function(e,n,r){"use strict";r.d(n,{kA:function(){return W},Qj:function(){return H},PP:function(){return A},kn:function(){return _},TF:function(){return T},zN:function(){return R},U1:function(){return E},PF:function(){return Z},fD:function(){return D},aA:function(){return V},PL:function(){return N},HV:function(){return O},Ck:function(){return P},Gs:function(){return Y}});var t=r(71607);let i=t.wY({keyId:t.Z_,environment:t.wY({id:t.Z_,isSandbox:t.O7})},"API Key Copied"),s=t.wY({},"ApiLogIdCopied"),a=t.wY({},"BillingLinkViewed"),l=t.wY({},"BillingInformationAdded"),o=t.wY({team:t.wY({id:t.Z_}),environment:t.wY({id:t.Z_,isSandbox:t.O7})},"Client Id Copied"),c=t.wY({filename:t.Z_},"ComplianceDocumentDownloaded"),d=t.wY({},"ComplianceServiceTermsAccepted"),h=t.wY({dialogName:t.mM({billing:void 0}),team:t.wY({id:t.Z_}),environment:t.wY({id:t.Z_,isSandbox:t.O7})},"Dialog viewed"),u=t.wY({},"DomainAddedToOrganization"),x=t.wY({category:t.Z_,preference:t.Z_},"EmailNotificationPreferencesUpdated"),g=t.wY({withDomains:t.G0([t.O7,t.S1])},"OrganizationCreated"),p=t.wY({name:t.Z_,path:t.Z_,referrer:t.Z_,title:t.Z_,url:t.Z_},"Page Viewed"),j=t.wY({team:t.wY({id:t.Z_}),environment:t.wY({id:t.Z_,isSandbox:t.O7})},"Redirect URI dashboard Clicked"),f=t.wY({theme:t.Z_},"ThemeChanged"),m=t.wY({hasResetForm:t.O7,hasTypedEmail:t.O7,hasTypedPassword:t.O7,hasFailedPasswordValidation:t.O7},"UserAbandonedSignUp"),v=t.wY({domain:t.G0([t.Z_,t.S1])},"UserChangedEmailBecauseOfTeamDomainGuard"),C=t.wY({count:t.pk},"UserInvitedMembersOnboarding"),w=t.wY({},"UserSkippedInviteMembersOnboarding"),k=t.wY({},"WebhookSecretCopied");var y=r(92827),b=r(376),z=r(89352);let S=e=>function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.decode(n);if(y.isLeft(r))return(0,b.D)(TypeError("Malformed Analytic Event Payload: ".concat(e.name)));z.c.track(e.name,r.right)};S(s),S(a);let _=S(c),T=S(d),E=S(u),Z=S(x);S(g);let O=S(f),P=S(m),Y=S(v),H=S(l),W=S(i),D=S(C);S(j);let N=S(w);S(k);let R=S(h),A=S(o),V=S(p)},48863:function(e,n,r){"use strict";r.d(n,{VW:function(){return m},pm:function(){return v}});var t=r(75965),i=r(20433),s=r.n(i),a=r(91710),l=r(8490),o=r(40187),c=r.n(o),d=r(60031);let h=a.forwardRef((e,n)=>{let{children:r,...i}=e;return(0,t.jsx)(l.dk,{...i,ref:n,asChild:!0,children:(0,t.jsx)(d.xv,{as:"p",size:"2",children:r})})});h.displayName="ToastDescription";let u=a.forwardRef((e,n)=>{let{appearance:r,children:i,className:a,...l}=e;return(0,t.jsx)("div",{...l,ref:n,className:s()("flex h-6 w-6 items-center justify-center",{"rounded-full bg-green-light text-green-dark":"green"===r,"rounded-full bg-red-light text-red-dark":"red"===r}),children:i})});u.displayName="ToastIcon";let x=a.forwardRef((e,n)=>{let{children:r,...i}=e;return(0,t.jsx)(l.Dx,{...i,ref:n,asChild:!0,children:(0,t.jsx)(d.X6,{as:"h2",size:"2",children:r})})});x.displayName="ToastTitle";let g=a.forwardRef((e,n)=>{let{children:r,...i}=e;return(0,t.jsx)(l.l_,{...i,ref:n,className:"fixed right-6 bottom-6"})});g.displayName="ToastViewport";let p=a.forwardRef((e,n)=>{let{appearance:r="minimal",className:i,children:a,...o}=e;return(0,t.jsx)(l.fC,{...o,ref:n,asChild:!0,children:(0,t.jsx)("div",{className:s()(c().ToastRoot,"min-w-64 rounded border bg-white p-2.5 shadow-md dark:bg-gray-darkmode-100",{"border-gray-lightmode-200 dark:border-gray-darkmode-200":"minimal"===r,"border-green-lightmode-700 dark:border-green-darkmode-700":"green"===r,"border-red-lightmode-700 dark:border-red-darkmode-700":"red"===r},i),children:a})})});p.displayName="Toast";let j=Object.assign(p,{Action:l.gD,Description:h,Icon:u,Provider:l.VW,Title:x,Viewport:g}),f=a.createContext(null),m=e=>{let{children:n}=e,[r,i]=a.useState(!1),[l,o]=a.useState("green"),[c,d]=a.useState(null),[h,u]=a.useState(null),[x,g]=a.useState(null),p=a.useCallback(e=>{let{appearance:n="green",title:r,description:t,icon:s}=e;d(r),o(n),u(t),i(!0),g(s)},[]);return(0,t.jsxs)(f.Provider,{value:{showToast:p},children:[n,(0,t.jsxs)(j.Provider,{children:[(0,t.jsxs)(j,{appearance:l,className:s()({"flex items-start gap-2":x}),open:r,onOpenChange:e=>i(e),children:[x&&(0,t.jsx)(j.Icon,{appearance:l,children:x}),(0,t.jsxs)("div",{children:[(0,t.jsx)(j.Title,{children:c}),h&&(0,t.jsx)(j.Description,{children:h})]})]}),(0,t.jsx)(j.Viewport,{})]})]})},v=()=>{let e=a.useContext(f);if(!e)throw TypeError("`useToast` must be called from within an `ToastProvider`");return e}},17600:function(e,n,r){"use strict";var t=Object.create?function(e,n,r,t){void 0===t&&(t=r);var i=Object.getOwnPropertyDescriptor(n,r);(!i||("get"in i?!n.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return n[r]}}),Object.defineProperty(e,t,i)}:function(e,n,r,t){void 0===t&&(t=r),e[t]=n[r]};Object.defineProperty(n,"__esModule",{value:!0}),function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)}(r(97160),n)},97160:function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.hasProperty=void 0,n.hasProperty=e=>n=>e in n},19107:function(e,n,r){"use strict";e.exports=r(17600)},75800:function(e){e.exports={PageRootHeader:"page_PageRootHeader__ThX2q"}},40187:function(e){e.exports={ToastRoot:"toast_ToastRoot__Us3w6"}}}]);
1 change: 1 addition & 0 deletions 31-04508cbd608678bd.js.download

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions 4097-96b857b61e5eb28c.js.download

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions 8158-07136c57de6190db.js.download

Large diffs are not rendered by default.

Loading