PageSourceSearch

https://my.bnc.bank/en/js/bannoweb-merchant-enrollment-CJlNDood.js

js bnc.bank collected 2026-10-01 15:35:25 UTC 159,959 bytes, 17 lines download raw bytes

1import{a as e,n as t}from"./standalone-app-Bj-IdwrG.js";import{E as n,_ as r,p as i,x as a}from"./institution-DyFDvNu6.js";import{n as o,t as s}from"./page-B8YwBOEr.js";import{t as c}from"./date-URgChy6n.js";import{t as l}from"./phone-CyPjF9av.js";import{_r as u,g as d,h as f,i as ee,m as p,o as m,p as h,s as g,vr as te}from"./main-5Sl8yySz.js";import"./jha-progress-CjUOO3no.js";import"./jha-card-DC-UH8vN.js";import"./jha-card-header-D2XWRnD9.js";import"./jha-button-Dyau4S4K.js";import"./jha-form-radio-button-5hrlF8c6.js";import"./jha-link-button-k4YCp-l3.js";import{r as _}from"./banno-styles-B3iGgKv1.js";import{t as ne}from"./bannoweb-confirmation-dialog-6ZiCES-9.js";import"./jha-form-switch-CLwMa4i1.js";import"./jha-list-UCQUTbOQ.js";import"./jha-select-ZNLtNzvA.js";import"./jha-form-checkbox-rBX0llE9.js";import"./bannoweb-page-container-G_uPsQAr.js";import"./jha-form-floating-group-DqE4-9IH.js";import"./jha-date-picker-BY52zia8.js";import{t as v}from"./async-dialog-Bj6--dJf.js";import{n as y}from"./string-util-D36Fq-Ug.js";import{t as b}from"./unsafe-html-CyVEm-uX.js";import{B as x,C as S,F as re,G as ie,H as ae,J as C,K as oe,L as w,M as se,P as ce,R as T,V as E,W as D,a as O,b as k,c as le,d as A,et as j,f as ue,h as M,i as N,m as de,n as P,o as fe,q as F,s as I,w as pe,x as L,z as R}from"./merchant-utils-DCUCb9GZ.js";import{t as z}from"./merchant-enrollment-tracking-w095XbN4.js";import{t as B}from"./email-util-DPgMegsb.js";import"./bannoweb-state-dropdown-CT7_sF5W.js";import"./bannoweb-merchant-settlement-account-B1MDwaMP.js";var me=`/images/merchant`,V=[{name:`card-tap`,alt:`Phone accepting card payment`,title:`Accept payments on your phone with no extra hardware`},{name:`invoice`,alt:`Invoice on mobile device`,title:`Create invoices and accept payments online`},{name:`transactions`,alt:`Transaction list on mobile device`,title:`Payment activity syncs with your accounting software`}];window.BannowebMerchantImageCarousel=class extends r{static get is(){return`bannoweb-merchant-image-carousel`}static get properties(){return{currentSlide:{type:Number},isMobile:{type:Boolean,reflect:!0}}}static get styles(){return n`:host{width:100%;display:block}:host([isMobile]){flex-direction:column;flex:1;justify-content:flex-start;display:flex}@media (width<=768px){:host{flex-direction:column;flex:1;justify-content:flex-start;display:flex}}.carousel-wrapper{aspect-ratio:536/340;border-radius:8px;width:100%;max-width:536px;margin:32px auto 0;position:relative;overflow:hidden}:host([isMobile]) .carousel-wrapper{aspect-ratio:311/380;width:auto;max-width:none;margin:16px}@media (width<=768px){.carousel-wrapper{aspect-ratio:311/380;width:auto;max-width:none;margin:16px}}@media (height<=900px){:host([isMobile]) .carousel-title{margin-top:8px}:host([isMobile]) .carousel-wrapper{margin:8px 16px}}@media (width<=768px) and (height<=900px){.carousel-title{margin-top:8px}.carousel-wrapper{margin:8px 16px}}.carousel-title{text-align:center;color:var(--body-text-primary-color);letter-spacing:.38px;min-height:56px;margin-top:16px;padding:0 16px;font-size:20px;font-weight:600;line-height:28px}.carousel-slide{width:100%;height:100%;transition:transform .7s;position:absolute;top:0;left:0;overflow:hidden}.carousel-slide picture{width:100%;height:100%;display:block}.carousel-image{object-fit:contain;object-position:center;width:100%;height:100%;display:block}.pagination-container{justify-content:center;gap:8px;margin-top:16px;display:flex}.pagination-dot{cursor:pointer;background:0 0;border:none;padding:4px}`}constructor(){super(),this.currentSlide=0,this.isMobile=!1}getImagePosition(e){if(this.currentSlide<=1)return 100;let t=this.currentSlide-2;return e===t?0:e<t?-100:100}handleDotClick(e){this.dispatchEvent(new CustomEvent(`slide-change`,{bubbles:!0,composed:!0,detail:{slideIndex:e}}))}renderTitle(){let e=this.currentSlide>1?V[this.currentSlide-2]:null;return a`<div class="carousel-title">${e?e.title:a`&nbsp;`}</div>`}renderSlideImage(e){let t=(t,n)=>`${me}/photo-moov-${e.name}-${t}-${n}.png`;return this.isMobile?a`<picture> <source media="(prefers-color-scheme: dark)" srcset="${t(`mobile`,`dark`)}"> <img class="carousel-image" src="${t(`mobile`,`light`)}" alt="${e.alt}"> </picture>`:a`<picture> <source media="(max-width: 768px) and (prefers-color-scheme: dark)" srcset="${t(`mobile`,`dark`)}"> <source media="(max-width: 768px)" srcset="${t(`mobile`,`light`)}"> <source media="(prefers-color-scheme: dark)" srcset="${t(`desktop`,`dark`)}"> <img class="carousel-image" src="${t(`desktop`,`light`)}" alt="${e.alt}"> </picture>`}render(){return a`<div class="carousel-wrapper"> ${V.map((e,t)=>a`<div class="carousel-slide" style="transform:translateX(${this.getImagePosition(t)}%)"> ${this.renderSlideImage(e)} </div>`)} </div> ${this.renderTitle()}`}},customElements.define(window.BannowebMerchantImageCarousel.is,window.BannowebMerchantImageCarousel),window.BannowebMerchantImageCarousel;var H=2,he=[e=>`+${e}`,e=>`${e} per dispute`,e=>`${e} per update`,e=>`Per transaction`];window.BannowebMerchantCarouselPricingAgreement=class extends r{static get is(){return`bannoweb-merchant-carousel-pricing-agreement`}static get styles(){return n`:host{flex-direction:column;flex:1;display:flex}.container{flex-direction:column;flex:1;justify-content:flex-start;gap:20px;padding:24px;display:flex}.title{text-align:center;color:var(--body-text-primary-color);letter-spacing:.38px;font-size:20px;font-style:normal;font-weight:600;line-height:28px}.cards{gap:16px;display:flex}
1.card{border:1px solid var(--divider-default-color);text-align:center;border-radius:16px;flex-direction:column;flex:1;align-items:center;gap:8px;padding:20px 16px;display:flex}.card-amount{flex-direction:column;display:flex}.chip{background:var(--link-button-focused-color);color:var(--body-text-theme-color);white-space:nowrap;border-radius:16px;width:fit-content;padding:2px 8px;font-size:12px;font-weight:500;display:inline-block}.primary-text{color:var(--body-text-primary-color);font-size:16px;font-style:normal;font-weight:400}.secondary-text{color:var(--body-text-secondary-color);white-space:nowrap;font-size:14px;font-style:normal;font-weight:400}.details{border:1px solid var(--divider-default-color);border-radius:16px;padding:0 16px}.detail-row{border-top:1px solid var(--divider-default-color);justify-content:space-between;align-items:center;gap:16px;padding:14px 0;display:flex}.detail-row:first-child{border-top:none}.detail-label{color:var(--body-text-secondary-color);font-size:14px;font-weight:400}.detail-value{color:var(--body-text-primary-color);text-align:right;font-size:14px;font-weight:400}.disclaimer{color:var(--body-text-secondary-color);text-align:center;font-size:12px;font-style:normal;font-weight:400}.loading{justify-content:center;padding:100px;display:flex}@media (width<=768px){.container{gap:16px;padding:32px 16px}.cards{flex-direction:column}.card{text-align:left;flex-direction:row;justify-content:space-between;align-items:center;gap:16px;padding:16px}.card-amount{text-align:right;flex-shrink:0;align-items:flex-end}.chip{white-space:normal;min-width:0;padding:4px 12px}.details{padding:16px}.detail-row{padding:8px 0}.disclaimer{padding:0 40px}}@media (height<=900px){.container{gap:8px;padding:16px}.cards{gap:8px}.card,.details{padding:10px}.detail-row{padding:4px 0}}`}static get properties(){return{feeData:{type:Array},loading:{type:Boolean}}}constructor(){super(),this.feeData=[],this.loading=!1}get paymentCards(){return this.feeData?.slice(0,H)||[]}get detailRows(){return this.feeData?.slice(H).map((e,t)=>{let n=he[t];return{label:e.title,value:n?n(e.primaryFeeText):e.primaryFeeText}})||[]}renderCards(){return a`<div class="cards"> ${this.paymentCards.map(e=>a`<div class="card"> <div class="chip">${e.title}</div> <div class="card-amount"> <div class="primary-text">${e.primaryFeeText}</div> <div class="secondary-text">${`Per transaction`}</div> </div> </div>`)} </div>`}maybeRenderDetails(){let e=this.detailRows;return e.length?a`<div class="details"> ${e.map(e=>a`<div class="detail-row"> <span class="detail-label">${e.label}</span> <span class="detail-value">${e.value}</span> </div>`)} </div>`:``}renderLoading(){return a`<div class="loading"> <jha-progress></jha-progress> </div>`}render(){return this.loading?this.renderLoading():a`<div class="container"> <div class="title">${`Simple & transparent pricing`}</div> ${this.renderCards()} ${this.maybeRenderDetails()} <div class="disclaimer">${`Custom pricing available for high volume or unique business models.`}</div> </div>`}},customElements.define(window.BannowebMerchantCarouselPricingAgreement.is,window.BannowebMerchantCarouselPricingAgreement),window.BannowebMerchantCarouselPricingAgreement;var U=[`1-accept-payments-intro`,`5-pricing-agreement`,`2-moov-card-tap-intro`,`3-moov-invoice-intro`,`4-moov-transaction-activity-intro`],ge=40;window.BannowebMerchantEnrollmentLanding=class extends r{static get is(){return`bannoweb-merchant-enrollment-landing`}static get styles(){return[_,n`bannoweb-moov-logo-icon{color:var(--body-text-primary-color);fill:var(--body-text-primary-color);width:110px;height:27px}.icon{fill:var(--body-text-theme-color);color:var(--body-text-theme-color)}h2{color:var(--body-text-primary-color);text-align:center;letter-spacing:.38px;margin:0;font-size:20px;font-style:normal;font-weight:600;line-height:28px}.content-landing{box-sizing:border-box;flex-direction:column;flex:1;gap:40px;padding:56px 32px 0;display:flex}:host([isMobile]) .content-landing{padding:56px 16px 0}@media (width<=600px){.content-landing{padding:56px 16px 0}}.head{flex-direction:column;align-items:center;gap:32px;display:flex}.head-text{flex-direction:column;align-items:center;gap:8px;width:100%;display:flex}.subheader{text-align:center;color:var(--body-text-secondary-color);letter-spacing:.15px;padding:0 5px;font-size:16px;font-style:normal;font-weight:400;line-height:24px}.subheader a,.link{color:var(--body-text-theme-color)}.body{flex-direction:column;gap:16px;font-size:16px;font-style:normal;font-weight:400;line-height:24px;display:flex}.body>span{grid-template-columns:28px minmax(0,1fr);align-items:start;column-gap:8px;display:grid}:host([isMobile]) .body>span{grid-template-columns:24px minmax(0,1fr)}@media (width<=600px){.body>span{grid-template-columns:24px minmax(0,1fr)}}.fi-icon{border-radius:10px;justify-content:center;align-items:center;width:40px;height:40px;
1display:flex}.icon-group{align-items:center;gap:10px;display:flex}.slide-container{width:100%;overflow:hidden;container-type:inline-size}.slide-track{align-items:stretch;transition:transform .7s;display:flex}.slide-panel{flex-direction:column;flex:0 0 100cqw;min-width:0;display:flex}.carousel-container.with-background{background-position:50%;background-repeat:no-repeat;background-size:cover}.pagination-container{justify-content:center;gap:8px;margin-top:16px;display:flex}:host([isMobile]) .bottom-bar{z-index:1;background:var(--jha-card-background-color,var(--jha-component-background-color,#fff));position:sticky;bottom:0}@media (width<=600px){.bottom-bar{z-index:1;background:var(--jha-card-background-color,var(--jha-component-background-color,#fff));position:sticky;bottom:0}}.pagination-dot{cursor:pointer;background:0 0;border:none;padding:4px}footer{padding:16px 32px 36px}:host([isMobile]) footer{padding:16px 16px 36px}@media (width<=600px){footer{padding:0 16px 36px}}.get-started{--jha-button-background-color:var(--body-text-primary-color,#000);--jha-button-text-color:var(--body-background-color,#fff);--jha-button-padding-vertical:6px;--jha-button-text-size:16px;--jha-button-font-weight:500;width:100%}.disclaimer{text-align:center;color:var(--body-text-secondary-color);margin-top:16px;font-size:12px;line-height:16px}jh-icon-bolt,jh-icon-arrow-circle-dollar-sign,jh-icon-receipt-bill{width:28px;height:28px}:host([isMobile]) jh-icon-bolt,:host([isMobile]) jh-icon-arrow-circle-dollar-sign,:host([isMobile]) jh-icon-receipt-bill{width:24px;height:24px}@media (width<=600px){jh-icon-bolt,jh-icon-arrow-circle-dollar-sign,jh-icon-receipt-bill{width:24px;height:24px}}@media (height<=900px){:host([isMobile]) .content-landing{gap:24px;padding-top:24px}:host([isMobile]) .head{gap:20px}:host([isMobile]) .pagination-container{margin-top:4px}:host([isMobile]) footer{padding:8px 16px 12px}}@media (width<=600px) and (height<=900px){.content-landing{gap:24px;padding-top:24px}.head{gap:20px}.pagination-container{margin-top:4px}footer{padding:0 16px 12px}}`]}constructor(){super(),e(()=>import(`./icon-bolt-BFhMgRn3.js`).then(e=>e.t),[]),e(()=>import(`./icon-arrow-circle-dollar-sign-u1h8xri1.js`),[]),e(()=>import(`./icon-receipt-bill-BHvtyoVk.js`),[]),e(()=>import(`./bannoweb-moov-logo-icon-BRWd1xyw.js`),[]),this.fiIconSrc=m.merchantController.getFiIcon(),this.fiName=banno.web.config.fiName||banno.web.config.appName,this.loading=!1,this.enrollPollTimeout=null,this.subscription=null,this.currentSlide=0,this.carouselInterval=null,this.feeData=[],this.feeDataLoading=!1,this.active=!1,this.isMobile=!1,this.viewedSlides_=new Set,this.landingExitTracked_=!1,this.onBeforeUnload_=null,this.touchStartX_=0,this.touchStartY_=0,this.initEnrollmentPoll()}static get properties(){return{fiIconSrc:{type:String},loading:{type:Boolean},currentSlide:{type:Number},active:{type:Boolean},isMobile:{type:Boolean,reflect:!0},feeData:{type:Array},feeDataLoading:{type:Boolean}}}connectedCallback(){super.connectedCallback(),this.startCarouselAutoAdvance(),this.onBeforeUnload_=()=>this.trackCarouselViewed_(`abandoned`),window.addEventListener(`beforeunload`,this.onBeforeUnload_)}disconnectedCallback(){super.disconnectedCallback(),clearTimeout(this.enrollPollTimeout),clearInterval(this.carouselInterval),this.subscription?.unsubscribe(),window.removeEventListener(`beforeunload`,this.onBeforeUnload_),this.trackCarouselViewed_(`abandoned`)}updated(e){super.updated(e),this.active&&(e.has(`active`)||e.has(`currentSlide`))&&this.recordCurrentSlide_()}recordCurrentSlide_(){let e=U[this.currentSlide];e&&this.viewedSlides_.add(e)}getCurrentSlideName(){return U[this.currentSlide]||null}trackCarouselViewed_(e){this.landingExitTracked_||!this.viewedSlides_.size||(this.landingExitTracked_=!0,z.trackEnrollmentCarouselViewed({slidesViewed:Array.from(this.viewedSlides_),lastSlide:U[this.currentSlide]||null,exitType:e}))}initEnrollmentPoll(){let e=[g.EventName.POLL_STATUS_RESOLVE,g.EventName.POLL_STATUS];this.subscription=i.from(m.merchantController).subscribe(({type:t,httpStatusCode:n,data:r})=>{e.includes(t)&&(n===204||r.status===d.INITIALIZING?this.enrollPollTimeout=setTimeout(()=>{this.loading=!0,this.getEnrollmentStatus()},2e3):(this.handleStatusResolve(r),this.subscription.unsubscribe(),clearTimeout(this.enrollPollTimeout),this.loading=!1))})}getEnrollmentStatus(){return m.merchantController.fetchEnrollmentStatus(!0)}handleStatusResolve(e){switch(e?.status){case d.ENROLLING:this.dispatchEvent(new CustomEvent(`success`,{bubbles:!0,composed:!0,detail:!!e?.enrollingInformation?.declareRepresentatives}));break;case d.ENROLLED:this.dispatchEvent(new CustomEvent(`initEnrolled`,{composed:!0}));break;default:this.dispatchEvent(new CustomEvent(`fail`,{bubbles:!0,composed:!0,detail:e?.status}));break}}async handleInitiateEnroll(){try{this.loading=!0,z.trackEnrollmentProcessStarted(`new`,!0),this.trackCarouselViewed_(`proceed`),await m.merchantController.initiateEnrollment()}catch(e){clearTimeout(this.enrollPollTimeout),this.loading=!1,v.showStandardErrorDialog({error:e})}}startCarouselAutoAdvance(){clearInterval(this.carouselInterval),this.carouselInterval=setInterval(()=>{this.currentSlide=(this.currentSlide+1)%5},5e3)}handleDotClick(e){this.currentSlide=e,this.startCarouselAutoAdvance()}handleSlideChange(e){this.currentSlide=e.detail.slideIndex,this.startCarouselAutoAdvance()}handleTouchStart(e){let t=e.changedTouches[0];this.touchStartX_=t.clientX,this.touchStartY_=t.clientY}handleTouchEnd(e){let t=e.changedTouches[0],n=t.clientX-this.touchStartX_,r=t.clientY-this.touchStartY_;if(Math.abs(n)<ge||Math.abs(n)<=Math.abs(r))return;let i=n<0?1:-1,a=Math.min(4,Math.max(0,this.currentSlide+i));a!==this.currentSlide&&(this.currentSlide=a,this.startCarouselAutoAdvance())}get slideTrackTransform(){return this.currentSlide===0?`0`:this.currentSlide===1?`-100cqw`:`-200cqw`}renderPricingPreview(){return a`<bannoweb-merchant-carousel-pricing-agreement .feeData="${this.feeData}" .loading="${this.feeDataLoading}"></bannoweb-merchant-carousel-pricing-agreement>`}buildSubheaderWithMoovLink(){return b(`<a target="_blank" href="https://moov.i
1o/tap2local">Moov</a> enables you to accept payments quickly & securely from all major credit & debit cards, Apple Pay & Google Pay — in person & online.`)}renderLandingContent(){return a`<div class="content-landing"> <div class="head"> <div class="icon-group"> <img class="fi-icon" src="${this.fiIconSrc}" alt=""> + <bannoweb-moov-logo-icon color="${`var(--body-text-primary-color)`}" class="icon"></bannoweb-moov-logo-icon> </div> <div class="head-text"> <h2>${`Accept card payments with Moov.`}</h2> <div class="subheader">${this.buildSubheaderWithMoovLink()}</div> </div> </div> <div class="body"> <span> <jh-icon-bolt class="icon"></jh-icon-bolt> ${`Sign up securely and start accepting card payments in minutes.`} </span> <span> <jh-icon-arrow-circle-dollar-sign class="icon"></jh-icon-arrow-circle-dollar-sign> ${`Get next-day access to your funds.`} </span> <span> <jh-icon-receipt-bill class="icon"></jh-icon-receipt-bill> ${`2.6% + $0.15 per in-person payment, 2.9% + $0.30 per online payment.`} </span> </div> </div>`}render(){return a`<div class="slide-container" @touchstart="${this.handleTouchStart}" @touchend="${this.handleTouchEnd}"> <div class="slide-track" style="transform:translateX(${this.slideTrackTransform})"> <div class="slide-panel">${this.renderLandingContent()}</div> <div class="slide-panel">${this.renderPricingPreview()}</div> <div class="slide-panel carousel-container ${this.currentSlide>=2&&this.currentSlide<=4?`with-background`:``}"> <bannoweb-merchant-image-carousel .currentSlide="${this.currentSlide}" .isMobile="${this.isMobile}" @slide-change="${this.handleSlideChange}"></bannoweb-merchant-image-carousel> </div> </div> </div> <div class="bottom-bar"> <div class="pagination-container"> ${[0,1,2,3,4].map(e=>a`<button class="pagination-dot" @click="${()=>this.handleDotClick(e)}" type="button"> ${e===this.currentSlide?a`<svg height="8" width="8" fill="var(--body-text-theme-color, #7030e3)"> <circle cx="4" cy="4" r="4"></circle> </svg>`:a`<svg height="8" width="8" fill="var(--body-text-secondary-color, rgba(0,0,0,0.3))"> <circle cx="4" cy="4" r="4"></circle> </svg>`} </button>`)} </div> <footer> <jha-button class="get-started reset" block .isLoading="${this.loading}" .disabled="${this.loading}" @click="${this.handleInitiateEnroll}" sync> ${`Get started!`} </jha-button> <div class="disclaimer">${`${this.fiName} will securely share only the details necessary to enroll your business with Moov.`}</div> </footer> </div>`}},customElements.define(window.BannowebMerchantEnrollmentLanding.is,window.BannowebMerchantEnrollmentLanding),window.BannowebMerchantEnrollmentLanding,window.BannowebMerchantErrorsSection=class extends r{static get is(){return`bannoweb-merchant-errors-section`}static get styles(){return n`:host{display:block}.section-title{color:var(--body-text-secondary-color);text-transform:uppercase;letter-spacing:.5px;padding:12px 0 4px;font-size:11px;font-weight:500}.error-icon{color:var(--error-color,#d32f2f);fill:var(--error-color,#d32f2f)}.error-details{flex-direction:column;display:flex}.error-type{color:var(--body-text-primary-color);font-size:14px;font-weight:400}.error-fields{flex-wrap:wrap;gap:4px;margin-top:2px;display:flex}.error-field-tag{color:var(--body-text-secondary-color);font-size:11px}.error-field-tag:not(:last-child):after{content:","}.error-banner{background-color:var(--error-color,#d32f2f);margin:16px var(--jha-content-inset,16px) 8px;border-radius:8px;align-items:center;gap:12px;padding:12px 16px;display:flex}.error-banner-icon{color:#fff;fill:#fff;flex-shrink:0}.error-banner-text{color:#fff;font-size:14px;font-weight:500}.error-item{cursor:pointer;align-items:center;gap:12px;width:100%;display:flex}.error-item .error-details{flex:1}.error-item jha-button{flex-shrink:0}`}static get properties(){return{hasErrors:{type:Boolean},errors:{type:Array},businessReps:{type:Array},isExtendedUnderwriting:{type:Boolean}}}constructor(){super(),e(()=>import(`./icon-circle-exclamation-CPV1Eg_u.js`).then(e=>e.t),[]),e(()=>import(`./icon-chevron-right-C-tNm2lU.js`).then(e=>e.t),[]),this.hasErrors=!1,this.errors=[],this.businessReps=[],this.isExtendedUnderwriting=!1}handleNotSupported(e){let t=new ne;t.showWarningIcon=!0,t.header=`Unsupported`,t.description=`We are unable to make changes in "${e}" at the moment, please contact support.`,t.confirmButtonText=`OK`,t.addEventListener(`confirm`,async e=>{t.dispatchEvent(new CustomEvent(`closeModal`,{bubbles:!0,compose:!0}))}),this.dispatchEvent(new ee(t))}handleErrorClick(e){let t=e.fields?.some(e=>e.code===`address`);
1if(e.errorType===h.REPRESENTATIVE){let n=t?f.ERROR_ADDRESS_FORM:f.ERROR_FORM;this.dispatchEvent(new CustomEvent(`error-click`,{composed:!0,detail:{error:e,focusPaneId:n}}))}else if(e.errorType===h.BUSINESS){let n=t?f.ERROR_BUSINESS_ADDRESS_FORM:f.ERROR_BUSINESS_FORM;this.dispatchEvent(new CustomEvent(`error-click`,{composed:!0,detail:{error:e,focusPaneId:n}}))}else this.handleNotSupported(e.errorType)}getRepresentativeName(e){let t=M(e,this.businessReps);if(t===-1)return``;let n=this.businessReps[t];return[n.firstName,n.lastName].filter(Boolean).join(` `)}truncateDescription(e){let t=e.description||e.code;return t.length>50?`${y(e.code)}: ${t.substring(0,50)}...`:t}getErrorTypeLabel(e){return{representatives:`Business representatives`,business:`Business information`}[e]||y(e)||`There was a problem completing your enrollment. Please contact your organization administrator for a new invitation.`}maybeRenderErrorBanner(){return!this.hasErrors||!this.errors?.length?``:a`<div class="error-banner"> <jh-icon-circle-exclamation class="error-banner-icon"></jh-icon-circle-exclamation> <span class="error-banner-text">${`Additional action is required to complete your enrollment`}</span> </div>`}maybeRenderErrorsList(){return!this.hasErrors||!this.errors?.length?``:a`<jha-list-item> <span class="section-title">${`Action Required`}</span> </jha-list-item> ${this.errors.map(e=>a`<jha-list-item @click="${()=>this.handleErrorClick(e)}"> <div class="error-item"> <jh-icon-circle-exclamation class="error-icon"></jh-icon-circle-exclamation> <div class="error-details"> <div class="error-fields"> ${e.fields?.map(e=>a`<span class="error-type">${this.truncateDescription(e)}</span>`)} </div> <span class="error-field-tag"> ${this.getErrorTypeLabel(e.errorType)}${this.getRepresentativeName(e.errorEntityId)?` - ${this.getRepresentativeName(e.errorEntityId)}`:``} </span> </div> <jha-button sync icon> <jh-icon-chevron-right></jh-icon-chevron-right> </jha-button> </div> </jha-list-item>`)}`}render(){return a`${this.maybeRenderErrorBanner()}${this.maybeRenderErrorsList()}`}},customElements.define(window.BannowebMerchantErrorsSection.is,window.BannowebMerchantErrorsSection),window.BannowebMerchantErrorsSection,window.BannowebMerchantAgreementDirectory=class extends r{static get is(){return`bannoweb-merchant-agreement-directory`}static get styles(){return[_,n`jha-list-item{padding:14px var(--jha-content-inset);justify-content:space-between;align-items:center;display:flex}button.reset{justify-content:space-between;align-items:center;display:flex}button.reset:disabled{opacity:.5}.list{flex:1;align-items:center;gap:8px;display:flex}.list>jh-icon-clock{color:var(--body-text-theme-color);fill:var(--body-text-theme-color)}jh-icon-circle-checkmark-filled,jh-icon-circle{color:var(--body-text-completed-color);fill:var(--body-text-completed-color);min-width:24px}jh-icon-circle{color:var(--body-text-theme-color);fill:var(--body-text-theme-color);min-width:24px}.container{flex-direction:column;gap:20px;padding-bottom:30px;display:flex}h2{color:var(--body-text-primary-color);text-align:center;font-size:20px;font-style:normal;font-weight:500}.fi-icon{border-radius:10px;justify-content:center;align-items:center;width:40px;height:40px;display:flex}.section{justify-content:center;align-items:center;gap:16px;padding:8px 24px 0;display:flex}.section:first-child{padding-top:24px}.disclaimer{color:var(--body-text-secondary-color);text-align:center;font-family:Roboto;font-size:12px;font-style:normal;font-weight:400}.link{color:var(--body-text-theme-color)}footer{justify-content:center;align-items:center;padding:0;display:flex}jha-button{padding:0px var(--jh-space-400);display:flex}jh-icon-chevron-right{color:var(--body-text-secondary-color);fill:var(--body-text-secondary-color)}`]}static get properties(){return{generalChecked:{type:Boolean},pricingChecked:{type:Boolean},hidePricingAgreement:{type:Boolean},accountChecked:{type:Boolean},loading:{type:Boolean},hasDeclareRepresentatives:{type:Boolean},ownersProvided:{type:Boolean},generalInProgress:{type:Boolean},pricingInProgress:{type:Boolean},accountInProgress:{type:Boolean},declareRepresentativesChecked:{type:Boolean},hasErrors:{type:Boolean},errors:{type:Array},businessReps:{type:Array}}}constructor(){super(),e(()=>import(`./bannoweb-moov-logo-icon-BRWd1xyw.js`),[]),e(()=>import(`./icon-chevron-right-C-tNm2lU.js`).then(e=>e.t),[]),e(()=>import(`./icon-clock-CqkRngTE.js`),[]),e(()=>import(`./icon-circle-checkmark-filled-CpAiaMF3.js`),[]),e(()=>import(`./icon-circle-7nK96ot4.js`),[]),this.generalChecked=!1,this.pricingChecked=!1,this.hidePricingAgreement=!1,this.accountChecked=!1,this.fiIconSrc=m.merchantController.getFiIcon(),this.loading=!1,this.hasDeclareRepresentatives=!1,this.ownersProvided=!1,this.generalInProgress=!1,this.pricingInProgress=!1,this.accountInProgress=!1,this.businessRepsInProgress=!1,this.declareRepresentativesChecked=!1,this.hasErrors=!1,this.errors=[],this.businessReps=[]}get isInteractionDisabled(){return this.loading||this.hasErrors}get disabled(){let e=!this.hasDeclareRepresentatives||this.ownersProvided;return!(re(this.hidePricingAgreement,this.pricingChecked)&&this.accountChecked&&this.generalChecked&&this.declareRepresentativesChecked&&e)||this.hasErrors}maybehandleRowClick(e,t){this.loading||this.hasErrors||t&&this.dispatchEvent(new CustomEvent(`tab-click`,{bubbles:!0,composed:!0,detail:e}))}handleNextFocusPane(e){switch(e){case d.ENROLLED:return f.COMPLETE;case d.INELIGIBLE:return f.UNSUPPORTED;default:return f.PENDING_REVIEW}}handleStatusResolve(e){switch(this.loading=!1,z.trackEnrollmentOutcomeReceived(e.status,this.businessReps),e.status){case d.ENROLLED:this.dispatchEvent(new CustomEvent(`enrollment-success`,{bubbles:!0,composed:!0,detail:{completedKey:f.NONE,nextFocusPane:this.handleNextFocusPane(e.status)}}));break;default:this.dispatchEvent(new CustomEvent(`fail`,{bubbles:!0,composed:!0,detail:e?.status}));break}}async handleEnroll(){try{this.loading=!0,z.trackEnrollmentFinalized(this.hasDeclareRepresentatives,this.businessReps);let e=await m.merchantController.finalizeEnrollment(!1);this.handleStatusResolve(e)}catch(e){v.showStandardErrorDialog({error:e}),this.loading=!1}}buildDisclamerMessageWithLinks(){let e={privacy_policy:`
2        <a target="_blank" class="link" href="https://moov.io/legal/privacy-policy/">Moov Privacy Policy</a>
3      `,platform_agreement:`
4        <a target="_blank" class="link" href="https://moov.io/legal/platform-agreement/">Platform Agreement</a>
5      `,acquirer_disclosure:`
6        <a target="_blank" class="link" href="https://moov.io/legal/platform-agreement/merchant-processing-services-terms/">
7          Acquirer Disclosure
8        </a>
9      `};return b(`By completing your enrollment, you agree to the terms of the moov_privacy_policy and platform_agreement. You also acknowledge the acquirer_disclosure.`.replace(`moov_privacy_policy`,e.privacy_policy).replace(`platform_agreement`,e.platform_agreement).replace(`acquirer_disclosure`,e.acquirer_disclosure))}maybeRenderBusinessReps(){if(!this.hasDeclareRepresentatives)return``;let e=!this.accountChecked||this.isInteractionDisabled;return a`<jha-list-item no-padding ?disabled="${e}"> <button class="reset" ?disabled="${e}" @click="${()=>this.maybehandleRowClick(f.BUSINESS_REPRESENTATIVES,this.accountChecked)}"> <div class="list"> ${this.declareRepresentativesChecked&&this.ownersProvided?a`<jh-icon-circle-checkmark-filled></jh-icon-circle-checkmark-filled>`:a`<jh-icon-circle></jh-icon-circle>`} <span>${`Add business representatives`}</span> </div> <jh-icon-chevron-right></jh-icon-chevron-right> </button> </jha-list-item>`}renderGeneralOrPending(){return this.generalInProgress?a`<div class="list"> <jh-icon-clock></jh-icon-clock> <span>${`Add general details`}</span> </div>`:a`<div class="list"> ${this.generalChecked?a`<jh-icon-circle-checkmark-filled></jh-icon-circle-checkmark-filled>`:a`<jh-icon-circle></jh-icon-circle>`} <span>${`Add general details`}</span> </div>`}handleErrorClick(e){this.dispatchEvent(new CustomEvent(`error-click`,{bubbles:!0,composed:!0,detail:e.detail}))}maybeRenderErrorsSection(){return!this.hasErrors||!this.errors?.length?``:a`<bannoweb-merchant-errors-section .hasErrors="${this.hasErrors}" .errors="${this.errors}" .isExtendedUnderwriting="${!1}" .businessReps="${this.businessReps}" @error-click="${this.handleErrorClick}"></bannoweb-merchant-errors-section>`}maybeRenderSectionTitle(){return this.errors?.length?``:a`<div class="section"> <h2>${`Complete your enrollment to start accepting card payments.`}</h2> </div>`}maybeRenderPricingRow(){if(this.hidePricingAgreement)return``;let e=this.pricingChecked?!1:!this.generalChecked||this.isInteractionDisabled;return a`<jha-list-item no-padding ?disabled="${e}"> <button class="reset" ?disabled="${e}" @click="${()=>this.maybehandleRowClick(f.PRICING_AGREEMENT,this.generalChecked||this.pricingChecked)}"> <div class="list"> ${this.pricingChecked?a`<jh-icon-circle-checkmark-filled></jh-icon-circle-checkmark-filled>`:a`<jh-icon-circle></jh-icon-circle>`} <span>${`Review pricing agreement`}</span> </div> <jh-icon-chevron-right></jh-icon-chevron-right> </button> </jha-list-item>`}maybeRenderDirectory(){if(this.errors?.length)return``;let e=this.isInteractionDisabled,t=this.hidePricingAgreement?this.generalChecked:this.pricingChecked,n=!t||this.isInteractionDisabled;return a`<jha-list> <jha-list-item no-padding ?disabled="${e}"> <button class="reset" ?disabled="${e}" @click="${()=>this.maybehandleRowClick(f.GENERAL_DETAILS,!0)}"> ${this.renderGeneralOrPending()} <jh-icon-chevron-right></jh-icon-chevron-right> </button> </jha-list-item> ${this.maybeRenderPricingRow()} <jha-list-item no-padding ?disabled="${n}"> <button class="reset" ?disabled="${n}" @click="${()=>this.maybehandleRowClick(f.SETTLEMENT_ACCOUNT,t)}"> <div class="list"> ${this.accountChecked?a`<jh-icon-circle-checkmark-filled></jh-icon-circle-checkmark-filled>`:a`<jh-icon-circle></jh-icon-circle>`} <span>${`Choose settlement account`}</span> </div> <jh-icon-chevron-right></jh-icon-chevron-right> </button> </jha-list-item> ${this.maybeRenderBusinessReps()} </jha-list>`}render(){return a`<div class="container"> <div class="section"> <img class="fi-icon" src="${this.fiIconSrc}" alt=""> + <bannoweb-moov-logo-icon color="${`var(--body-text-primary-color)`}" class="icon"></bannoweb-moov-logo-icon> </div> ${this.maybeRenderSectionTitle()} ${this.maybeRenderDirectory()} ${this.maybeRenderErrorsSection()} <jha-list-item></jha-list-item>  <div class="section disclaimer"><p>${this.buildDisclamerMessageWithLinks()}</p></div> <footer> <jha-button .isLoading="${this.loading}" @click="${this.handleEnroll}" sync ?disabled="${this.disabled}"> ${`Complete enrollment`} </jha-button>
9 </footer> </div>`}},customElements.define(window.BannowebMerchantAgreementDirectory.is,window.BannowebMerchantAgreementDirectory),window.BannowebMerchantAgreementDirectory,window.BannowebMerchantExtendedDirectory=class extends r{static get is(){return`bannoweb-merchant-extended-directory`}static get styles(){return[_,n`jh-icon-clock{margin-right:8px}jha-list-item{padding:14px var(--jha-content-inset);cursor:pointer;justify-content:space-between;align-items:center;display:flex}button.reset{cursor:pointer;justify-content:space-between;align-items:center;display:flex}button.reset:disabled{opacity:.5}.extended-detail{margin-left:20px}.list{flex:1;align-items:center;gap:8px;display:flex}jh-icon-circle-checkmark-filled,jh-icon-circle{color:var(--body-text-completed-color);fill:var(--body-text-completed-color);min-width:24px}jh-icon-circle{color:var(--body-text-theme-color);fill:var(--body-text-theme-color);min-width:24px}.container{flex-direction:column;gap:20px;padding-bottom:30px;display:flex}h2{color:var(--body-text-primary-color);text-align:center;font-size:20px;font-style:normal;font-weight:500}.fi-icon{border-radius:10px;justify-content:center;align-items:center;width:40px;height:40px;display:flex}.section{justify-content:center;align-items:center;gap:16px;padding:8px 24px 0;display:flex}.section:first-child{padding-top:24px}.disclaimer{color:var(--body-text-secondary-color);text-align:center;font-family:Roboto;font-size:12px;font-style:normal;font-weight:400}a{color:var(--body-text-theme-color)}.parent-list{align-items:center;line-height:24px;display:flex}.no-pointer{cursor:default!important}footer{justify-content:center;align-items:center;padding:0;display:flex}jha-button{padding:0px var(--jh-space-400);display:flex}jh-icon-clock{color:var(--body-text-theme-color);fill:var(--body-text-theme-color)}jh-icon-chevron-right{color:var(--body-text-secondary-color);fill:var(--body-text-secondary-color)}`]}static get properties(){return{generalChecked:{type:Boolean},pricingChecked:{type:Boolean},hidePricingAgreement:{type:Boolean},accountChecked:{type:Boolean},generalInProgress:{type:Boolean},declareRepresentativesChecked:{type:Boolean},transactionChecked:{type:Boolean},fulfillmentChecked:{type:Boolean},loading:{type:Boolean},hasDeclareRepresentatives:{type:Boolean},ownersProvided:{type:Boolean},showFulfillment:{type:Boolean},isMobile:{type:Boolean},hasErrors:{type:Boolean},errors:{type:Array},businessReps:{type:Array}}}constructor(){super(),e(()=>import(`./bannoweb-moov-logo-icon-BRWd1xyw.js`),[]),e(()=>import(`./icon-chevron-right-C-tNm2lU.js`).then(e=>e.t),[]),e(()=>import(`./icon-clock-CqkRngTE.js`),[]),e(()=>import(`./icon-circle-checkmark-filled-CpAiaMF3.js`),[]),e(()=>import(`./icon-circle-7nK96ot4.js`),[]),this.generalChecked=!1,this.generalInProgress=!1,this.pricingChecked=!1,this.hidePricingAgreement=!1,this.accountChecked=!1,this.transactionChecked=!1,this.fulfillmentChecked=!1,this.fiIconSrc=m.merchantController.getFiIcon(),this.loading=!1,this.hasDeclareRepresentatives=!1,this.ownersProvided=!1,this.declareRepresentativesChecked=!1,this.showFulfillment=!1,this.isMobile=!1,this.hasErrors=!1,this.errors=[],this.businessReps=[]}get disabled(){let e=!this.hasDeclareRepresentatives||this.ownersProvided;return!(re(this.hidePricingAgreement,this.pricingChecked)&&this.accountChecked&&this.generalChecked&&this.transactionChecked&&this.declareRepresentativesChecked&&this.fulfillmentChecked&&e)||this.hasErrors}maybeHandleRowClick(e,t){this.loading||this.hasErrors||t&&this.dispatchEvent(new CustomEvent(`tab-click`,{bubbles:!0,composed:!0,detail:e}))}handleNextFocusPane(e){switch(e){case d.ENROLLED:return f.COMPLETE;case d.INELIGIBLE:return f.UNSUPPORTED;default:return f.PENDING_REVIEW}}handleStatusResolve(e){switch(this.loading=!1,z.trackEnrollmentOutcomeReceived(e.status,this.businessReps),e.status){case d.ENROLLED:this.dispatchEvent(new CustomEvent(`enrollment-success`,{bubbles:!0,composed:!0,detail:{completedKey:f.NONE,nextFocusPane:this.handleNextFocusPane(e.status)}}));break;default:this.dispatchEvent(new CustomEvent(`fail`,{bubbles:!0,composed:!0,detail:e?.status}));break}}async handleCompleteEnrollment(){try{this.loading=!0,z.trackEnrollmentFinalized(this.hasDeclareRepresentatives,this.businessReps);let e=await m.merchantController.finalizeEnrollment(!0);this.handleStatusResolve(e)}catch(e){this.loading=!1,v.showStandardErrorDialog({error:e})}}buildDisclamerMessageWithLinks(){let e={privacy_policy:`
10        <a target="_blank" href="https://moov.io/legal/privacy-policy/">Moov Privacy Policy</a>
11      `,platform_agreement:`
12        <a target="_blank" href="https://moov.io/legal/platform-agreement/">Platform Agreement</a>
13      `,acquirer_disclosure:`
14        <a target="_blank" href="https://moov.io/legal/platform-agreement/merchant-processing-services-terms/">
15          Acquirer Disclosure
16        </a>
17      `};return b(`By completing your enrollment, you agree to the terms of the moov_privacy_policy and platform_agreement. You also acknowledge the acquirer_disclosure.`.replace(`moov_privacy_policy`,e.privacy_policy).replace(`platform_agreement`,e.platform_agreement).replace(`acquirer_disclosure`,e.acquirer_disclosure))}maybeRenderBusinessReps(){if(!this.hasDeclareRepresentatives)return``;let e=!this.accountChecked;return a`<jha-list-item no-padding ?disabled="${e}"> <button class="reset" ?disabled="${e}" @click="${()=>this.maybeHandleRowClick(f.BUSINESS_REPRESENTATIVES,this.accountChecked)}"> <div class="list"> ${this.declareRepresentativesChecked&&this.ownersProvided?a`<jh-icon-circle-checkmark-filled></jh-icon-circle-checkmark-filled>`:a`<jh-icon-circle></jh-icon-circle>`} <span>${`Add business representatives`}</span> </div> <jh-icon-chevron-right></jh-icon-chevron-right> </button> </jha-list-item>`}maybeRenderFulfillment(){if(!this.showFulfillment)return``;let e=!this.transactionChecked;return a`<jha-list-item class="extended-detail" ?disabled="${e}"> <button class="reset" ?disabled="${e}" @click="${()=>this.maybeHandleRowClick(f.EXT_FULFILLMENT_DETAILS,this.transactionChecked)}"> <div class="list"> ${this.fulfillmentChecked?a`<jh-icon-circle-checkmark-filled></jh-icon-circle-checkmark-filled>`:a`<jh-icon-circle></jh-icon-circle>`} <span>${`Add fulfillment details`}</span> </div> <jh-icon-chevron-right></jh-icon-chevron-right> </button> </jha-list-item>`}renderGeneralOrPending(){return this.generalInProgress?a`<div class="parent-list"> <jh-icon-clock></jh-icon-clock> <span>${`Add business details`}</span> </div>`:a`<div class="list"> ${this.generalChecked?a`<jh-icon-circle-checkmark-filled></jh-icon-circle-checkmark-filled>`:a`<jh-icon-circle></jh-icon-circle>`} <span>${`Add business details`}</span> </div>`}handleErrorClick(e){this.dispatchEvent(new CustomEvent(`error-click`,{composed:!0,detail:e.detail}))}maybeRenderErrorsSection(){return!this.hasErrors||!this.errors?.length?``:a`<bannoweb-merchant-errors-section .hasErrors="${this.hasErrors}" .errors="${this.errors}" .isExtendedUnderwriting="${!0}" .businessReps="${this.businessReps}" @error-click="${this.handleErrorClick}"></bannoweb-merchant-errors-section>`}maybeRenderSectionTitle(){return this.hasErrors?``:a`<div class="section"> <h2>${`Complete your enrollment to start accepting card payments.`}</h2> </div>`}maybeRenderPricingRow(){if(this.hidePricingAgreement)return``;let e=this.pricingChecked?!1:!this.transactionChecked;return a`<jha-list-item no-padding ?disabled="${e}"> <button class="reset" ?disabled="${e}" @click="${()=>this.maybeHandleRowClick(f.EXT_PRICING_AGREEMENT,this.transactionChecked||this.pricingChecked)}"> <div class="list"> ${this.pricingChecked?a`<jh-icon-circle-checkmark-filled></jh-icon-circle-checkmark-filled>`:a`<jh-icon-circle></jh-icon-circle>`} <span>${`Review pricing agreement`}</span> </div> <jh-icon-chevron-right></jh-icon-chevron-right> </button> </jha-list-item>`}maybeRenderDirectory(){if(this.hasErrors)return``;let e=this.loading,t=this.transactionChecked?!1:!this.generalChecked||this.loading,n=this.hidePricingAgreement?this.transactionChecked:this.pricingChecked,r=!n;return a`<jha-list> <jha-list-item class="no-pointer" no-padding> ${this.renderGeneralOrPending()} </jha-list-item> <jha-list-item class="extended-detail" ?disabled="${e}"> <button class="reset" ?disabled="${e}" @click="${()=>this.maybeHandleRowClick(f.EXT_GENERAL_DETAILS,!0)}"> <div class="list"> ${this.generalChecked?a`<jh-icon-circle-checkmark-filled></jh-icon-circle-checkmark-filled>`:a`<jh-icon-circle></jh-icon-circle>`} <span>${`Add general details`}</span> </div> <jh-icon-chevron-right></jh-icon-chevron-right> </button> </jha-list-item> <jha-list-item class="extended-detail" ?disabled="${t}"> <button class="reset" ?disabled="${t}" @click="${()=>this.maybeHandleRowClick(f.EXT_TRANSACTION_DETAILS,this.generalChecked)}"> <div class="list"> ${this.transactionChecked?a`<jh-icon-circle-checkmark-filled></jh-icon-circle-checkmark-filled>`:a`<jh-icon-circle></jh-icon-circle>`} <span>${`Add transaction details`}</span> </div> <jh-icon-chevron-right></jh-icon-chevron-right> </button> </jha-list-item> ${this.maybeRenderFulfillment()} ${this.maybeRenderPricingRow()} <jha-list-item no-padding ?disabled="${r}"> <button class="reset" ?disabled="${r}" @click="${()=>this.maybeHandleRowClick(f.EXT_SETTLEMENT_ACCOUNT,n)}"> <div class="list"> ${this.accountChecked?a`<jh-icon-circle-checkmark-filled></jh-icon-circle-checkmark-filled>`:a`<jh-icon-circle></jh-icon-circle>`} <span>${`Choose settlement account`}</span> </div> <jh-icon-chevron-right></jh-icon-chevron-right> </button> </jha-list-item> ${this.maybeRenderBusinessReps()} <jha-list-item></jha-list-item>
17 </jha-list>`}render(){return a`<div class="container"> <div class="section"> <img class="fi-icon" src="${this.fiIconSrc}" alt=""> + <bannoweb-moov-logo-icon color="${`var(--body-text-primary-color)`}" class="icon"></bannoweb-moov-logo-icon> </div> ${this.maybeRenderSectionTitle()} ${this.maybeRenderDirectory()} ${this.maybeRenderErrorsSection()} <div class="section disclaimer"><p>${this.buildDisclamerMessageWithLinks()}</p></div> <footer> <jha-button @click="${this.handleCompleteEnrollment}" .isLoading="${this.loading}" sync ?disabled="${this.disabled}"> ${`Complete enrollment`} </jha-button> </footer> </div>`}},customElements.define(window.BannowebMerchantExtendedDirectory.is,window.BannowebMerchantExtendedDirectory),window.BannowebMerchantExtendedDirectory,window.BannowebMerchantEnrollmentGeneralRequirements=class extends r{static get is(){return`bannoweb-merchant-enrollment-general-requirements`}static get styles(){return[_,n`jha-select{box-sizing:content-box;--jha-select-text:var(--body-text-primary-color);margin-top:7px}form{padding:24px}jha-form-floating-group{flex-direction:column;gap:24px;margin-bottom:8px;display:flex}.search-list{z-index:2;border-radius:var(--card-corner-radius);background-color:var(--primary-content-background-color);width:100%;max-height:400px;position:absolute;top:70px;overflow:scroll;box-shadow:0 2px 6px #0003}jha-list-item{cursor:pointer;padding:24px}section{margin-top:24px}.label{font-size:14px;font-style:normal;font-weight:500}.label-title{color:var(--body-text-primary-color);padding:12px 0}.reset{cursor:pointer;position:absolute;top:20px;right:10px}.error{color:var(--body-text-alert-color)}.website{color:var(--body-text-secondary-color);font-size:12px;font-style:normal;font-weight:400}footer{justify-content:center;align-items:center;padding:12px;display:flex}`]}constructor(){e(()=>import(`./icon-magnifying-glass-WPl4LQI3.js`).then(e=>e.t),[]),super(),this.handleChange=this.handleChange.bind(this),this.industries=[],this.searchedIndustries=[],this.industry=``,this.businessType=``,this.description=``,this.website=``,this.monthlyVolume=``,this.geo=``,this.email=``,this.loading=!1,this.descriptionError=!1,this.websiteError=!1,this.emailError=!1,this.industryError=!1}connectedCallback(){super.connectedCallback()}static get properties(){return{industry:{type:String},industries:{type:Array},businessType:{type:String},email:{type:String},description:{type:String},website:{type:String},monthlyVolume:{type:String},geo:{type:String},allIndustries:{type:Array},searchedIndustries:{type:Array},loading:{type:Boolean},websiteError:{type:Boolean},emailError:{type:Boolean},industryError:{type:Boolean}}}handleChange(e,t){switch(t){case`industry`:this.industry=e.detail.value;break;case`businessType`:this.businessType=e.detail.value;break;case`monthlyVolume`:this.monthlyVolume=e.detail.value;break;case`geo`:this.geo=e.detail.value;break}}getValue(e){switch(e){case`industry`:return this.industry;case`businessType`:return this.businessType;case`description`:return this.description;case`website`:return this.website;case`monthlyVolume`:return this.monthlyVolume;case`geo`:return this.geo;case`email`:return this.email;default:return``}}industyToId(e){return e.replace(` `,`-`).toLowerCase()}async handleContinue(){this.loading=!0;let e={industryId:this.industries.find(e=>e.name===this.industry)?.id??this.industyToId(this.industry),description:this.description,website:this.website,monthlyVolumeRange:D[this.monthlyVolume],geographicReach:S[this.geo],email:this.email,businessType:I[this.businessType]};try{let t=await m.merchantController.addGeneralDetails(e);if(this.loading=!1,z.trackBusinessDetailsSubmitted({industry:this.industry,monthlyVolumeRange:e.monthlyVolumeRange,isExtended:!!t?.transactionAndCardDetails,businessType:e.businessType}),t?.transactionAndCardDetails){this.dispatchEvent(new CustomEvent(`extended-enrollment`,{bubbles:!0,composed:!0,detail:{completedKey:f.EXT_GENERAL_DETAILS,nextFocusPane:f.EXT_TRANSACTION_DETAILS,transactionCardAndDetails:t?.transactionAndCardDetails,fulfillmentDetails:t?.fulfillmentDetails}}));return}this.dispatchEvent(new CustomEvent(`success`,{bubbles:!0,composed:!0,detail:{...e,completedKey:f.GENERAL_DETAILS,nextFocusPane:f.PRICING_AGREEMENT}})),this.loading=!1}catch(e){this.loading=!1,await v.showStandardErrorDialog({error:e,confirmButtonText:`Retry`,cancelButtonText:`Cancel`}).then(()=>{this.handleContinue()})}}handleSearchClick(){this.dispatchEvent(new CustomEvent(`search-click`,{bubbles:!0,composed:!0}))}handleIndustrySearch(e){let t=e?.target?.value;if(this.industry=t||``,!t){this.searchedIndustries=[],this.industryError=!1;return}let n=this.industries.filter(e=>e.name.toLowerCase().indexOf(t.toLowerCase())!==-1);this.searchedIndustries=n,this.industryError=t.length>0&&!this.isValidIndustry(t)}renderIndustryAutoComplete(){return a`${this.renderError(`industry`)} <jha-form-floating-group outline small .hasValue="${!!this.industry}"> <div class="label">${`Primary industry`}</div> <input class="industry" .value="${this.industry}
17" name="industry" @input="${e=>this.handleIndustrySearch(e)}" @blur="${e=>this.handleIndustrySearch(e)}"> <jha-button @click="${this.handleSearchClick}" class="reset" sync icon> <jh-icon-magnifying-glass></jh-icon-magnifying-glass> </jha-button> ${this.maybeRenderSearchedIndustries(this.searchedIndustries)} </jha-form-floating-group>`}getIndustryNameById(e){return this.industries.find(t=>t.id===e).name}isValidIndustry(e){return e?this.industries.some(t=>t.name.toLowerCase()===e.toLowerCase()):!1}handleSelectIndustry(e){this.industry=e.name,this.industryError=!1,this.searchedIndustries=[]}maybeRenderWebsiteSubText(){return this.websiteError?``:a`<span class="website">${`If you don’t have a website, provide a link to your social media profile.`}</span>`}renderError(e){switch(e){case`description`:if(this.descriptionError)return a`<span class="error">${`Description must be at least 10 characters and under 100 in length`}</span>`;break;case`website`:if(this.websiteError)return a`<span class="error">${`Please enter a valid url`}</span>`;break;case`email`:if(this.emailError)return a`<span class="error">${`Please provide a valid email address.`}</span>`;break;case`industry`:if(this.industryError)return a`<span class="error">${`Please select an industry from the list`}</span>`;break;default:return``}}isValidDescriptionLength(e){return!!e&&e.length>=10&&e.length<=100}validateInput(e){let{name:t,value:n}=e.target,r=e.type===`blur`;switch(t){case`description`:this.description=n,this.descriptionError=(r||n.length>0)&&!this.isValidDescriptionLength(n);break;case`website`:this.website=n,this.websiteError=n.length>0&&!R(n);break;case`email`:this.email=n,this.emailError=n.length>0&&!T(n);break;default:break}}maybeRenderSearchedIndustries(e){return e?.length?a`<jha-list borderless class="search-list"> ${this.searchedIndustries?.map(e=>a`<jha-list-item @click="${()=>this.handleSelectIndustry(e)}" value="${e.id}"> ${e.name} </jha-list-item>`)} </jha-list>`:``}renderBusinessType(){let e=Object.keys(I);return a`<jha-form-floating-group outline small .hasValue="${!!this.businessType}"> <div class="label">${`Business type`}</div> <jha-select .emptyOptionLabel="${` `}" id="business_type" .options="${N(e)}" @selected-value-changed="${e=>this.handleChange(e,`businessType`)}" .selectedValue="${this.getValue(`businessType`)}"></jha-select> </jha-form-floating-group>`}renderDescription(){return a`<jha-form-floating-group outline small .hasValue="${!!this.description}"> <div class="label">${`Business description`}</div> <input @input="${this.validateInput}" @blur="${this.validateInput}" .value="${this.getValue(`description`)}" name="description"> </jha-form-floating-group> ${this.renderError(`description`)}`}renderWebsite(){return a`<jha-form-floating-group outline small .hasValue="${!!this.website}"> <div class="label">${`Business website`} (${`optional`})</div> <input @input="${this.validateInput}" @blur="${this.validateInput}" .value="${this.getValue(`website`)}" name="website"> </jha-form-floating-group> ${this.renderError(`website`)} ${this.maybeRenderWebsiteSubText()}`}renderEmail(){return a`<jha-form-floating-group outline small .hasValue="${!!this.email}"> <div class="label">${`Business email`}</div> <input @input="${this.validateInput}" .value="${this.getValue(`email`)}" name="email"> </jha-form-floating-group> ${this.renderError(`email`)}`}renderMonthlyVolume(){let e=Object.keys(D);return a`<div class="label label-title">${`What is your estimated monthly sales?`}</div> <jha-form-floating-group outline small .hasValue="${!!this.monthlyVolume}"> <div class="label">${`Monthly Volume`}</div> <jha-select .emptyOptionLabel="${` `}" id="${`monthlyVolume`}" .options="${N(e)}" @selected-value-changed="${e=>this.handleChange(e,`monthlyVolume`)}" .selectedValue="${this.getValue(`monthlyVolume`)}"></jha-select> </jha-form-floating-group>`}renderCustomerLocation(){let e=Object.keys(S);return a`<div class="label label-title">${`Where are your customers located?`}</div> <jha-form-floating-group outline small .hasValue="${!!this.geo}"> <div class="label">${`Geographic reach`}</div> <jha-select .emptyOptionLabel="${` `}" ?empty="${!0}" id="${`geo`}" .options="${N(e)}" @selected-value-changed="${e=>this.handleChange(e,`geo`)}" .selectedValue="${this.getValue(`geo`)}"></jha-select> </jha-form-floating-group>`}get disabled(){return!(this.industry&&this.isValidIndustry(this.industry)&&this.businessType&&this.isValidDescriptionLength(this.description)&&(!this.website||R(this.website))&&this.monthlyVolume&&this.geo&&this.email&&T(this.email))}render(){return a`<div> <form> <div class="label label-title">${`Confirm details about your business`}</div> ${this.renderIndustryAutoComplete()} ${this.renderBusinessType()} ${this.renderEmail()} ${this.renderDescription()} ${this.renderWebsite()} <section>${this.renderMonthlyVolume()} ${this.renderCustomerLocation()}</section> <footer> <jha-button .isLoading="${this.loading}" .disabled="${this.disabled}" sync @click="${this.handleContinue}"> ${`Continue`} </jha-button>
17 </footer> </form> </div>`}},customElements.define(window.BannowebMerchantEnrollmentGeneralRequirements.is,window.BannowebMerchantEnrollmentGeneralRequirements),window.BannowebMerchantEnrollmentGeneralRequirements,window.BannowebMerchantTransactionDetails=class extends r{static get is(){return`bannoweb-merchant-transaction-details`}static get styles(){return n`.input{justify-content:column;align-items:center;display:flex}jha-form-floating-group span{flex:.9}.input>input,span{flex:.2}jha-select{box-sizing:content-box;--jha-select-text:var(--body-text-primary-color);margin-top:4px}.select-label{z-index:2;font-size:14px;font-style:normal;font-weight:500}.title{padding:24px 0}.container{padding:24px}.label{font-size:16px;font-style:normal;font-weight:500}footer{padding:5px 120px}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.dollar:after{content:"$";color:var(--body-text-secondary-color);position:absolute;top:25px;right:110px}.dollar{position:relative}.dollar>input{padding-left:30px}.percent:after{content:"%";color:var(--body-text-secondary-color);text-align:end;position:absolute;top:25px;right:14px}.percent{position:relative}.percent>input{text-align:end;padding-right:30px}`}static get properties(){return{litigationStatus:{type:String},businessPresence:{type:String},averageTransactionSize:{type:String},maximumTransactionSize:{type:String},cardAcceptance:{type:String},inPersonPercentage:{type:String},onlinePercentage:{type:String},businessPercentage:{type:String},consumers:{type:String},loading:{type:Boolean},transactionAndCardDetails:{type:Object},generalDetails:{type:Object}}}constructor(){super(),this.litigationStatus=``,this.cardAcceptance=``,this.averageTransactionSize=`0`,this.maximumTransactionSize=`0`,this.inPersonPercentage=`0`,this.onlinePercentage=`0`,this.consumerPercentage=`0`,this.businessPercentage=`0`,this.businessPresence=``,this.loading=!1,this.transactionAndCardDetails=void 0,this.generalDetails=null}updated(e){e.has(`transactionAndCardDetails`)&&this.transactionAndCardDetails&&(this.litigationStatus=ae[this.transactionAndCardDetails.litigationStatus],this.cardAcceptance=ue[this.transactionAndCardDetails.acceptsCards],this.averageTransactionSize=this.transactionAndCardDetails.averageTransactionSize??`0`,this.maximumTransactionSize=this.transactionAndCardDetails.maximumTransactionSize??`0`,this.inPersonPercentage=this.transactionAndCardDetails.inPersonPercentage??`0`,this.onlinePercentage=this.transactionAndCardDetails.onlinePercentage??`0`,this.consumerPercentage=this.transactionAndCardDetails.consumerTransactionPercentage??`0`,this.businessPercentage=this.transactionAndCardDetails.businessTransactionPercentage??`0`,this.businessPresence=fe[this.transactionAndCardDetails.businessPresence])}handleChange(e){let t=e.currentTarget??e.target,n=e.detail?.value??t.value;switch(t.name??t.id){case`litigationStatus`:this.litigationStatus=n;break;case`cardAcceptance`:this.cardAcceptance=n;break;case`averageTransactionSize`:this.averageTransactionSize=this.clampPositive(n),this.averageTransactionSize!==n&&(t.value=this.averageTransactionSize);break;case`maximumTransactionSize`:this.maximumTransactionSize=this.clampPositive(n),this.maximumTransactionSize!==n&&(t.value=this.maximumTransactionSize);break;case`inPersonPercentage`:this.inPersonPercentage=this.clampPercentage(n),t.value=this.inPersonPercentage,this.autofillPercentage(this.inPersonPercentage,`onlinePercentage`);break;case`onlinePercentage`:this.onlinePercentage=this.clampPercentage(n),t.value=this.onlinePercentage,this.autofillPercentage(this.onlinePercentage,`inPersonPercentage`);break;case`consumers`:this.consumerPercentage=this.clampPercentage(n),t.value=this.consumerPercentage,this.autofillPercentage(this.consumerPercentage,`businessPercentage`);break;case`businessPercentage`:this.businessPercentage=this.clampPercentage(n),t.value=this.businessPercentage,this.autofillPercentage(this.businessPercentage,`consumerPercentage`);break;case`businessPresence`:this.businessPresence=n;break;default:break}}toFloat(e){return parseFloat(e).toFixed(2).toString()}clampPositive(e){let t=Number(e);return e===``||isNaN(t)?``:t<0?`0`:e}clampPercentage(e){let t=Number(e);return e===``||isNaN(t)?``:String(Math.max(0,Math.min(100,t)))}handleBlur(e){let t=e.currentTarget??e.target;switch(t.name??t.id){case`averageTransactionSize`:this.averageTransactionSize||(this.averageTransactionSize=`0`,t.value=`0`);break;case`maximumTransactionSize`:this.maximumTransactionSize||(this.maximumTransactionSize=`0`,t.value=`0`);break;case`inPersonPercentage`:this.inPersonPercentage||(this.inPersonPercentage=`0`,t.value=`0`);break;case`onlinePercentage`:this.onlinePercentage||(this.onlinePercentage=`0`,t.value=`0`);break;case`consumers`:this.consumerPercentage||(this.consumerPercentage=`0`,t.value=`0`);break;case`businessPercentage`:this.businessPercentage||(this.businessPercentage=`0`,t.value=`0`);break}}autofillPercentage(e,t){if(e===``||isNaN(Number(e)))return;let n=Math.max(0,Math.min(100,Number(e))),r=this.clampPositive(String(100-n));switch(t){case`businessPercentage`:this.businessPercentage=r;break;case`consumerPercentage`:this.consumerPercentage=r;break;case`inPersonPercentage`:this.inPersonPercentage=r;break;case`onlinePercentage`:this.onlinePercentage=r;break}}async handleContinue(){try{this.loading=!0;let e={businessPresence:O[this.businessPresence],averageTransactionSize:this.toFloat
17(this.averageTransactionSize),maximumTransactionSize:this.toFloat(this.maximumTransactionSize),businessTransactionPercentage:Number(this.businessPercentage),consumerTransactionPercentage:Number(this.consumerPercentage),acceptsCards:A[this.cardAcceptance],inPersonPercentage:Number(this.inPersonPercentage),onlinePercentage:Number(this.onlinePercentage),litigationStatus:E[this.litigationStatus]},t=!!(await m.merchantController.addTransactionDetails(e))?.fulfillmentDetails;z.trackTransactionDetailsSubmitted({businessPresence:e.businessPresence,litigationStatus:e.litigationStatus,isForeignReach:se(this.generalDetails?.geographicReach)}),this.dispatchEvent(new CustomEvent(`success`,{bubbles:!0,composed:!0,detail:{completedKey:f.EXT_TRANSACTION_DETAILS,nextFocusPane:t?f.EXT_FULFILLMENT_DETAILS:f.EXTENDED_DIRECTORY,fulfillmentDetails:t}})),this.loading=!1}catch(e){this.loading=!1,v.showStandardErrorDialog({error:e})}}get disabled(){let e=Number(this.businessPercentage||0)+Number(this.consumerPercentage||0),t=Number(this.inPersonPercentage||0)+Number(this.onlinePercentage||0);return!(this.litigationStatus&&this.cardAcceptance&&this.averageTransactionSize&&this.maximumTransactionSize&&this.inPersonPercentage&&this.onlinePercentage&&this.consumerPercentage&&this.businessPercentage&&this.businessPresence&&e===100&&t===100)}renderLitigationDropdown(){let e=Object.keys(E);return a`<div class="label title">${`Is your business subject to any pending or ongoing litigation?`}</div> <jha-form-floating-group outline small .hasValue="${!!this.litigationStatus}"> <label class="label select-label">${`Litigation status`}</label> <jha-select .emptyOptionLabel="${`Select`}" ?empty="${!this.litigationStatus}" id="litigationStatus" .options="${N(e)}" @selected-value-changed="${e=>this.handleChange(e)}" .selectedValue="${this.litigationStatus}"></jha-select> </jha-form-floating-group>`}renderBusinessPresenceDropdown(){let e=Object.keys(O);return a`<div class="label title">${`How do you primarily operate your business?`}</div> <jha-form-floating-group outline small .hasValue="${!!this.businessPresence}"> <label class="label select-label">${`Business presence`}</label> <jha-select .emptyOptionLabel="${`Select`}" id="businessPresence" .options="${N(e)}" @selected-value-changed="${e=>this.handleChange(e)}" .selectedValue="${this.businessPresence}"></jha-select> </jha-form-floating-group>`}renderCardAcceptance(){let e=Object.keys(A);return a`<div class="label title">${`Do you currently accept card payments?`}</div> <jha-form-floating-group outline small .hasValue="${!!this.cardAcceptance}"> <label class="label select-label">${`Card payments`}</label> <jha-select .emptyOptionLabel="${`Select`}" ?empty="${!this.cardAcceptance}" id="cardAcceptance" .options="${N(e)}" @selected-value-changed="${e=>this.handleChange(e)}" .selectedValue="${this.cardAcceptance}"></jha-select> </jha-form-floating-group>`}render(){return a`<div class="container"> <div class="title">${`We need a few more details on your business.`}</div> <form> ${this.renderBusinessPresenceDropdown()} <div class="label title">${`Tell us about your business’s transactions.`}</div> <jha-form-floating-group class="input dollar" outline small> <span>${`Average transaction size`}</span> <input type="number" min="0" name="averageTransactionSize" .value="${this.averageTransactionSize}" @input="${this.handleChange}" @blur="${this.handleBlur}"> </jha-form-floating-group> <jha-form-floating-group class="input dollar" outline small> <span>${`Maximum transaction size`}</span> <input type="number" min="0" name="maximumTransactionSize" .value="${this.maximumTransactionSize}" @input="${this.handleChange}" @blur="${this.handleBlur}"> </jha-form-floating-group> <div class="label title">${`Estimate the breakdown of your customer sales, totaling 100%.`}</div> <jha-form-floating-group class="input percent" outline small> <span>${`Businesses`}</span> <input type="number" min="0" max="100" name="businessPercentage" .value="${this.businessPercentage}" @input="${this.handleChange}" @blur="${this.handleBlur}"> </jha-form-floating-group> <jha-form-floating-group class="input percent" outline small> <span>${`Consumers`}</span> <input type="number" min="0" max="100" name="consumers" .value="${this.consumerPercentage}
17" @input="${this.handleChange}" @blur="${this.handleBlur}"> </jha-form-floating-group> ${this.renderCardAcceptance()} <div class="label title">${`How will customers pay you? (Your best estimate, totaling 100%)`}</div> <jha-form-floating-group class="input percent" outline small> <span>${`In person (Tap to Pay)`}</span> <input type="number" min="0" max="100" name="inPersonPercentage" .value="${this.inPersonPercentage}" @input="${this.handleChange}" @blur="${this.handleBlur}"> </jha-form-floating-group> <jha-form-floating-group class="input percent" outline small> <span>${`Online (Invoices, payment links)`}</span> <input type="number" min="0" max="100" name="onlinePercentage" .value="${this.onlinePercentage}" @input="${this.handleChange}" @blur="${this.handleBlur}"> </jha-form-floating-group> ${this.renderLitigationDropdown()} </form> <footer> <jha-button .isLoading="${this.loading}" ?disabled="${this.disabled}" @click="${this.handleContinue}" sync block> ${`Continue`} </jha-button> </footer> </div>`}},customElements.define(window.BannowebMerchantTransactionDetails.is,window.BannowebMerchantTransactionDetails),window.BannowebMerchantTransactionDetails,window.BannowebMerchantIndustryList=class extends r{static get is(){return`bannoweb-merchant-industry-list`}static get styles(){return[_,n`.container{padding:24px}.reset{cursor:pointer;justify-content:space-between;display:flex!important}.search-list{border-radius:var(--card-corner-radius);width:100%;top:70px}jha-list-item{cursor:pointer;padding:24px}`]}constructor(){e(()=>import(`./icon-chevron-right-small-BraCudZ4.js`).then(e=>e.t),[]),e(()=>import(`./icon-checkmark-Apyd0pTN.js`).then(e=>e.t),[]),super(),this.data=[],this.searched=[],this.industry=``,this.dataKey=``,this.showInput=!1,this.showClickArrow=!1,this.industries=[],this.inputName=``,this.selected=``}static get properties(){return{inputName:{type:String},selected:{type:String},data:{type:Array},searched:{type:Array},dataKey:{type:String},showInput:{type:Boolean},showClickArrow:{type:Boolean},industry:{type:String},industries:{type:Array}}}handleSearch(e){let t=e.target?.value?.toLowerCase?.()??``;if(!t){this.dataKey===`groupName`&&(this.showClickArrow=!0),this.searched=[];return}this.showClickArrow=!1;let n=this.industries?.length?this.industries:this.data;this.searched=n?.filter(e=>e?.name?.toLowerCase?.().indexOf(t)!==-1)}handleSelect(e){this.selected=e,this.inputName=``,this.industry=``,this.dispatchEvent(new CustomEvent(`select`,{composed:!0,bubbles:!0,detail:e}))}maybeRenderChevron(e){return this.showClickArrow?a`<jh-icon-chevron-right-small></jh-icon-chevron-right-small>`:e===this.selected?.name||e===this.selected.groupName?a`<jh-icon-checkmark></jh-icon-checkmark>`:``}maybeRenderSearchedGroups(e){return a`<jha-list class="search-list"> ${(e?.length?e:this.data)?.map(e=>a`<jha-list-item> <button class="reset" @click="${()=>this.handleSelect(e)}"> <div>${e?.[this.dataKey]??e.name}</div> ${this.maybeRenderChevron(e?.[this.dataKey]??e.name)} </button> </jha-list-item>`)} </jha-list>`}renderLabel(){return`Search ${this.inputName??`industries`}`}maybeRenderInput(){return this.showInput?a`<div class="label">${this.renderLabel()}</div> <input .value="${this.industry}" name="groupName" @input="${e=>this.handleSearch(e)}">`:``}render(){return a`<div class="container"> <jha-form-floating-group outline small> ${this.maybeRenderInput()} ${this.maybeRenderSearchedGroups(this.searched)} </jha-form-floating-group> </div>`}},customElements.define(window.BannowebMerchantIndustryList.is,window.BannowebMerchantIndustryList),window.BannowebMerchantFulfillmentDetails=class extends r{static get is(){return`bannoweb-merchant-fulfillment-details`}static get styles(){return n`.container{flex-direction:column;gap:16px;padding:24px;display:flex}.label{top:14px}`}static get properties(){return{fulfillmentMethod:String,fulfillmentTimeframe:String,refundPolicy:String,loading:Boolean,fulfillmentDetails:Object}}constructor(){super(),this.fulfillmentMethod=``,this.fulfillmentTimeframe=``,this.refundPolicy=``,this.loading=!1,this.fulfillmentDetails=null}updated(e){e.has(`fulfillmentDetails`)&&this.fulfillmentDetails&&this.populateFromFulfillmentDetails()}getKeyByValue(e,t){return Object.keys(e).find(n=>e[n]===t)||``}populateFromFulfillmentDetails(){this.fulfillmentDetails&&(this.fulfillmentDetails.fulfillmentMethod&&(this.fulfillmentMethod=this.getKeyByValue(k,this.fulfillmentDetails.fulfillmentMethod)),this.fulfillmentDetails.fulfillmentTimeline&&(this.fulfillmentTimeframe=this.getKeyByValue(L,this.fulfillmentDetails.fulfillmentTimeline)),this.fulfillmentDetails.refundPolicy&&(this.refundPolicy=this.getKeyByValue(C,this.fulfillmentDetails.refundPolicy)))}handleChange(e,t){let n=e.detail.value;switch(t){case`fulfillmentMethod`:this.fulfillmentMethod=n;break;case`fulfillmentTimeframe`:this.fulfillmentTimeframe=n;break;case`refundPolicy`:this.refundPolicy=n;break}}async handleContinue(e){try{this.loading=!0;let e={fulfillmentMethod:k[this.fulfillmentMethod],fulfillmentTimeline:L[this.fulfillmentTimeframe],refundPolicy:C[this.refundPolicy]};await m.merchantController.addFulfillmentDetails(e),z.trackFulfillmentDetailsSubmitted({fulfillmentMethod:e.fulfillmentMethod,refundPolicy:e.refundPolicy}),this.dispatchEvent(new CustomEvent(`success`,{bubbles:!0,composed:!0,detail:{completedKey:f.EXT_FULFILLMENT_DETAILS,nextFocusPane:f.EXT_PRICING_AGREEMENT}})),this.loading=!1}catch(e){this.loading=!1,v.showStandardErrorDialog({error:e})}}get disabled(){return!(this.fulfillmentMethod&&this.fulfillmentTimeframe&&this.refundPolicy)}renderFulfillmentMethod(){let e=Object.keys(k);return a`<div class="label title">${`How do you fulfill your orders or services?`}</div> <jha-form-floating-group outline small .hasValue="${!!this.fulfillmentMethod}"> <div class="label select-label">${`Fulfillment method`}</div> <jha-select .emptyOptionLabel="${` `}" id="fullfillment-method" .options="${N(e)}" @selected-value-changed="${e=>this.handleChange(e,`fulfillmentMethod`)}" .selectedValue="${this.fulfillmentMethod}"></jha-select> </jha-form-floating-group>`}renderTimeframe(){let e=Object.keys(L);return a`<div class="label title">${`What is the typical timeframe between payment and fulfillment?`}</div> <jha-form-floating-group outline small .hasValue="${!!this.fulfillmentTimeframe}"> <div class="label select-label">${`Fulfillment timeframe`}</div> <jha-select .emptyOptionLabel="${` `}" id="fullfillment-timeframe" .options="${N(e)}" @selected-value-changed="${e=>this.handleChange(e,`fulfillmentTimeframe`)}" .selectedValue="${this.fulfillmentTimeframe}"></jha-select> </jha-form-floating-group>`}renderRefundPolicy(){let e=Object.keys(C);return a`<div class="label title">${`What best describes your refund or cancellation policy?`}</div> <jha-form-floating-group outline small .hasValue="${!!this.refundPolicy}"> <div class="label select-label">${`Refund policy`}</div> <jha-select .emptyOptionLabel="${` `}" id="refund-policy" .options="${N(e)}" @selected-value-changed="${e=>this.handleChange(e,`refundPolicy`)}" .selectedValue="${this.refundPolicy}"></jha-select> </jha-form-floating-group>`}render(){return a`<div class="container"> <div class="title">${`Almost done! We need a few more details on your business operations.`}</div> ${this.renderFulfillmentMethod()} ${this.renderTimeframe()} ${this.renderRefundPolicy()} <footer> <jha-button .isLoading="${this.loading}" ?disabled="${this.disabled}" @click="${this.handleContinue}" block sync> ${`Continue`} </jha-button>
17 </footer> </div>`}},customElements.define(window.BannowebMerchantFulfillmentDetails.is,window.BannowebMerchantFulfillmentDetails),window.BannowebMerchantBusinessRepresentatives=class extends r{static get is(){return`bannoweb-merchant-business-representatives`}static get styles(){return n`.container{padding:24px}jha-list-item{justify-content:space-between;align-items:center;display:flex}.label{color:var(--body-text-secondary-color);margin-top:24px;margin-bottom:12px;font-size:14px;font-style:normal;font-weight:500}.details{color:var(--body-text-secondary-color);font-size:12px;font-style:normal;font-weight:400}.column{flex-direction:column;display:flex}.icon-color{color:var(--link-button-text-color);fill:var(--link-button-text-color);align-items:center}.checkbox{align-items:center;display:flex}.error{color:var(--body-text-alert-color);font-size:14px;font-style:normal;font-weight:400}p{color:var(--body-text-primary-color);font-family:Roboto;font-size:12px;font-style:normal;font-weight:400}footer{justify-content:center;padding:8px;display:flex}`}constructor(){super(),e(()=>import(`./icon-plus-CGq-1aop.js`).then(e=>e.t),[]),this.checked=!1,this.representatives=[],this.isExtended=!1,this.loading=!1}static get properties(){return{checked:{type:Boolean},representatives:{type:Array},isExtended:{type:Boolean},loading:{type:Boolean}}}handleOnCheck(e){this.checked=e.detail.value}get disabled(){let e=this.representatives.some(e=>e.isControlOfficer===!0);return!(this.checked&&this.representatives.length&&e)}renderAuthorized(e){return`Authorized representative, ${`${e?.percentOwner??e?.ownershipPercentage}% ownership`}`}maybeRenderRepresentativeDetails(e){let t=e?.isControlOfficer,n=e?.percentOwner??e?.ownershipPercentage,r=!!n;return t&&r?`Controller & owner, ${`${n}% ownership`}`:t?`Controller`:r?`Owner, ${`${n}% ownership`}`:``}renderDetails(e){return a`<div class="column"> <span>${e.firstName} ${e.lastName}</span> <span class="details">${this.maybeRenderRepresentativeDetails(e)}</span> </div>`}handleClick(e){this.dispatchEvent(new CustomEvent(`success`,{bubbles:!0,composed:!0,detail:{completedKey:f.NONE,nextFocusPane:f.BUSINESS_REPRESENTATIVE_FORM}}))}async handleSubmitRepresentative(e){try{this.loading=!0;let e=await m.merchantController.certifyRepresentatives();z.trackRepresentativesCertified(e.declareRepresentatives.representatives,this.isExtended),this.loading=!1,this.dispatchEvent(new CustomEvent(`success`,{bubbles:!0,composed:!0,detail:{completedKey:f.BUSINESS_REPRESENTATIVES,nextFocusPane:this.isExtended?f.EXTENDED_DIRECTORY:f.AGREEMENT_DIRECTORY,representatives:e.declareRepresentatives.representatives,ownersProvided:e.declareRepresentatives.ownersProvided}}))}catch(e){this.loading=!1,v.showStandardErrorDialog({error:e})}}handleEdit(e){this.dispatchEvent(new CustomEvent(`edit`,{composed:!0,bubbles:!0,detail:{completedKey:f.NONE,nextFocusPane:f.BUSINESS_REPRESENTATIVE_FORM,edit:e}}))}maybeRenderNoControllerError(){return w(this.representatives)?``:a`<span class="error">${`Please assign a controller to continue. Edit an existing representative to add the controller role, or add someone new.`}</span>`}render(){return a`<div class="container"> <div class="head">${`To comply with financial regulations, we must collect:`}</div> <ul> <li>${`Any owners with 25% or greater ownership`}</li> <li>${`One controller (someone with significant management authority)`}</li> </ul> <div>${`When the controller is also an owner, add them once with both roles assigned.`}</div> <div class="label">${`Business representatives`}</div> ${this.maybeRenderNoControllerError()} <jha-list no-padding> ${this.representatives?.map(e=>a`<jha-list-item> ${this.renderDetails(e)} <div> <jha-link-button @click="${()=>this.handleEdit(e)}" link> ${`Edit`} </jha-link-button> </div> </jha-list-item>`)} <jha-link-button @click="${this.handleClick}" link> + ${`Add a representative`} </jha-link-button> </jha-list> <div class="checkbox"> <jha-form-checkbox @checked-changed="${this.handleOnCheck}"></jha-form-checkbox> <p>${`I certify I’ve listed all owners with 25% or greater stake in my company, and one controller with significant management authority.`}</p> </div> <footer> <jha-button .isLoading="${this.loading}" @click="${this.handleSubmitRepresentative}" .disabled="${this.disabled}" sync> ${`Submit representatives`} </jha-button>
17 </footer> </div>`}},customElements.define(window.BannowebMerchantBusinessRepresentatives.is,window.BannowebMerchantBusinessRepresentatives),window.BannowebMerchantBusinessRepresentatives;var W=[`firstName`,`lastName`,`ssnOrItin`,`dob`,`email`,`phone`],_e=[`firstName`,`lastName`,`ssnOrItin`,`dob`,`email`,`phone`,`addressLine1`,`city`,`state`,`zip`,`jobTitle`],G={phone:10,ssnOrItin:11,dob:10,zip:5},K={firstName:{validate:(e,t)=>t?!e||e.trim()===``:!1,errorMsg:`Enter first name`},lastName:{validate:(e,t)=>t?!e||e.trim()===``:!1,errorMsg:`Enter last name`},ssnOrItin:{validate:(e,t)=>{let n=e||``,r=n.replace(/\D/g,``);return t?!n||r.length!==9:r.length>0&&r.length!==9},errorMsg:`Please enter a valid SSN (XXX-XX-XXXX)`},dob:{validate:(e,t)=>{let n=e||``;if(n.length>=10){let e=new Date(n),t=e.getFullYear();return!c.isDateInPast(e)||t<1896}return t?!n||n.length<10:n.length>0&&n.length<10},errorMsg:`Please provide a valid past date`},email:{validate:(e,t)=>t?!e||!T(e):e.length>0&&!T(e),errorMsg:`Please enter valid email`},phone:{validate:(e,t)=>{let n=l.cleanPhoneNumber(e);return t?!e||n.length!==G.phone:e.length>0&&n.length!==G.phone},errorMsg:`Please enter a valid phone number.`},addressLine1:{validate:(e,t)=>t?!e||e.trim()===``:!1,errorMsg:`Please enter a valid address`},city:{validate:(e,t)=>t?!e||e.trim()===``:!1,errorMsg:`Please enter a valid city`},state:{validate:(e,t)=>t?!e:!1,errorMsg:`Please select a state`},zip:{validate:(e,t)=>t?!e||!x(e):e.length>0&&!x(e),errorMsg:`Please enter valid zip`},jobTitle:{validate:(e,t)=>t?!e||e.trim()===``:!1,errorMsg:`Please enter a job title`,conditionalOn:`controlOfficer`}},ve={zip:`text`},q=e=>_e.reduce((t,n)=>({...t,[n]:e}),{});window.BannowebMerchantBusinessRepresentativeForm=class extends r{static get is(){return`bannoweb-merchant-business-representative-form`}static get styles(){return n`.container{padding:24px}.row{gap:32px;display:flex}.col{flex-direction:column}.space-between{justify-content:space-between;display:flex}.column{flex-direction:column;display:flex}.sub-text{color:var(--body-text-secondary-color)}.control-disclaimer{color:var(--body-text-primary-color);flex-direction:column;font-family:Roboto;font-size:14px;font-style:normal;font-weight:500;display:flex}.control-disclaimer span{margin-bottom:12px}.footer-disclaimer{color:var(--body-text-secondary-color);align-self:center;font-family:Roboto;font-size:12px;font-style:normal;font-weight:400}footer{padding:32px 0}.percent:after{content:"%";color:var(--body-text-secondary-color);text-align:end;position:absolute;top:25px;right:14px}.percent{justify-content:space-between;align-items:center;display:flex;position:relative}.percent>input{text-align:end;padding-right:30px}.percent-input{width:200px}.error{color:var(--body-text-alert-color)}.error-required{color:var(--body-text-alert-color);margin-top:-45px;margin-left:421px;font-size:12px;font-style:normal;font-weight:400}.mobile{margin-left:245px!important}.rep-disclaimer{color:var(--body-text-primary-color);font-size:16px;font-style:normal;font-weight:400}.address-disclaimer{color:var(--body-text-secondary-color);padding:12px 0;font-size:14px;font-style:normal;font-weight:400}`}static get properties(){return{firstName:{type:String},lastName:{type:String},ssnOrItin:{type:String},dob:{type:String},email:{type:String},phone:{type:String},addressLine1:{type:String},addressLine2:{type:String},city:{type:String},state:{type:String},zip:{type:String},controlOfficer:{type:Boolean},owner:{type:Boolean},percentOwnership:{type:String},jobTitle:{type:String},editBusinessRep:{type:Object},representatives:{type:Array},_isEdit:{type:Boolean},loading:{type:Boolean},errors:{type:Object},touched:{type:Object},isMobile:{type:Boolean}}}constructor(){super(),this.firstName=``,this.lastName=``,this.ssnOrItin=``,this.dob=``,this.email=``,this.phone=``,this.addressLine1=``,this.addressLine2=``,this.city=``,this.state=``,this.zip=``,this.controlOfficer=!1,this.owner=!1,this.percentOwnership=``,this.jobTitle=``,this.loading=!1,this._isEdit=!1,this.isMobile=!1,this.editBusinessRep={},this.representatives=[],this.errors=q(!1),this.touched=q(!1)}initializeFields(){this.firstName=``,this.lastName=``,this.ssnOrItin=``,this.dob=``,this.email=``,this.phone=``,this.addressLine1=``,this.addressLine2=``,this.city=``,this.state=``,this.zip=``,this.controlOfficer=!1,this.owner=!1,this.percentOwnership=``,this.jobTitle=``,this.loading=!1,this._isEdit=!1,this.editBusinessRep={},this.errors=q(!1),this.touched=q(!1)}setDefault(){this.initializeFields()}disconnectedCallback(){super.disconnectedCallback(),this.setDefault()}get isEdit(){return this._isEdit}set isEdit(e){this._isEdit=e,this._isEdit?this.loadEditFields():this.setDefault()}loadEditFields(){let{firstName:e,lastName:t,ssnOrItin:n,email:r,phone:i,address:a,isControlOfficer:o,isOwner:s,jobTitle:c,ownershipPercentage:l}=this.editBusinessRep;this.firstName=e??``,this.lastName=t??``,this.ssnOrItin=n??``,this.email=r,this.phone=i,this.addressLine1=a?.addressLine1??``,this.addressLine2=a?.addressLine2??``,this.city=a.city??``,this.state=a.stateOrProvince??``,this.zip=a.postalCode??``,this.controlOfficer=o??!1,this.owner=s??!1,this.percentOwnership=l??0,this.jobTitle=c??``}getFieldValue(e){switch(e){case`firstName`:return this.firstName;case`lastName`:return this.lastName;case`ssnOrItin`:return this.ssnOrItin;case`dob`:return this.dob;case`email`:return this.email;case`phone`:return this.phone;case`addressLine1`:return this.addressLine1;case`addressLine2`:return this.addressLine2;case`city`:return this.city;case`state`:return this.state;case`zip`:return this.zip;case`jobTitle`:return this.jobTitle;
17case`controlOfficer`:return this.controlOfficer;case`owner`:return this.owner;case`percentOwnership`:return this.percentOwnership;default:return``}}setFieldValue(e,t){switch(e){case`firstName`:this.firstName=t;break;case`lastName`:this.lastName=t;break;case`ssnOrItin`:this.ssnOrItin=t;break;case`dob`:this.dob=t;break;case`email`:this.email=t;break;case`phone`:this.phone=t;break;case`addressLine1`:this.addressLine1=t;break;case`addressLine2`:this.addressLine2=t;break;case`city`:this.city=t;break;case`state`:this.state=t;break;case`zip`:this.zip=t;break;case`jobTitle`:this.jobTitle=t;break;case`controlOfficer`:this.controlOfficer=t;break;case`owner`:this.owner=t;break;case`percentOwnership`:this.percentOwnership=t;break}}getValue(e){return e===`phone`?l.formatPhone(this.phone):e===`ssnOrItin`?this.formatSSN(this.ssnOrItin):e===`zip`?this.formatZip(this.zip):this.getFieldValue(e)}handleChange(e){let t=e.target.name||e.currentTarget.getAttribute(`name`),n=e.detail?.value??e.target.value,r=n;t===`phone`?r=l.formatPhone(n):t===`ssnOrItin`?r=this.formatSSN(n):t===`zip`&&(r=this.formatZip(n)),this.setFieldValue(t,r);let i=K[t];if(i){if(i.conditionalOn&&!this.getFieldValue(i.conditionalOn))return;this.errors={...this.errors,[t]:i.validate(r,!1)}}}handleSwitchChange(e){let t=e.currentTarget.getAttribute(`name`),n=e.detail?.value===void 0?e.detail:e.detail.value;this.setFieldValue(t,!!n),this.updateControlOfficerSwitch(t,n)}updateControlOfficerSwitch(e,t){e===`controlOfficer`&&(t?this.updateComplete.then(()=>{this.touched={...this.touched,jobTitle:!0},this.errors={...this.errors,jobTitle:!this.jobTitle||this.jobTitle.trim()===``}}):this.errors={...this.errors,jobTitle:!1})}getInputType(e){return ve[e]||`text`}handleBlur(e){let{name:t}=e.target;this.touched={...this.touched,[t]:!0},this.updateErrorState(t)}updateErrorState(e){let t=K[e];t&&(t.conditionalOn&&!this.getFieldValue(t.conditionalOn)||(this.errors={...this.errors,[e]:t.validate(this.getFieldValue(e),!0)}))}handleErrorMessage(e){if(!this.touched[e])return``;let t=K[e];return t&&this.errors[e]?t.errorMsg:``}handleMaxLength(e){return G[e]||``}handleKeyupFormatting(e){let{name:t,value:n}=e.target;switch(t){case`dob`:e.target.value=c.formatDateWithoutTime(n);break}}formatSSN(e){let t=(e||``).replace(/\D/g,``).substring(0,9),n=``;return t.length>0&&(n+=t.substring(0,3)),t.length>=4&&(n+=`-`+t.substring(3,5)),t.length>=6&&(n+=`-`+t.substring(5,9)),n}formatZip(e){return(e||``).replace(/\D/g,``).substring(0,5)}renderFormFields(){let e=[`ssnOrItin`,`dob`];return(this.isEdit?W.filter(t=>!e.includes(t)):W).map(e=>a`<jha-form-floating-group outline small .error="${this.handleErrorMessage(e)}" .hasValue="${!!this.getValue(e)}"> <div class="label">${J[e]}</div> <input placeholder="${e===`ssnOrItin`?`000-00-0000`:``}" @keyup="${this.handleKeyupFormatting}" @blur="${this.handleBlur}" id="${e}" type="${this.getInputType(e)}" name="${e}" .value="${this.getValue(e)}" @input="${this.handleChange}" maxlength="${this.handleMaxLength(e)}"> </jha-form-floating-group>`)}addressFormFields(){return a`<div class="control-disclaimer">${`Home address`}</div> <div class="address-disclaimer"> ${`Enter a current home address. Commercial addresses and P.O. boxes are not accepted.`} </div> ${this.renderInputField(`addressLine1`)} ${this.renderInputField(`addressLine2`,{noBlur:!0})}`}renderInputField(e,t={}){return a`<jha-form-floating-group outline small .error="${this.handleErrorMessage(e)}" .hasValue="${!!this.getValue(e)}"> <div class="label">${J[e]}</div> <input id="${e}" type="text" name="${e}" .value="${this.getValue(e)}" @input="${this.handleChange}" @blur="${t.noBlur?null:this.handleBlur}"> </jha-form-floating-group>`}renderCity(){return a`<div class="row"> <jha-form-floating-group outline small .hasValue="${!!this.getValue(`city`)}" .error="${this.handleErrorMessage(`city`)}"> <div class="label">${J.city}</div> <input type="${this.getInputType(`city`)}" name="city" .value="${this.getValue(`city`)}" @input="${this.handleChange}" @blur="${this.handleBlur}"> </jha-form-floating-group> </div>`}handleSelectedState(e){let t=e.detail??``;this.state=t,this.touched={...this.touched,state:!0},this.errors={...this.errors,state:!t}}handleStateBlur(){this.touched={...this.touched,state:!0},this.updateErrorState(`state`)}renderState(){return a`<bannoweb-state-dropdown @select-state="${this.handleSelectedState}" @state-blur="${this.handleStateBlur}" .value="${this.state}" .error="${this.handleErrorMessage(`state`)}"></bannoweb-state-dropdown>`}renderZip(){return a`<div class="row"> <jha-form-floating-group outline small .hasValue="${!!this.getValue(`zip`)}" .error="${this.handleErrorMessage(`zip`)}"> <div class="label">${J.zip}</div> <input type="${this.getInputType(`zip`)}" name="zip" .value="${this.getValue(`zip`)}" maxlength="${this.handleMaxLength(`zip`)}
17" @input="${this.handleChange}" @blur="${this.handleBlur}"> </jha-form-floating-group> </div>`}maybeRenderJobTitle(){return this.controlOfficer?a`<jha-form-floating-group outline small .hasValue="${!!this.jobTitle}" .error="${this.handleErrorMessage(`jobTitle`)}"> <div class="label">${`Job title`}</div> <input name="jobTitle" .value="${this.jobTitle}" @input="${this.handleChange}" @blur="${this.handleBlur}"> </jha-form-floating-group>`:``}renderControlOfficerToggle(){return a`<div class="space-between"> <div class="column"> <span>Control officer</span> <span class="sub-text">${`Has significant management authority`}</span> </div> <jha-form-switch name="controlOfficer" @checked-changed="${this.handleSwitchChange}" .checked="${this.controlOfficer}"></jha-form-switch> </div> ${this.maybeRenderJobTitle()}`}maybeRenderPercentError(){if(this.percentOwnership)return+this.percentOwnership<25?a`<div class="${`error-required ${this.isMobile?`mobile`:``}`}"> ${`At least 25% required`} </div>`:``}maybeRenderPercentOwner(){return this.owner?a`<jha-form-floating-group class="input percent" outline small> <div>${`Percent ownership`}</div> <input class="percent-input" type="number" name="percentOwnership" min="0" max="100" value="${this.percentOwnership}" @input="${this.handleChange}"> </jha-form-floating-group> ${this.maybeRenderPercentError()}`:``}renderOwnerToggle(){return a`<div class="space-between"> <div class="column"> <span>${`Owner`}</span> <span class="sub-text">${`Owns at least 25% stake in the company`}</span> </div> <jha-form-switch name="owner" @checked-changed="${this.handleSwitchChange}" .checked="${this.owner}"></jha-form-switch> </div> ${this.maybeRenderPercentOwner()}`}get baseFormCompleted(){let e=()=>this.isEdit?!0:!!this.ssnOrItin&&!this.errors.ssnOrItin&&!!this.dob&&!this.errors.dob,t=[`firstName`,`lastName`,`email`,`phone`,`addressLine1`,`city`,`state`].every(e=>!!this.getFieldValue(e)&&!this.errors[e]);return e()&&t&&!!x(this.zip)&&!this.errors.zip}resetForm(){this.editBusinessRep=null,this.setDefault(),this.shadowRoot.querySelector(`#representativeForm`).reset()}sanitizeSSN(e){return e.replace(/-/g,``)}get didSelectStatement(){let e=this.controlOfficer||this.owner,t=!this.controlOfficer||this.jobTitle&&!this.errors.jobTitle,n=!this.owner||this.percentOwnership&&+this.percentOwnership>=25;return e&&t&&n}getChangedEditFields_(){let e=this.editBusinessRep||{},t=e.address||{},n=e=>String(e??``).trim(),r=e=>String(e??``).replace(/\D/g,``);return[[`firstName`,n(this.firstName),n(e.firstName)],[`lastName`,n(this.lastName),n(e.lastName)],[`ssnOrItin`,r(this.ssnOrItin),r(e.ssnOrItin)],[`email`,n(this.email),n(e.email)],[`phone`,r(this.phone),r(e.phone)],[`addressLine1`,n(this.addressLine1),n(t.addressLine1)],[`addressLine2`,n(this.addressLine2),n(t.addressLine2)],[`city`,n(this.city),n(t.city)],[`state`,n(this.state),n(t.stateOrProvince)],[`zip`,r(this.zip),r(t.postalCode)],[`controlOfficer`,!!this.controlOfficer,!!e.isControlOfficer],[`owner`,!!this.owner,!!e.isOwner],[`percentOwnership`,Number(this.percentOwnership),Number(e.ownershipPercentage??0)],[`jobTitle`,n(this.jobTitle),n(e.jobTitle)]].filter(([,e,t])=>e!==t).map(([e])=>e)}get hasEditChanges(){return this.getChangedEditFields_().length>0}get disabled(){return this.isEdit?!(this.baseFormCompleted&&this.didSelectStatement&&this.hasEditChanges):!(this.baseFormCompleted&&this.didSelectStatement)}findDuplicateRepresentative_(){let e=e=>String(e??``).trim().toLowerCase(),t=e(this.firstName),n=e(this.lastName),r=e(this.email),i=l.cleanPhoneNumber(this.phone||``),a=this.isEdit?this.editBusinessRep?.id:null;return(this.representatives||[]).find(o=>{if(a&&o.id===a||!(e(o.firstName)===t&&e(o.lastName)===n))return!1;let s=!!r&&e(o.email)===r,c=!!i&&l.cleanPhoneNumber(o.phone||``)===i;return s||c})||null}async notifyDuplicateRepresentative_(e){let t=`${e.firstName} ${e.lastName}`.trim();try{await v.showDialog({title:`Duplicate representative`,description:`It looks like "${t}" has already been added. To make changes, edit the existing representative instead.`,confirmButtonText:`OK`,cancelButtonText:null})}catch{}}async handleAddRepresentative(){let e=this.findDuplicateRepresentative_();if(e){await this.notifyDuplicateRepresentative_(e);return}try{this.loading=!0;let e=this.isEdit?{}:{ssnOrItin:this.sanitizeSSN(this.ssnOrItin),dateOfBirth:c.getISODateOnly(new Date(this.dob))},t={firstName:this.firstName,lastName:this.lastName,...e,email:this.email,phone:l.cleanPhoneNumber(this.phone),address:{addressLine1:this.addressLine1,addressLine2:this.addressLine2,city:this.city,postalCode:this.zip,stateOrProvince:this.state},isControlOfficer:this.controlOfficer,jobTitle:this.jobTitle,isOwner:this.owner,...this.owner&&{ownershipPercentage:parseInt(+this.percentOwnership,10)}},n;if(this.isEdit){let e=this.getChangedEditFields_(),r={...t,ownershipPercentage:this.owner?parseInt(+this.percentOwnership,10):0};n=await m.merchantController.updateRepresentatives(this.editBusinessRep.id,r),z.trackRepresentativeEdited(r,e)}else n=await m.merchantController.addRepresentatives(t),z.trackRepresentativeAdded({repCollectionRequired:!0,isControlOfficer:t.isControlOfficer,isOwner:t.isOwner,ownershipPercentage:t.ownershipPercentage||0});this.loading=!1,this.resetForm(),this.dispatchEvent(new CustomEvent(`success`,{composed:!0,bubbles:!0,detail:{completedKey:f.BUSINESS_REPRESENTATIVE_FORM,nextFocusPane:f.BUSINESS_REPRESENTATIVES,representative:n}}
17))}catch(e){this.loading=!1,v.showStandardErrorDialog({error:e})}}maybeRenderStatementsError(){let e=this.owner&&this.percentOwnership&&+this.percentOwnership>=25;return!this.baseFormCompleted||this.didSelectStatement||e?``:a`<span class="error">${`One of the statements below must be selected in order to continue.`}</span>`}get getButtonText(){return this.isEdit?`Save changes`:`Add representative`}render(){return a`<form class="container" id="representativeForm"> <div class="rep-disclaimer">${`We need to verify this representative’s identity. Enter their personal information exactly as it appears on their government ID, not business information.`}</div> ${this.renderFormFields()} ${this.addressFormFields()} <div class="row space-between">${this.renderCity()} ${this.renderState()} ${this.renderZip()}</div> <div class="row col"> <span class="control-disclaimer"> ${`Select all the roles that apply. At least one is required.`} ${this.maybeRenderStatementsError()} </span> ${this.renderControlOfficerToggle()} ${this.renderOwnerToggle()} </div> <footer class="row col"> <div class="footer-disclaimer sub-text">${`By providing this information, I certify I am an authorized representative/signatory for the business.`}</div> <jha-button .isLoading="${this.loading}" sync .disabled="${this.disabled}" @click="${this.handleAddRepresentative}"> ${this.getButtonText} </jha-button> </footer> </form>`}};var J={firstName:`First name`,lastName:`Last name`,ssnOrItin:`SSN or ITIN`,dob:`Date of birth (mm/dd/yyyy)`,email:`Email`,phone:`Phone`,addressLine1:`Street line 1`,addressLine2:`Street line 2 (optional)`,city:y(`City`),state:y(`State`),zip:`Zipcode`,controlOfficer:`Controller`,owner:`Owner`,percentOwnership:`Percent ownership`,jobTitle:`Job title`};customElements.define(window.BannowebMerchantBusinessRepresentativeForm.is,window.BannowebMerchantBusinessRepresentativeForm),window.BannowebMerchantBusinessRepresentativeForm,window.BannowebMerchantConfirmBusinessInfo=class extends r{static get is(){return`bannoweb-merchant-confirm-business-info`}static get properties(){return{loading:{type:Boolean},accountInfo:{type:Object},taxIdLoading:{type:Boolean},taxIdMasked:{type:String},taxIdError:{type:Boolean},isExtended:{type:Boolean}}}constructor(){super(),this.loading=!1,this.taxIdLoading=!1,this.taxIdError=!1,this.accountInfo=null,this.taxIdMasked=``,this.isExtended=!1}
17async loadTaxId(){try{this.taxIdLoading=!0,this.taxIdError=!1;let e=await m.merchantController.getBusinessTaxId();this.taxIdMasked=e?.taxIdMasked||``,this.taxIdLoading=!1}catch(e){this.taxIdLoading=!1,this.taxIdError=!0,t.console.error(`Failed to load tax ID:`,e)}}handleConfirm(){z.trackBusinessInfoConfirmed(),this.dispatchEvent(new CustomEvent(`success`,{composed:!0,detail:{completedKey:f.CONFIRM_BUSINESS_INFO,nextFocusPane:this.isExtended?f.EXTENDED_DIRECTORY:f.AGREEMENT_DIRECTORY}}))}static get styles(){return[n`.container{padding:16px var(--jha-content-inset);flex-direction:column;gap:24px;display:flex}.title{color:var(--body-text-primary-color);text-align:left;padding:0 8px 16px;font-size:16px;font-style:normal;font-weight:400;line-height:24px}.info-section{flex-direction:column;gap:8px;padding:0 8px;display:flex}.info-row{border-bottom:1px solid var(--divider-default-color,#e0e0e0);justify-content:space-between;align-items:flex-start;padding:16px 0;display:flex}.info-row:last-child{border-bottom:none}.info-label{color:var(--body-text-secondary-color);font-size:16px;font-style:normal;font-weight:400;line-height:24px}.info-value{color:var(--body-text-primary-color);text-align:right;max-width:60%;font-size:16px;font-style:normal;font-weight:400;line-height:24px}.address-lines{flex-direction:column;align-items:flex-end;gap:4px;display:flex}footer{flex-direction:column;justify-content:center;align-items:stretch;gap:12px;padding:24px 100px;display:flex}jha-button{width:100%}.retry-button{color:var(--jha-primary-color,#6200ea);cursor:pointer;background:0 0;border:none;padding:4px 8px;font-size:14px;font-weight:400;text-decoration:underline}.retry-button:hover{opacity:.8}jha-progress{--jha-spinner-size:20px;--jha-spinner-color:var(--body-text-primary-color)}`]}formatPhoneNumber(){return this.accountInfo?.phoneNumber?l.formatPhone(this.accountInfo.phoneNumber||``):``}renderTaxIdValue(){return this.taxIdLoading?a`<jha-progress size="small"></jha-progress>`:this.taxIdError?a`<jha-button link class="retry-button" @click="${this.loadTaxId}"> ${`Try again`} </jha-button>`:a`${this.taxIdMasked}`}handleEditDetails(){this.dispatchEvent(new CustomEvent(`edit`,{composed:!0,bubbles:!0}))}render(){return this.accountInfo?a`<div class="container"> <div class="title">${`Please review the information we have on file is correct and consistent with your legal documents.`}</div> <div class="info-section"> <div class="info-row"> <div class="info-label">${`Legal business name`}</div> <div class="info-value">${this.accountInfo.businessName||``}</div> </div> <div class="info-row"> <div class="info-label">${`Tax ID – EIN`}</div> <div class="info-value">${this.renderTaxIdValue()}</div> </div> <div class="info-row"> <div class="info-label">${`Phone number`}</div> <div class="info-value">${this.formatPhoneNumber()}</div> </div> <div class="info-row"> <div class="info-label">${`Business address`}</div> <div class="info-value"> <div class="address-lines"> ${this.accountInfo.addressLine1?a`<div>${this.accountInfo.addressLine1}</div>`:``} ${this.accountInfo.addressLine2?a`<div>${this.accountInfo.addressLine2}</div>`:``} ${this.accountInfo.city||this.accountInfo.stateOrProvince||this.accountInfo.postalCode?a`<div> ${[this.accountInfo.city,this.accountInfo.stateOrProvince,this.accountInfo.postalCode].filter(Boolean).join(`, `)} </div>`:``} </div> </div> </div> </div> <footer> <jha-button block .isLoading="${this.loading}" sync @click="${this.handleConfirm}"> ${`Confirm`} </jha-button> <jha-button sync outline block class="edit-button" @click="${this.handleEditDetails}"> ${`Edit business details`} </jha-button> </footer> </div>`:a`<div class="container"> <jha-progress size="small"></jha-progress> </div>`}},customElements.define(window.BannowebMerchantConfirmBusinessInfo.is,window.BannowebMerchantConfirmBusinessInfo),window.BannowebMerchantConfirmBusinessInfo,window.BannowebMerchantEditBusinessInfo=class extends r{static get is(){return`bannoweb-merchant-edit-business-info`}static get properties(){return{accountInfo:{type:Object},loading:{type:Boolean},businessName:{type:String},taxId:{type:String},phoneNumber:{type:String},phoneCountryCode:{type:String},addressLine1:{type:String},addressLine2:{type:String},city:{type:String},stateOrProvince:{type:String},postalCode:{type:String},country:{type:String},businessNameError:{type:String},taxIdError:{type:String},phoneNumberError:{type:String},addressLine1Error:{type:String},cityError:{type:String},stateError:{type:String},postalCodeError:{type:String},active:{type:Boolean}}}constructor(){super(),this.accountInfo=null,this.loading=!1,this.active=!1,this.businessName=``,this.taxI
17d=``,this.phoneNumber=``,this.phoneCountryCode=`1`,this.addressLine1=``,this.addressLine2=``,this.city=``,this.stateOrProvince=``,this.postalCode=``,this.country=`US`,this.businessNameError=``,this.taxIdError=``,this.phoneNumberError=``,this.addressLine1Error=``,this.cityError=``,this.stateError=``,this.postalCodeError=``,this.initialTaxId_=``}set businessTaxId(e){this.taxId=e,this.initialTaxId_=e}resetForm(){this.accountInfo&&(this.businessName=this.accountInfo.businessName||``,this.taxId=this.initialTaxId_,this.phoneNumber=l.formatPhone(this.accountInfo.phoneNumber||``),this.phoneCountryCode=this.accountInfo.phoneCountryCode||`1`,this.addressLine1=this.accountInfo.addressLine1||``,this.addressLine2=this.accountInfo.addressLine2||``,this.city=this.accountInfo.city||``,this.stateOrProvince=this.accountInfo.stateOrProvince||``,this.postalCode=this.accountInfo.postalCode||``,this.country=this.accountInfo.country||`US`,this.businessNameError=``,this.taxIdError=``,this.phoneNumberError=``,this.addressLine1Error=``,this.cityError=``,this.stateError=``,this.postalCodeError=``)}updated(e){super.updated(e),e.has(`active`)&&!this.active&&e.get(`active`)&&this.resetForm(),e.has(`accountInfo`)&&this.accountInfo&&(this.businessName=this.accountInfo.businessName||``,this.phoneNumber=l.formatPhone(this.accountInfo.phoneNumber||``),this.phoneCountryCode=this.accountInfo.phoneCountryCode||`1`,this.addressLine1=this.accountInfo.addressLine1||``,this.addressLine2=this.accountInfo.addressLine2||``,this.city=this.accountInfo.city||``,this.stateOrProvince=this.accountInfo.stateOrProvince||``,this.postalCode=this.accountInfo.postalCode||``,this.country=this.accountInfo.country||`US`)}handleInputChange(e){let{name:t,value:n}=e.target;switch(t){case`businessName`:this.businessName=n,this.businessNameError=``;break;case`taxId`:this.taxId=n,this.taxIdError=``;break;case`phoneNumber`:this.phoneNumber=l.formatPhone(n),this.phoneNumberError=``;break;case`addressLine1`:this.addressLine1=n,this.addressLine1Error=``;break;case`addressLine2`:this.addressLine2=n;break;case`city`:this.city=n,this.cityError=``;break;case`postalCode`:this.postalCode=n,this.postalCodeError=``;break;default:break}}handleInputBlur(e){let{name:t}=e.target;switch(t){case`businessName`:this.businessName.trim()||(this.businessNameError=`Field is required`);break;case`phoneNumber`:l.cleanPhoneNumber(this.phoneNumber).length!==10&&(this.phoneNumberError=`Please enter a valid phone number.`);break;case`addressLine1`:this.addressLine1.trim()||(this.addressLine1Error=`Field is required`);break;case`city`:this.city.trim()||(this.cityError=`Field is required`);break;case`postalCode`:this.postalCode.trim()||(this.postalCodeError=`Field is required`);break;default:break}}handleStateSelect(e){this.stateOrProvince=e.detail,this.stateError=``,this.stateOrProvince.trim()||(this.stateError=`Field is required`)}hasChanges(){if(!this.accountInfo)return!1;let e=this.accountInfo;return this.businessName!==(e.businessName||``)||this.taxId!==this.initialTaxId_||l.cleanPhoneNumber(this.phoneNumber)!==(e.phoneNumber||``)||this.addressLine1!==(e.addressLine1||``)||this.addressLine2!==(e.addressLine2||``)||this.city!==(e.city||``)||this.stateOrProvince!==(e.stateOrProvince||``)||this.postalCode!==(e.postalCode||``)||this.country!==(e.country||`US`)}isFormValid(){return!(!this.businessName.trim()||l.cleanPhoneNumber(this.phoneNumber).length!==10||!this.addressLine1.trim()||!this.city.trim()||!this.stateOrProvince.trim()||!this.postalCode.trim())}validateForm(){let e=!0;return this.businessNameError=``,this.taxIdError=``,this.phoneNumberError=``,this.addressLine1Error=``,this.cityError=``,this.stateError=``,this.postalCodeError=``,this.businessName.trim()||(this.businessNameError=`Field is required`,e=!1),l.cleanPhoneNumber(this.phoneNumber).length!==10&&(this.phoneNumberError=`Please enter a valid phone number.`,e=!1),this.addressLine1.trim()||(this.addressLine1Error=`Field is required`,e=!1),this.city.trim()||(this.cityError=`Field is required`,e=!1),this.stateOrProvince.trim()||(this.stateError=`Field is required`,e=!1),this.postalCode.trim()||(this.postalCodeError=`Field is required`,e=!1),e}getChangedFields_(){let e=this.accountInfo||{},t=[];return this.businessName.trim()!==(e.businessName||``)&&t.push(`business_name`),this.taxI
17d.trim()!==(this.initialTaxId_||``).trim()&&t.push(`tax_id`),l.cleanPhoneNumber(this.phoneNumber)!==(e.phoneNumber||``)&&t.push(`phone_number`),(this.addressLine1.trim()!==(e.addressLine1||``)||this.addressLine2.trim()!==(e.addressLine2||``)||this.city.trim()!==(e.city||``)||this.stateOrProvince!==(e.stateOrProvince||``)||this.postalCode.trim()!==(e.postalCode||``)||this.country!==(e.country||`US`))&&t.push(`address`),t}async handleSubmit(e){if(e.preventDefault(),this.validateForm())try{this.loading=!0;let e={businessName:this.businessName.trim(),taxId:this.taxId.trim(),phoneNumber:l.cleanPhoneNumber(this.phoneNumber),phoneCountryCode:this.phoneCountryCode,addressLine1:this.addressLine1.trim(),addressLine2:this.addressLine2.trim(),city:this.city.trim(),stateOrProvince:this.stateOrProvince,postalCode:this.postalCode.trim(),country:this.country};await m.merchantController.createOrUpdateEnrollmentAccount(e);let t=this.getChangedFields_();z.trackBusinessInfoEdited(t),this.loading=!1,this.dispatchEvent(new CustomEvent(`success`,{composed:!0,detail:{completedKey:f.EDIT_BUSINESS_INFO,nextFocusPane:f.CONFIRM_BUSINESS_INFO}}))}catch(t){this.loading=!1,v.showStandardErrorDialog({error:t,confirmButtonText:`Retry`,cancelButtonText:`Cancel`}).then(()=>{this.handleSubmit(e)})}}static get styles(){return[n`.container{padding:16px var(--jha-content-inset);flex-direction:column;gap:24px;display:flex}.title{color:var(--body-text-primary-color);text-align:left;padding:0 8px 16px;font-size:16px;font-style:normal;font-weight:400;line-height:24px}form{flex-direction:column;gap:16px;padding:0 8px;display:flex}jha-form-floating-group{width:100%}.helper-text{color:var(--body-text-secondary-color);margin-top:4px;padding:0 12px;font-size:12px;font-style:normal;font-weight:400}.address-section-title{color:var(--body-text-primary-color);margin-top:8px;font-size:16px;font-style:normal;font-weight:500}.address-section-subtitle{color:var(--body-text-secondary-color);margin-top:4px;font-size:12px;font-style:normal;font-weight:400}.address-row{justify-content:center;align-items:center;gap:12px;display:flex}.address-row>*{flex:1;min-width:0}footer{justify-content:center;align-items:center;padding:24px 100px;display:flex}jha-button{width:100%}`]}render(){return this.accountInfo?a`<div class="container"> <div class="title">
17${`Make any corrections as needed to match your legal documents.`}</div> <form @submit="${this.handleSubmit}"> <jha-form-floating-group outline small .hasValue="${!!this.businessName}" .error="${this.businessNameError}"> <label class="label">${`Legal business name`}</label> <input type="text" name="businessName" .value="${this.businessName}" @input="${this.handleInputChange}" @blur="${this.handleInputBlur}"> </jha-form-floating-group> <div class="helper-text">${`This must match your filing documents exactly, including capitalization and punctuation. DBAs are not accepted.`}</div> <jha-form-floating-group outline small .hasValue="${!!this.taxId}" .error="${this.taxIdError}"> <label class="label">${`Tax ID – EIN`}</label> <input type="text" name="taxId" maxlength="11" .value="${this.taxId}" @input="${this.handleInputChange}" @blur="${this.handleInputBlur}"> </jha-form-floating-group> <jha-form-floating-group outline small .hasValue="${!!this.phoneNumber}" .error="${this.phoneNumberError}"> <label class="label">${`Phone number`}</label> <input type="tel" name="phoneNumber" .value="${this.phoneNumber}" maxlength="14" @input="${this.handleInputChange}" @blur="${this.handleInputBlur}"> </jha-form-floating-group> <div class="address-section-title">${`Business address`}</div> <div class="address-section-subtitle">${`Enter your business's physical operating address. P.O. boxes and mailing services aren't allowed.`}</div> <jha-form-floating-group outline small .hasValue="${!!this.addressLine1}" .error="${this.addressLine1Error}"> <label class="label">${`Street line 1`}</label> <input type="text" name="addressLine1" .value="${this.addressLine1}" @input="${this.handleInputChange}" @blur="${this.handleInputBlur}"> </jha-form-floating-group> <jha-form-floating-group outline small .hasValue="${!!this.addressLine2}"> <label class="label">${`Street address 2 (optional)`}</label> <input type="text" name="addressLine2" .value="${this.addressLine2}" @input="${this.handleInputChange}"> </jha-form-floating-group> <div class="address-row"> <jha-form-floating-group outline small .hasValue="${!!this.city}" .error="${this.cityError}"> <label class="label">${`City`}</label> <input type="text" name="city" .value="${this.city}" @input="${this.handleInputChange}" @blur="${this.handleInputBlur}"> </jha-form-floating-group> <bannoweb-state-dropdown full-width .value="${this.stateOrProvince}" .error="${this.stateError}" @select-state="${this.handleStateSelect}"></bannoweb-state-dropdown> <jha-form-floating-group outline small .hasValue="${!!this.postalCode}" .error="${this.postalCodeError}"> <label class="label">${`Zipcode`}</label> <input type="text" name="postalCode" .value="${this.postalCode}" @input="${this.handleInputChange}" @blur="${this.handleInputBlur}"> </jha-form-floating-group> </div> <footer> <jha-button block .isLoading="${this.loading}" .disabled="${!this.hasChanges()||!this.isFormValid()}" type="submit"> ${`Update details`} </jha-button> </footer> </form> </div>`:a`<div class="container"> <div class="title">${`Loading`}</div> </div>`}},customElements.define(window.BannowebMerchantEditBusinessInfo.is,window.BannowebMerchantEditBusinessInfo),window.BannowebMerchantEditBusinessInfo;var ye={ssnOrItin:{placeholder:`000-00-0000`,maxlength:11},dob:{maxlength:10},email:{placeholder:`Email`}},Y=e=>e===`ssn`?`ssnOrItin`:e===`birthdate`?`dob`:e;window.BannowebMerchantErrorForm=class extends r{static get is(){return`bannoweb-merchant-error-form`}static get styles(){return n`.container{flex-direction:column;gap:16px;padding:24px;display:flex}.error-header{margin-bottom:16px}.error-title{color:var(--body-text-primary-color);margin-bottom:8px;font-size:18px;font-weight:500}.error-description{color:var(--body-text-secondary-color);font-size:14px}.form-section{flex-direction:column;gap:16px;display:flex}.label{color:var(--body-text-secondary-color);font-size:14px}.field-error{color:var(--error-color,#d32f2f);margin-top:4px;font-size:12px}footer{justify-content:center;align-items:center;padding:16px 0 0;display:flex}jha-button{padding:0px var(--jh-space-400);display:flex}`}static get properties(){return{errorInfo:{type:Object},loading:{type:Boolean},firstname:{type:String},lastname:{type:String},ssnOrItin:{type:String},dob:{type:String},isExtendedUnderwriting:{type:Boolean},generalDetails:{type:Object}
17,transactionAndCardDetails:{type:Object},fulfillmentDetails:{type:Object},businessReps:{type:Array},fieldErrors:{type:Object}}}constructor(){super(),this.errorInfo=null,this.loading=!1,this.firstname=``,this.lastname=``,this.ssnOrItin=``,this.dob=``,this.fieldErrors={firstname:``,lastname:``,ssnOrItin:``,dob:``,email:``},this.isExtendedUnderwriting=!1,this.generalDetails=null,this.transactionAndCardDetails=null,this.fulfillmentDetails=null,this.businessReps=null}connectedCallback(){super.connectedCallback()}_getFieldValue(e){return e===`firstname`?this.firstname:e===`lastname`?this.lastname:e===`ssnOrItin`?this.ssnOrItin:e===`dob`?this.dob:``}_setFieldValue(e,t){e===`firstname`?this.firstname=t:e===`lastname`?this.lastname=t:e===`ssnOrItin`?this.ssnOrItin=t:e===`dob`&&(this.dob=t)}_formatSSN(e){let t=(e||``).replace(/\D/g,``).substring(0,9);return[t.substring(0,3),t.substring(3,5),t.substring(5,9)].filter(e=>e.length>0).join(`-`)}_validateSSN(e){let t=e||``;return t.length===11?t.replace(/\D/g,``).length===9:!1}_validateDOB(e){let t=e||``;if(t.length!==10)return!1;let n=new Date(t),r=n.getFullYear();return c.isDateInPast(n)&&r>=1896}_formatFieldValue(e,t){return e===`ssnOrItin`?this._formatSSN(t):e===`dob`?c.formatDateWithoutTime(t).substring(0,10):t}handleInputChange(e,t){let n=j(e.target?.value||e.detail?.value||``);e.target&&(e.target.value=n),t===`dob`&&n.length>10&&(n=n.substring(0,10),e.target&&(e.target.value=n)),t===`ssnOrItin`&&n.length>11&&(n=n.substring(0,11),e.target&&(e.target.value=n));let r=this._formatFieldValue(t,n),i=r;t===`dob`&&r.length>10?i=r.substring(0,10):t===`ssnOrItin`&&r.length>11&&(i=r.substring(0,11)),this._setFieldValue(t,i),this._validateField(t,i),this.requestUpdate(void 0,void 0)}_validateField(e,t){if(!t){this.fieldErrors[e]=``;return}let n={firstname:()=>!t||t.trim()===``?`Enter first name`:``,lastname:()=>!t||t.trim()===``?`Enter last name`:``,ssnOrItin:()=>this._validateSSN(t)?``:`Please enter a valid SSN (XXX-XX-XXXX)`,dob:()=>this._validateDOB(t)?``:`Please provide a valid past date`,email:()=>T(t)?``:`Please enter valid email`}[e];this.fieldErrors[e]=n?n():``}_getRepresentativeName(){let e=M(this.errorInfo?.errorEntityId,this.businessReps);if(e===-1)return``;let t=this.businessReps[e];return[t.firstName,t.lastName].filter(Boolean).join(` `)}_buildRepresentativesPayload(){let e=M(this.errorInfo?.errorEntityId,this.businessReps);if(e!==-1){let t=this.businessReps[e];return{firstName:this.firstname||t.firstName,lastName:this.lastname||t.lastName,...this.dob?{dateOfBirth:c.getISODateOnly(new Date(this.dob))}:{},...this.ssnOrItin?{ssnOrItin:this.ssnOrItin.replace(/-/g,``)}:{}}}}async _submitUpdate(){try{let e=this._buildRepresentativesPayload();await m.merchantController.updateRepresentatives(this.errorInfo.errorEntityId,e)}catch(e){v.showStandardErrorDialog({error:e})}}async handleSaveAndContinue(){try{this.loading=!0,await this._submitUpdate();let e=M(this.errorInfo?.errorEntityId,this.businessReps);if(e!==-1){let t=this.businessReps[e],n=null;this.firstname?n=`firstname`:this.lastname?n=`lastname`:this.ssnOrItin?n=`ssnOrItin`:this.dob&&(n=`dob`),n&&z.trackRepresentativeFieldsFixed({repCollectionRequired:!1,isControlOfficer:t.isControlOfficer||!1,isOwner:t.isOwner||!1,ownershipPercentage:t.ownershipPercentage||0,fixedFields:[n]})}this.dispatchEvent(new CustomEvent(`error-resolved`,{bubbles:!0,composed:!0,detail:{errorId:this.errorInfo?.errorEntityId}})),this.loading=!1}catch(e){this.loading=!1,v.showStandardErrorDialog({error:e})}}_isFieldValid(e){let t=this._getFieldValue(e);return!(!t||t.trim()===``||this.fieldErrors[e]||e===`dob`&&t.length!==10||e===`ssnOrItin`&&t.length!==11)}get isFormValid(){return this.errorInfo?.fields?.every(e=>{let t=Y(e.code);return this._isFieldValid(t)})||!1}renderField(e){let t=Y(e.code),n=this._getFieldValue(t);return this._renderTextInput(t,e.description,n,ye[t])}_renderTextInput(e,t,n,r={}){let i=this.fieldErrors[e]||``;return a`<jha-form-floating-group outline small .hasValue="${!!n}" .error="${i}"> <div class="label">${t}</div> <input type="text" name="${e}" .value="${n}" placeholder="${r.placeholder||``}" maxlength="${r.maxlength||``}
17" @input="${t=>this.handleInputChange(t,e)}" ?disabled="${this.loading}"> </jha-form-floating-group>`}_renderSelect(e,t,n,r){return a`<jha-form-floating-group outline small .hasValue="${!!r}"> <div class="label">${t}</div> <jha-select .emptyOptionLabel="${` `}" .selectedValue="${r}" .options="${N(n)}" @selected-value-changed="${t=>this.handleInputChange(t,e)}" ?disabled="${this.loading}"></jha-select> </jha-form-floating-group>`}render(){return this.errorInfo?a`<div class="container"> <div class="error-header"> <div class="error-title">${`Fix Enrollment Errors`}</div> <div class="error-description"> ${`Please provide the following information to complete your enrollment.`} ${this._getRepresentativeName()?a`<br> (${this._getRepresentativeName()})`:``} </div> </div> <div class="form-section"> ${this.errorInfo.fields?.map(e=>a`<div>${this.renderField(e)}</div>`)} </div> <footer> <jha-button @click="${this.handleSaveAndContinue}" .isLoading="${this.loading}" sync ?disabled="${!this.isFormValid||this.loading}"> ${`Save and Continue`} </jha-button> </footer> </div>`:a`<div class="container">${`No error information available`}</div>`}},customElements.define(window.BannowebMerchantErrorForm.is,window.BannowebMerchantErrorForm),window.BannowebMerchantErrorForm;var X={addressLine1:{validate:(e,t)=>t?!e||e.trim()===``:!1,errorMsg:`Please enter a valid address`},city:{validate:(e,t)=>t?!e||e.trim()===``:!1,errorMsg:`Please enter a valid city`},state:{validate:(e,t)=>t?!e:!1,errorMsg:`Please select a state`},zip:{validate:(e,t)=>t?!e||!x(e):e.length>0&&!x(e),errorMsg:`Please enter valid zip`}},be={zip:5},xe={addressLine1:`Street line 1`,addressLine2:`Street line 2 (optional)`,city:y(`City`),state:y(`State`),zip:`Zipcode`};window.BannowebMerchantErrorsAddressForm=class extends r{static get is(){return`bannoweb-merchant-errors-address-form`}static get styles(){return n`.container{flex-direction:column;gap:16px;padding:24px;display:flex}.error-header{margin-bottom:16px}.error-title{color:var(--body-text-primary-color);margin-bottom:8px;font-size:18px;font-weight:500}.error-description{color:var(--body-text-secondary-color);font-size:14px}.form-section{flex-direction:column;gap:16px;display:flex}.row{gap:16px;display:flex}.address-disclaimer{color:var(--body-text-secondary-color);padding:12px 0;font-size:14px;font-style:normal;font-weight:400}footer{justify-content:center;align-items:center;padding:16px 0 0;display:flex}jha-button{padding:0px var(--jh-space-400);display:flex}`}static get properties(){return{errorInfo:{type:Object},loading:{type:Boolean},addressLine1:{type:String},addressLine2:{type:String},city:{type:String},state:{type:String},zip:{type:String},isExtendedUnderwriting:{type:Boolean},businessReps:{type:Array},errors:{type:Object},touched:{type:Object}}}constructor(){super(),this.errorInfo=null,this.loading=!1,this.addressLine1=``,this.addressLine2=``,this.city=``,this.state=``,this.zip=``,this.isExtendedUnderwriting=!1,this.businessReps=null,this.errors={addressLine1:!1,city:!1,state:!1,zip:!1},this.touched={addressLine1:!1,city:!1,state:!1,zip:!1}}updated(e){super.updated(e),e.has(`errorInfo`)&&this.errorInfo&&this.loadExistingAddress()}loadExistingAddress(){let e=this._findRepresentativeById(this.errorInfo?.errorEntityId,this.businessReps);if(e!==-1){let t=this.businessReps[e].address||{};this.addressLine1=t.addressLine1||``,this.addressLine2=t.addressLine2||``,this.city=t.city||``,this.state=t.stateOrProvince||``,this.zip=t.postalCode||``}}getFieldValue(e){switch(e){case`addressLine1`:return this.addressLine1;case`addressLine2`:return this.addressLine2;case`city`:return this.city;case`state`:return this.state;case`zip`:return this.zip;default:return``}}setFieldValue(e,t){switch(e){case`addressLine1`:this.addressLine1=t;break;case`addressLine2`:this.addressLine2=t;break;case`city`:this.city=t;break;case`state`:this.state=t;break;case`zip`:this.zip=t;break}}getValue(e){return e===`zip`?this.formatZip(this.zip):this.getFieldValue(e)}formatZip(e){return(e||``).replace(/\D/g,``).substring(0,5)}handleChange(e){let t=e.target.name||e.currentTarget.getAttribute(`name`),n=j(e.detail?.value??e.target.value);e.target&&(e.target.value=n);let r=n;t===`zip`&&(r=this.formatZip(n)),this.setFieldValue(t,r);let i=X[t];i&&(this.errors={...this.errors,[t]:i.validate(r,!1)})}handleBlur(e){let{name:t}=e.target;this.touched={...this.touched,[t]:!0},this.updateErrorState(t)}updateErrorState(e){let t=X[e];t&&(this.errors={...this.errors,[e]:t.validate(this.getFieldValue(e),!0)})}handleErrorMessage(e){if(!this.touched[e])return``;let t=X[e];return t&&this.errors[e]?t.errorMsg:``}handleMaxLength(e){return be[e]||``}handleSelectedState(e){let t=e.detail??``;this.state=t,this.touched={...this.touched,state:!0},this.errors={...this.errors,state:!t}}handleStateBlur(){this.touched={...this.touched,state:!0},this.updateErrorState(`state`)}_getRepresentativeName(){let e=this._findRepresentativeById(this.errorInfo?.errorEntityId,this.businessReps);if(e===-1)return``;let t=this.businessReps[e];
17return[t.firstName,t.lastName].filter(Boolean).join(` `)}_findRepresentativeById(e,t){return!t||!e?-1:t.findIndex(t=>t.id===e)}_buildRepresentativesPayload(){let e=this._findRepresentativeById(this.errorInfo?.errorEntityId,this.businessReps);if(e!==-1){let t=this.businessReps[e];return{firstName:t.firstName,lastName:t.lastName,address:{addressLine1:this.addressLine1,addressLine2:this.addressLine2,city:this.city,postalCode:this.zip,stateOrProvince:this.state}}}}async _submitUpdate(){try{let e=this._buildRepresentativesPayload();await m.merchantController.updateRepresentatives(this.errorInfo.errorEntityId,e)}catch(e){v.showStandardErrorDialog({error:e})}}async handleSaveAndContinue(){try{this.loading=!0,await this._submitUpdate();let e=M(this.errorInfo?.errorEntityId,this.businessReps);if(e!==-1&&this.errorInfo?.fields){let t=this.businessReps[e];z.trackRepresentativeFieldsFixed({repCollectionRequired:!1,isControlOfficer:t.isControlOfficer||!1,isOwner:t.isOwner||!1,ownershipPercentage:t.ownershipPercentage||0,fixedFields:[`address`]})}this.dispatchEvent(new CustomEvent(`error-resolved`,{bubbles:!0,composed:!0,detail:{errorId:this.errorInfo?.errorEntityId}})),this.loading=!1}catch(e){this.loading=!1,v.showStandardErrorDialog({error:e})}}get isFormValid(){return[`addressLine1`,`city`,`state`,`zip`].every(e=>{let t=this.getFieldValue(e);return!(!t||t.trim()===``||this.errors[e])})}get hasAddressChanges(){let e=this._findRepresentativeById(this.errorInfo?.errorEntityId,this.businessReps);if(e===-1)return!0;let t=this.businessReps[e].address||{},n=e=>String(e??``).trim(),r=e=>String(e??``).replace(/\D/g,``).substring(0,5);return n(this.addressLine1)!==n(t.addressLine1)||n(this.addressLine2)!==n(t.addressLine2)||n(this.city)!==n(t.city)||n(this.state)!==n(t.stateOrProvince)||r(this.zip)!==r(t.postalCode)}renderInputField(e,t={}){return a`<jha-form-floating-group outline small .error="${this.handleErrorMessage(e)}" .hasValue="${!!this.getValue(e)}"> <div class="label">${xe[e]}</div> <input id="${e}" type="text" name="${e}" .value="${this.getValue(e)}" @input="${this.handleChange}" @blur="${t.noBlur?null:this.handleBlur}" maxlength="${this.handleMaxLength(e)}"> </jha-form-floating-group>`}render(){return this.errorInfo?a`<div class="container"> <div class="error-header"> <div class="error-title">${`Fix Enrollment Errors`}</div> <div class="error-description"> ${`Please provide the following information to complete your enrollment.`} ${this._getRepresentativeName()?a`<br> (${this._getRepresentativeName()})`:``} </div> </div> <div class="form-section"> <div class="address-disclaimer"> ${`Enter a current home address. Commercial addresses and P.O. boxes are not accepted.`} </div> ${this.renderInputField(`addressLine1`)} ${this.renderInputField(`addressLine2`,{noBlur:!0})} <div class="row"> ${this.renderInputField(`city`)} <bannoweb-state-dropdown @select-state="${this.handleSelectedState}" @state-blur="${this.handleStateBlur}" .value="${this.state}" .error="${this.handleErrorMessage(`state`)}"></bannoweb-state-dropdown> ${this.renderInputField(`zip`)} </div> </div> <footer> <jha-button @click="${this.handleSaveAndContinue}" .isLoading="${this.loading}" sync ?disabled="${!this.isFormValid||!this.hasAddressChanges||this.loading}"> ${`Save and Continue`} </jha-button> </footer> </div>`:a`<div class="container">${`No error information available`}</div>`}},customElements.define(window.BannowebMerchantErrorsAddressForm.is,window.BannowebMerchantErrorsAddressForm),window.BannowebMerchantErrorsAddressForm;var Z=Object.freeze({BUSINESS_NAME:`businessName`,TAX_ID:`taxId`,PHONE_NUMBER:`phoneNumber`,EMAIL:`email`,ADDRESS:`address`}),Q=Object.freeze({LEGAL_NAME:`legalname`,EIN:`ein`,BUSINESS_NAME:`business_name`,TAX_ID:`tax_id`,PHONE:`phone`,PHONE_NUMBER:`phone_number`,EMAIL:`email`,EMAIL_ADDRESS:`email_address`}),Se={[Z.TAX_ID]:{maxlength:10},[Z.PHONE_NUMBER]:{maxlength:14}},Ce={[Q.LEGAL_NAME]:Z.BUSINESS_NAME,[Q.EIN]:Z.TAX_ID,[Q.BUSINESS_NAME]:Z.BUSINESS_NAME,[Q.TAX_ID]:Z.TAX_ID,[Q.PHONE]:Z.PHONE_NUMBER,[Q.PHONE_NUMBER]:Z.PHONE_NUMBER,[Q.EMAIL]:Z.E
17MAIL,[Q.EMAIL_ADDRESS]:Z.EMAIL},we=e=>Ce[e]||e;window.BannowebMerchantErrorBusinessForm=class extends r{static get is(){return`bannoweb-merchant-error-business-form`}static get styles(){return n`.container{flex-direction:column;gap:16px;padding:24px;display:flex}.error-header{margin-bottom:16px}.error-title{color:var(--body-text-primary-color);margin-bottom:8px;font-size:18px;font-weight:500}.error-description{color:var(--body-text-secondary-color);font-size:14px}.form-section{flex-direction:column;gap:16px;display:flex}.field-description{color:var(--body-text-secondary-color);margin-bottom:4px;font-size:14px}footer{justify-content:center;align-items:center;padding:16px 0 0;display:flex}jha-button{padding:0px var(--jh-space-400);display:flex}`}static get properties(){return{errorInfo:{type:Object},accountInfo:{type:Object},loading:{type:Boolean},businessName:{type:String},taxId:{type:String},phoneNumber:{type:String},email:{type:String},fieldErrors:{type:Object}}}constructor(){super(),this.errorInfo=null,this.accountInfo=null,this.loading=!1,this.businessName=``,this.taxId=``,this.phoneNumber=``,this.email=``,this.fieldErrors={[Z.BUSINESS_NAME]:``,[Z.TAX_ID]:``,[Z.PHONE_NUMBER]:``,[Z.EMAIL]:``,[Z.ADDRESS]:``}}set businessTaxId(e){this.taxId=e||``}updated(e){super.updated(e),e.has(`accountInfo`)&&this.accountInfo&&(this.businessName=this.accountInfo.businessName||``,this.phoneNumber=l.formatPhone(this.accountInfo.phoneNumber||``),this.email=this.accountInfo.email||``)}handleInputChange(e,t){let n=j(e.target?.value||``);e.target&&(e.target.value=n);let r=n;switch(t===Z.TAX_ID?r=this.formatEin(n):t===Z.PHONE_NUMBER&&(r=l.formatPhone(n)),t){case Z.BUSINESS_NAME:this.businessName=r;break;case Z.TAX_ID:this.taxId=r;break;case Z.PHONE_NUMBER:this.phoneNumber=r;break;case Z.EMAIL:this.email=r;break}this._validateField(t,r),this.requestUpdate(void 0,void 0)}_validateField(e,t){if(!t){this.fieldErrors={...this.fieldErrors,[e]:``};return}let n={[Z.BUSINESS_NAME]:()=>!t||t.trim()===``?`Field is required`:``,[Z.TAX_ID]:()=>{let e=(t||``).replace(/\D/g,``);return e?e.length===9?``:`Please enter a valid Tax ID - EIN`:`Field is required`},[Z.PHONE_NUMBER]:()=>l.cleanPhoneNumber(t).length===10?``:`Please enter a valid phone number.`,[Z.EMAIL]:()=>B(t)?``:`Please enter valid email`}[e];this.fieldErrors={...this.fieldErrors,[e]:n?n():``}}formatEin(e){let t=(e||``).replace(/\D/g,``).substring(0,9);return t.length<=2?t:`${t.substring(0,2)}-${t.substring(2)}`}sanitizeTaxId(e){return(e||``).replace(/\D/g,``)}_getFieldValue(e){switch(e){case Z.BUSINESS_NAME:return this.businessName;case Z.TAX_ID:return this.taxId;case Z.PHONE_NUMBER:return this.phoneNumber;case Z.EMAIL:return this.email;default:return``}}_isFieldValid(e){let t=this._getFieldValue(e);return!(!t||t.trim()===``||this.fieldErrors[e]||e===Z.TAX_ID&&this.sanitizeTaxId(t).length!==9||e===Z.PHONE_NUMBER&&l.cleanPhoneNumber(t).length!==10||e===Z.EMAIL&&!B(t))}get isFormValid(){return this.errorInfo?.fields?.every(e=>{let t=we(e.code);return this._isFieldValid(t)})||!1}_buildPayload(){return{businessName:this.businessName?this.businessName.trim():this.accountInfo?.businessName||``,taxId:this.taxId?this.sanitizeTaxId(this.taxId):this.accountInfo?.taxId||``,phoneNumber:this.phoneNumber?l.cleanPhoneNumber(this.phoneNumber):this.accountInfo?.phoneNumber||``,email:this.email?this.email.trim():this.accountInfo?.email||``,phoneCountryCode:this.accountInfo?.phoneCountryCode||`1`,addressLine1:(this.accountInfo?.addressLine1||``).trim(),addressLine2:(this.accountInfo?.addressLine2||``).trim(),city:(this.accountInfo?.city||``).trim(),stateOrProvince:this.accountInfo?.stateOrProvince||``,postalCode:(this.accountInfo?.postalCode||``).trim(),country:this.accountInfo?.country||`US`}}async _submitUpdate(){let e=this._buildPayload();await m.merchantController.createOrUpdateEnrollmentAccount(e)}async handleSaveAndContinue(){try{this.loading=!0,await this._submitUpdate();let e=[];this.businessName&&e.push(Z.BUSINESS_NAME),this.taxId&&e.push(Z.TAX_ID),this.phoneNumber&&e.push(Z.PHONE_NUMBER),this.email&&e.push(Z.EMAIL),e.length&&z.trackBusinessInfoFieldsFixed({fixedFields:e}),this.dispatchEvent(new CustomEvent(`error-resolved`,{bubbles:!0,composed:!0,detail:{errorId:this.errorInfo?.errorEntityId}})),this.loading=!1}catch(e){this.loading=!1,v.showStandardErrorDialog({error:e})}}_getFieldLabel(e){return{[Z.BUSINESS_NAME]:`Legal business name`,[Z.TAX_ID]:`Tax ID – EIN`,[Z.PHONE_NUMBER]:`Phone number`,[Z.EMAIL]:`Email`}[e]||e}renderField(e){let t=we(e.code),n=this._getFieldValue(t),r=this.fieldErrors[t]||``,i=Se[t]||{},o=t===Z.PHONE_NUMBER?`tel`:t===Z.EMAIL?`email`:`text`;return a`${e.description?a`<div class="field-description">${e.description}</div>`:``} <jha-form-floating-group outline small .hasValue="${!!n}" .error="${r}"> <div class="label">${this._getFieldLabel(t)}
17</div> <input type="${o}" name="${t}" .value="${n}" maxlength="${i.maxlength||``}" @input="${e=>this.handleInputChange(e,t)}" ?disabled="${this.loading}"> </jha-form-floating-group>`}render(){return this.errorInfo?a`<div class="container"> <div class="error-header"> <div class="error-title">${`Fix Enrollment Errors`}</div> <div class="error-description"> ${`Please provide the following information to complete your enrollment.`} </div> </div> <div class="form-section"> ${this.errorInfo.fields?.map(e=>a`<div>${this.renderField(e)}</div>`)} </div> <footer> <jha-button @click="${this.handleSaveAndContinue}" .isLoading="${this.loading}" sync ?disabled="${!this.isFormValid||this.loading}"> ${`Save and Continue`} </jha-button> </footer> </div>`:a`<div class="container">${`No error information available`}</div>`}},customElements.define(window.BannowebMerchantErrorBusinessForm.is,window.BannowebMerchantErrorBusinessForm),window.BannowebMerchantErrorBusinessForm;var $={addressLine1:{validate:(e,t)=>t?!e||e.trim()===``:!1,errorMsg:`Please enter a valid address`},city:{validate:(e,t)=>t?!e||e.trim()===``:!1,errorMsg:`Please enter a valid city`},stateOrProvince:{validate:(e,t)=>t?!e:!1,errorMsg:`Please select a state`},postalCode:{validate:(e,t)=>t?!e||!x(e):e.length>0&&!x(e),errorMsg:`Please enter valid zip`}},Te={postalCode:5},Ee={addressLine1:`Street line 1`,addressLine2:`Street address 2 (optional)`,city:`City`,stateOrProvince:`State`,postalCode:`Zipcode`};window.BannowebMerchantErrorBusinessAddressForm=class extends r{static get is(){return`bannoweb-merchant-error-business-address-form`}static get styles(){return n`.container{flex-direction:column;gap:16px;padding:24px;display:flex}.error-header{margin-bottom:16px}.error-title{color:var(--body-text-primary-color);margin-bottom:8px;font-size:18px;font-weight:500}.error-description{color:var(--body-text-secondary-color);font-size:14px}.form-section{flex-direction:column;gap:16px;display:flex}.row{gap:16px;display:flex}.address-disclaimer{color:var(--body-text-secondary-color);padding:12px 0;font-size:14px;font-style:normal;font-weight:400}footer{justify-content:center;align-items:center;padding:16px 0 0;display:flex}jha-button{padding:0px var(--jh-space-400);display:flex}`}static get properties(){return{errorInfo:{type:Object},accountInfo:{type:Object},loading:{type:Boolean},addressLine1:{type:String},addressLine2:{type:String},city:{type:String},stateOrProvince:{type:String},postalCode:{type:String},errors:{type:Object},touched:{type:Object}}}constructor(){super(),this.errorInfo=null,this.accountInfo=null,this.loading=!1,this.addressLine1=``,this.addressLine2=``,this.city=``,this.stateOrProvince=``,this.postalCode=``,this.errors={addressLine1:!1,city:!1,stateOrProvince:!1,postalCode:!1},this.touched={addressLine1:!1,city:!1,stateOrProvince:!1,postalCode:!1}}updated(e){super.updated(e),e.has(`accountInfo`)&&this.accountInfo&&this.loadExistingAddress()}loadExistingAddress(){this.addressLine1=this.accountInfo.addressLine1||``,this.addressLine2=this.accountInfo.addressLine2||``,this.city=this.accountInfo.city||``,this.stateOrProvince=this.accountInfo.stateOrProvince||``,this.postalCode=this.accountInfo.postalCode||``}getFieldValue(e){switch(e){case`addressLine1`:return this.addressLine1;case`addressLine2`:return this.addressLine2;case`city`:return this.city;case`stateOrProvince`:return this.stateOrProvince;case`postalCode`:return this.postalCode;default:return``}}setFieldValue(e,t){switch(e){case`addressLine1`:this.addressLine1=t;break;case`addressLine2`:this.addressLine2=t;break;case`city`:this.city=t;break;case`stateOrProvince`:this.stateOrProvince=t;break;case`postalCode`:this.postalCode=t;break}}getValue(e){return e===`postalCode`?this.formatZip(this.postalCode):this.getFieldValue(e)}formatZip(e){return(e||``).replace(/\D/g,``).substring(0,5)}handleChange(e){let t=e.target.name||e.currentTarget.getAttribute(`name`),n=j(e.detail?.value??e.target.value);e.target&&(e.target.value=n);let r=n;t===`postalCode`&&(r=this.formatZip(n)),this.setFieldValue(t,r);let i=$[t];i&&(this.errors={...this.errors,[t]:i.validate(r,!1)})}handleBlur(e){let{name:t}=e.target;this.touched={...this.touched,[t]:!0},this.updateErrorState(t)}updateErrorState(e){let t=$[e];t&&(this.errors={...this.errors,[e]:t.validate(this.getFieldValue(e),!0)})}handleErrorMessage(e){if(!this.touched[e])return``;let t=$[e];return t&&this.errors[e]?t.errorMsg:``}handleMaxLength(e){return Te[e]||``}handleSelectedState(e){let t=e.detail??``;this.stateOrProvince=t,this.touched={...this.touched,stateOrProvince:!0},this.errors={...this.errors,stateOrProvince:!t}}handleStateBlur(){this.touched={...this.touched,stateOrProvince:!0},this.updateErrorState(`stateOrProvince`)}_buildPayload(){return{businessName:(this.accountInfo?.businessName||``).trim(),taxId:(this.accountInfo?.taxId||``).trim(),phoneNumber:this.accountInfo?.phoneNumber||``,phoneCountryCode:this.accountInfo?.phoneCountryCode||`1`,addressLine1:this.addressLine1.trim(),addressLine2:this.addressLine2.trim(),city:this.city.trim(),stateOrProvince:this.stateOrProvince,postalCode:this.postalCode.trim(),country:this.accountInfo?.country||`US`}}async _submitUpdate(){let e=this._buildPayload();await m.merchantController.createOrUpdateEnrollmentAccount(e)}async handleSaveAndContinue(){try{this.loading=!0,await this._submitUpdate(),z.trackBusinessInfoFieldsFixed({fixedFields:[`address`]}),this.dispatchEvent(new CustomEvent(`error-resolved`,{bubbles:!0,composed:!0,detail:{errorId:this.errorInfo?.errorEntityId}})),this.loading=!1}catch(e){this.loading=!1,v.showStandardErrorDialog({error:e})}}get isFormValid(){return[`addressLine1`,`city`,`stateOrProvince`,`postalCode`].every(e=>{let t=this.getFieldValue(e);return!(!t||t.trim()===``||this.errors[e])})}renderInputField(e,t={}){return a`<jha-form-floating-group outline small .error="${this.handleErrorMessage(e)}" .hasValue="${!!this.getValue(e)}"> <div class="label">${Ee[e]}</div> <input id="${e}" type="text" name="${e}" .value="${this.getValue(e)}
17" @input="${this.handleChange}" @blur="${t.noBlur?null:this.handleBlur}" maxlength="${this.handleMaxLength(e)}"> </jha-form-floating-group>`}render(){return this.errorInfo?a`<div class="container"> <div class="error-header"> <div class="error-title">${`Fix Enrollment Errors`}</div> <div class="error-description"> ${`Please provide the following information to complete your enrollment.`} </div> </div> <div class="form-section"> <div class="address-disclaimer">${`Enter your business's physical operating address. P.O. boxes and mailing services aren't allowed.`}</div> ${this.renderInputField(`addressLine1`)} ${this.renderInputField(`addressLine2`,{noBlur:!0})} <div class="row"> ${this.renderInputField(`city`)} <bannoweb-state-dropdown @select-state="${this.handleSelectedState}" @state-blur="${this.handleStateBlur}" .value="${this.stateOrProvince}" .error="${this.handleErrorMessage(`stateOrProvince`)}"></bannoweb-state-dropdown> ${this.renderInputField(`postalCode`)} </div> </div> <footer> <jha-button @click="${this.handleSaveAndContinue}" .isLoading="${this.loading}" sync ?disabled="${!this.isFormValid||this.loading}"> ${`Save and Continue`} </jha-button> </footer> </div>`:a`<div class="container">${`No error information available`}</div>`}},customElements.define(window.BannowebMerchantErrorBusinessAddressForm.is,window.BannowebMerchantErrorBusinessAddressForm),window.BannowebMerchantErrorBusinessAddressForm;var De=te(r,`fadeinup`);window.BannowebMerchantEnrollment=class extends De{static get is(){return`bannoweb-merchant-enrollment`}static get styles(){return n`jha-card{max-width:600px;top:40px}:host{background-size:100%;flex:1 0 auto;display:block}:host([isMobile]) jha-card{max-width:none;max-height:calc(100dvh - 72px);margin:0;padding:0;position:absolute;top:56px;left:16px;right:16px;overflow-y:auto}jha-slider-pane[pricing-agreement]{padding:0}jha-slider-pane[settlement-account]{padding:0px var(--jha-content-inset)}jha-slider-pane[complete] bannoweb-confirmation-dialog{--bannoweb-confirmation-icon-color:var(--body-text-completed-color)}@media (width<=600px){jha-card{max-width:none;max-height:calc(100dvh - 72px);margin:0;padding:0;position:absolute;top:56px;left:16px;right:16px;overflow-y:auto}}`}static get properties(){return{loading:{type:Boolean},accounts:{type:Array},focusedPane:{type:String},generalChecked:{type:Boolean},pricingChecked:{type:Boolean},accountChecked:{type:Boolean},transactionChecked:{type:Boolean},fulfillmentChecked:{type:Boolean},declareRepresentativesChecked:{type:Boolean},industries:{type:Array},selectedGroup:{type:Object},selectedIndustry:{type:Object},selectedAccount:{type:String},enrollmentStatus:{type:String},hasDeclareRepresentatives:{type:Boolean},ownersProvided:{type:Boolean},generalDetails:{type:Object},generalInProgress:{type:Boolean},pricingInProgress:{type:Boolean},accountInProgress:{type:Boolean},businessRepsInProgress:{type:Boolean},businessReps:{type:Array},feePlan:{type:Object},editBusinessRep:{type:Object},isEdit:{type:Boolean},feeData:{type:Array},isMobile:{type:Boolean,reflect:!0},feeDataLoading:{type:Boolean},hasErrors:{type:Boolean},errors:{type:Array},currentError:{type:Object},accountInfo:{type:Object},businessTaxId:{type:String},businessTaxIdMasked:{type:String},hidePricingAgreement:{type:Boolean}}}constructor(){super(),e(()=>import(`./icon-chevron-left-f3OZxuwt.js`).then(e=>e.t),[]),e(()=>import(`./icon-trash-can-BdGHS1VD.js`).then(e=>e.t),[]),this.focusedPane=f.LANDING,this.generalChecked=!1,this.pricingChecked=!1,this.accountChecked=!1,this.transactionChecked=!1,this.fulfillmentChecked=!1,this.businessReps=[],this.industries=[],this.selectedGroup={},this.selectedIndustry={},this.selectedAccount=``,this.accounts=[],this.generalDetails=null,this.fulfillmentDetails=null,this.transactionAndCardDetails=null,this.generalInProgress=!1,this.pricingInProgress=!1,this.accountInProgress=!1,this.businessRepsInProgress=!1,this.hasDeclareRepresentatives=!1,this.ownersProvided=!1,this.declareRepresentativesChecked=!1,this.loading=!1,this.showFulfillment=!1,this.feePlan={},this.editBusinessRep=null,this.isEdit=!1,this.feeData=[],this.isMobile=!1,this.feeDataLoading=!1,this.hasErrors=!1,this.errors=[],this.currentError=null,this.accountInfo=null,this.businessTaxId=``,this.businessTaxIdMasked=``,this.hidePricingAgreement=!1,this.enrollmentStatus=m.merchantController.getStoredEnrollmentStatus(),this.exitTracked_=!1,this.onBeforeUnload_=null}async handleResumeOrGetStarted(e){this.hasDeclareRepresentatives=e.detail,await this.loadEnrollmentAccountInfo(),this.businessTaxIdMasked||await this.loadBusinessTaxId(),this.focusedPane=f.CONFIRM_BUSINESS_INFO}async loadAccounts(){try{this.accounts=(await m.merchantController.getBankAccounts()).bankAccounts}catch(e){v.showStandardErrorDialog({error:e})}}async getIndustries(){try{this.industries=await m.merchantController.getIndustries()}catch(e){v.showStandardErrorDialog({error:e})}}async resolveHidePricingAgreement(){this.hidePricingAgreement=ce(window.location.pathname)?oe(new URLSearchParams(window.location.search)):await m.merchantController.isLaunchDarklyPricingAgreementEnabled()}async loadFeeData(){try{this.feeDataLoading=!0;let e=await m.merchantController.getMerchantEnrollmentFeePlan();this.feeData=e.fees}catch(e){v.showStandardErrorDialog({error:e})}finally{this.feeDataLoading=!1}}async resolvePricingAndLoadFeeData(){return await this.resolveHidePricingAgreement(),this.loadFeeData()}async loadEnrollmentAccountInfo(){try{this.accountInfo=await m.merchantController.getEnrollmentAccount(),this.businessTaxIdMasked=this.accountInfo.taxIdMasked}catch(e){v.showStandardErrorDialog({error:e})}}async loadBusinessTaxId(){try{let e=await m.merchantController.getBusinessTaxId();this.businessTaxId=e?.taxId||``,this.businessTaxIdMasked=e?.taxIdMasked||``}catch(e){t.console.error(`Failed to load tax ID:`,e)}}
17async loadTaxIdData_(){await this.loadEnrollmentAccountInfo(),this.businessTaxIdMasked||await this.loadBusinessTaxId()}handleTabClick(e){switch([f.SETTLEMENT_ACCOUNT,f.EXT_SETTLEMENT_ACCOUNT].includes(e.detail)&&this.loadAccounts(),e.detail){case f.EXT_PRICING_AGREEMENT:case f.PRICING_AGREEMENT:this.resolvePricingAndLoadFeeData();break}this.focusedPane=e.detail}handleErrorClick(e){this.currentError=e.detail.error,this.focusedPane=e.detail.focusPaneId}handleErrorResolved(){if(this.currentError){let e=this.currentError.errorType===h.BUSINESS;this.errors=this.errors.filter(e=>e!==this.currentError),this.hasErrors=this.errors.length>0,this.currentError=null,e&&this.loadEnrollmentAccountInfo()}if(!this.errors.length){this.focusedPane=f.PENDING_REVIEW;return}this.isExtendedUnderwriting?this.focusedPane=f.EXTENDED_DIRECTORY:this.focusedPane=f.AGREEMENT_DIRECTORY}connectedCallback(){switch(super.connectedCallback(),this.onBeforeUnload_=()=>this.trackExit_(),window.addEventListener(`beforeunload`,this.onBeforeUnload_),this.enrollmentStatus){case d.CANNOT_ENROLL:u.go(`/`);break;case d.PENDING_FINALIZATION:case d.PENDING_REVIEW:this.focusedPane=f.PENDING_REVIEW;break;case d.ENROLLING:this.loadEnrollmentAndTrackResume_(),this.getIndustries(),this.loadTaxIdData_();break;case d.ERRORS_EXIST:this.loadEnrollmentAndTrackResumeWithErrors_(),this.getIndustries(),this.resolvePricingAndLoadFeeData(),this.loadTaxIdData_();break;case d.NOT_ENROLLED:this.getIndustries(),this.resolvePricingAndLoadFeeData();break}}disconnectedCallback(){window.removeEventListener(`beforeunload`,this.onBeforeUnload_),super.disconnectedCallback(),Promise.resolve().then(()=>{this.isConnected||this.trackExit_()})}trackExit_(){if(this.exitTracked_)return;this.exitTracked_=!0;let e=this.focusedPane===f.COMPLETE?p.COMPLETED:p.USER_DISMISSED,t=null;this.focusedPane===f.LANDING&&(t=(this.shadowRoot?.querySelector(`bannoweb-merchant-enrollment-landing`))?.getCurrentSlideName()||null),z.trackEnrollmentProcessClosed({focusedPane:this.focusedPane,lastSlide:t,generalChecked:this.generalChecked,pricingChecked:this.pricingChecked,accountChecked:this.accountChecked,transactionChecked:this.transactionChecked,fulfillmentChecked:this.showFulfillment&&this.fulfillmentChecked,declareRepresentativesChecked:this.hasDeclareRepresentatives&&this.declareRepresentativesChecked,exitReason:e,hidePricingAgreement:this.hidePricingAgreement})}async loadEnrollmentAndTrackResume_(){let e=await this.getEnrollmentInformationAndSetFocusPane();this.trackEnrollmentResumed_(e)}async loadEnrollmentAndTrackResumeWithErrors_(){await this.getEnrollmentInformationAndSetFocusPane();try{z.trackEnrollmentResumedWithErrors()}catch(e){t.console.error(`Failed to track enrollment resumed with errors:`,e)}}trackEnrollmentResumed_(e){try{e&&z.trackEnrollmentResumed(e)}catch(e){t.console.error(`Failed to track enrollment resumed:`,e)}}setPendingStates(e){if(e?.generalDetails){let t={...e.generalDetails};delete t.website;let n=P(t);n&&(this.generalChecked=!0),this.generalInProgress=!n}this.accountInProgress=!e?.settlementAccount?.selectedAccount,this.accountChecked=!!e?.settlementAccount?.selectedAccount,this.pricingChecked=!!e?.feePlan?.hasAccepted,e?.declareRepresentatives?(this.hasDeclareRepresentatives=!0,this.ownersProvided=!!e?.declareRepresentatives?.ownersProvided,this.declareRepresentativesChecked=!!e?.declareRepresentatives?.representatives?.length&&w(e?.declareRepresentatives?.representatives)):this.declareRepresentativesChecked=!0,this.transactionChecked=!!e?.transactionAndCardDetails&&P(e.transactionAndCardDetails),this.showFulfillment=!!e?.fulfillmentDetails,this.fulfillmentChecked=this.showFulfillment?P(e.fulfillmentDetails):!0,this.confirmGeneralDetailsCompleted()}async getEnrollmentInformationAndSetFocusPane(){try{this.loading=!0;let e=await m.merchantController.fetchEnrollmentStatus(),t=await m.merchantController.getEnrollmentInfo();return(e.status===d.ERRORS_EXIST||t?.errors?.length>0)&&(this.hasErrors=!0,this.errors=[...t.errors]),this.generalDetails=t?.generalDetails,this.transactionAndCardDetails=t?.transactionAndCardDetail
17s,this.fulfillmentDetails=t?.fulfillmentDetails,this.selectedAccount=t?.settlementAccount?.selectedAccount??``,this.businessReps=t?.declareRepresentatives.representatives,this.feePlan=t?.feePlan,await this.resolveHidePricingAgreement(),e.status===d.ERRORS_EXIST?this.focusedPane=f.AGREEMENT_DIRECTORY:this.focusedPane=f.CONFIRM_BUSINESS_INFO,this.setPendingStates(t),this.loading=!1,t}catch(e){return v.showStandardErrorDialog({error:e}),this.loading=!1,null}}resolveNextPane(e){if(!this.hidePricingAgreement)return e;switch(e){case f.PRICING_AGREEMENT:return this.loadAccounts(),f.SETTLEMENT_ACCOUNT;case f.EXT_PRICING_AGREEMENT:return this.loadAccounts(),f.EXT_SETTLEMENT_ACCOUNT;default:return e}}checkRadioCompletedOrSetNextFocusPane(e){let{completedKey:t}=e.detail,n=this.resolveNextPane(e.detail.nextFocusPane);if(t===f.NONE){this.focusedPane=n;return}switch(t){case f.CONFIRM_BUSINESS_INFO:this.focusedPane=n,this.confirmGeneralDetailsCompleted();break;case f.EXT_TRANSACTION_DETAILS:e.detail?.fulfillmentDetails&&(this.showFulfillment=!0),this.transactionChecked=!0,this.confirmGeneralDetailsCompleted(),this.focusedPane=n;break;case f.EXT_FULFILLMENT_DETAILS:if(this.loadAccounts(),this.fulfillmentChecked=!0,this.confirmGeneralDetailsCompleted(),this.accountChecked){this.focusedPane=f.EXTENDED_DIRECTORY;break}this.focusedPane=n;break;case f.EXT_GENERAL_DETAILS:case f.GENERAL_DETAILS:this.resolvePricingAndLoadFeeData(),this.generalChecked=!0,this.transactionAndCardDetails=e.detail?.transactionCardAndDetails,this.showFulfillment=!!e.detail?.fulfillmentDetails,this.transactionAndCardDetails&&!this.showFulfillment&&(this.fulfillmentChecked=!0),this.confirmGeneralDetailsCompleted(),this.focusedPane=n;break;case f.EXT_PRICING_AGREEMENT:case f.PRICING_AGREEMENT:let t=e.detail.updatedGeneralInformation;this.focusedPane=n,this.loadAccounts(),this.pricingChecked=!!t?.feePlan?.hasAccepted;break;case f.EXT_SETTLEMENT_ACCOUNT:case f.SETTLEMENT_ACCOUNT:this.hasDeclareRepresentatives=!!e.detail?.declareRepresentatives,this.ownersProvided=!!e.detail?.declareRepresentatives?.ownersProvided,this.loadAccounts(),this.accountChecked=!0,this.focusedPane=n;break;case f.BUSINESS_REPRESENTATIVES:case f.BUSINESS_REPRESENTATIVE_FORM:if(this.isEdit&&this.businessReps.length>1){let t=e.detail.representative.id;this.businessReps=this.businessReps.filter(e=>e.id!==t)}this.editBusinessRep=null,this.focusedPane=n,this.ownersProvided=!!e.detail?.ownersProvided,this.declareRepresentativesChecked=this.businessReps?.length&&w(this.businessReps);break;case f.EDIT_BUSINESS_INFO:this.loadEnrollmentAccountInfo(),this.businessTaxIdMasked||this.loadBusinessTaxId(),this.focusedPane=n;break;default:break}}onBackClick(){switch(this.focusedPane){case f.LANDING:case f.PRICING_AGREEMENT:case f.SETTLEMENT_ACCOUNT:case f.GENERAL_DETAILS:this.focusedPane=f.AGREEMENT_DIRECTORY;break;case f.EXT_PRICING_AGREEMENT:case f.EXT_SETTLEMENT_ACCOUNT:case f.EXT_GENERAL_DETAILS:case f.EXT_TRANSACTION_DETAILS:case f.EXT_FULFILLMENT_DETAILS:this.focusedPane=f.EXTENDED_DIRECTORY;break;case f.SEARCH_GROUP_LIST:this.focusedPane=f.GENERAL_DETAILS;break;case f.SEARCH_INDUSTRY_LIST:this.selectedGroup=[],this.focusedPane=f.SEARCH_GROUP_LIST;break;case f.BUSINESS_REPRESENTATIVE_FORM:this.focusedPane=f.BUSINESS_REPRESENTATIVES,this.editBusinessRep=null,this.isEdit=!1,this.requestUpdate(void 0,void 0);break;case f.BUSINESS_REPRESENTATIVES:this.isExtendedUnderwriting?this.focusedPane=f.EXTENDED_DIRECTORY:this.focusedPane=f.AGREEMENT_DIRECTORY;break;case f.ERROR_FORM:case f.ERROR_ADDRESS_FORM:case f.ERROR_BUSINESS_FORM:case f.ERROR_BUSINESS_ADDRESS_FORM:this.transactionAndCardDetails?this.focusedPane=f.EXTENDED_DIRECTORY:this.focusedPane=f.AGREEMENT_DIRECTORY,this.currentError=null;break;case f.CONFIRM_BUSINESS_INFO:this.transactionAndCardDetails?this.focusedPane=f.EXTENDED_DIRECTORY:this.focusedPane=f.AGREEMENT_DIRECTORY;break;case f.EDIT_BUSINESS_INFO:this.focusedPane=f.CONFIRM_BUSINESS_INFO;break;default:this.focusedPane=f.LANDING;break}}async gotoRoute(e=`/`){await m.merchantController.fetchEnrollmentStatus(),u.go(e),e===`/`&&setTimeout(()=>window.location.reload())}backToDashboard(){this.trackExit_(),this.isMobile?window.close():this.gotoRoute(`/`)}handleSearchClick(){this.focusedPane=f.SEARCH_GROUP_LIST}handleSelectGroup(e){if(this.selectedGroup=e.detail,this.selectedGroup.name){this.focusedPane=f.GENERAL_DETAILS,this.selectedIndustry=this.selectedGroup;return}this.focusedPane=f.SEARCH_INDUSTRY_LIST}handleSelectIndustry(e){this.selectedIndustry=e.detail,this.selectedGroup=[],this.focusedPane=f.GENERAL_DETAILS}handleCannotEnroll(e){if(e.detail===d.PENDING_REVIEW){this.focusedPane=f.PENDING_REVIEW;return}if(e.detail===d.PENDING_FINALIZATION){this.focusedPane=f.PENDING_FINALIZATION;return}this.focusedPane=f.UNSUPPORTED}handleEnrolledOnInit(e){this.gotoRoute(`/merchant`)}onSuccessFormSubmit(e){if(e.detail.representative){if(this.isEdit){let t=e.detail.representative;this.businessReps=this.businessReps.reduce((e,n)=>(n.id===t.id?e.push(t):e.push(n),e),[])}else this.businessReps=[...this.businessReps,e.detail.representative];this.isEdit=!1,this.editBusinessRep=null}this.checkRadioCompletedOrSetNextFocusPane(e)}onBusinessRepEdit(e){this.editBusinessRep=e.detail.edit,this.isEdit=!0,this.focusedPane=e.detail.nextFocusPane}handleEditBusinessInfo(){this.focusedPane=f.EDIT_BUSINESS_INFO}getIndustyNameById(e){return e?F(this.industries)?.find(t=>
17t.id===e)?.name??``:``}confirmGeneralDetailsCompleted(){if(!this.isExtendedUnderwriting){this.generalInProgress=!this.generalChecked;return}let e=this.generalChecked&&this.transactionChecked&&this.fulfillmentChecked;this.generalInProgress=!e}maybeRenderBackButton(){let e=[f.UNSUPPORTED,f.AGREEMENT_DIRECTORY,f.LANDING,f.EXTENDED_DIRECTORY,f.COMPLETE,f.PENDING_FINALIZATION,f.PENDING_REVIEW,f.CONFIRM_BUSINESS_INFO],t=[d.ENABLED,d.PENDING_REVIEW];if(!(e.includes(this.focusedPane)||t.includes(this.enrollmentStatus)))return a`<jha-button icon id="backBtn" sync @click="${this.onBackClick}" slot="header-left" type="button"> <jh-icon-chevron-left aria-label="${`Back`}" aria-hidden="false"></jh-icon-chevron-left> </jha-button>`}async openDeleteRepresentativeDialog(e){await v.showDialog({title:`Delete representative`,description:`Are you sure you want to delete this business representative?`,confirmButtonText:`Delete`,cancelButtonText:`Cancel`,showWarningIcon:!0}).then(()=>this.handleDeleteBusinessRep())}async handleDeleteBusinessRep(){try{this.loading=!0;let e=this.editBusinessRep,t=this.editBusinessRep?.id;await m.merchantController.deleteRepresentatives(t),this.loading=!1,this.businessReps=this.businessReps.filter(e=>e.id!==t),z.trackRepresentativeDeleted(e,this.businessReps.length),this.editBusinessRep=null,this.isEdit=!1,this.ownersProvided=!1,this.declareRepresentativesChecked=this.businessReps?.length&&w(this.businessReps),this.focusedPane=f.BUSINESS_REPRESENTATIVES}catch(e){this.loading=!1,v.showStandardErrorDialog({error:e})}}maybeRenderDeleteBusinessRep(){if(this.isEdit&&this.focusedPane===f.BUSINESS_REPRESENTATIVE_FORM)return a`<jha-button icon id="backBtn" sync @click="${this.openDeleteRepresentativeDialog}" slot="header-right" type="button"> <jh-icon-trash-can aria-label="${`Delete`}" aria-hidden="false"></jh-icon-trash-can> </jha-button>`}getEditBusinessRepName(){return`Edit ${this.editBusinessRep.firstName} ${this.editBusinessRep.lastName}`}getTitle(){switch(this.focusedPane){case f.SEARCH_INDUSTRY_LIST:return this.selectedGroup?.groupName;case f.SEARCH_GROUP_LIST:return`Search industries`;case f.BUSINESS_REPRESENTATIVES:return`Business representatives`;case f.BUSINESS_REPRESENTATIVE_FORM:return this.isEdit?`(${this.getEditBusinessRepName()})`:`Add representative`;case f.ERROR_FORM:case f.ERROR_ADDRESS_FORM:case f.ERROR_BUSINESS_FORM:case f.ERROR_BUSINESS_ADDRESS_FORM:return`Fix Enrollment Errors`;case f.CONFIRM_BUSINESS_INFO:return`Confirm your details`;case f.EDIT_BUSINESS_INFO:return`Confirm your details`;default:return`Merchant agreement`}}maybeRenderHeader(){return[f.LANDING,f.PENDING_REVIEW,f.COMPLETE,f.UNSUPPORTED].includes(this.focusedPane)?``:a`<jha-card-header center-header slot="header" .loading="${this.loading}"> ${this.maybeRenderBackButton()} ${this.maybeRenderDeleteBusinessRep()} <h1>${this.getTitle()}</h1> </jha-card-header>`}get isExtendedUnderwriting(){return!!this.transactionAndCardDetails}async routeEnter(e,t,n,r){return n===o.BANNOWEB_MERCHANT_ENROLLMENT_MOBILE&&(this.isMobile=!0),s.trackPageView(u.getRouteUrlWithoutParams(r),n),z.trackEnrollmentFlowViewed(),super.routeEnter(e,t,n,r)}render(){if(this.enrollmentStatus===d.CANNOT_ENROLL)return``;let e=`Your work here is done and under review`,t=`Reviewing your submission can take anywhere from a few minutes to a few business days. We’ll notify you when it’s ready.`,n=this.isMobile?`Close`:`Back to Dashboard`;return a`<bannoweb-page-container> <jha-card> ${this.maybeRenderHeader()} <jha-slider> <jha-slider-content .focusedPane="${this.focusedPane}"> <jha-slider-pane landing one focus> <bannoweb-merchant-enrollment-landing .loading="${this.loading}" .active="${this.focusedPane===f.LANDING}" .isMobile="${this.isMobile}" .feeData="${this.feeData}" .feeDataLoading="${this.feeDataLoading}" @fail="${this.handleCannotEnroll}" @initEnrolled="${this.handleEnrolledOnInit}" @success="${this.handleResumeOrGetStarted}"></bannoweb-merchant-enrollment-landing> </jha-slider-pane> <jha-slider-pane confirm-business-info> <bannoweb-merchant-confirm-business-info .isExtended="${this.isExtendedUnderwriting}" .accountInfo="${this.accountInfo}" .taxIdMasked="${this.businessTaxIdMasked}" @success="${this.onSuccessFormSubmit}" @edit="${this.handleEditBusinessInfo}"></bannoweb-merchant-confirm-business-info> </jha-slider-pane> <jha-slider-pane edit-business-info> <bannoweb-merchant-edit-business-info .accountInfo="${this.accountInfo}" .businessTaxId="${this.businessTaxId}" .active="${this.focusedPane===f.EDIT_BUSINESS_INFO}" @success="${this.onSuccessFormSubmit}"></bannoweb-merchant-edit-business-info> </jha-slider-pane> <jha-slider-pane agreement-directory> <bannoweb-merchant-agreement-directory .generalChecked="${this.generalChecked}" .hidePricingAgreement="${this.hidePricingAgreement}" .pricingChecked="${this.pricingChecked}" .accountChecked="${this.accountChecked}" .hasDeclareRepresentatives="${this.hasDeclareRepresentatives}" .ownersProvided="${this.ownersProvided}" .generalInProgress="${this.generalInProgress}" .pricingInProgress="${this.pricingInProgress}" .accountInProgress="${this.accountInProgress}" .declareRepresentativesChecked="${this.declareRepresentativesChecked}" .hasErrors="${this.hasErrors}" .errors="${this.errors}" @enrollment-success="${this.onSuccessFormSubmit}" @fail="${this.handleCannotEnroll}" @tab-click="${this.handleTabClick}" .businessReps="${this.businessReps}" @error-click="${this.handleErrorClick}
17"></bannoweb-merchant-agreement-directory> </jha-slider-pane> <jha-slider-pane extended-directory> <bannoweb-merchant-extended-directory .generalChecked="${this.generalChecked}" .generalInProgress="${this.generalInProgress}" .hidePricingAgreement="${this.hidePricingAgreement}" .pricingChecked="${this.pricingChecked}" .accountChecked="${this.accountChecked}" .transactionChecked="${this.transactionChecked}" .fulfillmentChecked="${this.fulfillmentChecked}" .showFulfillment="${this.showFulfillment}" .hasDeclareRepresentatives="${this.hasDeclareRepresentatives}" .ownersProvided="${this.ownersProvided}" .declareRepresentativesChecked="${this.declareRepresentativesChecked}" .isMobile="${this.isMobile}" .hasErrors="${this.hasErrors}" .errors="${this.errors}" @enrollment-success="${this.onSuccessFormSubmit}" @fail="${this.handleCannotEnroll}" @tab-click="${this.handleTabClick}" .businessReps="${this.businessReps}" @error-click="${this.handleErrorClick}"></bannoweb-merchant-extended-directory> </jha-slider-pane> <jha-slider-pane general-details extended-general-details> <bannoweb-merchant-enrollment-general-requirements .industries="${F(this.industries)}" .industry="${this.selectedIndustry?.name??this.getIndustyNameById(this.generalDetails?.industryId)}" .businessType="${le?.[this.generalDetails?.businessType]??``}" .email="${this.generalDetails?.email??``}" .monthlyVolume="${ie[this.generalDetails?.monthlyVolumeRange]??``}" .website="${this.generalDetails?.website??``}" .geo="${pe[this.generalDetails?.geographicReach]??``}" .description="${this.generalDetails?.description??``}" @success="${this.onSuccessFormSubmit}" @search-click="${this.handleSearchClick}" @extended-enrollment="${this.onSuccessFormSubmit}"></bannoweb-merchant-enrollment-general-requirements> </jha-slider-pane> <jha-slider-pane search-group-list> <bannoweb-merchant-industry-list .showClickArrow="${!0}" .data="${de(this.industries)}" .industries="${F(this.industries)}" .dataKey="${`groupName`}" .inputName="${this.selectedGroup?.groupName??``}" .selected="${this.selectedIndustry}" ?showInput="${!0}" @select="${this.handleSelectGroup}"></bannoweb-merchant-industry-list> </jha-slider-pane> <jha-slider-pane search-industry-list> <bannoweb-merchant-industry-list .showClickArrow="${!1}" ?showInput="${!0}" .data="${this.selectedGroup?.industries}" .dataKey="${`name`}" .inputName="${this.selectedGroup?.groupName??``}" .selected="${this.selectedIndustry}" @select="${this.handleSelectIndustry}"></bannoweb-merchant-industry-list> </jha-slider-pane> <jha-slider-pane extended-transaction-details> <bannoweb-merchant-transaction-details .transactionAndCardDetails="${this.transactionAndCardDetails}" .generalDetails="${this.generalDetails}" @success="${this.onSuccessFormSubmit}"></bannoweb-merchant-transaction-details> </jha-slider-pane> <jha-slider-pane extended-fulfillment-details> <bannoweb-merchant-fulfillment-details .fulfillmentDetails="${this.fulfillmentDetails}" @success="${this.onSuccessFormSubmit}"></bannoweb-merchant-fulfillment-details> </jha-slider-pane> <jha-slider-pane pricing-agreement extended-pricing-agreement> <bannoweb-merchant-pricing .showTitle="${!0}" .feeData="${this.feeData}" .focusedPane="${this.focusedPane}" .loading="${this.feeDataLoading}" .isExtended="${this.isExtendedUnderwriting}" @success="${this.onSuccessFormSubmit}"></bannoweb-merchant-pricing> </jha-slider-pane> <jha-slider-pane settlement-account extended-settlement-account> <bannoweb-merchant-settlement-account .selectedAccount="${this.selectedAccount}" .accounts="${this.accounts}" .isExtended="${this.isExtendedUnderwriting}" .isMobile="${this.isMobile}" @success="${this.onSuccessFormSubmit}"></bannoweb-merchant-settlement-account> </jha-slider-pane> <jha-slider-pane business-representatives> <bannoweb-merchant-business-representatives .isExtended="${this.isExtendedUnderwriting}" .representatives="${this.businessReps}" @success="${this.onSuccessFormSubmit}" @edit="${this.onBusinessRepEdit}"></bannoweb-merchant-business-representatives> </jha-slider-pane> <jha-slider-pane business-representative-form> <bannoweb-merchant-business-representative-form @success="${this.onSuccessFormSubmit}" .editBusinessRep="${this.editBusinessRep}" .representatives="${this.businessReps}" .isEdit="${this.isEdit}" .isMobile="${this.isMobile}"></bannoweb-merchant-business-representative-form>
17 </jha-slider-pane> <jha-slider-pane error-form> <bannoweb-merchant-error-form .errorInfo="${this.currentError}" .isExtendedUnderwriting="${!!this.transactionAndCardDetails}" .transactionAndCardDetails="${this.transactionAndCardDetails}" .businessReps="${this.businessReps}" .generalDetails="${this.generalDetails}" .fulfillmentDetails="${this.fulfillmentDetails}" @error-resolved="${this.handleErrorResolved}"></bannoweb-merchant-error-form> </jha-slider-pane> <jha-slider-pane error-address-form> <bannoweb-merchant-errors-address-form .errorInfo="${this.currentError}" .isExtendedUnderwriting="${!!this.transactionAndCardDetails}" .businessReps="${this.businessReps}" @error-resolved="${this.handleErrorResolved}"></bannoweb-merchant-errors-address-form> </jha-slider-pane> <jha-slider-pane error-business-form> <bannoweb-merchant-error-business-form .errorInfo="${this.currentError}" .accountInfo="${this.accountInfo}" .businessTaxId="${this.businessTaxId}" @error-resolved="${this.handleErrorResolved}"></bannoweb-merchant-error-business-form> </jha-slider-pane> <jha-slider-pane error-business-address-form> <bannoweb-merchant-error-business-address-form .errorInfo="${this.currentError}" .accountInfo="${this.accountInfo}" @error-resolved="${this.handleErrorResolved}"></bannoweb-merchant-error-business-address-form> </jha-slider-pane> <jha-slider-pane complete> <bannoweb-confirmation-dialog .hideCloseButton="${!0}" .header="${`Great news!`}" .description="${`You’re ready to accept card payments.`}" .confirmButtonText="${`Start accepting payments`}" @confirm="${()=>this.isMobile?window.close():this.gotoRoute(`/merchant`)}"></bannoweb-confirmation-dialog> </jha-slider-pane> <jha-slider-pane pending-review> <bannoweb-confirmation-dialog .icon="${`circle-checkmark`}" .hideCloseButton="${!0}" .header="${e}" .description="${t}" .confirmButtonText="${n}" @confirm="${this.backToDashboard}"></bannoweb-confirmation-dialog> </jha-slider-pane> <jha-slider-pane pending-finalization> <bannoweb-confirmation-dialog .icon="${`circle-checkmark`}" .hideCloseButton="${!0}" .header="${e}" .description="${t}" .confirmButtonText="${n}" @confirm="${this.backToDashboard}"></bannoweb-confirmation-dialog> </jha-slider-pane> <jha-slider-pane unsupported> <bannoweb-confirmation-dialog .icon="${`circle-minus`}" .hideCloseButton="${!0}" .header="${`Not available at this time`}" .description="${`Unfortunately we’re unable to enable your business to accept cards. This may be because you’re in an industry we can’t support.`}" .confirmButtonText="${n}" @confirm="${this.backToDashboard}"></bannoweb-confirmation-dialog> </jha-slider-pane> </jha-slider-content> </jha-slider> </jha-card> </bannoweb-page-container>`}},customElements.define(window.BannowebMerchantEnrollment.is,window.BannowebMerchantEnrollment);var Oe=window.BannowebMerchantEnrollment;export{Oe as default};

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.