1import{u as h,f as p,r as b,j as e}from"./vendor-react-Bq0AAjM7.js";import{M as m,au as y,b3 as I,e as x,aK as j,F as w,A as v,v as C,bW as T,bX as O,aL as R}from"./main-D49UUfSD.js";import"./vendor-runtime-DG-GlVKR.js";import"./index-Dl4pFCyo.js";import"./vendor-misc-DMccS2Mw.js";import"./vendor-ui-HM9MEgw-.js";import"./vendor-icons-DePtd98t.js";import"./vendor-analytics-DaFEZfd9.js";import"./vendor-sentry-BBJkNfRx.js";try{let t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new t.Error().stack;n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="391ff9cf-3ea1-4aa3-b377-0dae95afd244",t._sentryDebugIdIdentifier="sentry-dbid-391ff9cf-3ea1-4aa3-b377-0dae95afd244")}catch{}const k=()=>{var r,i;const{integration:t}=h(),n=p(),{memberships:{value:a}}=m(),{organisationId:g}=y(),o=g??((i=(r=a==null?void 0:a[0])==null?void 0:r.data())==null?void 0:i.organisationId),{handleOauthRedirect:l}=I();return b.useEffect(()=>{const s=t??"",c=Object.values(x).includes(s);if(!c||!o){j({action:"connect integration",fix:c?"Sign in to an organization, then try again.":"This integration isnât supported. Check the link."}),n("/org",{replace:!0});return}const d=async u=>{try{await l({organisationId:o,integrations:[u]})}catch(f){console.error("Failed to redirect to OAuth",f),R({action:"connect integration",onRetry:()=>void d(u)}),n("/org",{replace:!0})}};d(s)},[t,o]),e.jsx(w,{title:"Connectingâ¦"})},z=()=>e.jsx(v,{children:e.jsx(C,{children:e.jsx(T,{children:e.jsx(O,{children:e.jsx(k,{})})})})});export{k as ConnectIntegrationPage,z as ConnectIntegrationRoute};
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.