PageSourceSearch

https://dashboard.cohere.com/_next/static/chunks/1571-ea1aa1eb49eb36a1.js

js cohere.com collected 2026-09-24 09:11:33 UTC 11,200 bytes, 1 lines download raw bytes

1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="4490519a-ce82-46e7-b746-36c130c21be9",e._sentryDebugIdIdentifier="sentry-dbid-4490519a-ce82-46e7-b746-36c130c21be9")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1571],{29141:(e,n,r)=>{r.d(n,{R_:()=>y,TI:()=>p,Vu:()=>g,_s:()=>b,aD:()=>x,kM:()=>I,oC:()=>m,p_:()=>w,tg:()=>h,um:()=>f,xD:()=>v});var t=r(46587),a=r(97990),i=r.n(a),s=r(27541),u=r(92108),o=r(96589),l=r(80166),c=r(76944),d=r(88557),f=function(e){var n,r=e.query,a=(0,c.Q)();return(0,s.I)({queryKey:["listUsers",r.organization_id,r.offset,r.limit,r.email],queryFn:(n=(0,t.A)(i().mark(function e(){var n;return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.listUsers({query:r});case 2:return n=e.sent.users,e.abrupt("return",n);case 5:case"end":return e.stop()}},e)})),function(){return n.apply(this,arguments)}),enabled:!!r.organization_id,placeholderData:u.rX})},m=function(e){var n,r=e.enabled,a=(0,c.Q)();return(0,s.I)({queryKey:["listInvites"],queryFn:(n=(0,t.A)(i().mark(function e(){return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.listInvites();case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e)})),function(){return n.apply(this,arguments)}),enabled:r})},p=function(){var e,n=(0,c.Q)();return(0,o.n)({mutationFn:(e=(0,t.A)(i().mark(function e(r){var t,a;return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.userID,a=r.role,e.next=3,n.updateUserRole({userID:t,role:a});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}},e)})),function(n){return e.apply(this,arguments)})})},v=function(){var e,n=(0,c.Q)();return(0,o.n)({mutationFn:(e=(0,t.A)(i().mark(function e(r){var t;return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.userID,e.next=3,n.deleteUser({userID:t});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}},e)})),function(n){return e.apply(this,arguments)})})},h=function(){var e,n=(0,l.jE)(),r=(0,c.Q)();return(0,o.n)({mutationFn:(e=(0,t.A)(i().mark(function e(n){var t;return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.inviteID,e.next=3,r.invalidateInvite({inviteID:t});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}},e)})),function(n){return e.apply(this,arguments)}),onSuccess:function(){n.invalidateQueries({queryKey:["listInvites"]})}})},x=function(){var e,n=(0,l.jE)(),r=(0,c.Q)();return(0,o.n)({mutationFn:(e=(0,t.A)(i().mark(function e(n){var t,a,s;return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.email,a=n.organizationID,s=n.role,e.next=3,r.inviteUser({email:t,role:s,organizationID:a,expiry:d.RZ.ONE_DAY});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}},e)})),function(n){return e.apply(this,arguments)}),onSuccess:function(){n.invalidateQueries({queryKey:["listInvites"]})}})},g=function(){var e,n=(0,l.jE)(),r=(0,c.Q)();return(0,o.n)({mutationFn:(e=(0,t.A)(i().mark(function e(t){var a,s,u,o,l,c;return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.organizationID,s=t.role,!(u=n.getQueryData(["listInvites"]))||!(l=null==(o=u.invites)?void 0:o.find(function(e){var n;return e.role===s&&!!e.link&&e.valid&&e.max_uses>(null!=(n=e.num_uses)?n:0)&&new Date(e.valid_before).getTime()>new Date().getTime()}))){e.next=6;break}return e.abrupt("return",l.link);case 6:return e.next=8,r.createInviteLink({maxUses:100,role:s,organizationID:a,expiry:d.RZ.ONE_WEEK});case 8:return c=e.sent,e.abrupt("return",c.inviteLink);case 10:case"end":return e.stop()}},e)})),function(n){return e.apply(this,arguments)}),onSuccess:function(){n.invalidateQueries({queryKey:["listInvites"]})}})},b=function(){var e,n=(0,c.Q)(),r=(0,l.jE)();return(0,o.n)({mutationFn:(e=(0,t.A)(i().mark(function e(){return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.deleteOwnAccount();case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e)})),function(){return e.apply(this,arguments)}),onSuccess:function(){r.invalidateQueries({queryKey:["isAccountDeleti
1onRequested"]})}})},y=function(){var e,n=(0,c.Q)();return(0,o.n)({mutationFn:(e=(0,t.A)(i().mark(function e(r){var t;return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.inviteHash,e.next=3,n.acceptInvite({inviteHash:t});case 3:case"end":return e.stop()}},e)})),function(n){return e.apply(this,arguments)})})},I=function(){var e,n=(0,c.Q)();return(0,o.n)({mutationFn:(e=(0,t.A)(i().mark(function e(r){var t;return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.inviteHash,e.next=3,n.rejectInvite({inviteHash:t});case 3:case"end":return e.stop()}},e)})),function(n){return e.apply(this,arguments)})})},w=function(e){var n=(0,c.Q)();return(0,s.I)({queryKey:["getInviteInfo",e],queryFn:function(){return n.getInviteInfo({inviteHash:e})},retry:!1})}},69866:(e,n,r)=>{r.d(n,{EZ:()=>l,z4:()=>o});var t=r(46587),a=r(97990),i=r.n(a),s=r(27541),u=r(76944),o=function(){return!0},l=function(){var e,n=(0,u.Q)();return(0,s.I)({queryKey:["getUserVerifiedOrgs"],queryFn:(e=(0,t.A)(i().mark(function e(){return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.getUserVerifiedOrgs();case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e)})),function(){return e.apply(this,arguments)}),enabled:!0,refetchOnWindowFocus:!1})}},98479:(e,n,r)=>{r.d(n,{FM:()=>g,zY:()=>h,PE:()=>x,Ay:()=>b});var t=r(98429),a=r(41695),i=r(88557),s=r(93414),u=r(2644),o=r(47477),l=r(32580),c=r(23350),d=r(69866),f=r(64255);let m=function(e){var n=e.user,r=(0,d.EZ)().data,t=null==r?void 0:r.res,a=null!=t&&t.inVerifiedOrg?t.verifiedOrgs.find(function(e){return e.id===n.organization.id}):void 0;return(0,f.jsx)("div",{className:"flex flex-col items-center","data-component":"LimitedUserBanner","data-source-file":"LimitedUserBanner.tsx",children:(0,f.jsxs)(o.EY,{className:"text-center","data-element":"Text","data-source-file":"LimitedUserBanner.tsx",children:["Your account has limited access and is pending admin approval by"," ",null==a?void 0:a.orgAdminEmails[0],". Meanwhile, try"," ",(0,f.jsx)(o.gH,{theme:"danger",label:"Coral",href:c._.NEXT_PUBLIC_CHAT_URL,"data-element":"InlineLink","data-source-file":"LimitedUserBanner.tsx"})," or the"," ",(0,f.jsx)(o.gH,{theme:"danger",label:"Playground",href:c._.NEXT_PUBLIC_PLAYGROUND_URL,"data-element":"InlineLink","data-source-file":"LimitedUserBanner.tsx"}),"!"]})})};var p="0001-01-01T00:00:00Z";let v=function(e){var n=e.isCutoff,r=e.cutoffReason,t=e.futureCutoffTime,a=t&&t!==p;if(!n&&!a)return null;var s="".concat(c._.NEXT_PUBLIC_DASHBOARD_URL,"/billing?tab=payment}");switch(r){case i.SK.PAYMENT_FAILED:var u=t&&t!==p?"".concat((0,l.Lu)(t)," at ").concat((0,l.Ey)(t)):null;return(0,f.jsxs)(o.EY,{className:"text-center",children:["Your API usage ",n?"is":"will become"," restricted because of a payment failure"," ",!n&&"on ".concat(u),". Please visit the"," ",(0,f.jsx)(o.gH,{theme:"danger",label:"payment page",href:s})," to remediate the issue or contact"," ",(0,f.jsx)(o.gH,{theme:"danger",href:"mailto:[email protected]",label:"[email protected]"}),"."]});case i.SK.BALANCE_LIMIT_REACHED:return(0,f.jsxs)(o.EY,{className:"text-center",children:["Maximum billing reached for this month as set in"," ",(0,f.jsx)(o.gH,{theme:"danger",label:"your dashboard",href:s}),", please increase your maximum billing limit to continue using the APIs. Your billing capacity will reset at the beginning of next month."]});case i.SK.NO_PAYMENT_ON_FILE:return(0,f.jsxs)(o.EY,{className:"text-center",children:["Your API usage is restricted because you do not have a payment method on file. Please visit the ",(0,f.jsx)(o.gH,{theme:"danger",label:"payment page",href:s})," to remediate the issue or contact"," ",(0,f.jsx)(o.gH,{theme:"danger",href:"mailto:[email protected]",label:"[email protected]"}),"."]});case i.SK.NOT_PROD_USER:case i.SK.UNKNOWN:default:return null}};var h=function(e){var n=e.children;return e.theme,e.overridePadding,(0,f.jsx)(f.Fragment,{children:n})},x=function(e){var n=e.children;return(0,f.jsx)(f.Fragment,{children:n})},g=function(e){var n=e.children;return(0,f.jsx)(f.Fragment,{children:n})};let b=function(e){var n,r,c,d=e.title,p=e.mainClassName,b=e.children,y=(0,t.useRouter)(),I=(0,s.wV)().session,w=(0,o.lk)(),_=(0,u.u)(l.$v.orgCutoff),N=null==I?void 0:I.user.organization,E=[i.SK.BALANCE_LIMIT_REACHED,i.SK.NO_PAYMENT_ON_FILE,i.SK.PAYMENT_FAILED],j=(null==N?void 0:N.cutoff_reason)&&E.includes(N.cutoff_reason),A=_&&j?(0,f.jsx)(v,{isCutoff:null==N?void 0:N.is_cutoff,cutoffReason:N.cutoff_reason,futureCutoffTime:N.future_cutoff_time}):null,k=(null==I?void 0:I.user.role)==="LIMITED",D=k?{label:(0,f.jsx)(m,{user:null==I?void 0:I.user}),theme:"neutral"}:A?{label:A,theme:"error"}:void 0,P=(0,u.r1)().hasValidPayment,L={},U=null,C=null,F=null;return a.Children.toArray(b).forEach(function(e){if(a.isValidElement(e)){var n=e.props;if(e.type===h){U=e;var r=n.theme,t=n.overridePadding;L={theme:null!=r?r:"marble",overridePadding:null!=t&&t};return}if(e.type===x){C=e;return}if(e.type===g){F=e;return}}}),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(u.ec,{title:d,"data-element":"PageHead","data-source-file":"Page.tsx"}),(0,f.jsx)("div",{className:"h-full w-full bg-mushroom-100",children:(0,f.jsxs)("div",{className:"mx-auto flex h-screen w-screen max-w-page flex-1 flex-col overflow-y-auto md:overflow-y-visible",children:[(0,f.jsx)("div",{className:"m-3",children:(0,f.jsx)(u.yk,{app:"dashboard",userSession:null==I?void 0:I.user,currentRoute:y.pathname,className:"w-full",isPaidUser:!!P,globalBannerProps:D,"data-element":"NavigationBar","data-source-file":"Page.tsx"})}),(0,f.jsxs)("div",{className:(0,l.cn)("flex w-full flex-grow justify-self-center pb-3 md:gap-x-3","md:h-[calc(100vh-74px)]"),children:[(0,f.jsx)("div",{className:"ml-3 hidden md:flex",onClick:function(){return k?w.info("This feature is not available in limited accounts."):""},children:(0,f.jsx)(u.pV,{className:(0,l.cn)({"pointer-events-none":k}),userSession:null==I?void 0:I.user,currentRoute:y.pathname,app:"dashboard",isPaidUser:!!P,"data-element":"SubN
1avigation","data-source-file":"Page.tsx"})}),(0,f.jsxs)("main",{className:"mx-3 flex h-full w-full flex-grow flex-col overflow-y-auto rounded-lg border border-marble-400 bg-marble-100 md:ml-0",children:[(0,f.jsx)("div",{className:(0,l.cn)("mb-8 border-b border-marble-400 bg-cover md:mb-10","flex-shrink-0",{"px-4 py-6 md:px-9 md:py-10 lg:px-10":!(null!=(n=L)&&n.overridePadding)},{"bg-mushroom-50 bg-[url(/images/whiteCellBackground.svg)]":(null==(r=L)?void 0:r.theme)==="mushroom","bg-[url(/images/mushroomCellBackground.svg)]":(null==(c=L)?void 0:c.theme)==="marble"}),children:U}),(0,f.jsx)("div",{className:(0,l.cn)("flex-grow px-4 pb-10 md:px-9 lg:px-10",p),children:C}),F&&(0,f.jsx)("div",{className:"flex-shrink-0 border-t border-marble-400",children:(0,f.jsx)("div",{className:"px-4 py-6 md:px-9 lg:px-10",children:F})})]})]})]})})]})}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.