PageSourceSearch

https://online.alpinebank.com/en/js/bannoweb-ach-batch-details-dialog-DTjwy5eg.js

js alpinebank.com collected 2026-09-24 18:56:31 UTC 77,014 bytes, 10 lines download raw bytes

1import{t as e}from"./standalone-app-Bj-IdwrG.js";import{E as t,_ as n,b as r,v as i,x as a}from"./institution-DyFDvNu6.js";import"./user-BMje1Le7.js";import{t as o}from"./display-strings-MZHh2uw2.js";import{t as s}from"./paths-BjKNBopk.js";import{t as c}from"./date-URgChy6n.js";import{Rt as l,_r as u,ar as d,o as f,or as p,sn as m}from"./main-5Sl8yySz.js";import{i as h,r as g}from"./directive-helpers-Bok9tbK6.js";import{n as _,r as v,t as y}from"./directive-DP-zfNoz.js";import"./jha-progress-CjUOO3no.js";import"./jha-card-DC-UH8vN.js";import"./jha-button-Dyau4S4K.js";import"./jha-link-button-k4YCp-l3.js";import"./bannoweb-flex-wrapper-DLiUDxGK.js";import{c as b,n as x,o as S,t as C}from"./banno-styles-B3iGgKv1.js";import"./bannoweb-dialog-6PdYs8ag.js";import"./jha-dropdown-toggle-BD-PhqOy.js";import"./jha-list-UCQUTbOQ.js";import"./jha-slider-pane-CG5LkspN.js";import{t as w}from"./high-risk-Bokt2EDh.js";import"./jha-select-ZNLtNzvA.js";import"./jha-form-checkbox-rBX0llE9.js";import{t as T}from"./format-currency-DWww8Snc.js";import"./bannoweb-currency-B8mbcVJL.js";import{t as E}from"./observable-models-lit-Conecq5s.js";import"./jha-form-floating-group-DqE4-9IH.js";import"./jha-form-currency-input-CKJz-yxs.js";import{t as D}from"./conversation-noun-type-NvosllBj.js";import{t as O}from"./error-handling-CQ30q_Tp.js";import"./jha-form-text-input-CLlBTC4N.js";import"./bannoweb-attachment-conversation-picker-BLDNt0gS.js";import"./bannoweb-noun-support-options-list-suELASow.js";import{n as k}from"./ach-fmyPAMnW.js";import{t as A}from"./repeat-CK1rZDEg.js";import"./bannoweb-text-confirmation-dialog-DDH2THxz.js";import"./bannoweb-ach-item-summary-DjvgYXz_.js";import"./bannoweb-ach-batch-details-CPvdM4oC.js";import"./bannoweb-ach-recipients-form-CLjl0Nyi.js";import"./bannoweb-ach-recipient-details-DGPfEuUk.js";window.BannowebAchAddRecipientMenuElement=class extends n{static get is(){return`bannoweb-ach-add-recipient-menu`}static get styles(){return[x,b,t`jha-dropdown-menu-item button.reset{align-items:center;gap:8px;display:flex}`]}constructor(){super(),e(()=>import(`./jha-icon-add-person-BkXbvymj.js`),[]),e(()=>import(`./jha-icon-list-view-6Q7KYMeW.js`),[]),e(()=>import(`./jha-icon-upload-BAvL-Kjx.js`),[])}render(){return a`<jha-dropdown> <jha-dropdown-toggle slot="toggle"> <jha-button sync icon type="button"> <jha-icon-add-person aria-label="${`Add recipient`}"></jha-icon-add-person> </jha-button> </jha-dropdown-toggle> <jha-dropdown-menu> <jha-dropdown-menu-item> <button class="reset list-item-padding" type="button" @click="${()=>this.dispatchEvent(new CustomEvent(j.ADD_MANUALLY))}"> <jha-icon-list-view></jha-icon-list-view> <span>${`Manually add`}</span> </button> </jha-dropdown-menu-item> <jha-dropdown-menu-item> <button class="reset list-item-padding" type="button" @click="${()=>this.dispatchEvent(new CustomEvent(j.ADD_IMPORT))}"> <jha-icon-upload></jha-icon-upload> <span>${`Import from file`}</span> </button> </jha-dropdown-menu-item> </jha-dropdown-menu> </jha-dropdown>`}};var j={ADD_MANUALLY:`add-manually`,ADD_IMPORT:`add-import`};customElements.define(window.BannowebAchAddRecipientMenuElement.is,window.BannowebAchAddRecipientMenuElement),window.BannowebAchAddRecipientMenuElement.Event=j;var M=window.BannowebAchAddRecipientMenuElement,N=y(class extends _{constructor(e){
2/**
3* @license
4* Copyright 2020 Google LLC
5* SPDX-License-Identifier: BSD-3-Clause
6*/
7if(super(e),e.type!==v.PROPERTY&&e.type!==v.ATTRIBUTE&&e.type!==v.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!h(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===r||t===i)return t;let n=e.element,a=e.name;if(e.type===v.PROPERTY){if(t===n[a])return r}else if(e.type===v.BOOLEAN_ATTRIBUTE){if(!!t===n.hasAttribute(a))return r}else if(e.type===v.ATTRIBUTE&&n.getAttribute(a)===t+``)return r;return g(e),t}});window.BannowebAchRecordItemElement=class extends n{static get is(){return`bannoweb-ach-record-item`}static get properties(){return{item:{type:Object,attribute:`item`},isAchPayment:{type:Boolean,reflect:!0,attribute:`is-ach-payment`}}}constructor(){super(),e(()=>import(`./jha-icon-close-CwW0xena.js`),[]),e(()=>
7import(`./bannoweb-shared-icons-CVhKuhWm.js`),[]),this.item=void 0,this.isAchPayment=!1}maskedAccountNumber(e){return e?`x${e.slice(-4)}`:``}getHeldIcon(e){return e===`hold`?`circle-close`:`checkmark`}isCredit(e){return e?.toLowerCase()===`credit`}static get styles(){return t`:host{width:100%;display:block}div.record{justify-content:space-between;align-items:center;font-size:14px;display:flex}div.record>div.name{flex:2;font-weight:500}span{color:var(--body-text-secondary-color);font-weight:400!important}.numbers{width:60px;color:var(--body-text-secondary-color);flex:1}bannoweb-shared-icons{margin-right:12px;display:block}.active{--jha-icon-color:var(--jha-color-success)}.hold{color:var(--body-text-secondary-color);--jha-icon-color:var(--body-text-secondary-color)}.amount{text-align:right;width:100px;padding-right:12px}bannoweb-currency{font-weight:500}.type{text-align:right;width:75px}jha-icon-close{opacity:0}jha-icon-close[visible]{opacity:1;fill:var(--color-warning)}span.transaction-type{text-transform:capitalize}`}render(){if(!this.item)return i;let{item:e}=this;return a`<div class="record ${e.status??``}"> ${this.isAchPayment?i:a`<bannoweb-shared-icons .icon="${this.getHeldIcon(e.status)}"></bannoweb-shared-icons>`} <div class="name"> ${e.recipientName} <span class="account">${this.maskedAccountNumber(e.recipientAccountNumber)}</span> </div> ${this.isAchPayment?i:a`<div class="numbers">${e.recipientRoutingNumber}</div>`} <div class="amount"> <bannoweb-currency .amount="${e.recipientAmount}" ?show-positive-sign="${this.isCredit(e.recipientTransactionType)}" ?success="${this.isCredit(e.recipientTransactionType)}"></bannoweb-currency> <span class="transaction-type">${e.recipientTransactionType}</span> </div> </div>`}},customElements.define(window.BannowebAchRecordItemElement.is,window.BannowebAchRecordItemElement),window.BannowebAchRecordItemElement,window.BannowebSimplePaginationControlsElement=class extends n{static get is(){return`bannoweb-simple-pagination-controls`}static get properties(){return{totalItems:{type:Number},itemsPerPage:{type:Number},currentPage:{type:Number}}}constructor(){super(),e(()=>import(`./jha-icon-chevron-back-qAPV11jO.js`),[]),e(()=>import(`./jha-icon-chevron-forward-CJdbuAJw.js`),[]),this.totalItems=0,this.itemsPerPage=10,this.currentPage=1}get numberOfPages(){return Math.ceil(this.totalItems/(this.itemsPerPage||1))}get pages(){let e=[];for(let t=1;t<=this.numberOfPages;t++)e.push(t);return e}selectPage(e){this.currentPage=e,this.dispatchEvent(new CustomEvent(`page-change`,{bubbles:!0,composed:!0,detail:this.currentPage}))}static get styles(){return[t`:host{--jha-pagination-controls-button-color:var(--jha-text-theme);justify-content:center;align-items:center;display:flex}jha-button{--jha-button-line-height:12px}jha-icon-chevron-left,jha-icon-chevron-right{fill:var(--jha-pagination-controls-button-color)}span.dotIcon{background-color:var(--jha-pagination-dot-color);border-radius:50%;width:6px;height:6px;margin:5px 4px;display:inline-block;position:relative}span.dotIcon[selected]{background-color:var(--jha-pagination-dot-color-selected)}`]}render(){return!this.totalItems||this.pages.length<2?``:a`<jha-button icon sync type="button" @click="${()=>this.selectPage(this.currentPage-1)}" ?disabled="${this.currentPage===1}"> <jha-icon-chevron-back title="Previous page"></jha-icon-chevron-back> </jha-button> ${this.pages.map(e=>a`<span class="dotIcon" ?selected="${this.currentPage===e}"></span>`)} <jha-button icon sync type="button" @click="${()=>this.selectPage(this.currentPage+1)}" ?disabled="${this.currentPage===this.numberOfPages}"> <jha-icon-chevron-forward title="Next page"></jha-icon-chevron-forward> </jha-button>`}},customElements.define(window.BannowebSimplePaginationControlsElement.is,window.BannowebSimplePaginationControlsElement),window.BannowebSimplePaginationControlsElement;var P=[{name:`Credit`,value:`credit`},{name:`Debit`,value:`debit`}],F={[p.sortBy.AMOUNT]:`recipientAmount`,[p.sortBy.SEQUENCE_NUMBER]:`sequenceNumber`},I={[p.sortBy.RECIPIENT_NAME]:`recipientName`,[p.sortBy.RECIPIENT_ID]:`recipientId`,[p.sortBy.ACCOUNT_NUMBER]:`recipientAccountNumber`,[p.sortBy.ROUTING_NUMBER]:`recipientRoutingNumber`,[p.sortBy.STATUS]:`status`,[p.sortBy.DEBIT_CREDIT]:`recipientTransactionType`},L=E(n);window.BannowebAchRecordListElement=class extends L{static get is(){return`bannoweb-ach-record-list`}static get properties(){return{institution:{type:Object},item:{type:Object},isEditing:{type:Boolean}
7,showDetails:{type:Boolean},achBatchController:{type:Object},user:{type:Object},currentIndex:{type:Number},editedRecords:{type:Array},pages:{type:Array},currentSortBy:{type:String},currentSortOrder:{type:String},showSortACHRecipients:{type:Boolean},_isSubmitting:{type:Boolean},_totalsLoading:{type:Boolean,state:!0},_successMessage:{type:String},_showError:{type:Boolean,state:!0},_error:{type:Object},_openRecords:{type:Array},_loadingEntitlements:{type:Boolean}}}constructor(){super(),e(()=>import(`./jha-icon-warning-DxcBeQ9z.js`),[]),e(()=>import(`./jha-icon-sort-BnfKtw3M.js`),[]),e(()=>import(`./jha-icon-large-arrow-down-DgxL2hg1.js`),[]),e(()=>import(`./jha-icon-large-arrow-up-CCfBBbuU.js`),[]),e(()=>import(`./jha-icon-chevron-back-qAPV11jO.js`),[]),e(()=>import(`./jha-icon-chevron-forward-CJdbuAJw.js`),[]),this.institution=null,this.item=null,this.isEditing=!1,this._loadingEntitlements=!1,this.showDetails=!1,this.achBatchController=f.achBatchController,this.user=f.store.user,this.currentIndex=null,this.pages=[null],this.editedRecords=[],this._isSubmitting=!1,this._totalsLoading=!1,this._showError=!1,this._error=null,this._successMessage=null,this._openRecords=[],this._savedStatus=new Map,this._allRecords=null,this._allRecordsFullyFetched=!1,this.currentSortOrder=p.sortOrder.DESC,this.currentSortBy=p.sortBy.SEQUENCE_NUMBER,this.showSortACHRecipients=!1,this._fetchAbortController=null,this._flagReady=m.evaluate(`sort-ach-recipients`).then(e=>{this.showSortACHRecipients=e}),this.loadEntitlements()}disconnectedCallback(){super.disconnectedCallback(),this._fetchAbortController?.abort()}firstUpdated(){this._flagReady.then(()=>{this.changePage(0)})}async startFullFetch(){this.showSortACHRecipients&&!this.isPayment?this._allRecordsFullyFetched?this.changePage(0):await this._fetchAllRecords():this.changePage(0)}async _fetchAllRecords(){this._fetchAbortController?.abort();let e=new AbortController;this._fetchAbortController=e;let{signal:t}=e;this._allRecordsFullyFetched=!1,this.item.recordsLoading=!0,this.currentIndex=0,this.requestUpdate(void 0,void 0);try{for await(let e of this.achBatchController.getAllBatchRecords(this.item.id,{initialRecords:this._allRecords??[],totalRecords:this.item.totalRecords})){if(t.aborted)return;this._allRecords=e.records,this.item.totalRecords=e.totalRecords,this._sortAndChunk()}this._sortAndChunk(),this._allRecordsFullyFetched=!0;let e=this.achBatchController.achBatches.get(this.item.id);e&&this._applyBatchTotals(e)}catch{this.item.recordsLoadingFailed=!0}finally{this.item.recordsLoading=!1,this.requestUpdate(void 0,void 0)}}updated(e){e.has(`isEditing`)&&(this.isEditing?this._fetchAbortController?.abort():this._openRecords=[]),this.showSortACHRecipients&&(e.has(`currentSortBy`)||e.has(`currentSortOrder`))&&(this._allRecords?(this._sortAndChunk(),this.currentIndex=0):(this.pages=[null],this.changePage(0)))}get _fetchedRecords(){return this.pages?.flat()}get loading(){return this._loadingEntitlements||this.item.recordsLoading}
7get showSummary(){return!!this.item&&this.showDetails&&!this.isEditing}get numberOfPages(){return this.item.totalRecords?Math.ceil(this.item.totalRecords/p.recordsPerPage):0}get isPayment(){return this.item instanceof d}get focusedPane(){return`page-${this.currentIndex}`}paneHeight(e){let t=this.shadowRoot.querySelector(`jha-slider-pane[pane-id="page-${e}"]`);return`min-height: ${t&&t.scrollHeight?`${t.scrollHeight}px`:`auto`}`}onPageChange(e){let t=(e||{}).detail||1;this.changePage(t-1)}_applyOptimisticUpdates(e){this.pages=this.pages.map(t=>Array.isArray(t)?t.map(t=>{let n=e.find(e=>e&&e.recordId===t.recordId);return n?{...t,...n}:t}):t),this._allRecords&&(this._allRecords=this._allRecords.map(t=>{let n=e.find(e=>e&&e.recordId===t.recordId);return n?{...t,...n}:t}),this._sortAndChunk())}_getPageIndexForRecord(e){for(let t=0;t<this.pages.length;t++)if(Array.isArray(this.pages[t])&&this.pages[t].some(t=>t&&t.recordId===e))return t;return null}async _refetchAffectedPages(e){if(this.showSortACHRecipients){this._allRecordsFullyFetched=!1,await this._fetchAllRecords();return}let t=new Set(e.map(e=>e&&this._getPageIndexForRecord(e.recordId)).filter(e=>e!==null)),n=new Set([...t].map(e=>Math.floor(e*p.recordsPerPage/100))),r=[...this.pages];for(let e of t)r[e]=null;this.pages=r;for(let e of n)await this.fetchRecords(e)}async refetchAllPages(){this._allRecords=null,this._allRecordsFullyFetched=!1,this.pages=this.pages.map(()=>null),this.requestUpdate(void 0,void 0),this.showSortACHRecipients?await this._fetchAllRecords():await this.changePage(this.currentIndex||0)}async changePage(e){if(!this.item)return;if(Array.isArray(this.pages[e])&&!this.item.recordsLoadingFailed){window.requestAnimationFrame(()=>{this.currentIndex=e});return}let t=this.isPayment||this.showSortACHRecipients?e:Math.floor(e*p.recordsPerPage/100);if(this.pages.length<=e){let t=[...this.pages];for(;t.length<=e;)t.push(null);this.pages=t}this.item.recordsLoading=!0,this.item.recordsLoadingFailed=!1,window.requestAnimationFrame(()=>{this.currentIndex=e});try{await this.fetchRecords(t),this.item.recordsLoading=!1,this.requestUpdate(void 0,void 0)}catch{this.item.recordsLoadingFailed=!0,this.item.recordsLoading=!1}}async fetchRecords(e=0){this._fetchAbortController?.abort();let t=new AbortController;this._fetchAbortController=t;let{signal:n}=t;if(this.isPayment){let t=await this.achBatchController.getPaymentById(this.item.id,e);if(n.aborted)return;let r=[...this.pages];for(;r.length<=e;)r.push(null);r[e]=t.records,this.pages=r,t.totalRecords!=null&&(this.item.totalRecords=t.totalRecords);return}let r=this.showSortACHRecipients?p.recordsPerPage:100,i=await this.achBatchController.getBatchById(this.item.id,this.currentSortBy,this.currentSortOrder,e,r);if(n.aborted)return;if(this.showSortACHRecipients){let t=[...this.pages];for(;t.length<=e;)t.push(null);t[e]=i.records,this.pages=t,i.totalRecords!=null&&(this.item.totalRecords=i.totalRecords),this._applyBatchTotals(i);return}let a=e*Math.floor(r/p.recordsPerPage),o=i.records.reduce((e,t,n)=>{let r=Math.floor(n/p.recordsPerPage);return e[r]||(e[r]=[]),e[r].push(t),e},[]),s=[...this.pages];for(;s.length<a+o.length;)s.push(null);o.forEach((e,t)=>{s[a+t]=e}),this.pages=s,i.totalRecords!=null&&(this.item.totalRecords=i.totalRecords),this._applyBatchTotals(i)}_applyBatchTotals(e){e.totalCredits!=null&&(this.item.totalCredits=e.totalCredits),e.totalDebits!=null&&(this.item.totalDebits=e.totalDebits)}_sortAndChunk(){if(!this._allRecords)return;let e=[...this._allRecords].sort(this._getComparator());this._chunkIntoPages(e)}_chunkIntoPages(e){this.pages=e.reduce((e,t,n)=>{let r=Math.floor(n/p.recordsPerPage);return e[r]||(e[r]=[]),e[r].push(t),e},[])}_getComparator(){let e=this.currentSortBy,t=this.currentSortOrder===p.sortOrder.ASC?1:-1,n=F[e];if(n)return(e,r)=>((parseFloat(e[n])||0)-(parseFloat(r[n])||0))*t;let r=I[e];return r?(e,n)=>(e[r]||``).localeCompare(n[r]||``,void 0,{caseFirst:`upper`})*t:()=>0}clickRecord(e,t){e.stopPropagation(),this.dispatchEvent(new CustomEvent(`record-selected`,{bubbles:!0,composed:!0,detail:t}))}clickToggle(e,t){this.dispatchEvent(new CustomEvent(`records-sorting`,{bubbles:!0,composed:!0,detail:{sortBy:e,sortOrder:t}}))}async loadEntitlements(){this._loadingEntitlements=!0,await this.achBatchController.ensureAchEntitlementsLoaded(),this._loadingEntitlements=!1}getMaskedAccountNumber_(e){return e?`x${e.slice(-4)}`:``}toggleRecipientOpen(e){if(this._openRecords.includes(e)){let t=this._openRecords.filter(t=>t!==e);this._openRecords=[...t]}else this._openRecords=[e]}setRecipientStatus(e,t){let n=t.detail.value?`hold`:`active`;this.updateRecipient(e.recordId,{status:n})}setRecipientPrenote(e,t){let n=this.editedRecords.find(t=>t.recordId===e.recordId),r=n||e,i=t.detail.value;i!==!!r.preNote&&(!i&&!n||(i&&this._savedStatus.set(e.recordId,r.status),this.updateRecipient(e.recordId,{preNote:i,status:i?`hold`:this._savedStatus.get(e.recordId)||r.status}),this.requestUpdate(void 0,void 0)))}setRecipientTransactionType(e,t){this.updateRecipient(e.recordId,{recipientTransactionType:t.detail.value})}updateValue(e,t){let n=t&&t.target||{},r=n.value||n.amount,i=n.id,a=n.getAttribute&&n.getAttribute(`data-record-id`);if(i===`recipientAmount`&&(t.currentTarget.amount=(t.currentTarget.amount||``).replace(/[^\d.]/g,``),r=(r||``).replace(/[^\d.]/g,``)),!e)return;if(a&&a!==e.recordId){let e=this._fetchedRecords.find(e=>e&&e.recordId===a);if(e){let t={};t[i]=r,this.updateRecipient(e.recordId,t);return}}let o={};o[i]=r,this.updateRecipient(e.recordId,o)}updateRecipient(e,t){let n=this.editedRecords.find(t=>t&&t.recordId===e)||{},r=this._fetchedRecords.find(t=>t&&t.recordId===e);if(!r)return;let i={...r,...n,...t};this.noChange(r,i)?this.editedRecords=[...this.editedRecords.filter(t=>t&&t.recordId!==e)]:this.editedRecords=[...this.editedRecords.filter(t=>t&&t.recordId!==e),i],this._successMessage=null,this._showError=!1,this._error&&this._error.results&&(this._error.results=this._error.results.filter(t=>t.sequenceNumber!==e))}noChange(e,t){return!e||!t?!1:Object.entries(t).every(([t,n])=>n===e[t])}transactionTypeLabel(e){return(P.find(t=>t.value===e.toLowerCase())||{}).name||``}get submitDisabled(){return!this.editedRecords.length||this.editedRecords.some(e=>!e||!e.recipientAmount)}onClickSubmit(e){e.stopPropagation(),!(this.submitDisabled||!this.item.id)&&this.submitRecipients()}async submitRecipients(){this._fetchAbortController?.abort(),this._isSubmitting=!0,this._showError=!1,this._error=null,this._successMessage=null,this.editedRecords.forEach(e
7=>{e&&e.recipientAddenda&&(e.recipientAddenda=e.recipientAddenda.replace(/\n/g,` `))});let e=[...this.editedRecords];try{await this.achBatchController.modifyBatchRecords(this.item.id,this.editedRecords),this._successMessage=`${e.length} recipient${e.length>1?`s`:``} saved successfully.`,this.editedRecords=[],this.isEditing=!1,this._isSubmitting=!1,this.scrollTop=0,this.dispatchEvent(new CustomEvent(`recipients-saved`,{bubbles:!0,composed:!0})),await this.refreshAfterSave(e);return}catch(e){if(e&&e.results){let t=e.results.filter(e=>e.success===!0).map(e=>e.sequenceNumber);t.length>0&&(this._successMessage=`${t.length} recipient${t.length>1?`s`:``} saved successfully.`,this.editedRecords=this.editedRecords.filter(e=>e&&!t.includes(e.recordId)))}this._showError=!0,this._error=e}this._isSubmitting=!1,this.scrollTop=0}async refreshAfterSave(e){this._applyOptimisticUpdates(e),this._totalsLoading=!0;try{await Promise.all([this._refetchAffectedPages(e),this.achBatchController.refreshBatch(this.item.id).then(e=>this._applyBatchTotals(new p(e)))])}finally{this._totalsLoading=!1}}resetEditing(){this.editedRecords=[],this._showError=!1,this._error=null,this._successMessage=null,this.isEditing=!1}getSortOrderForColumn(e){return e===this.currentSortBy&&this.currentSortOrder===p.sortOrder.ASC?p.sortOrder.DESC:p.sortOrder.ASC}static get styles(){return[C,x,S,b,t`:host{--jha-form-currency-input-font-size:16px;flex-direction:column;justify-content:space-between;max-height:100%;display:flex}.content{flex-direction:column;justify-content:space-between;display:flex;overflow:hidden}.list{overflow:auto}.list-of-recipients{height:auto}.progress-container{justify-content:center;align-items:center;height:300px;display:flex}bannoweb-ach-item-summary{margin-left:var(--jha-content-inset)}.column-labels{padding:var(--payment-column-labels-padding,4px calc(var(--jha-content-inset) - 12px));border-bottom:var(--payment-column-labels-border-bottom,none);background:var(--secondary-content-background-color);text-transform:uppercase;place-content:center flex-start;gap:8px;margin-left:12px;margin-right:12px;display:flex}.column-labels *{align-content:center;line-height:28px;display:flex;font-size:12px!important;font-weight:400!important}.column-labels .name{flex:2}.column-labels .held{width:15px;margin-right:12px}.column-labels .sort-button{appearance:none;color:var(--body-text-primary-color);letter-spacing:0;text-transform:none;background:0 0;border:none;justify-content:flex-start;align-items:center;padding:0;display:flex;font-size:12px!important;font-weight:500!important}.column-labels button.sort-button:hover{cursor:pointer}.column-labels .sort-button jha-icon-sort{fill:var(--body-text-secondary-color);opacity:0;width:20px;height:20px}.column-labels .sort-button:hover jha-icon-sort{opacity:1}.column-labels .sort-button jha-icon-large-arrow-up,.column-labels .sort-button jha-icon-large-arrow-down{fill:var(--body-text-theme-color);width:20px;height:20px}.status,.prenote{flex:0 64px;justify-content:center;display:flex}.status jha-form-checkbox,.prenote jha-form-checkbox{margin-left:8px}.column-labels .numbers-label{flex:1;width:60px}.column-labels .type,.column-labels .amount{text-align:right;width:100px;padding-right:12px;display:block}.column-labels[historical] .held,.column-labels[historical] .numbers-label{display:none}bannoweb-flex-wrapper{justify-content:flex-start;gap:8px}bannoweb-flex-wrapper .recipient,.column-labels .recipient{flex:0 0 170px;width:170px}bannoweb-flex-wrapper .edit-type,bannoweb-flex-wrapper .edit-amount,.column-labels .edit-type,.column-labels .edit-amount{width:140px;min-width:88px}.column-labels .edit-amount{justify-content:flex-end}jha-form-floating-group.full,jha-form-text-input.full{width:100%}bannoweb-simple-pagination-controls[hidden]{display:none}.no-content{text-align:center;color:var(--jha-text-neutral);flex-direction:column;justify-content:center;align-items:center;height:220px;display:flex}.no-content p{margin-top:4px}jha-icon-warning{fill:var(--body-text-alert-color);vertical-align:middle;margin-right:3px}footer{justify-content:space-between;min-height:26px;padding:16px;display:flex}footer>div{flex:1}div.right{text-align:right}footer div.progress,bannoweb-simple-pagination-controls{text-align:center;flex:2}.pagination-basic{flex-direction:column;justify-content:center;align-items:center;gap:16px;padding:12px 16px 8px;display:flex}.pagination-basic:has(.pagination-basic-controls){flex-direction:column}.pagination-basic-controls{align-items:center;gap:8px;display:flex}.pagination-basic-controls span{color:var(--body-text-secondary-color);text-align:center;min-width:100px;font-size:14px}.loading-bar-track{inline-size:100%;
7background-color:var(--divider-default-color,#e0e0e0);background-image:repeating-linear-gradient(-45deg,#0000,#0000 6px,#ffffff59 6px 12px);background-size:17px 17px;border-radius:2px;height:4px;margin-bottom:4px;animation:.6s linear infinite loading-bar-stripes;overflow:hidden}.loading-bar-fill{background:var(--jha-color-primary,var(--body-text-theme-color));border-radius:2px;height:100%;transition:width .3s}@keyframes loading-bar-stripes{0%{background-position:17px 0}to{background-position:0 0}}jha-form-currency-input{--jha-form-currency-input-color:var(--body-text-primary-color);--jha-input-placeholder-size:16px;--jha-form-floating-group-margin-bottom:0;font-size:16px}jha-form-currency-input[warn]{--jha-form-floating-group-outline-border-color:var(--jha-color-danger,#f44336)}.label{font-size:14px;top:22px}jha-form-currency-input .label{top:30px;transform:translateY(-28px)scale(.75)}jha-form-floating-group{margin-bottom:2px}input:disabled,jha-form-currency-input[disabled]{color:var(--body-text-secondary-color);--jha-form-currency-input-color:var(--body-text-secondary-color);--jha-input-placeholder-color:var(--body-text-secondary-color)}jha-select{--jha-select-text-size:16px;--jha-select-padding:12px 12px 10px;--jha-select-text:var(--jha-text-dark)}.select-label{z-index:1}h4{margin:0}h4>button.reset{align-items:center;display:flex}h4 span{white-space:nowrap;text-overflow:ellipsis;font-weight:500;overflow:hidden}h4 jha-icon-chevron-up{width:24px}.secondary{color:var(--body-text-secondary-color);font-size:12px}jha-error-message{margin:0 12px 8px}jha-error-message[success]{--jha-error-message-background-color:var(--jha-color-success)}jha-error-message button.reset{color:var(--jha-error-message-text-color,var(--jha-text-white));width:auto;font-weight:700;display:inline-block}jha-icon-chevron-up{vertical-align:middle;transform:rotate(180deg)}jha-icon-chevron-up[open]{transform:rotate(0)}.error{color:var(--body-text-alert-color);align-items:center;display:flex}@media (width<=470px){bannoweb-flex-wrapper{flex-wrap:wrap}bannoweb-flex-wrapper .edit-type,bannoweb-flex-wrapper .edit-amount{width:calc(50% - 6px)}.column-labels .edit-type,.column-labels .edit-amount{display:none}}`]}
7renderLoadingState(){return this.loading?a`<div class="progress-container"> <jha-progress></jha-progress> </div>`:``}renderSummary(){return!this.showSummary||!this._fetchedRecords.length?``:a`<bannoweb-ach-item-summary .item="${this.item}" .showTotalRecipients="${!0}" .totalsLoading="${this._totalsLoading}"></bannoweb-ach-item-summary>`}renderSortableColumnHeader(e,t){return this.showSortACHRecipients?a`<button @click="${()=>this.clickToggle(e,this.getSortOrderForColumn(e))}" class="sort-button"> ${t} ${this.currentSortBy===e?a`${this.currentSortOrder===p.sortOrder.DESC?a`<jha-icon-large-arrow-down></jha-icon-large-arrow-down>`:a`<jha-icon-large-arrow-up></jha-icon-large-arrow-up>`}`:a`<jha-icon-sort></jha-icon-sort>`} </button>`:a`${t}`}renderEditHeader(){return a`<div class="column-labels" id="edit-labels"> <div class="recipient"> ${this.renderSortableColumnHeader(p.sortBy.RECIPIENT_NAME,`Recipient`)} </div> ${this.institution.abilities.enableAchHolds?a`<div class="status"> ${this.showSortACHRecipients?a`<span class="sort-button">${`Hold`}</span>`:a`${`Hold`}`} </div>`:``} ${this.institution.abilities.enableAchPrenotes?a`<div class="prenote"> ${this.showSortACHRecipients?a`<span class="sort-button">${`Prenote`}</span>`:a`${`Prenote`}`} </div>`:``} <div class="edit-type"></div> <div class="edit-amount"> ${this.renderSortableColumnHeader(p.sortBy.AMOUNT,`Amount`)} </div> </div>`}renderViewListHeader(){return this._fetchedRecords.length?a`<div class="column-labels" ?historical="${this.isPayment}"> <div class="held"></div> <div class="name"> ${this.renderSortableColumnHeader(p.sortBy.RECIPIENT_NAME,`Recipient`)} </div> <div class="numbers-label"> ${this.showSortACHRecipients?a`<span class="sort-button">${`Routing`}</span>`:a`${`Routing`}`} </div> <div class="amount">${this.renderSortableColumnHeader(p.sortBy.AMOUNT,`Amount`)}</div> </div>`:``}renderRecordsLoadingFailedMessage(){return a`<div class="no-content"> <jha-icon-warning></jha-icon-warning> <p>${`Recipients failed to load.`}</p> <button class="anchor reset" type="button" @click="${()=>this.changePage(this.currentIndex||0)}"> ${`Retry`} </button> </div>`}renderListItem(e){return a`<button class="reset" type="button" @click="${t=>this.clickRecord(t,e)}"> <bannoweb-ach-record-item .item="${e}" .is-ach-payment="${this.isPayment}"></bannoweb-ach-record-item> </button>`}renderEditListItem(e){let t=this.editedRecords.find(t=>t.recordId===e.recordId)||e,n=((this._error||{}).results||[]).find(t=>t&&t.success===!1&&t.sequenceNumber===e.recordId);return a`<div class="edit-item"> <bannoweb-flex-wrapper> <div class="recipient"> <h4 id="recipientName"> <button class="reset" type="button" aria-expanded="${this._openRecords.includes(e.recordId)}" @click="${()=>this.toggleRecipientOpen(e.recordId)}" .title="${e.recipientName}"> <span>${e.recipientName}</span> <jha-icon-chevron-up ?open="${this._openRecords.includes(e.recordId)}"></jha-icon-chevron-up> </button> </h4> <span class="secondary"> ${this.getMaskedAccountNumber_(e.recipientAccountNumber)}/ ${e.recipientRoutingNumber} </span> </div> ${this.institution.abilities.enableAchHolds?a`<div class="status"> <jha-form-checkbox ?checked="${t.status===`hold`}" ?disabled="${!this.item.entitlements.editRecipientStatus||t.preNote}" @checked-changed="${t=>this.setRecipientStatus(e,t)}"></jha-form-checkbox> </div>`:``} ${this.institution.abilities.enableAchPrenotes?a`<div class="prenote"> <jha-form-checkbox ?checked="${t.preNote}" ?disabled="${!this.item.entitlements.editRecipientPrenote}" @checked-changed="${t=>this.setRecipientPrenote(e,t)}"></jha-form-checkbox> </div>`:``} <div class="edit-type"> <jha-form-floating-group outline small has-value> <jha-select .options="${P}" .selectedValue="${N(t.recipientTransactionType.toLowerCase())}" ?disabled="${!this.item.entitlements.editRecipientTransactionType}" @selected-value-changed="${t=>this.setRecipientTransactionType(e,t)}"></jha-select> <div class="label select-label">Credit/Debit</div> </jha-form-floating-group> </div> <div class="edit-amount"> <jha-form-currency-input id="recipientAmount" data-record-id="${e.recordId}
7" outline small use-commas label="${`Amount`}" type="number" ?warn="${!t.recipientAmount}" .amount="${N(t.recipientAmount)}" ?disabled="${!this.item.entitlements.editRecipientAmount||t.preNote}" @amount-changed="${t=>this.updateValue(e,t)}" min="0"> <div class="label" slot="label"> ${this.transactionTypeLabel(t.recipientTransactionType)} amount </div> </jha-form-currency-input> </div> </bannoweb-flex-wrapper> ${this._openRecords.includes(e.recordId)?a`<bannoweb-flex-wrapper class="optional-fields"> <jha-form-text-input outline small class="full recipient-field" id="recipientAddenda" data-record-id="${e.recordId}" label="${`Addenda (optional)`}" character-limit="80" .value="${t.recipientAddenda??``}" ?disabled="${!this.item.entitlements.editRecipientAddenda}" @input="${t=>this.updateValue(e,t)}" placeholder="Enter"></jha-form-text-input> </bannoweb-flex-wrapper>`:``} </div> ${n&&n.message?a`<div class="error">${n.message}</div>`:``}`}renderList(e){let t=this.pages[e]||[];if(!t.length){if(this.loading)return this.renderLoadingState();if(this.item.recordsLoadingFailed)return this.renderRecordsLoadingFailedMessage()}return a`<jha-list id="records"> ${A(t??[],e=>e.recordId,e=>a`<jha-list-item ?edit="${this.isEditing}"> ${this.isEditing?this.renderEditListItem(e):this.renderListItem(e)} </jha-list-item>`)} </jha-list>`}renderContent(){return a`${this.isEditing?this.renderEditHeader():this.renderViewListHeader()} <div class="list"> <jha-slider> <jha-slider-content .focusedPane="${this.focusedPane}"> ${this.pages.map((e,t)=>a`<jha-slider-pane class="list-of-recipients" pane-id="${`page-${t}`}" style="${this.paneHeight(t)}"> ${this.renderList(t)} </jha-slider-pane>`)} </jha-slider-content> </jha-slider> </div>`}renderPaginationBasic(){let e=this.currentIndex??0,t=this.numberOfPages,n=e<=0,r=t>0&&e>=t-1,i=Array.isArray(this.pages[e-1]),o=Array.isArray(this.pages[e+1]),s=this.numberOfPages?Math.round(this.pages.length/this.numberOfPages*100):0;return a`<footer class="pagination-basic"> ${this.isEditing?a`<div class="right"> <jha-button type="button" id="submit-record-changes" .isLoading="${this._isSubmitting}" @click="${this.onClickSubmit}" ?disabled="${this.submitDisabled}"> ${`Save`} </jha-button> </div>`:``} ${t>1?a`<div class="pagination-basic-controls"> <jha-button icon sync type="button" ?disabled="${n||this.loading&&!i}" @click="${()=>this.changePage(e-1)}"> <jha-icon-chevron-back title="Previous page"></jha-icon-chevron-back> </jha-button> <span>Page ${e+1} of ${t}</span> <jha-button icon sync type="button" ?disabled="${r||this.loading&&!o}" @click="${()=>this.changePage(e+1)}"> <jha-icon-chevron-forward title="Next page"></jha-icon-chevron-forward> </jha-button> </div>`:``} <div class="loading-bar-track" role="progressbar" aria-label="Loading records" aria-valuemin="0" aria-valuemax="100" aria-valuenow="${this.loading&&this.numberOfPages>1?s:0}" aria-hidden="${this.loading&&this.numberOfPages>1?`false`:`true`}" style="opacity:${this.loading&&this.numberOfPages>1?1:0};visibility:${this.loading&&this.numberOfPages>1?`visible`:`hidden`}"> <div class="loading-bar-fill" style="width:${s}%"></div> </div> </footer>`}renderPagination(){let e=this.currentIndex||0,t=this.pages[e]||[],n=this.loading||this.item.recordsLoadingFailed,r=this.loading&&t.length>0;return a`<footer class="list-item-padding"> ${this.isEditing?a`<div class="spacer"></div>`:``} ${r?a`<div class="progress"> <jha-progress></jha-progress> </div>`:``} <bannoweb-simple-pagination-controls ?hidden="${n}" .totalItems="${this.item.totalRecords}" .itemsPerPage="${p.recordsPerPage}" .currentPage="${(this.currentIndex||0)+1}" @page-change="${this.onPageChange}"></bannoweb-simple-pagination-controls> ${this.isEditing?a`<div class="right"> <jha-button type="button" id="submit-record-changes" .isLoading="${this._isSubmitting}" @click="${this.onClickSubmit}" ?disabled="${this.submitDisabled}"> ${`Save`} </jha-button> </div>`:``} </footer>`}renderTopMessage(){return a`${this._successMessage?a`<jha-error-message success>${this._successMessage}</jha-error-message>`:``} ${this._showError?a`<jha-error-message> There was a problem saving one or more of your recipients. <button class="reset" type="button" @click="${this.onClickSubmit}"> ${`Retry`} </button> </jha-error-message>`:``}`}render(){return this.item?a`<div class="content">${this.renderTopMessage()} ${this.renderSummary()} ${this.renderContent()}</div> ${this.showSortACHRecipients?this.renderPaginationBasic():this.renderPagination()}`:``}},customElements.define(window.BannowebAchRecordListElement.is,window.BannowebAchRecordListElement),window.BannowebAchRecordListElement;var{achBatchController:R}=f,z={UNKNOWN_ERROR:`unknown`,VALIDATION_ERROR:`validation`,VIOLATED_NAME_ERROR:`violated_name`,VIOLATED_CONSTRAINT_ERROR:`violated_constraing`,READY:`ready`,LOADING:`loading`},B=E(n);window.BannowebDuplicateBatchElement=class extends B{static get is(){return`bannoweb-duplicate-batch`}static get properties(){return{item:{type:Object},batchName:{type:String},institution:{type:Object},resetToZero:{type:Boolean},showResetToZero:{type:Boolean},state:{type:String},validationErrorMsg:{type:String},violationErrorMsg:{type:String},error:{type:String}}}constructor(){super(),this.item=null,this.batchName=``,this.institution=f.store.institution,this.resetToZero=!1,this.showResetToZero=this.institution.abilities.achDisplayResetRecordsWhenCopyingBatch,this.state=z.READY,this.validationErrorMsg=null,this.violationErrorMsg=null,this.error=null}onBatchNameChange(e){this.batchName=e.target.value,this.state=z.READY,this.validateBatchName(this.batchName)}onResetChanged(e){this.resetToZero=e.detail.value}disableButton(e=``){return e.trim().length===0||this.state===z.VALIDATION_ERROR}validateBatchName(e=``){/^tax/i.test(e)?(this.state=z.VALIDATION_ERROR,this.validationErrorMsg=`Name cannot start with TAX`):/^pnt/i.test(e)?(this.state=z.VALIDATION_ERROR,this.validationErrorMsg=`Name cannot start with PNT`):this.validationErrorMsg=null}get errorMsg(){return this.state===z.VALIDATION_ERROR?this.validationErrorMsg:this.state===z.VIOLATED_NAME_ERROR?this.violationErrorMsg:null}submitDuplicate(e){let t=this.item instanceof p?this.item.id:this.item.batchId;this.duplicateBatch(t,this.batchName,this.resetToZero)}
7async duplicateBatch(e,t,n){this.state=z.LOADING;try{let r=await R.duplicateBatch(e,t,n);this.dispatchEvent(new CustomEvent(`duplicate-batch-success`,{detail:{batchId:r.newBatchId,batchName:t}})),this.state=z.READY}catch(e){e&&(this.error=`${e.title}: ${Array.isArray(e.details)?e.details.join(`, `):e.details}`,this.violationErrorMsg=e.title)}}static get styles(){return[x,t`article{margin-top:8px;margin-bottom:24px;margin-left:var(--jha-content-inset);padding-right:24px}.label{color:var(--body-text-primary-color);font-size:14px;font-weight:500}jha-list-item{--jha-list-item-horizontal-spacing:0px;justify-content:space-between;align-items:center;display:flex}footer{justify-content:center;align-items:center;margin-bottom:24px;display:flex}`]}renderErrors(){let e;return this.state===z.VIOLATED_CONSTRAINT_ERROR&&(e=this.violationErrorMsg),e?a`<jha-error-message>${e}</jha-error-message>`:this.error?a`<jha-error-message>${this.error}</jha-error-message>`:``}render(){return a`<form @submit="${this.submitDuplicate}"> <article> ${this.renderErrors()} <jha-list-item> <div class="label" id="batch-name-label">${`Batch name`}</div> <jha-form-floating-group filled no-label .error="${this.errorMsg}"> <input type="text" .value="${this.batchName}" placeholder="${`Batch name`}" maxlength="20" aria-labelledby="batch-name-label" @input="${this.onBatchNameChange}">  </jha-form-floating-group> </jha-list-item> ${this.showResetToZero?a`<jha-list-item> <div class="label">${`Reset amounts to $0.00`}</div> <jha-form-checkbox @checked-changed="${this.onResetChanged}" .checked="${this.resetToZero}" label="${`Reset amounts to $0.00`}"></jha-form-checkbox> </jha-list-item>`:``} </article> <footer> <jha-button type="submit" .isLoading="${this.state===z.LOADING}" .disabled="${this.disableButton(this.batchName)}">${`Create batch`}</jha-button> </footer> </form>`}},customElements.define(window.BannowebDuplicateBatchElement.is,window.BannowebDuplicateBatchElement),window.BannowebDuplicateBatchElement,window.BannowebDuplicateConfirmationElement=class extends n{static get is(){return`bannoweb-duplicate-confirmation`}static get properties(){return{batchName:{type:String}}}constructor(){super(),e(()=>import(`./jha-icon-circle-checkmark-D5W5I-4p.js`),[]),e(()=>import(`./jha-icon-circle-warning-Dzn5hcMr.js`),[]),this.batchName=null}onDuplicateConfirmationOk(e){this.dispatchEvent(new CustomEvent(`closeModal`,{bubbles:!0,composed:!0}))}static get styles(){return t`:host{text-align:center;display:block}article{text-align:left;flex-flow:column wrap;align-content:space-around;margin:24px 0;display:flex}jha-icon-circle-checkmark{fill:var(--bannoweb-confirmation-icon-color,var(--color-success));width:106px;height:106px}#info-box jha-icon-circle-warning{width:24px;height:24px;fill:var(--body-text-secondary-color);margin-right:16px}#info-box{background-color:var(--secondary-content-background-color);align-items:center;max-width:320px;padding:8px 16px;display:flex}#title{border-top:1px dashed var(--divider-default-color);padding:24px 0;font-size:18px;font-weight:400;line-height:22px}footer{border-top:1px solid var(--divider-default-color)}footer .action-button{margin:16px 0}`}render(){return a`<jha-icon-circle-checkmark></jha-icon-circle-checkmark> <h1>${`Batch created`}</h1> <article> <div id="title">${this.batchName}</div> <div id="info-box"> <jha-icon-circle-warning></jha-icon-circle-warning> <div>${`It could take a few minutes for your batch to appear.`}</div> </div> </article> <footer> <div class="action-button"> <jha-button type="button" wide @click="${this.onDuplicateConfirmationOk}"> ${`Done`} </jha-button> </div> </footer>`}},customElements.define(window.BannowebDuplicateConfirmationElement.is,window.BannowebDuplicateConfirmationElement),window.BannowebDuplicateConfirmationElement;var V=[`editRecipientAddenda`,`editRecipientAmount`,`editRecipientTransactionType`,`editRecipientStatus`],H=w(E(n)),U={BATCH:`batch`,PAYMENT:`payment`},W={ITEM_DETAILS:`item-details`,RECORDS_LIST:`records-list`,RECORDS_LIST_PRENOTE:`records-list-prenote`,CONFIRMATION_PROMPT:`confirmation-prompt`,RECIPIENT_DETAILS:`re
7cipient-details`,ADD_RECIPIENTS:`add-recipients`,DUPLICATE_BATCH:`duplicate-batch`,DUPLICATE_CONFIRMATION:`duplicate-confirmation`,ATTACH_TO_CONVERSATION:`attach-to-conversation`,SUPPORT_OPTIONS:`noun-support-options`,IMPORT_RECIPIENTS:`import-recipients`,SAME_DAY_INFO:`same-day-info`},G=`A prenote is a zero dollar test in order to validate a recipient's account information before sending the actual debit or credit transaction. This batch was automatically created and contains only recipients with 'Prenote' selected in the original batch.
8
9Initiate this prenote batch and, once processed and the account information is confirmed, you can delete this batch. In the original batch, remember to update the recipient's amount and held status.
10`,K=`If a batch is restricted, only users with the restricted batch access entitlement can view and work with the batch.`;window.BannowebAchBatchDetailsDialogElement=class extends H{static get is(){return`bannoweb-ach-batch-details-dialog`}static get properties(){return{institution:{type:Object},achBatches:{type:Object},achPayments:{type:Object},achBatchController:{type:Object},_focusedPane:{type:String,attribute:`focused-pane`,reflect:!0},mode:{type:String},achItem:{type:Object},loading:{type:Boolean},isTogglingStatus:{type:Boolean},selectedRecipient:{type:Object}
10,showDetails:{type:Boolean},offsetAccount:{type:Object},showError:{type:Boolean},showPrenoteDialog:{type:Boolean},showRestrictedDialog:{type:Boolean},errorMessage:{type:String},showSuccess:{type:Boolean},successMessage:{type:String},confirmationTitle:{type:String},confirmationDescription:{type:String},confirmationOkText:{type:String},editRecipientList:{type:Boolean},duplicatedBatchName:{type:String},_error:{type:Object},showConversationButton:{type:Boolean},sortBy:{type:String},sortOrder:{type:String},showSortACHRecipients:{type:Boolean}}}constructor(){super(),e(()=>import(`./jha-icon-close-CwW0xena.js`),[]),e(()=>import(`./jha-icon-circle-warning-Dzn5hcMr.js`),[]),e(()=>import(`./jha-icon-chevron-back-qAPV11jO.js`),[]),e(()=>import(`./jha-icon-chevron-down-CppozcK0.js`),[]),e(()=>import(`./jha-icon-chevron-up-Dr9NZ788.js`),[]),e(()=>import(`./jha-icon-conversation-B9uG7TXq.js`),[]),e(()=>import(`./jha-icon-download-10AaTU0M.js`),[]),e(()=>import(`./jha-icon-delete-CfhIlXRO.js`),[]),e(()=>import(`./jha-icon-information-CdfV0b31.js`),[]),e(()=>import(`./jha-icon-view-more-BsRDA4g-.js`),[]),e(()=>import(`./jha-icon-edit-C6vE85rl.js`),[]),e(()=>import(`./jha-icon-add-person-BkXbvymj.js`),[]),e(()=>import(`./jha-icon-sort-BnfKtw3M.js`),[]),e(()=>import(`./jha-icon-template-7434t9Ny.js`),[]),this.achBatches=f.store.achBatches,this.achBatchController=f.achBatchController,this.achItem=null,this.achPayments=f.store.achPayments,this._awaitingConfirmation=!1,this.confirmationTitle=null,this.confirmationDescription=null,this.confirmationOkText=null,this.confirmationPromise_=null,this.errorMessage=null,this._error=null,this._focusedPane=W.ITEM_DETAILS,this.editRecipientList=!1,this.institution=f.store.institution,this.isTogglingStatus=!1,this.loading=!1,this.selectedRecipient=null,this.showDetail
10s=!1,this.showConversationButton=!0,this.showError=!1,this.showPrenoteDialog=!1,this.showRestrictedDialog=!1,this.showSuccess=!1,this.successMessage=null,this.user=f.store.user,this.duplicatedBatchName=null,this.sortBy=p.sortBy.SEQUENCE_NUMBER,this.sortOrder=p.sortOrder.DESC,this.layoutEl_=document.querySelector(`bannoweb-layout`)||document.querySelector(`bannoweb-layout-test`),this.dialogEl_=null,this.boundOnDialogClose_=this.onDialogClose_.bind(this),this.showSortACHRecipients=!1,m.evaluate(`sort-ach-recipients`).then(e=>{this.showSortACHRecipients=e})}connectedCallback(){super.connectedCallback(),this.dialogEl_=document.querySelector(`dialog`),this.dialogEl_&&(this.dialogEl_.addEventListener(`cancel`,this.boundOnDialogClose_,!0),this.dialogEl_.addEventListener(`closeModal`,this.boundOnDialogClose_,!0),this.layoutEl_.addEventListener(`closeModal`,this.boundOnDialogClose_,!0)),this.achItem&&this.achItem.needsRefresh&&(this.achItem.records=[],this.refreshBatch())}disconnectedCallback(){super.disconnectedCallback(),this.dialogEl_&&(this.dialogEl_.removeEventListener(`cancel`,this.boundOnDialogClose_,!0),this.dialogEl_.removeEventListener(`closeModal`,this.boundOnDialogClose_,!0),this.layoutEl_.removeEventListener(`closeModal`,this.boundOnDialogClose_,!0))}async refreshBatch(){if(this.achItem){this.loading=!0;try{await this.achBatchController.refreshBatch(this.achItem.id)}catch{}finally{this.loading=!1}}}async onDialogClose_(e){if(!(e.detail&&e.detail.confirmed)){if(this.focusedPane===W.CONFIRMATION_PROMPT&&this._awaitingConfirmation){e.stopImmediatePropagation();return}if(this.hasUnsavedChanges){e.stopImmediatePropagation();let t=this.focusedPane;try{await this.awaitUserConfirmation(`You have unsaved changes.`,`Your changes will be lost if you leave now, are you sure?`),this.dispatchEvent(new CustomEvent(e.type,{bubbles:!0,composed:!0,detail:{...e.detail||{},confirmed:!0}}))}catch{this.focusedPane=t}}}}static get MODE(){return U}get focusedPane(){return this._focusedPane}set focusedPane(e){this.showError=!1,this._error=null,this.showSuccess=!1,this._focusedPane=e,(e===W.RECORDS_LIST||e===W.RECORDS_LIST_PRENOTE)&&this.recordListElement?.startFullFetch()}get isLoadingWithData(){return this.loading&&!!this.achItem}get isLoadingWithoutData(){return this.loading&&!this.achItem}get recipientForm(){return this.shadowRoot.querySelector(`bannoweb-ach-recipients-form`)}get recipientDetailsElement(){return this.shadowRoot.querySelector(`bannoweb-ach-recipient-details`)}get recordListElement(){return this.shadowRoot.querySelector(`bannoweb-ach-record-list`)}get requiresApproval(){return this.achItem?this.institution.abilities.achApprovalsRequireInitiate===!0&&this.achItem.entitlements.initiateWithoutApproval===!1:!1}getHeader_(e){switch(e){case W.RECORDS_LIST:return`Recipients`;case W.RECORDS_LIST_PRENOTE:return`Prenote recipients`;case W.RECIPIENT_DETAILS:return`Recipient details`;case W.DUPLICATE_BATCH:return`Duplicate batch`;case W.SUPPORT_OPTIONS:return`Attach to a conversation`;case W.ATTACH_TO_CONVERSATION:return`Select conversation`;case W.IMPORT_RECIPIENTS:return`Import recipients`;case W.SAME_DAY_INFO:return`Same day`;default:return this.achItem&&this.achItem.preNote?`Prenote batch details`:`Batch details`}}getSecondaryHeader_(e){switch(e){case W.RECORDS_LIST:case W.RECORDS_LIST_PRENOTE:return this.achItem&&this.achItem.batchName||``;default:return``}}showBackButton_(e){return[W.ADD_RECIPIENTS,W.ATTACH_TO_CONVERSATION,W.IMPORT_RECIPIENTS,W.RECORDS_LIST,W.RECIPIENT_DETAILS,W.DUPLICATE_BATCH,W.SUPPORT_OPTIONS,W.SAME_DAY_INFO].includes(e)}showHeaderText_(e){return![W.CONFIRMATION_PROMPT,W.DUPLICATE_CONFIRMATION].includes(e)}showRecipientsSortingMenu_(e,t){return!this.showSortACHRecipients||!t||!t.entitlements?!1:e===W.RECORDS_LIST&&this.editRecipientList===!1&&V.some(e=>t.entitlements[e])}showQuickEditButton_(e,t){return!t||!t.entitlements||t instanceof d||t.preNote||[p.BatchStatus.INITIATED,p.BatchStatus.PROCESSED,p.BatchStatus.PENDING_APPROVAL].includes(t.status)?!1:e===W.RECORDS_LIST&&this.editRecipientList===!1&&V.some(e=>t.entitlements[e])}showAddRecipientButton_(e,t){return t?t instanceof p&&!t.preNote&&e===W.RECORDS_LIST&&![p.BatchStatus.INITIATED,p.BatchStatus.PROCESSED,p.BatchStatus.PENDING_APPROVAL].includes(t.status)&&(t.entitlements.createNewCreditRecord||t.entitlements.createNewDebitRecord):!1}onRecordsSorting_(e){(e||{}).detail&&this.handleBatchRecordsSorting(e.detail.sortBy,e.detail.sortOrder)}handleBatchRecordsSorting(e,t){this.loading||(this.sortOrder=t,this.sortBy=e)}onClickEditRecipients(e){e.stopPropagation(),this.showError=!1,this._error=null,this.showSuccess=!1,this.editRecipientList=!0}onRecipientsSaved_(){this.editRecipientList=!1}onClickAddRecipient(e){switch(e.stopPropagation(),e.type){case M.Event.ADD_IMPORT:this.focusedPane=W.IMPORT_RECIPIENTS;break;case M.Event.ADD_MANUALLY:default:this.focusedPane=W.ADD_RECIPIENTS;break}}async onImportSuccess(e){let t=e;try{this.focusedPane=W.RECORDS_LIST,this.successMessage=`Your file '${t.detail.fileName}' was imported successfully.`,this.showSuccess=!0,this.recordListElement.currentIndex=0,this.loading=!0,await Promise.all([this.achBatchController.reloadBatchRecords(this.achItem.id),this.achBatchController.refreshBatch(this.achItem.id)])}catch(e){this.errorMessage=e.message}finally{this.achItem.needsRefresh=!0,this.loading=!1}}async onRecipientsAdded(e){e.detail&&(await this.addRecipients(e.detail),this.recordListElement&&await this.recordListElement.refetchAllPages())}
10async addRecipients(e){this._error=null,e.forEach(e=>{e.recipientAddenda&&=e.recipientAddenda.replace(/\n/g,` `)});try{await this.achBatchController.addBatchRecords(this.achItem.id,e),this.focusedPane=W.RECORDS_LIST,this.successMessage=`${e.length} recipient${e.length>1?`s`:``} added successfully.`,this.showSuccess=!0,this.recipientForm&&this.recipientForm.resetForm()}catch(e){let t=e.results;this.errorMessage=O(e)||o.OOPS_OUR_BAD_TRY_AGAIN_LATER,this.showError=!0,this.recipientForm&&(this.recipientForm.submitting=!1,this.recipientForm.hasUnsavedChanges=!0,t&&(this.recipientForm.records=this.recipientForm.records.filter((e,n)=>t[n]?.success===!1),e.results=t.filter(e=>e.success===!1))),this._error=e}}onClickBack_(e){switch(e&&e.stopPropagation(),this.focusedPane){case W.RECIPIENT_DETAILS:this.handleRecipientDetailsBack();break;case W.IMPORT_RECIPIENTS:case W.ADD_RECIPIENTS:this.handleAddRecipientsBack();break;case W.RECORDS_LIST:this.handleRecordListBack();break;default:this.focusedPane=W.ITEM_DETAILS}}get hasUnsavedChanges(){switch(this.focusedPane){case W.RECIPIENT_DETAILS:return!!this.recipientDetailsElement&&this.recipientDetailsElement.unsavedChanges;case W.ADD_RECIPIENTS:return!!this.recipientForm&&this.recipientForm.hasUnsavedChanges&&!this.recipientForm.justOneEmptyRecord;case W.RECORDS_LIST:return!!this.recordListElement&&this.recordListElement.isEditing&&!this.recordListElement.submitDisabled;default:return!1}}async handleRecipientDetailsBack(){let e=window.BannowebAchRecipientDetailsElement.SLIDER_PANES.ROUTING_SEARCH;if(this.recipientDetailsElement&&this.recipientDetailsElement.focusedPane===e)this.recipientDetailsElement.focusedPane=window.BannowebAchRecipientDetailsElement.SLIDER_PANES.DETAILS;else if(this.hasUnsavedChanges)try{await this.awaitUserConfirmation(`You have unsaved changes.`,`Your changes will be lost if you leave now, are you sure?`),this.selectedRecipient=null,this.recipientDetailsElement&&this.recipientDetailsElement.resetError(),this.focusedPane=W.RECORDS_LIST}catch{this.focusedPane=W.RECIPIENT_DETAILS}else this.selectedRecipient=null,this.focusedPane=W.RECORDS_LIST}async handleRecordListBack(){if(this.recordListElement&&this.recordListElement.isEditing){try{this.recordListElement.submitDisabled||await this.awaitUserConfirmation(`You have unsaved changes.`,`Your changes will be lost if you leave now, are you sure?`),this.recordListElement.resetEditing(),this.editRecipientList=!1}catch{}this.focusedPane=W.RECORDS_LIST}else this.focusedPane=W.ITEM_DETAILS}
10async handleAddRecipientsBack(){if(this.recipientForm&&this.recipientForm.focusedPane!==window.BannowebAchRecipientsFormElement.Pane.FORM){this.recipientForm.focusedPane=window.BannowebAchRecipientsFormElement.Pane.FORM;return}if(this.hasUnsavedChanges)try{await this.awaitUserConfirmation(`You have unsaved changes.`,`Your changes will be lost if you leave now, are you sure?`),this.recipientForm.resetForm(),this.focusedPane=W.RECORDS_LIST}catch{this.focusedPane=W.ADD_RECIPIENTS}else this.focusedPane=W.RECORDS_LIST}showSupportOptions(e){this.focusedPane=W.SUPPORT_OPTIONS}showConversationPicker(e){this.focusedPane=W.ATTACH_TO_CONVERSATION}onClickCancel(e){this.dispatchEvent(new CustomEvent(`cancel`,{bubbles:!0,composed:!0}))}onClickInitiate_(e){this.disableInitiate_(this.achItem)||this.onClickCancel(e)}onClickReject_(e){this.dispatchEvent(new CustomEvent(`closeModal`,{bubbles:!0}))}onClickImmediateInitiate_(e){this.isTogglingStatus=!0,this.doHighRisk(async()=>{await this.toggleStatus(p.BatchStatus.INITIATED),this.achItem.status===p.BatchStatus.INITIATED&&(this.successMessage=`Batch has been fully approved and initiated.`,this.showSuccess=!0)},()=>{this.isTogglingStatus=!1})}async awaitUserConfirmation(e,t,n){let r=this.shadowRoot.querySelector(`#confirmation-ok-button`);return r&&(r.removeAttribute(`is-loading`),r.isLoading=!1),this.confirmationTitle=e,this.confirmationDescription=t,this.confirmationOkText=n||`Yes`,this.focusedPane=W.CONFIRMATION_PROMPT,this._awaitingConfirmation=!0,new Promise((e,t)=>this.confirmationPromise_={resolve:e,reject:t})}onConfirmationCancel(e){this._awaitingConfirmation=!1,this.confirmationPromise_.reject(),this.confirmationPromise_=null}onConfirmationOk(e){this._awaitingConfirmation=!1,this.confirmationPromise_.resolve(),this.confirmationPromise_=null}onClickUninitiate_(e){e.stopPropagation(),this.uninitiateBatch()}async uninitiateBatch(){try{await this.awaitUserConfirmation(`Uninitiate ACH?`,`Your payment will be cancelled and won't be processed. The batch will return to a ready status and can still be edited and initiated again at a later time.`,`Uninitiate`),this.toggleStatus(p.BatchStatus.READY)}catch{this.focusedPane=W.ITEM_DETAILS}}async toggleStatus(e){if(e){this.isTogglingStatus=!0,this.showError=!1,this._error=null,this.showSuccess=!1;try{if(await this.achBatchController.toggleStatus(this.achItem.id,e),this.isTogglingStatus=!1,e===p.BatchStatus.READY){this.focusedPane=W.ITEM_DETAILS,this.achItem.entitlements.uninitiateBatch=!1;let e=this.achBatches.get(this.achItem.id);e&&e!==this.achItem&&(this.achItem=e,this.achBatchController.getBatchRecords(e.id,0)),this.showSuccess=!0,this.successMessage=`Uninitiated ACH payment '${this.achItem.batchName}' from ${this.achItem.achCompanyName} for ${T(this.achItem.maxTotalAmount)}`}}catch(e){this.focusedPane=W.ITEM_DETAILS,this.isTogglingStatus=!1,this.showError=!0,this._error=e,this.errorMessage=`${e?.title}: ${e?.details[0]}`}}}showDropdown_(e,t){return!e||e instanceof p&&!e.entitlements?!1:!!((this.showDownloadBatchButton_(e,t)||this.showDeleteBatchButton_(e)||this.displayDuplicateOption())&&t===W.ITEM_DETAILS)}showDeleteBatchButton_(e){return!!(e.entitlements&&e.entitlements.deleteBatch&&!e.isRecurring)}showDeleteRecipientAction_(e,t){return!e||!e.entitlements?!1:!!(e.entitlements&&e.entitlements.deleteRecord)&&!e.preNote&&this.isUninitiated(e.status)&&t===W.RECIPIENT_DETAILS}showDownloadBatchButton_(e,t){return!this.institution.abilities.achBatchDownload||e instanceof d?!1:t===W.ITEM_DETAILS}isUninitiated(e){return!!e&&[p.BatchStatus.READY,p.BatchStatus.PENDING_APPROVAL].includes(e)}onRecordClicked_(e){(e||{}).detail&&(this.selectedRecipient=e.detail,this.focusedPane=W.RECIPIENT_DETAILS)}onClickDelete(e){e.stopPropagation(),this.promptDeleteBatch()}onClickDeleteRecipient_(e){e.stopPropagation(),this.selectedRecipient&&this.deleteRecipient()}async togglePendingApproval(e){let t=this.achItem,n=k.calculateTogglePendingApprovalNewStatus(t),r={batchName:this.achItem.batchName,achCompanyId:this.achItem.achCompanyId,entryDescription:this.achItem.entryDescription,discretionaryData:this.achItem.discretionaryData,restricted:this.achItem.restricted,recurringInformation:this.achItem.recurringInformation,pendingApproval:!this.achItem.pendingApproval};try{await this.achBatchController.updateBatch(t.id,r,t),n&&(t.status=n)}catch(e){e&&(this.errorMessage=O(e),this.showError=!0,this._error=e)}}async deleteRecipient(){this._error=null;try{await this.awaitUserConfirmation(`Delete recipient?`,`Your ACH recipient "${this.selectedRecipient.recipientName}" will be deleted and cannot be undone.`,`Delete`),await this.achBatchController.deleteBatchRecords(this.achItem.id,[this.selectedRecipient.recordId]),this.focusedPane=W.RECORDS_LIST,this.successMessage=`Recipient ${this.selectedRecipient.recipientName} successfully removed.`,this.recordListElement&&await this.recordListElement.refetchAllPages(),this.selectedRecipient=null,this.showSuccess=!0,this.recipientDetailsElement&&this.recipientDetailsElement.resetError()}catch(e){this.focusedPane=W.RECIPIENT_DETAILS,e&&(this.errorMessage=O(e),this.showError=!0,this._error=e)}}async promptDeleteBatch(){try{await this.awaitUserConfirmation(`Delete ACH batch?`,`Your ACH batch "${this.achItem.batchName}" will be deleted and cannot be undone`,`Delete`),this.deleteBatch()}catch{this.onClickBack_()}}async deleteBatch(){this.achBatchController.deleteBatch(this.achItem.id).then(()=>{this.dispatchEvent(new CustomEvent(`closeModal`,{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`dispatchToast`,{bubbles:!0,composed:!0,detail:{message:`ACH batch "${this.achItem.batchName}" from ${this.achItem.achCompanyName} for ${T(this.achItem.maxTotalAmount)} was deleted successfully.`,status:`success`}}))}).catch(e=>{this.dispatchEvent(new CustomEvent(`closeModal`,{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`dispatchToast`,{bubbles:!0,composed:!0,detail:{message:`Something went wrong. Payment was not deleted.`}}))})}disableInitiate_(e){return e&&(e.status===p.BatchStatus.PENDING_APPROVAL||e.status===p.BatchStatus.READY)&&e.companyType===l.OffsetAccountType.BALANCE?e.totalCredits!==e.totalDebits:!1}showRecordsList_(e){e.stopPropagation(),this.focusedPane=W.RECORDS_LIST}showSameDayInfo_(e){e.stopPropagation(),this.focusedPane=W.SAME_DAY_INFO}getInitiateHref_(e){return`/payments/ach/initiate/${e}`}getRejectHref_(e){return u.url(s.BANNOWEB_ACH_BATCH_REJECT,{batchid:e})}async onRecipientUpdated(e){if(this.focusedPane=W.RECORDS_LIST,this.selectedRecipient){let e=this.achItem.records.find(e=>e.recordId===this.selectedRecipient.recordId)||this.selectedRecipient;this.successMessage=`Recipient ${e.recipientName} saved successfully`}let t=e?.detail?.editedRecord;this.recordListElement&&(t?await this.recordListElement.refreshAfterSave([t]):await this.recordListElement.refetchAllPages()),this.selectedRecipient=null,this.showSuccess=!0}onPrenoteInfoClick(e){this.showPrenoteDialog=!0}onRestrictedInfoClick(e){this.showRestrictedDialog=!0}displayDuplicateOption(){let e=this.achItem instanceof d&&this.institution.abilities.enableCopyHistoricalBatch,t=this.achItem instanceof p&&this.achItem.entitlements?.copyBatch;return this.user.achEntitlements.entitlements.createBatch&&(e||t)}onPrenoteClose(e){e.stopImmediatePropagation(),e.currentTarget.isLoading=!1,this.showPrenoteDialog=!1}onRestrictedClose(e){e.stopImmediatePropagation(),e.currentTarget.isLoading=!1,this.showRestrictedDialog=!1}onClickDuplicate(e){this.focusedPane=W.DUPLICATE_BATCH}onClickDownload(e){this.dispatchEvent(new CustomEvent(`closeModal`,{bubbles:!0,composed:!0}))}
10onDuplicateSuccess(e){this.duplicatedBatchName=e.detail.batchName,this.focusedPane=W.DUPLICATE_CONFIRMATION}get toggledSortOrder(){return this.sortOrder===p.sortOrder.DESC?p.sortOrder.ASC:p.sortOrder.DESC}static get styles(){return[x,b,t`bannoweb-dialog{--bannoweb-dialog-header-border-color:var(--divider-default-color)}:host([focused-pane=confirmation-prompt]) bannoweb-dialog{--bannoweb-dialog-header-border-color:transparent;--bannoweb-dialog-header-padding-bottom:0}header h1{color:var(--body-text-primary-color);justify-content:center;align-items:center;gap:8px;width:100%;margin:0;font-size:16px;font-weight:500;display:flex}header h2{width:100%;color:var(--body-text-secondary-color);margin:0;padding-top:3px;font-size:14px;font-weight:400}bannoweb-ach-add-recipient-menu,jha-button[icon]{margin-right:8px}article{margin:0 8px}section{border-top:1px dashed var(--divider-default-color);margin-top:24px;padding-top:24px}jha-slider-pane{flex-direction:column;max-height:calc(100vh - 130px);display:flex;overflow-y:auto}jha-slider-pane[item-details]{padding-left:var(--jha-content-inset)}jha-slider-pane[noun-support-options]{min-height:500px}div.progress{justify-content:center;align-items:center;height:160px;display:flex}jha-dropdown-menu{padding:16px 0}footer{padding:0 var(--jha-content-inset) 16px 0;text-align:center}footer .action-buttons{justify-content:center;gap:8px;margin:16px 0;display:flex}footer .notice{color:var(--body-text-secondary-color);justify-content:center;font-size:12px;line-height:18px;display:flex}footer .notice jha-icon-information{width:16px;height:16px}footer .notice jha-button{--jha-icon-color:var(--body-text-theme-color);margin:0 0 0 4px}footer .warning jha-icon-information{--jha-icon-color:var(--jha-color-warning);margin:0 4px 0 0}jha-dropdown{margin-right:16px}jha-icon-delete{fill:var(--body-text-rejected-color);width:20px;height:20px;margin-right:8px}#delete-recipient jha-icon-delete{fill:var(--jha-icon-color,var(--jha-text-base))}jha-slider-pane.confirm{flex-direction:column;align-items:center;display:flex}jha-slider-pane.confirm jha-icon-circle-warning{fill:var(--body-text-alert-color);width:106px;height:106px}jha-slider-pane.confirm bannoweb-flex-wrapper{align-items:center;gap:8px;margin-bottom:24px}jha-slider-pane.confirm h1{margin-bottom:8px;font-size:24px;font-weight:400}jha-slider-pane.confirm p{text-align:center;color:var(--body-text-secondary-color);margin:24px var(--jha-content-inset)}button.reset,a.reset{align-items:center;display:flex}jha-error-message{margin:8px var(--jha-content-inset)}jha-error-message.success{--jha-error-message-background-color:var(--jha-color-success)}jha-dropdown-menu-item{align-items:center;padding:10px 20px;display:flex}jha-dropdown-menu-item jha-icon-delete{vertical-align:middle;width:24px;height:24px;margin-right:12px}jha-dropdown-menu-item jha-icon-template,jha-dropdown-menu-item jha-icon-download{vertical-align:middle;fill:var(--jha-text-theme);margin-right:12px}jha-dropdown-menu-item span{vertical-align:bottom;margin-right:12px}jha-dropdown-menu-item button,jha-dropdown-menu-item a{line-height:24px}
10jha-icon-conversation{fill:var(--body-text-theme-color);width:24px;height:24px}.conversation{border-top:1px dashed var(--divider-default-color);margin-top:24px;padding-top:24px;padding-bottom:24px}.conversation button{justify-content:flex-start;align-items:center;gap:8px;display:flex}.more-info-container{flex-direction:column;align-items:center;line-height:1.4rem;display:flex}.more-info-container span{padding:24px;display:inline-block}.more-info-container hr{background-color:var(--divider-default-color);border:none;width:100%;height:1px}.more-info-container jha-button{margin:8px 0 16px}.header-right-recipients{align-items:center;display:flex}.header-right-recipients jha-dropdown{margin-right:8px}.sorting-dropdown jha-dropdown-menu{min-width:244px}.sorting-dropdown jha-dropdown-menu-item{border-radius:0;padding:0}.sorting-dropdown jha-dropdown-menu-item button{appearance:none;color:var(--body-text-primary-color);background:0 0;border:none;justify-content:space-between;align-items:center;width:100%;padding:5px 16px;font-family:Roboto;font-size:14px;font-weight:500;display:flex}.sorting-dropdown jha-dropdown-menu-item button.active{background-color:var(--jha-dropdown-menu-item-background-hover,var(--jha-focus-highlight-color))}.sorting-dropdown jha-dropdown-menu-item button:hover{cursor:pointer}.sorting-dropdown jha-dropdown-menu-item button span{align-items:center;gap:5px;display:flex}.sorting-dropdown jha-dropdown-menu-item button jha-icon-chevron-down,.sorting-dropdown jha-dropdown-menu-item button jha-icon-chevron-up{fill:var
10(--body-text-theme-color);width:24px;height:24px}`]}render(){return this.achItem?this.showPrenoteDialog?a`<bannoweb-text-confirmation-dialog .buttonText="${`OK`}" .description="${G}" .header="${`Prenote`}" @cancel="${this.onPrenoteClose}" @confirm="${this.onPrenoteClose}"></bannoweb-text-confirmation-dialog>`:this.showRestrictedDialog?a`<bannoweb-text-confirmation-dialog .buttonText="${`OK`}" .description="${K}" .header="${`Restrict payment`}" @cancel="${this.onRestrictedClose}" @confirm="${this.onRestrictedClose}"></bannoweb-text-confirmation-dialog>`:a`<bannoweb-dialog> ${this.showBackButton_(this.focusedPane)?a`<jha-button sync icon @click="${this.onClickBack_}" id="backBtn" slot="header-left" type="button"> <jha-icon-chevron-back aria-label="${`Back`}"></jha-icon-chevron-back> </jha-button>`:``} ${this.showHeaderText_(this.focusedPane)?a`<header slot="header-center"> <h1> ${this.getHeader_(this.focusedPane)} ${this.isLoadingWithData?a`<jha-progress></jha-progress>`:``} </h1> <h2>${this.getSecondaryHeader_(this.focusedPane)}</h2> </header>`:``} ${a`<div slot="header-right" class="header-right-recipients"> ${this.showRecipientsSortingMenu_(this.focusedPane,this.achItem)?a`<jha-dropdown class="sorting-dropdown"> <jha-dropdown-toggle slot="toggle"> <jha-icon-sort></jha-icon-sort> </jha-dropdown-toggle> <jha-dropdown-menu> <jha-dropdown-menu-item> <button class="${this.sortBy===p.sortBy.SEQUENCE_NUMBER?`active`:``}" @click="${()=>this.handleBatchRecordsSorting(p.sortBy.SEQUENCE_NUMBER,this.toggledSortOrder)}"> ${`Default`} </button> </jha-dropdown-menu-item> <jha-dropdown-menu-item> <button class="${this.sortBy===p.sortBy.RECIPIENT_NAME?`active`:``}" @click="${()=>this.handleBatchRecordsSorting(p.sortBy.RECIPIENT_NAME,this.toggledSortOrder)}"> ${`Recipient`} ${this.sortBy===p.sortBy.RECIPIENT_NAME?a`<span> ${this.sortOrder===p.sortOrder.ASC?a`A-Z <jha-icon-chevron-up></jha-icon-chevron-up>`:a`Z-A <jha-icon-chevron-down></jha-icon-chevron-down>`} </span>`:``} </button> </jha-dropdown-menu-item> <jha-dropdown-menu-item> <button class="${this.sortBy===p.sortBy.AMOUNT?`active`:``}" @click="${()=>this.handleBatchRecordsSorting(p.sortBy.AMOUNT,this.toggledSortOrder)}"> ${`Amount`} ${this.sortBy===p.sortBy.AMOUNT?a`<span> ${this.sortOrder===p.sortOrder.ASC?a`${`Ascending`} <jha-icon-chevron-up></jha-icon-chevron-up>`:a`${`Descending`} <jha-icon-chevron-down></jha-icon-chevron-down>`} </span>`:``} </button> </jha-dropdown-menu-item> <jha-dropdown-menu-item> <button class="${this.sortBy===p.sortBy.DEBIT_CREDIT&&this.sortOrder===p.sortOrder.DESC?`active`:``}" @click="${()=>this.handleBatchRecordsSorting(p.sortBy.DEBIT_CREDIT,p.sortOrder.DESC)}"> ${`Debits`} </button> </jha-dropdown-menu-item> <jha-dropdown-menu-item> <button class="${this.sortBy===p.sortBy.DEBIT_CREDIT&&this.sortOrder===p.sortOrder.ASC?`active`:``}" @click="${()=>this.handleBatchRecordsSorting(p.sortBy.DEBIT_CREDIT,p.sortOrder.ASC)}"> ${`Credits`} </button> </jha-dropdown-menu-item> </jha-dropdown-menu> </jha-dropdown>`:``} ${this.showQuickEditButton_(this.focusedPane,this.achItem)?a`<jha-button sync icon @click="${this.onClickEditRecipients}" id="editRecords" type="button"> <jha-icon-edit aria-label="${`Edit recipients`}"></jha-icon-edit>
10 </jha-button>`:``} </div>`} ${this.maybeRenderAddRecipientMenuOrButton()} ${this.showDropdown_(this.achItem,this.focusedPane)?a`<jha-dropdown slot="header-right"> <jha-dropdown-toggle slot="toggle"> <jha-icon-view-more></jha-icon-view-more> </jha-dropdown-toggle> <jha-dropdown-menu> ${this.displayDuplicateOption()?a`<jha-dropdown-menu-item> <button @click="${this.onClickDuplicate}" class="reset" type="button"> <jha-icon-template></jha-icon-template> <span>${`Duplicate`}</span> </button> </jha-dropdown-menu-item>`:``} ${this.showDownloadBatchButton_(this.achItem,this.focusedPane)?a`<jha-dropdown-menu-item> <a href="/payments/ach/batch/download/${this.achItem.id}" @click="${this.onClickDownload}" class="reset" type="button"> <jha-icon-download></jha-icon-download> <span>${`Download`}</span> </a> </jha-dropdown-menu-item>`:``} ${this.showDeleteBatchButton_(this.achItem)?a`<jha-dropdown-menu-item> <button @click="${this.onClickDelete}" class="reset" type="button"> <jha-icon-delete></jha-icon-delete> <span>${`Delete payment`}</span> </button> </jha-dropdown-menu-item>`:``} </jha-dropdown-menu> </jha-dropdown>`:``} ${this.showDeleteRecipientAction_(this.achItem,this.focusedPane)?a`<jha-button id="delete-recipient" sync icon @click="${this.onClickDeleteRecipient_}" slot="header-right" type="button"> <jha-icon-delete aria-label="${`Delete recipient`}"></jha-icon-delete> </jha-button>`:``} ${this.focusedPane===W.CONFIRMATION_PROMPT?a`<div slot="header-right"></div>`:a`<jha-button sync icon @click="${this.onClickCancel}" slot="header-right" type="button"> <jha-icon-close aria-label="${`Close dialog`}"></jha-icon-close> </jha-button>`} ${this.showSuccess?a`<jha-error-message class="success">${this.successMessage}</jha-error-message>`:``} ${this.showError?a`<article> <jha-error-message>${this.errorMessage}</jha-error-message> </article>`:``} <jha-slider> <jha-slider-content .focusedPane="${this.focusedPane}"> <jha-slider-pane one focus item-details> ${this.isLoadingWithoutData?a`<div class="progress"> <jha-progress></jha-progress> </div>`:a`<bannoweb-ach-batch-details .item="${this.achItem}
10" .showDetails="${this.showDetails}" @show-restricted-dialog="${this.onRestrictedInfoClick}" @show-same-day-info="${this.showSameDayInfo_}" @show-records-list="${this.showRecordsList_}" @start-conversation="${this.showSupportOptions}"></bannoweb-ach-batch-details> ${this.renderConversationButton()} <footer> <div class="action-buttons">${this.renderActionButtons()}</div> ${this.maybeRenderNotice()} </footer>`} </jha-slider-pane> <jha-slider-pane records-list records-list-prenote> ${this.isLoadingWithoutData?``:a`<bannoweb-ach-record-list .institution="${this.institution}" .isEditing="${this.editRecipientList}" .item="${this.achItem}" .showDetails="${!0}" .currentSortOrder="${this.sortOrder}" .currentSortBy="${this.sortBy}" @records-sorting="${this.onRecordsSorting_}" @record-selected="${this.onRecordClicked_}" @recipients-saved="${this.onRecipientsSaved_}"></bannoweb-ach-record-list>`} </jha-slider-pane> <jha-slider-pane recipient-details> <bannoweb-ach-recipient-details .institution="${this.institution}" .item="${this.achItem}" .recipient="${this.selectedRecipient}" @recipient-updated="${this.onRecipientUpdated}"></bannoweb-ach-recipient-details> </jha-slider-pane> <jha-slider-pane add-recipients> <bannoweb-ach-recipients-form .institution="${this.institution}" .entitlements="${this.achItem.entitlements}" .recipientResults="${this._error?this._error.results:null}" @save-recipients="${this.onRecipientsAdded}"></bannoweb-ach-recipients-form> </jha-slider-pane> <jha-slider-pane duplicate-batch> <bannoweb-duplicate-batch .item="${this.achItem}" @duplicate-batch-success="${this.onDuplicateSuccess}"></bannoweb-duplicate-batch> </jha-slider-pane> <jha-slider-pane duplicate-confirmation> <bannoweb-duplicate-confirmation .batchName="${this.duplicatedBatchName}"></bannoweb-duplicate-confirmation> </jha-slider-pane> <jha-slider-pane confirmation-prompt class="confirm"> <jha-icon-circle-warning></jha-icon-circle-warning> <h1>${this.confirmationTitle}</h1> <p>${this.confirmationDescription}</p> <bannoweb-flex-wrapper> <jha-button type="button" id="cancel-confirmation" sync wide default @click="${this.onConfirmationCancel}"> ${`Cancel`} </jha-button> <jha-button type="button" id="confirmation-ok-button" wide @click="${this.onConfirmationOk}"> ${this.confirmationOkText} </jha-button> </bannoweb-flex-wrapper> </jha-slider-pane> <jha-slider-pane noun-support-options> <p class="list-item-padding">${`If you have questions or need to chat about this ACH batch, attach it to a conversation.`}</p> <bannoweb-noun-support-options-list .entityId="${this.achItem.id}" .nounType="${this.achItem instanceof d?D.historicalAch:D.ach}" .institution="${this.institution}" @show-conversation-picker="${this.showConversationPicker}"></bannoweb-noun-support-options-list> </jha-slider-pane> <jha-slider-pane attach-to-conversation> <bannoweb-attachment-conversation-picker .entityId="${this.achItem.id}" .nounType="${this.achItem instanceof d?D.historicalAch:D.ach}" .description="${`Your ACH batch details will be attached to the conversation you choose from your list. You can add text or more attachments before sending.`}"></bannoweb-attachment-conversation-picker> </jha-slider-pane> <jha-slider-pane import-recipients> <bannoweb-ach-import-recipients .batchId="${this.achItem.id}" @cancel="${this.onClickBack_}" @import-success="${this.onImportSuccess}"></bannoweb-ach-import-recipients> </jha-slider-pane> <jha-slider-pane same-day-info> <div class="more-info-container"> <div> <span>${`Same-day transfers allow you to send and receive payments that are processed and settled on the same business day, providing faster access to funds compared to standard transfers, which typically take 1-3 business days. This is ideal for time-sensitive transactions, such as payroll, vendor payments, or urgent disbursements. However, same-day transfers may come with additional fees and require that payments meet specific cut-off times to qualify for same-day processing.`}</span> </div> <hr> <jha-button default sync wide @click="${this.onClickBack_}" type="button"> ${`OK`} </jha-button> </div> </jha-slider-pane> </jha-slider-content> </jha-slider> </bannoweb-dialog>`:``}renderActionButtons(){if(!this.achItem||!this.achItem.entitlements)return``;let e=[];
10if(this.achItem.entitlements.uninitiateBatch&&this.achItem.status===p.BatchStatus.INITIATED&&e.push(a`<jha-button default sync wide .isLoading="${this.isTogglingStatus}" @click="${this.onClickUninitiate_}" type="button"> ${`Uninitiate`} </jha-button>`),this.achItem.entitlements.deleteBatch&&this.achItem.isRecurring&&this.achItem.recurringInformation&&e.push(a`<jha-button default sync wide .isLoading="${this.isTogglingStatus}" @click="${this.onClickDelete}" type="button"> ${`Delete recurring batch`} </jha-button>`),this.institution.abilities.achApprovalsRequireInitiate===!1&&this.achItem.status===p.BatchStatus.READY&&this.achItem.entitlements.editPendingApproval&&e.push(a`<jha-button wide outline @click="${this.togglePendingApproval}"> ${`Mark as pending`} </jha-button>`),this.institution.abilities.achApprovalsRequireInitiate===!1&&this.achItem.status===p.BatchStatus.PENDING_APPROVAL&&this.achItem.entitlements.editPendingApproval&&e.push(a`<jha-button wide outline .sync="${!1}" @click="${this.togglePendingApproval}"> ${`Return to ready`} </jha-button>`),this.institution.abilities.achApprovalsRequireInitiate===!0&&this.achItem.status===p.BatchStatus.PENDING_APPROVAL&&e.push(a`<jha-link-button wide outline .href="${this.getRejectHref_(this.achItem.id)}" @click="${this.onClickReject_}"> ${`Reject`} </jha-link-button>`),this.achItem.entitlements.initiateBatch)if(this.institution.abilities.achApprovalsRequireInitiate===!0&&this.achItem.status===p.BatchStatus.PENDING_APPROVAL&&!c.isDateInPast(this.achItem.effectiveDate))e.push(a`<jha-button wide .isLoading="${this.isTogglingStatus}" .disabled="${this.disableInitiate_(this.achItem)}" @click="${this.onClickImmediateInitiate_}"> ${`Approve`} </jha-button>`);else{let t=`Review and initiate`;this.requiresApproval&&(t=`Approve and initiate`),e.push(a`<jha-link-button wide .disabled="${this.disableInitiate_(this.achItem)}" .href="${this.getInitiateHref_(this.achItem.id)}" @click="${this.onClickInitiate_}"> ${t} </jha-link-button>`)}return e}maybeRenderNotice(){if(!this.achItem||!this.achItem.entitlements)return``;if(this.achItem.preNote)return a`<div class="notice"> ${`This batch is a prenote.`} <jha-button icon sync type="button" @click="${this.onPrenoteInfoClick}"> <jha-icon-information aria-label="${`More information`}"></jha-icon-information> </jha-button> </div>`;if(this.achItem.status===p.BatchStatus.PENDING_APPROVAL&&this.requiresApproval)return c.isDateInPast(this.achItem.effectiveDate)?a`<div class="notice warning"> <jha-icon-information role="presentation"></jha-icon-information> ${`The effective date for this batch has passed. Please reject and initiate again.`} </div>`:a`<div class="notice">${`Batch was initiated and is waiting on one or more approval.`}</div>`;if(this.achItem.entitlements.initiateBatch&&this.requiresApproval)return a`<div class="notice">${`Two approvals are required to initiate this batch.`}</div>`}renderConversationButton(){if(this.showConversationButton&&this.institution.abilities.conversations)return a`<div class="conversation"> <button type="button" class="reset" @click="${this.showSupportOptions}"> <jha-icon-conversation></jha-icon-conversation> ${`Attach to a conversation`} </button> </div>`}maybeRenderAddRecipientMenuOrButton(){if(!this.showAddRecipientButton_(this.focusedPane,this.achItem))return``;let e=this.achItem;return!this.user.achEntitlements.entitlements.importACH||!e.entitlements?.importTransactions?a`<jha-button sync icon @click="${this.onClickAddRecipient}" id="addRecord" slot="header-right" type="button"> <jha-icon-add-person aria-label="${`Add recipient`}"></jha-icon-add-person> </jha-button>`:a`<bannoweb-ach-add-recipient-menu slot="header-right" @add-manually="${this.onClickAddRecipient}" @add-import="${this.onClickAddRecipient}"></bannoweb-ach-add-recipient-menu>`}},window.BannowebAchBatchDetailsDialogElement.Pane=W,customElements.define(window.BannowebAchBatchDetailsDialogElement.is,window.BannowebAchBatchDetailsDialogElement);var q=window.BannowebAchBatchDetailsDialogElement;export{q 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.