PageSourceSearch

https://open.dcfcu.org/_next/static/chunks/301-0cc32ef325bdfd20.js

js dcfcu.org collected 2026-09-24 19:28:29 UTC 11,405 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[301],{43954:(e,t,n)=>{n.d(t,{GV:()=>r,LU:()=>i,dh:()=>u,j5:()=>a,uR:()=>o,y4:()=>l});let a="plaidActiveFlow",r="iav",i="layer",o="hosted-iav",l="applicationId",u="plaidHostedCompleteAccounts"},56541:(e,t,n)=>{n.d(t,{bW:()=>u});var a=n(7896);let r="plaidLayerData",i="prefillProductId",o="prefillAccountVariant",l="plaidLayerOauthOnComplete",u=()=>{let[e,t]=(0,a.A)(r),n=()=>{t(null),localStorage.removeItem(r)},[u,c]=(0,a.A)(i,""),[d,s]=(0,a.A)(o,""),[p,f]=(0,a.A)(l,null);return{getLinkDataFromLocalStorage:()=>{if(!e)return null;if(e.expiration){let t=new Date(e.expiration);if(!(e=>e instanceof Date&&!isNaN(e.getTime()))(t))return console.warn("[PlaidStorage] Invalid expiration date format:",e.expiration),n(),null;let a=new Date().toISOString();if(t.toISOString()<=a)return n(),null}return e},setLinkDataInLocalStorage:n=>{t({...e,...n})},clearLinkDataFromLocalStorage:n,oauthOnCompleteFromLocalStorage:p,getOauthRedirectParamsWithLocalStorageFallbacks:e=>{var t,n;return{productId:null!=(t=e.productId)?t:u,accountVariant:null!=(n=e.accountVariant)?n:d}},setOauthOnCompleteInLocalStorage:f,clearOauthDataFromLocalStorage:()=>{f(null),c(""),s(""),localStorage.removeItem(l),localStorage.removeItem(i),localStorage.removeItem(o)},setPrefillProductId:c,setPrefillAccountVariant:s}}},67494:(e,t,n)=>{n.d(t,{y:()=>u});var a=n(86739),r=n(38595),i=n(43943);function o(){let e=(0,a._)(["\n  mutation UpdateAuthFlowWithPrefillSuccessToken($token: String) {\n    updateAuthenticationFlow(prefillSuccessToken: $token) {\n      state\n      productId\n      accountVariant\n    }\n  }\n"]);return o=function(){return e},e}let l=(0,r.J1)(o()),u=()=>{let[e,...t]=(0,i.n)(l);return[async function(){for(var t,n,a,r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];let l=await e(...i);return{state:null==(t=l.data)?void 0:t.updateAuthenticationFlow.state,productId:null==(n=l.data)?void 0:n.updateAuthenticationFlow.productId,accountVariant:null==(a=l.data)?void 0:a.updateAuthenticationFlow.accountVariant}},...t]}},77301:(e,t,n)=>{n.d(t,{A:()=>v});var a=n(39102),r=n(88793),i=n(43954),o=n(53239),l=n(74722),u=n(91322),c=n(61604);let{publicRuntimeConfig:{MANTL_ENV:d}}=n.n(c)()(),s=async e=>{var t;let{productId:n,accountVariant:r,attemptId:i}=e;if(!n)return(0,u.d)({path:"/products",hard:!0});let o=new URLSearchParams({isOAuthRedirect:"true",...r&&{accountVariant:r}}),l="/product/".concat(n,"?").concat(o.toString());a.L.addAction("plaid_layer_oauth_handoff",{productId:n,accountVariant:r,...i&&{attemptId:i}}),null==(t=window.heap)||t.track("Plaid Layer OAuth Handoff",{productId:n,accountVariant:r,...i&&{attemptId:i}}),(0,u.d)({path:l,hard:!0})},p={AVAILABILITY_CHECK:1e4,OPEN_TIMEOUT:1e4};var f=n(56541),y=n(68747),L=n(67494);let v=e=>{var t,n;let{person:u,onPlaidLinkSuccess:c,onComplete:v,autoOpen:_=!0,isOAuthRedirect:k=!1,prefillToken:m,prefillTokenExpiration:w}=e,{triggerMessage:h}=(0,r.d)(),{getLinkDataFromLocalStorage:A,setLinkDataInLocalStorage:g,clearLinkDataFromLocalStorage:I,clearOauthDataFromLocalStorage:E,setOauthOnCompleteInLocalStorage:S,getOauthRedirectParamsWithLocalStorageFallbacks:P}=(0,f.bW)(),T=k&&localStorage.getItem(i.j5)===i.LU,[b,O]=(0,o.useState)(null!=(n=null==(t=A())?void 0:t.linkToken)?n:null),[x,C]=(0,o.useState)(!1),[N,R]=(0,o.useState)(!1),[V,F]=(0,o.useState)(!1),U=(0,o.useRef)(!1),D=(0,o.useRef)(void 0),M=(0,o.useRef)(null),H=(0,o.useRef)(null),Y=async e=>{S(e);let{productId:t,accountVariant:n}=P(e);t||h("There was an error processing your information.",{theme:"error"}),await s({productId:t,accountVariant:n,attemptId:M.current})},j=async e=>{console.info("[PlaidLayer] onComplete:",{isLayerHandlingOAuth:T,hasError:!!e.error,closedEarly:!!e.closedEarly,hasProductId:!!e.productId});try{T?await Y(e):await (null==v?void 0:v(e))}finally{I(),localStorage.removeItem(i.j5)}},W=async e=>{let{message:t,context:n,shouldTriggerMessage:a=!0}=e;console.error("[PlaidLayer] Error:",{message:t,context:n}),a&&_&&h("There was an error prefilling your information.",{theme:"error"}),await (null==j?void 0:j({error:{message:t}}))},B=(e,t)=>{var n;let r="".concat(e," timeout");console.error("[PlaidLayer] ".concat(r,":"),t),null==(n=window.heap)||n.track("Plaid Layer Timeout: ".concat(e),{timeoutType:e,...t}),a.L.addError(Error("Plaid Layer ".concat(r)),{timeoutType:e,...t})},G=async()=>m||b?m?(E(),g({linkToken:m,expiration:w}),O(m),m):b:(console.error("[PlaidLayer] No link token provided"),await W({message:"No link token provided",shouldTriggerMessage:!1}),null),q=async()=>
1{if(void 0!==D.current)return D.current;if(!await G())return console.error("[PlaidLayer] Failed to create prefill token"),D.current=!1,!1;try{await ((e,t)=>new Promise((n,a)=>{let r,i;if(e())return void n();let o=()=>{r&&clearInterval(r),i&&clearTimeout(i)};r=setInterval(()=>{e()&&(o(),n())},5),i=setTimeout(()=>{o(),a(Error("Condition not met within ".concat(t,"ms timeout")))},t)}))(()=>void 0!==D.current,p.AVAILABILITY_CHECK)}catch(e){B("availability",{linkToken:b})}return!!D.current},{onSuccess:K,onExit:$,onEvent:J}=(e=>{let{onPlaidLinkSuccess:t,onComplete:n,handleError:r,setIsOpen:i,setReadyToOpen:o,isAvailableRef:l,hasOpenedRef:u,isOAuthContinuation:c=!1,attemptIdRef:d,flowStartedAtRef:s}=e,[p]=(0,L.y)(),{trackLinkOpened:f,trackLinkEvent:v,trackLinkSuccess:_,trackLinkExit:k,trackLinkViewTransition:m,trackLinkInstitutionSelected:w,trackSdkExitEvent:h,trackSdkHandoffEvent:A}={trackLinkOpened:e=>{let{isOAuthContinuation:t,attemptId:n}=e;console.info("[PlaidLayer] Modal opened",{isOAuthContinuation:t,attemptId:n}),a.L.addAction("plaid_layer_opened",{isOAuthContinuation:t,attemptId:n})},trackLinkEvent:(e,t)=>{var n;let r=t.error_code||t.view_name,i="".concat(e).concat(r?" - ".concat(r):"");console.info("[PlaidLayer] Event:",i,t),null==(n=window.heap)||n.track("Plaid Layer Event: ".concat(i),{flow:"layer",eventName:e,...t}),a.L.addAction("plaid_layer_event",{flow:"layer",eventName:e,eventLabel:i,metadata:t})},trackLinkSuccess:(e,t,n,r)=>{var i,o,l,u;let c={link_session_id:t.link_session_id,institution_name:null==(i=t.institution)?void 0:i.name,institution_id:null==(o=t.institution)?void 0:o.institution_id,numberOfAccounts:null==(l=t.accounts)?void 0:l.length,attemptId:n,durationMs:r};console.info("[PlaidLayer] Success:",{publicToken:e,...c}),null==(u=window.heap)||u.track("Plaid Layer Success",{flow:"layer",publicToken:e,...c}),a.L.setGlobalContextProperty("plaidLayer",{linkSessionId:t.link_session_id}),a.L.addAction("plaid_layer_success",{flow:"layer",publicToken:e,...c})},trackLinkExit:(e,t,n,r)=>{var i,o,l,u,c,d,s;let p={link_session_id:t.link_session_id,institution_name:null==(i=t.institution)?void 0:i.name,institution_id:null==(o=t.institution)?void 0:o.institution_id,status:t.status,request_id:t.request_id,attemptId:n,durationMs:r};a.L.setGlobalContextProperty("plaidLayer",{linkSessionId:t.link_session_id}),a.L.addAction("plaid_layer_exited",{hasError:!!e,errorCode:null!=(u=null==e?void 0:e.error_code)?u:null,errorType:null!=(c=null==e?void 0:e.error_type)?c:null,institutionId:null!=(d=null==(l=t.institution)?void 0:l.institution_id)?d:null,status:t.status,attemptId:n,durationMs:r}),e?((e,t)=>{var n;let{error_type:r,error_code:i,error_message:o}=e,l="Plaid Layer Error: ".concat(i),u=Error(l);console.error("[PlaidLayer] Error:",l,e),null==(n=window.heap)||n.track(l,{flow:"layer",error_type:r,error_code:i,error_message:o,...t}),a.L.addError(u,{errorMessage:o,errorType:r})})(e,p):(console.info("[PlaidLayer] Exit:",p),null==(s=window.heap)||s.track("Plaid Layer Exit",{flow:"layer",...p}),a.L.addAction("plaid_layer_exit",{flow:"layer",...p}))},trackLinkViewTransition:e=>{let{viewName:t,attemptId:n}=e;a.L.addAction("plaid_layer_view_transition",{viewName:t,attemptId:n})},trackLinkInstitutionSelected:e=>{let{institutionId:t,attemptId:n}=e;a.L.addAction("plaid_layer_institution_selected",{institutionId:t,attemptId:n})},trackSdkExitEvent:e=>{let{viewName:t,errorCode:n,attemptId:r}=e;a.L.addAction("plaid_layer_sdk_exit_event",{viewName:t,errorCode:n,attemptId:r})},trackSdkHandoffEvent:e=>{let{attemptId:t}=e;a.L.addAction("plaid_layer_sdk_handoff_event",{attemptId:t})}},g=()=>null!==s.current?Date.now()-s.current:null,I=async(e,t,a)=>{let r=null;t||(r=await p({variables:{token:null!=e?e:void 0}})),null==n||n({nextState:null==r?void 0:r.state,error:t,closedEarly:a,productId:(null==r?void 0:r.productId)||void 0,accountVariant:(null==r?void 0:r.accountVariant)||void 0})};return{onEvent:(e,t)=>{switch(v(e,t),e){case"LAYER_READY":l.current=!0,o(!0);break;case"LAYER_NOT_AVAILABLE":l.current=!1;break;case"OPEN":{let e=(0,y.A)();d.current=e,s.current=Date.now(),f({isOAuthContinuation:c,attemptId:e}),u.current=!0,i(!0);break}case"EXIT":var n;i(!1),h({viewName:t.view_name,errorCode:null!=(n=t.error_code)?n:null,attemptId:d.current});break;case"HANDOFF":i(!1),A({attemptId:d.current});break;case"TRANSITION_VIEW":m({viewName:t.view_name,attemptId:d.current});break;case"SELECT_INSTITUTION":w({institutionId:t.institution_id,attemptId:d.current})}},onSuccess:async(e,n)=>{_(e,n,d.current,g()),null==t||t();try{await I(e)}catch(t){await I(null,t),r({message:"Failed to update authentication flow with prefill token",context:{error:t,publicToken:e}})}},onExit:(e,t)=>
1{k(e,t,d.current,g()),e?r({message:"Plaid Link exited with an error",context:{error:e,metadata:t}}):(console.info("[PlaidLayer] User exited without error"),I(null,null,!0))}}})({onPlaidLinkSuccess:c,onComplete:j,handleError:W,setIsOpen:R,setReadyToOpen:F,isAvailableRef:D,hasOpenedRef:U,isOAuthContinuation:T,attemptIdRef:M,flowStartedAtRef:H}),X={token:b||null,onSuccess:K,onExit:$,onEvent:(e,t)=>{J(e,t),"LAYER_NOT_AVAILABLE"===e&&(console.info("[PlaidLayer] User not eligible for Layer, clearing Layer link data from localStorage"),I())},onLoad:()=>{C(!0)},...T&&1?{receivedRedirectUri:window.location.href}:{}},{submit:z,open:Q}=(0,l.usePlaidLink)(X);return(0,o.useEffect)(()=>{if(m)return void q()},[]),(0,o.useEffect)(()=>{var e;if(!k||T)return;let t=localStorage.getItem(i.j5);t!==i.GV&&t!==i.uR&&(console.warn("[PlaidLayer] OAuth redirect: flow marker missing from localStorage — OAuth flow cannot continue",{activeFlow:t}),a.L.addAction("plaid_layer_oauth_missing_state",{activeFlow:t}),null==(e=window.heap)||e.track("Plaid Layer OAuth: Missing State",{activeFlow:t}))},[]),(0,o.useEffect)(()=>{!k&&x&&void 0===D.current&&(console.info("[PlaidLayer] Checking phone number eligibility"),z({phone_number:(e=>{let t="demo"===d&&(null==e?void 0:e.phoneMobile)!=="5555555551",n=["development","integration","ephemeral","uat"].includes(d)&&(null==e?void 0:e.phoneMobile)==="5555555550";return t||n?(console.info("[PlaidLayer] Using sandbox phone number for testing"),"415-555-0015"):null==e?void 0:e.phoneMobile})(u)}))},[x]),(0,o.useEffect)(()=>{if(x&&_&&(V||T)){try{localStorage.setItem(i.j5,i.LU),console.info("[PlaidLayer] Opening Link, Layer flow marker written to localStorage")}catch(e){console.warn("[PlaidLayer] Could not persist OAuth state to localStorage — OAuth bank linking will not work this session")}Q()}},[x,V,T]),(0,o.useEffect)(()=>{if(!_||U.current||k)return;let e=setTimeout(()=>{U.current||(B("opening",{linkToken:b}),W({message:"Plaid Layer did not open in time"}))},p.OPEN_TIMEOUT);return()=>clearTimeout(e)},[]),{isOpen:N,checkIsLayerAvailable:q}}}}]);

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.