1import{a as z}from"./chunk-FVZKEHFL.js";import{a as G}from"./chunk-CABTRMED.js";import{a as s}from"./chunk-KUHFH43V.js";import{Cb as g,Eb as c,Fc as H,Gb as d,Hb as h,Jb as A,Jc as i,Kb as I,Kc as a,Lb as _,Lc as y,Mb as C,Mh as w,Nb as T,Nc as L,Nh as k,Ob as f,Od as W,Tc as l,Ub as N,Xa as u,Zb as r,cb as x,fa as E,ga as M,hc as P,jc as R,md as B,nd as q,o as S,ob as v,sd as D,tb as b,u as O}from"./chunk-PMSJWPYZ.js";var F=t=>({error:t});function Y(t,p){if(t&1&&(C(0,"p"),N(1,3),T()),t&2){let e=r().$implicit,n=r(3),o=P(3);R("error-message",!n.SROnly()),g("aria-live",n.SRAnnouncement()?"assertive":void 0)("role",n.SRAnnouncement()?"alert":void 0),x(),_("ngTemplateOutlet",o)("ngTemplateOutletContext",H(6,F,e))}}function $(t,p){if(t&1&&c(0,Y,2,8,"p",2),t&2){let e=p.$implicit,n=r(3);d(!n.showOnlyRequiredError()||e.key==="required"||e.key==="required_labeled"?0:-1)}}function j(t,p){if(t&1&&(C(0,"div"),A(1,$,1,1,null,null,h),T()),t&2){let e=r(),n=r();R("error-container",!n.SROnly())("sr-only",n.SROnly()),g("id",n.id()),x(),I(e)}}function J(t,p){if(t&1&&c(0,j,3,5,"div",1),t&2){let e=r();d(p.length&&(e.control().touched||e.control().dirty)&&!e.control().valid&&!e.validateWithoutErrors()?0:-1)}}function K(t,p){if(t&1&&(f(0,"span",4),i(1,"stripHtml"),i(2,"safeHtml")),t&2){let e=r().error,n=r();_("innerHTML",n.SROnly()?a(1,1,e.bag):a(2,3,e.bag),u)}}function Q(t,p){if(t&1&&(f(0,"span",4),i(1,"cxTranslate"),i(2,"stripHtml"),i(3,"cxTranslate"),i(4,"safeHtml")),t&2){let e=r().error,n=r();_("innerHTML",n.SROnly()?a(2,3,a(1,1,"error."+e.key)):a(4,7,a(3,5,"error."+e.key)),u)}}function U(t,p){if(t&1&&(f(0,"span",4),i(1,"cxTranslate"),i(2,"stripHtml"),i(3,"cxTranslate"),i(4,"safeHtml")),t&2){let e=r().error,n=r();_("innerHTML",n.SROnly()?a(2,4,y(1,1,"error."+e.key,e.bag)):a(4,9,y(3,6,"error."+e.key,e.bag)),u)}}function V(t,p){if(t&1&&c(0,K,3,5,"span",4)(1,Q,5,9,"span",4)(2,U,5,11,"span",4),t&2){let e,n=p.error,o=r();d((e=n.type)===o.ERROR_MESSAGE_TYPES.STRING?0:e===o.ERROR_MESSAGE_TYPES.TRANSLATION?1:e===o.ERROR_MESSAGE_TYPES.TRANSLATION_WITH_PROPS?2:-1)}}var ce=(()=>{class t{control=l();validateWithoutErrors=l(!1);showOnlyRequiredError=l(!1);fieldLabel=l();id=l();SRAnnouncement=l(!0);SROnly=l(!1);errors$=W(this.control).pipe(M(e=>e?e.statusChanges.pipe(E(null),O(()=>Object.entries(e.errors??{}).map(([n,o])=>{let m=this.fieldLabel();return m&&n==="required"&&this.getType(o)===s.TRANSLATION?{key:"required_labeled",bag:{label:m},type:s.TRANSLATION_WITH_PROPS}:{key:n,bag:o,type:this.getType(o)}}))):S([])));ERROR_MESSAGE_TYPES=s;getType(e){return typeof e=="string"?s.STRING:e instanceof Object?s.TRANSLATION_WITH_PROPS:s.TRANSLATION}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=v({type:t,selectors:[["trn-input-error"]],inputs:{control:[1,"control"],validateWithoutErrors:[1,"validateWithoutErrors"],showOnlyRequiredError:[1,"showOnlyRequiredError"],fieldLabel:[1,"fieldLabel"],id:[1,"id"],SRAnnouncement:[1,"SRAnnouncement"],SROnly:[1,"SROnly"]},decls:4,vars:3,consts:[["errorMessage",""],[3,"error-container","sr-only"],[3,"error-message"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"innerHTML"]],template:function(n,o){if(n&1&&(c(0,J,1,1),i(1,"async"),b(2,V,3,1,"ng-template",null,0,L)),n&2){let m;d((m=a(1,1,o.errors$))?0:-1,m)}},dependencies:[D,B,k,q,w,G,z],styles:[".error-container[_ngcontent-%COMP%]{margin-top:4px;margin-bottom:4px}.error-message[_ngcontent-%COMP%]{font-size:14px;line-height:20px;letter-spacing:normal;padding-top:2px;padding-bottom:2px;color:#e3000f}.error-message[_ngcontent-%COMP%] a{color:#007a48;text-decoration:underline}@media(hover:hover){.error-message[_ngcontent-%COMP%] a:hover{color:#004a28}}.error-message[_ngcontent-%COMP%]{white-space:pre-line}"]})}return t})();export{ce as a};
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.