1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1889],{85437:function(t,n,e){e.d(n,{_w:function(){return a},mE:function(){return r}});let a="ai.blazesolutions.notewave://auth/integration-callback";function r(t,n){let e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"web",a=new URL(t);return a.searchParams.set("state",function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"web",e="".concat("teams_admin_consent_").concat(t,"_").concat(Date.now());return"native"===n?"".concat(e,"_native"):e}(n,e)),a.toString()}},31889:function(t,n,e){e.d(n,{NATIVE_INTEGRATION_OAUTH_REDIRECT_URL:function(){return i._w},NATIVE_OAUTH_REDIRECT_URL:function(){return o},handleNativeIntegrationOAuthCallback:function(){return u},handleNativeOAuthCallback:function(){return s},signInWithOAuthNative:function(){return c}});var a=e(33103),r=e(6763),i=e(85437);let o="ai.blazesolutions.notewave://auth/callback";async function c(t){if(!a.dV.isNativePlatform())throw Error("signInWithOAuthNative called outside native platform");let{Browser:n}=await e.e(7601).then(e.bind(e,7601)),{data:i,error:c}=await r.OQ.auth.signInWithOAuth({provider:t,options:{redirectTo:o,..."azure"===t?{scopes:"email"}:{},skipBrowserRedirect:!0}});if(c)throw c;if(!(null==i?void 0:i.url))throw Error("OAuth URL not returned by Supabase");await n.open({url:i.url,presentationStyle:"popover",windowName:"_self"})}async function s(t){if(!t.startsWith(o))return;let{Browser:n}=await e.e(7601).then(e.bind(e,7601));try{await n.close()}catch(t){}let a=new URL(t),i=a.searchParams.get("code"),c=a.searchParams.get("error"),s=a.searchParams.get("error_description");if(c){let t="".concat(c," ").concat(null!=s?s:"").toLowerCase();if(t.includes("admin approval")||t.includes("admin consent")||t.includes("aadsts65001")||t.includes("aadsts90094")||t.includes("consent_required"))throw Error("microsoft_admin_approval_required");throw Error(s||c)}if(!i)throw Error("OAuth callback missing authorization code");let{error:u}=await r.OQ.auth.exchangeCodeForSession(i);if(u)throw u}async function u(t){if(!t.startsWith(i._w))return null;let{Browser:n}=await e.e(7601).then(e.bind(e,7601));try{await n.close()}catch(t){}let a=new URL(t),r=a.searchParams.toString();return"/dashboard/integrations".concat(r?"?".concat(r):"")}}}]);
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.