1import{a as e}from"./standalone-app-Bj-IdwrG.js";import{E as t,_ as n,p as r,x as i}from"./institution-DyFDvNu6.js";import{t as a}from"./date-URgChy6n.js";import{Cn as o,Dn as s,En as c,In as l,Q as u,Sn as d,i as f,kn as p,o as m,wn as h}from"./main-5Sl8yySz.js";import"./jha-card-DC-UH8vN.js";import"./jha-button-Dyau4S4K.js";import{i as g,l as _,r as v}from"./banno-styles-B3iGgKv1.js";import"./bannoweb-dialog-6PdYs8ag.js";import"./jha-list-UCQUTbOQ.js";import"./jha-select-ZNLtNzvA.js";import"./jha-form-checkbox-rBX0llE9.js";import{t as y}from"./observable-models-lit-Conecq5s.js";import"./jha-form-floating-group-DqE4-9IH.js";import"./bannoweb-frequency-end-list-CgBVD2Rk.js";import"./jha-button-group-UOfsFIHZ.js";import{t as b}from"./wires-DENK5yER.js";import{t as x}from"./bannoweb-institutions-routing-number-search-dialog-BF2RVjNr.js";window.BannowebWireTemplateInformationDialogElement=class extends n{static get is(){return`bannoweb-wire-template-information-dialog`}static get properties(){return{isInitiating:{type:Boolean}}}constructor(){super(),this.isInitiating=!1}onClickConfirm(e){this.dispatchEvent(new CustomEvent(`closeModal`,{bubbles:!0,composed:!0}))}static get styles(){return[v,g,t`:host{--bannoweb-dialog-header-border-color:var(--divider-default-color);display:block}article{margin-left:var(--jha-card-article-margin-left);border-bottom:1px solid var(--divider-default-color);padding:16px 16px 36px 0}footer{justify-content:center;align-items:center;height:70px;padding:0;display:flex}`]}renderDescription(){return this.isInitiating?i`<p> Choosing the "Save template" option will create a separate recurring wire, and retain the current template so it can be used later. Otherwise, the template will become a recurring wire and cannot be reverted back. </p>`:i`<p> Choose the "Save as template" checkbox if you would like to send a wire to the same recipient multiple times in the future. The recipient details will be saved in the wire template. Wires that are saved as templates will remain in the templates list on the wires dashboard after initiating. Wires that are not saved as templates will move to the history list once processed and cannot be edited afterwards. </p>`}render(){return i`<bannoweb-dialog> <div slot="header-center">${this.isInitiating?i`Save template`:i`<h1>Wire templates</h1>`}</div> <article>${this.renderDescription()}</article> <footer> <div> <jha-button sync @click="${this.onClickConfirm}" type="button"> Ok </jha-button> </div> </footer> </bannoweb-dialog>`}},customElements.define(window.BannowebWireTemplateInformationDialogElement.is,window.BannowebWireTemplateInformationDialogElement);var S=window.BannowebWireTemplateInformationDialogElement,C=y(n);window.BannoWebWireCountrySelector=class extends C{static get is(){return`bannoweb-wire-country-selector`}static get properties(){return{country:{type:String,value:``},required:{type:Boolean},disabled:{type:Boolean}}}constructor(){super(),this.wiresController=m.wiresController,this.countryCodeSubscription,this.countryCodes=[],this.country=``,this.required=!1,this.isLoading=!0,this.disabled=!1}async getWireCountryCodes(){await this.wiresController.getWireCountryCodes()}connectedCallback(){super.connectedCallback(),this.countryCodeSubscription=r.from(this.wiresController).subscribe(e=>{this.countryCodes=e?.data?.map(({country:e,alpha2Code:t})=>({name:`${e} - ${t}`,value:t}))||[],this.isLoading=!1,this.requestUpdate(void 0,void 0)}),this.getWireCountryCodes()}disconnectedCallback(){super.disconnectedCallback(),this.countryCodeSubscription.unsubscribe()}handleCountryChange(e){let t=e?.detail?.value;t&&(this.country=t,this.dispatchEvent(new CustomEvent(`on-change`,{bubbles:!0,composed:!0,detail:{country:this.country}})))}validateInput(e,t){return!e&&this.required?`Country is required`:e&&e.length>2?`Country must be at least 2 characters`:``}static get styles(){return[t`:host{flex:1}jha-select{--jha-select-text:var(--jha-input-placeholder-color), var(--body-text-theme-color);--jha-select-text-size:var(--jha-form-floating-group-label-font-size,15px);--jha-select-padding:12px}`]}render(){return i`<jha-form-floating-group outline small .error="${this.validateInput(this.country)}" .hasValue="${!!this.country}"> <jha-select empty-option-label="${`Country`}" .options="${this.countryCodes}" selected-value="${this.country}" ?disabled="${this.isLoading||this.disabled}" @selected-value-changed="${this.handleCountryChange}"></jha-select> </jha-form-floating-group>`}}
1,customElements.define(window.BannoWebWireCountrySelector.is,window.BannoWebWireCountrySelector),window.BannoWebWireCountrySelector;var w=`US`,T=n;window.BannoWebWireRecipientAddress=class extends T{static get is(){return`bannoweb-wire-recipient-address`}static get properties(){return{addressParent:{type:String,attribute:`addressparent`,reflect:!0},addressGroupLabel:{type:String,attribute:`address-group-label`,reflect:!0},addressData:{type:Object,value:()=>{}},showOptionalFields:{type:Boolean,reflect:!0},requiredFields:{type:Array},international:{type:Boolean,reflect:!0,attribute:`international`},minimal:{type:Boolean,reflect:!0,attribute:`minimal`},institution:{type:Object,value:()=>m.store.institution}}}constructor(){super(),e(()=>import(`./icon-plus-CGq-1aop.js`).then(e=>e.t),[]),e(()=>import(`./icon-minus-DKzJxPcP.js`),[]),this.draftAddressData={...this.addressData},this.showOptionalFields=!1,this.requiredFields=[],this.touchedFields=new Set,this.invalidFields=new Set,this.addressGroupLabel=``,this.addressParent=``,this.minimal=!1,this.international=!1,this.institution=m.store.institution}set addressData(e){this.draftAddressData={...e},this.draftAddressData?.country||(this.draftAddressData.country=w)}toggleOptionalFields(e){this.showOptionalFields=!this.showOptionalFields}validateInput(e,t){return e&&!this.touchedFields.has(t)&&this.touchedFields.add(t),!e&&(d[t]?.required||this.requiredFields.includes(t))&&this.touchedFields.has(t)?(this.invalidFields.add(t),`Field is required`):e&&d[t]?.regexPattern?.pattern&&!d[t].regexPattern.pattern.test(e)?(this.invalidFields.add(t),d[t]?.regexPattern?.errorMsg||`Unsupported characters`):e&&e.length>d[t]?.maxLength?(this.invalidFields.add(t),`${d[t]?.label} must be less than ${d[t]?.maxLength} characters`):(this.invalidFields.delete(t),``)}validate(){let e=new Set([...this.requiredFields,...Object.keys(d),...Object.keys(this.draftAddressData)]);return e.forEach(e=>{this.touchedFields.add(e)}),this.invalidFields.clear(),e.forEach(e=>{let t=this.draftAddressData[e]||``;this.validateInput(t,e)}),this.requestUpdate(void 0,void 0),this.invalidFields.size===0}resetValidation(){this.touchedFields=new Set,this.invalidFields=new Set,this.requestUpdate(void 0,void 0)}updateField(e,t){let{value:n}=e?.target;this.validateInput(n,t),this.draftAddressData[t]=n,this.dispatchEvent(new CustomEvent(`save-address`,{bubbles:!0,composed:!0,detail:{invalidFields:this.invalidFields,addressParent:this.addressParent,buildingDetails:{...this.addressData,...this.draftAddressData}}}))}renderInputField(e,t={}){let{required:n=!1,disabled:r=!1}=t,a=this.draftAddressData[e]||``,o=d[e]?.required||this.requiredFields?.includes(e)||n;return i`<jha-form-floating-group outline small .error="${this.validateInput(a,e)}" .hasValue="${!!a}"> <input type="text" name="${e}" .value="${a}" maxlength="${d[e].maxLength}" .pattern="${d[e]?.regexPattern?.pattern?.source}" spellcheck="false" autocorrect="off" autocapitalize="off" autocomplete="off" ?disabled="${r}" ?required="${o}" @change="${t=>this.updateField(t,e)}"> <div class="label">${d[e].label}</div> </jha-form-floating-group>`}static get styles(){return[v,t`:host{display:block}.address{margin-top:2em}h3{margin:0;padding:0;font-size:12px}.optional-fields-heading{margin-top:1em}jha-form-floating-group{--jha-form-floating-group-disabled-color:var(--body-text-secondary-color);--jha-form-floating-group-disabled-border-color:var(--divider-default-color)}.row{gap:12px;display:flex}.row jha-form-floating-group{flex:1}jh-icon-plus,jh-icon-minus{fill:var(--body-text-theme-color);width:18px;height:18px;margin-right:6px;position:relative;top:3px}`]}render(){return i`<div class="address"> <h3>${this.addressGroupLabel}</h3> ${this.addressParent!==`intermediaryAgentInformation`&&this.addressParent!==`creditorAgentInformation`?i`<div class="row">${this.renderInputField(`buildingNumber`)} ${this.renderInputField(`streetName`)}</div>`:``} <div class="row">${this.renderInputField(`city`)} ${this.renderInputField(`state`)}</div> <div class="row"> ${this.minimal?``:this.renderInputField(`zipCode`)} <bannoweb-wire-country-selector .disabled="${!this.institution?.abilities?.allowInternationalUsdWires}" @on-change="${e=>this.updateField({target:{value:e.detail.country}},`country`)}" .required="${this.requiredFields.includes(`country`)}" .country="${this.draftAddressData?.country||``}"></bannoweb-wire-country-selector> </div> ${this.showOptionalFields?i`<h3 class="optional-fields-heading">${`Optional address fields`}</h3> <div class="row">${this.renderInputField(`department`)} ${this.renderInputField(`subDepartment`)}</div> <div class="row">${this.renderInputField(`postBox`)} ${this.renderInputField(`buildingName`)}</div> <div class="row">${this.renderInputField(`room`)} ${this.renderInputField(`floor`)}</div> <div class="row"> ${this.renderInputField(`townLocationName`)} ${this.renderInputField(`districtName`)} </div>`:``} ${this.minimal?``:i`<jha-button sync @click="${this.toggleOptionalFields}" link class="toggle-optional-fields"> ${this.showOptionalFields?i`<jh-icon-minus></jh-icon-minus> ${`Hide optional fields`}`:i`<jh-icon-plus></jh-icon-plus> ${`Show optional fields`}`} </jha-button>
1`} </div>`}},customElements.define(window.BannoWebWireRecipientAddress.is,window.BannoWebWireRecipientAddress),window.BannoWebWireRecipientAddress;var E=u.FieldErrors,D={endToEndIdentification:p.find(e=>e.name===`endToEndIdentification`),...d,...o,...h,...c,...s},O={"creditorAgentInformation.institutionInformation.id":`creditor`,"instructedAgentInformation.abaNumber":`instructed`,"intermediaryAgentInformation.institutionInformation.id":`intermediary`},k=[`name`,`amount`,`template`,`remittanceInformation`],A,j=y(n);window.BannowebWireRecipientElement=class extends j{static get is(){return`bannoweb-wire-recipient`}static get properties(){return{amount:{type:Number},showInstructedAgent:{type:Boolean},showIntermediaryAgent:{type:Boolean},isDomesticWire:{type:Boolean},instructedAgentSameAsCreditorAgent:{type:Boolean},recipient:{type:Object},draftRecipient:{type:Object},validInput:{type:Boolean,value:!1},isEditing:{type:Boolean,value:!1},editingError:{type:String,value:null},stateCodes:{type:Array,value:()=>Array.from(l.stateCodes)},fedWireInfo:{type:Object,value:()=>{}},individualErrors:{type:Array,value:()=>[]},fieldErrors:{type:Object,value:()=>E},routingNumberError:{type:String},editSingleWireEntitlements:Object,institution:Object,isDomestic:{type:Boolean,reflect:!0},isInternational:{type:Boolean,reflect:!0},useIntermediaryAgent:{type:Boolean,reflect:!1},idCodeOptions:{type:Array},showErrorsOnLoad:{type:Boolean,value:!1}}}constructor(){super(),e(()=>import(`./icon-magnifying-glass-WPl4LQI3.js`).then(e=>e.t),[]),e(()=>import(`./icon-circle-info-CI9QftZe.js`).then(e=>e.t),[]),this.form_=null,this.routingNumberError=null,this.institution=m.store.institution,this.isDomestic=!0,this.isInternational=!1,this.useIntermediaryAgent=!1,this.showIntermediaryAgent=!1,this.idCodeOptions=[{name:`SWIFT code`,value:`B`},{name:`Chips Participant Identifier`,value:`C`},{name:`FRB Routing number`,value:`F`}],this.touchedFields=new Set,this.invalidFields=new Set,this.invalidAddressFields=new Set,this.amount=0,this.initialRecipient=null,this.hasPerformedFirstUpdate=!1}get hasChanges(){let e=this.initialRecipient||this.recipient;return k.some(t=>(e?.[t]||``)!==(this.draftRecipient?.[t]||``))?!0:[`creditorInformation`,`creditorAgentInformation`,`instructedAgentInformation`,`intermediaryAgentInformation`].some(t=>JSON.stringify(e?.[t])!==JSON.stringify(this.draftRecipient?.[t]))}connectedCallback(){super.connectedCallback(),this.form_=this.shadowRoot?.querySelector(`form`),this.draftRecipient=structuredClone(this.recipient||{}),this.recipient?.creditorAgentInformation?.idCode&&this.recipient?.creditorAgentInformation?.idCode!==`F`&&(this.isInternational=!0,this.isDomestic=!1),this.recipient?.intermediaryAgentInformation?.idCode&&(this.useIntermediaryAgent=!0),this.setDefaultOfInstructedAgentSameAsCreditorAgent()}updated(e){super.updated(e),this.hasPerformedFirstUpdate||(this.hasPerformedFirstUpdate=!0,requestAnimationFrame(()=>{this.initialRecipient=structuredClone(this.draftRecipient)})),e.has(`recipient`)&&this.hasPerformedFirstUpdate&&requestAnimationFrame(()=>{this.initialRecipient=structuredClone(this.draftRecipient)}),e.has(`showErrorsOnLoad`)&&this.showErrorsOnLoad&&(this.editingError=`Please fill out all required fields and try again.`,this.touchedFields=new Set(Object.keys(D)),this._addressValidators.forEach(e=>{e.validate()}),this.requestUpdate(void 0,void 0)),this.editingError&&this.allFieldsValid&&(this.editingError=null)}shouldUpdate(e){return e.has(`recipient`)&&k.some(t=>e.get(`recipient`)?.[t]!==this.recipient?.[t])&&(this.draftRecipient=structuredClone(this.recipient||{})),!0}disconnectedCallback(){super.disconnectedCallback()}setDefaultOfInstructedAgentSameAsCreditorAgent(){(!this.draftRecipient.instructedAgentInformation||Object.keys(this.draftRecipient.instructedAgentInformation).length===0)&&(this.instructedAgentSameAsCreditorAgent=!0),this.draftRecipient.creditorAgentInformation?.institutionInformation?.id===this.draftRecipient.instructedAgentInformation?.abaNumber&&(this.instructedAgentSameAsCreditorAgent=!0)}formatAccountNumber_(e){e.currentTarget.value=(e.currentTarget.value||``).replace(/[^\d]/g,``)}async validateAndGetRoutingNumberInfo(e){let t=this.draftRecipient?.creditorInformation?.number;if(!e&&!this.routingNumberError)return;if(!e){this.routingNumberError=null;return}let n=await b.validateRoutingNumber(e,t);return this.isInternational||(this.routingNumberError=n.error||null,this.requestUpdate()),n.institutionInfo}get hasInternationalWires(){return!this.institution.isCreditUnion&&this.institution?.abilities?.allowInternationalUsdWires}toggleIntermediaryAgent(e){e?.detail?.value?(this.useIntermediaryAgent=!0,this.recipient.intermediaryAgentInformation?this.setInstitutionInformation({city:this.recipient.intermediaryAgentInformation.buildingDetails?.city||``,state:this.recipient.intermediaryAgentInformation.buildingDetails?.state||``},`intermediary`):this.setInstitutionInformation({},`intermediary`)):(this.useIntermediaryAgent=!1,this.draftRecipient.intermediaryAgentInformation={})}handleRoutingNumberChange(e,t){if(!e.trim()||e.length<9)return;let n=O[t];this.validateAndGetRoutingNumberInfo(e).then(e=>{e&&this.setInstitutionInformation(e,n)})}openIntermediaryAgentDialog(){this.openInstitutionsDialog(`intermediary`)}openInstructedAgentDialog(){this.openInstitutionsDialog(`instructed`)}
1openCreditorAgentDialog(){this.openInstitutionsDialog(`creditor`)}setInstitutionInformation(e={},t){let{city:n,telegraphicName:r,routingNumber:i,state:a}=e;switch(this.routingNumberError=null,t){case`intermediary`:this.validateAndGetRoutingNumberInfo(i),this.draftRecipient.intermediaryAgentInformation.institutionInformation={name:r,id:i},this.draftRecipient.intermediaryAgentInformation.buildingDetails={city:n,state:a},r&&i&&(this.draftRecipient.intermediaryAgentInformation.idCode=`F`,this.draftRecipient.intermediaryAgentInformation.buildingDetails.country=`US`);break;case`instructed`:this.draftRecipient.instructedAgentInformation={name:r,abaNumber:i,city:n,state:a};break;case`creditor`:this.draftRecipient.creditorAgentInformation.institutionInformation={name:r,id:i},this.draftRecipient.creditorAgentInformation.buildingDetails={...this.draftRecipient.creditorAgentInformation.buildingDetails,city:n,state:a},this.isInternational||(this.draftRecipient.creditorAgentInformation.buildingDetails.country=`US`);break}this.requestUpdate(void 0,void 0)}openInstitutionsDialog(e){let t=new x;t.mode=window.BannowebInstitutionsRoutingNumberSearchDialogElement.Mode.WIRES,t.addEventListener(`set-institution`,(t=>{t?.detail&&this.setInstitutionInformation(t.detail,e),this.dispatchEvent(new CustomEvent(`closeModal`,{bubbles:!0,composed:!0}))}).bind(this)),this.dispatchEvent(new f(t))}_isRequired(e){return!!(D[e]?.required||this.isInternational&&this.useIntermediaryAgent&&(e===`intermediaryAgentInformation.institutionInformation.name`||e===`intermediaryAgentInformation.institutionInformation.id`))}validateInput(e,t){return e&&!this.touchedFields.has(t)&&this.touchedFields.add(t),t===`creditorAgentInformation.institutionInformation.id`&&this.routingNumberError||t===`instructedAgentInformation.abaNumber`&&this.routingNumberError?(this.invalidFields.add(t),this.routingNumberError):!e&&this._isRequired(t)&&this.touchedFields.has(t)?(this.invalidFields.add(t),`Field is required`):e&&D[t]?.regexPattern?.pattern&&!D[t].regexPattern.pattern.test(e)?(this.invalidFields.add(t),D[t]?.regexPattern?.errorMsg||`Unsupported characters`):e&&e.length>D[t]?.maxLength?(this.invalidFields.add(t),`${D[t]?.label} must be less than ${D[t]?.maxLength} characters`):(this.invalidFields.delete(t),``)}get creditorAddressRequiredFields(){let e=[`city`,`country`];return b.isHighValueWire(this.amount)?[...e,`zipCode`,`state`,`buildingNumber`,`streetName`]:e}setInstructedAgentSameAsCreditorAgent(){let{institutionInformation:e,buildingDetails:t}=this.draftRecipient.creditorAgentInformation,{name:n=``,id:r=``}=e,{city:i=``,state:a=``,country:o=``}=t;this.draftRecipient.instructedAgentInformation={name:n,abaNumber:r,city:i,state:a,country:o}}toggleDomestic(){this.isDomestic=!0,this.isInternational=!1,this.draftRecipient.intermediaryAgentInformation={},this.draftRecipient.instructedAgentInformation={...this.draftRecipient.instructedAgentInformation,idCode:`F`},this.draftRecipient.creditorAgentInformation.idCode=`F`}toggleInternational(){this.isInternational=!0,this.isDomestic=!1,this.draftRecipient?.instructedAgentInformation?.idCode&&(this.draftRecipient.instructedAgentInformation.idCode=``),this.draftRecipient?.intermediaryAgentInformation?.idCode&&(this.draftRecipient.intermediaryAgentInformation.idCode=``),this.draftRecipient?.creditorAgentInformation?.idCode&&(this.draftRecipient.creditorAgentInformation.idCode=``)}toggleSameCreditorAgentDetails(e){e?.detail?.value!==this.instructedAgentSameAsCreditorAgent&&(!this.instructedAgentSameAsCreditorAgent&&!this.isInternational?(this.instructedAgentSameAsCreditorAgent=!0,this.setInstructedAgentSameAsCreditorAgent()):(this.instructedAgentSameAsCreditorAgent=!1,this.draftRecipient.instructedAgentInformation={}),this.requestUpdate(void 0,void 0))}_validateAllFields(){this.invalidFields.clear();let e=Object.keys(D).filter(e=>!!D[e]?.required),t=!0;return e.forEach(e=>{this._getValueFromPath(this.draftRecipient,e)||(this.invalidFields.add(e),t=!1)}),this.isInternational&&this.useIntermediaryAgent&&(this._getValueFromPath(this.draftRecipient,`intermediaryAgentInformation.institutionInformation.name`)||(this.invalidFields.add(`intermediaryAgentInformation.institutionInformation.name`),t=!1),this._getValueFromPath(this.draftRecipient,`intermediaryAgentInformation.institutionInformation.id`)||(this.invalidFields.add(`intermediaryAgentInformation.institutionInformation.id`),t=!1)),t}_isRoutingNumberValid(){return!this.routingNumberError}_getValueFromPath(e,t){return t.split(`.`).reduce((e,t)=>
1e&&e[t],e)}get _addressValidators(){return this.shadowRoot.querySelectorAll(`.address-validator`)}get allFieldsValid(){return this.invalidFields.size===0&&this.invalidAddressFields.size===0}reset(){this.touchedFields=new Set,this.invalidFields.clear(),this.editingError=null,this.draftRecipient=structuredClone(this.initialRecipient||this.recipient||{}),this.setDefaultOfInstructedAgentSameAsCreditorAgent(),this._addressValidators.forEach(e=>e.resetValidation()),this.requestUpdate(void 0,void 0)}handleCancel(){this.dispatchEvent(new CustomEvent(`cancel-editing-recipient`,{bubbles:!0,composed:!0}))}async handleSave(e){e.preventDefault(),e.stopPropagation(),this.instructedAgentSameAsCreditorAgent&&!this.isInternational&&(this.setInstructedAgentSameAsCreditorAgent(),this.draftRecipient.intermediaryAgentInformation={});let t=!0;this.invalidAddressFields=new Set,this._addressValidators.forEach(e=>{e.validate()||(t=!1,e.invalidFields&&e.invalidFields.size>0&&e.invalidFields.forEach(e=>this.invalidAddressFields.add(e)))});let n=this._validateAllFields(),r=this._isRoutingNumberValid();if(!(n&&t&&r)){this.editingError=`Please fill out all required fields and try again.`,this.touchedFields=new Set(Object.keys(D)),this.requestUpdate(void 0,void 0),await this.updateComplete,window.scrollTo({top:0,behavior:`smooth`});return}this.editingError=null,this.dispatchEvent(new CustomEvent(`update-invalid-fields`,{bubbles:!0,composed:!0,detail:{invalidFields:new Set([...this.invalidFields,...this.invalidAddressFields])}})),this.dispatchEvent(new CustomEvent(`save-recipient`,{bubbles:!0,composed:!0,detail:{recipient:this.draftRecipient}}))}_revalidateField(e){let t=this._getValueFromPath(this.draftRecipient,e);this.validateInput(t,e)}updateField(e,t){let{value:n}=e?.target;if(Object.keys(O).includes(t)&&e.isTrusted&&this.handleRoutingNumberChange(n,t),t.includes(`.`)){let e=t.split(`.`),r=this.draftRecipient;for(let t=0;t<e.length;t++)t===e.length-1?r[e[t]]=n:(r[e[t]]||(r[e[t]]={}),r=r[e[t]])}else this.draftRecipient[t]=n;this.validateInput(n,t),this.instructedAgentSameAsCreditorAgent&&!this.isInternational&&t.startsWith(`creditorAgentInformation`)&&(this.setInstructedAgentSameAsCreditorAgent(),this._revalidateField(`instructedAgentInformation.abaNumber`),this._revalidateField(`instructedAgentInformation.name`)),this.requestUpdate(void 0,void 0)}saveAddress(e){let t=e.detail;t.invalidFields&&t.invalidFields.size>0&&(this.invalidAddressFields=t.invalidFields),t.addressParent&&(this.draftRecipient[t.addressParent].buildingDetails={...this.draftRecipient[t.addressParent].buildingDetails,...t.buildingDetails}),this.requestUpdate(void 0,void 0)}handleCreditorAgentIdCodeChange(e){this.draftRecipient.creditorAgentInformation.idCode=e.detail.value}handleIntermediaryIdCodeChange(e){this.draftRecipient.intermediaryAgentInformation.idCode=e.detail.value}renderInputField(e={}){let{fieldName:t,disabled:n=!1,maxLength:r=255,fieldLabel:a=``}=e,o=``,s=D[t]?.required,c=a||D[t]?.label;return o=t.includes(`.`)?t.split(`.`).reduce((e,t)=>e[t]?e[t]:``,this.draftRecipient):this.draftRecipient[t],i`<jha-form-floating-group outline small .error="${this.validateInput(o,t)}" .hasValue="${!!o}" id="${t}"> <input type="text" name="${t}" .value="${o}" maxlength="${D[t]?.maxLength||r}" .pattern="${D[t]?.regexPattern?.pattern?.source}" spellcheck="false" autocorrect="off" autocapitalize="off" autocomplete="off" ?disabled="${n}" ?required="${s}" @input="${e=>this.updateField(e,t)}" @change="${e=>this.updateField(e,t)}" list="${[`creditorAgentInformation.idCode`,`intermediaryAgentInformation.idCode`].includes(t)?`idCode`:``}"> <div class="label">${c}</div> </jha-form-floating-group>`}static get styles(){return[v,t`:host{display:block}form{margin:18px var(--jha-content-inset)}h2{margin:0;font-size:16px}p{margin:.25em 0 1em;font-size:12px}.header-row{justify-content:space-between;align-items:center;display:flex}jha-form-floating-group{--jha-form-floating-group-disabled-color:var(--body-text-secondary-color);--jha-form-floating-group-disabled-border-color:var(--divider-default-color)}.row{gap:12px;display:flex}.row jha-form-floating-group{flex:1}hr{margin:18px calc(-1 * var(--jha-content-inset)) 24px;background-color:var(--jha-border-color);border:none;height:1px}
1jh-icon-magnifying-glass{fill:var(--body-text-theme-color);width:18px;height:18px;margin-right:6px;position:relative;top:3px}footer{border-top:1px solid var(--jha-border-color);text-align:center;margin-top:24px;padding:24px 0 8px}jha-error-message{background-color:var(--jha-color-danger,#f44336);color:var(--error-text-color);margin-bottom:16px}input[error]{border-color:var(--jha-color-danger,#f44336)}.routing-number-error{color:var(--jha-color-danger);margin-top:5px;font-size:12px}.dotted-line{content:" ";border-bottom:1px dashed var(--jha-form-floating-group-outline-border-color,var(--jha-border-color));height:1px;margin:2em 0;display:block}.wire-type{align-items:baseline;display:flex}.wire-type h2{flex:1;display:inline-flex}.wire-type-options{text-align:right;flex:1}jha-button-group{flex-basis:200px}jha-button-group button:disabled{opacity:.5;cursor:not-allowed}.heading-with-options{display:flex}.heading-with-options h2{flex:1}.heading-with-options .options{text-align:right;flex:1}#idCode jha-select{--jha-select-text:var(--jha-input-placeholder-color), var(--body-text-theme-color);--jha-select-text-size:var(--jha-form-floating-group-label-font-size,15px);--jha-select-padding:12px}.required-indicator{color:var(--body-text-theme-color);margin-left:2px;font-weight:700}`]}render(){return i`<form @submit="${this.handleSave}"> ${this.editingError?i`<jha-error-message role="alert" id="main-error-banner"> ${this.editingError} </jha-error-message>`:``} ${this.hasInternationalWires?i`<div class="row wire-type"> <h2>Wire type</h2> <div class="wire-type-options"> <jha-button-group primary> <button ?disabled="${this.isEditing}" type="button" ?active="${this.isDomestic}" @click="${this.toggleDomestic}"> Domestic </button> <button ?disabled="${this.isEditing}" type="button" ?active="${this.isInternational}" @click="${this.toggleInternational}"> International </button> </jha-button-group> </div> </div>`:``} <div class="dotted-line"></div> <h2>${`Creditor details`}</h2> <p>${`Person or company receiving the payment.`}</p> ${this.renderInputField({fieldName:`creditorInformation.name`})} ${this.renderInputField({fieldName:`creditorInformation.number`})} <bannoweb-wire-recipient-address class="address-validator" addressparent="creditorInformation" .international="${this.isInternational}" .minimal="${!1}" @save-address="${this.saveAddress}" .address-group-label="${`Creditor address`}" .addressData="${{...this.draftRecipient.creditorInformation.buildingDetails}}" .requiredFields="${this.creditorAddressRequiredFields}"></bannoweb-wire-recipient-address> <div class="dotted-line"></div> <div class="heading-with-options"> <div> <h2>${`Creditor agent`}</h2> <p>${`Beneficiary institution that holds the creditorâs account.`}</p> </div> ${this.isDomestic?i`<div class="options"> <jha-button type="button" default small sync @click="${this.openCreditorAgentDialog}"> <jh-icon-magnifying-glass></jh-icon-magnifying-glass> ${`Find institution`} </jha-button> </div>`:``} </div> <div class="row"> ${this.isDomestic?i`${this.renderInputField({fieldName:`creditorAgentInformation.institutionInformation.id`,fieldLabel:`Routing/ABA number`})}`:``} ${this.renderInputField({fieldName:`creditorAgentInformation.institutionInformation.name`})} </div> <div class="row">${this.renderInputField({fieldName:`endToEndIdentification`})}</div> ${this.isInternational?i`<div class="row"> ${this.renderInputField({fieldName:`creditorAgentInformation.institutionInformation.id`})} <jha-form-floating-group outline small .hasValue="${!!this.draftRecipient.creditorAgentInformation.idCode}" id="idCode"> <jha-select empty-option-label="Select code" .options="${this.idCodeOptions}" selected-value="${this.draftRecipient.creditorAgentInformation.idCode}" @selected-value-changed="${this.handleCreditorAgentIdCodeChange}"></jha-select> </jha-form-floating-group> </div>`:``} <bannoweb-wire-recipient-address class="address-validator" addressparent="creditorAgentInformation" .international="${this.isInternational}" .minimal="${!0}" @save-address="${this.saveAddress}" .address-group-label="${`Creditor agent address`}" .requiredFields="${[`city`,`country`,`state`]}" .addressData="${{...this.draftRecipient.creditorAgentInformation.buildingDetails}}"></bannoweb-wire-recipient-address> <div class="dotted-line"></div> <div class="heading-with-options"> <div> <h2>${`Instructed agent`}</h2> <p>${`Creditor's receiving financial institution.`}</p> </div> ${!this.instructedAgentSameAsCreditorAgent||this.isInternational?i`<div class="options"> <jha-button type="button" default small sync @click="${this.openInstructedAgentDialog}"> <jh-icon-magnifying-glass></jh-icon-magnifying-glass> ${`Find institution`} </jha-button>
1 </div>`:``} </div> ${this.isInternational?``:i`<jha-form-checkbox ?checked="${this.instructedAgentSameAsCreditorAgent}" @checked-changed="${this.toggleSameCreditorAgentDetails}" role="checkbox" aria-checked="${String(this.instructedAgentSameAsCreditorAgent)}"> ${`Same details as creditor agent`} </jha-form-checkbox>`} ${!this.instructedAgentSameAsCreditorAgent||this.isInternational?i`<div class="row"> ${this.renderInputField({fieldName:`instructedAgentInformation.abaNumber`})} ${this.renderInputField({fieldName:`instructedAgentInformation.name`})} </div> <div class="row"> ${this.renderInputField({fieldName:`instructedAgentInformation.city`})} ${this.renderInputField({fieldName:`instructedAgentInformation.state`})} </div>`:``} ${this.isInternational?i`<div> <div class="dotted-line"></div> <div class="heading-with-options"> <div> <h2>${`Intermediary agent`}</h2> <p>${`Institution facilitating funds between sender and recipient.`}</p> </div> ${this.useIntermediaryAgent?i`<div class="options"> <jha-button type="button" default small sync @click="${this.openIntermediaryAgentDialog}"> <jh-icon-magnifying-glass></jh-icon-magnifying-glass> ${`Find institution`} </jha-button> </div>`:``} </div> <jha-form-checkbox ?checked="${this.useIntermediaryAgent}" @checked-changed="${this.toggleIntermediaryAgent}" role="checkbox" aria-checked="${String(this.useIntermediaryAgent)}"> ${`Use intermediary agent`} </jha-form-checkbox> ${this.useIntermediaryAgent?i`${this.renderInputField({fieldName:`intermediaryAgentInformation.institutionInformation.name`})} <div class="row"> ${this.renderInputField({fieldName:`intermediaryAgentInformation.institutionInformation.id`})} ${this.isInternational?i`<jha-form-floating-group outline small .hasValue="${!!this.draftRecipient.intermediaryAgentInformation.idCode}" id="idCode"> <jha-select empty-option-label="Select code" .options="${this.idCodeOptions}" selected-value="${this.draftRecipient.intermediaryAgentInformation.idCode}" @selected-value-changed="${this.handleIntermediaryIdCodeChange}"></jha-select> </jha-form-floating-group>`:``} </div> <bannoweb-wire-recipient-address class="address-validator" addressparent="intermediaryAgentInformation" .international="${this.isInternational}" .minimal="${!0}" @save-address="${this.saveAddress}" address-group-label="${`Intermediary agent address`}" .requiredFields="${[`city`,`country`]}" .addressData="${{...this.draftRecipient.intermediaryAgentInformation.buildingDetails}}"></bannoweb-wire-recipient-address>`:``} </div>`:``} <footer> <jha-button wide sync outline @click="${this.handleCancel}"> ${`Cancel`} </jha-button> <jha-button wide type="submit" sync> ${`Save`} </jha-button> </footer> </form>`}},window.BannowebWireRecipientElement.WireInstitution=A,customElements.define(window.BannowebWireRecipientElement.is,window.BannowebWireRecipientElement),window.BannowebWireRecipientElement;var M=[{display:`Never`,type:window.BannowebFrequencyEndListElement.FrequencyEndType.NEVER},{display:`Ends on date`,type:window.BannowebFrequencyEndListElement.FrequencyEndType.END_DATE}],N=n;window.BannowebWireRecurringOptionsElement=class extends N{static get is(){return`bannoweb-wire-recurring-options`}static get properties(){return{selectedDate:{type:Object},selectedDays:{type:Array},selectedFrequency:{type:Object},selectedFrequencyEnd:{type:Object},lastProcessingDay:{type:Boolean},isSubmitting:{type:Boolean},showScheduleOption:{type:Boolean},showFrequencyOption:{type:Boolean}}}constructor(){super(),e(()=>import(`./icon-chevron-right-small-BraCudZ4.js`).then(e=>e.t),[]),this.selectedDate=null,this.selectedFrequency=u.Frequencies[0],this.selectedFrequencyEnd=M[0],this.selectedDays=[],this.lastProcessingDay=!1,this.isSubmitting=!1,this.showScheduleOption=!1,this.showFrequencyOption=!1}get frequencyButtonText(){return(this.selectedFrequency||{}).display}onSelectOption_(e){this.dispatchEvent(new CustomEvent(`select-option`,{detail:{paneId:e.currentTarget.id},composed:!0,bubbles:!0}))}static get styles(){return[v,_,t`:host([no-border]) jha-list-item:first-of-type{border-top:none}jha-list-item{box-sizing:border-box;border-bottom:solid 1px var(--jha-border-color);justify-content:space-between;align-items:center;min-height:64px;padding-left:0;display:flex}jha-list-item:first-of-type{border-top:solid 1px var(--jha-border-color)}jha-list-item:after{border:0}label{margin-right:32px;font-size:16px}jha-list-item>button.reset{text-align:right;width:100%;color:var(--body-text-theme-color);justify-content:flex-end;align-items:center;font-size:16px;display:flex}
1jh-icon-chevron-right-small{fill:var(--body-text-secondary-color);width:20px;height:20px;flex-shrink:0;width:18px;height:18px;margin-left:8px;position:relative;top:0}.text-light{color:var(--jha-text-neutral);font-size:14px}`]}renderScheduleButtonText(){if(!this.selectedDate||isNaN(this.selectedDate))return`Schedule`;let e,t=a.getShortMonthDate(this.selectedDate);if(this.selectedFrequency.unit===u.FrequencyUnit.ONCE)return t;let n=a.getWeekday(this.selectedDate||null),r=a.ordinalSuffix(this.selectedDays[0]?this.selectedDays[0]:this.selectedDate.getDate()),o=b.datesToOrderedDays(this.selectedDays),s=o&&o.length===2?a.semiMonthlyDaysFormat(o[0],o[1],this.lastProcessingDay?`on the last day`:``,this.lastProcessingDay):null;switch(this.selectedFrequency.unit){case u.FrequencyUnit.WEEKLY:e=`${n}s`;break;case u.FrequencyUnit.BIWEEKLY:e=`Every other ${n}`;break;case u.FrequencyUnit.SEMIMONTHLY:e=`${s}`;break;case u.FrequencyUnit.MONTHLY:e=`${r} of the month`;break;case u.FrequencyUnit.QUARTERLY:e=`${r} of every three months`;break;case u.FrequencyUnit.SEMIANNUALLY:let t=new Date(this.selectedDate);e=`${a.getShortMonthName(this.selectedDate||``)} & ${a.getShortMonthName(new Date(t.setMonth(t.getMonth()+6)))} ${r}`;break;case u.FrequencyUnit.ANNUALLY:e=`${a.getShortMonthDate(this.selectedDate||``)}`;break;default:e=``}return i`${e} <div class="text-light">${`Starts ${t}`}</div>`}render(){return i`<jha-list> ${this.showFrequencyOption?i`<jha-list-item> <label for="frequency">${`Frequency`}</label> <button type="button" id="frequency" class="reset" @click="${this.onSelectOption_}" ?disabled="${this.isSubmitting}"> <div>${this.frequencyButtonText}</div> <jh-icon-chevron-right-small aria-label="${`Choose frequency`}" aria-hidden="false"></jh-icon-chevron-right-small> </button> </jha-list-item>`:``} ${this.showScheduleOption?i`<jha-list-item> <label for="schedule">${`Schedule`}</label> <button type="button" id="schedule" class="reset" @click="${this.onSelectOption_}" ?disabled="${this.isSubmitting}"> <div>${this.renderScheduleButtonText()}</div> <jh-icon-chevron-right-small aria-label="${`Choose schedule`}" aria-hidden="false"></jh-icon-chevron-right-small> </button> </jha-list-item> ${(this.selectedFrequency||{}).unit===u.FrequencyUnit.ONCE?``:i`<jha-list-item> <label for="ends">${`Ends`}</label> <button type="button" id="ends" class="reset" @click="${this.onSelectOption_}" ?disabled="${this.isSubmitting}"> <div>${b.endsButtonText(this.selectedFrequencyEnd)}</div> <jh-icon-chevron-right-small aria-label="${`Choose termination date`}" aria-hidden="false"></jh-icon-chevron-right-small> </button> </jha-list-item>`}`:``} </jha-list>`}},customElements.define(window.BannowebWireRecurringOptionsElement.is,window.BannowebWireRecurringOptionsElement),window.BannowebWireRecurringOptionsElement;export{S as t};
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.