PageSourceSearch

https://oldmutual.co.mw/_next/static/chunks/2387.f749971bea58071c.js

js oldmutual.co.mw collected 2026-10-08 21:08:13 UTC 6,778 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[205,2387],{62387:(t,e,a)=>{a.r(e),a.d(e,{omk_radio_button_group:()=>r});var i=a(42573);a(42122);var s=a(70205),o=a(20160);let r=class{constructor(t){(0,i.r)(this,t),t.$hostElement$["s-ei"]?this.internals=t.$hostElement$["s-ei"]:(this.internals=t.$hostElement$.attachInternals(),t.$hostElement$["s-ei"]=this.internals),this.customValidationMessage="",this.focusable=!1,this.validity={customError:!1,valueMissing:!1,valid:!0},this.alwaysShowValidationMessage=!1,this.hideValidationMessage=!1,this.showInnerValidationMessages=!1,this.required=!1,this.isGroupInvalid=!1,this.touched=!1,this.validateAfterNextRender=!0,this.handleSlotChange=t=>{t.target.assignedElements().forEach(t=>{"OMK-RADIO"===t.tagName&&(this.form&&(t.form=this.form),this.name&&(t.groupName=this.name),t.hideValidationMessage=!this.showInnerValidationMessages,t.required=this.required,t.alwaysShowValidationMessage=this.alwaysShowValidationMessage)})}}updateGroupName(t){this.getRadioButtons().forEach(e=>{e.groupName=t})}updateAssociatedForm(t){this.getRadioButtons().forEach(e=>{e.form=t})}async validationPropsChanged(){this.getRadioButtons().forEach(t=>{t.hideValidationMessage=!this.showInnerValidationMessages,t.required=this.required,t.alwaysShowValidationMessage=this.alwaysShowValidationMessage}),await this.validate()}componentDidLoad(){this.alwaysShowValidationMessage&&(this.touched=!0),(this.customValidationMessage||this.required)&&(this.validateAfterNextRender=!0)}componentDidRender(){this.validateAfterNextRender&&(this.validateAfterNextRender=!1,this.validate())}async reset(){this.touched=!1,this.internals.setValidity({}),this.validationMessage=void 0,this.validity=this.internals.validity}async handleInnerInteraction(){await this.validate(!0)}async validate(t){var e,a,i,r,n,l,d;if(t&&(this.touched=!0),this.customValidationMessage)this.internals.setValidity({customError:!0},this.customValidationMessage,(null==(e=this.el.querySelector("omk-radio"))?void 0:e.querySelector("input.hide"))||void 0),this.validationMessage=this.customValidationMessage;else if(this.required&&!this.getRadioButtons().length)this.internals.setValidity({valueMissing:!0},(0,s.g)(null!=(i=null==(a=o.l.componentValidationMessageOverrides)?void 0:a["omk-radio"])?i:{},{valueMissing:!0,badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!1},"You must make a selection.",{label:this.headerText||this.subheaderText}),void 0),this.validationMessage=this.internals.validationMessage;else{let e=await this.validateGroup(t),a=e.some(t=>t&&t.length>0);this.internals.setValidity({customError:a},a?e.find(t=>t.length>0):"",(null==(r=this.el.querySelector("omk-radio"))?void 0:r.querySelector("input.hide"))||void 0)}return this.validity=null==(n=this.internals)?void 0:n.validity,this.validationMessage=null==(l=this.internals)?void 0:l.validationMessage,null==(d=this.validity)?void 0:d.valid}async validateGroup(t){let e=this.getRadioButtons(),a=[];for(let i of e)await i.validate(t),i.validity.valid||(a.push(i.validationMessage||"Invalid value"),e.forEach(t=>{t.isGroupInvalid=!0}));return a}getRadioButtons(){let t=this.el.shadowRoot.querySelector("slot");return t?t.assignedElements().filter(t=>"OMK-RADIO"===t.tagName):[]}render(){let t=!this.hideValidationMessage&&(this.touched||this.alwaysShowValidationMessage)&&!!this.validationMessage;return(0,i.h)("omk-selection-group",{key:"67fe1d86a153f4f4a440cb9461c94e14682bbd19",headerText:this.headerText,subheaderText:this.subheaderText,validationMessage:this.validationMessage,hideValidationMessage:!t},(0,i.h)("slot",{key:"ac65caf3df878c237bc8b4ae69f1c6e52c6fb7f9",onSlotchange:this.handleSlotChange}))}formAssociatedCallback(t){t&&(t.addEventListener("reset",()=>this.reset()),(0,s.s)(t).forEach(t=>t.addEventListener("click",()=>{this.touched=!0,this.validateAfterNextRender=!0})))}static get delegatesFocus(){return!0}static get formAssociated(){return!0}get el(){return(0,i.a)(this)}static get watchers(){return{name:[{updateGroupName:0}],form:[{updateAssociatedForm:0}],customValidationMessage:[{validationPropsChanged:0}],required:[{validationPropsChanged:0}],showInnerValidationMessages:[{validationPropsChanged:0}],alwaysShowValidationMessage:[{validationPropsChanged:0}]}}};r.style=":host{display:block}"},70205:(t,e,a)=>{a.d(e,{a:()=>s,b:()=>u,c:()=>o,d:()=>c,g:()=>l,p:()=>h,s:()=>d});let i=async(t,e)=>new Promise(a=>{setTimeout(()=>a(t()),e)}),s=async(t,e=2e3)=>Promise.race([new Promise((t,a)=>{setTimeout(a,e)}),new Promise(async e=>{let a;for(;[void 0,null].includes(a=t());)await i(()=>null,10);e(a)})]),o=["altKey","ctrlKey","metaKey","shiftKey"],r=["badInput","valueMissing","tooLong","tooShort","typeMismatch","patternMismatch","rangeOverflow","rangeUnderflow","stepMismatch"],n=(t,e)=>t?e?Object.keys(e).reduce((t,a)=>{var i;return t.replace(RegExp(`\\{${a}\\}`,"g"),String(null!=(i=null==e?void 0:e[a])?i:""))},t):t:null,l=(t,e,a,i,s)=>{var o;if(e.customError)return a;let l=((t,e)=>{var a;return e&&Array.isArray(t)?null!=(a=t.find(t=>Object.keys(e).every(a=>{var i;return(null==(i=null==t?void 0:t.componentFilter)?void 0:i[a])===(null==e?void 0:e[a])})))?a:t.find(t=>void 0===t.componentFilter):t})(t,s);for(let t of r)if(e[t])return null!=(o=n(null==l?void 0:l[t],i))?o:a;return a},d=t=>{var e;return[...null!=(e=null==t?void 0:t.querySelectorAll("[type=submit],button:not([type]),omk-button:not([type])"))?e:[],...(null==t?void 0:t.id)?document.querySelectorAll(`button[form=${t.id}], omk-button[form=${t.id}]`):[]]},h=(t,e)=>t.endsWith("px")?parseFloat(t):t.endsWith("rem")?parseFloat(t)*parseFloat(getComputedStyle(document.documentElement).fontSize):t.endsWith("em")?parseFloat(t)*parseFloat(getComputedStyle(e).fontSize):parseFloat(t),u=(t,e,a)=>Math.min(Math.max(t,e),a),c=t=>{switch(t){case"top":return["bottom","left","right"];case"bottom":return["top","left","right"];case"left":return["right","top","bottom"];case"right":return["left","bottom","top"];
1case"top-start":return["bottom-start","top-end","bottom-end","right-start","left-start"];case"top-end":return["bottom-end","left","top","bottom","top-start","bottom-start","right-start"];case"bottom-start":return["top-start","bottom-end","top-end","left-start","right-start"];case"bottom-end":return["top-end","bottom-start","top-start","right-end","left-end"];case"left-start":return["right-start","left-end","right-end","top-start","bottom-start"];case"left-end":return["right-end","left-start","right-start","top-end","bottom-end"];case"right-start":return["left-start","right-end","left-end","bottom-start","top-start"];case"right-end":return["left-end","right-start","left-start","bottom-end","top-end"]}}}}]);

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.