1import{p as qe,F as ge,h as ye,b as be,d as xe,A as q,g as e,$ as $e,c as we,f as T,v as X,a as y,m as a,r as o,l as _,t as w,j as l,R as Re,x as Ae,C as ke,u as g,B as D,k as C,i as Ie}from"../chunks/_xHT_uvk.js";import{A as Me}from"../chunks/BsMllkNp.js";import{B as Ne}from"../chunks/INdUVZAw.js";import{b as G}from"../chunks/BfPRBRDD.js";import{r as Se,e as Ce,t as Fe}from"../chunks/BgTMbiyN.js";import{A as L,s as Ke}from"../chunks/CIWHLiqk.js";import{s as Le,a as Ue}from"../chunks/DhSJUQSd.js";import{s as Y}from"../chunks/BtaZahXq.js";import{g as Be}from"../chunks/D3OhI2Hq.js";const Z=["passkey","email_otp","oauth","phrase"],ee=n=>typeof n=="object"&&n!==null&&!Array.isArray(n),te=n=>Array.isArray(n)&&n.length<=Z.length&&n.every(s=>Z.includes(s))&&new Set(n).size===n.length;function Pe(n){if(!ee(n)||n.ok!==!0||!ee(n.request))return!1;const s=n.request,d=s.factors,f=s.proven,r=s.required;if(typeof s.requestKey!="string"||s.requestKey.length<20||s.requestKey.length>200||typeof s.route!="string"||!(s.route in L)||typeof s.method!="string"||!te(d)||!te(f)||!Number.isInteger(r)||Number(r)<1||Number(r)>d.length||!f.every(U=>d.includes(U))||s.status!=="open"&&s.status!=="ready"||!Number.isSafeInteger(s.expiresInMs)||Number(s.expiresInMs)<0||Number(s.expiresInMs)>3e5)return!1;const t=L[s.route];return t.kind==="action"&&t.method===s.method&&(s.status!=="ready"||f.length>=Number(r))}var je=C('<a class="btn btn--ghost btn--block"> </a>'),ze=C('<p class="error svelte-5cq37e" role="alert"> </p> <!>',1),Oe=C('<p class="state svelte-5cq37e" role="status"> </p>'),Ee=C('<dl class="what svelte-5cq37e"><div class="svelte-5cq37e"><dt class="svelte-5cq37e"> </dt><dd class="svelte-5cq37e"> </dd></div> <div class="svelte-5cq37e"><dt class="svelte-5cq37e"> </dt><dd class="mono svelte-5cq37e"> </dd></div> <div class="svelte-5cq37e"><dt class="svelte-5cq37e"> </dt><dd class="svelte-5cq37e"> </dd></div> <div class="svelte-5cq37e"><dt class="svelte-5cq37e"> </dt><dd class="svelte-5cq37e"><!></dd></div></dl> <p class="warn svelte-5cq37e"> </p> <!>',1),He=C('<a class="btn btn--ghost btn--block" href="/"> </a>');function Ze(n,s){qe(s,!0);let d=D("loading"),f=D(""),r=D(null);const t=g(Be),U=g(()=>{var i;return e(r)?((i=L[e(r).route])==null?void 0:i.label)??e(r).route:e(t)(410)}),R=g(()=>typeof location>"u"?null:Fe(new URL(location.href)));ge(async()=>{var A,k;await Y.refresh({force:!0});const i=(A=new URLSearchParams(location.search).get("request"))==null?void 0:A.trim();if(!i){q(f,e(t)(411),!0);return}const m=await Se(new URL(location.href)).security["step-up"].request.get({query:{requestKey:i}}),b=Pe(m.data)?Le(m.data):null;if(!b){q(f,Ue(m.data,m.error,e(t)(412)),!0);return}q(r,b.request,!0),((k=e(r))==null?void 0:k.status)==="ready"?q(d,"done"):q(d,"confirm")});async function re(){if(!e(r)||e(r).status!=="open")return;q(f,"");const i=e(R)?`${G}/api/t/${encodeURIComponent(e(R))}`:`${G}/api`,v=L[e(r).route];if(!v||v.kind!=="action"){q(f,e(t)(2108),!0);return}const m=Ke(v).action,b={scope:"action",route:e(r).route,requestKey:e(r).requestKey,required:[...e(r).factors],missing:e(r).factors.filter(A=>!e(r).proven.includes(A)),factorMode:e(r).required===1?"any":"all",policy:{...m,compulsory:[...m.compulsory],optional:[...m.optional]},url:`${i}/security/step-up/request`};await Ce.request(b,G,fetch)&&q(d,"done")}function se(){const i=new URL(location.href),v=new URLSearchParams({next:`${i.pathname}${i.search}`});return e(R)&&v.set("tenant",e(R)),`/signin?${v}`}ye("5cq37e",i=>{xe(v=>{$e.title=v??""},[()=>e(t)(413)])});{let i=g(()=>e(t)(414)),v=g(()=>e(d)==="done"?e(t)(415):e(t)(416)),m=g(()=>e(d)==="done"?e(t)(417):e(t)(418));Me(n,{get eyebrow(){return e(i)},get title(){return e(v)},get subtitle(){return e(m)},children:(b,A)=>{var k=we(),ae=T(k);{var oe=u=>{var c=ze(),p=T(c),h=a(p,!0);o(p);var I=_(p,2);{var B=x=>{var $=je(),M=a($,!0);o($),w((N,P)=>{Ie($,"href",N),l(M,P)},[()=>se(),()=>e(t)(63)]),y(x,$)};X(I,x=>{Y.viewer||x(B)})}w(()=>l(h,e(f))),y(u,c)},ne=u=>{var c=Oe(),p=a(c,!0);o(c),w(h=>l(p,h),[()=>e(t)(419)]),y(u,c)},ie=u=>{var c=Ee(),p=T(c),h=a(p),I=a(h),B=a(I,!0);o(I);var x=_(I),$=a(x,!0);o(x),o(h);var M=_(h,2),N=a(M),P=a(N,!0);o(N);var J=_(N),le=a(J,!0);o(J),o(M);var j=_(M,2),z=a(j),ue=a(z,!0);o(z);var Q=_(z),de=a(Q,!0);o(Q),o(j);var V=_(j,2),O=a(V),ve=a(O,!0);o(O);var W=_(O),pe=a(W);{let S=g(()=>e(t).c(421)),F=g(()=>[Math.max(1,Math.ceil(e(r).expiresInMs/6e4))]);Re(pe,{get x(){return e(S)},get a(){return e(F)}})}o(W),o(V),o(p);var E=_(p,2),fe=a(E,!0);o(E);var me=_(E,2);Ne(me,{block:!0,onclick:re,children:(S,F)=>{Ae();var K=ke();w(H=>l(K,H),[()=>e(t)(422)]),y(S,K)},$$slots:{default:!0}}),w((S,F,K,H,_e,he)=>
1{l(B,S),l($,e(U)),l(P,F),l(le,e(r).method),l(ue,K),l(de,H),l(ve,_e),l(fe,he)},[()=>e(t)(262),()=>e(t)(420),()=>e(t)(183),()=>e(R)??e(t)(1519),()=>e(t)(217),()=>e(t)(2204)]),y(u,c)},ce=u=>{var c=He(),p=a(c,!0);o(c),w(h=>l(p,h),[()=>e(t)(64)]),y(u,c)};X(ae,u=>{e(f)?u(oe):e(d)==="loading"?u(ne,1):e(d)==="confirm"&&e(r)?u(ie,2):u(ce,-1)})}y(b,k)},$$slots:{default:!0}})}be()}export{Ze as component};
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.