1"use strict";(globalThis.rspackChunknotion_next=globalThis.rspackChunknotion_next||[]).push([[23002],{876252(e,t,r){function n(){return(0,r(579993).O$)(r(192314).AppStoreCurrentUserStore)}r.d(t,{$:()=>n})},21648(e,t,r){r.r(t),r(533958),r(730330),r(976614),r(159952),r(765324),r(176765),r(851344),r(866491);var n=r(635790),o=r(440302);let i={height:"100%"};function s(e){let{redirectUri:t}=e,[s,l]=(0,n.useState)(!0),[a,u]=(0,n.useState)(!1),c=(0,r(533992).v3)().currentUser.loggedInUserIds,d=(0,r(876252).$)(),h=(0,r(579993).K8)(()=>d?c.map(e=>d.getRecordModel({table:r(832375).oo9,id:e})).filter(r(48697).O9):[],[d,c]),f=(0,n.useCallback)(()=>{c.length!==h.length||a||l(!1)},[c,h,a]);return(0,n.useEffect)(()=>{var e,n;let o,i;if(!t)return void l(!1);try{o=decodeURIComponent(t)}catch(e){if(!(e instanceof URIError))throw e;l(!1);return}let s=r(392096).bk(o)&&r(392096).qg(o);if(!s||!function(e,t){if(!e.host||!e.protocol)return!1;let n=r(392096).q7(e.href);if(!n)return!1;if("local"===t.env)return!0;let o=new URL(n),i=new URL(t.domainBaseUrl),s=new URL(r(428311).IM[t.env]);return!!(o.origin===i.origin||o.origin===s.origin||(0,r(313429).YP)(o.href,t.env))||!!e.query.notion_user_id&&"https:"===o.protocol}(s,r(139424).A))return void l(!1);if(null!=(e=s.path)&&e.includes("/eap/app")){let e=decodeURIComponent(o),t=r(392096).qg(e).query.notion_state,n=t&&JSON.parse(t);i=n?n.userId:void 0}else i=null!=(n=s.path)&&n.startsWith(r(174656).q)?s.query.userId:s.query.notion_user_id;h.some(e=>e.id===i)?(u(!0),(0,r(318620).Y)(o)):f()},[t,h,f]),(0,o.jsx)("div",{style:i,children:s?(0,o.jsx)(r(4458).fI,{alignItems:"center",justifyContent:"center",flexWrap:"wrap",height:"100%",children:(0,o.jsx)(r(517334).k,{size:20})}):(0,o.jsx)(r(29244).o,{route:{name:"initiateExternalAuthenticationFromDesktop"},publicPageData:void 0})})}r.d(t,{InitiateExternalAuthenticationFromDesktop:()=>s})},174656(e,t,r){r(730330),r(976614),r(176765),r(851344),r(866491);let n="/workflows/oauth/connect";function o(e,t){let r=Object.fromEntries(Object.entries(e).filter(([e,t])=>!!t));return`${t}${n}?${new URLSearchParams(r).toString()}`}r.d(t,{n:()=>o},{q:n})}}]);
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.