var Moov;(()=>{"use strict";var e={};const t={};function o(n){const i=t[n];if(void 0!==i)return i.exports;const r=t[n]={exports:{}};return e[n](r,r.exports,o),r.exports}o.m=e,o.d=(e,t)=>{if(Array.isArray(t))for(var n=0;n<t.length;){var i=t[n++],r=t[n++];o.o(e,i)?0===r&&n++:0===r?Object.defineProperty(e,i,{enumerable:!0,value:t[n++]}):Object.defineProperty(e,i,{enumerable:!0,get:r})}else for(var i in t)o.o(t,i)&&!o.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce((t,n)=>(o.f[n](e,t),t),[])),o.u=e=>e+"."+{79:"41f692c07fde22c5e1ce",102:"a3b4c732f3563deca661",171:"5c8a98afe85c721783dc",277:"6947fec194c0155663ce",289:"c1fd81f9cb7f386651c5",491:"7bd081109e188f65050f",494:"a5dd4bdc81ee3fd65b8d",504:"94eba48a5e42332fc38a",514:"23a9e5065bc6aba85327",721:"e14d266bea3d9847452e",840:"4d4b3d69607ae3fe7ac7",873:"b0bcc8f02aa8b1422048",909:"df20657a68e492602110",915:"c6fe8401393215464cd6",950:"f393234fea810a034b16"}[e]+".js",o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{const e={},t="Moov:";o.l=(n,i,r,a)=>{if(e[n])return void e[n].push(i);let s,c;if(void 0!==r){const e=document.getElementsByTagName("script");for(var d=0;d<e.length;d++){const o=e[d];if(o.getAttribute("src")==n||o.getAttribute("data-webpack")==t+r){s=o;break}}}s||(c=!0,s=document.createElement("script"),s.charset="utf-8",o.nc&&s.setAttribute("nonce",o.nc),s.setAttribute("data-webpack",t+r),s.src=n),e[n]=[i];const u=(t,o)=>{s.onerror=s.onload=null,clearTimeout(l);const i=e[n];if(delete e[n],s.parentNode?.removeChild(s),i?.forEach(e=>e(o)),t)return t(o)},l=setTimeout(u.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=u.bind(null,s.onerror),s.onload=u.bind(null,s.onload),c&&document.head.appendChild(s)}})(),o.r=e=>{Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{let e;o.g.importScripts&&(e=o.g.location+"");const t=o.g.document;if(!e&&t&&("SCRIPT"===t.currentScript?.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){const o=t.getElementsByTagName("script");if(o.length){let t=o.length-1;for(;t>-1&&(!e||!/^http(s?):/.test(e));)e=o[t--].src}}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})(),(()=>{const e={792:0};o.f.j=(t,n)=>{let i=o.o(e,t)?e[t]:void 0;if(0!==i)if(i)n.push(i[2]);else{const r=new Promise((o,n)=>i=e[t]=[o,n]);n.push(i[2]=r);const a=o.p+o.u(t),s=new Error,c=n=>{if(o.o(e,t)&&(i=e[t],0!==i&&(e[t]=void 0),i)){const e=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;s.message="Loading chunk "+t+" failed.\n("+e+": "+o+")",s.name="ChunkLoadError",s.type=e,s.request=o,s.event=n,i[1](s)}};o.l(a,c,"chunk-"+t,t)}};const t=(t,n)=>{let[i,r,a]=n;var s,c,d=0;if(i.some(t=>0!==e[t])){for(s in r)o.o(r,s)&&(o.m[s]=r[s]);a&&a(o)}for(t&&t(n);d<i.length;d++)c=i[d],o.o(e,c)&&e[c]&&e[c][0](),e[c]=0},n=self.webpackChunkMoov=self.webpackChunkMoov||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();let n={};(()=>{function e(e){return Promise.reject({error:e})}o.d(n,{default:()=>Ie});const t="Please provide an accountID",i="Please provide an account",r="Please provide a representative",a="Please provide a representativeID",s="Please provide a firstName and lastName for the representative",c="Please provide a bank account id.",d="Please provide a capability id.",u="Please provide a card id.",l="Please provide a walletID.";function p(o){return{link:({accountID:n,bankAccount:i,plaidToken:r,mxAuthorizationCode:a})=>{let s={};if(!n)return e(t);if(!i&&!r&&!a)return e("Please provide a bankAccount, plaidToken, or mxAuthorizationCode.");if(i){if(!i.accountNumber)return e("Please provide a bank account number.");if(!i.routingNumber)return e("Please provide a routingNumber.");if(9!==i.routingNumber.length)return e("Routing number must be 9 digits.");if(!i.holderName)return e("Please provide a holderName.");if(!i.holderType)return e("Please provide a holderType.");if(!i.bankAccountType||!["checking","savings"].includes(i.bankAccountType))return e("Please provide a bankAccountType of 'checking' or 'savings'.");s={account:i}}else r?s={plaid:{token:r}}:a&&(s={mx:{authorizationCode:a}});return o(`/accounts/${n}/bank-accounts`,{method:"POST",body:s,headers:i&&[["x-wait-for","payment-method"]]})},list:({accountID:n})=>n?o(`/accounts/${n}/bank-accounts`,{method:"GET"}):e(t),get:({accountID:n,bankAccountID:i})=>n?i?o(`/accounts/${n}/bank-accounts/${i}`,{method:"GET"}):e(c):e(t),delete:({accountID:n,bankAccountID:i})=>n?i?o(`/accounts/${n}/bank-accounts/${i}`,{method:"DELETE"}):e(c):e(t),startMicroDepositVerification:({accountID:n,bankAccountID:i})=>n?i?o(`/accounts/${n}/bank-accounts/${i}/micro-deposits`,{method:"POST"}):e(c):e(t),completeMicroDepositVerification:({accountID:n,bankAccountID:i,amounts:r})=>n?i?r?o(`/accounts/${n}/bank-accounts/${i}/micro-deposits`,{method:"PUT",body:{amounts:r}}):e("Please provide amounts."):e(c):e(t),startVerification:({accountID:n,bankAccountID:i})=>n?i?o(`/accounts/${n}/bank-accounts/${i}/verify`,{method:"POST"}):e(c):e(t),completeVerification:({accountID:n,bankAccountID:i,code:r})=>n?i?r?o(`/accounts/${n}/bank-accounts/${i}/verify`,{method:"PUT",body:{code:r}}):e("Please provide verification code."):e(c):e(t),getVerification:({accountID:n,bankAccountID:i})=>n?i?o(`/accounts/${n}/bank-accounts/${i}/verify`,{method:"GET"}):e(c):e(t)}}function h(o){return{list:({accountID:n})=>n?o(`/accounts/${n}/cards`,{method:"GET"}):e(t),get:({accountID:n,cardID:i})=>n?i?o(`/accounts/${n}/cards/${i}`,{method:"GET"}):e(u):e(t),disable:({accountID:n,cardID:i})=>n?i?o(`/accounts/${n}/cards/${i}`,{method:"DELETE"}):e(u):e(t),update:({accountID:n,cardID:i,card:r})=>n?i?o(`/accounts/${n}/cards/${i}`,{method:"PATCH",body:r}):e(u):e(t)}}function m(o){return{get:({accountID:n,representativeID:i})=>n?i?o(`/accounts/${n}/representatives/${i}`,{method:"GET"}):e(a):e(t),list:({accountID:n})=>n?o(`/accounts/${n}/representatives`,{method:"GET"}):e(t),create:({accountID:n,representative:i})=>n?i?i.name.firstName&&i.name.lastName?o(`/accounts/${n}/representatives`,{method:"POST",body:i}):e(s):e(r):e(t),update:({accountID:n,representative:i})=>n?i?i.representativeID?i.name.firstName&&i.name.lastName?o(`/accounts/${n}/representatives/${i.representativeID}`,{method:"PUT",body:i}):e(s):e(a):e(r):e(t),delete:({accountID:n,representativeID:i})=>n?i?o(`/accounts/${n}/representatives/${i}`,{method:"DELETE"}):e(a):e(t)}}function v(o){return{get:({accountID:n,paymentMethodID:i})=>n?i?o(`/accounts/${n}/payment-methods/${i}`,{method:"GET"}):e("Please provide a payment method id."):e(t),list:({accountID:n})=>n?o(`/accounts/${n}/payment-methods`,{method:"GET"}):e(t)}}function f(o){return{get:({accountID:n,capabilityID:i})=>n?i?o(`/accounts/${n}/capabilities/${i}`,{method:"GET"}):e(d):e(t),list:({accountID:n})=>n?o(`/accounts/${n}/capabilities`,{method:"GET"}):e(t),request:({accountID:n,capabilities:i})=>n?i&&Array.isArray(i)?o(`/accounts/${n}/capabilities`,{method:"POST",body:{capabilities:i}}):e("Please provide a capabilities list as an array of string."):e(t),unrequest:({accountID:n,capabilityID:i})=>n?i?o(`/accounts/${n}/capabilities/${i}`,{method:"DELETE"}):e(d):e(t)}}const w={count:50,skip:0};function b(o){return{get:({accountID:n,walletID:i})=>n?i?o(`/accounts/${n}/wallets/${i}`):e(l):e(t),list:({accountID:n})=>n?o(`/accounts/${n}/wallets`):e(t),getTransaction:({accountID:n,walletID:i,transactionID:r})=>n?i?r?o(`/accounts/${n}/wallets/${i}/transactions/${r}`):e("Please provide a transactionID."):e(l):e(t),listTransactions:({accountID:n,walletID:i,filter:r})=>{if(!n)return e(t);if(!i)return e(l);let a=r;a=a||w;const s=new URLSearchParams(a);return o(`/accounts/${n}/wallets/${i}/transactions?${s.toString()}`)}}}function y(o){return{upload:({accountID:n,file:i,filePurpose:r})=>{if(!n)return e(t);if(!i)return e("Please provide a file object.");if(!r)return e("Please provide a file purpose.");const a=new FormData;return a.append("file",i),a.append("filePurpose",r),o(`/accounts/${n}/files`,{method:"POST",file:!0,body:a})},list:({accountID:n})=>n?o(`/accounts/${n}/files`,{method:"GET"}):e(t),get:({accountID:n,fileID:i})=>n?i?o(`/accounts/${n}/files/${i}`,{method:"GET"}):e("Please provide a file id."):e(t)}}function k(o){return{get:({accountID:n})=>n?o(`/accounts/${n}/underwriting`,{method:"GET"}):e(t),update:({accountID:n,underwriting:i})=>n?i?o(`/accounts/${n}/underwriting`,{method:"PUT",body:i}):e("Please provide an account underwriting object."):e(t)}}const I=o=>({create:({accountID:n,applePaySessionConfig:i})=>n?i?o(`/accounts/${n}/apple-pay/sessions`,{method:"POST",body:{...i,domain:location.host}}):e("Please provide an applePaySessionConfig."):e(t)}),P=o=>({create:({accountID:n,applePayToken:i})=>n?i?o(`/accounts/${n}/apple-pay/tokens`,{method:"POST",body:i}):e("Please provide an applePayToken."):e(t)}),g=o=>({create:({accountID:n,merchantAccountID:i,googlePayToken:r})=>n?i?r?o(`/accounts/${n}/google-pay/tokens`,{method:"POST",body:{merchantAccountID:i,token:r},headers:[["x-moov-version","v2026.04.00"]]}):e("Please provide a googlePayToken."):e("Please provide a merchantAccountID."):e(t)});function D(o){function n(){return o("/tos-token")}function r(n){let r,a;if(!n)return e(i);try{({accountID:r,...a}=n)}catch{return e(i)}return r?o(`/accounts/${r}`,{method:"PATCH",body:a}):e(t)}return{create:t=>t?o("/accounts",{method:"POST",body:t,headers:[["x-wait-for","connection"]]}):e(i),get:({accountID:t,foreignID:n})=>t||n?o(t?`/accounts/${t}`:`/accounts?foreignID=${n}`):e("Please provide an accountID or a foreignID"),update:n=>n?n.accountID?o(`/accounts/${n.accountID}`,{method:"PUT",body:n}):e(t):e(i),patch:r,getTermsOfServiceToken:n,acceptTermsOfService:({accountID:o})=>o?n().then(e=>e.error?e.error:r({accountID:o,termsOfService:{...e}})):e(t),bankAccounts:{...p(o)},cards:{...h(o)},wallets:{...b(o)},representatives:{...m(o)},paymentMethods:{...v(o)},capabilities:{...f(o)},files:{...y(o)},underwriting:{...k(o)},applePay:{tokens:{...P(o)},sessions:{...I(o)}},googlePay:{tokens:{...g(o)}}}}function M(e,t,o){let n=e.length-t.length;if(0===n)return e(...t);if(1===n)return function(e,t,o){let n=o=>e(o,...t);return void 0===o?n:Object.assign(n,{lazy:o,lazyArgs:t})}(e,t,o);throw Error("Wrong number of arguments")}function E(...e){return M(L,e)}const L=e=>`${e[0]?.toUpperCase()??""}${e.slice(1)}`;function R(e){return"string"==typeof e}function C(e){return"object"==typeof e&&!!e}const T=e=>`${e[0]?.toLowerCase()??""}${e.slice(1)}`,$=(e,t)=>{if(R(e))return E(e);if(C(e)){if("error"in e)return $(e.error);const t=[],o=(e,n=[])=>{if(R(e)){let o=function(...e){return M(T,e)}(e);o.endsWith(".")&&(o=o.slice(0,-1)),t.push(`${(e=>E(e.join(" ").replace(/([A-Z])/g," $1").trim().replace(/\s+/g," ").toLowerCase()))(n)}: ${o}.`)}else if(C(e))for(const[t,i]of Object.entries(e))o(i,[...n,t])};if(o(e),t.length>0)return t.join(" ")}return t??"Unknown error."},S=["prod","staging","local","mock"],J=function(){let e="prod";try{e=window.location.hostname.includes("moov-staging")?"staging":"prod"}catch{}try{const t=localStorage.getItem("moovEnv")||e;e=S.includes(t)?t:e}catch{}return e}(),O=(e=>{let t="https://951e6386-a35f-48ea-b5fe-504b039564d6.mock.pstmn.io";switch(e){case"staging":t="https://api.moov-staging.io";break;case"local":t="http://local.moov.io/api";break;default:t="https://api.moov.io"}return t})(J),A=e=>{if(e.response)try{return $(e.response)}catch{return"API request error"}return"API request error"},V=e=>(t,o={})=>((e,t)=>((e,t={})=>{const o=new XMLHttpRequest,n=t.method||"GET";return new Promise(function(i,r){o.onreadystatechange=function(){4===o.readyState&&(o.status>=200&&o.status<300?i(o.response):r({statusCode:o.status,error:A(o)}))},o.open(n,e,!0),"mock"!==J&&(o.withCredentials=!0),o.setRequestHeader("X-Moov-Client","moovjs"),t.headers&&t.headers.length>0&&t.headers.forEach(e=>{o.setRequestHeader(...e)}),t.file?o.send(t.body):t.body?(o.setRequestHeader("Content-Type","application/json"),o.send(JSON.stringify(t.body))):o.send()})})(O+e,t).then(e=>{try{return JSON.parse(e)}catch{return e}}))(t,{...o,headers:[...o.headers?o.headers:[],["Authorization","Bearer "+e]]}),z={success:!1},U=e=>({lookupByRoutingNumber:(t,o=!1)=>9!==t?.length?Promise.reject({error:"Routing number must be 9 digits"}):e(`/institutions/ach/search?routingNumber=${t}`).then(e=>((e,t)=>e.achParticipants?.length>0&&!t?{success:!0,result:e.achParticipants}:1===e.achParticipants?.length?{success:!0,result:e.achParticipants[0]}:z)(e,o)),lookupAllRailsByRoutingNumber:t=>9!==t?.length?Promise.reject({error:"Routing number must be 9 digits"}):e(`/institutions?routingNumber=${t}`).then(e=>e?.ach||e?.rtp||e?.wire?{success:!0,result:e}:z)}),j=e=>({ping:()=>e("/ping").then(e=>({success:e.ok}))});function x(t){return{lookup:({email:o})=>o?t(`/enrichment/profile?email=${o}`):e("Please provide an email address."),avatar:({avatarID:o})=>o?t(`/avatars/${o}`):e("Please provide an avatarID."),listIndustries:()=>t("/industries"),lookupAddress:({search:o,...n})=>{if(!o)return e("Please provide an address");const i=Object.entries({search:o,...n}),r=new URLSearchParams(i);return t(`/enrichment/address?${r}`)}}}let _=null;const N=/^https:\/\/cdn\.plaid\.com\/link\/v2\/stable\/link-initialize\.js?(\?.*)?$/,q=()=>(null!==_||(_=((e,t,o="Script",n)=>new Promise((i,r)=>{if("undefined"==typeof window)return void i(null);const a=n();if(a)i(a);else try{let a=((e,t)=>{const o=document.querySelectorAll(`script[src^="${e}"]`);for(let e=0;e<o.length;e++){const n=o[e];if(n&&t.test(n.src))return n}return null})(e,t);if(a)return console.warn(`${o} already loaded`),void i(n());a=(e=>{const t=document.createElement("script");t.src=e;const o=document.head||document.body;if(!o)throw new Error("Expected document.body not to be null. A <body> element is required for injecting scripts.");return o.appendChild(t),t})(e),a.addEventListener("load",()=>{const e=n();e?i(e):r(new Error(`${o} not available`))}),a.addEventListener("error",()=>{r(new Error(`Failed to load ${o}`))})}catch(e){r(e)}}))("https://cdn.plaid.com/link/v2/stable/link-initialize.js",N,"Plaid Link",()=>window.Plaid)),_),H=e=>{function t({token:t,accountID:o,env:n="production",onSuccess:i,onEvent:r,onExit:a,onLoad:s,onProcessorTokenRequest:c,product:d=["auth"],...u}){if(!o)throw new Error("accountID is required");let l=!1;const p=new Promise((p,h)=>{const m=window.Plaid.create({token:t,onLoad:function(){p(m),l=!0,s&&s()},onSuccess:function(t,n){const a=n.accounts[0];if(!a)return;const s=a.id;c?c(t,s).then(t=>function({accountID:t,processorToken:o}){return e(`/accounts/${t}/bank-accounts`,{method:"POST",body:{plaid:{token:o}}})}({processorToken:t,accountID:o})).then(e=>i&&i(e)).catch(e=>r&&r("ERROR",e)):function({accountID:t,publicToken:o}){return e(`/accounts/${t}/bank-accounts`,{method:"POST",body:{plaidLink:{publicToken:o}}})}({publicToken:t,accountID:o}).then(e=>i&&i(e)).catch(e=>r&&r("ERROR",e))},onExit:function(e,t){a&&a(e,t),null!==e&&console.error("Plaid error:",e)},onEvent:function(e,t){l||"ERROR"!==e||(h(t),l=!0),r&&r(e,t)},product:d,env:n,...u})});return p}return{reinitialize:async function({receivedRedirectUri:e,...o}){let n,i,r=null;try{r=localStorage.getItem("moovPlaidToken")}catch{}if(!r)throw new Error("No token found");try{const e=JSON.parse(r);n=e.accountID,i=e.token}catch{throw new Error("Could not parse token data")}try{await q()}catch(e){throw new Error("Error loading Plaid Link SDK")}const a=window?window.location.href:"",s=await t({receivedRedirectUri:e||a,...o,accountID:n,token:i});return s.open(),s},initialize:async function({accountID:o,elementID:n,redirectURL:i,shadowRootElement:r,token:a,...s}){if(!o)throw new Error("accountID is required");try{await q()}catch(e){throw new Error("Error loading Plaid Link SDK")}let c=a;c||(c=await function({accountID:t,redirectURL:o}){return e(`/accounts/${t}/plaidtoken`,{method:"POST",body:{redirectURL:o}}).then(e=>e.linkToken)}({accountID:o,redirectURL:i}));try{localStorage.setItem("moovPlaidToken",JSON.stringify({token:c,accountID:o}))}catch{}const d=await t({...s,token:c,accountID:o});if(n){let e;e=r?r.getElementById(n):document.getElementById(n),e?e.addEventListener("click",function(){d.open()}):console.error(`Element with id="${n}"" not found.`)}return d}}},B=new Uint8Array(16),G=[];for(let e=0;e<256;++e)G.push((e+256).toString(16).slice(1));const F=function(e,t,o){return t||e||!crypto.randomUUID?function(e,t,o){const n=(e=e||{}).random??e.rng?.()??crypto.getRandomValues(B);if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){if((o=o||0)<0||o+16>t.length)throw new RangeError(`UUID byte range ${o}:${o+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[o+e]=n[e];return t}return function(e,t=0){return(G[e[t+0]]+G[e[t+1]]+G[e[t+2]]+G[e[t+3]]+"-"+G[e[t+4]]+G[e[t+5]]+"-"+G[e[t+6]]+G[e[t+7]]+"-"+G[e[t+8]]+G[e[t+9]]+"-"+G[e[t+10]]+G[e[t+11]]+G[e[t+12]]+G[e[t+13]]+G[e[t+14]]+G[e[t+15]]).toLowerCase()}(n)}(e,t,o):crypto.randomUUID()},K=function(e,t,o="_drop"){t.forEach(t=>{const n=`_${t}`,i=`_${t}GetSideEffect`,r=`_${t}SetSideEffect`;Object.defineProperty(e.prototype,n,{writable:!0,value:void 0}),Object.defineProperty(e.prototype,t,{get:function(){const e=this,t=e[i];return"function"==typeof t&&t.call(e),e[n]},set:function(e){const i=this,a=i[o];i[n]=e;const s=i[r];var c;"function"==typeof s&&s.call(i,e),(c=a)&&void 0!==c.render&&"function"==typeof c.render&&a.render({[t]:e})}})})},W=e=>e.replace(/-./g,e=>e[1]?.toUpperCase()??"");class X extends HTMLElement{static observedAttributes=["oauth-token","account-id","validation-event","merchant-account-id"];static componentProps=["oauthToken","accountID","validationEvent","inputStyle","onEnterKeyPress","onError","onValidated","onSuccess","imperativeRef","holderName","allowedCardBrands","billingAddress","merchantAccountID","cardOnFile"];_drop;constructor(){super()}handleMoovDropsInitialized=()=>{this.id||(this.id=`moov-card-link-${F()}`),this.imperativeRef||(this.imperativeRef={current:null});const e={};X.componentProps.forEach(t=>{t in this&&(e[t]=this[t])});const t=window.drops.cardLink(e,this.id);this._drop=t};handleMoovJsLoaded=()=>{document.removeEventListener("moov.moovJSLoaded",this.handleMoovJSLoaded),window.Moov&&!window.drops&&window.Moov("fake-token").drops().then(this.handleMoovDropsInitialized)};connectedCallback(){window.drops&&this.handleMoovDropsInitialized(),window.Moov&&!window.drops&&this.handleMoovJsLoaded(),window.Moov||window.drops||document.addEventListener("moov.moovJSLoaded",this.handleMoovJsLoaded)}attributeChangedCallback(e,t,o){if(t===o)return;let n=W(e);"account-id"===e&&(n="accountID"),"merchant-account-id"===e&&(n="merchantAccountID"),n in this&&(this[n]=o)}submit(){this.imperativeRef.current?.submit?.()}validate(){this.imperativeRef.current?.validate?.()}fetchValidity(){return this.imperativeRef.current?.fetchValidity?.()}clear(){this.imperativeRef.current?.clear?.()}}K(X,X.componentProps);const Z=X;class Q extends HTMLElement{static observedAttributes=["token","account-id"];static componentProps=["token","accountID","open","onCancel","onError","onSuccess"];_drop;constructor(){super()}handleMoovDropsInitialized=()=>{this.id||(this.id=`moov-file-upload-${F()}`);const e={};Q.componentProps.forEach(t=>{t in this&&(e[t]=this[t])});const t=window.drops.fileUpload(e,this.id);this._drop=t};handleMoovJsLoaded=()=>{document.removeEventListener("moov.moovJSLoaded",this.handleMoovJSLoaded),window.Moov&&!window.drops&&window.Moov("fake-token").drops().then(this.handleMoovDropsInitialized)};connectedCallback(){window.drops&&this.handleMoovDropsInitialized(),window.Moov&&!window.drops&&this.handleMoovJsLoaded(),window.Moov||window.drops||document.addEventListener("moov.moovJSLoaded",this.handleMoovJsLoaded)}attributeToProperty(e){return"account-id"===e?"accountID":"facilitator-account-id"===e?"facilitatorAccountID":W(e)}attributeChangedCallback(e,t,o){if(t===o)return;const n=this.attributeToProperty(e);n in this&&(this[n]=o)}}K(Q,Q.componentProps);const Y=Q;class ee extends HTMLElement{static observedAttributes=["oauth-token","account-id","issued-card-id"];static componentProps=["oauthToken","accountID","issuedCardID"];_drop;constructor(){super()}handleMoovDropsInitialized=()=>{this.id||(this.id=`moov-issued-card-${F()}`),this.imperativeRef||(this.imperativeRef={current:null});const e={};ee.componentProps.forEach(t=>{t in this&&(e[t]=this[t])});const t=window.drops.issuedCard(e,this.id);this._drop=t};handleMoovJsLoaded=()=>{document.removeEventListener("moov.moovJSLoaded",this.handleMoovJSLoaded),window.Moov&&!window.drops&&window.Moov("fake-token").drops().then(this.handleMoovDropsInitialized)};connectedCallback(){window.drops&&this.handleMoovDropsInitialized(),window.Moov&&!window.drops&&this.handleMoovJsLoaded(),window.Moov||window.drops||document.addEventListener("moov.moovJSLoaded",this.handleMoovJsLoaded)}attributeChangedCallback(e,t,o){if(t===o)return;let n=W(e);"account-id"===e&&(n="accountID"),"issued-card-id"===e&&(n="issuedCardID"),n in this&&(this[n]=o)}}K(ee,ee.componentProps);const te=ee;class oe extends HTMLElement{static observedAttributes=["facilitator-account-id","token","account-id","show-logo"];static componentProps=["accountData","capabilities","facilitatorAccountID","onCancel","onError","onSuccess","onResourceCreated","onPlaidRedirect","open","token","mode","plaid","accountID","paymentMethodTypes","accountTypes","microDeposits","allowedCardBrands","merchantAccountID","cardOnFile","showLogo","skipUnderwriting","feePlanID"];_drop;constructor(){super()}handleMoovDropsInitialized=()=>{this.id||(this.id=`moov-onboarding-${F()}`);const e={};oe.componentProps.forEach(t=>{t in this&&(e[t]=this[t])});const t=window.drops.onboarding(e,this.id);this._drop=t};handleMoovJsLoaded=()=>{document.removeEventListener("moov.moovJSLoaded",this.handleMoovJSLoaded),window.Moov&&!window.drops&&window.Moov("fake-token").drops().then(this.handleMoovDropsInitialized)};connectedCallback(){window.drops&&this.handleMoovDropsInitialized(),window.Moov&&!window.drops&&this.handleMoovJsLoaded(),window.Moov||window.drops||document.addEventListener("moov.moovJSLoaded",this.handleMoovJsLoaded)}attributeToProperty(e){return"account-id"===e?"accountID":"facilitator-account-id"===e?"facilitatorAccountID":"merchant-account-id"===e?"merchantAccountID":W(e)}attributeChangedCallback(e,t,o){if(t===o)return;const n=this.attributeToProperty(e);n in this&&(this[n]=o)}}K(oe,oe.componentProps);const ne=oe;class ie extends HTMLElement{static observedAttributes=["facilitator-account-id","token","account-id"];static componentProps=["accountData","facilitatorAccountID","onCancel","onError","onSuccess","onResourceCreated","onPlaidRedirect","open","token","plaid","accountID","paymentMethodTypes","microDeposits","allowedCardBrands","merchantAccountID","cardOnFile"];_drop;constructor(){super()}handleMoovDropsInitialized=()=>{this.id||(this.id=`moov-payment-methods-${F()}`);const e={};ie.componentProps.forEach(t=>{t in this&&(e[t]=this[t])});const t=window.drops.paymentMethods(e,this.id);this._drop=t};handleMoovJsLoaded=()=>{document.removeEventListener("moov.moovJSLoaded",this.handleMoovJSLoaded),window.Moov&&!window.drops&&window.Moov("fake-token").drops().then(this.handleMoovDropsInitialized)};connectedCallback(){window.drops&&this.handleMoovDropsInitialized(),window.Moov&&!window.drops&&this.handleMoovJsLoaded(),window.Moov||window.drops||document.addEventListener("moov.moovJSLoaded",this.handleMoovJsLoaded)}attributeToProperty(e){return"account-id"===e?"accountID":"facilitator-account-id"===e?"facilitatorAccountID":"merchant-account-id"===e?"merchantAccountID":W(e)}attributeChangedCallback(e,t,o){if(t===o)return;const n=this.attributeToProperty(e);n in this&&(this[n]=o)}}K(ie,ie.componentProps);const re=ie;class ae extends HTMLElement{static observedAttributes=["name","method","action"];static componentProps=["imperativeRef","name","method","action","requestHeaders","requestBody","onSuccess","onError","onCheckValidity","onReportValidity","onReadOnlyPropertyUpdate"];_drop;constructor(){super()}handleMoovDropsInitialized=()=>{this.id||(this.id=`moov-form-${F()}`),this.imperativeRef||(this.imperativeRef={current:null}),this.onReadOnlyPropertyUpdate=this.handleReadOnlyPropertyUpdate.bind(this);const e={};ae.componentProps.forEach(t=>{t in this&&(e[t]=this[t])});const t=window.drops.form(e,this.id);this._drop=t};handleMoovJsLoaded=()=>{document.removeEventListener("moov.moovJSLoaded",this.handleMoovJSLoaded),window.Moov&&!window.drops&&window.Moov("fake-token").drops().then(this.handleMoovDropsInitialized)};connectedCallback(){window.drops&&this.handleMoovDropsInitialized(),window.Moov&&!window.drops&&this.handleMoovJsLoaded(),window.Moov||window.drops||document.addEventListener("moov.moovJSLoaded",this.handleMoovJsLoaded)}attributeChangedCallback(e,t,o){if(t===o)return;const n=e.replace("-",""),i=ae.componentProps.find(e=>e.toLowerCase()===n.toLowerCase());i&&i in this&&(this[i]=o)}handleReadOnlyPropertyUpdate(e){this&&e&&Object.assign(this,e)}checkValidity(){this.imperativeRef.current?.checkValidity?.()}reportValidity(){this.imperativeRef.current?.reportValidity?.()}requestSubmit(){this.imperativeRef.current?.requestSubmit?.()}reset(){this.imperativeRef.current?.reset?.()}submit(){this.imperativeRef.current?.submit?.()}}K(ae,ae.componentProps);const se=ae;class ce extends HTMLElement{static observedAttributes=["inputmode","name","form-name","formname","value","disabled","required","autocomplete","maxlength","minlength","pattern","placeholder","readonly","size"];static componentProps=["imperativeRef","defaultValue","value","inputmode","name","formName","disabled","required","autocomplete","maxLength","minLength","pattern","placeholder","readOnly","size","inputStyle","onInput","onChange","onFocus","onBlur","onInvalid","onEnterKeyPress","onCheckValidity","onReportValidity","onReadOnlyPropertyUpdate","__onInputDangerous"];_drop;imperativeRef={current:{}};constructor(){super()}handleMoovDropsInitialized=()=>{this.id||(this.id=`moov-text-input-${F()}`),this.imperativeRef||(this.imperativeRef={current:{}}),this.onReadOnlyPropertyUpdate=this.handleReadOnlyPropertyUpdate.bind(this);const e={};ce.componentProps.forEach(t=>{t in this&&(e[t]=this[t])});const t=window.drops.textInput(e,this.id);this._drop=t};handleMoovJsLoaded=()=>{document.removeEventListener("moov.moovJSLoaded",this.handleMoovJSLoaded),window.Moov&&!window.drops&&window.Moov("fake-token").drops().then(this.handleMoovDropsInitialized).catch(e=>{})};connectedCallback(){window.drops&&this.handleMoovDropsInitialized(),window.Moov&&!window.drops&&this.handleMoovJsLoaded(),window.Moov||window.drops||document.addEventListener("moov.moovJSLoaded",this.handleMoovJsLoaded)}attributeChangedCallback(e,t,o){if(t===o)return;const n=e.replace("-",""),i=ce.componentProps.find(e=>e.toLowerCase()===n.toLowerCase());i&&i in this&&(this[i]=o)}handleReadOnlyPropertyUpdate(e){this&&e&&Object.assign(this,e)}blur(){this.imperativeRef.current.blur?.()}click(){this.imperativeRef.current.click?.()}focus(){this.imperativeRef.current.focus?.()}select(){this.imperativeRef.current.select?.()}setValue(e){this.imperativeRef.current.setValue?.(e)}setCustomValidity(e){this.imperativeRef.current.setCustomValidity?.(e)}checkValidity(){this.imperativeRef.current.checkValidity?.()}reportValidity(){this.imperativeRef.current.reportValidity?.()}_valueSetSideEffect(e){this.setValue(e)}}K(ce,ce.componentProps);const de=ce;class ue extends HTMLElement{static observedAttributes=["name","form-name","formname","disabled","required","placeholder","readonly","size"];static componentProps=["imperativeRef","name","formName","disabled","required","placeholder","readOnly","size","inputStyle","allowedCardBrands","onInput","onChange","onFocus","onBlur","onInvalid","onEnterKeyPress","onCheckValidity","onReportValidity","onReadOnlyPropertyUpdate","onBrandChange","onCardMetadataChange","onCardMetadataClear"];_drop;constructor(){super()}handleMoovDropsInitialized=()=>{this.id||(this.id=`moov-card-number-input-${F()}`),this.imperativeRef||(this.imperativeRef={current:null}),this.onReadOnlyPropertyUpdate=this.handleReadOnlyPropertyUpdate.bind(this);const e={};ue.componentProps.forEach(t=>{t in this&&(e[t]=this[t])});const t=window.drops.cardNumberInput(e,this.id);this._drop=t};handleMoovJsLoaded=()=>{document.removeEventListener("moov.moovJSLoaded",this.handleMoovJSLoaded),window.Moov&&!window.drops&&window.Moov("fake-token").drops().then(this.handleMoovDropsInitialized)};connectedCallback(){window.drops&&this.handleMoovDropsInitialized(),window.Moov&&!window.drops&&this.handleMoovJsLoaded(),window.Moov||window.drops||document.addEventListener("moov.moovJSLoaded",this.handleMoovJsLoaded)}attributeChangedCallback(e,t,o){if(t===o)return;const n=e.replace("-",""),i=ue.componentProps.find(e=>e.toLowerCase()===n.toLowerCase());i&&i in this&&(this[i]=o)}handleReadOnlyPropertyUpdate(e){this&&e&&Object.assign(this,e)}blur(){this.imperativeRef.current?.blur?.()}click(){this.imperativeRef.current?.click?.()}focus(){this.imperativeRef.current?.focus?.()}select(){this.imperativeRef.current?.select?.()}setCustomValidity(e){this.imperativeRef.current?.setCustomValidity?.(e)}checkValidity(){this.imperativeRef.current?.checkValidity?.()}reportValidity(){this.imperativeRef.current?.reportValidity?.()}}K(ue,ue.componentProps);const le=ue;class pe extends HTMLElement{static observedAttributes=["name","form-name","formname","disabled","required","placeholder","readonly","size"];static componentProps=["imperativeRef","name","formName","disabled","required","placeholder","readOnly","size","inputStyle","onInput","onChange","onFocus","onBlur","onInvalid","onEnterKeyPress","onCheckValidity","onReportValidity","onReadOnlyPropertyUpdate"];_drop;constructor(){super()}handleMoovDropsInitialized=()=>{this.id||(this.id=`moov-card-security-code-input-${F()}`),this.imperativeRef||(this.imperativeRef={current:null}),this.onReadOnlyPropertyUpdate=this.handleReadOnlyPropertyUpdate.bind(this);const e={};pe.componentProps.forEach(t=>{t in this&&(e[t]=this[t])});const t=window.drops.cardSecurityCodeInput(e,this.id);this._drop=t};handleMoovJsLoaded=()=>{document.removeEventListener("moov.moovJSLoaded",this.handleMoovJSLoaded),window.Moov&&!window.drops&&window.Moov("fake-token").drops().then(this.handleMoovDropsInitialized)};connectedCallback(){window.drops&&this.handleMoovDropsInitialized(),window.Moov&&!window.drops&&this.handleMoovJsLoaded(),window.Moov||window.drops||document.addEventListener("moov.moovJSLoaded",this.handleMoovJsLoaded)}attributeChangedCallback(e,t,o){if(t===o)return;const n=e.replace("-",""),i=pe.componentProps.find(e=>e.toLowerCase()===n.toLowerCase());i&&i in this&&(this[i]=o)}handleReadOnlyPropertyUpdate(e){this&&e&&Object.assign(this,e)}blur(){this.imperativeRef.current?.blur?.()}click(){this.imperativeRef.current?.click?.()}focus(){this.imperativeRef.current?.focus?.()}select(){this.imperativeRef.current?.select?.()}setCustomValidity(e){this.imperativeRef.current?.setCustomValidity?.(e)}checkValidity(){this.imperativeRef.current?.checkValidity?.()}reportValidity(){this.imperativeRef.current?.reportValidity?.()}}K(pe,pe.componentProps);const he=pe;class me extends HTMLElement{static observedAttributes=["name","form-name","formname","value","disabled","required","readonly","size"];static componentProps=["imperativeRef","defaultValue","value","name","formName","disabled","required","readOnly","size","inputStyle","onInput","onChange","onFocus","onBlur","onInvalid","onEnterKeyPress","onCheckValidity","onReportValidity","onReadOnlyPropertyUpdate"];_drop;imperativeRef={current:{}};constructor(){super()}handleMoovDropsInitialized=()=>{this.id||(this.id=`moov-expiration-date-input-${F()}`),this.imperativeRef||(this.imperativeRef={current:{}}),this.onReadOnlyPropertyUpdate=this.handleReadOnlyPropertyUpdate.bind(this);const e={};me.componentProps.forEach(t=>{t in this&&(e[t]=this[t])});const t=window.drops.expirationDateInput(e,this.id);this._drop=t};handleMoovJsLoaded=()=>{document.removeEventListener("moov.moovJSLoaded",this.handleMoovJSLoaded),window.Moov&&!window.drops&&window.Moov("fake-token").drops().then(this.handleMoovDropsInitialized).catch(e=>{})};connectedCallback(){window.drops&&this.handleMoovDropsInitialized(),window.Moov&&!window.drops&&this.handleMoovJsLoaded(),window.Moov||window.drops||document.addEventListener("moov.moovJSLoaded",this.handleMoovJsLoaded)}attributeChangedCallback(e,t,o){if(t===o)return;const n=e.replace("-",""),i=me.componentProps.find(e=>e.toLowerCase()===n.toLowerCase());i&&i in this&&(this[i]=o)}handleReadOnlyPropertyUpdate(e){this&&e&&Object.assign(this,e)}blur(){this.imperativeRef.current.blur?.()}click(){this.imperativeRef.current.click?.()}focus(){this.imperativeRef.current.focus?.()}select(){this.imperativeRef.current.select?.()}setValue(e){this.imperativeRef.current.setValue?.(e)}setCustomValidity(e){this.imperativeRef.current.setCustomValidity?.(e)}checkValidity(){this.imperativeRef.current.checkValidity?.()}reportValidity(){this.imperativeRef.current.reportValidity?.()}_valueSetSideEffect(e){this.setValue(e)}}K(me,me.componentProps);const ve=me;class fe extends HTMLElement{static observedAttributes=["token","custom-action-copy","text-color","link-color","background-color","font-size"];static componentProps=["token","customActionCopy","onTermsOfServiceTokenReady","onTermsOfServiceTokenError","textColor","linkColor","backgroundColor","fontSize"];_drop;constructor(){super()}handleMoovDropsInitialized=()=>{this.id||(this.id=`moov-terms-of-service-${F()}`);const e={};fe.componentProps.forEach(t=>{t in this&&(e[t]=this[t])});const t=window.drops.termsOfService(e,this.id);this._drop=t};handleMoovJsLoaded=()=>{document.removeEventListener("moov.moovJSLoaded",this.handleMoovJSLoaded),window.Moov&&!window.drops&&window.Moov("fake-token").drops().then(this.handleMoovDropsInitialized)};connectedCallback(){window.drops&&this.handleMoovDropsInitialized(),window.Moov&&!window.drops&&this.handleMoovJsLoaded(),window.Moov||window.drops||document.addEventListener("moov.moovJSLoaded",this.handleMoovJsLoaded)}attributeToProperty(e){return"account-id"===e?"accountID":"facilitator-account-id"===e?"facilitatorAccountID":W(e)}attributeChangedCallback(e,t,o){if(t===o)return;const n=this.attributeToProperty(e);n in this&&(this[n]=o)}}K(fe,fe.componentProps);const we=fe,be=e=>async function(){return await o.e(504).then(o.bind(o,504)),window.drops&&(window.drops.moovAccessToken=e),window.drops};window&&window.customElements&&(window.customElements.get("moov-card-link")||(window.customElements.define("moov-card-link",Z),window.customElements.define("moov-file-upload",Y),window.customElements.define("moov-issued-card",te),window.customElements.define("moov-onboarding",ne),window.customElements.define("moov-payment-methods",re),window.customElements.define("moov-form",se),window.customElements.define("moov-text-input",de),window.customElements.define("moov-card-number-input",le),window.customElements.define("moov-card-security-code-input",he),window.customElements.define("moov-expiration-date-input",ve),window.customElements.define("moov-terms-of-service",we)));const ye=new CustomEvent("moov.moovJSLoaded");setTimeout(()=>document.dispatchEvent(ye),0);const ke=e=>{if(!("fake-token"===(t=e)||(o=t)&&/^[\w-]+\.[\w-]+\.[\w-]+$/.test(o)))throw new Error("Please initialize Moov.js with a valid Moov access token.");var t,o;const n=V(e);return{ping:j(n).ping,enrichment:{...x(n)},institutions:{...U(n)},accounts:{...D(n)},setToken:e=>ke(e),plaid:{...H(n)},drops:be(e),version:"2.0.6"}},Ie=ke})(),Moov=n.default})();