1import{_ as V}from"./AuthFormsLayout.vue_vue_type_script_setup_true_lang-DjCYYYGy.js";import{aT as B,d as q,u as U,g as H,j as p,N as R,i as $,o as d,b2 as G,w as h,f as t,a as f,m as K,C as M,c as _,x as y,am as W,e as s,p as Y,t as n,y as j,F as J,k as P,fm as z,fn as v,_ as Q}from"./index-CwvcCfb3.js";import{_ as X}from"./Alert.vue_vue_type_script_setup_true_lang-Cu7Jhth2.js";import{_ as Z}from"./BrandefenseLogo.vue_vue_type_style_index_0_lang-C4Ubuw-J.js";import{b as D}from"./route-block-BIO7NrfO.js";import"./Grid.vue_vue_type_script_setup_true_lang-DXvZpjcH.js";import"./GridItem-C_T1Vc8G.js";try{let r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},m=new r.Error().stack;m&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[m]="729dfce0-a4e8-4671-a000-3e1341264964",r._sentryDebugIdIdentifier="sentry-dbid-729dfce0-a4e8-4671-a000-3e1341264964")}catch{}const tt=r=>B.get({url:`/account/auth/oauth/flows/${r}`}),et=(r,m)=>B.post({url:`/account/auth/oauth/flows/${r}/decision`,data:{allow:m}}),st=r=>window.location.assign(r),at={key:1,class:"flex flex-col items-start gap-3.5 rounded-xl border border-danger-200 bg-danger-50 p-6 dark:border-danger-900 dark:bg-danger-900/20"},nt={class:"flex h-11 w-11 shrink-0 items-center justify-center rounded-full bg-danger-100 dark:bg-danger-900/60"},ot={class:"text-[15px] font-semibold leading-tight text-slate-900 dark:text-white"},rt={class:"text-sm leading-relaxed text-slate-800 dark:text-slate-200"},lt={class:"font-medium text-slate-900 dark:text-white"},it={key:3,class:"space-y-6"},dt={class:"text-sm text-slate-800 dark:text-slate-200"},ct={class:"text-slate-900 dark:text-white"},ut={class:"text-xs text-slate-500 dark:text-slate-400"},ft={key:0,class:"flex flex-col items-start gap-2 rounded-xl border border-warning-200 bg-warning-50 p-4 dark:border-warning-900 dark:bg-warning-900/20"},_t={class:"text-sm font-semibold text-slate-900 dark:text-white"},mt={class:"text-xs leading-relaxed text-slate-800 dark:text-slate-200"},xt={key:1,class:"flex flex-col items-start gap-2 rounded-xl border border-warning-200 bg-warning-50 p-4 dark:border-warning-900 dark:bg-warning-900/20"},pt={class:"text-sm font-semibold text-slate-900 dark:text-white"},ht={class:"text-xs leading-relaxed text-slate-800 dark:text-slate-200"},gt={class:"flex items-center gap-3 rounded-lg border border-slate-200 bg-slate-50 p-3 dark:border-slate-700 dark:bg-slate-800/50"},bt={class:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-slate-200 text-xs font-semibold text-slate-700 dark:bg-slate-700 dark:text-slate-200"},kt={class:"min-w-0 text-sm"},yt={class:"text-slate-900 dark:text-white font-medium"},vt={key:0,class:"text-xs text-slate-500 dark:text-slate-400"},wt={class:"space-y-3"},$t={class:"text-xs font-medium uppercase tracking-wide text-slate-500 dark:text-slate-400"},At={class:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary"},It={class:"space-y-1"},Ct={class:"text-sm font-medium text-slate-900 dark:text-white"},Ft={class:"text-xs text-slate-500 dark:text-slate-400"},jt={class:"text-xs font-mono text-slate-400 dark:text-slate-500"},zt={class:"text-xs text-slate-500 dark:text-slate-400"},O=q({__name:"consent",setup(r){const m=U(),{t:a}=H(),o=p(),b=p(!0),g=p(!1),c=p(""),i=p(!1),k=p(!1);function S(l){if(typeof l!="object"||l===null||!("response"in l))return;const e=l.response;if(!(typeof e!="object"||e===null||!("status"in e)))return typeof e.status=="number"?e.status:void 0}async function A(){const l=sessionStorage.getItem(z);if(b.value=!0,c.value="",k.value=!1,!l){i.value=!0,c.value=a("oauth.consent-request-unavailable"),b.value=!1;return}try{o.value=await tt(l),i.value=o.value.status!=="pending",i.value&&v()}catch(e){const u=S(e);i.value=u===403||u===404||u===410,i.value&&v(),k.value=u===403,c.value=k.value?"":i.value?a("oauth.consent-request-unavailable"):a("oauth.consent-load-error")}finally{b.value=!1}}function T(l){const e=l.trim().split(/\s+/).filter(Boolean);return e.length===0?"":e.length===1?e[0].slice(0,2).toUpperCase():`${e[0][0]}${e[e.length-1][0]}`.toUpperCase()}async function I(l){const e=sessionStorage.getItem(z);if(!(!e||g.value||!o.value||i.value)){g.value=!0,c.value="";try{const u=await et(e,l);v(),st(u.redirect_url)}catch{v(),i.value=!0,c.value=a("oauth.consent-complete-error")}finally{g.value=!1}}}return R(A),(l,e)=>{const u=Z,w=K,N=W,C=Y,E=X,F=M,L=V;return d(),$(L,{title:t(a)("oauth.consent-page-title")},G({logo:h(()=>[f(w,{class:"pb-20 pt-12","justify-content":"flex-start"},{default:h(()=>[f(u,{dark:!t(m).isDark,width:"140",height:"112"},null,8,["dark"])]),_:1})]),form:h(()=>[t(b)?(d(),$(w,{key:0,"justify-content":"center",class:"py-10"},{default:h(()=>[f(N,{size:"md"})]),_:1})):t(k)?(d(),_("div",at,[s("div",nt,[f(C,{name:"shield-protected-disabled-cross",size:"md",color:"danger"})]),s("p",ot,n(t(a)("oauth.consent-access-denied-title")),1),s("p",rt,[s("strong",lt,n(t(a)("oauth.consent-access-denied-contact")),1),j(" "+n(t(a)("oauth.consent-access-denied-description")),1)])])):t(c)?(d(),$(E,{key:2,type:"error",message:t(c),action:t(i)?void 0:{text:t(a)("oauth.consent-retr
1y"),"data-testid":"retry-consent"},onAlertActionClick:A},null,8,["message","action"])):t(o)?(d(),_("div",it,[s("p",dt,[s("strong",ct,n(t(o).client.display_name),1),j(" "+n(t(a)("oauth.consent-wants-to-connect")),1)]),s("p",ut,n(t(o).client.callback_domain),1),t(o).client.trusted?y("",!0):(d(),_("div",ft,[s("p",_t,n(t(a)("oauth.consent-unverified-title")),1),s("p",mt,n(t(a)("oauth.consent-unverified-description")),1)])),t(o).organization?y("",!0):(d(),_("div",xt,[s("p",pt,n(t(a)("oauth.consent-platform-wide-title")),1),s("p",ht,n(t(a)("oauth.consent-platform-wide-description")),1)])),s("div",gt,[s("div",bt,n(T(t(o).user.name)),1),s("div",kt,[s("p",yt,n(t(o).user.name),1),t(o).organization?(d(),_("p",vt,n(t(o).organization.name),1)):y("",!0)])]),s("div",wt,[s("h2",$t,n(t(a)("oauth.consent-requested-access")),1),(d(!0),_(J,null,P(t(o).scopes,x=>(d(),_("div",{key:x.identifier,class:"flex gap-3 rounded-lg border border-slate-200 dark:border-slate-700 p-3"},[s("div",At,[f(C,{name:"shield-protected",size:"sm",color:"inherit"})]),s("div",It,[s("p",Ct,n(x.title),1),s("p",Ft,n(x.description),1),s("p",jt,n(x.identifier),1)])]))),128))]),e[2]||(e[2]=s("div",{class:"border-t border-slate-200 dark:border-slate-700"},null,-1)),s("p",zt,n(t(a)("oauth.consent-permissions-note")),1)])):y("",!0)]),_:2},[t(o)&&!t(c)?{name:"button",fn:h(()=>[f(w,{"column-gap":"0.75rem"},{default:h(()=>[f(F,{color:"tertiary",size:"xl",text:t(a)("oauth.consent-cancel-action"),"full-width":"",disabled:t(g)||t(i),onClick:e[0]||(e[0]=x=>I(!1))},null,8,["text","disabled"]),f(F,{color:"primary",size:"xl",text:t(a)("oauth.consent-allow-action"),"full-width":"",loading:t(g),disabled:t(i),onClick:e[1]||(e[1]=x=>I(!0))},null,8,["text","loading","disabled"])]),_:1})]),key:"0"}:void 0]),1032,["title"])}}});typeof D=="function"&&D(O);const Lt=Q(O,[["__scopeId","data-v-e47b8439"]]);export{Lt as default}; 2//# sourceMappingURL=consent-CKOBYYa4.js.map
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.