1"use strict";(self.webpackChunkweb_front_end_angular_cli=self.webpackChunkweb_front_end_angular_cli||[]).push([[5075],{8173:(U,j,o)=>{o.d(j,{D:()=>S});var a=o(99148),t=o(85240),M=o(24755),E=o(49074),n=o(27953),D=o(34487),V=o(68071),C=o(48503),u=o(43901),P=o(51567),s=o(12481);const h=v=>[v];function I(v,l){if(1&v&&(s.j41(0,"li",4)(1,"a",5),s.nI1(2,"localize"),s.nrm(3,"img",6),s.j41(4,"span",7),s.EFF(5),s.nI1(6,"translate"),s.k0s()()()),2&v){const p=s.XpG();s.AVh("show-for-large",p.validBreadcrumbs().length>1),s.R7$(),s.Y8G("routerLink",s.eq3(8,h,s.bMT(2,4,"/"))),s.R7$(4),s.JRh(s.bMT(6,6,"shared.breadcrumbs.root"))}}function N(v,l){if(1&v&&(s.j41(0,"a",9),s.EFF(1),s.nI1(2,"translate"),s.nI1(3,"capitalizeFirst"),s.k0s()),2&v){const p=s.XpG().$implicit;s.Y8G("routerLink",s.eq3(6,h,p.url)),s.R7$(),s.SpI(" ",s.bMT(3,4,s.bMT(2,2,p.displayName))," ")}}function O(v,l){if(1&v&&(s.j41(0,"span",10),s.EFF(1),s.nI1(2,"translate"),s.nI1(3,"capitalizeFirst"),s.k0s()),2&v){const p=s.XpG().$implicit;s.R7$(),s.SpI(" ",s.bMT(3,3,s.bMT(2,1,p.displayName))," ")}}function y(v,l){if(1&v&&(s.j41(0,"li",8),s.nVh(1,N,4,8,"a",9),s.nVh(2,O,4,5,"span",10),s.k0s()),2&v){const p=l.$implicit,x=l.$index,k=l.$count;s.AVh("show-for-large",!p.showOnMobile),s.R7$(),s.vxM(p.routable&&x!==k-1?1:-1),s.R7$(),s.vxM(x===k-1?2:-1)}}let S=(()=>{var v;class l{constructor(){this.showHomeButton=(0,a.hFB)(!0),this.initBreadcrumbsSubscription=(0,a.hFB)(!0),this.breadcrumbService=(0,t.WQX)(n.b),this.breadcrumbs=(0,t.vPA)([]),this.destroyRef=(0,t.WQX)(t.abz),this.validBreadcrumbs=(0,M.EW)(()=>this.breadcrumbs().filter(Boolean)),this.breadcrumbsVm=(0,M.EW)(()=>{const x=this.validBreadcrumbs(),k=this.showHomeButton(),$=x.length-2,J=1===x.length;return x.map((F,w)=>{const L=w===$;return{...F,showOnMobile:k?L:L||J}})}),this.initializeBreadcrumbs()}initializeBreadcrumbs(){this.initBreadcrumbsSubscription()&&this.breadcrumbService.breadcrumbChanged$.pipe((0,E.pQ)(this.destroyRef),(0,P.p)(()=>this.initBreadcrumbsSubscription())).subscribe(x=>{this.breadcrumbs.set(x||[])})}trackByBreadcrumb(x,k){return k?k.url?Array.isArray(k.url)?k.url.join("/"):String(k.url):`${x}_${k.displayName||""}`:`null_${x}`}}return(v=l).\u0275fac=function(x){return new(x||v)},v.\u0275cmp=s.VBU({type:v,selectors:[["app-breadcrumb"]],inputs:{showHomeButton:[1,"showHomeButton"],initBreadcrumbsSubscription:[1,"initBreadcrumbsSubscription"]},decls:5,vars:3,consts:[[1,"row","wrapper","breadcrumbs-wrapper"],[1,"breadcrumbs","flex-wrap"],[1,"home-crumb-li","shrink",3,"show-for-large"],[1,"crumb",3,"show-for-large"],[1,"home-crumb-li","shrink"],[1,"breadcrumbs-item","home-crumb",3,"routerLink"],["src","https://cdn.easypay.ua/images/svg/home.svg","alt","home-page",1,"show-for-large"],[1,"hide-for-large"],[1,"crumb"],[1,"breadcrumbs-item",3,"routerLink"],[1,"breadcrumbs-item"]],template:function(x,k){1&x&&(s.j41(0,"div",0)(1,"ul",1),s.nVh(2,I,7,10,"li",2),s.Z7z(3,y,3,4,"li",3,k.trackByBreadcrumb,!0),s.k0s()()),2&x&&(s.R7$(),s.AVh("homeless",!k.showHomeButton()),s.R7$(),s.vxM(k.showHomeButton()?2:-1),s.R7$(),s.Dyx(k.breadcrumbsVm()))},dependencies:[D.Wk,u.J,V.t,C.D9],styles:["[_nghost-%COMP%]{background-color:#eaecf6;display:block}@media only screen and (max-width: 1023.8px){.breadcrumbs-wrapper[_ngcontent-%COMP%]{padding:0 16px}}.breadcrumbs[_ngcontent-%COMP%]{min-height:46px;padding:7px 0;list-style:none;display:flex;align-items:center;margin-bottom:0;position:relative;flex:1 1 auto}.breadcrumbs[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{position:relative;padding:7px 8px 7px 17px;text-transform:none;font-size:16px;line-height:1;color:#202020;font-weight:400;cursor:default}@media only screen and (min-width: 1024px){.breadcrumbs[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:first-child{padding-left:0}}.breadcrumbs[_ngcontent-%COMP%] li[_ngcontent-%COMP%] [_ngcontent-%COMP%]:after{content:url(https://cdn.easypay.ua/images/svg/category-arrow.svg);position:absolute;box-sizing:border-box;display:block;width:14px;height:13px;transform:rotate(-90deg);top:calc(50% - 6px);left:-5px}.breadcrumbs[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#202020}.breadcrumbs[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}.home-crumb-li[_ngcontent-%COMP%]{height:31px}@media only screen and (min-width: 1024px){.breadcrumbs-item.home-crumb[_ngcontent-%COMP%]{position:relative;top:-1px}.breadcrumbs-item.home-crumb[_ngcontent-%COMP%]:after{display:none!important}}@media only screen and (min-width: 1024px){.breadcrumbs.homeless[_ngcontent-%COMP%] li.crumb[_ngcontent-%COMP%]:first-child{padding-left:0}}@media only screen and (min-width: 1024px){.breadcrumbs.homeless[_ngcontent-%COMP%] li.crumb[_ngcontent-%COMP%]:first-child a.breadcrumbs-item[_ngcontent-%COMP%]:after{display:none!important}}.breadcrumbs.homeless[_ngcontent-%COMP%] li.crumb[_ngcontent-%COMP%]:only-child:
1has(span.breadcrumbs-item){padding-left:0}.breadcrumbs.homeless[_ngcontent-%COMP%] li.crumb[_ngcontent-%COMP%]:only-child span.breadcrumbs-item[_ngcontent-%COMP%]:after{display:none!important}"],changeDetection:0}),l})()},11753:(U,j,o)=>{o.d(j,{u:()=>nt});var a=o(85240),t=o(59817),M=o(93683),E=o(48503),n=o(12481);function D(_,B){if(1&_){const T=n.RV6();n.j41(0,"button",6),n.bIt("click",function(){a.eBV(T);const f=n.XpG();return a.Njj(f.close("secondary"))}),n.EFF(1),n.nI1(2,"translate"),n.k0s()}if(2&_){const T=n.XpG();n.R7$(),n.SpI(" ",n.bMT(2,1,null==T.data?null:T.data.secondaryBtnText)," ")}}let C=(()=>{var _;class B{constructor(b,f){this.data=b,this.dialogRef=f}close(b){this.dialogRef.close(b)}}return(_=B).\u0275fac=function(b){return new(b||_)(n.rXU(t.e),n.rXU(t.k))},_.\u0275cmp=n.VBU({type:_,selectors:[["app-insurance-popup"]],decls:12,vars:10,consts:[[1,"info-dialog"],[1,"info-dialog__title"],[1,"info-dialog__subtitle"],[1,"info-dialog__actions"],[1,"btn","btn-primary",3,"click"],["class","btn btn-outline",3,"click",4,"ngIf"],[1,"btn","btn-outline",3,"click"]],template:function(b,f){1&b&&(n.j41(0,"div",0)(1,"h2",1),n.EFF(2),n.nI1(3,"translate"),n.k0s(),n.j41(4,"p",2),n.EFF(5),n.nI1(6,"translate"),n.k0s(),n.j41(7,"div",3)(8,"button",4),n.bIt("click",function(){return f.close("primary")}),n.EFF(9),n.nI1(10,"translate"),n.k0s(),n.DNE(11,D,3,3,"button",5),n.k0s()()),2&b&&(n.R7$(2),n.JRh(n.bMT(3,4,null==f.data?null:f.data.title)),n.R7$(3),n.JRh(n.bMT(6,6,null==f.data?null:f.data.subtitle)),n.R7$(4),n.SpI(" ",n.bMT(10,8,null==f.data?null:f.data.primaryBtnText)," "),n.R7$(2),n.Y8G("ngIf",null==f.data?null:f.data.secondaryBtnText))},dependencies:[M.MD,M.bT,E.D9],styles:[".info-dialog[_ngcontent-%COMP%]{background:#fff;border-radius:5px;padding:16px;text-align:center;box-shadow:0 20px 40px #00000040}.info-dialog__title[_ngcontent-%COMP%]{color:#ff9500;font-size:20px;line-height:28px;font-weight:500;margin-bottom:16px}.info-dialog__subtitle[_ngcontent-%COMP%]{color:#4b4e56;font-size:13px;line-height:1.39;font-weight:400;margin-bottom:32px}.info-dialog__actions[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.info-dialog__actions[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{padding:11px;font-size:14px;line-height:18px;border-radius:5px}.info-dialog__actions[_ngcontent-%COMP%] .btn-primary[_ngcontent-%COMP%]{background-color:#1f83fe;color:#fff;border:none}.info-dialog__actions[_ngcontent-%COMP%] .btn-outline[_ngcontent-%COMP%]{background-color:transparent;border:1px solid #1F83FE;color:#1f83fe}"]}),B})();var u=o(52971),P=o(98509),s=o(89204),h=o(29404),I=o(60247),N=o(26751),O=o(88090),y=o(48512),S=o(89475),v=o(14800),l=o(99148),p=o(1133);let x=(()=>{var _;class B{constructor(){this.info=(0,l.hFB)(""),this.advice=(0,l.hFB
1)(""),this.qrClick=(0,l.CGW)()}}return(_=B).\u0275fac=function(b){return new(b||_)},_.\u0275cmp=n.VBU({type:_,selectors:[["app-insurance-diya-qr"]],inputs:{info:[1,"info"],advice:[1,"advice"]},outputs:{qrClick:"qrClick"},decls:3,vars:5,consts:[[1,"withdraw-qr__text"],[3,"click","qrdata","width","margin","cssClass"]],template:function(b,f){1&b&&(n.j41(0,"p",0),n.EFF(1),n.k0s(),n.j41(2,"qrcode",1),n.bIt("click",function(){return f.qrClick.emit()}),n.k0s()),2&b&&(n.R7$(),n.JRh(f.advice()),n.R7$(),n.Y8G("qrdata",f.info())("width",200)("margin",0)("cssClass","text-center"))},dependencies:[p.c],styles:["[_nghost-%COMP%]{display:block;padding-top:40px}.withdraw-qr__text[_ngcontent-%COMP%]{text-align:center;margin-bottom:24px}.withdraw-qr__timer[_ngcontent-%COMP%]{font-weight:600;color:#202020;text-align:center}"],changeDetection:0}),B})();var k=o(19e3),$=o(51940);function J(_,B){if(1&_){const T=n.RV6();n.j41(0,"div",1)(1,"div",7),n.nI1(2,"safeHtml"),n.bIt("click",function(){a.eBV(T);const f=n.XpG();return a.Njj(f.removeError())}),n.k0s()()}if(2&_){const T=n.XpG();n.R7$(),n.Y8G("innerHtml",n.bMT(2,1,T.error.message),n.npT)}}function F(_,B){if(1&_){const T=n.RV6();n.j41(0,"app-insurance-diya-qr",8),n.nI1(1,"translate"),n.bIt("qrClick",function(){const f=a.eBV(T),A=n.XpG();return a.Njj(A.openLink(f))}),n.k0s()}2&_&&n.Y8G("info",B)("advice",n.bMT(1,2,"oscpv.popup.diya-share.qr-advice"))}let w=(()=>{var _;class B extends h.C{constructor(){super(...arguments),this.loader=(0,a.WQX)(N.Z),this.translate=(0,a.WQX)(E.c$),this.identificationService=(0,a.WQX)(O.o),this.socketService=(0,a.WQX)(y.k),this.insuranceService=(0,a.WQX)(u.m),this.dialogRef=(0,a.WQX)(t.k),this.qrInfo=(0,a.vPA)("")}diyaSign(){this.loader.startManual();const{offerId:b,issuerKey:f,documentsScopeId:A}=this.insuranceService.verificationParams();this.identificationService.getDiiaAuth(b,A,f).pipe((0,S.j)(()=>this.loader.finishManual())).subscribe({next:({uri:K,identifier:st})=>{this.connectSocketsSignalR(st),this.qrInfo.set(K)},error:K=>{this.setError(K)}})}connectSocketsSignalR(b){var f=this;return(0,s.A)(function*(){const A=f.socketService.createHubConnection(b);try{yield A.start()}catch(K){return void f.handleSocketError(K)}A?.state===v.j.Connected&&(A.on("NotifyIdentificationComplete",K=>{f.dialogRef.close(K),f.socketService.stopConnection()}),A.onclose(()=>{console.log(">> Socket closed"),f.loader.finishManual()}))})()}handleSocketError(b){this.loader.finishManual(),"FailedToNegotiateWithServerError"===b.errorType&&this.setError({message:this.translate.instant("error-message.socket-failed-to-negotiate-with-server")})}get isMobileDevice(){return(0,k.Q)()}openLink(b){this.isMobileDevice&&(0,$.j)(b)}}return(_=B).\u0275fac=(()=>{let T;return function(f){return(T||(T=n.xGo(_)))(f||_)}})(),_.\u0275cmp=n.VBU({type:_,selectors:[["app-insurance-diya-dialog"]],features:[n.Vt3],decls:14,vars:15,consts:[[1,"insurance-diya"],[1,"small-16"],[1,"insurance-diya__title"],[1,"insurance-diya__agreement",3,"innerHTML"],["aria-label","\u0414\u0456\u044f. \u041f\u0456\u0434\u043f\u0438\u0441",1,"insurance-diya__sign",3,"click"],["src","https://cdn.easypay.ua/images/svg/diya.svg","alt","diya-logo"],[3,"info","advice"],[1,"block-error",3,"click","innerHtml"],[3,"qrClick","info","advice"]],template:function(b,f){if(1&b&&(n.j41(0,"div",0),n.nVh(1,J,3,3,"div",1),n.nI1(2,"async"),n.j41(3,"h2",2),n.EFF(4),n.nI1(5,"translate"),n.k0s(),n.nrm(6,"div",3),n.nI1(7,"translate"),n.nI1(8,"safeHtml"),n.j41(9,"button",4),n.bIt("click",function(){return f.diyaSign()}),n.EFF(10),n.nI1(11,"translate"),n.nrm(12,"img",5),n.k0s(),n.nVh(13,F,2,4,"app-insurance-diya-qr",6),n.k0s()),2&b){let A;n.R7$(),n.vxM(!1===n.bMT(2,5,f.error.$isNoErrors)?1:-1),n.R7$(3),n.JRh(n.bMT(5,7,"oscpv.popup.diya-share.title")),n.R7$(2),n.Y8G("innerHTML",n.bMT(8,11,n.bMT(7,9,"oscpv.popup.diya-share.agreement")),n.npT),n.R7$(4),n.SpI(" ",n.bMT(11,13,"oscpv.popup.diya-share.submit")," "),n.R7$(3),n.vxM((A=f.qrInfo())?13:-1,A)}},dependencies:[x,I.$,M.Jj,E.D9],styles:[".insurance-diya[_ngcontent-%COMP%]{display:block;background:#fff;border-radius:5px;padding:16px;text-align:center;box-shadow:0 20px 40px #00000040}.insurance-diya__title[_ngcontent-%COMP%]{color:#202020;font-size:16px;line-height:1.4;font-weight:600;margin-bottom:32px}.insurance-diya__agreement[_ngcontent-%COMP%]{font-size:13px;line-height:1.39;font-weight:400;text-align:center}.insurance-diya__sign[_ngcontent-%COMP%]{width:100%;height:40px;margin-top:8px;border-radius:5px;background-color:#0c0005;cursor:pointer;font-size:14px;line-height:20px;font-weight:400;text-align:center;color:#fff}.insurance-diya__sign[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:24px;height:24px;margin-left:4px}.insurance-diya__sign[_ngcontent-%COMP%]:disabled{opacity:.5}"],changeDetection:0}),B})();var L=o(49074),W=o(24755);function Q(_,B){1&_&&(a.qSk(),n.nrm(0,"circle",5)(1,"path",6))}function G(_,B){1&_&&(a.qSk(),n.nrm(0,"circle",5)(1,"path",7))}let d=(()=>{var _;class B{constructor(){this.dialogData=(0,a.WQX)(t.e),this.idSuccess=(0,a.vPA)(this.dialogData),this.config=(0,W.EW)(()=>this.idSuccess()?{title:"easyid.diya.status.success",text:"bonuses.withdraw-diya-result.success-text",button:"payments.settings.continue-button"}:{title:"bonuses.withdraw-diya-result.failed-title",text:"bonuses.withdraw-diya-result.failed-text",button:"easyid.diya.status.try-again"})}}return(_=B).\u0275fac=function(b){return new(b||_)},_.\u0275cmp=n.VBU({type:_,selectors:[["app-insurance-diya-result"]],decls:13,vars:14,consts:[[1,"insurance-id-status"],[1,"insurance-id-status-title",3,"ngClass"],["xmlns","http://www.w3.org/2000/svg","width","16","height","16","fill","none"],[1,"insurance-id-status__main","text-center",3,"innerHTML"],["type","button",1,"button",3,"mat-dialog-close"],["cx","8","cy","8","fill","#fff","r","6.7"],["d","M8 1.3a6.7 6.7 0 1 0 0 13.4A
16.7 6.7 0 0 0 8 1.3Zm-1.3 10L3.3 8l1-1 2.4 2.4 5-5 1 1-6 6Z","fill","#47B84E"],["d","M8 1.3a6.7 6.7 0 1 0 0 13.4A6.7 6.7 0 0 0 8 1.3Zm.7 10H7.3V10h1.4v1.3Zm0-2.6H7.3v-4h1.4v4Z","fill","#E43B38"]],template:function(b,f){1&b&&(n.j41(0,"div",0)(1,"h1",1),a.qSk(),n.j41(2,"svg",2),n.nVh(3,Q,2,0)(4,G,2,0),n.k0s(),n.EFF(5),n.nI1(6,"translate"),n.k0s(),a.joV(),n.nrm(7,"p",3),n.nI1(8,"translate"),n.nI1(9,"safeHtml"),n.j41(10,"button",4),n.EFF(11),n.nI1(12,"translate"),n.k0s()()),2&b&&(n.R7$(),n.Y8G("ngClass",f.idSuccess()?"insurance-id-status--success":"insurance-id-status--failed"),n.R7$(2),n.vxM(f.idSuccess()?3:4),n.R7$(2),n.SpI(" ",n.bMT(6,6,f.config().title)," "),n.R7$(2),n.Y8G("innerHTML",n.bMT(9,10,n.bMT(8,8,f.config().text)),n.npT),n.R7$(3),n.Y8G("mat-dialog-close",f.idSuccess()),n.R7$(),n.JRh(n.bMT(12,12,f.config().button)))},dependencies:[t.a,M.YU,E.D9,I.$],styles:[".insurance-id-status[_ngcontent-%COMP%]{padding:16px}.insurance-id-status-title[_ngcontent-%COMP%]{font-size:20px;font-weight:500;line-height:28px;margin:0;text-align:center}.insurance-id-status--success[_ngcontent-%COMP%]{color:#32aa55}.insurance-id-status--failed[_ngcontent-%COMP%]{color:#ff2d55}.insurance-id-status[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{margin-right:4px}.insurance-id-status__main[_ngcontent-%COMP%]{font-weight:400;line-height:1.39;margin:16px 0 32px}.insurance-id-status[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{height:40px}"],changeDetection:0}),B})(),et=(()=>{var _;class B{}return(_=B).\u0275fac=function(b){return new(b||_)},_.\u0275cmp=n.VBU({type:_,selectors:[["app-data-changed-dialog"]],decls:13,vars:13,consts:[[1,"data-changed-dialog"],[1,"data-changed__title"],[1,"data-changed__text-row"],["type","button",1,"button","data-changed__btn",3,"mat-dialog-close"]],template:function(b,f){1&b&&(n.j41(0,"div",0)(1,"h2",1),n.EFF(2),n.nI1(3,"translate"),n.k0s(),n.j41(4,"p",2),n.EFF(5),n.nI1(6,"translate"),n.k0s(),n.j41(7,"p",2),n.EFF(8),n.nI1(9,"translate"),n.k0s(),n.j41(10,"button",3),n.EFF(11),n.nI1(12,"translate"),n.k0s()()),2&b&&(n.R7$(2),n.JRh(n.bMT(3,5,"oscpv.popup.diya-data.title")),n.R7$(3),n.SpI(" ",n.bMT(6,7,"oscpv.popup.diya-data.data-updated")," "),n.R7$(3),n.SpI(" ",n.bMT(9,9,"oscpv.popup.diya-data.check-data")," "),n.R7$(2),n.Y8G("mat-dialog-close",!0),n.R7$(),n.JRh(n.bMT(12,11,"oscpv.popup.diya-data.confirm")))},dependencies:[t.a,E.D9],styles:[".data-changed-dialog[_ngcontent-%COMP%]{padding:16px}.data-changed__title[_ngcontent-%COMP%]{font-size:20px;line-height:28px;font-weight:500;text-align:center;color:#ff9500;margin-bottom:16px}.data-changed__text-row[_ngcontent-%COMP%]{font-size:13px;line-height:1.4;text-align:center;margin-bottom:21px;font-weight:400}.data-changed__text-row[_ngcontent-%COMP%]:last-of-type{margin-bottom:0}.data-changed__btn[_ngcontent-%COMP%]{height:42px;margin-top:32px}"],changeDetection:0}),B})();var Z=o(27329);let nt=(()=>{var _;class B{constructor(){this.dialog=(0,a.WQX)(t.h),this.insuranceService=(0,a.WQX)(u.m),this.contextTracking=(0,a.WQX)(Z.Y),this.router=(0,a.WQX)(P.Ix),this.destroyRef=(0,a.WQX)(a.abz)}openInfoDialog(b){return this.dialog.open(C,{data:b,width:"100%",maxWidth:"288px",disableClose:!0,panelClass:"custom-info-dialog"}).afterClosed()}showSessionExpired(b){this.openInfoDialog({title:"oscpv.popup.session-expired.title",subtitle:"oscpv.popup.session-expired.subtitle",primaryBtnText:"oscpv.popup.session-expired.restart"}).subscribe(()=>this.restartFlow())}showDocumentReady(b){this.openInfoDialog({title:"oscpv.popup.document-ready.title",subtitle:"oscpv.popup.document-ready.subtitle",primaryBtnText:"oscpv.popup.document-ready.continue",secondaryBtnText:"oscpv.popup.document-ready.restart"}).subscribe(f=>{"primary"===f?b?.():"secondary"===f&&this.restartFlow()})}restartFlow(){const b=this.insuranceService.getStepData("serviceInfo");this.router.navigate([b?.buttonUrl||"/catalog/popular"])}openDiyaDialog(){this.dialog.open(w,{width:"100%",maxWidth:"288px",panelClass:"custom-info-dialog",closeOnNavigation:!0}).afterClosed().pipe((0,L.pQ)(this.destroyRef)).subscribe(f=>{f&&this.openStatusDialog(f?.IsSuccess)})}openStatusDialog(b){this.dialog.open(d,{width:"100%",maxWidth:"288px",closeOnNavigation:!0,disableClose:!0,data:b}).afterClosed().pipe((0,L.pQ)(this.destroyRef)).subscribe(A=>{A?(this.contextTracking.onAuthStateChange(this.insuranceService.contextSignal()),this.insuranceService.fetchContext()):this.openDiyaDialog()})}openDataChangedDialog(){this.dialog?.openDialogs?.find(f=>f.componentInstance instanceof et)||this.dialog.open(et,{width:"100%",maxWidth:"288px",closeOnNavigation:!0,disableClose:!0})}}return(_=B).\u0275fac=function(b){return new(b||_)},_.\u0275prov=a.jDH({token:_,factory:_.\u0275fac}),B})()},16929:(U,j,o)=>{o.d(j,{I:()=>V});var a=o(85240),t=o(12481),M=o(34456),E=o(60316),n=o(60809),D=o(19838);let V=(()=>{var C;class u{constructor(s,h,I,N){this._elementRef=s,this._renderer=h,this.document=I,this.platform_id=N,this._floatingPhoneMask=!1,this._authPhoneMask=!1,this._maskExpression="",this._decimalConstant="D",this._maskSpecialCharacters=["/","(",")",".",":","-"," ","+","3","8","0"],this._maskAvaliablePatterns={9:/\d/,$:/\d/,A:/[a-zA-Z0-9]/,B:/[a-zA-Z\u0410-\u042f\u0430-\u044f\u0401\u0451\u0407\u0457\u0406\u0456\u0404\u0454\u0490\u0491\d#?!@$%^&*\+-\s]/,C:/[0-9*]/,S:/[a-zA-Z]/},this._cursorMoveTimeout=10,this._disableChangeOnBlur=!1,this.isBrowser=(0,E.UE)(this.platform_id),this._onChange=O=>{},this._onTouch=()=>{},this.modelWithSpecialCharacters=!0,this._clearIfNotMatch=!1}ngOnInit(){}
1set maskExpression(s){s&&(this._maskExpression=s)}set floatingPhoneMask(s){this._floatingPhoneMask=s}set authPhoneMask(s){this._authPhoneMask=s}get modelWithSpecialCharacters(){return this._modelWithSpecialCharacters}set modelWithSpecialCharacters(s){this._modelWithSpecialCharacters=s}get clearIfNotMatch(){return this._clearIfNotMatch}set clearIfNotMatch(s){this._clearIfNotMatch=s}onInput(){this._applyValueChanges()}onBlur(){this._clearIfNotMatchFn(),this._disableChangeOnBlur||this._applyValueChanges(),this._onTouch()}set disableChangeOnBlur(s){this._disableChangeOnBlur=s}writeValue(s){s&&(this._elementRef.nativeElement.value=this._applyMask(s,this._maskExpression))}registerOnChange(s){this._onChange=s}registerOnTouched(s){this._onTouch=s}setDisabledState(s){s?this._renderer.setAttribute(this._elementRef.nativeElement,"disabled","true"):this._renderer.removeAttribute(this._elementRef.nativeElement,"disabled")}_applyMask(s,h){if(null==s)return"";this._floatingPhoneMask&&"("===s[4]&&(h=D.D5.PHONE_MASK_OLD_EXPRESSION),this._authPhoneMask&&(s=s.trim().replace(/\+| |\(|\)|-/g,"").replace(/^(380|80|0)/g,"").slice(0,9));let I=0,N="";const O=s.toString().split("");for(let y=0,S=O[0];y<O.length&&N.length!==h.length;y++,S=O[y])if(this._checkSymbolMask(S,h[I]))N+=S,I++;else if(-1!==this._maskSpecialCharacters.indexOf(h[I]))N+=h[I],I++,y--;else if("9"===h[I])break;return N.length+1===h.length&&-1!==this._maskSpecialCharacters.indexOf(h[h.length-1])&&(N+=h[h.length-1]),N}_removeMask(s){return(0,n.S)(s)}_checkSymbolMask(s,h){return s===h||this._maskAvaliablePatterns[h]&&this._maskAvaliablePatterns[h].test(s)}_clearIfNotMatchFn(){!0===this.clearIfNotMatch&&this._maskExpression.length!==this._elementRef.nativeElement.value.length&&(this._elementRef.nativeElement.value="")}_moveCursorPosition(){this.isBrowser&&setTimeout(()=>{this._elementRef.nativeElement.setSelectionRange(this._elementRef.nativeElement.selectionStart+6,this._elementRef.nativeElement.selectionEnd+6)},10)}_applyValueChanges(){const h=this._applyMask(this._elementRef.nativeElement.value,this._maskExpression);this._elementRef.nativeElement.value=h,"true"===this.modelWithSpecialCharacters.toString()?this._onChange(h):this._onChange(this._removeMask(h)),this._elementRef.nativeElement!==this.document.activeElement&&this._clearIfNotMatchFn()}applyMaskManually(s,h){return this._applyMask(s,h)}removeMaskManually(s){return this._removeMask(s)}resetInputValueManually(){this._elementRef.nativeElement.value=""}}return(C=u).\u0275fac=function(s){return new(s||C)(t.rXU(t.aKT),t.rXU(t.sFG),t.rXU(a.qQL),t.rXU(t.Agw))},C.\u0275dir=t.FsC({type:C,selectors:[["","input-mask",""]],hostBindings:function(s,h){1&s&&t.bIt("input",function(){return h.onInput()})("blur",function(){return h.onBlur()})},inputs:{maskExpression:[0,"inputMask","maskExpression"],floatingPhoneMask:"floatingPhoneMask",authPhoneMask:"authPhoneMask",modelWithSpecialCharacters:[0,"specialCharacters","modelWithSpecialCharacters"],clearIfNotMatch:"clearIfNotMatch",disableChangeOnBlur:"disableChangeOnBlur"},standalone:!1,features:[t.Jv_([{provide:M.kq,useExisting:(0,a.Rfq)(()=>C),multi:!0}])]}),u})()},17594:(U,j,o)=>{o.r(j),o.d(j,{InsuranceRouting:()=>me});var a=o(85240),t=o(12481),M=o(8173),E=o(98509),n=o(52971),D=o(27809),V=o(60316),C=o(93683),u=o(51567),P=o(63037),s=o(70271),h=o(86301),I=o(47470),N=o(98764),O=o(36647),y=o(79325),S=o(27295),v=o(48503),l=o(11753),p=o(49074),x=o(68121),k=o(68010),$=o(27329);const J=["breadcrumbs"];function F(c,m){1&c&&t.nrm(0,"app-breadcrumb",1,0),2&c&&t.Y8G("initBreadcrumbsSubscription",!1)}function w(c,m){1&c&&(t.j41(0,"h1",4),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&c&&(t.R7$(),t.JRh(t.bMT(2,1,m)))}function L(c,m){if(1&c&&(t.j41(0,"div"),t.nrm(1,"img",12),t.k0s()),2&c){const r=m,e=t.XpG().$implicit,i=t.XpG();t.HbH(t.VkB("oscpv__company oscpv__company--",r," shrink")),t.R7$(),t.Y8G("src",(null==i.insuranceService?null:i.insuranceService.imgBasePath)+e,t.B4B)("ngClass",r)("alt",r)}}function W(c,m){if(1&c&&t.nVh(0,L,2,6,"div",11),2&c){let r;const e=m.$implicit,i=t.XpG();t.vxM((r=i.insuranceService.getCompanyName(e))?0:-1,r)}}let Q=(()=>{var c;class m{constructor(e,i,g,R,X,z,tt){this.platformId=e,this.insuranceService=i,this.router=g,this.activatedRoute=R,this.insuranceDialogService=X,this.authService=z,this.contextTracking=tt,this.isBrowser=(0,V.UE)(this.platformId),this.destroyRef=(0,a.WQX)(a.abz),this.serviceInfo=this.insuranceService.getStepData("serviceInfo")}ngOnInit(){this.isBrowser&&(this.contextTracking.authTransitionContextSnapshot()&&this.contextTracking.contextSyncState.set("awaitingAuthTransitionContext"),this.initContextWatcher(),this.activatedRouteParam
1s(),this.initAuthSubscription())}ngAfterViewInit(){this.isBrowser&&this.hasBreadcrumbs&&this.setBreadcrumbs()}get hasBreadcrumbs(){return!!this.serviceInfo?.breadcrumbs?.length}setBreadcrumbs(){this.breadcrumbsComponent?.breadcrumbs.set(this.serviceInfo?.breadcrumbs||[])}activatedRouteParams(){const e=this.router.events.pipe((0,u.p)(i=>i instanceof E.wF),(0,P.Z)(null),(0,s.T)(()=>this.activatedRoute.firstChild?.snapshot.data||{}),(0,h.t)(1));e.pipe((0,I.i)(1),(0,N.M)(()=>(0,x.F)())).subscribe(),this.title$=e.pipe((0,s.T)(i=>i.title)),this.gradient$=e.pipe((0,s.T)(i=>i.gradient))}getContext(){this.insuranceService.fetchContext()}initContextWatcher(){this.insuranceService.fetchAndCacheContext().pipe((0,O.n)(()=>this.insuranceService.contextInfo$),(0,p.pQ)(this.destroyRef)).subscribe({next:e=>{e?e&&this.contextTracking.needCompareContext()&&this.checkContextDiff():this.skipContextCheck||this.insuranceDialogService.showSessionExpired()}})}get skipContextCheck(){const e=!!this.insuranceService.getStepData("carParams")?.value,i=!1===this.insuranceService.getStepData("carNumberStep")?.isCarInfo,g=e&&i;return this.router.url.includes("insurance-params")&&g}checkContextDiff(){this.contextTracking.contextSyncState.set("idle");const e=this.contextTracking.authTransitionContextSnapshot(),i=this.insuranceService.contextSignal();if(!e||!i)return;const g=this.contextTracking.diffContext(e,i);g&&this.router.navigate([`/car-insurance/${g.steps[0]}`]).then(()=>{g.isDiyaData&&this.insuranceDialogService.openDataChangedDialog()})}initAuthSubscription(){this.authService.authState().pipe((0,p.pQ)(this.destroyRef)).subscribe({next:()=>{this.contextTracking.onAuthStateChange(this.insuranceService.contextSignal()),this.getContext()}})}}return(c=m).\u0275fac=function(e){return new(e||c)(t.rXU(t.Agw),t.rXU(n.m),t.rXU(E.Ix),t.rXU(E.nX),t.rXU(l.u),t.rXU(k.u),t.rXU($.Y))},c.\u0275cmp=t.VBU({type:c,selectors:[["app-car-insurance"]],viewQuery:function(e,i){if(1&e&&t.GBs(J,5),2&e){let g;t.mGM(g=t.lsd())&&(i.breadcrumbsComponent=g.first)}},features:[t.Jv_([{provide:S.E,useClass:y.F},l.u,$.Y])],decls:21,vars:16,consts:[["breadcrumbs",""],[3,"initBreadcrumbsSubscription"],[1,"oscpv"],[1,"oscpv__hero"],[1,"oscpv__title","regular","text-center"],[1,"row","oscpv-wrapper"],[1,"small-16"],[1,"oscpv-section","oscpv-wrapper","mt-32"],[1,"oscpv__section-title"],[1,"oscpv__companies","flex-container","flex-wrap"],[3,"faqList","customClass"],[3,"class"],[3,"src","ngClass","alt"]],template:function(e,i){if(1&e&&(t.nVh(0,F,2,1,"app-breadcrumb",1),t.j41(1,"article",2)(2,"section",3),t.nI1(3,"async"),t.nVh(4,w,3,3,"h1",4),t.nI1(5,"async"),t.j41(6,"div",5)(7,"div",6),t.nrm(8,"router-outlet"),t.k0s()()(),t.j41(9,"section",7)(10,"h2",8),t.EFF(11),t.nI1(12,"translate"),t.k0s(),t.j41(13,"div",9),t.Z7z(14,W,1,1,null,null,t.fX1),t.k0s()(),t.j41(16,"section",7)(17,"h2",8),t.EFF(18),t.nI1(19,"translate"),t.k0s(),t.nrm(20,"app-faq",10),t.k0s()()),2&e){let g;t.vxM(null!=i.serviceInfo&&i.serviceInfo.breadcrumbs?0:-1),t.R7$(2),t.AVh("oscpv__gradient",t.bMT(3,8,i.gradient$)),t.R7$(2),t.vxM((g=t.bMT(5,10,i.title$))?4:-1,g),t.R7$(7),t.JRh(t.bMT(12,12,"oscpv.companies.title")),t.R7$(3),t.Dyx(i.insuranceService.companies()),t.R7$(4),t.JRh(t.bMT(19,14,"oscpv.faq.title")),t.R7$(2),t.Y8G("faqList",null==i.insuranceService?null:i.insuranceService.insuranceFAQ)("customClass","oscpv-faq")}},dependencies:[M.D,E.n3,D.FaqComponent,C.YU,C.Jj,v.D9],styles:[".oscpv-wrapper[_ngcontent-%COMP%]{padding:0 8px}@media only screen and (min-width: 640px){.oscpv-wrapper[_ngcontent-%COMP%]{padding:0 24px}}@media only screen and (min-width: 1024px){.oscpv-wrapper[_ngcontent-%COMP%]{padding:0 32px}}.oscpv-section[_ngcontent-%COMP%]{max-width:1280px;margin-right:auto;margin-left:auto}.mt-32[_ngcontent-%COMP%]{margin-top:32px}.oscpv[_ngcontent-%COMP%]{padding-bottom:20px;background-color:#f1f3f7}@media only screen and (min-width: 640px){.oscpv[_ngcontent-%COMP%]{padding-bottom:40px}}.oscpv__title[_ngcontent-%COMP%]{font-size:20px;line-height:1;text-align:center;color:#202020;margin:0 0 24px}@media only screen and (min-width: 640px){.oscpv__title[_ngcontent-%COMP%]{font-size:32px}}.oscpv__section-title[_ngcontent-%COMP%]{font-size:20px;line-height:1.3;font-weight:400;color:#202020;margin-bottom:16px}@media only screen and (min-width: 640px){.oscpv__section-title[_ngcontent-%COMP%]{font-size:24px;line-height:1}}.oscpv__hero[_ngcontent-%COMP%]{padding-top:32px;padding-bottom:32px}
1.oscpv__gradient[_ngcontent-%COMP%]{background-image:linear-gradient(0deg,#f3f8ff,#99beed)}.oscpv__submit[_ngcontent-%COMP%]{min-height:54px}@media only screen and (min-width: 640px){.oscpv__submit[_ngcontent-%COMP%]{margin-top:1px}}.oscpv__companies[_ngcontent-%COMP%]{gap:12px}.oscpv__company[_ngcontent-%COMP%]{min-height:56px;padding:0 16px;line-height:56px;background-color:#fff;border-radius:6px;transition:.2s}.oscpv__company[_ngcontent-%COMP%]:hover img[_ngcontent-%COMP%], .oscpv__company[_ngcontent-%COMP%]:focus img[_ngcontent-%COMP%]{filter:grayscale(0);opacity:1}.oscpv__company[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{filter:grayscale(1);opacity:.6;transition:opacity .3s ease-out 0s,filter .3s ease-out 0s}.oscpv__company--alfa[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100px}.oscpv__company--arx[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:44px}.oscpv__company--universalna[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:91px}.oscpv__company--usg[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:59px}.oscpv__company--tas[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:73px}.oscpv__company--pzu[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:40px}.oscpv__company--vuso[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:87px}.oscpv__company--uniqua[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:111px}.oscpv__company--knyaga[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:65px}.oscpv__company--garantiya[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:111px}.oscpv__faq[_ngcontent-%COMP%]{margin-top:32px}@media only screen and (min-width: 640px){.oscpv__faq[_ngcontent-%COMP%]{margin-top:40px}}[_nghost-%COMP%]{scroll-margin-top:calc(var(--header-fixed-height) + 10px)}"],changeDetection:0}),m})();var G=o(24755),d=o(34456),et=o(26368),Z=o(79864),nt=o(25004),_=o(21445),B=o(49063),T=o(1522),b=o(91817),f=o(2435),A=o(89475),K=o(52575),st=o(19838),q=o(61977),Y=o(6423),Ct=o(74646),ct=o(48486),lt=o(83926),dt=o(22952);class kt{constructor(m){Object.assign(this,m)}}var at=o(71401),pt=o(60247),rt=o(99148),vt=o(33589);let ut=(()=>{var c;class m{constructor(){this.tooltipImageClass=(0,rt.hFB)(null)}}return(c=m).\u0275fac=function(e){return new(e||c)},c.\u0275cmp=t.VBU({type:c,selectors:[["app-tooltip-picture"]],inputs:{tooltipImageClass:[1,"tooltipImageClass"]},decls:2,vars:2,consts:[["xmlns","http://www.w3.org/2000/svg","width","26","height","26","viewBox","0 0 26 26","fill","none","matTooltip","image tooltip",2,"margin-right","8px",3,"matTooltipClass","matTooltipTouchGestures"],["d","M13 17.8V13M13 8.2H13.012M25 13C25 19.6274 19.6274 25 13 25C6.37258 25 1 19.6274 1 13C1 6.37258 6.37258 1 13 1C19.6274 1 25 6.37258 25 13Z","stroke","#1F83FE","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"]],template:function(e,i){1&e&&(a.qSk(),t.j41(0,"svg",0),t.nrm(1,"path",1),t.k0s()),2&e&&t.Y8G("matTooltipClass",i.tooltipImageClass())("matTooltipTouchGestures","on")},dependencies:[C.MD,vt.h,vt.e],styles:['[class*=tooltip-image] .mdc-tooltip__surface{padding:10px;max-width:280px!important;white-space:normal;display:flex;flex-direction:column;background:#fff;filter:drop-shadow(0 0 8px rgba(0,0,0,.15))}[class*=tooltip-image] .mdc-tooltip__surface:after{content:"";margin-top:-16px;background-size:contain;background-repeat:no-repeat;background-position:center}.tooltip-image--engineVolume .mdc-tooltip__surface:after{width:260px;height:150px;background-image:url(https://cdn.easypay.ua/images/oscpv/doc-hint/engineVolume.webp)}.tooltip-image--taxNumber .mdc-tooltip__surface:after{width:260px;height:153px;background-image:url(https://cdn.easypay.ua/images/oscpv/doc-hint/taxNumber.webp)}.tooltip-image--passport-book-series .mdc-tooltip__surface:after{width:210px;height:150px;background-image:url(https://cdn.easypay.ua/images/oscpv/doc-hint/passport-book-s.webp)}.tooltip-image--passport-book-number .mdc-tooltip__surface:after{width:210px;height:150px;background-image:url(https://cdn.easypay.ua/images/oscpv/doc-hint/passport-book-n.webp)}.tooltip-image--idCard-series .mdc-tooltip__surface:after{width:240px;height:152px;background-image:url(https://cdn.easypay.ua/images/oscpv/doc-hint/idCard-record.webp)}.tooltip-image--idCard-number .mdc-tooltip__surface:after{width:240px;height:152px;background-image:url(https://cdn.easypay.ua/images/oscpv/doc-hint/idCard-num.webp)}.tooltip-image--driver-license-series .mdc-tooltip__surface:after{width:250px;height:156px;background-image:url(https://cdn.easypay.ua/images/oscpv/doc-hint/driver-s.webp)}.tooltip-image--driver-license-number .mdc-tooltip__surface:after{width:250px;height:156px;background-image:url(https://cdn.easypay.ua/images/oscpv/doc-hint/driver-num.webp)}\n'],encapsulation:2,changeDetection:0}),m})(),ot=(()=>{var c;
1class m{shallowEqual(e,i){return e===i||!(!e||!i)&&Object.keys(e).every(g=>e[g]?.toString()===i[g]?.toString())}patchFormFromModel(e,i,g=[]){if(!i)return void e.reset();const R={};Object.keys(e.controls).forEach(X=>{const z=i[X]??null;R[X]=g.includes(X)?this.parseContextDate(z):z}),e.patchValue(R,{emitEvent:!1})}parseContextDate(e){if(!e)return null;if(e instanceof Date)return isNaN(e.getTime())?null:e;const i=String(e),g=i.match(/^\d{4}-\d{2}-\d{2}/);if(g){const[X,z,tt]=g[0].split("-").map(Number);return new Date(X,z-1,tt)}const R=new Date(i);return isNaN(R.getTime())?null:R}}return(c=m).\u0275fac=function(e){return new(e||c)},c.\u0275prov=a.jDH({token:c,factory:c.\u0275fac}),m})();var mt=o(26751),H=o(46679),Et=o(69940),ht=o(86521),It=o(16929);function Tt(c,m){if(1&c){const r=t.RV6();t.j41(0,"div",9),t.nI1(1,"safeHtml"),t.bIt("click",function(){a.eBV(r);const i=t.XpG();return a.Njj(i.removeError())}),t.k0s()}if(2&c){const r=t.XpG();t.Y8G("innerHtml",t.bMT(1,1,r.error.message),t.npT)}}function St(c,m){if(1&c){const r=t.RV6();t.j41(0,"button",35),t.bIt("pointerdown",function(i){return a.eBV(r),a.Njj(i.preventDefault())})("click",function(){a.eBV(r);const i=t.XpG(2);return a.Njj(i.initDiya())}),t.EFF(1),t.nI1(2,"translate"),t.j41(3,"span"),t.EFF(4),t.nI1(5,"translate"),t.k0s()()}2&c&&(t.R7$(),t.SpI(" ",t.bMT(2,2,"oscpv.shared.diya-label")," "),t.R7$(3),t.JRh(t.bMT(5,4,"oscpv.shared.diya-gov")))}function Ft(c,m){if(1&c){const r=t.RV6();t.j41(0,"form",10),t.bIt("ngSubmit",function(){a.eBV(r);const i=t.XpG();return a.Njj(i.submit())}),t.j41(1,"p",11),t.nrm(2,"span",12),t.EFF(3),t.nI1(4,"translate"),t.k0s(),t.j41(5,"mat-form-field",13)(6,"mat-label"),t.EFF(7),t.nI1(8,"translate"),t.k0s(),t.j41(9,"input",14),t.bIt("blur",function(){a.eBV(r);const i=t.XpG();return a.Njj(i.clearEmptyFieldError(i.control("lastName")))}),t.k0s(),t.nVh(10,St,6,6,"button",15),t.j41(11,"mat-error"),t.nrm(12,"app-control-validation-messages",16),t.k0s()(),t.j41(13,"mat-form-field",17)(14,"mat-label"),t.EFF(15),t.nI1(16,"translate"),t.k0s(),t.j41(17,"input",18),t.bIt("blur",function(){a.eBV(r);const i=t.XpG();return a.Njj(i.clearEmptyFieldError(i.control("firstName")))}),t.k0s(),t.j41(18,"mat-error"),t.nrm(19,"app-control-validation-messages",16),t.k0s()(),t.j41(20,"mat-form-field",19)(21,"mat-label"),t.EFF(22),t.nI1(23,"translate"),t.k0s(),t.j41(24,"input",20),t.bIt("blur",function(){a.eBV(r);const i=t.XpG();return a.Njj(i.clearEmptyFieldError(i.control("middleName")))}),t.k0s(),t.j41(25,"mat-error"),t.nrm(26,"app-control-validation-messages",16),t.k0s()(),t.j41(27,"mat-form-field",21)(28,"mat-label"),t.EFF(29),t.nI1(30,"translate"),t.k0s(),t.nrm(31,"input",22)(32,"mat-datepicker-toggle",23)(33,"mat-datepicker",null,1),t.k0s(),t.j41(35,"div",24)(36,"div",25),t.nrm(37,"img",26),t.j41(38,"span",27),t.EFF(39),t.k0s()(),t.j41(40,"input",28,2),t.bIt("blur",function(){a.eBV(r);const i=t.XpG();return a.Njj(i.clearEmptyFieldError(i.control("phone")))}),t.k0s(),t.nrm(42,"app-control-validation-messages",29),t.k0s(),t.j41(43,"mat-form-field",19)(44,"mat-label"),t.EFF(45),t.nI1(46,"translate"),t.k0s(),t.j41(47,"input",30),t.bIt("blur",function(){a.eBV(r);const i=t.XpG();return a.Njj(i.clearEmptyFieldError(i.control("taxNumber")))}),t.k0s(),t.nrm(48,"app-tooltip-picture",31),t.j41(49,"mat-error"),t.nrm(50,"app-control-validation-messages",32),t.k0s()(),t.j41(51,"mat-form-field",19)(52,"mat-label"),t.EFF(53),t.nI1(54,"translate"),t.k0s(),t.j41(55,"textarea",33,3),t.bIt("blur",function(){a.eBV(r);const i=t.XpG();return a.Njj(i.clearEmptyFieldError(i.control("address")))}),t.k0s(),t.j41(57,"mat-error"),t.nrm(58,"app-control-validation-messages",32),t.k0s()(),t.j41(59,"button",34),t.EFF(60),t.nI1(61,"translate"),t.k0s()()}if(2&c){const r=t.sdS(34),e=t.XpG();t.Y8G("formGroup",e.form),t.R7$(3),t.SpI(" ",t.bMT(4,39,"oscpv.policyholder.ukrainian-lang")," "),t.R7$(4),t.JRh(t.bMT(8,41,"payments.settings.main.personal-last-name")),t.R7$(3),t.vxM(e.isAuth()?10:-1),t.R7$(2),t.Y8G("mainForm",e.form)("fieldName","lastName")("formErrors",e.formErrors),t.R7$(3),t.JRh(t.bMT(16,43,"payments.settings.main.personal-first-name")),t.R7$(4),t.Y8G("mainForm",e.form)("fieldName","firstName")("formErrors",e.formErrors),t.R7$(3),t.JRh(t.bMT(23,45,"oscpv.policyholder.middle-name")),t.R7$(4),t.Y8G("mainForm",e.form)("fieldName","middleName")("formErrors",e.formErrors),t.R7$(3),t.JRh(t.bMT(30,47,"oscpv.policyholder.date-birth")),t.R7$(2),t.Y8G("matDatepicker",r),t.R7$(),t.Y8G("for",r),t.R7$(3),t.AVh("phone-field-pb",e.form.get("phone").invalid&&e.form.get("phone").touched),t.R7$(4),t.SpI("+",null==e.authService?null:e.authService.ph
1onePrefix),t.R7$(),t.Y8G("inputMask",null==e.mask?null:e.mask.authPhoneMaskPattern)("specialCharacters",!1)("authPhoneMask",!0),t.R7$(2),t.Y8G("mainForm",e.form)("fieldName","phone")("formErrors",e.formErrors),t.R7$(3),t.SpI(" ",t.bMT(46,49,"oscpv.policyholder.tax-number")," "),t.R7$(2),t.Y8G("textMask",e.innMask),t.R7$(),t.Y8G("tooltipImageClass","tooltip-image--taxNumber"),t.R7$(2),t.Y8G("mainForm",e.form)("formErrors",e.formErrors)("fieldName","taxNumber"),t.R7$(3),t.SpI(" ",t.bMT(54,51,"oscpv.policyholder.address")," "),t.R7$(5),t.Y8G("mainForm",e.form)("formErrors",e.formErrors)("fieldName","address"),t.R7$(),t.Y8G("disabled",!(null!=e.form&&e.form.valid)),t.R7$(),t.JRh(t.bMT(61,53,"oscpv.shared.next"))}}const Mt="customer";let wt=(()=>{var c;class m extends et.I{constructor(e,i,g,R,X,z,tt,it,bt,xt){super(e),this.fb=i,this.insuranceService=g,this.authService=R,this.loaderService=X,this.router=z,this.translateService=tt,this.cd=it,this.dialogService=bt,this.helper=xt,this.destroyRef=(0,a.WQX)(a.abz),this.form=null,this.innMask={mask:this.mask?.numberMask(0,10),placeholderChar:"\u2000"},this.customer=(0,G.EW)(()=>this.insuranceService.contextSignal()?.customer),this.isAuth=(0,p.ot)(this.authService.isAuth$,{initialValue:!1})}ngOnInit(){this.stepData=this.insuranceService.getStepData(Mt),this.contextInfoSubscribe()}contextInfoSubscribe(){this.insuranceService.contextInfo$.pipe((0,u.p)(Boolean),(0,b.F)((e,i)=>this.helper.shallowEqual(e?.customer,i?.customer)),(0,p.pQ)(this.destroyRef)).subscribe({next:e=>{this.form?this.helper.patchFormFromModel(this.form,e.customer,["birthDate"]):this.initStep()}})}initStep(){this.initForm(),this.initFormErrors(),this.getBaseValidationMessages(),this.initFormSubscription()}initForm(){const e=d.k0.compose([d.k0.required,d.k0.minLength(2),d.k0.maxLength(50)]);this.form=this.fb.group({firstName:[this.getDefaultValue("firstName"),e],lastName:[this.getDefaultValue("lastName"),e],middleName:[this.getDefaultValue("middleName"),e],birthDate:[this.getDefaultValue("birthDate"),d.k0.required],phone:[this.getDefaultValue("phone"),d.k0.compose([d.k0.required,d.k0.pattern(st.D5.AUTH_PHONE_MASK_PATTERN)])],taxNumber:[this.getDefaultValue("taxNumber"),d.k0.compose([d.k0.required,d.k0.minLength(10),d.k0.maxLength(10)])],address:[this.getDefaultValue("address"),d.k0.compose([d.k0.required,d.k0.maxLength(100)])]}),this.cd.detectChanges()}initFormErrors(){this.formErrors.firstName=new T.b,this.formErrors.lastName=new T.b,this.formErrors.middleName=new T.b,this.formErrors.birthDate=new T.b,this.formErrors.phone=new T.b,this.formErrors.taxNumber=new T.b,this.formErrors.address=new T.b}submit(){this.loaderService.startManual(),this.updateStepData(),this.insuranceService.sendCustomerData(this.customerModel).pipe((0,f.$)(),(0,A.j)(()=>this.loaderService.finishManual())).subscribe({next:()=>this.router.navigate(["./car-insurance/customer-info/document"]),error:e=>{this.setError(e),this.setFormErrors(this.insuranceService.stripFieldPrefix(e?.error?.fieldErrors),this.form)}})}get customerModel(){return new kt({...this.form.value,birthDate:this.formattedDate,phone:this.phoneNumber})}getValue(e){return this.form?.get(e)?.value}control(e){return this.form?.get(e)}get formattedDate(){const e=this.form.get("birthDate")?.value;if(!e)return;const i=e instanceof Date?e:new Date(e);return(0,at.GP)(i,"yyyy.MM.dd")}get phoneNumber(){const e=this.form?.value?.phone;if(e)return this.authService?.phonePrefix.toString()+e?.slice(-9)}initFormSubscription(){this.form.valueChanges.pipe((0,p.pQ)(this.destroyRef),(0,K.B)(300)).subscribe({next:()=>{this.updateStepData(),this.onValueChanged(this.form)}})}getBaseValidationMessages(){this.translateService.get("validate-messages.required").subscribe(e=>{this.setBaseValidationMessages(e,"required")}),this.translateService.get("validate-messages.pattern").subscribe(e=>{this.setBaseValidationMessages(e,"pattern","phone")}),this.translateService.get("validate-messages.minimal-length").subscribe(e=>{this.setBaseValidationMessages(e+"2","minlength",["firstName","lastName","middleName"])}),this.translateService.get("validate-messages.maximum-length").subscribe(e=>{this.setBaseValidationMessages(e+"50","maxlength",["firstName","lastName","middleName"])}),this.translateService.get("validate-messages.minimal-length").subscribe(e=>{this.setBaseValidationMessages(e+"10","minlength","taxNumber")}),this.translateService.get("validate-messages.maximum-length").subscribe(e=>{this.setBaseValidationMessages(e+"10","maxlength","taxNumber")}),this.translateService.get("validate-messages.maximum-length").subscribe(e=>{this.setBaseValidationMessages(e+"100","maxlength","address")})}getDefaultValue(e){const i=(this.customer()?this.customer()?.[e]:this.stepData?.[e])||null;return"birthDate"===e?this.helper.parseContextDate(i):i}serializeDate(e){const i=this.form.get(e)?.value;return i instanceof Date&&!isNaN(i.getTime())?(0,at.GP)(i,"yyyy-MM-dd"):""}updateStepData(){this.insuranceService.updateStepData(Mt,{...this.form.value,birthDate:this.serializeDate("birthDate")})}initDiya(){this.isAuth()&&this.dialogService.openDiyaDialog()}}return(c=m).\u0275fac=function(e){return new(e||c)(t.rXU(t.Agw),t.rXU(d.ze),t.rXU(n.m),t.rXU(k.u),t.rXU(mt.Z),t.rXU(E.Ix),t.rXU(v.c$),t.rXU(rt.gRc),t.rXU(l.u),t.rXU(ot))},c.\u0275cmp=t.VBU({type:c,selectors:[["app-policyholder"]],features:[t.Jv_([{provide:Y.D,useClass:lt.L,deps:[Y.M,Y.a]},dt.z,{provide:Y.a,useValue:ct.k},ot]),t.Vt3],decls:9,vars:7,consts:[["errorBlock",""],["picker",""],["phone",""],["autosize","cdkTextareaAutosize"],[1,"customer-info__child-container","relative"],[1,"scroll-offset"],[1,"insurance-error",3,"innerHtml"],[1,"customer-info__title","semibold"],[1,"customer-info__form",3,"formGroup"],[1,"insurance-error",3,"click","innerHtml"],[1,"customer-info__form",3,"ngSubmit","formGroup"],[1,"customer-info__ua-title","relative"],[1,"flag-ua","customer-info__flag"],["appearance","outline",1,"diya-field"],["matInput","","type","text","formControlName","lastName","autocomplete","lastName",1,"setting-input",3,"blur"],["type","button",1,"oscpv__diya-btn","absolute"],[3,"mainForm","fieldName","formErrors"],["appearance","outline","hideRequiredMarker",""],["matInput","","type","text","formControlName","firstName","autocomplete","firstName",3,"blur"],["appearance","outline"],["matInput","","type","text","formControlName","middleName","autocomplete","middleName",1,"setting-input",3,"blur"],["appearance","outline",1,"insurance-date-field"],["matInput","","autocomplete","off","tabindex","-1","placeholder","\u0414\u0414.MM.\u0413\u0413\u0413\u0413","readonly","","formControlName","birthDate",3,"matDatepicker"],[1,"customer-info-picker","absolute",3,"for"],[1,"ph
1one-field"],[1,"phone-field_prefix"],["src","https://cdn.easypay.ua/images/svg/auth/operator.svg","alt","phone"],[1,"phone-field_prefix-code"],["type","tel","autocomplete","tel","formControlName","phone","placeholder","00 000 00 00","input-mask","",1,"auth-input","phone-field_input",3,"blur","inputMask","specialCharacters","authPhoneMask"],[1,"phone-field_error","absolute",3,"mainForm","fieldName","formErrors"],["type","tel","matInput","","inputmode","numeric","formControlName","taxNumber",3,"blur","textMask"],["matSuffix","",3,"tooltipImageClass"],[3,"mainForm","formErrors","fieldName"],["matInput","","cdkTextareaAutosize","","formControlName","address","cdkAutosizeMinRows","1","cdkAutosizeMaxRows","3",3,"blur"],["type","submit",1,"button","light-blue","customer-info__submit-btn",3,"disabled"],["type","button",1,"oscpv__diya-btn","absolute",3,"pointerdown","click"]],template:function(e,i){1&e&&(t.j41(0,"div",4)(1,"div",5,0),t.nVh(3,Tt,2,3,"div",6),t.nI1(4,"async"),t.k0s(),t.j41(5,"p",7),t.EFF(6),t.nI1(7,"translate"),t.k0s(),t.nVh(8,Ft,62,55,"form",8),t.k0s()),2&e&&(t.R7$(3),t.vxM(!1===t.bMT(4,3,null==i.error?null:i.error.$isNoErrors)?3:-1),t.R7$(3),t.JRh(t.bMT(7,5,"oscpv.policyholder.title")),t.R7$(2),t.vxM(i.form?8:-1))},dependencies:[d.X1,d.qT,d.me,d.BC,d.cb,d.j4,d.JD,Z.fS,Z.fg,H.j,H.M,H.b,H.g,Et.xb,nt.d,ht.g,v.h,_.h,It.I,q.X6,q.Vh,q.bZ,q.bU,Ct.WX,ut,B.fn,C.Jj,v.D9,pt.$],styles:['.customer-info__child-container[_ngcontent-%COMP%]{padding-top:24px}.customer-info__title[_ngcontent-%COMP%]{font-size:20px;line-height:1.3;color:#202020;font-weight:500;margin-bottom:0}.customer-info__edit[_ngcontent-%COMP%]{font-size:16px;line-height:1.3;color:#1f83fe;padding-right:28px;height:24px;background-image:url(https://cdn.easypay.ua/images/svg/oscpv/edit.svg);background-repeat:no-repeat;background-size:24px;background-position:top right;margin-top:24px}@media only screen and (min-width: 640px){.customer-info__edit[_ngcontent-%COMP%]{position:absolute;bottom:68px;right:0}}.customer-info__next-btn[_ngcontent-%COMP%]{height:44px;margin-top:24px}@media only screen and (min-width: 640px){.customer-info__next-btn[_ngcontent-%COMP%]{max-width:320px}}.customer-info__submit-btn[_ngcontent-%COMP%]{height:44px}.customer-info__form[_ngcontent-%COMP%]{padding-top:8px;max-width:405px}.customer-info__ua-title[_ngcontent-%COMP%]{font-size:14px;line-height:20px;padding-left:24px}.diya-field[_ngcontent-%COMP%] .oscpv__diya-btn[_ngcontent-%COMP%]{position:absolute;top:calc(100% + 5px);left:-12px;padding:6px 8px;background-color:#4b4e56;border-radius:4px;font-size:12px;line-height:1.3;color:#fff;font-weight:400;text-align:left;cursor:pointer;width:max-content;max-width:260px;opacity:0;pointer-events:none;transition:opacity .15s;touch-action:manipulation}.diya-field[_ngcontent-%COMP%] .oscpv__diya-btn[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#1f83fe}.diya-field[_ngcontent-%COMP%]:focus-within .oscpv__diya-btn[_ngcontent-%COMP%]{opacity:1;pointer-events:auto}.customer-info-picker[_ngcontent-%COMP%]{left:-12px;right:-12px;top:0;bottom:0;z-index:2;text-align:right;cursor:pointer;--mdc-icon-button-state-layer-size: 44px;--mdc-icon-button-icon-color: #1f83fe}.preview__value[_ngcontent-%COMP%], .preview__label[_ngcontent-%COMP%]{font-size:16px;line-height:1.3}.preview__row[_ngcontent-%COMP%]{margin-top:24px}.preview__label[_ngcontent-%COMP%]{color:#4b4e56;margin-bottom:4px}.preview__value[_ngcontent-%COMP%]{color:#202020;margin-bottom:0}.insurance-error[_ngcontent-%COMP%]{border-radius:5px;background-color:#fff8d080;padding:12px 12px 12px 38px;background-image:url(https://cdn.easypay.ua/images/svg/oscpv/attention-orange.svg);background-repeat:no-repeat;background-size:14px;background-position:12px 12px;margin-top:16px;margin-bottom:24px}.mt-24[_ngcontent-%COMP%]{margin-top:24px}.mt-8[_ngcontent-%COMP%]{margin-top:8px}.button--wide-405[_ngcontent-%COMP%]{height:44px;line-height:44px;box-shadow:0 8px 20px #1f83fe4d;max-width:405px}.control-wide-405[_ngcontent-%COMP%]{max-width:405px}.insurance-checkbox.mat-mdc-checkbox.mat-primary[_ngcontent-%COMP%]{--mdc-checkbox-unselected-icon-color: #CCCCCC;--mdc-checkbox-unselected-hover-icon-color: #CCCCCC}.insurance-checkbox__label[_ngcontent-%COMP%]{font-size:12px;line-height:16px;font-weight:400;color:#202020}.insurance-back[_ngcontent-%COMP%]{display:inline-block;background-image:url(https://cdn.easypay.ua/images/svg/arrows/arrow-brand-blue.svg);background-repeat:no-repeat;background-size:17px 16px;background-position:4px center;padding:4px 0 4px 28px;font-size:16px;line-height:16px;font-weight:400}.insurance-back.show-ins-dialog[_ngcontent-%COMP%]{color:#1f83fe;cursor:pointer}.insurance-back.show-ins-dialog[_ngcontent-%COMP%]:focus, .insurance-back.show-ins-dialog[_ngcontent-%COMP%]:hover{color:#055b9d}.ins__tooltip[_ngcontent-%COMP%]{display:inline-block;width:14px;
1height:14px;position:relative;top:2px;transition:.15s}.ins__tooltip[_ngcontent-%COMP%]:before{content:"";position:absolute;width:40px;height:40px;left:-13px;top:-13px;background-image:url(https://cdn.easypay.ua/images/svg/info-new.svg);background-repeat:no-repeat;background-size:14px;background-position:center;transition:.15s}.insurance-toggle[_ngcontent-%COMP%]{align-self:flex-end;position:relative;margin:12px 0 0 auto;color:#1f83fe;font-size:16px;cursor:pointer}@media only screen and (min-width: 640px){.insurance-toggle[_ngcontent-%COMP%]{margin-top:24px}}.insurance-toggle[_ngcontent-%COMP%]:before{position:absolute;content:"";top:-8px;bottom:-8px;left:-8px;right:-8px}.insurance-toggle[_ngcontent-%COMP%]:after{content:url(\'data:image/svg+xml;utf8,<svg width="13" height="8" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none"><path d="M12.54.55c.25.25.25.65 0 .9l-5.9 5.91-5.92-5.9a.64.64 0 0 1 .91-.91l5 5 5-5a.64.64 0 0 1 .91 0Z" fill="dodgerBlue"/></svg>\');display:inline-block;transition:transform .5s;margin-left:10px}@media only screen and (max-width: 639.8px){.insurance-toggle.extended[_ngcontent-%COMP%]{position:absolute;bottom:16px;right:16px;z-index:1}}.insurance-toggle.extended[_ngcontent-%COMP%]:after{transform:rotateX(180deg)}.insurance-toggle[_ngcontent-%COMP%]:focus-visible{box-shadow:#fff 0 0 0 4px,#dff1ff 0 0 2px 6px}.page-with-product[_ngcontent-%COMP%]{display:flex;flex-direction:column}@media only screen and (min-width: 1024px){.page-with-product[_ngcontent-%COMP%]{flex-direction:row;column-gap:24px}}.page-with-product[_ngcontent-%COMP%] .inner-info-container[_ngcontent-%COMP%]{padding:16px 12px;background-color:#fff;margin-top:8px;border-radius:5px}@media only screen and (min-width: 640px){.page-with-product[_ngcontent-%COMP%] .inner-info-container[_ngcontent-%COMP%]{margin-top:12px}}@media only screen and (min-width: 1024px){.page-with-product[_ngcontent-%COMP%] .inner-info-container[_ngcontent-%COMP%]{flex:1 1 auto;margin-top:0}}@media only screen and (min-width: 1024px){.page-with-product[_ngcontent-%COMP%] .selected-product-info[_ngcontent-%COMP%]{order:1;flex:0 0 320px}}.flag-ua[_ngcontent-%COMP%]{position:relative;height:10px;width:16px;margin-bottom:7px}.flag-ua[_ngcontent-%COMP%]:before, .flag-ua[_ngcontent-%COMP%]:after{content:"";position:absolute;left:0;height:5px;width:16px}.flag-ua[_ngcontent-%COMP%]:before{background-color:#007ef6;top:0}.flag-ua[_ngcontent-%COMP%]:after{background-color:#f8d347;top:5px}.customer-info__flag[_ngcontent-%COMP%]{position:absolute;left:0;top:5px;margin-bottom:0}.phone-field[_ngcontent-%COMP%]{color:#202020;position:relative;padding-bottom:24px;transition:padding-bottom .2s}.phone-field-pb[_ngcontent-%COMP%]{padding-bottom:35px}.phone-field_input[_ngcontent-%COMP%]{height:44px;border:1px solid #ccc;border-radius:5px;width:100%;padding:0 16px 0 94px;position:relative;font-weight:400;font-size:16px;line-height:20px}.phone-field_input.ng-invalid.ng-touched[_ngcontent-%COMP%]{border-color:#e8242b}.phone-field_input[_ngcontent-%COMP%]:focus, .phone-field_input.ng-touched.ng-valid[_ngcontent-%COMP%]{border:1px solid #1f83fe}.phone-field_input[_ngcontent-%COMP%]::placeholder{font-weight:400;font-size:16px;line-height:44px;color:#9e9e9e}.phone-field_prefix[_ngcontent-%COMP%]{position:absolute;top:1px;left:1px;height:42px;font-weight:400;font-size:16px;line-height:20px;padding:12px 17px 8px 12px;z-index:1}.phone-field_prefix[_ngcontent-%COMP%]:after{content:"";position:absolute;height:16px;width:1px;background-color:#ccc;right:8px;top:50%;transform:translateY(-50%)}.phone-field_prefix-code[_ngcontent-%COMP%]{display:inline-block;padding-left:8px}.phone-field_error[_ngcontent-%COMP%]{top:48px;left:0}@media only screen and (min-width: 640px){.pr-for-edit[_ngcontent-%COMP%]{padding-right:150px}}'],changeDetection:0}),m})();var yt=o(44238),gt=o(92624),Rt=o(23679);class Nt{constructor(m){Object.assign(this,m)}}var jt=o(28214);const Bt=(c,m)=>null==m?null:m.key,Vt=(c,m)=>m.name;function $t(c,m){if(1&c){const r=t.RV6();t.j41(0,"div",11),t.nI1(1,"safeHtml"),t.bIt("click",function(){a.eBV(r);const i=t.XpG();return a.Njj(i.removeError())}),t.k0s()}if(2&c){const r=t.XpG();t.Y8G("innerHtml",t.bMT(1,1,r.error.message),t.npT)}}function At(c,m){if(1&c&&(t.j41(0,"mat-radio-button",13),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&c){const r=m.$implicit;t.Y8G("value",null==r?null:r.key),t.R7$(),t.SpI(" ",t.bMT(2,2,null==r||null==r.value?null:r.value.label)," ")}}function Lt(c,m){if(1&c){const r=t.RV6();t.j41(0,"mat-radio-group",12),t.mxI("ngModelChange",function(i){a.eBV(r);
1const g=t.XpG();return t.DH7(g.selectedDocType,i)||(g.selectedDocType=i),a.Njj(i)}),t.bIt("change",function(){a.eBV(r);const i=t.XpG();return a.Njj(i.initForm())}),t.Z7z(1,At,3,4,"mat-radio-button",13,Bt),t.nI1(3,"keys"),t.k0s()}if(2&c){const r=t.XpG();t.R50("ngModel",r.selectedDocType),t.R7$(),t.Dyx(t.bMT(3,1,r.docTypes()))}}function Xt(c,m){if(1&c&&(t.j41(0,"div",9),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&c){let r;const e=t.XpG();t.R7$(),t.JRh(t.bMT(2,1,null==e.docTypes||null==e.docTypes[null==(r=e.requiredDocTypes())?null:r[0]]?null:e.docTypes[null==r?null:r[0]].label))}}function Gt(c,m){if(1&c&&(t.j41(0,"mat-form-field",16)(1,"mat-label"),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.nrm(4,"input",18)(5,"mat-datepicker-toggle",19)(6,"mat-datepicker",null,1),t.k0s()),2&c){const r=t.sdS(7),e=t.XpG().$implicit;t.R7$(2),t.JRh(t.bMT(3,6,null==e?null:e.label)),t.R7$(2),t.Y8G("matDatepicker",r)("min",null==e?null:e.minDate)("max",null==e?null:e.maxDate)("formControlName",null==e?null:e.name),t.R7$(),t.Y8G("for",r)}}function Ut(c,m){if(1&c&&t.nrm(0,"app-tooltip-picture",22),2&c){const r=t.XpG(2).$implicit;t.Y8G("tooltipImageClass",r.tooltipImageClass)}}function zt(c,m){if(1&c){const r=t.RV6();t.j41(0,"button",25),t.bIt("pointerdown",function(i){return a.eBV(r),a.Njj(i.preventDefault())})("click",function(){a.eBV(r);const i=t.XpG(4);return a.Njj(i.initDiya())}),t.EFF(1),t.nI1(2,"translate"),t.j41(3,"span"),t.EFF(4),t.nI1(5,"translate"),t.k0s()()}2&c&&(t.R7$(),t.SpI(" ",t.bMT(2,2,"oscpv.shared.diya-label")," "),t.R7$(3),t.JRh(t.bMT(5,4,"oscpv.shared.diya-gov")))}function Wt(c,m){if(1&c){const r=t.RV6();t.j41(0,"mat-form-field",20)(1,"mat-label"),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"input",21),t.bIt("blur",function(){a.eBV(r);const i=t.XpG().$implicit,g=t.XpG(2);return a.Njj(g.clearEmptyFieldError(null==g.form?null:g.form.get(null==i?null:i.name)))}),t.k0s(),t.nVh(5,Ut,1,1,"app-tooltip-picture",22),t.nVh(6,zt,6,6,"button",23),t.j41(7,"mat-error"),t.nrm(8,"app-control-validation-messages",24),t.k0s()()}if(2&c){const r=t.XpG().$implicit,e=t.XpG(2);t.AVh("diya-field",null==r?null:r.hasDiya),t.R7$(2),t.JRh(t.bMT(3,11,null==r?null:r.label)),t.R7$(2),t.Y8G("type",null==r?null:r.type)("formControlName",null==r?null:r.name),t.R7$(),t.vxM(null!=r&&r.tooltipImageClass?5:-1),t.R7$(),t.vxM(e.isAuth()&&null!=r&&r.hasDiya?6:-1),t.R7$(2),t.Y8G("mainForm",e.form)("fieldName",null==r?null:r.name)("formErrors",e.formErrors)("showOne",!0)}}function Yt(c,m){if(1&c&&t.nVh(0,Gt,8,8,"mat-form-field",16)(1,Wt,9,13,"mat-form-field",17),2&c){let r;const e=m.$implicit;t.vxM("date"===(r=null==e?null:e.type)?0:1)}}function Ht(c,m){if(1&c){const r=t.RV6();t.j41(0,"form",14),t.bIt("ngSubmit",function(){a.eBV(r);const i=t.XpG();return a.Njj(i.submit())}),t.Z7z(1,Yt,2,1,null,null,Vt),t.j41(3,"button",15),t.EFF(4),t.nI1(5,"translate"),t.k0s()()}if(2&c){const r=t.XpG();t.Y8G("formGroup",r.form),t.R7$(),t.Dyx(r.formKeys()),t.R7$(2),t.Y8G("disabled",!(null!=r.form&&r.form.valid)),t.R7$(),t.JRh(t.bMT(5,3,"oscpv.shared.next"))}}const ft="document";let Kt=(()=>{var c;class m extends et.I{constructor(e,i,g,R,X,z,tt,it){super(e),this.insuranceService=i,this.authService=g,this.translateService=R,this.loaderService=X,this.router=z,this.dialogService=tt,this.helper=it,this.destroyRef=(0,a.WQX)(a.abz),this.form=null,this.selectedDocType=(0,rt.geq)(),this.isAuth=(0,p.ot)(this.authService.isAuth$,{initialValue:!1}),this.contextDocument=(0,G.EW)(()=>this.insuranceService?.contextSignal()?.customerDocument),this.requiredDocTypes=(0,G.EW)(()=>this.insuranceService?.contextSignal()?.requiredData?.documentTypes),this.docTypes=(0,G.EW)(()=>this.getDocumentsConfig()),this.formKeys=(0,G.EW)(()=>this.docTypes()?.[this.selectedDocType()]?.fields??[])}ngOnInit(){this.stepData=this.insuranceService.getStepData(ft),this.initContextSubscription()}initContextSubscription(){this.insuranceService.contextInfo$.pipe((0,u.p)(Boolean),(0,b.F)((e,i)=>this.helper.shallowEqual(e?.customerDocument,i?.customerDocument)),(0,p.pQ)(this.destroyRef)).subscribe({next:e=>this.initStep(e)})}initStep(e){const i=this.selectedDocType();this.selectedDocType.set(this.backEndContextDocument),!this.form||this.form&&i!==this.selectedDocType()?this.initForm():this.helper.patchFormFromModel(this.form,e.customerDocument,["dateIssue","dateE
1xpiration"])}get backEndContextDocument(){const e=this.insuranceService.contextSignal(),i=e?.customerDocument?.type,g=e?.requiredData?.documentTypes;return g?.includes(i)?i:g?.[0]}initForm(){this.form?.reset(),this.formErrors={},this.form=this.buildForm(this.selectedDocType()),this.setBaseFieldsValidationMessages(),this.initFormSubscription()}buildForm(e){const i=yt.I[e],g={};return i?.fields?.forEach(R=>{const X=this.getDefaultValue(R.name);g[R?.name]=new d.MJ(X,[...R?.validators]),this.formErrors[R?.name]=new T.b,this.createFieldValidationMessages(R),X&&g[R?.name].markAsTouched(),g[R?.name].updateValueAndValidity()}),new d.gE(g)}getDocumentsConfig(){return Object.fromEntries(this.requiredDocTypes().map(e=>[e,yt.I[e]]))}createFieldValidationMessages(e){e?.minLength>0&&this.translateService.get("validate-messages.minimal-length").subscribe(i=>{this.setBaseValidationMessages(`${i} ${e.minLength}`,"minlength",e?.name)}),e?.maxLength>0&&this.translateService.get("validate-messages.maximum-length").subscribe(i=>{this.setBaseValidationMessages(`${i} ${e.maxLength}`,"maxlength",e.name)})}setBaseFieldsValidationMessages(){this.translateService.get("validate-messages.required").subscribe(e=>{this.setBaseValidationMessages(e,"required")}),this.translateService.get("validate-messages.pattern").subscribe(e=>{this.setBaseValidationMessages(e,"pattern")})}submit(){this.loaderService.startManual(),this.insuranceService.sendCustomerDocument(this.customerDocument).pipe((0,f.$)(),(0,A.j)(()=>this.loaderService.finishManual())).subscribe({next:()=>this.router.navigate(["./car-insurance/check"]),error:e=>{this.setError(e),this.setFormErrors(this.insuranceService.stripFieldPrefix(e?.error?.fieldErrors),this.form)}})}get customerDocument(){const{dateIssue:e,dateExpiration:i,...g}=this.form.getRawValue();return new Nt({type:this.selectedDocType(),...g,dateIssue:this.getFormattedDate(e),...this.form.contains("dateExpiration")&&{dateExpiration:this.getFormattedDate(i)}})}getFormattedDate(e){if(!e)return;const i=e instanceof Date?e:new Date(e);return(0,at.GP)(i,"yyyy.MM.dd")}getValue(e){return this.form?.get(e)?.value}initFormSubscription(){this.form.valueChanges.pipe((0,p.pQ)(this.destroyRef),(0,K.B)(300)).subscribe({next:()=>{this.insuranceService.updateStepData(ft,this.updatedStepData),this.onValueChanged(this.form)}})}get updatedStepData(){return{...this.insuranceService.getStepData(ft)||{},[this.selectedDocType()]:this.serializedFormData}}get serializedFormData(){return{...this.form?.value,dateIssue:this.serializeDate("dateIssue"),dateExpiration:this.serializeDate("dateExpiration")}}serializeDate(e){const i=this.form.get(e)?.value;return i instanceof Date&&!isNaN(i.getTime())?(0,at.GP)(i,"yyyy-MM-dd"):""}getDefaultValue(e){const i=(this.contextDocument()?.type==this.selectedDocType()?this.contextDocument()?.[e]:this.stepData?.[this.selectedDocType()]?.[e])||null;switch(e){case"dateExpiration":case"dateIssue":return this.helper.parseContextDate(i);default:return i}}initDiya(){this.isAuth()&&this.dialogService.openDiyaDialog()}}return(c=m).\u0275fac=function(e){return new(e||c)(t.rXU(t.Agw),t.rXU(n.m),t.rXU(k.u),t.rXU(v.c$),t.rXU(mt.Z),t.rXU(E.Ix),t.rXU(l.u),t.rXU(ot))},c.\u0275cmp=t.VBU({type:c,selectors:[["app-document"]],inputs:{selectedDocType:[1,"selectedDocType"]},outputs:{selectedDocType:"selectedDocTypeChange"},features:[t.Jv_([{provide:Y.D,useClass:lt.L,deps:[Y.M,Y.a]},dt.z,{provide:Y.a,useValue:ct.k},ot]),t.Vt3],decls:15,vars:11,consts:[["errorBlock",""],["picker",""],[1,"customer-info__child-container","relative"],[1,"scroll-offset"],[1,"insurance-error",3,"innerHtml"],[1,"customer-info__title","semibold"],[1,"customer-info__ua-title","relative","mt-8"],[1,"flag-ua","customer-info__flag"],["color","primary",1,"mat-radio-group--custom","flex-container","flex-wrap",3,"ngModel"],[1,"customer-document__label","regular"],[1,"customer-info__form",3,"formGroup"],[1,"insurance-error",3,"click","innerHtml"],["color","primary",1,"mat-radio-group--custom","flex-container","flex-wrap",3,"ngModelChange","change","ngModel"],[1,"mat-radio-btn--custom",3,"value"],[1,"customer-info__form",3,"ngSubmit","formGroup"],["type","submit",1,"button","light-blue","customer-info__submit-btn",3,"disabled"],["appearance","outline",1,"insurance-date-field"],["appearance","outline",3,"diya-field"],["matInput","","autocomplete","off","tabindex","-1","placeholder","\u0414\u0414.MM.\u0413\u0413\u0413\u0413","readonly","",3,"matDatepicker","min","max","formControlName"],[1,"customer-info-picker","absolute",3,"for"],["appearance","outline"],["matInput","",3,"blur","type","formControlName"],["matSuffix","",3,"tooltipImageClass"],["type","button",1,"oscpv__diya-btn","absolute"],[3,"mainForm","fieldName","formErrors","showOne"],["type","button",1,"oscpv__diya-btn","absolute",3,"pointerdown","click"]],template:function(e,i){if(1&e&&(t.j41(0,"section",2)(1,"div",3,0),t.nVh(3,$t,2,3,"div",4),t.nI1(4,"async"),t.k0s(),t.j41(5,"p",5),t.EFF(6),t.nI1(7,"translate"),t.k0s(),t.j41(8,"p",6),t.nrm(9,"span",7),t.EFF(10),t.nI1(11,"translate"),t.k0s(),t.nVh(12,Lt,4,3,"mat-radio-group",8)(13,Xt,3,3,"div",9),t.nVh(14,Ht,6,5,"form",10),t.k0s()),2&e){let g;t.R7$(3),t.vxM(!1===t.bMT(4,5,null==i.error?null:i.error.$isNoErrors)?3:-1),t.R7$(3),t.JRh(t.bMT(7,7,"oscpv.document-step.title")),t.R7$(4),t.SpI(" ",t.bMT(11,9,"oscpv.policyholder.ukrainian-lang")," "),t.R7$(2),t.vxM((null==(g=i.requiredDocTypes())?null:g.length)>1?12:13),t.R7$(2),t.vxM(i.form?14:-1)}},dependencies:[gt.Wk,gt.VT,gt._g,d.X1,d.qT,d.me,d.BC,d.cb,d.j4,d.JD,Z.fS,Z.fg,H.j,H.M,H.b,H.g,d.YN,d.vS,Rt.Y,_.h,q.X6,q.Vh,q.bZ,q.bU,Ct.WX,nt.d,ht.g,ut,C.Jj,jt.R,pt.$,v.D9],styles:['.customer-info__child-container[_ngcontent-%COMP%]{padding-top:24px}.customer-info__title[_ngcontent-%COMP%]{font-size:20px;line-height:1.3;color:#202020;font-weight:500;margin-bottom:0}.customer-info__edit[_ngcontent-%COMP%]{font-size:16px;line-height:1.3;color:#1f83fe;padding-right:28px;height:24px;background-image:url(https://cdn.easypay.ua/images/svg/oscpv/edit.svg);background-repeat:no-repeat;background-size:24px;background-position:top right;margin-top:24px}@media only screen and (min-width: 640px){.customer-info__edit[_ngcontent-%COMP%]{position:absolute;bottom:68px;right:0}}.customer-info__next-btn[_ngcontent-%COMP%]{height:44px;margin-top:24px}@media only screen and (min-width: 640px){.customer-info__next-btn[_ngcontent-%COMP%]{max-width:320px}}.customer-info__submit-btn[_ngcontent-%COMP%]{height:44px}.customer-info__form[_ngcontent-%COMP%]{padding-top:8px;max-width:405px}.customer-info__ua-title[_ngcontent-%COMP%]{font-size:14px;line-height:20px;padding-left:24px}.diya-field[_ngcontent-%COMP%] .oscpv__diya-btn[_ngcontent-%COMP%]{position:absolute;top:calc(100% + 5px);left:-12px;padding:6px 8px;background-color:#4b4e56;border-radius:4px;font-size:12px;line-height:1.3;color:#fff;font-weight:400;text-align:left;cursor:pointer;width:max-content;max-width:260px;opacity:0;pointer-events:none;transition:opacity .15s;touch-action:manipulation}.diya-field[_ngcontent-%COMP%] .oscpv__diya-btn[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#1f83fe}.diya-field[_ngcontent-%COMP%]:focus-within .oscpv__diya-btn[_ngcontent-%COMP%]{opacity:1;pointer-events:auto}.customer-info-picker[_ngcontent-%COMP%]{left:-12px;right:-12px;top:0;bottom:0;z-index:2;text-align:right;cursor:pointer;--mdc-icon-button-state-layer-size: 44px;--mdc-icon-button-icon-color: #1f83fe}.insurance-error[_ngcontent-%COMP%]{border-radius:5px;background-color:#fff8d080;padding:12px 12px 12px 38px;background-image:url(https://cdn.easypay.ua/images/svg/oscpv/attention-orange.svg);background-repeat:no-repeat;background-size:14px;background-position:12px 12px;margin-top:16px;margin-bottom:24px}.mt-24[_ngcontent-%COMP%]{margin-top:24px}.mt-8[_ngcontent-%COMP%]{margin-top:8px}.button--wide-405[_ngcontent-%COMP%]{height:44px;line-height:44px;box-shadow:0 8px 20px #1f83fe4d;max-width:405px}.control-wide-405[_ngcontent-%COMP%]{max-width:405px}.insurance-checkbox.mat-mdc-checkbox.mat-primary[_ngcontent-%COMP%]{--mdc-checkbox-unselected-icon-color: #CCCCCC;--mdc-checkbox-unselected-hover-icon-color: #CCCCCC}.insurance-checkbox__label[_ngcontent-%COMP%]{font-size:12px;line-height:16px;font-weight:400;color:#202020}.insurance-back[_ngcontent-%COMP%]{display:inline-block;background-image:url(https://cdn.easypay.ua/images/svg/arrows/arrow-brand-blue.svg);background-repeat:no-repeat;background-size:17px 16px;background-position:4px center;padding:4px 0 4px 28px;font-size:16px;line-height:16px;font-weight:400}.insurance-back.show-ins-dialog[_ngcontent-%COMP%]{color:#1f83fe;cursor:pointer}.insurance-back.show-ins-dialog[_ngcontent-%COMP%]:focus, .insurance-back.show-ins-dialog[_ngcontent-%COMP%]:hover{color:#055b9d}.ins__tooltip[_ngcontent-%COMP%]{display:inline-block;width:14px;
1height:14px;position:relative;top:2px;transition:.15s}.ins__tooltip[_ngcontent-%COMP%]:before{content:"";position:absolute;width:40px;height:40px;left:-13px;top:-13px;background-image:url(https://cdn.easypay.ua/images/svg/info-new.svg);background-repeat:no-repeat;background-size:14px;background-position:center;transition:.15s}.insurance-toggle[_ngcontent-%COMP%]{align-self:flex-end;position:relative;margin:12px 0 0 auto;color:#1f83fe;font-size:16px;cursor:pointer}@media only screen and (min-width: 640px){.insurance-toggle[_ngcontent-%COMP%]{margin-top:24px}}.insurance-toggle[_ngcontent-%COMP%]:before{position:absolute;content:"";top:-8px;bottom:-8px;left:-8px;right:-8px}.insurance-toggle[_ngcontent-%COMP%]:after{content:url(\'data:image/svg+xml;utf8,<svg width="13" height="8" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none"><path d="M12.54.55c.25.25.25.65 0 .9l-5.9 5.91-5.92-5.9a.64.64 0 0 1 .91-.91l5 5 5-5a.64.64 0 0 1 .91 0Z" fill="dodgerBlue"/></svg>\');display:inline-block;transition:transform .5s;margin-left:10px}@media only screen and (max-width: 639.8px){.insurance-toggle.extended[_ngcontent-%COMP%]{position:absolute;bottom:16px;right:16px;z-index:1}}.insurance-toggle.extended[_ngcontent-%COMP%]:after{transform:rotateX(180deg)}.insurance-toggle[_ngcontent-%COMP%]:focus-visible{box-shadow:#fff 0 0 0 4px,#dff1ff 0 0 2px 6px}.page-with-product[_ngcontent-%COMP%]{display:flex;flex-direction:column}@media only screen and (min-width: 1024px){.page-with-product[_ngcontent-%COMP%]{flex-direction:row;column-gap:24px}}.page-with-product[_ngcontent-%COMP%] .inner-info-container[_ngcontent-%COMP%]{padding:16px 12px;background-color:#fff;margin-top:8px;border-radius:5px}@media only screen and (min-width: 640px){.page-with-product[_ngcontent-%COMP%] .inner-info-container[_ngcontent-%COMP%]{margin-top:12px}}@media only screen and (min-width: 1024px){.page-with-product[_ngcontent-%COMP%] .inner-info-container[_ngcontent-%COMP%]{flex:1 1 auto;margin-top:0}}@media only screen and (min-width: 1024px){.page-with-product[_ngcontent-%COMP%] .selected-product-info[_ngcontent-%COMP%]{order:1;flex:0 0 320px}}.flag-ua[_ngcontent-%COMP%]{position:relative;height:10px;width:16px;margin-bottom:7px}.flag-ua[_ngcontent-%COMP%]:before, .flag-ua[_ngcontent-%COMP%]:after{content:"";position:absolute;left:0;height:5px;width:16px}.flag-ua[_ngcontent-%COMP%]:before{background-color:#007ef6;top:0}.flag-ua[_ngcontent-%COMP%]:after{background-color:#f8d347;top:5px}.customer-info__flag[_ngcontent-%COMP%]{position:absolute;left:0;top:5px;margin-bottom:0}[_nghost-%COMP%] .mat-radio-group--custom[_ngcontent-%COMP%]{margin-top:24px;margin-bottom:0}.customer-document__label[_ngcontent-%COMP%]{font-size:14px;line-height:20px;margin:24px 0}'],changeDetection:0}),m})();var Jt=o(55631),Dt=o(2145);const Pt=[{name:"registrationNumber",type:"text",placeholder:"AA 1111 AA",validators:[d.k0.required,Dt.N.carNumberValidator()],index:0},{name:"brand",type:"text",label:"oscpv.car-info-step.brand-label",placeholder:"",validators:[d.k0.compose([d.k0.required,d.k0.maxLength(50)])],maxLength:50,index:1,hasDiya:!0},{name:"model",type:"text",label:"oscpv.car-info-step.model-label",placeholder:"",validators:[d.k0.compose([d.k0.required,d.k0.maxLength(50)])],maxLength:50,index:2},{name:"makeYear",type:"tel",label:"oscpv.car-info-step.make-year-label",mask:"intMask",placeholder:"",validators:[d.k0.compose([d.k0.required,d.k0.minLength(4),d.k0.maxLength(4)])],maxLength:4,minLength:4,index:3},{name:"vin",type:"text",label:"oscpv.car-info-step.vin-label",placeholder:"",validators:[d.k0.compose([d.k0.required,Dt.N.vinCustomValidator()])],index:4},{name:"seatsCount",type:"tel",label:"oscpv.car-info-step.seats-count-label",mask:"intMask",placeholder:"",validators:[d.k0.compose([d.k0.required,d.k0.maxLength(3)])],maxLength:3,index:
17},{name:"totalWeight",type:"tel",label:"oscpv.car-info-step.full-weight-label",mask:"intMask",placeholder:"",validators:[d.k0.compose([d.k0.required,d.k0.minLength(2),d.k0.maxLength(6)])],maxLength:6,minLength:2,index:8},{name:"ownWeight",type:"tel",label:"oscpv.car-info-step.own-weight-label",mask:"intMask",placeholder:"",validators:[d.k0.compose([d.k0.required,d.k0.minLength(2),d.k0.maxLength(6)])],maxLength:6,minLength:2,index:9}],Qt=[...Pt,{name:"electricMotorPower",type:"tel",label:"oscpv.car-info-step.power-label",mask:"threeDecimalMask",placeholder:"",validators:[d.k0.compose([d.k0.required,d.k0.maxLength(4)])],maxLength:4,index:6}],Zt=[...Pt,{name:"engineVolume",type:"tel",label:"oscpv.car-info-step.volume-label",mask:"intMask",placeholder:"",validators:[d.k0.compose([d.k0.minLength(2),d.k0.maxLength(4)])],maxLength:4,minLength:2,index:5,tooltipImageClass:"tooltip-image--engineVolume"},{name:"electricMotorPower",type:"tel",label:"oscpv.car-info-step.power-label",mask:"threeDecimalMask",placeholder:"",validators:[d.k0.maxLength(5),d.k0.min(.01)],min:.01,maxLength:4,index:6}];class qt{isErrorState(m,r){if(!m||m.disabled||!m.touched&&!m.dirty)return!1;const i=m.invalid,g=m.parent,R=m.value,X=null==R||"string"==typeof R&&""===R.trim(),z=!!g&&g.hasError("atLeastOneFilled")&&X;return i||z}}class te{constructor(m){this.type="auto",Object.assign(this,m)}}const ne=(c,m)=>m.name;function oe(c,m){if(1&c){const r=t.RV6();t.j41(0,"div",6),t.nI1(1,"safeHtml"),t.bIt("click",function(){a.eBV(r);const i=t.XpG();return a.Njj(i.removeError())}),t.k0s()}if(2&c){const r=t.XpG();t.Y8G("innerHtml",t.bMT(1,1,r.error.message),t.npT)}}function ie(c,m){if(1&c&&t.nrm(0,"app-car-number",9),2&c){const r=t.XpG(3);t.Y8G("control",r.control("registrationNumber"))}}function ae(c,m){if(1&c){const r=t.RV6();t.j41(0,"input",17),t.bIt("blur",function(){a.eBV(r);const i=t.XpG(2).$implicit,g=t.XpG(2);return a.Njj(g.clearFieldError(null==i?null:i.name))}),t.k0s()}if(2&c){const r=t.XpG(2).$implicit,e=t.XpG(2);t.Y8G("errorStateMatcher",e.needAtLeastOneEngineField(r.name)?e.atLeastOneMatcher:e.errorMatcher)("readonly",e.isReadonly(r.name))("formControlName",null==r?null:r.name)("type",null==r?null:r.type)}}function re(c,m){if(1&c){const r=t.RV6();t.j41(0,"input",18),t.bIt("blur",function(){a.eBV(r);const i=t.XpG(2).$implicit,g=t.XpG(2);return a.Njj(g.clearFieldError(null==i?null:i.name))}),t.k0s()}if(2&c){const r=t.XpG(2).$implicit,e=t.XpG(2);t.Y8G("errorStateMatcher",e.needAtLeastOneEngineField(r.name)?e.atLeastOneMatcher:e.errorMatcher)("readonly",e.isReadonly(r.name))("textMask",null==e.mask?null:e.mask[r.mask])("formControlName",null==r?null:r.name)("type",null==r?null:r.type)}}function se(c,m){if(1&c&&t.nrm(0,"app-tooltip-picture",14),2&c){const r=t.XpG(2).$implicit;t.Y8G("tooltipImageClass",r.tooltipImageClass)}}function ce(c,m){if(1&c){const r=t.RV6();t.j41(0,"button",19),t.bIt("pointerdown",function(i){return a.eBV(r),a.Njj(i.preventDefault())})("click",function(){a.eBV(r);const i=t.XpG(4);return a.Njj(i.initDiya())}),t.EFF(1),t.nI1(2,"translate"),t.j41(3,"span"),t.EFF(4),t.nI1(5,"translate"),t.k0s()()}2&c&&(t.R7$(),t.SpI(" ",t.bMT(2,2,"oscpv.shared.diya-label")," "),t.R7$(3),t.JRh(t.bMT(5,4,"oscpv.shared.diya-gov")))}function le(c,m){1&c&&(t.j41(0,"span"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&c&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"validate-messages.one-of-engine-params")))}function de(c,m){if(1&c&&(t.j41(0,"mat-form-field",11)(1,"mat-label"),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.nVh(4,ae,1,4,"input",12),t.nVh(5,re,1,5,"input",13),t.nVh(6,se,1,1,"app-tooltip-picture",14),t.nVh(7,ce,6,6,"button",15),t.j41(8,"mat-error"),t.nrm(9,"app-control-validation-messages",16),t.nVh(10,le,3,3,"span"),t.k0s()()),2&c){const r=t.XpG().$implicit,e=t.XpG(2);t.AVh("diya-field",null==r?null:r.hasDiya),t.R7$(2),t.JRh(t.bMT(3,12,null==r?null:r.label)),t.R7$(2),t.vxM(r.mask?-1:4),t.R7$(),t.vxM(r.mask?5:-1),t.R7$(),t.vxM(null!=r&&r.tooltipImageClass?6:-1),t.R7$(),t.vxM(e.isAuth()&&null!=r&&r.hasDiya?7:-1),t.R7$(2),t.Y8G("mainForm",e.form)("fieldName",null==r?null:r.name)("formErrors",e.formErrors)("showOne",!0),t.R7$(),t.vxM(e.needAtLeastOneEngineField(r.name)&&e.showAtLeastOneErrorFor(r.name)?10:-1)}}function pe(c,m){if(1&c&&t.nVh(0,ie,1,1,"app-car-number",9)(1,de,11,14,"mat-form-field",10),2&c){let r;t.vxM("registrationNumber"===(r=m.$implicit.name)?0:1)}}function ue(c,m){if(1&c){const r=t.RV6();t.j41(0,"form",7),t.bIt("ngSubmit",function(){a.eBV(r);const i=t.XpG();return a.Njj(i.submit())}),t.Z7z(1,pe,2,1,null,null,ne),t.j41(3,"button",8),t.EFF(4),t.nI1(5,"translate"),t.k0s()()}if(2&c){const r=t.XpG();t.Y8G("formGroup",r.form),t.R7$(),t.Dyx(r.flowFields()),t.R7$(2),t.Y8G("disabled",!(null!=r.form&&r.form.valid)),t.R7$(),t.JRh(t.bMT(5,3,"oscpv.shared.next"))}}const _t="insuranceObject",me=[{path:"",component:Q,children:[{path:"insurance-params",loadComponent:()=>Promise.all([o.e(3185),o.e(9771),o.e(4379)]).then(o.bind(o,91569)).then(c=>c.SelectInsuranceParamsComponent),data:{title:"oscpv.insurance-params.title",gradient:!0}},{path:"products",loadComponent:()=>o.e(751).then(o.bind(o,80751)).then(c=>c.InsuranceProductsComponent)},{path:"customer-info",loadComponent:()=>Promise.all([o.e(5663),o.e(2076),o.e(3300)]).then(o.bind(o,83300)).then(c=>c.CustomerInfoComponent),children:[{path:"insurance-object",component:(()=>{var c;class m extends et.I{constructor(e,i,g,R,X,z,tt,it,bt){super(e),this.platformId=e,this.insuranceService=i,this.authService=g,this.translateService=R,this.loaderService=X,this.router=z,this.cd=tt,this.dialogService=it,this.helper=bt,this.destroyRef=(0,a.WQX)(a.abz),this.form=null,this.isAuth=(0,p.ot)(this.authService.isAuth$,{initialValue:!1}),this.isSameVehicleNumber=!1,this.errorMatcher=new y.F,this.atLeastOneMatcher=new qt,this.atLeastOneFields=new Set(["electricMotorPower","engineVolume"]),this.insuranceObject=(0,G.EW)(()=>this.insuranceService.contextSignal()?.insuranceObject),this.isElectricCategory=(0,G.EW)(()=>"b5"===this.insuranceObject()?.category?.toLowerCase()),this.flowFields=(0,G.EW)(()=>this.isElectricCategory()?Qt:Zt),this.isFlowFieldsChanged=(0,G.uu)({source:()=>this.isElectricCategory,computation:(xt,Ot)=>!!Ot&&xt!==Ot?.value})}ngOnInit(){this.stepData=this.insuranceService.getStepData(_t),this.contextInfoSubscribe()}contextInfoSubscribe(){this.insuranceService.contextInfo$.pipe((0,u.p)(Boolean),(0,b.F)((e,i)=>this.helper.shallowEqual(e?.insuranceObject,i?.insuranceObject)),(0,p.pQ)(this.destroyRef)).subscribe({next:e=>{const i=this.isFlowFieldsChanged();if(e?.insuranceObject?.category){if(!this.form||this.form&&i)return void this.initStep();if(!i)return void this.helper.patchFormFromModel(this.form,e.insuranceObject)}}})}initStep(){this.isSameVehicleNumber=this.checkVehicleNumber(),this.initForm(),this.initFormSubscription()}checkVehicleNumber(){const e=this.insuranceObject()?.registrationNumber,i=this.stepData?.registrationNumber;return!(!e||!i)&&e.toLowerCase()===i.toLowerCase()}initForm(){this.form=this.buildForm(),this.updateFormValidity(),this.getBaseValidationMessages(),this.cd.markForCheck()}buildForm(){const e={};return this.flowFields()?.sort((i,g)=>i.index-g.index)?.forEach(i=>
1{const g=this.getDefaultValue(i.name);e[i?.name]=new d.MJ(g,i?.validators??[]),this.formErrors[i?.name]=new T.b,this.createFieldValidationMessages(i),g&&e[i?.name].markAsTouched()}),new d.gE(e)}updateFormValidity(){this.isElectricCategory()?this.form.get("electricMotorPower").addValidators(d.k0.required):this.form.addValidators(function ee(c){return m=>m instanceof d.gE?c.map(i=>m.get(i)?.value).some(i=>null!=i&&("number"==typeof i||String(i).trim().length>0))?null:{atLeastOneFilled:{fields:c}}:null}([...this.atLeastOneFields.keys()]))}initFormSubscription(){this.form.valueChanges.pipe((0,p.pQ)(this.destroyRef),(0,K.B)(300)).subscribe({next:()=>{this.insuranceService.updateStepData(_t,this.form.value),this.onValueChanged(this.form)}})}createFieldValidationMessages(e){e?.min>0&&this.translateService.get("validate-messages.minimal-value").subscribe(i=>{this.setBaseValidationMessages(`${i} ${e.min}`,"min",e?.name)}),e?.minLength>0&&this.translateService.get("validate-messages.minimal-length").subscribe(i=>{this.setBaseValidationMessages(`${i} ${e.minLength}`,"minlength",e?.name)}),e?.maxLength>0&&this.translateService.get("validate-messages.maximum-length").subscribe(i=>{this.setBaseValidationMessages(`${i} ${e.maxLength}`,"maxlength",e.name)}),"vin"===e?.name&&this.translateService.get("validate-messages.vin").subscribe(i=>{this.setBaseValidationMessages(i?.length,"vinInvalidLength",e.name),this.setBaseValidationMessages(i?.invalidLatinLetters,"invalidLetters",e.name),this.setBaseValidationMessages(i?.invalidCharacters,"invalidCharacters",e.name),this.setBaseValidationMessages(i?.missingDigit,"missingDigit",e.name)})}submit(){this.form&&(this.loaderService.startManual(),this.insuranceService.updateStepData(_t,this.form.value),this.insuranceService.sendInsuranceObjectData(this.carModel).pipe((0,f.$)(),(0,A.j)(()=>this.loaderService.finishManual())).subscribe({next:()=>this.router.navigate(["./car-insurance/customer-info/personal-data"]),error:e=>{this.setError(e),this.setFormErrors(this.insuranceService.stripFieldPrefix(e?.error?.fieldErrors),this.form)}}))}get carModel(){return new te({...(i=this.form?.value??{},Object.fromEntries(Object.entries(i).filter(([g,R])=>null!=R&&""!==R))),category:this.insuranceObject()?.category});var i}control(e){return this.form?.get(e)??null}getDefaultValue(e){const i=this.insuranceObject()?.[e];return this.isSameVehicleNumber?i||this.stepData?.[e]||null:i||null}getBaseValidationMessages(){this.translateService.get("validate-messages.required").pipe((0,f.$)()).subscribe(e=>this.setBaseValidationMessages(e,"required"))}isReadonly(e){return"objectidentifier"===this.insuranceService.contextInfoSource?.productsSearchType?.toLowerCase()&&this.isNeedCheckReadonly(e)&&!!this.insuranceObject()?.[e]}isNeedCheckReadonly(e){return["registrationNumber","electricMotorPower","engineVolume"].includes(e)}clearFieldError(e){this.needAtLeastOneEngineField(e)||super.clearEmptyFieldError(this.control(e))}needAtLeastOneEngineField(e){return!this.isElectricCategory()&&this.atLeastOneFields.has(e)}showAtLeastOneErrorFor(e){const i=this.form?.get(e);return!!i?.parent&&(null==i.value||""===String(i.value).trim())&&i.parent.hasError("atLeastOneFilled")&&(i.touched||i.dirty)}initDiya(){this.isAuth()&&this.dialogService.openDiyaDialog()}}return(c=m).\u0275fac=function(e){return new(e||c)(t.rXU(t.Agw),t.rXU(n.m),t.rXU(k.u),t.rXU(v.c$),t.rXU(mt.Z),t.rXU(E.Ix),t.rXU(rt.gRc),t.rXU(l.u),t.rXU(ot))},c.\u0275cmp=t.VBU({type:c,selectors:[["ng-component"]],features:[t.Jv_([{provide:Y.D,useClass:lt.L,deps:[Y.M,Y.a]},dt.z,{provide:Y.a,useValue:ct.k},ot]),t.Vt3],decls:9,vars:7,consts:[["errorBlock",""],[1,"customer-info__child-container","relative"],[1,"scroll-offset"],[1,"insurance-error",3,"innerHtml"],[1,"customer-info__title","semibold"],[1,"customer-info__form",3,"formGroup"],[1,"insurance-error",3,"click","innerHtml"],[1,"customer-info__form",3,"ngSubmit","formGroup"],["type","submit",1,"button","light-blue","customer-info__submit-btn",3,"disabled"],[1,"oscpv__car-number",3,"control"],["appearance","outline",3,"diya-field"],["appearance","outline"],["matInput","",3,"errorStateMatcher","readonly","formControlName","type"],["matInput","",3,"errorStateMatcher","readonly","textMask","formControlName","type"],["matSuffix","",3,"tooltipImageClass"],["type","button",1,"oscpv__diya-btn","absolute"],[3,"mainForm","fieldName","formErrors","showOne"],["matInput","",3,"blur","errorStateMatcher","readonly","formControlName","type"],["matInput","",3,"blur","errorStateMatcher","readonly","textMask","formControlName","type"],["type","button",1,"oscpv__diya-btn","absolute",3,"pointerdown","click"]],template:function(e,i){1&e&&(t.j41(0,"section",1)(1,"div",2,0),t.nVh(3,oe,2,3,"div",3),t.nI1(4,"async"),t.k0s(),t.j41(5,"p",4),t.EFF(6),t.nI1(7,"translate"),t.k0s(),t.nVh(8,ue,6,5,"form",5),t.k0s()),2&e&&(t.R7$(3),t.vxM(!1===t.bMT(4,3,null==i.error?null:i.error.$isNoErrors)?3:-1),t.R7$(3),t.JRh(t.bMT(7,5,"oscpv.car-info-step.title")),t.R7$(2),t.vxM(i.form?8:-1))},dependencies:[Z.fS,Z.fg,H.j,H.M,H.b,H.g,nt.d,ht.g,v.h,d.X1,d.qT,d.me,d.BC,d.cb,d.j4,d.JD,q.X6,ut,Jt.h,B.fn,C.Jj,v.D9,pt.$],styles:['.customer-info__child-container[_ngcontent-%COMP%]{padding-top:24px}.customer-info__title[_ngcontent-%COMP%]{font-size:20px;line-height:1.3;color:#202020;font-weight:500;margin-bottom:0}.customer-info__edit[_ngcontent-%COMP%]{font-size:16px;line-height:1.3;color:#1f83fe;padding-right:28px;height:24px;background-image:url(https://cdn.easypay.ua/images/svg/oscpv/edit.svg);background-repeat:no-repeat;background-size:24px;background-position:top right;margin-top:24px}@media only screen and (min-width: 640px){.customer-info__edit[_ngcontent-%COMP%]{position:absolute;bottom:68px;right:0}}.customer-info__next-btn[_ngcontent-%COMP%]{height:44px;margin-top:24px}@media only screen and (min-width: 640px){.customer-info__next-btn[_ngcontent-%COMP%]{max-width:320px}}.customer-info__submit-btn[_ngcontent-%COMP%]{height:44px}.customer-info__form[_ngcontent-%COMP%]{padding-top:8px;max-width:405px}.customer-info__ua-title[_ngcontent-%COMP%]{font-size:14px;line-height:20px;padding-left:24px}.diya-field[_ngcontent-%COMP%] .oscpv__diya-btn[_ngcontent-%COMP%]{position:absolute;top:calc(100% + 5px);left:-12px;padding:6px 8px;background-color:#4b4e56;border-radius:4px;font-size:12px;line-height:1.3;color:#fff;font-weight:400;text-align:left;cursor:pointer;width:max-content;max-width:260px;opacity:0;pointer-events:none;transition:opacity .15s;touch-action:manipulation}.diya-field[_ngcontent-%COMP%] .oscpv__diya-btn[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#1f83fe}.diya-field[_ngcontent-%COMP%]:focus-within .oscpv__diya-btn[_ngcontent-%COMP%]{opacity:1;pointer-events:auto}.customer-info-picker[_ngcontent-%COMP%]{left:-12px;right:-12px;top:0;bottom:0;z-index:2;text-align:right;cursor:pointer;--mdc-icon-button-state-layer-size: 44px;--mdc-icon-button-icon-color: #1f83fe}.insurance-error[_ngcontent-%COMP%]{border-radius:5px;background-color:#fff8d080;padding:12px 12px 12px 38px;background-image:url(https://cdn.easypay.ua/images/svg/oscpv/attention-orange.svg);background-repeat:no-repeat;background-size:14px;background-position:12px 12px;margin-top:16px;margin-bottom:24px}.mt-24[_ngcontent-%COMP%]{margin-top:24px}.mt-8[_ngcontent-%COMP%]{margin-top:8px}.button--wide-405[_ngcontent-%COMP%]{height:44px;line-height:44px;box-shadow:0 8px 20px #1f83fe4d;max-width:405px}.control-wide-405[_ngcontent-%COMP%]{max-width:405px}.insurance-checkbox.mat-mdc-checkbox.mat-primary[_ngcontent-%COMP%]{--mdc-checkbox-unselected-icon-color: #CCCCCC;--mdc-checkbox-unselected-hover-icon-color: #CCCCCC}.insurance-checkbox__label[_ngcontent-%COMP%]{font-size:12px;line-height:16px;font-weight:400;color:#202020}.insurance-back[_ngcontent-%COMP%]{display:inline-block;background-image:url(https://cdn.easypay.ua/images/svg/arrows/arrow-brand-blue.svg);background-repeat:no-repeat;background-size:17px 16px;background-position:4px center;padding:4px 0 4px 28px;font-size:16px;line-height:16px;font-weight:400}.insurance-back.show-ins-dialog[_ngcontent-%COMP%]{color:#1f83fe;cursor:pointer}.insurance-back.show-ins-dialog[_ngcontent-%COMP%]:focus, .insurance-back.show-ins-dialog[_ngcontent-%COMP%]:hover{color:#055b9d}.ins__tooltip[_ngcontent-%COMP%]{display:inline-block;width:14px;
1height:14px;position:relative;top:2px;transition:.15s}.ins__tooltip[_ngcontent-%COMP%]:before{content:"";position:absolute;width:40px;height:40px;left:-13px;top:-13px;background-image:url(https://cdn.easypay.ua/images/svg/info-new.svg);background-repeat:no-repeat;background-size:14px;background-position:center;transition:.15s}.insurance-toggle[_ngcontent-%COMP%]{align-self:flex-end;position:relative;margin:12px 0 0 auto;color:#1f83fe;font-size:16px;cursor:pointer}@media only screen and (min-width: 640px){.insurance-toggle[_ngcontent-%COMP%]{margin-top:24px}}.insurance-toggle[_ngcontent-%COMP%]:before{position:absolute;content:"";top:-8px;bottom:-8px;left:-8px;right:-8px}.insurance-toggle[_ngcontent-%COMP%]:after{content:url(\'data:image/svg+xml;utf8,<svg width="13" height="8" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none"><path d="M12.54.55c.25.25.25.65 0 .9l-5.9 5.91-5.92-5.9a.64.64 0 0 1 .91-.91l5 5 5-5a.64.64 0 0 1 .91 0Z" fill="dodgerBlue"/></svg>\');display:inline-block;transition:transform .5s;margin-left:10px}@media only screen and (max-width: 639.8px){.insurance-toggle.extended[_ngcontent-%COMP%]{position:absolute;bottom:16px;right:16px;z-index:1}}.insurance-toggle.extended[_ngcontent-%COMP%]:after{transform:rotateX(180deg)}.insurance-toggle[_ngcontent-%COMP%]:focus-visible{box-shadow:#fff 0 0 0 4px,#dff1ff 0 0 2px 6px}.page-with-product[_ngcontent-%COMP%]{display:flex;flex-direction:column}@media only screen and (min-width: 1024px){.page-with-product[_ngcontent-%COMP%]{flex-direction:row;column-gap:24px}}.page-with-product[_ngcontent-%COMP%] .inner-info-container[_ngcontent-%COMP%]{padding:16px 12px;background-color:#fff;margin-top:8px;border-radius:5px}@media only screen and (min-width: 640px){.page-with-product[_ngcontent-%COMP%] .inner-info-container[_ngcontent-%COMP%]{margin-top:12px}}@media only screen and (min-width: 1024px){.page-with-product[_ngcontent-%COMP%] .inner-info-container[_ngcontent-%COMP%]{flex:1 1 auto;margin-top:0}}@media only screen and (min-width: 1024px){.page-with-product[_ngcontent-%COMP%] .selected-product-info[_ngcontent-%COMP%]{order:1;flex:0 0 320px}}.flag-ua[_ngcontent-%COMP%]{position:relative;height:10px;width:16px;margin-bottom:7px}.flag-ua[_ngcontent-%COMP%]:before, .flag-ua[_ngcontent-%COMP%]:after{content:"";position:absolute;left:0;height:5px;width:16px}.flag-ua[_ngcontent-%COMP%]:before{background-color:#007ef6;top:0}.flag-ua[_ngcontent-%COMP%]:after{background-color:#f8d347;top:5px}.customer-info__flag[_ngcontent-%COMP%]{position:absolute;left:0;top:5px;margin-bottom:0}[_nghost-%COMP%] .oscpv__car-number[_ngcontent-%COMP%]{margin:16px 0 30px;display:block}'],changeDetection:0}),m})()},{path:"personal-data",component:wt},{path:"document",component:Kt},{path:"",redirectTo:"insurance-object",pathMatch:"full"}]},{path:"check",loadComponent:()=>Promise.all([o.e(5663),o.e(7549)]).then(o.bind(o,67549)).then(c=>c.CheckDataComponent)},{path:"confirm",loadComponent:()=>Promise.all([o.e(7024),o.e(5663),o.e(2076),o.e(484)]).then(o.bind(o,60484)).then(c=>c.ConfirmDataComponent)},{path:"accept",loadComponent:()=>Promise.all([o.e(7024),o.e(5663),o.e(2076),o.e(1208)]).then(o.bind(o,71208)).then(c=>c.AcceptContractComponent)},{path:"pay",loadComponent:()=>Promise.all([o.e(7976),o.e(8827),o.e(9541),o.e(7024),o.e(8501),o.e(8789),o.e(3185),o.e(1098),o.e(3672),o.e(7191),o.e(3399),o.e(6070),o.e(2724)]).then(o.bind(o,85653)).then(c=>c.InsurancePay)}]}]},20586:(U,j,o)=>{o.d(j,{_:()=>n});var a=o(36732),t=o(12481);const M=["mat-internal-form-field",""],E=["*"];let n=(()=>{var D;class V{constructor(){(0,a.A)(this,"labelPosition",void 0)}}return D=V,(0,a.A)(V,"\u0275fac",function(u){return new(u||D)}),(0,a.A)(V,"\u0275cmp",t.VBU({type:D,selectors:[["div","mat-internal-form-field",""]],hostAttrs:[1,"mdc-form-field","mat-internal-form-field"],hostVars:2,hostBindings:function(u,P){2&u&&t.AVh("mdc-form-field--align-end","before"===P.labelPosition)},inputs:{labelPosition:"labelPosition"},attrs:M,ngContentSelectors:E,decls:1,vars:0,template:function(u,P){1&u&&(t.NAR(),t.SdG(0))},styles:[".mat-internal-form-field{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-flex;align-items:center;vertical-align:middle}.mat-internal-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}[dir=rtl] .mat-internal-form-field>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px}
1.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}[dir=rtl] .mdc-form-field--align-end .mdc-form-field--align-end label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0}\n"],encapsulation:2,changeDetection:0})),V})()},25004:(U,j,o)=>{o.d(j,{d:()=>E});var a=o(93887),t=o(12481),M=o(85240);let E=(()=>{var n;class D{}return(n=D).\u0275fac=function(C){return new(C||n)},n.\u0275mod=t.$C({type:n}),n.\u0275inj=M.G2t({imports:[a.G]}),D})()},27329:(U,j,o)=>{o.d(j,{Y:()=>n});var a=o(85240),t=o(24755),M=function(D){return D.Products="products",D.InsuranceObject="customer-info/insurance-object",D.PersonalData="customer-info/personal-data",D.Document="customer-info/document",D}(M||{});const E={isInsuranceProductChosen:{stepDataKey:"product",stepPath:M.Products},isInsuranceObjectDataEntered:{stepDataKey:"insuranceObject",stepPath:M.InsuranceObject},isCustomerDataEntered:{stepDataKey:"customer",stepPath:M.PersonalData},isCustomerDocumentDataEntered:{stepDataKey:"customerDocument",stepPath:M.Document}};let n=(()=>{var D;class V{constructor(){this.contextSyncState=(0,a.vPA)("idle"),this.authTransitionContextSnapshot=(0,a.vPA)(null),this.needCompareContext=(0,t.EW)(()=>"awaitingAuthTransitionContext"===this.contextSyncState()&&!!this.authTransitionContextSnapshot())}onAuthStateChange(u){this.authTransitionContextSnapshot.set(u),this.contextSyncState.set("awaitingAuthTransitionContext")}diffContext(u,P){const s=[];let h=!1;
1return Object.keys(E).forEach(I=>{const{stepDataKey:N,stepPath:O}=E[I],y=u?.[I],S=P?.[I];if(!1===S&&P?.[N])return h=!0,void s.push(O);!0!==y||!1!==S||P?.[N]?!0===y&&!0===S&&this.isStepDataChanged(u[N],P[N])&&s.push(O):s.push(O)}),s.length?{steps:s,isDiyaData:h}:null}isStepDataChanged(u,P){return Object.keys(u).some(s=>P?.[s]?.toString()!==u?.[s]?.toString())}}return(D=V).\u0275fac=function(u){return new(u||D)},D.\u0275prov=a.jDH({token:D,factory:D.\u0275fac}),V})()},27953:(U,j,o)=>{o.d(j,{b:()=>E});var a=o(98509),t=o(84205),M=o(85240);let E=(()=>{var n;class D{constructor(C){this.router=C,this.changeBreadcrumbSource=new t.B,this.breadcrumbChanged$=this.changeBreadcrumbSource.asObservable(),this.breadcrumbs=[],this.router.events.subscribe(u=>{this.onRouteEvent(u)})}announceBreadcrumbChange(C){this.breadcrumbs=C,this.changeBreadcrumbSource.next(C)}changeBreadcrumb(C,u){const P=this.createRootUrl(C),s=this.breadcrumbs.find(h=>h.url===P);s&&(s.displayName=u,this.announceBreadcrumbChange(this.breadcrumbs))}onRouteEvent(C){if(!(C instanceof a.wF))return;let u=this.router.routerState.root.snapshot,P="";for(this.breadcrumbs=[];null!==u.firstChild;)u=u.firstChild,null!==u.routeConfig&&u.routeConfig.path&&(P+=`/${this.createUrl(u)}`,u.data.breadcrumb&&this.breadcrumbs.push(this.createBreadcrumb(u,P)));this.announceBreadcrumbChange(this.breadcrumbs)}createBreadcrumb(C,u){return{displayName:C.data.breadcrumb,routable:!!C.firstChild?.routeConfig,url:u}}createUrl(C){return C.url.map(u=>u.toString()).join("/")}createRootUrl(C){let u="",P=C.root;for(;null!==P.firstChild;)P=P.firstChild,null!==P.routeConfig&&P.routeConfig.path&&(u+=`/${this.createUrl(P)}`);return u}get breadcrumbsData(){return this.breadcrumbs}}return(n=D).\u0275fac=function(C){return new(C||n)(M.KVO(a.Ix))},n.\u0275prov=M.jDH({token:n,factory:n.\u0275fac,providedIn:"root"}),D})()},43901:(U,j,o)=>{o.d(j,{J:()=>t});var a=o(12481);let t=(()=>{var M;class E{transform(D){return null===D?"Not assigned":D.charAt(0).toUpperCase()+D.slice(1)}}return(M=E).\u0275fac=function(D){return new(D||M)},M.\u0275pipe=a.EJ8({name:"capitalizeFirst",type:M,pure:!0}),E})()},44238:(U,j,o)=>{o.d(j,{I:()=>J});var a=o(34456),t=o(93529),M=o(2145),E=o(62464),n=o(80782),D=o(1890),V=o(93595),C=o(47309);const I=(F=4,w=0,L)=>({name:"series",type:"text",label:"oscpv.document-step.series-label",maxLength:F,minLength:w,validators:[a.k0.required,a.k0.pattern(/^[\u0410-\u042f\u0430-\u044f\u0407\u0457\u0406\u0456\u0404\u0454a-zA-Z]+$/),...w?[a.k0.minLength(w)]:[],a.k0.maxLength(F)],tooltipImageClass:L,hasDiya:!0}),N=(F=20,w=0,L)=>({name:"number",type:"tel",label:"oscpv.document-step.number-label",maxLength:F,minLength:w,validators:[a.k0.required,...w?[a.k0.minLength(w)]:[],a.k0.maxLength(F)],tooltipImageClass:L}),y={name:"issue",type:"text",label:"oscpv.document-step.issue-label",minLength:100,validators:[a.k0.required,a.k0.maxLength(100)]},S=(F,w)=>({name:"dateIssue",type:"date",label:"oscpv.document-step.date-issue-label",validators:[a.k0.required,...F?[M.N.minDate(F,"dd.MM.yyyy")]:[],...w?[M.N.maxDate(w,"dd.MM.yyyy")]:[]],...F?{minDate:F}:{},...w?{maxDate:w}:{}}),v=(F,w)=>({name:"dateExpiration",type:"date",label:"oscpv.document-step.date-expiration-label",validators:[a.k0.required,...F?[M.N.minDate(F,"dd.MM.yyyy")]:[],...w?[M.N.maxDate(w,"dd.MM.yyyy")]:[]],...F?{minDate:F}:{},...w?{maxDate:w}:{}}),k=t.e,$=[I(),N(),y,S()],J={[k.InternalPassportBook]:{label:"oscpv.document-step.passport-book",fields:[I(2,2,"tooltip-image--passport-book-series"),N(6,0,"tooltip-image--passport-book-number"),S(new Date(1994,5,4),new Date),y]},[k.InternalPassportIdCard]:{label:"oscpv.document-step.passport-id-card",fields:[((F=14,w=0)=>({name:"recordNumber",type:"tel",label:"oscpv.document-step.record-label",maxLength:F,minLength:w,validators:[a.k0.required,...w?[a.k0.minLength(w)]:[],a.k0.maxLength(F)],tooltipImageClass:"tooltip-image--idCard-series",hasDiya:!0}))(),N(9,9,"tooltip-image--idCard-number"),S((F=new Date(2016,0,1),w=(0,E.d)(new Date,10),function s(F,w){let L,W=w?.in;return F.forEach(Q=>{!W&&"object"==typeof Q&&(W=V.w.bind(null,Q));const G=(0,C.a)(Q,W);(!L||L<G||isNaN(+G))&&(L=G)}),(0,V.w)(W,L||NaN)}([F,w])),new Date),y,v(new Date,function u(F,w,L){const{years:W=0,months:Q=0,weeks:G=0,days:d=0,hours:et=0,minutes:Z=0,seconds:nt=0}=w,_=(0,C.a)(F,L?.in),B=Q||W?(0,D.P)(_,Q+12*W):_,T=d||G?(0,n.f)(B,d+7*G):B,A=1e3*(nt+60*(Z+60*et));return(0,V.w)(L?.in||F,+T+A)}(new Date,{years:10}))]},[t.e.DriverLicense]:{label:"oscpv.document-step.driver-license",fields:[I(4,2,"tooltip-image--driver-license-series"),N(6,0,"tooltip-image--driver-license-number"),S(new Date(1991,7,24),new Date),y,v(new Date)]},[t.e.WarParticipantCertificate]:{label:"oscpv.document-step.war-participant",fields:[...$]},[t.e.HostilitiesParticipantCertificate]:{label:"oscpv.document-step.hostilities-participant",fields:[...$]},[t.e.DisabilityIdentityCard]:{label:"oscpv.document-step.disability-identity",fields:[...$]},[t.e.ChornobylVictimCertificate]:{label:"oscpv.document-step.chornobyl-victim",fields:[...$]},[t.e.PensionCertificate]:{label:"oscpv.document-step.pension",fields:[...$]},[t.e.RevolutionParticipantCertificate]:{label:"oscpv.document-step.revolution-participant",fields:[...$]}};var F,w},49063:(U,j,o)=>{o.d(j,{MB:()=>C,fn:()=>s});var a=o(85240),t=o(12481),M=o(34456),E=o(35430),n=o(60316),D=o(13889);class C{}const u={provide:M.kq,useExisting:(0,a.Rfq)(()=>s),multi:!0};let s=(()=>{var h;class I{constructor(O,y,S,v){this._renderer=O,this._elementRef=y,this._compositionMode=S,this.platformId=v,this.textMaskConfig={mask:[],guide:!0,placeholderChar:"_",pipe:void 0,keepCharPositions:!1},this.onChange=l=>{},this.onTouched=()=>{},this._composing=!1,this.isBrowser=(0,n.UE)(this.platformId),null===this._compositionMode&&(this._compositionMode=!function P(){const h=(0,E.rb)()?(0,E.rb)().getUserAgent():"";return/android (\d+)/.test(h.toLowerCase())}())}ngOnChanges(O){this.isBrowser&&(this._setupMask(!0),void 0!==this.textMaskInputElement&&this.textMaskInputElement.update(this.inputElement.value))}writeValue(O){this.isBrowser&&(this._setupMask(),this._renderer.setProperty(this.inputElement,"value",null===O?"":O),void 0!==this.textMaskInputElement&&this.textMaskInputElement.update(O))}registerOnChange(O){this.onChange=O}registerOnTouched(O){this.onTouched=O}setDisabledState(O){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",O)}_handleInput(O){this.isBrowser&&(!this._compositionMode||this._compositionMode&&!this._composing)&&(this._setupMask(),void 0!==this.textMaskInputElement&&(this.textMaskInputElement.update(O),this.onChange(O=this.inputElement.value)))}_setupMask(O=!1){this.isBrowser&&(this.inputElement||(this.inputElement="INPUT"===this._elementRef.nativeElement.tagName.toUpperCase()?this._elementRef.nativeElement:this._elementRef.nativeElement.getElementsByTagName("INPUT")[0]),this.inputElement&&O&&(this.textMaskInputElement=(0,D.createTextMaskInputElement)(Object.assign({inputElement:this.inputElement},this.textMaskConfig))))}_compositionStart(){this._composing=!0}_compositionEnd(O){this._composing=!1,this._compositionMode&&this._handleInput(O)}}return(h=I).\u0275fac=function(O){return new(O||h)(t.rXU(t.sFG),t.rXU(t.aKT),t.rXU(M.mP,8),t.rXU(t.Agw))},h.\u0275dir=t.FsC({type:h,selectors:[["","textMask",""]],hostBindings:function(O,y){1&O&&t.bIt("input",function(v){return y._handleInput(v.target.value)})("blur",function(){return y.onTouched()})("compositionstart",function(){return y._compositionStart()})("compositionend",function(v){return y._compositionEnd(v.target.value)})},inputs:{textMaskConfig:[0,"textMask","textMaskConfig"]},exportAs:["textMask"],features:[t.Jv_([u]),t.OA$]}),I})()},62464:(U,j,o)=>{o.d(j,{d:()=>t});var a=o(1351);function t(E,n,D){return(0,a.e)(E,-n,D)}},74646:(U,j,o)=>{o.d(j,{WX:()=>N});var a=o(36732),t=o(85240),M=o(12481),n=(o(99148),o(6423));const V=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/,C=/^(\d?\d)[:.](\d?\d)(?:[:.](\d?\d))?\s*(AM|PM)?$/i;function u(y,S){const v=Array(y);for(let l=0;l<y;l++)v[l]=S(l);return v}let P=(()=>{var y;class S extends n.D{constructor(){super(),(0,a.A)(this,"useUtcForDisplay",!1),(0,a.A)(this,"_matDateLocale",(0,t.WQX)(n.M,{optional:!0}));const l=(0,t.WQX)(n.M,{optional:!0});void 0!==l&&(this._matDateLocale=l),super.setLocale(this._matDateLocale)}getYear(l){return l.getFullYear()}getMonth(l){return l.getMonth()}getDate(l){return l.getDate()}getDayOfWeek(l){return l.getDay()}getMonthNames(l){const p=new Intl.DateTimeFormat(this.locale,{month:l,timeZone:"utc"});return u(12,x=>this._format(p,new Date(2017,x,1)))}getDateNames(){const l=new Intl.DateTimeFormat(this.locale,{day:"numeric",timeZone:"utc"});return u(31,p=>this._format(l,new Date(2017,0,p+1)))}getDayOfWeekNames(l){const p=new Intl.DateTimeFormat(this.locale,{weekday:l,timeZone:"utc"});return u(7,x=>this._format(p,new Date(2017,0,x+1)))}getYearName(l){const p=new Intl.DateTimeFormat(this.locale,{year:"numeric",timeZone:"utc"});return this._format(p,l)}getFirstDayOfWeek(){if(typeof Intl<"u"&&Intl.Locale){const l=new Intl.Locale(this.locale),p=(l.getWeekInfo?.()||l.weekInfo)?.firstDay??0;return 7===p?0:p}return 0}getNumDaysInMonth(l){return this.getDate(this._createDateWithOverflow(this.getYear(l),this.getMonth(l)+1,0))}clone(l){return new Date(l.getTime())}createDate(l,p,x){let k=this._createDateWithOverflow(l,p,x);return k.getMonth(),k}today(){return new Date}parse(l,p){return"number"==typeof l?new Date(l):l?new Date(Date.parse(l)):null}format(l,p){if(!this.isValid(l))throw Error("NativeDateAdapter: Cannot format invalid date.");const x=new Intl.DateTimeFormat(this.locale,{...p,timeZone:"utc"});return this._format(x,l)}addCalendarYears(l,p){return this.addCalendarMonths(l,12*p)}addCalendarMonths(l,p){let x=this._createDateWithOverflow(this.getYear(l),this.getMonth(l)+p,this.getDate(l));return this.getMonth(x)!=((this.getMonth(l)+p)%12+12)%12&&(x=this._createDateWithOverflow(this.getYear(x),this.getMonth(x),0)),x}addCalendarDays(l,p){return this._createDateWithOverflow(this.getYear(l),this.getMonth(l),this.getDate(l)+p)}toIso8601(l){return[l.getUTCFullYear(),this._2digit(l.getUTCMonth()+1),this._2digit(l.getUTCDate())].join("-")}deserialize(l){if("string"==typeof l){if(!l)return null;if(V.test(l)){let p=new Date(l);if(this.isValid(p))return p}}return super.deserialize(l)}isDateInstance(l){return l instanceof Date}isValid(l){return!isNaN(l.getTime())}invalid(){return new Date(NaN)}setTime(l,p,x,k){const $=this.clone(l);return $.setHours(p,x,k,0),$}getHours(l){return l.getHours()}getMinutes(l){return l.getMinutes()}getSeconds(l){return l.getSeconds()}parseTime(l,p){if("string"!=typeof l)return l instanceof Date?new Date(l.getTime()):null;const x=l.trim();if(0===x.length)return null;let k=this._parseTimeString(x);if(null===k){const $=x.replace(/[^0-9:(AM|PM)]/gi,"").trim();$.length>0&&(k=this._parseTimeString($))}return k||this.invalid()}addSeconds(l,p){return new Date(l.getTime()+1e3*p)}_createDateWithOverflow(l,p,x){const k=new Date;return k.setFullYear(l,p,x),k.setHours(0,0,0,0),k}_2digit(l){return("00"+l).slice(-2)}_format(l,p){const x=new Date;return x.setUTCFullYear(p.getFullYear(),p.getMonth(),p.getDate()),x.setUTCHours(p.getHours(),p.getMinutes(),p.getSeconds(),p.getMilliseconds()),l.format(x)}_parseTimeString(l){const p=l.toUpperCase().match(C);if(p){let x=parseInt(p[1]);const k=parseInt(p[2]);let $=null==p[3]?void 0:parseInt(p[3]);const J=p[4];
1if(12===x?x="AM"===J?0:x:"PM"===J&&(x+=12),s(x,0,23)&&s(k,0,59)&&(null==$||s($,0,59)))return this.setTime(this.today(),x,k,$||0)}return null}}return y=S,(0,a.A)(S,"\u0275fac",function(l){return new(l||y)}),(0,a.A)(S,"\u0275prov",t.jDH({token:y,factory:y.\u0275fac})),S})();function s(y,S,v){return!isNaN(y)&&y>=S&&y<=v}const h={parse:{dateInput:null,timeInput:null},display:{dateInput:{year:"numeric",month:"numeric",day:"numeric"},timeInput:{hour:"numeric",minute:"numeric"},monthYearLabel:{year:"numeric",month:"short"},dateA11yLabel:{year:"numeric",month:"long",day:"numeric"},monthYearA11yLabel:{year:"numeric",month:"long"},timeOptionLabel:{hour:"numeric",minute:"numeric"}}};let N=(()=>{var y;class S{}return y=S,(0,a.A)(S,"\u0275fac",function(l){return new(l||y)}),(0,a.A)(S,"\u0275mod",M.$C({type:y})),(0,a.A)(S,"\u0275inj",t.G2t({providers:[O()]})),S})();function O(y=h){return[{provide:n.D,useClass:P},{provide:n.a,useValue:y}]}},79325:(U,j,o)=>{o.d(j,{F:()=>a});class a{isErrorState(M,E){return M&&M.invalid&&M.touched}}},86521:(U,j,o)=>{o.d(j,{g:()=>C});var a=o(12481),t=o(93683);const M=(u,P)=>P.key;function E(u,P){if(1&u&&(a.j41(0,"span",0),a.EFF(1),a.k0s()),2&u){const s=a.XpG().$implicit,h=a.XpG(2);a.Y8G("ngClass",h.fieldErrorClass?h.fieldErrorClass:null),a.R7$(),a.Lme(" ",h.messageLabel?h.messageLabel+": ":"","",h.formErrors[h.fieldName][s.key]," ")}}function n(u,P){if(1&u&&a.nVh(0,E,2,3,"span",0),2&u){const s=P.$implicit,h=a.XpG(2);a.vxM(h.formErrors[h.fieldName][s.key]?0:-1)}}function D(u,P){if(1&u&&(a.j41(0,"div"),a.Z7z(1,n,1,1,null,null,M),a.k0s()),2&u){const s=a.XpG();a.R7$(),a.Dyx(s.fieldErrors)}}function V(u,P){if(1&u&&(a.j41(0,"div")(1,"span",0),a.EFF(2),a.k0s()()),2&u){const s=a.XpG();a.R7$(),a.Y8G("ngClass",s.fieldErrorClass?s.fieldErrorClass:null),a.R7$(),a.Lme(" ",s.messageLabel?s.messageLabel+": ":"","",s.formErrors[s.fieldName].message," ")}}let C=(()=>{var u;class P{constructor(){this.messageLabel=null,this.fieldErrorClass="field-error",this.showOne=!1}get fieldErrors(){const h=this.mainForm.get(this.fieldName),I=Object.keys(h?.errors)?.map(N=>({key:N}));return this.showOne?I?.slice(0,1):I}}return(u=P).\u0275fac=function(h){return new(h||u)},u.\u0275cmp=a.VBU({type:u,selectors:[["app-control-validation-messages"]],inputs:{mainForm:"mainForm",formErrors:"formErrors",fieldName:"fieldName",messageLabel:"messageLabel",fieldErrorClass:"fieldErrorClass",showOne:"showOne"},standalone:!1,decls:2,vars:2,consts:[[3,"ngClass"]],template:function(h,I){1&h&&(a.nVh(0,D,3,0,"div"),a.nVh(1,V,3,3,"div")),2&h&&(a.vxM(I.mainForm.get(I.fieldName).errors&&I.mainForm.get(I.fieldName).touched?0:-1),a.R7$(),a.vxM(I.formErrors[I.fieldName]&&!I.formErrors[I.fieldName].valid?1:-1))},dependencies:[t.YU],encapsulation:2}),P})()}}]); 2//# sourceMappingURL=5075.f768aeed85fa6a20.js.map
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.