PageSourceSearch

https://applynow.avadiancu.com/_next/static/chunks/pages/account-o…/business-documents-4a4dc9ec8d96f329.js

js avadiancu.com collected 2026-09-28 06:46:44 UTC 109,643 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4017],{5412:(e,t,n)=>{"use strict";n.d(t,{D:()=>s});var o=n(15708),r=n.n(o),i=["a","br","div","i","img","li","ol","p","h1","h2","h3","h4","h5","h6","footer","header","aside","section","strong","ul","b","span","em"],a=["id","style","class"],l=function(e){return Array.isArray(e)||"string"==typeof String(e)?Array.isArray(e)?e.flatMap(function(e){return l(e)}):r()(e,{allowedTags:i,allowedAttributes:{h1:a,h2:a,h3:a,h4:a,h5:a,h6:a,footer:a,header:a,aside:a,section:a,a:["href","target","rel"].concat(a),br:[],div:a,i:a,img:["width","height","src","srcset","alt"].concat(a),li:a,ol:a,p:a,span:a,strong:a,ul:a,em:a,b:a},allowedSchemesByTag:{img:["data","https"]}}):""},s={sanitize:l}},6514:(e,t,n)=>{"use strict";n.d(t,{y:()=>l});var o=n(8368),r=(0,o.AH)(["",""],function(e){var t=e.$color,n=e.$weight,r=e.theme;return(0,o.AH)(["color:",";font-weight:",";"],null!=t?t:r.token.color.text.primary,null!=n?n:r.token.typography.fontWeight[500])}),i=function(e,t){switch(t){case"primarySection":return e.token.typography.fontSize["07"];case"secondary":return e.token.typography.fontSize["06"];case"tertiary":return e.token.typography.fontSize["05"];case"smallest":return e.token.typography.fontSize["04"];default:return e.token.typography.fontSize["08"]}},a=function(e){return o.Ay[e].withConfig({displayName:"Titlestyled",componentId:"sc-a4gkgp-0"})([""," font-size:",";",""],r,function(e){return i(e.theme,e.$variant)},function(e){return e.$shouldUseDesignSystemFont?(0,o.AH)(["font-family:",";"],function(e){return e.theme.token.typography.fontFamily.base}):""})},l={h1:a("h1"),h2:a("h2"),h3:a("h3"),h4:a("h4"),h5:a("h5"),h6:a("h6")}},8290:(e,t,n)=>{"use strict";n.d(t,{v:()=>m});var o=n(84297),r=n(95952),i=n(22737),a=n(90159),l=n(53239),s=n(8368),c=n(86236),d=n(43348),u=s.Ay.span.withConfig({displayName:"Chipstyled__Chip",componentId:"sc-1v4wok9-0"})(["--background-color:",";--border:1px solid;--border-color:",";display:flex;align-items:center;justify-content:space-between;width:fit-content;padding:0.5rem;gap:0.5rem;line-height:0.938rem;background-color:var(--background-color);border:var(--border);border-color:var(--border-color);border-radius:",";cursor:",";svg{fill:",";}"," ",""],function(e){return e.theme.token.color.surface.neutral},function(e){return e.theme.token.color.partner.lighter},function(e){return e.theme.token.radius["02"]},function(e){var t=e.onClick,n=e.$dropdown;return t||n?"pointer":"default"},function(e){return e.theme.token.color.text.secondary},function(e){if(e.$active)return(0,s.AH)(["--background-color:",";--border-color:",";p{color:",";}svg{fill:",";}"],function(e){return e.theme.token.color.partner.lighter},function(e){return e.theme.token.color.text.negative},function(e){return e.theme.token.color.main.primary},function(e){return e.theme.token.color.main.primary})},function(e){if(e.$variant===c.F.SUCCESS)return(0,s.AH)(["--background-color:",";--font-weight:",";--border:none;p{color:",";font-weight:",";text-transform:none;}"],function(e){return e.theme.token.color.surface.status.positive},function(e){return e.theme.token.typography.fontWeight[400]},function(e){return e.theme.token.color.status.positive},function(e){return e.theme.token.typography.fontWeight[400]})}),p=(0,s.Ay)(d.E).withConfig({displayName:"Chipstyled__ChipText",componentId:"sc-1v4wok9-1"})(["padding:0;margin:0;"]),f=n(80263),m=l.forwardRef(function(e,t){var n=e.id,l=e.label,s=e.className,d=e.variant,m=void 0===d?c.F.DEFAULT:d,y=e.active,h=e.icon,g=e.dropdown,b=void 0!==g&&g,v=e.onClick,x=e.dataDogRumPrivacy;return(0,f.jsxs)(u,{$variant:m,$active:void 0!==y&&y,$dropdown:b,className:s,id:n,onClick:v,ref:t,children:[(0,f.jsx)(i.j,{condition:!!h,children:h}),(0,f.jsx)(p,{$variant:"label",$weight:"bold",children:(0,f.jsx)("span",{"data-dd-privacy":void 0===x?"allow":x,children:l})}),(0,f.jsx)(i.j,{condition:b,children:(0,f.jsx)(o.I,{size:r.y.SMALL,weight:"bold",children:(0,f.jsx)(a.a,{})})})]})});m.displayName="Chip"},20214:(e,t,n)=>{"use strict";n.d(t,{C:()=>o});var o={POSITIVE:"POSITIVE",WARNING:"WARNING",NEGATIVE:"NEGATIVE",INFO:"INFO",NEUTRAL:"NEUTRAL"}}
1,21438:(e,t,n)=>{"use strict";n.d(t,{l:()=>o});var o={NEUTRAL:"NEUTRAL",SUCCESS:"SUCCESS",WARNING:"WARNING",NEGATIVE:"NEGATIVE",INFO:"INFO",BRAND:"BRAND"}},24196:()=>{},24825:(e,t,n)=>{"use strict";n.d(t,{h:()=>i});var o=n(6514),r=n(80263);function i(e){var t=e.as,n=e.color,i=e.weight,a=e.variant,l=e.children,s=e.shouldUseDesignSystemFont,c=e.id,d=e.dataTestID,u=o.y[t];return(0,r.jsx)(u,{$color:n,$variant:a,$weight:i,$shouldUseDesignSystemFont:s,id:c,"data-testid":d,children:l})}},29974:(e,t,n)=>{"use strict";n.d(t,{u:()=>l});var o=n(32144),r=n(31901);let i="@clutch/dao-sso-access-token";var a=n(64413);let l=()=>{let e=(0,o.jE)(),{accessToken:t}=(0,a.useCustomer)(),{data:n}=(0,r.I)({queryKey:[i],queryFn:async()=>{var t;return null!=(t=e.getQueryData([i]))?t:null},cacheTime:1/0});return t?{accessToken:t}:{accessToken:null==n?void 0:n.accessToken}}},30587:(e,t,n)=>{"use strict";n.d(t,{z:()=>A});var o=n(86917),r=n(97722),i=n(80263),a=n(55499),l=n(22737),s=n(24825),c=n(63607),d=n(59046),u=n(80619),p=n(66329),f=n(44007),m=n(8368),y=n(25437),h=n(59946);let g="96px",b="128px";m.Ay.div.withConfig({displayName:"BusinessLayout.styled__LinkWrapper",componentId:"sc-ad0754ce-0"})(["display:flex;align-items:center;gap:1rem;font-family:",";padding-left:1rem;"],e=>{let{theme:t}=e;return t.foundations.typography.fontFamily.sansSerifSecondary});let v=m.Ay.div.withConfig({displayName:"BusinessLayout.styled__FontFamilyDiv",componentId:"sc-ad0754ce-1"})(["font-family:",";*{font-family:inherit;}"],e=>{let{theme:t}=e;return t.foundations.typography.fontFamily.sansSerifSecondary}),x=m.Ay.div.withConfig({displayName:"BusinessLayout.styled__ContentStyled",componentId:"sc-ad0754ce-2"})(["overflow-x:hidden;grid-area:content;width:100%;max-width:100vw;@media ","{height:calc(100% - "," - "," - env(safe-area-inset-bottom,0px));}"],(0,h.P)({from:"lg"}),g,b),w=m.Ay.div.withConfig({displayName:"BusinessLayout.styled__ContentWrapper",componentId:"sc-ad0754ce-3"})(["display:flex;flex-direction:column;padding:1.5rem;overflow:visible;width:100%;margin:auto;box-sizing:border-box;max-width:100%;padding-bottom:2rem;height:100%;@media ","{max-width:910px;padding-top:0;overflow:visible;padding-bottom:calc("," + env(safe-area-inset-bottom,0px));height:calc(100% - "," - "," - env(safe-area-inset-bottom,0px));}"],(0,h.P)({from:"lg"}),g,g,b),I=(0,m.Ay)(y.$).withConfig({displayName:"BusinessLayout.styled__Button",componentId:"sc-ad0754ce-4"})(["grid-column-start:3;justify-self:end;border-radius:",";"],e=>{let{theme:t}=e;return t.token.radius["03"]});function A(e){let{children:t,message:n,withHeader:y,withBrandedHeader:h=!0,buttonProps:g}=e,{isDesktop:b}=(0,a.k)(),A=(0,m.DP)(),j=(0,f.useRouter)(),E=g?(0,r._)((0,o._)({},g),{"data-testid":g.dataTestID}):{};return g&&E.dataTestID&&delete E.dataTestID,(0,i.jsx)(v,{children:(0,i.jsxs)(u.sc,{$contentWidth:"100%",$contentHeight:"100%",$backgroundColor:"#FFFFFF",children:[(0,i.jsx)(l.j,{condition:h,children:(0,i.jsx)(u.Vs,{children:(0,i.jsx)(d.u,{hideMenu:!0})})}),(0,i.jsx)(l.j,{condition:y,children:(0,i.jsx)(u.IS,{children:(0,i.jsx)(p.g,{small:!0,onBack:()=>j.back(),showBackButton:!0,children:(0,i.jsx)(s.h,{color:A.token.color.partner.primary,as:"h3",variant:"tertiary",children:n})})})}),(0,i.jsx)(x,{as:"main",id:"main-content",children:(0,i.jsx)(w,{children:t})}),(0,i.jsx)(l.j,{condition:b,children:(0,i.jsx)(c.E,{innerWidth:"900px",children:(0,i.jsx)(I,(0,r._)((0,o._)({},E),{size:"lg",children:(null==g?void 0:g.label)||"Continue"}))})})]})})}},33722:(e,t,n)=>{"use strict";n.d(t,{M:()=>l,u:()=>s});var o=n(58064),r=n(92972),i=n(23096),a=n(98428);let l={BUSINESS_PERSONS:"/refi-pipeline/:partnerId/account-opening/applications/:applicationId/business-persons",CREATE_BUSINESS_PERSON_2FA_AUTH_FLOW:"/refi-pipeline/:partnerId/account-opening/customers/main-authorized-signer",CREATE_BUSINESS_PERSON_MANUAL_FLOW:"/refi-pipeline/:partnerId/account-opening/customers/manual",SAVE_BUSINESS_INFORMATION:"/refi-pipeline/:partnerId/account-opening/applications/orchestrations/business-application",SAVE_BUSINESS_QUESTIONNAIRE:"/refi-pipeline/:partnerId/account-opening/applications/:applicationId/businesses/:businessId/custom-questions",GET_BUSINESS_DATA:"/refi-pipeline/:partnerId/account-opening/applications/:applicationId/businesses/:businessId",ACTION_ON_BUSINESS_PERSON:"/refi-pipeline/:partnerId/account-opening/applications/:applicationId/business-persons/:pers
1onId",GET_DOCUMENT_REQUIREMENTS:"/account-opening/document-requirements?applicationId=:applicationId&applicationSource=:applicationSource",GET_APPLICATION_DOCUMENTS:"/refi-pipeline/:partnerId/account-opening/applications/:applicationId/documents",DELETE_APPLICATION_DOCUMENT:"/refi-pipeline/:partnerId/account-opening/applications/:applicationId/documents/:documentId"},s={createAuthorizedSigner:async e=>{let{partnerId:t,accessToken:n,body:o,useManualFlow:a}=e,s=a?l.CREATE_BUSINESS_PERSON_MANUAL_FLOW:l.CREATE_BUSINESS_PERSON_2FA_AUTH_FLOW,c=await i.FU.post(s.replace(":partnerId",t),o,{headers:{Authorization:"Bearer ".concat(n)}});if(c.status===r.t.CREATED)return c.data;throw Error("Error creating business person on ".concat(a?"manual flow":"2fa flow"))},createBusinessPerson:async e=>{let{applicationId:t,partnerId:n,accessToken:a,body:s}=e,c=(0,o.iv)(t)?t:"";if(!c)throw Error("Invalid application id");let d=l.BUSINESS_PERSONS.replace(":applicationId",c).replace(":partnerId",n),u=await i.FU.post(d,s,{headers:{Authorization:"Bearer ".concat(a)}});if(u.status===r.t.CREATED)return u.data;throw Error("Error creating business person")},saveBusinessLevelCustomQuestions:async e=>{let{applicationId:t,partnerId:n,businessId:a,accessToken:s,body:c}=e,d=(0,o.iv)(t)?t:"",u=(0,o.iv)(a)?a:"";if(!d||!u)throw Error("Invalid application or business id");let p=l.SAVE_BUSINESS_QUESTIONNAIRE.replace(":applicationId",d).replace(":partnerId",n).replace(":businessId",u),f=await i.FU.patch(p,c,{headers:{Authorization:"Bearer ".concat(s)}});if(f.status===r.t.OK)return f.data;throw Error("Error saving business questionnaire")},saveBusinessInformation:async e=>{let{accessToken:t,body:n,partnerId:o}=e,a=l.SAVE_BUSINESS_INFORMATION.replace(":partnerId",o),s=await i.FU.post(a,n,{headers:{Authorization:"Bearer ".concat(t)}});if(s.status===r.t.OK||s.status===r.t.CREATED)return s.data;throw Error("Error saving business information")},getBusinessData:async e=>{let{applicationId:t,businessId:n,accessToken:a,partnerId:s}=e,c=(0,o.iv)(t)?t:"",d=(0,o.iv)(n)?n:"";if(!c||!d)throw Error("Invalid application or business id");let u=l.GET_BUSINESS_DATA.replace(":applicationId",c).replace(":businessId",d).replace(":partnerId",s),p=await i.FU.get(u,{headers:{Authorization:"Bearer ".concat(a)}});if(p.status===r.t.OK)return p.data;throw Error("Error getting business data")},getBusinessPeople:async e=>{let{applicationId:t,accessToken:n,partnerId:a}=e,s=(0,o.iv)(t)?t:"";if(!s)throw Error("Invalid application id");let c=l.BUSINESS_PERSONS.replace(":applicationId",s).replace(":partnerId",a),d=await i.FU.get(c,{headers:{Authorization:"Bearer ".concat(n)}});if(d.status===r.t.OK)return d.data.persons;throw Error("Error getting business people")},deleteBusinessPerson:async e=>{let{applicationId:t,accessToken:n,partnerId:a,personId:s}=e,c=(0,o.iv)(t)?t:"",d=(0,o.iv)(s)?s:"";if(!c||!d)throw Error("Invalid application id or person id");let u=l.ACTION_ON_BUSINESS_PERSON.replace(":applicationId",c).replace(":partnerId",a).replace(":personId",d),p=await i.FU.delete(u,{headers:{Authorization:"Bearer ".concat(n)}});if(p.status===r.t.NO_CONTENT)return p.data;throw Error("Error deleting business person")},editBusinessPerson:async e=>{let{applicationId:t,accessToken:n,partnerId:a,personId:s,body:c}=e,d=(0,o.iv)(t)?t:"",u=(0,o.iv)(s)?s:"";if(!d||!u)throw Error("Invalid application id or person id");let p=l.ACTION_ON_BUSINESS_PERSON.replace(":applicationId",d).replace(":partnerId",a).replace(":personId",u),f=await i.FU.put(p,c,{headers:{Authorization:"Bearer ".concat(n)}});if(f.status===r.t.OK)return f.data;throw Error("Error editing business person")},patchBusinessPerson:async e=>{let{applicationId:t,accessToken:n,partnerId:a,personId:s,body:c,signal:d}=e,u=(0,o.iv)(t)?t:"",p=(0,o.iv)(s)?s:"";if(!u||!p)throw Error("Invalid application id or person id");let f=l.ACTION_ON_BUSINESS_PERSON.replace(":applicationId",u).replace(":partnerId",a).replace(":personId",p),m=await i.FU.patch(f,c,{headers:{Authorization:"Bearer ".concat(n)},signal:d});if(m.status===r.t.OK)return m.data;throw Error("Error patching business person")},getDocumentRequirements:async e=>{let{applicationId:t,accessToken:n,partnerId:s,signal:c}=e,d=(0,o.iv)(t)?t:"";if(!d)throw Error("getDocumentRequirements: Invalid application id");let u=l.GET_DOCUMENT_REQUIREMENTS.replace(":applicationId",d).replace(":applicationSource",a.C.CONSUMER_PORTAL),p=await i.FU.get(u,{headers:{Authorization:"Bearer ".concat(n)},signal:c});if(p.status===r.t.OK)return p.data;throw Error("Error getting document requirements")},getApplicationDocuments:async e=>{let{applicationId:t,accessToken:n,partnerId:a,signal:s}=e,c=(0,o.iv)(t)?t:"";if(!c)throw Error("getApplicationDocuments: Invalid application id");let d=l.GET_APPLICATION_DOCUMENTS.replace(":applicationId",c).replace(":partnerId",a),u=await i.FU.get(d,{headers:{Authorization:"Bearer ".concat(n)},signal:s});if(u.status===r.t.OK)return u.data;throw Error("Error getting application documents")},deleteUploadedDocument:async e=>{let{applicationId:t,documentId:n,accessToken:a,partnerId:s,signal:c}=e,d=(0,o.iv)(t)?t:"",u=(0,o.iv)(n)?n:"";
1if(!d||!u)throw Error("deleteUploadedDocument: Invalid application id or document id");let p=l.DELETE_APPLICATION_DOCUMENT.replace(":applicationId",d).replace(":documentId",u).replace(":partnerId",s),f=await i.FU.delete(p,{headers:{Authorization:"Bearer ".concat(a)},signal:c});if(f.status===r.t.OK)return f.data;throw Error("Error deleting uploaded document")}}},40308:(e,t,n)=>{"use strict";n.d(t,{x:()=>r});var o=n(53239),r=function(){(0,o.useEffect)(function(){var e=new Set,t=function(t){var n=t.target,o=t.relatedTarget;if(o instanceof HTMLElement&&n instanceof Node){var r=o.closest('[role="dialog"]');if(r&&r.contains(n)){var i=requestAnimationFrame(function(){e.delete(i),r.isConnected&&o.isConnected&&document.activeElement===r&&o.focus()});e.add(i)}}};return document.addEventListener("focusout",t,!0),function(){document.removeEventListener("focusout",t,!0),e.forEach(cancelAnimationFrame)}},[])}},40398:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__N_SSP:()=>no,default:()=>nr});var o=n(80263),r=n(90946),i=n(86917),a=n(97722),l={INVALID:"INVALID",STORED_AND_INDEXED:"STORED_AND_INDEXED",ERROR:"ERROR"},s={UPLOADING:"UPLOADING",UPLOADED:"UPLOADED",ERROR:"ERROR"},c=function(e){return e.ADD_UPLOADING_FILE="ADD_UPLOADING_FILE",e.MARK_UPLOADED="MARK_UPLOADED",e.MARK_ERROR="MARK_ERROR",e.DELETE_FILE="DELETE_FILE",e.SET_FILES="SET_FILES",e}({});function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach(function(t){var o,r,i;o=e,r=t,i=n[t],(r=function(e){var t=function(e,t){if("object"!=d(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=d(o))return o;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==d(t)?t:t+""}(r))in o?Object.defineProperty(o,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):o[r]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function f(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return m(e,void 0);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,t):void 0}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function y(e){var t={};return Object.keys(e).forEach(function(n){t[n]=f(e[n])}),t}function h(e,t){switch(t.type){case c.SET_FILES:return p({},t.payload);case c.ADD_UPLOADING_FILE:var n,o=t.payload,r=o.documentType,i=o.fileId,a=o.totalFileSize,l=o.onCancel,d=o.fileName,u=null!=(n=e[r])?n:[],m=y(e);return m[r]=[].concat(f(u),[{filename:d||"Document ".concat(u.length+1),id:i,type:s.UPLOADING,totalFileSize:a,onCancel:null!=l?l:function(){},onCancelAriaLabel:"Cancel",variant:"INTAKE"}]),m;case c.MARK_UPLOADED:var h,g=t.payload,b=g.documentType,v=g.tempId,x=g.uploadedDocumentId,w=g.onDelete,I=g.onReplace,A=g.fileName,j=null!=(h=e[b])?h:[];if(0===j.length)return e;var E=y(e);return E[b]=j.map(function(e,t){return e.id===v?p(p({id:x,type:s.UPLOADED,filename:A||"Document ".concat(t+1),onDelete:w,onDeleteAriaLabel:"Delete"},I?{onReplace:I,onReplaceAriaLabel:"Replace"}:{}),{},{variant:"INTAKE"}):e}),E;case c.MARK_ERROR:var C,S=t.payload,D=S.documentType,_=S.tempId,N=S.message,O=S.onCancel,k=null!=(C=e[D])?C:[];if(0===k.length)return e;var T=y(e);return T[D]=k.map(function(e){return e.id===_?p(p({},e),{},{type:s.ERROR,feedbackMessage:N,onCancel:O,isInsideDocumentCollection:!0}
1):e}),T;case c.DELETE_FILE:var R,U=t.payload,P=U.id,L=U.documentType,B=y(e);return B[L]=(null!=(R=B[L])?R:[]).filter(function(e){return e.id!==P}),B;default:return e}}var g=n(94506),b=n(53239);function v(){var e,t,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function i(n,o,r,i){var s=Object.create((o&&o.prototype instanceof l?o:l).prototype);return x(s,"_invoke",function(n,o,r){var i,l,s,c=0,d=r||[],u=!1,p={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(t,n){return i=t,l=0,s=e,p.n=n,a}};function f(n,o){for(l=n,s=o,t=0;!u&&c&&!r&&t<d.length;t++){var r,i=d[t],f=p.p,m=i[2];n>3?(r=m===o)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=f&&((r=n<2&&f<i[1])?(l=0,p.v=o,p.n=i[1]):f<m&&(r=n<3||i[0]>o||o>m)&&(i[4]=n,i[5]=o,p.n=m,l=0))}if(r||n>1)return a;throw u=!0,o}return function(r,d,m){if(c>1)throw TypeError("Generator is already running");for(u&&1===d&&f(d,m),l=d,s=m;(t=l<2?e:s)||!u;){i||(l?l<3?(l>1&&(p.n=-1),f(l,s)):p.n=s:p.v=s);try{if(c=2,i){if(l||(r="next"),t=i[r]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+r+"' method"),l=1);i=e}else if((t=(u=p.n<0)?s:n.call(o,p))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:u}}}(n,r,i),!0),s}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var d=c.prototype=l.prototype=Object.create([][o]?t(t([][o]())):(x(t={},o,function(){return this}),t));function u(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,x(e,r,"GeneratorFunction")),e.prototype=Object.create(d),e}return s.prototype=c,x(d,"constructor",c),x(c,"constructor",s),s.displayName="GeneratorFunction",x(c,r,"GeneratorFunction"),x(d),x(d,r,"Generator"),x(d,o,function(){return this}),x(d,"toString",function(){return"[object Generator]"}),(v=function(){return{w:i,m:u}})()}function x(e,t,n,o){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}(x=function(e,t,n,o){if(t)r?r(e,t,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[t]=n;else{var i=function(t,n){x(e,t,function(e){return this._invoke(t,n,e)})};i("next",0),i("throw",1),i("return",2)}})(e,t,n,o)}function w(e,t){if(e){if("string"==typeof e)return I(e,t);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?I(e,t):void 0}}function I(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function A(e,t,n,o,r,i,a){try{var l=e[i](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(o,r)}function j(e){return function(){var t=this,n=arguments;return new Promise(function(o,r){var i=e.apply(t,n);function a(e){A(i,o,r,a,l,"next",e)}function l(e){A(i,o,r,a,l,"throw",e)}a(void 0)})}}var E=function(e){var t,n,o=e.applicationDocuments,r=e.sections,i=e.filesBySection,a=e.dispatch,l=e.deleteUploadedDocument,s=e.startDocumentUpload,d=e.displaySnackbar,u=e.setDocumentBeingUploaded,f=(0,b.useCallback)((t=j(v().m(function e(t,n){var o,r,i;return v().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,s({file:t,documentType:n.documentType});case 1:if(o=e.v){e.n=2;break}return e.a(2);case 2:r=o,i=t.size/1024,a({type:c.ADD_UPLOADING_FILE,payload:{fileName:t.name,documentType:n.documentType,fileId:r,totalFileSize:i,onCancel:function(){a({type:c.DELETE_FILE,payload:{id:r,documentType:n.documentType}}),u(function(e){return e.filter(function(e){return e!==r})})}}}),u(function(e){return[].concat(function(e){if(Array.isArray(e))return I(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||w(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[r])});case 3:return e.a(2)}},e)})),function(e,n){return t.apply(this,arguments)}),[s,a,u]),m=(n=j(v().m(function e(t,n,o){var r,i,a,l;return v().w(function(e){for(;;)switch(e.p=e.n){case 0:r=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];
1if(!n){if(Array.isArray(e)||(n=w(e))){n&&(e=n);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}(t),e.p=1,r.s();case 2:if((i=r.n()).done){e.n=7;break}return a=i.value,e.p=3,e.n=4,f(a,n);case 4:e.n=6;break;case 5:e.p=5,o(e.v);case 6:e.n=2;break;case 7:e.n=9;break;case 8:e.p=8,l=e.v,r.e(l);case 9:return e.p=9,r.f(),e.f(9);case 10:return e.a(2)}},e,null,[[3,5],[1,8,9,10]])})),function(e,t,o){return n.apply(this,arguments)}),y=(0,b.useCallback)(function(e,t){e&&l({documentId:e,onSuccess:function(){a({type:c.DELETE_FILE,payload:{id:e,documentType:t}}),d({text:"You've deleted a file.",icon:g.J})},onError:function(){d({text:"Unable to delete the file, please try again.",icon:void 0})}})},[l,d,a]),h=(0,b.useMemo)(function(){var e,t;return o&&0!==r.length?(e=function(e,t){return function(){return y(e,t)}},t={},r.forEach(function(n){var r,i=n.documentType,a=(null!=(r=o.filter(function(e){return e.documentType===i}))?r:[]).map(function(t,n){var o;return p(p({},t),{},{type:"UPLOADED",hasReplaceButton:!1,filename:(null==(o=t.meta)?void 0:o.originalFileName)||"Document ".concat(n+1),onDelete:e(t.id,i),onDeleteAriaLabel:"Delete"})});t[i]=a}),t):null},[o,y,r]);return(0,b.useEffect)(function(){!(Object.keys(i).length>0)&&h&&a({type:c.SET_FILES,payload:h})},[a,i,h]),{onAddFiles:m,onDelete:y}},C=function(e){return!!e&&(e.status===l.INVALID||e.status===l.ERROR||e.status===l.STORED_AND_INDEXED&&!!e.documentId)};function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var D=function(e){var t=e.filesBySection,n=e.statusQueries,o=e.documentBeingUploaded,r=e.dispatch,i=e.onDelete,a=e.timedOutDocumentIds,d=void 0===a?[]:a,u=e.onUploadSettled,p=(0,b.useMemo)(function(){return Object.entries(t).flatMap(function(e){var t=function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,a,l=[],s=!0,c=!1;try{i=(n=n.call(e)).next,!1;for(;!(s=(o=i.call(n)).done)&&(l.push(o.value),l.length!==t);s=!0);}catch(e){c=!0,r=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw r}}return l}}(e,2)||function(e,t){if(e){if("string"==typeof e)return S(e,2);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S(e,t):void 0}}(e,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=t[0];return t[1].filter(function(e){return"UPLOADED"!==e.type}).map(function(e){return{section:n,file:e}})})},[t]),f=(0,b.useMemo)(function(){var e={};return n.forEach(function(t,n){var r,i;e[o[n]]={status:null==(r=t.data)?void 0:r.status,id:null==(i=t.data)?void 0:i.documentId}}),e},[n,o]);(0,b.useEffect)(function(){0!==p.length&&p.forEach(function(e){var t,n=e.section,o=e.file,a=null!=(t=f[o.id])?t:{},p=a.status,m=void 0===p?"":p,y=a.id,h=void 0===y?"":y;if(m===l.STORED_AND_INDEXED&&h){r({type:c.MARK_UPLOADED,payload:{fileName:o.filename,documentType:n,tempId:o.id,uploadedDocumentId:h,onDelete:function(){return i(h,n)}}}),null==u||u(o.id);return}if([l.INVALID,l.ERROR].includes(m)&&o.type!==s.ERROR){var g=m===l.ERROR?"Error while uploading file, please try again":"This doesn’t look like a valid document. Please upload a clear PDF.";r({type:c.MARK_ERROR,payload:{documentType:n,tempId:o.id,message:g,onCancel:function(){return r({type:c.DELETE_FILE,payload:{documentType:n,id:o.id}})}}}),null==u||u(o.id);return}var b=[l.STORED_AND_INDEXED,l.INVALID,l.ERROR];d.includes(o.id)&&!b.includes(m)&&o.type!==s.ERROR&&(r({type:c.MARK_ERROR,payload:{documentType:n,tempId:o.id,message:"Upload timed out, please try again",onCancel:function(){return r({type:c.DELETE_FILE,payload:{documentType:n,id:o.id}})}}}),null==u||u(o.id))})},[p,r,i,f,d,u])}
1,_=n(63607),N=n(22737),O=n(25437),k=n(8368),T=k.Ay.div.withConfig({displayName:"AOActionBarstyled__ActionBarContent",componentId:"sc-1ckekav-0"})(["align-items:center;display:flex;justify-content:space-between;gap:1rem;margin-left:auto;grid-area:right;"]);function R(e){var t=e.onClickCancel,n=e.onClickConfirm,r=e.isConfirmButtonDisabled,i=e.isEditMode,a=e.isConfirmButtonLoading,l=e.cancelButtonLabel,s=e.confirmButtonLabel;return(0,o.jsx)(_.E,{children:(0,o.jsxs)(T,{children:[(0,o.jsx)(N.j,{condition:i,children:(0,o.jsx)(O.$,{variant:"outline",type:"button",size:"lg",onClick:t,children:void 0===l?"Cancel":l})}),(0,o.jsx)(_.E.Button,{onClick:n,disabled:r,loading:a,children:null!=s?s:i?"Save":"Continue"})]})})}var U=n(55499),P=n(24825),L=n(88787),B=n(21438),F=n(84297),$=n(95952),M=n(11757),z=n(41836),G=n(90159),W=k.Ay.div.withConfig({displayName:"Accordionstyled__AccordionContainer",componentId:"sc-110ntgx-0"})(["border-top:2px solid ",";border-bottom:2px solid ",";border-left:none;border-right:none;border-radius:0;background:",";@media (min-width:48rem){border:2px solid ",";border-radius:16px;}"],function(e){return e.theme.token.color.gray["300"]},function(e){return e.theme.token.color.gray["300"]},function(e){return e.theme.token.color.surface.neutral},function(e){return e.theme.token.color.gray["300"]}),K=k.Ay.button.withConfig({displayName:"Accordionstyled__AccordionHeader",componentId:"sc-110ntgx-1"})(["display:grid;grid-template-columns:1fr 2rem;flex-direction:column;align-items:stretch;width:100%;padding:12px;background:none;border:none;border-radius:16px;cursor:pointer;outline:none;transition:all 0.2s ease-in-out;@media (min-width:48rem){flex-direction:row;align-items:center;justify-content:space-between;padding:16px;}"]),V=k.Ay.div.withConfig({displayName:"Accordionstyled__HeaderTopRow",componentId:"sc-110ntgx-2"})(["display:flex;flex-direction:row;align-items:center;width:100%;@media (min-width:48rem){flex-direction:column;align-items:flex-start;width:auto;}"]),H=k.Ay.div.withConfig({displayName:"Accordionstyled__ChevronIconWrapper",componentId:"sc-110ntgx-3"})(["margin-left:auto;display:flex;align-items:center;@media (min-width:48rem){margin-left:8px;}"]),q=k.Ay.div.withConfig({displayName:"Accordionstyled__HeaderLeft",componentId:"sc-110ntgx-4"})(["display:flex;flex-direction:column;align-items:flex-start;width:100%;@media (min-width:48rem){width:auto;}> h3{margin:0;}"]),Y=k.Ay.div.withConfig({displayName:"Accordionstyled__RightSection",componentId:"sc-110ntgx-5"})(["display:flex;align-items:flex-start;margin-top:8px;width:100%;@media (min-width:48rem){margin-top:0;width:auto;flex-direction:row;align-items:center;justify-content:flex-end;}"]),X=k.Ay.div.withConfig({displayName:"Accordionstyled__BadgesContainer",componentId:"sc-110ntgx-6"})(["display:flex;gap:8px;margin-left:0;width:auto;flex-wrap:wrap;@media (min-width:48rem){margin-left:0;flex-wrap:nowrap;}"]),Q=k.Ay.div.withConfig({displayName:"Accordionstyled__AccordionContent",componentId:"sc-110ntgx-7"})(["background:",";@media (min-width:48rem){border-radius:0 0 16px 16px;padding:8px 16px;}"],function(e){return e.theme.token.color.gray[200]}),Z=k.Ay.div.withConfig({displayName:"Accordionstyled__LeftSide",componentId:"sc-110ntgx-8"})(["display:flex;flex-direction:column;align-items:flex-start;gap:24px;@media (min-width:48rem){align-items:center;justify-content:space-between;flex-direction:row;}"]),J=n(88963),ee=n(43348);function et(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var en=function(e){var t,n=e.title,r=e.description,i=e.badges,a=void 0===i?[]:i,l=e.children,s=e.defaultOpen,c=e.className,d=function(e){if(Array.isArray(e))return e}(t=(0,b.useState)(void 0!==s&&s))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,a,l=[],s=!0,c=!1;try{i=(n=n.call(e)).next,!1;for(;!(s=(o=i.call(n)).done)&&(l.push(o.value),l.length!==t);s=!0);}catch(e){c=!0,r=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw r}}return l}}(t,2)||function(e,t){if(e){if("string"==typeof e)return et(e,2);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?et(e,t):void 0}}
1(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),u=d[0],p=d[1],f=(0,k.DP)(),m=(0,b.useCallback)(function(){p(function(e){return!e})},[]);return(0,o.jsxs)(W,{className:c,children:[(0,o.jsxs)(K,{onClick:m,"aria-expanded":u,children:[(0,o.jsxs)(Z,{children:[(0,o.jsx)(V,{children:(0,o.jsxs)(q,{children:[(0,o.jsx)(P.h,{variant:"smallest",as:"h3",children:n}),r&&(0,o.jsx)(ee.E,{as:"span",$variant:"primary",$color:f.token.color.gray[700],children:r})]})}),(0,o.jsx)(X,{children:(0,o.jsx)(N.j,{condition:a.length>0,children:null==a?void 0:a.map(function(e,t){return(0,o.jsx)(J.E,{status:e.status,text:e.text,IconComponent:e.IconComponent,colorfulBackground:!!e.colorfulBackground},t)})})})]}),(0,o.jsx)(Y,{children:(0,o.jsx)(H,{children:(0,o.jsx)(F.I,{size:$.y.MEDIUM,color:f.token.color.gray[500],children:u?(0,o.jsx)(z.Z,{}):(0,o.jsx)(G.a,{})})})})]}),u&&(0,o.jsx)(Q,{children:l})]})},eo=n(6514),er=k.Ay.div.withConfig({displayName:"DocumentCollectionstyled__Container",componentId:"sc-167cr08-0"})(["display:flex;flex-direction:column;gap:32px;"]),ei=k.Ay.div.withConfig({displayName:"DocumentCollectionstyled__PageTop",componentId:"sc-167cr08-1"})(["display:flex;flex-direction:column;gap:16px;padding:0 24px;@media (min-width:48rem){gap:20px;padding:0;}"]),ea=(0,k.Ay)(eo.y.h2).attrs({$variant:"primarySection"}).withConfig({displayName:"DocumentCollectionstyled__PageTitle",componentId:"sc-167cr08-2"})(["font-weight:",";font-size:24px;margin:0;@media (min-width:48rem){font-size:32px;}"],function(e){return e.theme.token.typography.fontWeight[500]}),el=(0,k.Ay)(ee.E).withConfig({displayName:"DocumentCollectionstyled__PageDescription",componentId:"sc-167cr08-3"})(["color:",";margin:0;"],function(e){return e.theme.token.color.gray[700]}),es=k.Ay.ul.withConfig({displayName:"DocumentCollectionstyled__FilesList",componentId:"sc-167cr08-4"})(["display:flex;flex-direction:column;list-style:none;padding:0;margin:0;@media (min-width:48rem){gap:12px;}"]),ec=k.Ay.li.withConfig({displayName:"DocumentCollectionstyled__GroupHelperText",componentId:"sc-167cr08-5"})(["list-style:none;margin-top:",";padding:"," "," 0;font-family:",";font-weight:",";font-size:",";color:",";@media (min-width:48rem){padding:0;}"],function(e){return e.theme.token.spacing["16"]},function(e){return e.theme.token.spacing["08"]},function(e){return e.theme.token.spacing["24"]},function(e){return e.theme.token.typography.fontFamily.base},function(e){return e.theme.token.typography.fontWeight[600]},function(e){return e.theme.token.typography.fontSize["03"]},function(e){return e.theme.token.color.gray["900"]}),ed=k.Ay.li.withConfig({displayName:"DocumentCollectionstyled__FileListItem",componentId:"sc-167cr08-6"})([".accordion-item{span{text-align:left;}}@media (max-width:48rem){&:not(:first-child){.accordion-item{border-top:none;}}}.empty-state{margin:0;padding-top:16px;@media (min-width:48rem){margin-bottom:40px;padding-top:16px;}}"]),eu=n(5090),ep=n(35249),ef=n(63697),em=n(20214),ey={UPLOADING:"UPLOADING",UPLOADED:"UPLOADED",ERROR:"ERROR",READY:"READY"},eh=function(e,t){return e.filter(function(e){return e.type===t}).length},eg=function(e){var t,n,o=e.files.some(function(e){return e.type===ey.ERROR}),r=e.files.some(function(e){return e.type===ey.UPLOADING}),i=e.files.some(function(e){return e.type===ey.UPLOADED});
1return r?{status:em.C.INFO,text:"Uploading",colorfulBackground:!0,IconComponent:ep.e}:o?(t=eh(e.files,ey.ERROR),{status:em.C.NEGATIVE,text:"".concat(t," error(s)"),colorfulBackground:!0,IconComponent:eu.t}):0===e.files.length?{status:em.C.NEUTRAL,text:"No files",colorfulBackground:!0,IconComponent:M.W}:i?(n=eh(e.files,ey.UPLOADED),{status:em.C.NEUTRAL,text:"".concat(n," file(s) added"),colorfulBackground:!0,IconComponent:ef.Z}):null},eb=function(){var e=(0,U.k)().isDesktop;return{getBadges:function(t){var n=eg(t),o=t.isRequired?{status:em.C.NEUTRAL,text:"Required",colorfulBackground:!0}:null;return n&&o?e?[n,o]:[o,n]:n?[n]:o?[o]:void 0}}},ev=k.Ay.div.withConfig({displayName:"EmptyStatestyled__ImageContainer",componentId:"sc-17b600-0"})(["align-items:center;display:flex;justify-content:center;"]),ex=k.Ay.div.withConfig({displayName:"EmptyStatestyled__TextContainer",componentId:"sc-17b600-1"})(["justify-content:center;display:flex;align-items:center;text-align:center;width:75%;"," "," > h4{margin:0;color:",";}"],function(e){return"small"===e.$textMargin&&(0,k.AH)(["margin:1rem auto 0;"])},function(e){return"medium"===e.$textMargin&&(0,k.AH)(["margin:2.5rem auto 0;"])},function(e){return e.theme.token.color.gray[500]}),ew=k.Ay.div.withConfig({displayName:"EmptyStatestyled__EmptyStateContainer",componentId:"sc-17b600-2"})(["margin-top:4rem;"]),eI={MEDIUM:"medium"};function eA(e){var t=e.Illustration,n=e.Text,r=e.className,i=e.textMargin,a=void 0===i?eI.MEDIUM:i;return(0,o.jsxs)(ew,{className:r,children:[(0,o.jsx)(ev,{children:t}),(0,o.jsx)(ex,{$textMargin:a,children:(0,o.jsx)(P.h,{as:"h4",variant:"smallest",children:n})})]})}var ej=n(76213),eE=n(91681),eC=n(4763),eS=n(78732),eD=n(17378),e_=n(8290),eN=n(34367),eO=n(33332),ek=k.Ay.div.withConfig({displayName:"FileUploadRowstyled__Category",componentId:"sc-1fmbuph-0"})(["display:flex;gap:16px;align-items:center;flex-shrink:0;",""],function(e){return"right"===e.$alignment&&(0,k.AH)(["margin-left:auto;"])}),eT=k.Ay.div.withConfig({displayName:"FileUploadRowstyled__Row",componentId:"sc-1fmbuph-1"})(["display:flex;gap:16px;padding:20px 16px;width:100%;align-items:center;",""],function(e){return e.$hasViewActionEnabled&&"\n    cursor: pointer;\n    &:hover {\n      background-color: white;\n    }\n  "}),eR=(0,k.Ay)(eN.c).withConfig({displayName:"FileUploadRowstyled__RowDivider",componentId:"sc-1fmbuph-2"})(["width:stretch;margin:0 -",";"],function(e){return e.theme.token.spacing["24"]}),eU=k.Ay.div.withConfig({displayName:"FileUploadRowstyled__IconWrapper",componentId:"sc-1fmbuph-3"})(["margin-top:2px;display:flex;align-items:center;"]);k.Ay.div.withConfig({displayName:"FileUploadRowstyled__Info",componentId:"sc-1fmbuph-4"})(["flex:1;min-width:0;display:flex;flex-direction:column;gap:12px;"]),k.Ay.div.withConfig({displayName:"FileUploadRowstyled__Actions",componentId:"sc-1fmbuph-5"})(["display:flex;align-items:center;"]);var eP=(0,k.Ay)(eO.K).withConfig({displayName:"FileUploadRowstyled__ActionButton",componentId:"sc-1fmbuph-6"})(["padding:6px;height:auto;width:auto;transition:all 0.2s ease;"]),eL=(0,k.Ay)(eT).withConfig({displayName:"FileUploadRowstyled__DocumentCollectionRow",componentId:"sc-1fmbuph-7"})(["padding:20px 16px;background:",";border:",";border-radius:16px;max-height:",";&:hover{","}"],function(e){return e.theme.token.color.gray[100]},function(e){var t=e.$isReadyType,n=e.theme;return t?"2px solid ".concat(n.token.color.gray[400]):"1px solid ".concat(n.token.color.gray[400])},function(e){return e.$isReadyType?"81px":"auto"},function(e){return e.$hasViewActionEnabled?(0,k.AH)(["cursor:pointer;background:white;outline:2px solid ",";outline-offset:-2px;"],function(e){return e.theme.token.color.gray["700"]}):(0,k.AH)(["background:",";"],function(e){return e.theme.token.color.gray[100]})}),eB=(0,k.Ay)(eP).withConfig({displayName:"FileUploadRowstyled__ButtonAction",componentId:"sc-1fmbuph-8"})(["",":hover &{color:black;}"],eL),eF=(0,k.Ay)(eU).withConfig({displayName:"FileUploadRowstyled__FileUploadRowIconWrapper",componentId:"sc-1fmbuph-9"})(["transition:all 0.2s ease;svg{color:",";}"],function(e){return e.$iconColor||"inherit"}),e$=k.Ay.div.withConfig({displayName:"FileUploadRowstyled__Content",componentId:"sc-1fmbuph-10"})(["display:flex;gap:",";align-items:center;flex:1;min-width:0;"],function(e){return e.$hasCategory?"40px":"0"}),eM=k.Ay.div.withConfig({displayName:"FileUploadRowstyled__FileInfo",componentId:"sc-1fmbuph-11"})(["display:flex;gap:16px;align-items:center;min-width:0;",""],function(e){return e.$hasChip?"\n    flex: 0 0 auto;\n    max-width: 60%;\n  ":"\n    flex: 1;\n  "}),ez=k.Ay.div.withConfig({displayName:"FileUploadRowstyled__FileLabel",componentId:"sc-1fmbuph-12"})(["display:flex;flex-direction:column;gap:",";min-width:0;"," transition:all 0.2s ease;"],function(e){return e.$isTextData?"10px":"0"}
1,function(e){return e.$isUploadedType?"max-width: 330px;":"flex: 1;"}),eG=k.Ay.div.withConfig({displayName:"FileUploadRowstyled__FileName",componentId:"sc-1fmbuph-13"})(["font-weight:bold;font-size:16px;line-height:1.3;color:",";transition:color 0.2s ease;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"],function(e){return e.$filenameColor||"inherit"}),eW=k.Ay.div.withConfig({displayName:"FileUploadRowstyled__FileSubtitle",componentId:"sc-1fmbuph-14"})(["display:flex;gap:10px;align-items:center;"]),eK=k.Ay.span.withConfig({displayName:"FileUploadRowstyled__SubtitleText",componentId:"sc-1fmbuph-15"})(["font-size:14px;color:",";transition:color 0.2s ease;",""],function(e){return e.theme.token.color.gray[600]},function(e){return e.$canTruncate?"\n    overflow: hidden;\n    text-overflow: ellipsis;\n    white-space: nowrap;\n    min-width: 0;\n    flex-shrink: 1;\n  ":"\n    flex-shrink: 0;\n  "}),eV=k.Ay.div.withConfig({displayName:"FileUploadRowstyled__Dot",componentId:"sc-1fmbuph-16"})(["width:4px;height:4px;background:",";border-radius:50%;transition:background-color 0.2s ease;flex-shrink:0;"],function(e){return e.theme.token.color.gray[400]}),eH=k.Ay.div.withConfig({displayName:"FileUploadRowstyled__ContainerActions",componentId:"sc-1fmbuph-17"})(["display:flex;gap:24px;align-items:center;flex-shrink:0;"]),eq=n(69718),eY=n(28917),eX=n(52409),eQ=n(34456),eZ=n(24875),eJ=n(35254);function e0(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(o=i.call(n)).done)&&(l.push(o.value),l.length!==t);s=!0);}catch(e){c=!0,r=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw r}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return e1(e,t);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?e1(e,t):void 0}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function e1(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var e2=function(e){if(void 0===e||isNaN(e))return"";var t=e/1024;return e>=1024?"".concat(Number.isInteger(t)?t:t.toFixed(2),"mb"):"".concat(Number.isInteger(e)?e:e.toFixed(2),"kb")},e8=function(e){var t=e.totalFileSize,n=e.filename,r=t/100,i=(0,k.DP)(),a=e0((0,b.useState)(1),2),l=a[0],s=a[1],c=e0((0,b.useState)(r),2),d=c[0],u=c[1],p=t/12.5;return(0,b.useEffect)(function(){var e=setInterval(function(){s(function(n){return n+8>=98?(clearInterval(e),u(function(e){return t-1>=e?t-1:t}),98):(u(function(e){return e+p}),n+8)})},1500);return function(){return clearInterval(e)}},[p,t]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(ee.E,{as:"span",$variant:"secondary",$color:i.token.color.gray[700],children:[l,"% • ",e2(d)," of ",e2(t)]}),(0,o.jsx)(eZ.h,{value:null!=l?l:0,variant:eJ.ds.DETERMINATE,color:eJ.rK.PRIMARY,rounded:!0,"aria-label":"Upload progress for ".concat(n," is ").concat(l,"%")})]})},e3={pdf:(0,o.jsx)(eq.T,{}),png:(0,o.jsx)(eY.K,{}),jpg:(0,o.jsx)(eX.a,{}),jpeg:(0,o.jsx)(eX.a,{})},e5=function(e){var t,n=null==(t=e.split(".").pop())?void 0:t.toLowerCase();return n&&n in e3?e3[n]:(0,o.jsx)(ef.Z,{})},e4=function(e){var t=(0,k.DP)(),n=e.isInsideDocumentCollection||!1;
1return{UPLOADING:{icon:e5(e.filename),iconColor:t.token.color.gray[600],iconBackgroundColor:"rgba(from ".concat(t.token.color.gray[600]," r g b / 0.05)"),filenameColor:t.token.color.gray[900],statusContent:"totalFileSize"in e&&(0,o.jsx)(e8,{filename:e.filename,totalFileSize:e.totalFileSize}),shouldDisplayCloseButton:n,shouldDisplayReplaceButton:!1,shouldDisplayDeleteButton:!1,shouldDisplayCategoryChip:!1,shouldDisplayUploaderInfo:!1,shouldDisplayDownloadButton:!1,shouldDisplayDescription:!1,shouldDisplayViewButton:!1},UPLOADED:{icon:e5(e.filename),iconColor:t.token.color.gray[600],iconBackgroundColor:"rgba(from ".concat(t.token.color.gray[600]," r g b / 0.05)"),filenameColor:t.token.color.gray[900],statusContent:null,shouldDisplayCloseButton:!1,shouldDisplayReplaceButton:n,shouldDisplayDeleteButton:!0,shouldDisplayCategoryChip:!0,shouldDisplayUploaderInfo:!0,shouldDisplayDownloadButton:!0,shouldDisplayDescription:n,shouldDisplayViewButton:!0},ERROR:{icon:(0,o.jsx)(eQ.l,{}),iconColor:t.token.color.red[500],iconBackgroundColor:t.token.color.red[0],filenameColor:t.token.color.red[600],statusContent:(0,o.jsx)(ee.E,{as:"span",$variant:"secondary",$color:t.token.color.status.negative,children:e.feedbackMessage}),shouldDisplayCloseButton:!0,shouldDisplayReplaceButton:n,shouldDisplayDeleteButton:n,shouldDisplayCategoryChip:!n,shouldDisplayUploaderInfo:!1,shouldDisplayDownloadButton:!1,shouldDisplayDescription:!1,shouldDisplayViewButton:!1},ALERT:{icon:(0,o.jsx)(eu.t,{}),iconColor:t.token.color.orange[500],iconBackgroundColor:t.token.color.orange[0],filenameColor:t.token.color.orange[600],statusContent:(0,o.jsx)(ee.E,{as:"span",$variant:"secondary",$color:t.token.color.status.alert,children:e.feedbackMessage}),shouldDisplayCloseButton:!0,shouldDisplayReplaceButton:n,shouldDisplayDeleteButton:n,shouldDisplayCategoryChip:!1,shouldDisplayUploaderInfo:!1,shouldDisplayDownloadButton:!1,shouldDisplayDescription:!1,shouldDisplayViewButton:!1}
1,READY:{icon:e5(e.filename),iconColor:t.token.color.gray[600],iconBackgroundColor:"rgba(from ".concat(t.token.color.gray[600]," r g b / 0.05)"),filenameColor:t.token.color.gray[900],statusContent:"fileSize"in e&&e.fileSize?(0,o.jsx)(ee.E,{as:"span",$variant:"secondary",$color:t.token.color.gray[600],children:e.fileSize}):null,shouldDisplayCloseButton:!n,shouldDisplayReplaceButton:!1,shouldDisplayDeleteButton:!1,shouldDisplayCategoryChip:!1,shouldDisplayUploaderInfo:!1,shouldDisplayDownloadButton:!1,shouldDisplayDescription:!1,shouldDisplayViewButton:!1}}},e7=n(80709),e6=function(e){var t,n,r,i,a=(0,k.DP)(),l=e.type,s=e.filename,c=e.isInsideDocumentCollection,d=void 0!==c&&c,u=e4(e)[l],p=u.filenameColor,f=u.icon,m=u.iconColor,y=u.shouldDisplayCloseButton,h=u.shouldDisplayDeleteButton,g=u.shouldDisplayReplaceButton,b=u.statusContent,v=u.shouldDisplayUploaderInfo,x=u.shouldDisplayDescription,w=u.shouldDisplayCategoryChip,I=u.shouldDisplayDownloadButton,A=u.shouldDisplayViewButton,j=l===ey.UPLOADED,E=l===ey.READY,C=!!e.description||!!e.uploadedBy||!!e.uploadedAt||!!b,S="onView"in e&&e.onView&&A,D=v&&!!e.uploadedBy&&!!e.uploadedAt,_=(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(e$,{$hasCategory:w&&!!e.category,children:[(0,o.jsxs)(eM,{$hasChip:w&&!!e.category,children:[(0,o.jsx)(eF,{$iconColor:m,children:(0,o.jsx)(F.I,{size:$.y.MEDIUM,children:f})}),(0,o.jsxs)(ez,{$isUploadedType:j,$isTextData:C,children:[(0,o.jsx)(eG,{$filenameColor:p,children:s}),(0,o.jsx)(N.j,{condition:D,children:(0,o.jsxs)(eW,{children:[(0,o.jsx)(N.j,{condition:!!e.uploadedBy,children:(0,o.jsxs)(eK,{$canTruncate:!0,children:["Uploaded by ",e.uploadedBy]})}),(0,o.jsx)(N.j,{condition:!!e.uploadedBy&&!!e.uploadedAt,children:(0,o.jsx)(eV,{})}),(0,o.jsx)(N.j,{condition:!!e.uploadedAt,children:(0,o.jsx)(eK,{children:e.uploadedAt})})]})}),(0,o.jsx)(N.j,{condition:x&&!D,children:(0,o.jsx)(eK,{children:e.description})}),(0,o.jsx)(N.j,{condition:!!b,children:b})]})]}),(0,o.jsx)(ek,{$isInsideDocumentCollection:d,$alignment:null==(t=e.categoryOptions)?void 0:t.alignment,children:(0,o.jsx)(N.j,{condition:!!e.category&&w,children:(0,o.jsx)(e_.v,{label:e.category,variant:null!=(n=null==(r=e.categoryOptions)?void 0:r.variant)?n:"default",icon:null==(i=e.categoryOptions)?void 0:i.icon})})})]}),(0,o.jsxs)(eH,{children:[d&&"onReplace"in e&&e.onReplace&&g&&(0,o.jsx)(eB,{onClick:function(t){var n;t.stopPropagation(),null==(n=e.onReplace)||n.call(e,e.id)},"aria-label":"onReplaceAriaLabel"in e&&e.onReplaceAriaLabel?e.onReplaceAriaLabel:"Replace file","data-testid":"replace-file-button",children:(0,o.jsx)(F.I,{size:$.y.MEDIUM,color:a.token.color.partner.primary,children:(0,o.jsx)(ej._,{})})}),"onView"in e&&e.onView&&A&&(0,o.jsx)(e7.m,{message:e.onViewAriaLabel,disableButtonStyle:!0,asChild:!0,children:(0,o.jsx)(eB,{"aria-label":e.onViewAriaLabel,children:(0,o.jsx)(F.I,{size:$.y.MEDIUM,color:a.token.color.partner.primary,children:(0,o.jsx)(eE.k,{})})})}),"onDownload"in e&&"onDownloadAriaLabel"in e&&I&&(0,o.jsx)(e7.m,{message:e.onDownloadAriaLabel,disableButtonStyle:!0,asChild:!0,children:(0,o.jsx)(eB,{onClick:function(t){t.stopPropagation(),"onDownload"in e&&e.onDownload&&e.onDownload(e.id)},"aria-label":e.onDownloadAriaLabel,"data-testid":"download-file-button",children:(0,o.jsx)(F.I,{size:$.y.MEDIUM,color:a.token.color.partner.primary,children:(0,o.jsx)(eC.K,{})})})}),!d&&"onReplace"in e&&e.onReplace&&g&&(0,o.jsx)(eB,{onClick:function(t){t.stopPropagation(),"onReplace"in e&&e.onReplace&&e.onReplace(e.id)},"aria-label":"onReplaceAriaLabel"in e&&e.onReplaceAriaLabel?e.onReplaceAriaLabel:"Replace file","data-testid":"replace-file-button",children:(0,o.jsx)(F.I,{size:$.y.MEDIUM,color:a.token.color.partner.primary,children:(0,o.jsx)(ej._,{})})}),"onDelete"in e&&h&&(0,o.jsx)(e7.m,{message:e.onDeleteAriaLabel||"Delete",disableButtonStyle:!0,asChild:!0,children:(0,o.jsx)(eB,{onClick:function(t){t.stopPropagation(),"onDelete"in e&&e.onDelete&&e.onDelete(e.id)},"aria-label":e.onDeleteAriaLabel||"Delete",children:(0,o.jsx)(F.I,{size:$.y.MEDIUM,color:a.token.color.partner.primary,children:(0,o.jsx)(eS.l,{})})})}),"onCancel"in e&&e.onCancel&&y&&(0,o.jsx)(eB,{onClick:function(t){var n;t.stopPropagation(),null==(n=e.onCancel)||n.call(e)},"aria-label":"onCancelAriaLabel"in e&&e.onCancelAriaLabel?e.onCancelAriaLabel:"Cancel","data-testid":"close-file-button",children:(0,o.jsx)(F.I,{size:$.y.MEDIUM,color:a.token.color.partner.primary,children:(0,o.jsx)(eD.X,{})})})]})]}),O=(0,o.jsx)(eL,{$isReadyType:E,$hasViewActionEnabled:S,onClick:function(){if(S){var t;null==(t=e.onView)||t.call(e,e.id)}},children:_});return(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)(N.j,{condition:d,fallback:O,children:[(0,o.jsx)(eT,{$hasViewActionEnabled:S,onClick:function(){if(S){var t;null==(t=e.onView)||t.call(e,e.id)}},children:_}),(0,o.jsx)(eR,{})]})})},e9=n(97045),te=n(24609),tt=n(72828),tn=n(51356),to=n(84176),tr=n(61970),ti={INTAKE:"INTAKE",POST_INTAKE:"POST_INTAKE"},ta=(0,k.AH)(["border-color:",";background:",";"],function(e){return e.theme.token.color.partner.primary},function(e){var t=e.theme;return"rgb(from ".concat(t.token.color.partner.primary," r g b / 0.05)")}),tl=k.Ay.div.withConfig({displayName:"UploadAreastyled__UploadAreaContainer",componentId:"sc-7io8ue-0"})(["margin-top:16px;padding:",";border:2px dashed ",";border-radius:",";transition:all 0.2s ease;"," &:hover,&:focus-within{","}@media (min-width:48rem){display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;margin-bottom:8px;}"],function(e){return e.$variant===ti.INTAKE?"16px 48px":"8px 48px 20px 48px"},function(e){return e.theme.token.color.gray[400]},function(e){return e.theme.token.radius["03"]},function(e){return e.$dragging&&ta},ta),ts=k.Ay.div.withConfig({displayName:"UploadAreastyled__ContentWrapper",componentId:"sc-7io8ue-1"})(["display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:",";"],function(e){return e.$variant===ti.INTAKE?"12px":"2px"}),tc=k.Ay.div.withConfig({displayName:"UploadAreastyled__TextWrapper",componentId:"sc-7io8ue-2"})(["display:none;@media (min-width:48rem){display:flex;align-items:center;gap:",";}"],function(e){return e.$variant===ti.INTAKE?"12px":"4px"}),td=(0,k.Ay)(O.$).withConfig({displayName:"UploadAreastyled__UploadButton",componentId:"sc-7io8ue-3"})([""," @media (max-width:48rem){width:100%;}"],function(e){return e.$variant===ti.POST_INTAKE&&(0,k.AH)(["padding:4px;"])}),tu=(0,k.Ay)(ee.E).withConfig({displayName:"UploadAreastyled__Text",componentId:"sc-7io8ue-4"})(["margin:0;"]),tp=(0,k.Ay)(ee.E).withConfig({displayName:"UploadAreastyled__SupportText",componentId:"sc-7io8ue-5"})(["margin:0;text-align:center;"]),tf=k.Ay.input.withConfig({displayName:"UploadAreastyled__HiddenInput",componentId:"sc-7io8ue-6"})(["display:none;"]),tm=(0,k.Ay)(tr.Z).withConfig({displayName:"UploadAreastyled__UploadedCard",componentId:"sc-7io8ue-7"})(["margin-top:2rem;min-height:initial;display:flex;align-items:center;"]),ty=k.Ay.div.withConfig({displayName:"UploadAreastyled__IconWrapper",componentId:"sc-7io8ue-8"})(["padding:0.5rem;background-color:",";border-radius:",";display:flex;align-items:center;"],function(e){return e.theme.token.color.gray[200]},function(e){return e.theme.token.radius.circle}),th=k.Ay.div.withConfig({displayName:"UploadAreastyled__ErrorsContainer",componentId:"sc-7io8ue-9"})(["display:grid;gap:0.75rem;margin-top:1.5rem;"]),tg=k.Ay.div.withConfig({displayName:"UploadAreastyled__ErrorRow",componentId:"sc-7io8ue-10"})(["display:flex;align-items:flex-start;gap:0.5rem;> :first-child{flex-grow:1;}"]),tb=k.Ay.button.withConfig({displayName:"UploadAreastyled__DismissButton",componentId:"sc-7io8ue-11"})(["padding:0.5rem;background-color:transparent;transition:background-color 150ms cubic-bezier(0.4,0,0.2,1) 0ms;border-radius:",";cursor:pointer;border:none;display:flex;align-items:center;"],function(e){return e.theme.token.radius["02"]}),tv={"application/pdf":"PDF","image/jpeg":"JPG","image/jpg":"JPG","image/png":"PNG","image/*":"images","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"XLSX","text/csv":"CSV"};function tx(e){return e?Array.from(new Set(e.split(",").map(function(e){return tv[e.trim()]}
1).filter(Boolean))):[]}function tw(e){return 0===e.length?"":1===e.length?e[0]:"".concat(e.slice(0,-1).join(", ")," and ").concat(e.at(-1))}var tI=function(e,t){if(!t)return"Supports all file types";var n=tx(t);if(0===n.length)return"Supports specified file types";var o=tw(n);return"Supports ".concat(o).concat(e?" up to ".concat(e,"MB each"):"")},tA={pdf:(0,o.jsx)(eq.T,{size:24}),png:(0,o.jsx)(eY.K,{size:24}),jpg:(0,o.jsx)(eX.a,{size:24}),jpeg:(0,o.jsx)(eX.a,{size:24})},tj=function(e){var t,n=null==(t=e.split(".").pop())?void 0:t.toLowerCase();return n&&Object.prototype.hasOwnProperty.call(tA,n)?tA[n]:(0,o.jsx)(ef.Z,{size:24})};function tE(e){return function(e){if(Array.isArray(e))return tD(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||tS(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tC(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(o=i.call(n)).done)&&(l.push(o.value),l.length!==t);s=!0);}catch(e){c=!0,r=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw r}}return l}}(e,t)||tS(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tS(e,t){if(e){if("string"==typeof e)return tD(e,t);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?tD(e,t):void 0}}function tD(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var t_=function(e){var t=e.onFiles,n=e.disabled,r=void 0!==n&&n,i=e.text,a=e.orText,l=e.uploadButtonText,s=e.accept,c=void 0===s?void 0:s,d=e.variant,u=void 0===d?ti.INTAKE:d,p=e.maxFileSize,f=e.alreadyUploadedFilesNames,m=e.shouldShowErrorMessages,y=(0,k.DP)(),h=tC((0,b.useState)(!1),2),g=h[0],v=h[1],x=tC((0,b.useState)(""),2),w=x[0],I=x[1],A=tC((0,b.useState)(),2),j=A[0],E=A[1],C=tC((0,b.useState)(),2),S=C[0],D=C[1],_=tC((0,b.useState)(!1),2),N=_[0],O=_[1],T=(0,b.useRef)(null),R=(0,b.useRef)(null),U=function(e){return void 0===c||""===c||c.split(",").map(function(e){return e.trim()}).some(function(t){return t.endsWith("/*")?e.startsWith(t.replace("/*","/")):e===t})},M=function(){I(""),E(void 0)},z=function(e){var n=tE(e).filter(function(e){return U(e.type)});m&&D(tE(e).filter(function(e){return!U(e.type)})),n.length>0&&t(n),M()},G=function(e){e.preventDefault(),v(!1)},W=function(e){if(S){if(1===S.length)return D([]);var t=tE(S);return t.splice(e,1),D(t)}};(0,b.useEffect)(function(){if(T.current){var e=function(e){var t,n=null==(t=e.dataTransfer)?void 0:t.types;return!!n&&Array.from(n).includes("Files")},t=function(){document.body.style.cursor=""},n=function(n){if(e(n)){var o;(o=n.target,Array.from(document.querySelectorAll("[data-upload-area]")).some(function(e){return e.contains(o)}))?t():(n.preventDefault(),document.body.style.cursor="not-allowed",n.dataTransfer&&(n.dataTransfer.dropEffect="none"))}};return document.addEventListener("dragover",n),document.addEventListener("dragleave",t),document.addEventListener("dragend",t),document.addEventListener("drop",t),function(){document.removeEventListener("dragover",n),document.removeEventListener("dragleave",t),document.removeEventListener("dragend",t),document.removeEventListener("drop",t)}}},[]);var K=u===ti.INTAKE?tt.h.SECONDARY:tt.h.TEXT,V=u===ti.POST_INTAKE;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(tl,{"data-upload-area":!0,ref:T,$variant:u,$dragging:g,onDragOver:function(e){e.preventDefault();var t=tE(e.dataTransfer.items).some(function(e){return U(e.type)});!r&&t&&v(!0)},onDragLeave:G,onDrop:function(e){e.preventDefault(),v(!1),!r&&e.dataTransfer.files&&e.dataTransfer.files.length>0&&z(e.dataTransfer.files)},onDragEnd:G,"aria-disabled":r,"data-testid":"dropzone",children:[(0,o.jsxs)(ts,{$variant:u,children:[(0,o.jsxs)(tc,{$variant:u,children:[(0,o.jsx)(tu,{children:(0,o.jsx)("span",{children:i})}),a&&(0,o.jsx)(tu,{$variant:u===ti.INTAKE?"label":"primary",children:(0,o.jsx)("span",{children:a})})]}),(0,o.jsxs)(td,{onClick:function(){var e;r||null==(e=R.current)||e.click()},disabled:r,variant:K,$variant:u,children:[(0,o.jsx)(F.I,{size:$.y.SMALL,color:y.token.color.partner.primary,weight:"bold",children:(0,o.jsx)(e9.C,{})}),l]})]}),V&&(0,o.jsx)(tp,{$variant:"secondary",children:tI(p,c)}),(0,o.jsx)(tf,{ref:R,accept:c,type:"file",multiple:!0,onChange:function(e){if(I(e.target.value),e.target.files&&e.target.files.length>0){var t=e.target.files;if(f){var n=tE(t);if(n.some(function(e){return f.find(function(t){return t===e.name})}))return E(n),O(!0)}z(t)}},value:w,disabled:r,"aria-label":l})]}),m&&null!=S&&S.length&&S.length>0?(0,o.jsx)(th,{"data-dd-privacy":"mask",children:null==S?void 0:S.map(function(e,t){return(0,o.jsxs)(tg,{children:[(0,o.jsx)(L.P,{status:B.l.NEGATIVE,icon:(0,o.jsx)(te.Q,{}),title:"".concat(e.name," is not allowed"),description:"Please select a supported format: ".concat(tw(tx(c))||"specified file types")}),(0,o.jsx)(tb,{type:"button","aria-label":"Dismiss error for ".concat(e.name),onClick:function(){return W(t)},"data-testid":"dismiss-btn",children:(0,o.jsx)(F.I,{size:$.y.SMALL,color:y.token.color.status.negative,weight:"bold",children:(0,o.jsx)(eD.X,{})})})]},"".concat(e.name,"-").concat(t))})}):null,(0,o.jsxs)(to.a,{open:N,title:"Duplicate file detected",onClose:function(){M(),O(!1)},buttons:[{text:"Yes, upload",onClick:function(){j&&z(j),M(),O(!1)}},{text:"No, cancel",onClick:function(){M(),O(!1)}}],children:[(0,o.jsx)(P.h,{as:"h3",variant:"smallest",children:"You’ve already uploaded a document with this name. Are you sure you want to upload it again?"}),(0,o.jsxs)(tm,{type:tn.b.EMPTY,children:[(0,o.jsx)(ty,{children:tj(j&&j.length>0?j[0].name:"")}),j&&j.length>0?j[0].name:""]})]})]})};function tN(e){return(tN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function tO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}var tk=function(e){var t=e.sections,n=e.onFiles,r=e.uploadAreaText,i=e.uploadAreaOrText,a=e.title,l=e.description,s=e.uploadAreaButtonText,c=e.shouldShowFileUploadErrorMessages,d=eb().getBadges,u=(0,k.DP)();return(0,o.jsxs)(er,{children:[(0,o.jsxs)(ei,{children:[(0,o.jsx)(N.j,{condition:!!a,children:(0,o.jsx)(ea,{children:(0,o.jsx)("span",{children:a})})}),(0,o.jsx)(N.j,{condition:!!l,children:(0,o.jsx)(el,{children:(0,o.jsx)("span",{children:l})})})]}),(0,o.jsx)(es,{children:t.map(function(e,t){return(0,o.jsxs)(b.Fragment,{children:[(0,o.jsx)(N.j,{condition:!!e.groupHelperText,children:(0,o.jsx)(ec,{children:(0,o.jsx)("span",{children:e.groupHelperText})})}
1),(0,o.jsx)(ed,{children:(0,o.jsxs)(en,{title:e.title,description:e.description,badges:d(e),className:"accordion-item",children:[(0,o.jsx)(N.j,{condition:e.files.length>0,fallback:(0,o.jsx)(eA,{className:"empty-state",textMargin:"small",Text:"No files added yet",Illustration:(0,o.jsx)(F.I,{color:u.token.color.gray[700],colorfulBackground:!0,backgroundColor:u.token.color.gray[300],size:$.y.MEDIUM,children:(0,o.jsx)(M.W,{})})}),children:e.files.map(function(e,t){return(0,o.jsx)(e6,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tO(Object(n),!0).forEach(function(t){var o,r,i;o=e,r=t,i=n[t],(r=function(e){var t=function(e,t){if("object"!=tN(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=tN(o))return o;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==tN(t)?t:t+""}(r))in o?Object.defineProperty(o,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):o[r]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tO(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({isInsideDocumentCollection:!0}
1,e),t)})}),(0,o.jsx)(t_,{accept:null==e?void 0:e.accept,text:r,orText:i,onFiles:function(t){return n(t,e)},uploadButtonText:s,alreadyUploadedFilesNames:e.files.map(function(e){return e.filename}),variant:ti.INTAKE,shouldShowErrorMessages:c})]})})]},t)})})]})},tT=n(65419),tR=n(45540),tU=n(30587),tP=n(44007),tL=n(79876),tB=n(31901),tF=n(54366),t$=n(29974),tM=n(57253),tz=n(58064),tG=n(23096);let tW={GET_BUSINESS_PROFILE_INFORMATION:"/refi-pipeline/:partnerId/business-profiles/:businessProfileId"},tK={async getBusinessProfileInformation(e){let{partnerId:t,token:n,businessProfileId:o}=e,r=(0,tz.iv)(o)?o:"";if(!r)throw Error("Invalid business profile id");return(await tG.FU.get(tW.GET_BUSINESS_PROFILE_INFORMATION.replace(":partnerId",t).replace(":businessProfileId",r),{headers:{Authorization:"Bearer ".concat(n)}})).data}};var tV=n(59946);let tH=k.Ay.div.withConfig({displayName:"BusinessDocuments.styled__TitleWrapper",componentId:"sc-d1fa97e9-0"})(["h1{margin-top:0;}"]),tq=k.Ay.div.withConfig({displayName:"BusinessDocuments.styled__DocumentUploadWrapper",componentId:"sc-d1fa97e9-1"})(["@media ","{margin-inline:-1.5rem;.accordion-item > div:last-of-type{padding:1rem 0.75rem;}}"],(0,tV.P)({to:"lg"})),tY=k.Ay.div.withConfig({displayName:"BusinessDocuments.styled__MobileActionBarSpacer",componentId:"sc-d1fa97e9-2"})(["display:none;@media ","{display:block;height:96px;}"],(0,tV.P)({to:"lg"}));var tX=n(96112);let tQ=k.Ay.div.withConfig({displayName:"DocumentsWarnModal.styled__TextWrapper",componentId:"sc-b24f4f51-0"})(["p{margin:0;}"]);function tZ(e){let{isOpen:t,onClose:n,onUploadNow:r,onSkipForNow:i}=e;return(0,o.jsx)(tX.s,{title:"Upload now to avoid delays",onClose:n,open:t,shouldCloseOnOutsideClick:!1,buttons:[{text:"Skip for now",onClick:i},{text:"Upload now",onClick:r}],children:(0,o.jsx)(tQ,{children:(0,o.jsx)(ee.E,{$variant:"primary",children:"Uploading your documents now will help us process your application faster and avoid follow-ups later. Would you like to upload them before continuing?"})})})}var tJ=n(80251),t0=n(33722);let t1={mutationFn:async e=>await t0.u.deleteUploadedDocument(e)};var t2=n(73496);let t8={mutationKey:e=>["/documents/entities/".concat(e,"/upload")],mutationFn:async e=>await t2.Q.startDocumentUpload(e)},t3={queryKey:e=>["/account-opening/applications/".concat(e,"/documents")],queryFn:async e=>await t0.u.getApplicationDocuments((0,i._)({},e))};var t5={AT_LEAST_ONE:"AT_LEAST_ONE"},t4=n(35896),t7=n(66541);let t6="".concat(7.5,"rem");function t9(){var e,t,n,r,l;let s=(0,tP.useRouter)(),c=(null==(e=s.query)?void 0:e.applicationId)||"",d=(null==(t=s.query)?void 0:t.businessProfileId)||"",u=(null==(n=s.query)?void 0:n.isEdit)==="true",{isDesktop:p}=(0,U.k)(),[f,m]=(0,b.useState)([]),[y,g]=(0,b.useState)([]),v=(0,b.useCallback)(e=>{g(t=>t.includes(e)?t:[...t,e])},[]),x=(0,b.useCallback)(e=>{m(t=>t.includes(e)?t.filter(t=>t!==e):t)},[]),[w,I]=(0,b.useReducer)(h,{}),[A,j]=(0,b.useState)(!1),{displaySnackbar:S}={displaySnackbar:e=>{let{text:t,icon:n}=e;t7.oK.default({text:t,IconComponent:n,position:"center",autoCloseDuration:3e3,actionProps:{label:"DISMISS"},baseBottom:t6})}},{data:_}=function(e){let{businessProfileId:t,applicationId:n,enabled:o=!0}=e,{partnerId:r}=(0,tM.W)(),{accessToken:i}=(0,t$.u)(),{data:a,isLoading:l,isSuccess:s,isError:c,error:d}=(0,tB.I)(["refi-pipeline/".concat(r,"/business-profiles/").concat(t)],async()=>await tK.getBusinessProfileInformation({partnerId:r,token:i,businessProfileId:t}),{enabled:o});return(0,b.useEffect)(()=>{c&&(0,tF.Qw)(Error("Error getting business profile info"),{applicationId:n})},[d,a,s,c,n]),{isLoading:l,isError:c,error:d,data:a}}({businessProfileId:d,applicationId:c,enabled:!0}),{sections:O}=(e=>{var t,n,o;let{businessType:r,applicationId:l,enabled:s}=e,{data:c}=(e=>{let{applicationId:t,enabled:n}=e,{partnerId:o}=(0,tM.W)(),{accessToken:r}=(0,t$.u)(),{data:i,isLoading:a,error:l}=(0,tB.I)({queryKey:["document-requirements",t],queryFn:async()=>t0.u.getDocumentRequirements({applicationId:t,accessToken:r,partnerId:o}),enabled:n});return{data:i,isLoading:a,error:l}})({applicationId:l,enabled:s}),d=null==c||null==(t=c.documentRequirements)?void 0:t.business;return{sections:((null==d||null==(o=d.type)||null==(n=o[r])?void 0:n.documentGroups)||[]).flatMap(e=>e.documentTypes.map((t,n)=>(0,a._)((0,i._)({},t),{title:t.name,groupHelperText:e.requirementType===t5.AT_LEAST_ONE&&0===n?"Please provide at least one of the following:":void 0})))}})({applicationId:c,businessType:null!=(r=null==_?void 0:_.businessType)?r:"",enabled:!!(null==_?void 0:_.businessType)}),{data:k}=function(e){let{applicationId:t,enabled:n}=e,{partnerId:o}=(0,tM.W)(),{accessToken:r}=(0,t$.u)();return(0,tB.I)(t3.queryKey(t),async()=>await t3.queryFn({applicationId:t,accessToken:r,partnerId:o}),{enabled:n,onError:e=>{tT.datadogRum.addError(e,{source:"useGetApplicationDocuments",metadata:{applicationId:t}}
1)}})}({applicationId:c,enabled:!0}),{mutate:T}=(e=>{let{partnerId:t}=(0,tM.W)(),{accessToken:n}=(0,t$.u)(),o=(0,tJ.n)({mutationFn:async o=>{let{documentId:r}=o;return t1.mutationFn({applicationId:e,documentId:r,accessToken:n,partnerId:t})}}),r=async t=>{let{documentId:n,onSuccess:r,onError:i}=t;try{await o.mutateAsync({documentId:n}),r&&r()}catch(t){return tT.datadogRum.addError(t,{source:"useDeleteUploadedDocument - deleteDocument",metadata:{applicationId:e}}),i&&i(),null}};return(0,a._)((0,i._)({},o),{mutate:r})})(c),{mutate:M}=(e=>{let{partnerId:t}=(0,tM.W)(),{accessToken:n}=(0,t$.u)(),o=(0,tJ.n)({mutationFn:async o=>{let{body:r}=o;return t8.mutationFn({body:r,accessToken:n,partnerId:t,applicationId:e})},mutationKey:t8.mutationKey(e)}),r=async t=>{let{documentType:n,file:r}=t;try{let e=new FormData;return e.append("metadata",JSON.stringify({documentType:n})),e.append("file",r),(await o.mutateAsync({body:e})).documentUploadId}catch(t){return tT.datadogRum.addError(t,{source:"useDocumentUpload - startDocumentUpload",metadata:{applicationId:e}}),null}};return(0,a._)((0,i._)({},o),{mutate:r})})(c),{onAddFiles:z,onDelete:G}=E({applicationDocuments:k,sections:O,dispatch:I,filesBySection:w,deleteUploadedDocument:T,startDocumentUpload:M,displaySnackbar:S,setDocumentBeingUploaded:m}),{queries:W}=function(e){let{ids:t,pollingInterval:n=6e3,shouldCancelPolling:o,onError:r,maxRefetchCount:i=30,onMaxRetriesReached:a}=e,{partnerId:l}=(0,tM.W)(),{accessToken:s}=(0,t$.u)(),c=async e=>await t2.Q.getDocumentUploadStatus({documentUploadId:e.documentUploadId,accessToken:s,partnerId:l});return{queries:(0,t4.E)({queries:t.map(e=>({queryFn:async()=>{try{return await c({documentUploadId:e})}catch(e){r(e)}},queryKey:["document-upload-status",e],refetchInterval:(t,r)=>!!n&&(r.state.dataUpdateCount>i?(null==a||a(e),!1):!(void 0!==t&&o(t))&&n),retry:!1,refetchOnWindowFocus:!1,refetchOnReconnect:!1}))})}}({ids:f,shouldCancelPolling:C,onError:e=>{tT.datadogRum.addError(e,{source:"On getting uploading status inside Business Documents screen",metadata:{error:e}})},onMaxRetriesReached:v});D({filesBySection:w,statusQueries:(0,b.useMemo)(()=>W.map(e=>({data:e.data})),[W]),documentBeingUploaded:f,dispatch:I,onDelete:G,timedOutDocumentIds:y,onUploadSettled:x});let K=()=>{s.push({pathname:tL.j.REVIEW,query:{businessProfileId:d,applicationId:c}})},V=()=>{O.some(e=>{var t;return e.required&&!(null==(t=w[e.documentType])?void 0:t.length)})?j(!0):K()};return(0,o.jsxs)(tU.z,{withHeader:!0,message:"Upload documents",buttonProps:{onClick:V,dataTestID:"business-documents-continue-button"},children:[(0,o.jsx)(tH,{children:(0,o.jsx)(P.h,{as:"h1",variant:"secondary",shouldUseDesignSystemFont:!0,children:"Please upload the following documents."})}),(0,o.jsx)(L.P,{title:"Speed up your application",description:"Uploading documents now helps us process your application faster and avoid follow-ups later. You can still continue without them.",status:B.l.INFO,icon:(0,o.jsx)(F.I,{size:$.y.SMALL,children:(0,o.jsx)(tR.R,{})})}),(0,o.jsx)(tq,{children:(0,o.jsx)(tk,{uploadAreaText:"Drag and drop to upload",uploadAreaOrText:"or",uploadAreaButtonText:"Browse file",sections:null!=(l=null==O?void 0:O.map(e=>{var t;return(0,a._)((0,i._)({},e),{accept:e.contentType,isRequired:e.required,files:null!=(t=w[e.documentType])?t:[]})}))?l:[],onFiles:(e,t)=>{z(e,t,e=>{tT.datadogRum.addError(e,{source:"On initializing file upload inside Business Documents screen",metadata:{error:e}})})},shouldShowFileUploadErrorMessages:!0})}),(0,o.jsxs)(N.j,{condition:!p,children:[(0,o.jsx)(tY,{}),(0,o.jsx)(R,{onClickCancel:()=>s.back(),onClickConfirm:V,isConfirmButtonDisabled:!1,isEditMode:u})]}),(0,o.jsx)(tZ,{isOpen:A,onClose:()=>j(!1),onUploadNow:()=>j(!1),onSkipForNow:K})]})}var ne=n(50140),nt=n.n(ne),nn=n(98282),no=!0;function nr(){let{text:e}=(0,tM.W)(),{features:t,isLoading:n}=(0,r.m)(),i=(0,tP.useRouter)(),a=!!(null==t?void 0:t.ENABLE_BUSINESS_ACCOUNT_OPENING_ON_APPLICANT_PORTAL),l=!n;return((0,b.useEffect)(()=>{l&&!a&&i.push(nn.t.NOT_FOUND)},[l,a,i]),l&&a)?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(nt(),{children:(0,o.jsxs)("title",{children:["Business Documents - ",e.PARTNER_LONG_NAME]})}),(0,o.jsx)(t9,{})]}):null}},51356:(e,t,n)=>{"use strict";n.d(t,{b:()=>o,h:()=>r});var o={SMALL:"small",REGULAR:"regular",EMPTY:"empty"},r={SMALL:"small",REGULAR:"regular"}}
1,55499:(e,t,n)=>{"use strict";n.d(t,{k:()=>i});var o=n(4366),r=n(21819),i=function(){var e=(0,o.U)("(max-width: ".concat(r.L.tablet,")"));return{isDesktop:!e,isMobile:e}}},59697:(e,t,n)=>{"use strict";n.d(t,{E:()=>c});var o=n(22737),r=n(5412),i=n(80263);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var l=["children","component"];function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}var c=function(e){var t=e.children,n=e.component,c=function(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n={};for(var o in e)if(({}).hasOwnProperty.call(e,o)){if(-1!==t.indexOf(o))continue;n[o]=e[o]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],-1===t.indexOf(n)&&({}).propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,l);return(0,i.jsx)(o.j,{condition:"string"==typeof t,children:(0,i.jsx)(void 0===n?"div":n,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach(function(t){var o,r,i;o=e,r=t,i=n[t],(r=function(e){var t=function(e,t){if("object"!=a(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=a(o))return o;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==a(t)?t:t+""}(r))in o?Object.defineProperty(o,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):o[r]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({dangerouslySetInnerHTML:{__html:r.D.sanitize(t)}},c))})}},61970:(e,t,n)=>{"use strict";n.d(t,{Z:()=>A});var o=n(22737),r=n(53239),i=n(8368),a=n(25437),l=n(72828),s=n(51356),c=n(43348),d=i.Ay.div.withConfig({displayName:"Cardstyled__CardContainer",componentId:"sc-wh37z9-0"})(["--background:",";display:",";flex-direction:",";border-radius:16px;padding:16px;gap:12px;min-width:",";min-height:",";",";",";",";",";",";",";background:var(--background);"],function(e){return e.theme.token.color.surface.neutral},function(e){return e.$imageSize===s.h.REGULAR?"block":"flex"},function(e){return e.$imageSize===s.h.REGULAR?"none":"row"},function(e){return e.$shouldDisplayImageSection?"400px":"250px"},function(e){return e.$autoHeight?"":"135px"},function(e){return e.onClick?"cursor: pointer;":""},function(e){return e.$type===s.b.SMALL?"align-items: center":""},function(e){return e.$type===s.b.SMALL?"height: 100%;":""},function(e){var t=e.theme,n=e.$selected;return e.$hasError?"border: 2px solid ".concat(t.token.color.status.negative):n?"border: 3px solid ".concat(t.token.color.gray["600"]):"border: 2px solid ".concat(t.token.color.gray["300"])},function(e){var t=e.onClick,n=e.theme;return t?"&:hover {\n    --background: ".concat(n.token.color.surface.card,";\n  }"):""},function(e){var t=e.onClick,n=e.theme;return t?" &:focus,\n  &:active {\n    border: 3px solid ".concat(n.token.color.gray["600"],";\n  }"):""}),u=i.Ay.div.withConfig({displayName:"Cardstyled__CardInfoContainer",componentId:"sc-wh37z9-1"})(["display:flex;flex-direction:",";align-self:center;gap:0.5rem;width:100%;justify-content:space-between;height:",";"],function(e){return e.$infoContainerDirection},function(e){return e.$infoContainerAutoHeight?"100%":""}),p=i.Ay.div.withConfig({displayName:"Cardstyled__ExtraInfoContainer",componentId:"sc-wh37z9-2"})(["display:flex;flex-direction:row;justify-content:space-between;align-items:center;"]),f=(0,i.Ay)(c.E).withConfig({displayName:"Cardstyled__ExtraInfoText",componentId:"sc-wh37z9-3"})(["font-size:",";margin:0;"],function(e){return e.theme.token.typography.fontSize["01"]}
1),m=i.Ay.div.withConfig({displayName:"Cardstyled__InnerContainer",componentId:"sc-wh37z9-4"})(["display:flex;gap:16px;margin-bottom:12px;"]),y=i.Ay.div.withConfig({displayName:"Cardstyled__ImageContainer",componentId:"sc-wh37z9-5"})(["border-radius:",";max-height:107px;position:relative;overflow:hidden;width:153px;img{display:block;}"],function(e){return e.theme.token.radius["02"]}),h=i.Ay.div.withConfig({displayName:"Cardstyled__IconPlaceholder",componentId:"sc-wh37z9-6"})(["display:grid;place-items:center;width:153px;height:107px;border-radius:8px;background-color:",";"],function(e){return e.$backgroundColor}),g=i.Ay.div.withConfig({displayName:"Cardstyled__ImageSectionContainer",componentId:"sc-wh37z9-7"})(["display:flex;justify-content:center;align-items:center;"]),b=i.Ay.div.withConfig({displayName:"Cardstyled__MainInfoContainer",componentId:"sc-wh37z9-8"})(["display:flex;flex-direction:row;gap:1rem;"]),v=i.Ay.div.withConfig({displayName:"Cardstyled__TextSection",componentId:"sc-wh37z9-9"})(["display:flex;flex-direction:column;gap:",";justify-content:center;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"],function(e){return e.$hasGapBetween?"0.5rem":""}),x=(0,i.Ay)(c.E).withConfig({displayName:"Cardstyled__Title",componentId:"sc-wh37z9-10"})(["overflow:hidden;text-wrap:balance;max-height:2.5em;margin:0;"]),w=(0,i.Ay)(c.E).withConfig({displayName:"Cardstyled__SubTitle",componentId:"sc-wh37z9-11"})(["font-size:",";margin:0;"],function(e){return e.theme.token.typography.fontSize["01"]}),I=n(80263),A=r.forwardRef(function(e,t){var n=(0,i.DP)(),r=e.hasError,c=e.type,A=void 0===c?s.b.REGULAR:c,j=e.image,E=e.imagePlaceholderIcon,C=e.imagePlaceholderBackgroundColor,S=e.imageSize,D=void 0===S?s.h.SMALL:S,_=e.title,N=e.subTitle,O=e.extraInfo,k=e.icon,T=e.leftExtraInfo,R=e.rightExtraInfo,U=e.isSelected,P=void 0!==U&&U,L=e.handleClick,B=e.buttonText,F=e.autoHeight,$=void 0!==F&&F,M=e.infoContainerAutoHeight,z=e.infoContainerDirection,G=e.className,W=e.children,K=e.dataTestId,V=void 0===K?"card":K,H=!!j||!!E,q=!!(L&&!B),Y=function(){return(0,I.jsxs)(g,{children:[(0,I.jsx)(o.j,{condition:!!j,children:(0,I.jsx)(y,{children:j})}),(0,I.jsx)(o.j,{condition:!j&&!!E,children:(0,I.jsx)(h,{$backgroundColor:C,children:E})})]})},X=function(){return(0,I.jsxs)(b,{children:[(0,I.jsx)(o.j,{condition:!!k,children:k}),(0,I.jsxs)(v,{$hasGapBetween:!!N,children:[(0,I.jsx)(o.j,{condition:!!_,children:"string"==typeof _?(0,I.jsx)(x,{$weight:"bold",children:_}):_}),(0,I.jsx)(o.j,{condition:!!N,children:"string"==typeof N?(0,I.jsx)(w,{$color:n.token.color.text.tertiary,children:N}):N})]})]})};return A===s.b.EMPTY?(0,I.jsx)(d,{ref:t,$hasError:r,$type:A,$imageSize:D,$shouldDisplayImageSection:H,$selected:P,$autoHeight:$,onClick:L,"data-testid":V,role:q?"button":void 0,className:G,children:W}):(0,I.jsxs)(d,{ref:t,$type:A,$imageSize:D,$shouldDisplayImageSection:H,$selected:P,$autoHeight:$,onClick:L,"data-testid":V,role:q?"button":void 0,className:G,children:[(0,I.jsx)(o.j,{condition:D===s.h.REGULAR,children:(0,I.jsxs)(m,{children:[(0,I.jsx)(o.j,{condition:H,children:Y()}),X()]})}),(0,I.jsx)(o.j,{condition:D===s.h.SMALL&&H,children:Y()}),(0,I.jsxs)(u,{$infoContainerDirection:void 0===z?"column":z,$infoContainerAutoHeight:void 0!==M&&M,children:[(0,I.jsx)(o.j,{condition:D===s.h.SMALL,children:X()}),(0,I.jsx)(o.j,{condition:!!O,children:(0,I.jsx)(f,{$color:n.token.color.text.tertiary,$variant:"label",children:O})}),(0,I.jsx)(o.j,{condition:!!(T||R),children:(0,I.jsxs)(p,{children:[T,R]})}),(0,I.jsx)(o.j,{condition:!!B,children:(0,I.jsx)(a.$,{onClick:L,fullWidth:!0,size:l.l.SMALL,children:B})})]})]})});A.displayName="Card"},72705:(e,t,n)=>{"use strict";n.d(t,{m:()=>l});var o=n(31901),r=n(87763),i=n(27194);let a={queryKey:()=>[i.oR.ACCOUNT_OPENING_FEATURES],queryFn:async()=>i.MP.configs.features()},l=function(){let{enabled:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{enabled:!0},{isLoading:t,isFetching:n,error:i,data:l,refetch:s}=(0,o.I)(a.queryKey(),async()=>await a.queryFn(),{refetchOnWindowFocus:!1,staleTime:r.To,enabled:e});return{features:null==l?void 0:l.features,isLoading:t,error:i,isFetching:n,refetch:s}}},73559:()=>{},76500:(e,t,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/account-opening/business/business-documents",function(){return n(40398)}])},78155:(e,t,n)=>{"use strict";n.d(t,{AN:()=>y,Do:()=>d,FN:()=>p,OD:()=>f,Oq:()=>m,Pr:()=>g,dy:()=>h,jp:()=>b,y5:()=>u});var o=n(49454),r=n(8368),i=n(59697),a=(0,r.i7)(["from{opacity:0;}to{opacity:1;}"]),l=(0,r.i7)(["from{opacity:1;}to{opacity:0;}"]),s=(0,r.i7)(["from{transform:translateY(100%);}to{transform:translateY(0);}"]),c=(0,r.i7)(["from{transform:translateY(0);}to{transform:translateY(100%);}"]),d=(0,r.Ay)(o.hJ).withConfig({displayName:"SwipeableDialogstyled__SwipeableDialogOverlay",componentId:"sc-1vfpc8o-0"})(["background-color:rgba(0,0,0,0.5);position:fixed;inset:0;animation:"," 225ms cubic-bezier(0,0,0.2,1) 0ms;z-index:",";&[data-state='closed']{animation:"," 225ms cubic-bezier(0,0,0.2,1) 0ms;}"],a,function(e){return e.theme.token.zIndex[500]},l),u=(0,r.Ay)(o.UC).withConfig({displayName:"SwipeableDialogstyled__SwipeableDialogContent",componentId:"sc-1vfpc8o-1"})(["position:fixed;left:0;bottom:0;width:100%;max-height:85vh;background-color:",";border-top-left-radius:1rem;border-top-right-radius:1rem;box-shadow:0 8px 10px -5px rgba(0,0,0,0.2),0 16px 24px 2px rgba(0,0,0,0.14),0 6px 30px 5px rgba(0,0,0,0.12);animation:"," 225ms cubic-bezier(0,0,0.2,1) 0ms;z-index:",";&[data-state='closed']{animation:"," 190ms cubic-bezier(0,0,0.2,1) 0ms;}@media (min-width:48rem){max-width:",";max-height:fit-content;margin:auto;inset:0;border-radius:1rem;&[data-state='closed']{animation:none;}}"],function(e){return e.theme.token.color.gray[100]},s,function(e){return e.theme.token.zIndex[500]},c,function(e){return e.$maxWidth?"".concat(e.$maxWidth,"rem"):"25rem"}),p=(0,r.Ay)(o.bm).withConfig({displayName:"SwipeableDialogstyled__SwipeableDialogCloseButton",componentId:"sc-1vfpc8o-2"})(["display:flex;align-items:center;justify-content:center;position:absolute;top:1rem;right:1rem;border:none;background-color:transparent;width:2.5rem;height:2.5rem;cursor:pointer;padding:0;transition:background-color 150ms cubic-bezier(0.4,0,0.2,1) 0ms;border-radius:",";&:hover{background-color:",";}"],function(e){return e.theme.token.radius.circle},function(e){return e.theme.token.color.gray[300]}),f=r.Ay.div.withConfig({displayName:"SwipeableDialogstyled__SwipeableDialogVisuallyHidden",componentId:"sc-1vfpc8o-3"})(["clip:rect(0 0 0 0);clip-path:inset(50%);
1height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px;"]),m=r.Ay.div.withConfig({displayName:"SwipeableDialogstyled__SwipeableDialogHeader",componentId:"sc-1vfpc8o-4"})(["display:flex;align-items:center;justify-content:space-between;"]),y=r.Ay.div.withConfig({displayName:"SwipeableDialogstyled__SwipeableDialogWrapper",componentId:"sc-1vfpc8o-5"})(["padding:1.5rem 2.8125rem;color:",";"],function(e){return e.theme.token.color.gray[100]}),h=(0,r.Ay)(o.hE).withConfig({displayName:"SwipeableDialogstyled__SwipeableDialogTitle",componentId:"sc-1vfpc8o-6"})(["margin-top:0;margin-bottom:0;font-size:",";font-weight:",";width:100%;text-align:center;color:",";word-wrap:break-word;"],function(e){return e.theme.token.typography.fontSize["05"]},function(e){return e.theme.token.typography.fontWeight[800]},function(e){return e.theme.token.color.gray[900]}),g=r.Ay.div.withConfig({displayName:"SwipeableDialogstyled__SwipeableDialogImageWrapper",componentId:"sc-1vfpc8o-7"})(["max-width:fit-content;margin:24px auto;"]),b=(0,r.Ay)(i.E).withConfig({displayName:"SwipeableDialogstyled__SwipeableDialogParagraph",componentId:"sc-1vfpc8o-8"})(["font-size:",";margin:0;color:",";text-align:center;font-style:normal;font-weight:",";line-height:125%;"],function(e){return e.theme.token.typography.fontSize["03"]},function(e){return e.theme.token.color.gray[70]},function(e){return e.theme.token.typography.fontWeight["400"]});(0,r.Ay)(i.E).withConfig({displayName:"SwipeableDialogstyled__SwipeableDialogSecondaryText",componentId:"sc-1vfpc8o-9"})(["font-weight:",";font-size:",";color:",";"],function(e){return e.theme.token.typography.fontWeight["400"]},function(e){return e.theme.token.typography.fontSize["01"]},function(e){return e.theme.token.color.gray[70]})},79876:(e,t,n)=>{"use strict";n.d(t,{j:()=>o});let o={AUTHORIZED_SIGNER:"/account-opening/business/authorized-signer",BUSINESS_DOCUMENTS:"/account-opening/business/business-documents",BUSINESS_INFORMATION:"/account-opening/business/business-information",BUSINESS_QUESTIONNAIRE:"/account-opening/business/business-questionnaire",BUSINESS_ROLES:"/account-opening/business/business-roles",ELIGIBILITY:"/account-opening/business/eligibility",FUNDING_TYPE:e=>"/account-opening/business/".concat(e,"/funding-type"),REVIEW:"/account-opening/business/review",FUNDING_INTERNAL_ACCOUNT:"/account-opening/business/funding/internal-account",FUNDING_ACH:"/account-opening/business/funding/ach",FUNDING_CASH:"/account-opening/business/funding/cash",FUNDING_CREDIT_CARD:"/account-opening/business/funding/credit-card",NO_FUNDING:"/account-opening/business/funding/no-funding",THANK_YOU:"/account-opening/business/thank-you",FRAUD_CHECK:"/account-opening/business/fraud-check"}},80619:(e,t,n)=>{"use strict";n.d(t,{UC:()=>y,sc:()=>h,Vs:()=>f,IS:()=>m});var o=n(80263),r=n(15488),i=n(84796),a=n(53239),l=n(96400),s=n(59946),c=n(8368);let d=c.Ay.div.withConfig({displayName:"styled__LayoutAContentWrapper",componentId:"sc-8d32ded7-0"})(["padding:",";margin:",";max-width:",";height:100%;display:flex;flex-direction:column;@media ","{padding:",";}"],e=>e.$enableGlowUp?e.$wide?"1rem 0":"1rem":e.$addPadding?"32px":"0px",e=>e.$enableGlowUp?"0 auto":"unset",e=>(e.$enableGlowUp,"100%"),(0,s.P)({from:"md"}),e=>e.$enableGlowUp?e.$wide?"2rem 0 0 0":"2rem 1.5rem":e.$addPadding?"32px":"0px"),u=c.Ay.div.withConfig({displayName:"LayoutA.styled__ScreenLayoutAStyled",componentId:"sc-49923e0c-0"})(["display:grid;padding-bottom:",";background:",";min-height:100%;width:100%;grid-template-rows:auto auto 1fr;grid-template-areas:'topBar' 'topNavigation' 'content';--content-width:",";--content-height:",";@media (min-width:768px){grid-template:auto auto minmax(20px,1fr) minmax(var(--content-height),auto) minmax(20px,1fr) / auto var(--content-width) auto;grid-template-areas:'topBar topBar topBar' 'topNavigation topNavigation topNavigation' '. . .' '. content .' '. . .';background:",";}"],e=>e.$hasFixedBottomBar?"7.5rem":"0",e=>{var t;return null!=(t=e.$backgroundColor)?t:"white"},e=>{var t;return null!=(t=e.$contentWidth)?t:"475px"},e=>{var t;return null!=(t=e.$contentHeight)?t:e.$enableGlowUp?"668px":"568px"},e=>{var t;return null!=(t=e.$backgroundColor)?t:e.theme.foundations.colors.grey}),p=c.Ay.main.withConfig({displayName:"LayoutA.styled__ContentStyled",componentId:"sc-49923e0c-1"})(["background:white;grid-area:content;@media (min-width:768px){border-radius:",";border:",";}"],e=>e.$enableGlowUp?"1rem":"0.5rem",e=>e.$enableGlowUp?"1px solid #d9d9d9":"1px solid #e7e7e7"),f=e=>{let{children:t}=e;return(0,o.jsx)(l.w,{"data-testid":"LayoutA-TopBar",children:t})},m=e=>{let{$showBehindModal:t,$colored:n,children:r}=e,a=(0,i.v)({disableHysteresis:!0,threshold:0});return(0,o.jsx)(l.v,{"aria-label":"Site navigation","data-testid":"LayoutA-TopNavigation",$showElevation:!!a,$showBehindModal:t,$colored:n,children:r})},y=(0,a.forwardRef)((e,t)=>{let{wrapContent:n=!0,$wide:r=!1,children:i,$addPadding:a=!0,$enableGlowUp:l}=e;return(0,o.jsx)(p,{as:"main",id:"main-content",tabIndex:-1,ref:t,"data-testid":"LayoutA-Content",$enableGlowUp:l,children:n?(0,o.jsx)(d,{$addPadding:a,$enableGlowUp:l,$wide:r,children:i}):(0,o.jsx)("div",{style:{height:"100%"},children:i})})});y.displayName="Content";let h=e=>{let{children:t,$backgroundColor:n,$contentWidth:i,$contentHeight:a,enableGlowUp:l,$hasFixedBottomBar:s}=e;return(0,o.jsx)(r.V,{children:(0,o.jsx)(u,{$backgroundColor:l?"#FFFFFF":n,$contentWidth:i,$contentHeight:a,"data-testid":"LayoutA",$enableGlowUp:l,$hasFixedBottomBar:s,children:t})})}},80709:(e,t,n)=>{"use strict";n.d(t,{m:()=>u});var o=n(22737),r=n(87086),i=n(53239),a=n(8368),l=(0,a.Ay)(r.UC).withConfig({displayName:"Tooltipstyled__TooltipContent",componentId:"sc-1s1ny6t-0"})(["margin-right:4px;border-radius:4px;padding:8px 12px;font-size:",";font-weight:",";line-height:1;background-color:",";color:",";",""],function(e){return e.theme.token.typography.fontSize["01"]},function(e){return e.theme.token.typography.fontWeight[500]},function(e){return e.theme.token.color.gray[800]},function(e){return e.theme.token.color.gray[100]},function(e){var t=e.$maxWidth;return t&&"max-width: ".concat(t,"px;")}),s=(0,a.Ay)(r.l9).withConfig({displayName:"Tooltipstyled__TooltipTrigger",componentId:"sc-1s1ny6t-1"})(["",""],function(e){return e.$disablebuttonstyle?"all: unset; box-sizing: border-box; border: none;":""}),c=n(80263);function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var u=function(e){var t,n=e.children,a=e.message,u=e.openOnClick,p=void 0!==u&&u,f=e.timeToClose,m=void 0===f?1e3:f,y=e.delayDuration,h=e.position,g=void 0===h?{side:"top",align:"center"}:h,b=e.disableButtonStyle,v=e.disabled,x=e.asChild,w=e.maxWidth,I=function(e){if(Array.isArray(e))return e}(t=(0,i.useState)(!1))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,a,l=[],s=!0,c=!1;try{i=(n=n.call(e)).next,!1;for(;!(s=(o=i.call(n)).done)&&(l.push(o.value),l.length!==t);s=!0);}catch(e){c=!0,r=e}
1finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw r}}return l}}(t,2)||function(e,t){if(e){if("string"==typeof e)return d(e,2);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),A=I[0],j=I[1],E=(0,i.useRef)(null);(0,i.useEffect)(function(){return function(){E.current&&clearTimeout(E.current)}},[m]);var C=(0,i.useCallback)(function(){j(!0),E.current=setTimeout(function(){j(!1)},m)},[m]);return void 0!==v&&v?(0,c.jsx)(c.Fragment,{children:n}):(0,c.jsx)(r.Kq,{delayDuration:void 0===y?700:y,children:(0,c.jsxs)(r.bL,{open:p?A:void 0,onOpenChange:p?C:void 0,children:[(0,c.jsx)(s,{asChild:void 0!==x&&x,$disablebuttonstyle:void 0===b||b,children:n}),(0,c.jsx)(o.j,{condition:!!a,children:(0,c.jsx)(r.ZL,{children:(0,c.jsx)(l,{side:g.side,align:g.align,"data-testid":"tooltip",$maxWidth:w,children:a})})})]})})}},83549:()=>{},84176:(e,t,n)=>{"use strict";n.d(t,{a:()=>B});var o=n(84297),r=n(95952),i=n(22737),a=n(40308),l=n(17378),s=n(49454),c=n(53239),d=n(33332),u=n(25437),p=n(72828),f=n(34367),m=n(8368),y=m.Ay.div.withConfig({displayName:"ModalBottomNavstyled__ModalBottomNav",componentId:"sc-1npe5e0-0"})(["display:flex;padding:1.5rem;gap:0.75rem;"]),h=m.Ay.div.withConfig({displayName:"ModalBottomNavstyled__ModalDividerWrapper",componentId:"sc-1npe5e0-1"})(["margin-top:0.65rem;"]),g=n(80263);function b(e){return(b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach(function(t){var o,r,i;o=e,r=t,i=n[t],(r=function(e){var t=function(e,t){if("object"!=b(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=b(o))return o;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==b(t)?t:t+""}(r))in o?Object.defineProperty(o,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):o[r]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var w=function(e){var t=e.slice(0,3);return t.map(function(e,n){var o;switch(t.length){case 1:default:o=p.h.PRIMARY;break;case 2:o=0===n?p.h.TEXT:p.h.PRIMARY;break;case 3:o=0===n?p.h.TEXT:1===n?p.h.SECONDARY:p.h.PRIMARY}return x(x({},e),{},{variant:o})})},I=function(e){var t=e.buttons,n=e.loading,o=e.isSubmit,r=w(t);return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(h,{children:(0,g.jsx)(f.c,{})}),(0,g.jsx)(y,{children:r.map(function(e){return!o&&"onClick"in e?(0,g.jsx)(u.$,{"data-testid":"modalButton-".concat(e.variant),fullWidth:!0,disabled:e.disabled,loading:n,onClick:e.onClick,"aria-label":e.text,variant:e.variant,children:e.text},e.text):o&&"formId"in e?(0,g.jsx)(u.$,{"data-testid":"modalButton-".concat(e.variant),fullWidth:!0,disabled:n||e.disabled,loading:n,type:"submit",form:e.formId,"aria-label":e.text,variant:e.variant,children:e.text},e.text):null})})]})},A=(0,m.i7)(["from{opacity:0;}to{opacity:1;}"]),j=(0,m.i7)(["from{transform:translateY(100%);}to{transform:translateY(0);}"]),E=(0,m.i7)(["from{opacity:0;transform:translate(-50%,-48%) scale(0.96);}to{opacity:1;transform:translate(-50%,-50%) scale(1);}"]),C=(0,m.Ay)(s.hJ).withConfig({displayName:"Modalstyled__ModalOverlay",componentId:"sc-b7pnlx-0"})(["position:fixed;inset:0;background-color:",";animation:"," 150ms cubic-bezier(0.16,1,0.3,1);z-index:",";"],function(e){return e.theme.token.color.surface.overlay},A,function(e){return e.theme.token.zIndex[200]}),S=(0,m.Ay)(s.UC).withConfig({displayName:"Modalstyled__ModalContent",componentId:"sc-b7pnlx-1"})([""," position:fixed;left:0;bottom:0;top:auto;width:100%;max-height:85vh;z-index:",";text-align:center;animation:"," 225ms cubic-bezier(0,0,0.2,1) 0ms;background-color:",";border-radius:"," "," 0 0;@media (min-width:48rem){min-width:360px;max-width:900px;max-height:100vh;width:auto;top:50%;left:50%;bottom:auto;transform:translate(-50%,-50%);animation:"," 150ms cubic-bezier(0.16,1,0.3,1);border-radius:",";}"],function(e){var t=e.$shouldUseDesignSystemFont,n=e.theme;return t?"font-family: ".concat(n.token.typography.fontFamily.base,";"):""},function(e){return e.theme.token.zIndex[500]},j,function(e){return e.theme.token.color.surface.neutral},function(e){return e.theme.token.radius["03"]},function(e){return e.theme.token.radius["03"]},E,function(e){return e.theme.token.radius["03"]}),D=m.Ay.div.withConfig({displayName:"Modalstyled__ModalInnerContainer",componentId:"sc-b7pnlx-2"})(["padding:0.75rem 1.5rem 1.5rem;"]),_=m.Ay.div.withConfig({displayName:"Modalstyled__ModalHeader",componentId:"sc-b7pnlx-3"})(["display:flex;justify-content:",";align-items:flex-start;padding:0.5rem 0;width:100%;background:",";border-radius:inherit;margin-bottom:1rem;align-items:center;"],function(e){return e.$withTitle?"space-between":"flex-end"},function(e){return e.theme.token.color.surface.neutral}),N=m.Ay.div.withConfig({displayName:"Modalstyled__ModalBody",componentId:"sc-b7pnlx-4"})(["text-align:",";overflow-y:auto;max-height:calc(100vh - 20rem);padding:0.62rem;display:flex;flex-direction:column;"],function(e){return e.$alignItems}),O=m.Ay.div.withConfig({displayName:"Modalstyled__VisuallyHidden",componentId:"sc-b7pnlx-5"})(["clip:rect(0 0 0 0);clip-path:inset(50%);
1height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px;"]),k=m.Ay.div.withConfig({displayName:"Modalstyled__ModalTitleWrapper",componentId:"sc-b7pnlx-6"})(["h1,h2,h3,h4,h5,h6{margin:0;}"]),T=n(24825);function R(e){return(R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var U=["withCloseButton","shouldCloseOnOutsideClick","children","onClose","title","loading","buttons","isFormModal","alignItems","shouldUseDesignSystemFont","aria-label"];function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function L(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach(function(t){var o,r,i;o=e,r=t,i=n[t],(r=function(e){var t=function(e,t){if("object"!=R(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=R(o))return o;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==R(t)?t:t+""}(r))in o?Object.defineProperty(o,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):o[r]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var B=c.forwardRef(function(e,t){var n=e.withCloseButton,u=void 0===n||n,p=e.shouldCloseOnOutsideClick,f=e.children,m=e.onClose,y=e.title,h=e.loading,b=e.buttons,v=e.isFormModal,x=e.alignItems,w=e.shouldUseDesignSystemFont,A=e["aria-label"],j=function(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n={};for(var o in e)if(({}).hasOwnProperty.call(e,o)){if(-1!==t.indexOf(o))continue;n[o]=e[o]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],-1===t.indexOf(n)&&({}).propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,U);(0,a.x)();var E=(0,c.useRef)(null);return(0,g.jsx)(s.bL,L(L({},j),{},{modal:!0,children:(0,g.jsxs)(s.ZL,{children:[(0,g.jsx)(C,{"data-testid":"modal-overlay"}),(0,g.jsxs)(S,{ref:t,$shouldUseDesignSystemFont:void 0!==w&&w,"aria-label":y?void 0:A,"aria-describedby":void 0,onPointerDownOutside:void 0===p||p?m:void 0,onEscapeKeyDown:m,onOpenAutoFocus:function(){E.current="undefined"!=typeof document?document.activeElement:null},onCloseAutoFocus:function(e){var t=E.current;null!=t&&t.isConnected&&(e.preventDefault(),t.focus())},children:[(0,g.jsx)(i.j,{condition:!y&&!A,children:(0,g.jsx)(s.hE,{asChild:!0,children:(0,g.jsx)(O,{children:"Dialog"})})}),(0,g.jsxs)(D,{children:[(0,g.jsx)(i.j,{condition:!!y||u,children:(0,g.jsxs)(_,{$withTitle:!!y,children:[(0,g.jsx)(i.j,{condition:!!y,children:(0,g.jsx)(s.hE,{asChild:!0,children:(0,g.jsx)(k,{children:(0,g.jsx)(T.h,{as:"h2",variant:"secondary",children:y})})})}),(0,g.jsx)(i.j,{condition:u,children:(0,g.jsx)(s.bm,{asChild:!0,children:(0,g.jsxs)(d.K,{onClick:m,children:[(0,g.jsx)(o.I,{size:r.y.LARGE,children:(0,g.jsx)(l.X,{"data-testid":"close-icon"})}),(0,g.jsx)(O,{children:"Close dialog"})]})})})]})}),(0,g.jsx)(N,{$alignItems:void 0===x?"left":x,children:f})]}),(0,g.jsx)(I,{buttons:b,loading:h,isSubmit:void 0!==v&&v})]})]})}))});B.displayName="Modal"},86236:(e,t,n)=>{"use strict";n.d(t,{F:()=>o});var o={DEFAULT:"default",SUCCESS:"success",WARNING:"warning",NEGATIVE:"negative",INFO:"info",SELECTABLE:"selectable",PINNED:"pinned"}},88594:(e,t,n)=>{"use strict";n.d(t,{N:()=>f});var o=n(84297),r=n(95952),i=n(17378),a=n(49454),l=n(78155),s=n(80263);function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var d=["open","onClose","children","maxWidth","shouldCloseOnOutsideClick"];function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?u(Object(n),!0).forEach(function(t){var o,r,i;o=e,r=t,i=n[t],(r=function(e){var t=function(e,t){if("object"!=c(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=c(o))return o;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==c(t)?t:t+""}(r))in o?Object.defineProperty(o,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):o[r]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var f=function(e){var t=e.open,n=e.onClose,c=e.children,u=e.maxWidth,f=e.shouldCloseOnOutsideClick,m=void 0===f||f,y=function(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n={};for(var o in e)if(({}).hasOwnProperty.call(e,o)){if(-1!==t.indexOf(o))continue;n[o]=e[o]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],-1===t.indexOf(n)&&({}).propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,d);return(0,s.jsx)(a.bL,{open:t,children:(0,s.jsxs)(a.ZL,{children:[(0,s.jsx)(l.Do,{}),(0,s.jsxs)(l.y5,p(p({$maxWidth:u,onPointerDownOutside:function(e){return m?n():e.preventDefault()},onEscapeKeyDown:n},y),{},{children:[c,(0,s.jsxs)(l.FN,{onClick:n,children:[(0,s.jsx)(o.I,{size:r.y.MEDIUM,children:(0,s.jsx)(i.X,{"data-testid":"close-icon"})}),(0,s.jsx)(l.OD,{children:"Close Dialog"})]})]}))]})})}},88787:(e,t,n)=>{"use strict";n.d(t,{P:()=>b});var o=n(84297),r=n(95952),i=n(22737),a=n(53239),l=n(9186),s=n(8368),c=n(21438),d=n(43348);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(e,t,n){var o;return(o=function(e,t){if("object"!=u(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=u(o))return o;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==u(o)?o:o+"")in e)?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var f=function(e){var t=e.status,n=e.colorKey;return({text:p(p(p(p(p(p({},c.l.SUCCESS,l.A.token.color.status.positive),c.l.INFO,l.A.token.color.status.info),c.l.NEGATIVE,l.A.token.color.status.negative),c.l.NEUTRAL,l.A.token.color.status.disabled),c.l.WARNING,l.A.token.color.status.alert),c.l.BRAND,l.A.token.color.main.primary),surface:p(p(p(p(p(p({},c.l.SUCCESS,l.A.token.color.surface.status.positive),c.l.INFO,l.A.token.color.surface.status.info),c.l.NEGATIVE,l.A.token.color.surface.status.negative),c.l.NEUTRAL,l.A.token.color.surface.status.disabled),c.l.WARNING,l.A.token.color.surface.status.alert),c.l.BRAND,l.A.token.color.partner.lighter)})[n][t]},m=s.Ay.div.withConfig({displayName:"Calloutstyled__Callout",componentId:"sc-i0y6k0-0"})(["--bg-color:",";padding:1rem;max-width:56.25rem;background-color:var(--bg-color);border-radius:",";gap:16px;display:flex;align-items:center;"],function(e){return f({status:e.$status,colorKey:"surface"})},function(e){return e.theme.token.radius["02"]}),y=s.Ay.div.withConfig({displayName:"Calloutstyled__InnerContainer",componentId:"sc-i0y6k0-1"})(["display:flex;flex-direction:column;gap:0.5rem;"]),h=(0,s.Ay)(d.E).withConfig({displayName:"Calloutstyled__TextStyled",componentId:"sc-i0y6k0-2"})(["margin:0;"]),g=n(80263),b=(0,a.forwardRef)(function(e,t){var n=e.status,a=e.title,l=e.description,s=e.customDescription,c=e.icon,d=e.dataTestId,u=f({status:n,colorKey:"text"});return(0,g.jsxs)(m,{"data-testid":d,$status:n,ref:t,children:[(0,g.jsx)(i.j,{condition:!!c,children:(0,g.jsx)(o.I,{colorfulBackgroun
1d:!1,color:u,size:r.y.SMALL,children:c})}),(0,g.jsxs)(y,{children:[(0,g.jsx)(i.j,{condition:!!a,children:(0,g.jsx)(h,{$variant:"secondary",$weight:"bold",$color:u,children:a})}),(0,g.jsx)(i.j,{condition:!!l,children:(0,g.jsx)(h,{$variant:"secondary",$color:u,children:l})}),(0,g.jsx)(i.j,{condition:!!s,children:(0,g.jsx)(h,{$variant:"secondary",$color:u,children:s})})]})]})});b.displayName="Callout"},88963:(e,t,n)=>{"use strict";n.d(t,{E:()=>m});var o=n(84297),r=n(95952),i=n(8368),a=n(20214);function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t,n){var o;return(o=function(e,t){if("object"!=l(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=l(o))return o;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==l(o)?o:o+"")in e)?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t,n){return s(s(s(s(s({},a.C.POSITIVE,{surface:t.token.color.surface.status.positive,text:t.token.color.status.positive}),a.C.INFO,{surface:t.token.color.surface.status.info,text:t.token.color.status.info}),a.C.NEGATIVE,{surface:t.token.color.surface.status.negative,text:t.token.color.status.negative}),a.C.WARNING,{surface:t.token.color.surface.status.alert,text:t.token.color.status.alert}),a.C.NEUTRAL,{surface:t.token.color.surface.status.disabled,text:t.token.color.status.disabled})[e][n]}var d=i.Ay.div.withConfig({displayName:"Badgestyled__Badge",componentId:"sc-14bw78n-0"})(["--bg-color:",";width:fit-content;background-color:",";text-transform:uppercase;border-radius:0.25rem;display:flex;align-items:center;cursor:",";white-space:nowrap;&:hover{background-color:",";}"],function(e){return c(e.$status,e.theme,"surface")}
1,function(e){return e.$colorfulBackground?"var(--bg-color)":"transparent"},function(e){return e.onClick?"pointer":"default"},function(e){var t=e.onClick,n=e.$colorfulBackground;return t?"var(--bg-color)":n?"none":"transparent"}),u=i.Ay.div.withConfig({displayName:"Badgestyled__InnerContainer",componentId:"sc-14bw78n-1"})(["padding:0.5rem;display:flex;gap:8px;align-items:center;height:1.5rem;div{display:flex;}"]),p=i.Ay.p.withConfig({displayName:"Badgestyled__Label",componentId:"sc-14bw78n-2"})(["text-transform:uppercase;color:",";font-weight:",";font-size:",";"],function(e){return c(e.$status,e.theme,"text")},function(e){return e.theme.token.typography.fontWeight[700]},function(e){return e.theme.token.typography.fontSize["01"]}),f=n(80263);function m(e){var t=e.status,n=e.text,a=e.IconComponent,l=e.handleClick,s=e.colorfulBackground,m=e.dataDogRumPrivacy,y=(0,i.DP)();return(0,f.jsx)(d,{$status:t,$colorfulBackground:s,onClick:l,children:(0,f.jsxs)(u,{$colorfulBackground:s,children:[(0,f.jsx)(p,{$status:t,"data-dd-privacy":void 0===m?"allow":m,children:n}
1),a&&(0,f.jsx)(o.I,{colorfulBackground:!1,color:c(t,y,"text"),size:r.y.SMALL,weight:"bold",children:(0,f.jsx)(a,{})})]})})}},90946:(e,t,n)=>{"use strict";n.d(t,{m:()=>o.m});var o=n(72705)},96112:(e,t,n)=>{"use strict";n.d(t,{s:()=>g});var o=n(49454),r=n(4366),i=n(72828),a=n(25437),l=n(84176),s=n(8368),c=s.I4.div.withConfig({displayName:"ResponsiveModalstyled__MobileSheetContent",componentId:"sc-101qbvt-0"})(["display:flex;flex-direction:column;max-height:85vh;padding:"," ",";font-family:",";color:",";"],function(e){return e.theme.token.spacing["16"]},function(e){return e.theme.token.spacing["32"]},function(e){return e.theme.token.typography.fontFamily.base},function(e){return e.theme.token.color.gray["900"]}),d=s.I4.div.withConfig({displayName:"ResponsiveModalstyled__MobileHeader",componentId:"sc-101qbvt-1"})(["min-height:",";padding-inline:",";margin-bottom:",";text-align:center;h1,h2,h3{margin:0;line-height:1.25;}"],function(e){return e.theme.token.spacing["40"]},function(e){return e.theme.token.spacing["32"]},function(e){return e.theme.token.spacing["24"]}),u=s.I4.div.withConfig({displayName:"ResponsiveModalstyled__MobileBody",componentId:"sc-101qbvt-2"})(["min-height:0;flex:1;overflow-y:auto;padding-right:",";padding-top:",";"],function(e){return e.theme.token.spacing["08"]},function(e){var t=e.$reserveCloseButtonSpace,n=e.theme;return t?n.token.spacing["40"]:"0"}),p=s.I4.div.withConfig({displayName:"ResponsiveModalstyled__ResponsiveModalButtons",componentId:"sc-101qbvt-3"})(["display:flex;flex-direction:column;gap:",";margin-top:",";"],function(e){return e.theme.token.spacing["12"]},function(e){return e.theme.token.spacing["24"]}),f=n(88594),m=n(78155),y=n(24825),h=n(80263),g=function(e){var t=e.open,n=e.onClose,s=e.title,g=e.ariaLabel,b=e.buttons,v=void 0===b?[]:b,x=e.isFormModal,w=e.enableMobileSheet,I=e.shouldCloseOnOutsideClick,A=e.loading,j=e.children;return(0,r.U)("(max-width: 768px)")&&(void 0===w||w)?(0,h.jsx)(f.N,{open:t,onClose:n,"aria-label":g||s,shouldCloseOnOutsideClick:I,children:(0,h.jsxs)(c,{children:[s?(0,h.jsx)(d,{children:(0,h.jsx)(o.hE,{asChild:!0,children:(0,h.jsx)(y.h,{as:"h2",variant:"secondary",children:s})})}):(0,h.jsx)(o.hE,{asChild:!0,children:(0,h.jsx)(m.OD,{children:"Dialog"})}),(0,h.jsx)(u,{$reserveCloseButtonSpace:!s,children:j}),v.length>0?(0,h.jsx)(p,{children:v.map(function(e,t){var n,o=(n=v.length,n>1&&t<n-1?i.h.TEXT:i.h.PRIMARY);return"formId"in e?(0,h.jsx)(a.$,{type:"submit",form:e.formId,fullWidth:!0,variant:o,loading:A,disabled:A||e.disabled,children:e.text},e.text):(0,h.jsx)(a.$,{type:"button",fullWidth:!0,variant:o,loading:A,disabled:A||e.disabled,onClick:e.onClick,children:e.text},e.text)})}):null]})}):(0,h.jsx)(l.a,{shouldUseDesignSystemFont:!0,open:t,onClose:n,title:s,"aria-label":g||s,loading:A,isFormModal:void 0!==x&&x,buttons:v,shouldCloseOnOutsideClick:I,children:j})}},99732:()=>{}},e=>{e.O(0,[3140,5708,7086,2900,8907,6826,9300,9046,3877,6507,636,6593,8792],()=>e(e.s=76500)),_N_E=e.O()}]);
2//# sourceMappingURL=business-documents-4a4dc9ec8d96f329.js.map

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.