1"use strict";(self.webpackChunkpc=self.webpackChunkpc||[]).push([[2618],{62618:(pe,G,r)=>{r.r(G),r.d(G,{RequeteModule:()=>gi});var j=r(24339),V=r(68570),D=r(62662),X=r(44955),Q=r(26180),k=r(66345),oe=r(36013),E=r(12424),$=r(48235),m=r(49823),f=r(51188),F=r(37084),be=r(72609),x=r(84572),e=r(54438),I=r(53387),T=r(71322),d=r(92995),Y=r(98377),ne=r(2042),v=r(26450),se=r(81018),ae=r(47746),M=r(9310),re=r(56977),le=r(59042),U=r(32102),J=r(88834),h=r(60177),z=r(81405),P=r(88974),fe=r(75824),Z=r(87748),De=r(73910);const me=i=>["/","utilisateur",i],Fe=i=>({"filter-searche-global-active":i}),Ue=(i,a,n)=>["/",i,a,n],Ge=i=>({"background-color":i});function Ve(i,a){1&i&&e.nrm(0,"vplus-loading-spinner")}function Xe(i,a){1&i&&(e.j41(0,"th",28),e.pXf(1,1),e.k0s())}function Qe(i,a){if(1&i){const n=e.RV6();e.j41(0,"td",29)(1,"a",30),e.bIt("click",function(){const o=e.eBV(n).$implicit,s=e.XpG();return e.Njj(s.redirectByStatusType(o))}),e.EFF(2),e.k0s()()}if(2&i){const n=a.$implicit;e.R7$(2),e.JRh(n.titre)}}function ke(i,a){1&i&&(e.j41(0,"th",28),e.pXf(1,2),e.k0s())}function je(i,a){if(1&i&&(e.j41(0,"td",29)(1,"div",31),e.nrm(2,"span",32),e.EFF(3),e.k0s()()),2&i){const n=a.$implicit;e.R7$(2),e.Y8G("ngStyle",e.eq3(2,Ge,n.statutCouleur)),e.R7$(),e.SpI("\xa0 ",n.statutNom," ")}}function xe(i,a){1&i&&(e.j41(0,"th",28),e.pXf(1,3),e.k0s())}function ze(i,a){if(1&i&&(e.j41(0,"td",29),e.EFF(1),e.nI1(2,"vplusMoment"),e.k0s()),2&i){const n=a.$implicit;e.R7$(),e.SpI(" ",e.bMT(2,1,n.dateModificationStatut),"")}}function We(i,a){1&i&&(e.j41(0,"th",28),e.pXf(1,4),e.k0s())}function qe(i,a){if(1&i&&(e.j41(0,"td",29),e.EFF(1),e.k0s()),2&i){const n=a.$implicit;e.R7$(),e.SpI(" ",n.categorieNom,"")}}function we(i,a){1&i&&(e.j41(0,"th",28),e.pXf(1,5),e.k0s())}function Be(i,a){if(1&i&&(e.j41(0,"td",29),e.EFF(1),e.nI1(2,"date"),e.k0s()),2&i){const n=a.$implicit;e.R7$(),e.SpI(" ",e.i5U(2,1,n.dateCreation,"shortDate"),"")}}function He(i,a){1&i&&e.nrm(0,"tr",33)}function Ye(i,a){1&i&&e.nrm(0,"tr",34)}function Je(i,a){1&i&&e.nrm(0,"app-copyright-footer")}let Ze=(()=>{var i;class a extends be.dI{constructor(){super(),this.EnumTypeWiIds=d.Op,this.displayedColumns=["titre","statutNom","dateModificationStatut","categorieNom","dateCreation"],this.dataLoaded=!1,this.requeteService=(0,e.WQX)(ae.t),this.store=(0,e.WQX)(M.il),this.route=(0,e.WQX)(f.nX),this.router=(0,e.WQX)(f.Ix),this.localisationService=(0,e.WQX)(Y.A),this.appMetaTags=(0,e.WQX)(F.W),this.platform=(0,e.WQX)(se.OD),this.selectIsSearchHeaderVisible$=this.store.select(m.selectIsSearchHeaderVisible),this.isMobile=this.platform.is("mobileweb")||this.platform.is("ios")||this.platform.is("android")}onContentClick(){this.store.dispatch(m.Actions.setIsSearchHeaderVisible({payload:!1}))}ionViewWillEnter(){this.wiType=this.route.snapshot.data.module===I.AL.Requete||this.route.snapshot.data.module===I.AL.Entreprise&&this.route._routerState.snapshot.url.split("/").includes("requete")?d.Op.Requete:d.Op.Permis,this.fromOrganisation="1"===this.route.snapshot.queryParams.organisation,this.appMetaTags.updateMetaTags(this.wiType===d.Op.Requete?"Requ\xEAtes":"Permis"),this.dataLoaded=!1,this.title=this.wiType===d.Op.Requete?"Toutes les requ\xEAtes":"Toutes les demandes de permis",this.filterPlaceholder=this.wiType===d.Op.Requete?"Ex: Titre de la requ\xEAte...":"Ex: Titre de la demande de permis",this.requeteService.fetchWorkItemListByReqId(this.fromOrganisation?T.jX.Organisation:T.jX.Citoyen,this.wiType).pipe((0,re.Q)(this.destroy$)).subscribe(t=>{this.store.dispatch($.En.setWorkitemAllList({payload:null==t?void 0:t.affectations})),this.dataLoaded=!0}),(0,x.z)([this.store.select($.Yd),this.store.select($.PD)]).pipe((0,re.Q)(this.destroy$)).subscribe(([t,o])=>{t.forEach(s=>{var l,c,_;const C=null===(l=o.find(p=>p.statutId===s.statutId))||void 0===l?void 0:l.statusLocalisations;s.statutNom=(null===(c=C.find(p=>p.lclzTag===this.localisationService.getCurrentLocalisation()))||void 0===c?void 0:c.statusNom)||(null===(_=C.find(p=>p.lclzTag!==this.localisationService.getCurrentLocalisation()))||void 0===_?void 0:_.statusNom)}),t=(t=t.filter(s=>o.find(l=>l.statutId===s.statutId).statCatId!==T.wx.Brouillon)).map(s=>(s.isBrouillonCitoyen=!1,o.find(l=>l.statutId===s.statutId).statCatId===T.wx.BrouillonCitoyen&&(s.isBrouillonCitoyen=!0),s)),this.dataSource=new v.I6(t),this.dataSource.sort=this.sort})}applyFilter(t){this.dataSource.filter=t.target.value.trim().toLowerCase()}redirectByStatusType(t){const o=t.isBrouillonCitoyen?["/",this.wiType===d.Op.Requete?"requete":"permis","poursuite",t.no]:["/",this.wiType===d.Op.Requete?"requete":"permis",t.no];this.store.dispatch(E.setCurrentCategorie({payload:{categorieId:t.categorieId,sousCategorieId:t.sousCategorieId}})),this.store.dispatch(E.setCurrentWorkitem({payload:t})),this.router.navigate(o,{queryParams:this.fromOrganisation?{organisation:1}:{}})}}return(i=a).\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.VBU({type:i,selectors:[["vplus-liste-affectation"]],viewQuery:function(t,o){if(1&t&&e.GBs(ne.B4,7),2&t){let s;e.mGM(s=e.lsd())&&(o.sort=s.first)}},features:[e.Vt3],decls:38,vars:26,consts:()=>{let n,t,o,s,l,c;return n="Filtrer",t="Titre",o="Statut",s="Modif. du statut",l="C
1at\xE9gorie",c="Date de cr\xE9ation",[n,t,o,s,l,c,[1,"hide-desktop","mobile-header",3,"headerTitle","defaultHref","returnButtonType","menuId"],["id","toutesLesRequetes","scrollEvents","true",3,"click","ngClass"],[1,"main-page-container"],[1,"standard-page-content"],[4,"ngIf"],[3,"hidden"],[1,"requete-title"],["mat-icon-button","",3,"routerLink"],[1,"icon-left-arrow"],[1,"full-width","table-filter"],["autocomplete","off","matInput","",3,"keyup","placeholder"],[1,"responsive-table-stroked"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","titre"],["mat-sort-header","","mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","statutNom"],["matColumnDef","dateModificationStatut"],["matColumnDef","categorieNom"],["matColumnDef","dateCreation"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-sort-header","","mat-header-cell",""],["mat-cell",""],["ngClass","link-pointer",3,"click"],[1,"statut-cell"],[1,"statut-cercle",3,"ngStyle"],["mat-header-row",""],["mat-row",""]]},template:function(t,o){1&t&&(e.nrm(0,"vplus-mobile-header",6),e.j41(1,"ion-content",7),e.nI1(2,"async"),e.bIt("click",function(){return o.onContentClick()}),e.j41(3,"div",8)(4,"div",9),e.DNE(5,Ve,1,0,"vplus-loading-spinner",10),e.j41(6,"div",11)(7,"div",12)(8,"h3")(9,"button",13),e.nrm(10,"i",14),e.k0s(),e.EFF(11),e.k0s()(),e.j41(12,"mat-form-field",15)(13,"mat-label"),e.pXf(14,0),e.k0s(),e.j41(15,"input",16),e.bIt("keyup",function(l){return o.applyFilter(l)}),e.k0s()(),e.j41(16,"div",17)(17,"table",18),e.qex(18,19),e.DNE(19,Xe,2,0,"th",20)(20,Qe,3,1,"td",21),e.bVm(),e.qex(21,22),e.DNE(22,ke,2,0,"th",20)(23,je,4,4,"td",21),e.bVm(),e.qex(24,23),e.DNE(25,xe,2,0,"th",20)(26,ze,3,3,"td",21),e.bVm(),e.qex(27,24),e.DNE(28,We,2,0,"th",20)(29,qe,2,1,"td",21),e.bVm(),e.qex(30,25),e.DNE(31,we,2,0,"th",20)(32,Be,3,4,"td",21),e.bVm(),e.DNE(33,He,1,0,"tr",26)(34,Ye,1,0,"tr",27),e.k0s()(),e.nrm(35,"br")(36,"br"),e.k0s()(),e.DNE(37,Je,1,0,"app-copyright-footer"),e.k0s()()),2&t&&(e.Y8G("headerTitle","")("defaultHref",e.eq3(16,me,o.wiType===o.EnumTypeWiIds.Requete?"requete":"permis"))("returnButtonType","back-button")("menuId","toutesLesRequetes"),e.R7$(),e.Y8G("ngClass",e.eq3(18,Fe,e.bMT(2,14,o.selectIsSearchHeaderVisible$))),e.R7$(4),e.Y8G("ngIf",!o.dataLoaded),e.R7$(),e.Y8G("hidden",!o.dataLoaded),e.R7$(3),e.Y8G("routerLink",o.isMobile?e.eq3(20,me,o.wiType===o.EnumTypeWiIds.Requete?"requete":"permis"):e.sMw(22,Ue,o.fromOrganisation?"organisation":"utilisateur",o.fromOrganisation?"admin":"profil",o.wiType===o.EnumTypeWiIds.Requete?"requete":"permis")),e.R7$(2),e.SpI(" ",o.title," "),e.R7$(4),e.Y8G("placeholder",o.filterPlaceholder),e.R7$(2),e.Y8G("dataSource",o.dataSource),e.R7$(16),e.Y8G("matHeaderRowDef",o.displayedColumns),e.R7$(),e.Y8G("matRowDefColumns",o.displayedColumns),e.R7$(3),e.vxM(37,o.isMobile?-1:37))},dependencies:[ne.B4,ne.aE,v.Zl,v.tL,v.ji,v.cC,v.YV,v.iL,v.KS,v.$R,v.YZ,v.NB,le.fg,U.rl,U.nJ,J.iY,h.YU,h.bT,h.B3,z.f,P.W9,P.N7,fe.N,Z.G,f.Wk,h.Jj,h.vh,De.x],styles:[".link-pointer[_ngcontent-%COMP%]{cursor:pointer}"]}),a})();const Te=(i,a)=>{var n,t;if((null==i||null===(n=i.wiEditeur)||void 0===n?void 0:n.currentStep)===T.Zj.Failed||(null==i||null===(t=i.wiEditeur)||void 0===t?void 0:t.currentStep)===T.Zj.Completed)return!0;const s=(a.data.module===I.AL.Requete?d.Op.Requete:d.Op.Permis)===d.Op.Requete?"Votre requ\xEAte en cours de cr\xE9ation sera perdue. \xCAtes-vous s\xFBr de vouloir quitter?":"Votre demande de permis en cours de cr\xE9ation sera perdue. \xCAtes-vous s\xFBr de vouloir quitter?",l=window.confirm(s);var c;return l&&(null==i||null===(c=i.wiEditeur)||void 0===c||c.onLeaveConfirmed()),l};var W=r(77339),q=r(35052),Se=r(61622),Ke=r(27468),u=r(89417),y=r(64075),_e=r(88141),et=r(25558),b=r(96697),S=r(89079),he=r(9454),tt=r(14823),it=r(1975),ot=r(84529);function nt(i,a){1&i&&(e.j41(0,"mat-error"),e.pXf(1,5),e.k0s())}function st(i,a){1&i&&(e.j41(0,"mat-error"),e.pXf(1,6),e.k0s())}function at(i,a){1&i&&(e.j41(0,"mat-error"),e.pXf(1,7),e.k0s())}function rt(i,a){1&i&&(e.j41(0,"mat-error"),e.pXf(1,8),e.k0s())}function lt(i,a){if(1&i){const n=e.RV6();e.j41(0,"div",16)(1,"h2",17),e.EFF(2),e.k0s(),e.j41(3,"p")(4,"span"),e.pXf(5,1),e.k0s(),e.EFF(6,"\xa0"),e.j41(7,"b"),e.EFF(8),e.k0s(),e.EFF(9,"\xa0"),e.j41(10,"span"),e.pXf(11,2),e.k0s(),e.EFF(12,"\xa0"),e.j41(13,"b"),e.EFF(14),e.k0s()(),e.j41(15,"p")(16,"span",18),e.bIt("click",function(){e.eBV(n);const o=e.XpG();return e.Njj(o.renvoyerCodeAccess())}),e.pXf(17,3),e.k0s()(),e.j41(18,"form",19),e.bIt("ngSubmit",function(){e.eBV(n);const o=e.XpG();return e.Njj(o.sendAccessCode())}),e.j41(19,"div",20)(20,"mat-form-field",21),e.nrm(21,"input",22),e.DNE(22,nt,2,0,"mat-error")(23,st,2,0,"mat-error")(24,at,2,0,"mat-error")(25,rt,2,0,"mat-error"),e.k0s(),e.j41(26,"div",23)(27,"ion-button",24)(28,"span"),e.pXf(29,4),e.k0s()()()()()()}if(2&i){const n=e.XpG();e.R7$(2),e.JRh(n.sectionTitre),e.R7$(6),e.JRh(n.citoyenCourriel),e.R7$(6),e.E5c("",n.affectationType.toLowerCase()," ",n.no," ",n.w
1Ino,"."),e.R7$(4),e.Y8G("formGroup",n.form),e.R7$(4),e.vxM(22,n.form.get("accessCode").hasError("required")?22:-1),e.R7$(),e.vxM(23,n.form.get("accessCode").hasError("minlength")?23:-1),e.R7$(),e.vxM(24,n.form.get("accessCode").hasError("invalid")?24:-1),e.R7$(),e.vxM(25,n.form.get("accessCode").hasError("unexpectedError")?25:-1)}}function _t(i,a){if(1&i){const n=e.RV6();e.j41(0,"div",38),e.bIt("click",function(){e.eBV(n);const o=e.XpG(3);return e.Njj(o.toggleChat(!0))}),e.nrm(1,"i",39),e.j41(2,"span"),e.pXf(3,10),e.k0s()()}}function ct(i,a){if(1&i&&(e.j41(0,"div",40),e.nrm(1,"i",41),e.j41(2,"span",42)(3,"span"),e.pXf(4,11),e.k0s(),e.EFF(5),e.nI1(6,"vplusCurrency"),e.j41(7,"span"),e.pXf(8,12),e.k0s()(),e.j41(9,"a",43),e.EFF(10),e.k0s()()),2&i){const n=e.XpG().$implicit,t=e.XpG(3);e.R7$(5),e.SpI("",e.i5U(6,3,n.total,t.currentLocalisation)," "),e.R7$(4),e.Y8G("href",n.squareInvoicePublicUrl,e.B4B),e.R7$(),e.JRh(t.notConnectedToSquare?t.labels.viewInvoice:t.labels.payHere)}}function dt(i,a){if(1&i&&e.DNE(0,ct,11,6,"div",40),2&i){const n=a.$implicit,t=e.XpG(3);e.vxM(0,n.total&&n.factureNumero&&n.statut===t.EnumStatutSquareIds.UNPAID&&n.squareInvoicePublicUrl?0:-1)}}function ut(i,a){if(1&i&&(e.j41(0,"div"),e.nrm(1,"vplus-affectation-permis",44),e.k0s()),2&i){const n=e.XpG(3);e.R7$(),e.Y8G("workItem",n.wi)("docOfficiels",n.docOfficiels)}}function Ct(i,a){if(1&i){const n=e.RV6();e.j41(0,"div",25)(1,"div",26)(2,"div")(3,"div")(4,"a",27),e.nrm(5,"i",28),e.EFF(6),e.k0s(),e.j41(7,"h1"),e.EFF(8),e.k0s()(),e.j41(9,"button",29),e.bIt("click",function(){e.eBV(n);const o=e.XpG(2);return e.Njj(o.toggleChat(!0))}),e.nrm(10,"i",30),e.k0s()(),e.j41(11,"div"),e.DNE(12,_t,4,0,"div",31),e.nrm(13,"vplus-affectation-informations",32),e.k0s(),e.Z7z(14,dt,1,1,null,null,e.Vm6),e.k0s(),e.j41(16,"div",33),e.DNE(17,ut,2,2,"div"),e.j41(18,"mat-expansion-panel",34,0)(20,"mat-expansion-panel-header",35)(21,"div",36)(22,"h2"),e.pXf(23,9),e.k0s(),e.nrm(24,"i"),e.k0s()(),e.nrm(25,"vplus-affectation-survey",37),e.k0s()()()}if(2&i){const n=e.sdS(19),t=e.XpG(2);e.R7$(6),e.E5c("",t.affectationType," ",t.no," ",t.wi.no,""),e.R7$(2),e.JRh(t.wi.titre),e.R7$(),e.Y8G("matBadge",t.wi.nbrMsgNonLuUsrClt>9?"9+":t.wi.nbrMsgNonLuUsrClt)("matBadgeHidden",0===t.wi.nbrMsgNonLuUsrClt),e.R7$(3),e.vxM(12,t.wi.nbrMsgNonLuUsrClt>0?12:-1),e.R7$(),e.Y8G("workItem",t.wi)("isNouveau",t.isNouveau)("isResolu",t.isResolu),e.R7$(),e.Dyx(t.wi.factures),e.R7$(3),e.vxM(17,t.wi.typeWiId===t.EnumTypeWiIds.Permis&&t.wi.etatPermis&&t.wi.etatPermis.etatId!==t.EnumEtatPermis.Cree?17:-1),e.R7$(),e.Y8G("expanded",!0),e.R7$(2),e.Y8G("collapsedHeight","fit-content")("expandedHeight","fit-content"),e.R7$(4),e.AVh("icon-chevron-down",!n.expanded)("icon-chevron-up",n.expanded),e.R7$(),e.Y8G("workItem",t.wi)}}function Et(i,a){if(1&i){const n=e.RV6();e.j41(0,"div",25)(1,"vplus-affectation-conversation",45),e.bIt("toogleChatEvent",function(o){e.eBV(n);const s=e.XpG(2);return e.Njj(s.toggleChat(o))}),e.k0s()()}if(2&i){const n=e.XpG(2);e.R7$(),e.Y8G("isResolu",n.isResolu)("workItem",n.wi)("affectationType",n.affectationType)("fromInvite",!0)("inviteAdminId",n.perId)}}function pt(i,a){if(1&i&&e.DNE(0,Ct,26,19,"div",25)(1,Et,2,5),2&i){const n=e.XpG();e.vxM(0,n.showChat?1:0)}}let ft=(()=>{var i;class a{constructor(){this.destroyRef=(0,e.WQX)(e.abz),this.requeteService=(0,e.WQX)(ae.t),this.route=(0,e.WQX)(f.nX),this.appMetaTags=(0,e.WQX)(F.W),this.fb=(0,e.WQX)(u.ok),this.store=(0,e.WQX)(M.il),this.router=(0,e.WQX)(f.Ix),this.localisationService=(0,e.WQX)(Y.A),this.appConfig=(0,e.WQX)(q.o),this.actions$=(0,e.WQX)(W.En),this.EnumTypeWiIds=d.Op,this.EnumEtatPermis=Se.kW,this.EnumStatutSquareIds=d.WJ,this.dataLoaded=!1,this.paramsReady=!1,this.notConnectedToSquare=!1,this.labels={payHere:"Payer ici",viewInvoice:"Voir la facture"},this.docOfficiels=[],this.isPermis=!1,this.no="n\xB0",this.selectIsSearchHeaderVisible$=this.store.select(m.selectIsSearchHeaderVisible),this.showChat=!1,this.backHref="/accueil",this.currentLocalisation=this.localisationService.getCurrentLocalisation()}ngOnInit(){var t,o;
1this.wiType=this.route.snapshot.data.module,this.isPermis=this.wiType===I.AL.Permis,this.appMetaTags.updateMetaTags(this.isPermis?"Consulter ma demande de permis":"Consulter ma requ\xEAte"),this.affectationId=this.route.snapshot.params.id,this.perId=this.route.snapshot.queryParams.perId,this.affectationType=this.isPermis?"Demande de permis":"Requ\xEAte",this.submitBtnText="Soumettre",this.sectionTitre=this.isPermis?"Consultation d'une demande de permis":"Consultation d'une requ\xEAte",this.route.queryParamMap.pipe((0,S.pQ)(this.destroyRef)).subscribe(s=>{if(this.showChat="1"===s.get("conversation"),this.showChat){const l=this.router.createUrlTree([],{relativeTo:this.route,queryParams:{conversation:null},queryParamsHandling:"merge"});this.backHref=l.toString()}else this.backHref="/accueil"}),this.form=this.fb.group({accessCode:["",[u.k0.required,u.k0.minLength(12)]]}),this.requeteService.getWIInfosWithAccessCode(this.affectationId,null,!1,this.perId).pipe((0,S.pQ)(this.destroyRef)).subscribe(s=>{this.citoyenCourriel=s.courrielMasque,this.wIno=s.no,this.paramsReady=!0}),this.actions$.pipe((0,W.gp)($.En.signerPermisSuccess),(0,S.pQ)(this.destroyRef)).subscribe(({dateSignatureReq:s,detailUrl:l})=>{var c;null!==(c=this.wi)&&void 0!==c&&c.etatPermis&&(this.wi={...this.wi,etatPermis:{...this.wi.etatPermis,dateSignatureReq:s,detailUrl:l}})}),(null===(t=this.appConfig.appConfig.configOAuthSquare)||void 0===t||!t.appId||null===(o=this.appConfig.appConfig.configOAuthSquare)||void 0===o||!o.locationId)&&(this.notConnectedToSquare=!0)}onContentClick(){this.store.dispatch(m.Actions.setIsSearchHeaderVisible({payload:!1}))}sendAccessCode(){this.form.invalid||this.requeteService.getWIInfosWithAccessCode(this.affectationId,this.form.get("accessCode").value,!0).pipe((0,_e.M)(t=>{var o;this.store.dispatch(E.setCurrentWorkitem({payload:t})),(null===(o=t.citoyen)||void 0===o||null===(o=o.telephones)||void 0===o?void 0:o.length)>0&&(t.citoyen.telephone=t.citoyen.telephones[0].numero),this.store.dispatch(E.setCurrentCitoyenSansCompte({payload:t.citoyen}))}),(0,et.n)(()=>(0,Ke.p)([this.store.select($.x8).pipe((0,b.s)(1)),this.store.select($.PD).pipe((0,b.s)(1))])),(0,S.pQ)(this.destroyRef)).subscribe(([t,o])=>{this.wi=t,this.isPermis&&this.manageDocOfficiels();const s=o.find(l=>l.statutId===t.statutId);this.isResolu=(null==s?void 0:s.statCatId)===T.wx.Ferme,this.isNouveau=(null==s?void 0:s.statCatId)===T.wx.Nouveau,this.dataLoaded=!0},t=>{this.form.get("accessCode").setErrors(403===t.status?{invalid:!0}:{unexpectedError:!0})})}manageDocOfficiels(){var t;if((null===(t=this.wi.etatPermis)||void 0===t?void 0:t.etatId)===Se.kW.Cree)return;let o=this.wi.surveyDocuments.filter(l=>l.name.startsWith("vplus_docOfficiel"));const s=(0,y.g5m)(this.wi.surveyModel,this.wi.surveyReponse,this.currentLocalisation,this.appConfig.defaultLocalisation);for(const l of s)o=o.map(c=>(c.name===l.name&&(c.title=l.fullTitle),c));this.docOfficiels=Object.values((0,y.$zQ)(o,"name"))}renvoyerCodeAccess(){this.requeteService.sendAccessCode(this.affectationId,this.perId).subscribe(t=>{"OK"===t.code?(this.router.navigate([`${this.wiType.toLowerCase()}/invite/`,this.affectationId],{queryParamsHandling:"preserve"}),this.store.dispatch(new m.Actions.ShowSnackBar("Un nouveau code d'acc\xE8s s\xE9curis\xE9 vous a \xE9t\xE9 envoy\xE9 \xE0 votre courriel."))):this.store.dispatch(new m.Actions.ShowSnackBar("Une erreur est survenue lors de la g\xE9n\xE9ration de votre code d'acc\xE8s. Veuillez r\xE9essayer plus tard.",m.EnumSnackBarType.Echec))})}toggleChat(t){this.router.navigate([],{relativeTo:this.route,queryParams:{conversation:t?1:null},queryParamsHandling:"merge"})}}return(i=a).\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.VBU({type:i,selectors:[["vplus-consulter-permis-invite"]],decls:6,vars:12,consts:()=>{let n,t,o,s,l,c,_,C,p,R,L,O,B,H;return n="Code d'acc\xE8s",t="Entrer le code d'acc\xE8s s\xE9curis\xE9 qui vous a \xE9t\xE9 envoy\xE9 \xE0",o="pour consulter votre",s="Envoyer \xE0 nouveau",l="Soumettre",c="Le code d'acc\xE8s est obligatoire",_="Le code d'acc\xE8s doit comporter 12 caract\xE8res",C="Le code d'acc\xE8s est invalide",p="Une erreur est survenue lors de la soumission",R="Messages",L="Questionnaire",O="Vous avez re\xE7u un nouveau message.",B="Un paiement de ",H=" est requis afin de compl\xE9ter la demande.",[["expansionPanel",""],t,o,s,l,c,_,C,p,L,O,B,H,["returnButtonType","back-button",1,"hide-desktop","mobile-header",3,"headerTitle","defaultHref","forceDefault","menuId"],["id","permisInviteDocuments","scrollEvents","true",3,"click"],[1,"main-page-container","affectation"],[1,"email-verification"],[1,"form-section-title"],[1,"resendCode",3,"click"],[1,"padding-bottom-12",3,"ngSubmit","formGroup"],[1,"auth-form-content"],[1,"full-width","margin-bottom-1"],["matInput","","type","text","autocomplete","one-time-code","formControlName","accessCode","placeholder",n,"maxlength","12"],[1,"auth-form-actions","margin-top-1"],["type","submit","expand","block",1,"ion-custom-button-full","ion-cu
1stom-button-standard"],[1,"animation-test"],[1,"affectation-header"],["routerLink","/accueil",1,"affectation-pre-title"],[1,"icon-arrow-left"],["matBadgeColor","warn","mat-icon-button","","color","primary","matTooltip",R,1,"secondary",3,"click","matBadge","matBadgeHidden"],[1,"icon-mail-full"],[1,"hint","primary","pointer-cursor"],[3,"workItem","isNouveau","isResolu"],[1,"affectation-content"],["hideToggle","true",1,"affectation-content-section",3,"expanded"],[3,"collapsedHeight","expandedHeight"],[1,"section-title","border-bottom"],[3,"workItem"],[1,"hint","primary","pointer-cursor",3,"click"],[1,"icon-mail"],[1,"hint","warn"],[1,"icon-shopping-cart"],[1,"hint-text"],["target","_blank",1,"underline","medium","nowrap",3,"href"],[3,"workItem","docOfficiels"],[3,"toogleChatEvent","isResolu","workItem","affectationType","fromInvite","inviteAdminId"]]},template:function(t,o){1&t&&(e.nrm(0,"vplus-mobile-header",13),e.j41(1,"ion-content",14),e.nI1(2,"async"),e.bIt("click",function(){return o.onContentClick()}),e.j41(3,"div",15),e.DNE(4,lt,30,10,"div",16)(5,pt,2,1),e.k0s()()),2&t&&(e.Y8G("headerTitle","")("defaultHref",o.backHref)("forceDefault",!0)("menuId","permisInviteDocuments"),e.R7$(),e.AVh("filter-searche-global-active",e.bMT(2,10,o.selectIsSearchHeaderVisible$)),e.R7$(2),e.AVh("padding",!o.showChat),e.R7$(),e.vxM(4,!o.dataLoaded&&o.paramsReady?4:-1),e.R7$(),e.vxM(5,o.dataLoaded?5:-1))},dependencies:[he.GK,he.Z2,le.fg,U.rl,U.TL,J.iY,tt.oV,it.k,u.qT,u.me,u.BC,u.cb,u.tU,u.j4,u.JD,z.f,P.Jm,P.W9,P.oY,f.Wk,V.Z,X.W,D.n,Q.q,h.Jj,ot.a],styles:[".resendCode[_ngcontent-%COMP%]{color:var(--ion-color-primary, #3880ff)}.resendCode[_ngcontent-%COMP%]:hover{cursor:pointer}"]}),a})();var ge=r(10248),Ie=r(95066),g=r(60549),mt=r(5812),Tt=r.n(mt),K=r(5964),ee=r(26927),Ae=r(75574),St=r(95390),ht=r(51827);const Oe=(i,a)=>a.id;function gt(i,a){if(1&i){const n=e.RV6();e.j41(0,"div",8),e.bIt("click",function(){const o=e.eBV(n).$implicit,s=e.XpG(3);return s.clickCat(o),e.Njj(s.scrollToTop())}),e.nrm(1,"span",9),e.nI1(2,"safeHtml"),e.nrm(3,"i",10)(4,"ion-ripple-effect"),e.k0s()}if(2&i){const n=a.$implicit;e.R7$(),e.Y8G("innerHtml",e.bMT(2,1,n.nom),e.npT)}}function It(i,a){if(1&i&&e.Z7z(0,gt,5,3,"div",7,Oe),2&i){const n=e.XpG(2);e.Dyx(n.categorieFilteredList)}}function At(i,a){if(1&i){const n=e.RV6();e.j41(0,"div",8),e.bIt("click",function(){const o=e.eBV(n).$implicit,s=e.XpG(3);return s.clickSousCat(o),e.Njj(s.scrollToTop())}),e.nrm(1,"span",9),e.nI1(2,"safeHtml"),e.nrm(3,"i",10)(4,"ion-ripple-effect"),e.k0s()}if(2&i){const n=a.$implicit;e.R7$(),e.Y8G("innerHtml",e.bMT(2,1,n.nom),e.npT)}}function Ot(i,a){if(1&i){const n=e.RV6();e.j41(0,"div",11),e.bIt("click",function(){e.eBV(n);const o=e.XpG(2);return o.back(),e.Njj(o.scrollToTop())}),e.nrm(1,"i",12)(2,"span",9),e.nI1(3,"safeHtml"),e.nrm(4,"ion-ripple-effect"),e.k0s(),e.Z7z(5,At,5,3,"div",7,Oe),e.j41(7,"div",13)(8,"button",14),e.bIt("click",function(){e.eBV(n);const o=e.XpG(2);return o.back(),e.Njj(o.scrollToTop())}),e.pXf(9,1),e.k0s()()}if(2&i){const n=e.XpG(2);e.R7$(2),e.Y8G("innerHtml",e.bMT(3,1,n.selectedCategorie.nom),e.npT),e.R7$(3),e.Dyx(n.sousCategorieFilteredList)}}function Nt(i,a){if(1&i&&(e.j41(0,"div",15),e.nrm(1,"span",9),e.nI1(2,"safeHtml"),e.nrm(3,"ion-ripple-effect"),e.k0s()),2&i){const n=e.XpG(3);e.R7$(),e.Y8G("innerHtml",e.bMT(2,1,n.selectedSousCategorie.nom),e.npT)}}function Pt(i,a){if(1&i){const n=e.RV6();e.j41(0,"button",19),e.bIt("click",function(){e.eBV(n);const o=e.XpG(3);return e.Njj(o.submit())}),e.pXf(1,3),e.k0s()}}function vt(i,a){if(1&i){const n=e.RV6();e.j41(0,"div",11),e.bIt("click",function(){e.eBV(n);const o=e.XpG(2);return o.back(),e.Njj(o.scrollToTop())}),e.nrm(1,"i",12)(2,"span",9),e.nI1(3,"safeHtml"),e.nrm(4,"ion-ripple-effect"),e.k0s(),e.DNE(5,Nt,4,3,"div",15),e.j41(6,"div"),e.nrm(7,"vplus-froala-container",16,0),e.k0s(),e.j41(9,"div",17)(10,"button",14),e.bIt("click",function(){e.eBV(n);const o=e.XpG(2);return o.back(),e.Njj(o.scrollToTop())}),e.pXf(11,2),e.k0s(),e.DNE(12,Pt,2,0,"button",18),e.k0s()}if(2&i){const n=e.XpG(2);e.AVh("selected",0===n.sousCategorieFilteredList.length),e.R7$(2),e.Y8G("innerHtml",e.bMT(3,6,n.selectedCategorie.nom),e.npT),e.R7$(3),e.vxM(5,n.selectedSousCategorie?5:-1),e.R7$(2),e.Y8G("content",n.selectedCatDescription),e.R7$(5),e.vxM(12,n.isQuestionnaireStartDisabled?-1:12)}}function Rt(i,a){if(1&i&&(e.j41(0,"div")(1,"h1"),e.EFF(2),e.k0s(),e.nrm(3,"vplus-froala-container",6),e.DNE(4,It,2,0)(5,Ot,10,3)(6,vt,13,8),e.k0s()),2&i){const n=e.XpG();e.R7$(2),e.JRh(n.title),e.R7$(),e.Y8G("content",n.intro.contenu),e.R7$(),e.vxM(4,n.c
1ategorieForm.get("categorieId").value&&n.selectedCategorie?-1:4),e.R7$(),e.vxM(5,n.categorieForm.get("categorieId").value&&!n.categorieForm.get("sousCategorieId").value&&n.sousCategorieFilteredList.length>1?5:-1),e.R7$(),e.vxM(6,n.selectedCategorie&&n.categorieForm.get("categorieId").value&&(n.categorieForm.get("sousCategorieId").value||n.sousCategorieFilteredList.length<2)?6:-1)}}let Mt=(()=>{var i;class a{constructor(){this.fb=(0,e.WQX)(u.ok),this.store=(0,e.WQX)(M.il),this.route=(0,e.WQX)(f.nX),this.location=(0,e.WQX)(h.aZ),this.router=(0,e.WQX)(f.Ix),this.ionContent=(0,e.WQX)(P.W9),this.appConfig=(0,e.WQX)(q.o),this.localisationService=(0,e.WQX)(Y.A),this.destroyRef=(0,e.WQX)(e.abz),this.EnumTypeWiIds=d.Op,this.currentCategorie$=this.store.select(g.Pg),this.updateCategorieAction=E.setCurrentCategorie,this.renderFormContent=!1,this.sousCategorieFilteredList=[],this.selectedCategorie=null,this.selectedSousCategorie=null,this.isQuestionnaireStartDisabled=!1,this.localisation=this.localisationService.getCurrentLocalisation(),this.introList=[],this.fromOrganisation="1"===this.route.snapshot.queryParams.organisation,this.rawIntroList=[],this.rawCategorieList=[]}ngOnInit(){this.route.snapshot.data.module===I.AL.Requete||this.route.snapshot.data.module===I.AL.Entreprise&&this.route._routerState.snapshot.url.split("/").includes("requete")?(this.wiType=d.Op.Requete,this.modId=I.Zs.Requete):(this.wiType=d.Op.Permis,this.modId=I.Zs.Permis),this.wiTypeUrlPart=this.wiType===d.Op.Requete?"requete":"permis",this.title=this.wiType===d.Op.Requete?"Requ\xEAte":"Demande de permis",this.categorieForm=this.fb.group({categorieId:[null,u.k0.required],sousCategorieId:[null,u.k0.required]}),this.route.queryParamMap.pipe((0,S.pQ)(this.destroyRef)).subscribe(t=>{this.term=t.get("term"),this.applyHighlights()}),this.store.select(g.H).pipe((0,S.pQ)(this.destroyRef)).subscribe(t=>{this.rawIntroList=t,this.applyHighlights()}),this.store.select(g.ci).pipe((0,b.s)(1)).subscribe(t=>{this.rawCategorieList=t.filter(o=>o.actif&&!o.limitCreationByApplicant&&o.typeWiId===this.wiType&&(o.surveyModel||o.sousCategorieList.some(s=>s.actif&&!s.limitCreationByApplicant&&s.surveyModel))),this.applyHighlights()}),this.categorieForm.controls.categorieId.valueChanges.pipe((0,S.pQ)(this.destroyRef)).subscribe(t=>{var o,s,l,c;this.selectedCategorie=t?this.categorieFilteredList.find(_=>_.id===t):null,this.sousCategorieFilteredList=null!==(o=null===(s=this.selectedCategorie)||void 0===s?void 0:s.sousCategorieList.filter(_=>_.actif&&!_.limitCreationByApplicant&&_.surveyModel))&&void 0!==o?o:[],this.selectedCategorie||(this.categorieForm.get("sousCategorieId").setValue(null),this.selectedSousCategorie=null),0===this.sousCategorieFilteredList.length?(this.selectedCatDescription=null===(l=this.selectedCategorie)||void 0===l?void 0:l.description,this.isQuestionnaireStartDisabled=!(null===(c=this.selectedCategorie)||void 0===c||!c.disableQuestionnaireStart),this.categorieForm.get("sousCategorieId").clearValidators()):(this.selectedCatDescription=null,this.isQuestionnaireStartDisabled=!1,this.categorieForm.get("sousCategorieId").setValidators([u.k0.required]),this.categorieForm.get("sousCategorieId").reset())}),this.categorieForm.controls.sousCategorieId.valueChanges.pipe((0,S.pQ)(this.destroyRef),(0,K.p)(t=>!!t)).subscribe(t=>{var o,s;this.selectedSousCategorie=this.sousCategorieFilteredList.find(l=>l.id===t),this.selectedCatDescription=null===(o=this.selectedSousCategorie)||void 0===o?void 0:o.description,this.isQuestionnaireStartDisabled=!(null===(s=this.selectedSousCategorie)||void 0===s||!s.disableQuestionnaireStart)}),this.route.queryParams.pipe((0,S.pQ)(this.destroyRef)).subscribe(t=>this.loadFormByParam(t))}applyHighlights(){this.introList=this.rawIntroList.map(t=>({...t,contenu:(0,ee.g)(t.contenu,this.term)})),this.intro=this.introList.find(t=>t.modId===this.modId&&t.lclzTag===this.localisation),this.categorieFilteredList=this.rawCategorieList.map(t=>({...t,nom:(0,ee.g)(t.nom,this.term),description:(0,ee.g)(t.description,this.term),sousCategorieList:t.sousCategorieList.map(o=>({...o,nom:(0,ee.g)(o.nom,this.term)}))}
1))}loadFormByParam(t){const o=t.cat,s=o&&this.categorieFilteredList.find(l=>this.sanitizeCatNom(l.nom)===o);o&&s?setTimeout(()=>{this.categorieForm.get("categorieId").patchValue(s.id);const l=t.souscat,c=l&&this.sousCategorieFilteredList.find(_=>this.sanitizeCatNom(_.nom)===l);c?this.categorieForm.get("sousCategorieId").patchValue(c.id):1===this.sousCategorieFilteredList.length&&this.clickSousCat(this.sousCategorieFilteredList[0]),this.renderFormContent=!0}):this.renderFormContent=!0}clickCat(t){this.categorieForm.get("categorieId").patchValue(t.id),this.location.replaceState(`/${this.wiTypeUrlPart}`,`cat=${this.sanitizeCatNom(t.nom)}${this.fromOrganisation?"&organisation=1":""}`),1===this.sousCategorieFilteredList.length&&this.clickSousCat(this.sousCategorieFilteredList[0])}clickSousCat(t){this.categorieForm.get("sousCategorieId").patchValue(t.id),this.location.replaceState(`/${this.wiTypeUrlPart}`,`cat=${this.sanitizeCatNom(this.selectedCategorie.nom)}&souscat=${this.sanitizeCatNom(t.nom)}${this.fromOrganisation?"&organisation=1":""}`)}sanitizeCatNom(t){return Tt()(t.replace(/<[^>]*>/g,""),{lower:!0,strict:!0})}back(){this.categorieForm.get("sousCategorieId").value&&this.sousCategorieFilteredList.length>1?(this.categorieForm.get("sousCategorieId").patchValue(null),this.location.replaceState(`/${this.wiTypeUrlPart}`,`cat=${this.sanitizeCatNom(this.selectedCategorie.nom)}${this.fromOrganisation?"&organisation=1":""}`)):(this.categorieForm.get("categorieId").value||1===this.sousCategorieFilteredList.length)&&(this.categorieForm.get("categorieId").patchValue(null),this.location.replaceState(`/${this.wiTypeUrlPart}`,this.fromOrganisation?"?organisation=1":""))}submit(){const t=this.selectedCategorie?this.sanitizeCatNom(this.selectedCategorie.nom):null,o=this.selectedSousCategorie?this.sanitizeCatNom(this.selectedSousCategorie.nom):null;this.router.navigate([this.wiTypeUrlPart,"creation"],{queryParams:{invite:null,organisation:this.fromOrganisation?1:0,cat:t,souscat:o}})}scrollToTop(){this.ionContent.scrollToTop()}}return(i=a).\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.VBU({type:i,selectors:[["vplus-affectation-creation-categorie"]],decls:4,vars:6,consts:()=>{let n,t,o;return n=" Retour ",t=" Retour ",o=" Commencer ",[["froalaContainer",""],n,t,o,[1,"standard-page-content"],[1,"max-720",3,"formGroup","vplusSyncStore","vplusSyncAction"],[1,"responsive-padding-bottom",3,"content"],[1,"requete-categorie-button","ion-activatable","ripple-parent"],[1,"requete-categorie-button","ion-activatable","ripple-parent",3,"click"],[3,"innerHtml"],[1,"icon-chevron-right"],[1,"requete-categorie-button","requete-categorie-button-back","ion-activatable","ripple-parent",3,"click"],[1,"icon-chevron-left"],[1,"margin-top-2"],["type","button","mat-stroked-button","",1,"custom-button-standard","custom-button-stroked",3,"click"],[1,"requete-categorie-button","selected","ion-activatable","ripple-parent"],[1,"margin-top-2","margin-bottom-1",3,"content"],[1,"flex-space-between","margin-top-2"],["type","submit","mat-raised-button","",1,"custom-button-full","custom-button-standard","custom-button-stepper"],["type","submit","mat-raised-button","",1,"custom-button-full","custom-button-standard","custom-button-stepper",3,"click"]]},template:function(t,o){1&t&&(e.j41(0,"div",4)(1,"form",5),e.nI1(2,"async"),e.DNE(3,Rt,7,5,"div"),e.k0s()()),2&t&&(e.R7$(),e.Y8G("formGroup",o.categorieForm)("vplusSyncStore",e.bMT(2,4,o.currentCategorie$))("vplusSyncAction",o.updateCategorieAction),e.R7$(2),e.vxM(3,o.renderFormContent?3:-1))},dependencies:[J.$z,u.qT,u.cb,u.j4,Ae.Q,P.S7,St.m,h.Jj,ht.$n],styles:[".stepper-disabled .mat-horizontal-stepper-header{pointer-events:none!important}.mobile-request-spacing[_ngcontent-%COMP%]{padding:18px 18px 0}@media (min-width: 960px){.mobile-request-spacing[_ngcontent-%COMP%]{padding:0}} .sv-pageRoot>.sv_row>.sv_p_container>h4.sv_title-underline{margin-bottom:2rem;padding-bottom:1rem;padding-top:2rem;border-bottom:1px solid var(--divider-color);display:flex;align-items:center;font-size:1.3rem}@media (min-width: 600px){ .sv-pageRoot>.sv_row>.sv_p_container>h4.sv_title-underline{font-size:1.5rem}}@media (min-width: 1280px){ .sv-pageRoot>.sv_row>.sv_p_container>h4.sv_title-underline{font-size:1.6rem}}.save-draft-button[_ngcontent-%COMP%]{font-size:14px;margin-left:auto}@media (max-width: 768px){.save-draft-button[_ngcontent-%COMP%]{display:none!important}}.mobile-save-draft-button[_ngcontent-%COMP%]{font-size:14px;margin:auto;display:flex!important}@media (min-width: 769px){.mobile-save-draft-button[_ngcontent-%COMP%]{display:none!important}}.save-and-quit-container[_ngcontent-%COMP%]{padding-top:1vh}@media (min-width: 769px){.save-and-quit-container[_ngcontent-%COMP%]{display:none!important}}.showAllAffectations[_ngcontent-%COMP%]{margin-top:33px}.identification-title[_ngcontent-%COMP%]{font-size:1.4rem}@media (min-width: 600px){.identification-title[_ngcontent-%COMP%]{font-size:1.55rem}}",".standard-page-content[_ngcontent-%COMP%]{margin-bottom:48px}"]}),a})();function yt(i,a){1&i&&e.nrm(0,"vplus-affectation-creation-categorie")}function Lt(i,a){1&i&&e.nrm(0,"app-copyright-footer")}let $t=(()=>{var i;class a{constructor(){this.isLoaded=!1,this.returnButtonType="back-button",this.platform=(0,e.WQX)(se.OD),this.store=(0,e.WQX)(M.il),this.route=(0,e.WQX)(f.nX),this.appMetaTags=(0,e.WQX)(F.W),this.router=(0,e.WQX)(f.Ix),this.appConfig=(0,e.WQX)(q.o),this.selectIsSearchHeaderVisible$=this.store.select(m.selectIsSearchHeaderVisible),this.isMobile=this.platform.is("mobileweb")||this.platform.is("ios")||this.platform.is("android")}onContentClick(){this.store.dispatch(m.Actions.setIsSearchHeaderVisible({payload:!1}))}ionViewWillEnter(){this.shouldReuseRouteDefaultFn=this.router.routeReuseStrategy.shouldReuseRoute;
1const t=this.route.snapshot.data.module===I.AL.Requete?d.Op.Requete:d.Op.Permis,o=this.appConfig.appConfig.landingPageId;(o===ge.w.Requete&&t===d.Op.Requete||o===ge.w.Permis&&t===d.Op.Permis)&&(this.returnButtonType="home-button"),this.isLoaded=!0,this.appMetaTags.updateMetaTags(t===d.Op.Requete?"Nouvelle requ\xEAte":"Nouvelle demande de permis")}ionViewWillLeave(){this.isLoaded=!1,this.router.routeReuseStrategy.shouldReuseRoute=this.shouldReuseRouteDefaultFn}}return(i=a).\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.VBU({type:i,selectors:[["vplus-creation-affectation-categorie-container"]],decls:7,vars:8,consts:[["ionContent",""],["defaultHref","/requete","headerTitle","",1,"hide-desktop","mobile-header",3,"returnButtonType","menuId"],["ckdScrollableIonContent","","id","requeteCreationCategorie","scrollEvents","true",3,"click"],[1,"main-page-container"]],template:function(t,o){if(1&t){const s=e.RV6();e.nrm(0,"vplus-mobile-header",1),e.j41(1,"ion-content",2,0),e.nI1(3,"async"),e.bIt("click",function(){return e.eBV(s),e.Njj(o.onContentClick())}),e.j41(4,"div",3),e.DNE(5,yt,1,0,"vplus-affectation-creation-categorie")(6,Lt,1,0,"app-copyright-footer"),e.k0s()()}2&t&&(e.Y8G("returnButtonType",o.returnButtonType)("menuId","requeteCreationCategorie"),e.R7$(),e.AVh("filter-searche-global-active",e.bMT(3,6,o.selectIsSearchHeaderVisible$)),e.R7$(4),e.vxM(5,o.isLoaded?5:-1),e.R7$(),e.vxM(6,o.isMobile?-1:6))},dependencies:[z.f,P.W9,Ie.x,Z.G,Mt,h.Jj],encapsulation:2}),a})();var bt=r(2027),te=r(31397),w=r(96354),Dt=r(70980),Ft=r(99437),Ne=r(67376),ce=r(22806),Ut=r(7673),Pe=r(983),Gt=r(14819),ie=r(34006);let Vt=(()=>{var i;class a{constructor(t){this.data=t,this.fromOrganisation=!1,this.wiTypeId=d.Op.Requete,this.fromOrganisation=t.fromOrganisation,this.wiTypeId=t.wiTypeId,this.wiType=this.wiTypeId===d.Op.Requete?"requ\xEAte":"demande de permis"}ngOnInit(){this.menuName=this.fromOrganisation?"\xAB Mon organisation \xBB":"\xAB Mon profil \xBB",this.sectionName=this.fromOrganisation?this.wiTypeId===d.Op.Requete?"\xAB Requ\xEAtes de mon organisation \xBB":"\xAB Demandes de permis de mon organisation \xBB":this.wiTypeId===d.Op.Requete?"\xAB Mes requ\xEAtes \xBB":"\xAB Mes demandes de permis \xBB"}}return(i=a).\u0275fac=function(t){return new(t||i)(e.rXU(ie.Vh))},i.\u0275cmp=e.VBU({type:i,selectors:[["vplus-save-and-quit-dialog"]],decls:22,vars:6,consts:()=>{let n,t,o,s,l,c,_;return n="Quitter la",t="Vous \xEAtes sur le point de quitter l'interface de cr\xE9ation de votre",o="Notez que vous pourrez reprendre sa cr\xE9ation sous le menu",s="situ\xE9 en haut \xE0 droite de l'en-t\xEAte du Portail Citoyen et en acc\xE9dant \xE0 la section",l="\xCAtes-vous s\xFBr de vouloir quitter?",c=" Enregistrer et quitter ",_=" Annuler ",[n,t,o,s,l,c,_,[1,"form-section-title"],["mat-dialog-actions","",1,"dialog-buttons-section","save-and-quit-buttons-section","margin-bottom-0"],[1,"ion-custom-button-standard","ion-custom-button-full","margin-left-1",3,"mat-dialog-close"],["fill","outline","tabindex","1",1,"ion-custom-button-outline","ion-cu
1stom-button-standard","mr-10",3,"mat-dialog-close"]]},template:function(t,o){1&t&&(e.j41(0,"h2",7)(1,"span"),e.pXf(2,0),e.k0s(),e.EFF(3),e.k0s(),e.j41(4,"div")(5,"p")(6,"span"),e.pXf(7,1),e.k0s(),e.EFF(8),e.j41(9,"span"),e.pXf(10,2),e.k0s(),e.EFF(11),e.j41(12,"span"),e.pXf(13,3),e.k0s(),e.EFF(14),e.k0s()(),e.j41(15,"p"),e.pXf(16,4),e.k0s(),e.j41(17,"div",8)(18,"ion-button",9),e.pXf(19,5),e.k0s(),e.j41(20,"ion-button",10),e.pXf(21,6),e.k0s()()),2&t&&(e.R7$(3),e.SpI(" ",o.wiType,""),e.R7$(5),e.SpI(" ",o.wiType,". "),e.R7$(3),e.SpI(" ",o.menuName," "),e.R7$(3),e.SpI(" ",o.sectionName,". "),e.R7$(4),e.Y8G("mat-dialog-close",!0),e.R7$(2),e.Y8G("mat-dialog-close",!1))},dependencies:[ie.tx,ie.E7,P.Jm],encapsulation:2}),a})();var de=r(74508),Xt=r(32430),Qt=r(58820);const kt=["surveyRef"],jt=["stepper"],xt=["inputAdresseGoogle"];function zt(i,a){if(1&i&&e.EFF(0),2&i){const n=e.XpG();e.SpI(" - ",null==n.selectedSousCategorie?null:n.selectedSousCategorie.nom," ")}}function Wt(i,a){1&i&&e.nrm(0,"vplus-loading-spinner")}function qt(i,a){1&i&&(e.j41(0,"mat-error"),e.pXf(1,9),e.k0s())}function wt(i,a){1&i&&(e.j41(0,"mat-error"),e.pXf(1,10),e.k0s())}function Bt(i,a){1&i&&(e.j41(0,"mat-error"),e.pXf(1,11),e.k0s())}function Ht(i,a){if(1&i&&(e.j41(0,"mat-form-field")(1,"mat-label"),e.pXf(2,8),e.k0s(),e.nrm(3,"input",29),e.DNE(4,qt,2,0,"mat-error")(5,wt,2,0,"mat-error")(6,Bt,2,0,"mat-error"),e.k0s()),2&i){const n=e.XpG(3);e.R7$(3),e.Y8G("required",n.inviteConfig.isInviteCitoyenHasAddressRequired),e.R7$(),e.vxM(4,null!=n.citoyenSansCompteForm.controls.courriel.errors&&n.citoyenSansCompteForm.controls.courriel.errors.required?4:-1),e.R7$(),e.vxM(5,n.citoyenSansCompteForm.controls.courriel.hasError("invalidEmail")?5:-1),e.R7$(),e.vxM(6,n.citoyenSansCompteForm.controls.courriel.hasError("courrielUtilise")?6:-1)}}function Yt(i,a){1&i&&(e.j41(0,"mat-error"),e.pXf(1,13),e.k0s())}function Jt(i,a){1&i&&(e.j41(0,"mat-error"),e.pXf(1,14),e.k0s())}function Zt(i,a){if(1&i&&(e.j41(0,"mat-form-field")(1,"mat-label"),e.pXf(2,12),e.k0s(),e.nrm(3,"input",30),e.DNE(4,Yt,2,0,"mat-error")(5,Jt,2,0,"mat-error"),e.k0s()),2&i){const n=e.XpG(3);e.R7$(3),e.Y8G("required",n.inviteConfig.isInviteCitoyenHasPhoneRequired)("imask",n.appConfig.appConfig.telMaskObjet)("unmask",!0),e.R7$(),e.vxM(4,null!=n.citoyenSansCompteForm.controls.telephone.errors&&n.citoyenSansCompteForm.controls.telephone.errors.required?4:-1),e.R7$(),e.vxM(5,null!=n.citoyenSansCompteForm.controls.telephone.errors&&n.citoyenSansCompteForm.controls.telephone.errors.pattern?5:-1)}}function Kt(i,a){if(1&i){const n=e.RV6();e.j41(0,"div")(1,"form",21),e.nI1(2,"async"),e.j41(3,"div")(4,"div")(5,"h2",22),e.pXf(6,1),e.k0s()(),e.j41(7,"div",23)(8,"mat-form-field")(9,"mat-label"),e.pXf(10,2),e.k0s(),e.nrm(11,"input",24),e.j41(12,"mat-error"),e.pXf(13,3),e.k0s()(),e.j41(14,"mat-form-field")(15,"mat-label"),e.pXf(16,4),e.k0s(),e.nrm(17,"input",25),e.j41(18,"mat-error"),e.pXf(19,5),e.k0s()()(),e.j41(20,"div",23),e.DNE(21,Ht,7,4,"mat-form-field")(22,Zt,6,5,"mat-form-field"),e.k0s()(),e.j41(23,"div",26)(24,"button",27),e.bIt("click",function(){e.eBV(n);const o=e.XpG(2);return e.Njj(o.locationBack())}),e.pXf(25,6),e.k0s(),e.j41(26,"button",28),e.bIt("click",function(){e.eBV(n);const o=e.XpG(2);return e.Njj(o.validateIdentification())}),e.pXf(27,7),e.k0s()()()()}if(2&i){const n=e.XpG(2);e.R7$(),e.Y8G("formGroup",n.citoyenSansCompteForm)("vplusSyncStore",e.bMT(2,5,n.currentCitoyenSansCompte$))("vplusSyncAction",n.updateCitoyenSansCompteAction),e.R7$(20),e.vxM(21,n.inviteConfig.isInviteCitoyenHasAddress?21:-1),e.R7$(),e.vxM(22,n.inviteConfig.isInviteCitoyenHasPhone?22:-1)}}function ei(i,a){if(1&i){const n=e.RV6();e.j41(0,"vplus-surveyjs-requete",31,0),e.bIt("submitSurvey",function(o){e.eBV(n);const s=e.XpG(2);return e.Njj(s.submit(o))})("surveyChanged",function(o){e.eBV(n);const s=e.XpG(2);return e.Njj(s.surveyChanged(o))})("externalBack",function(){e.eBV(n);const o=e.XpG(2);return e.Njj(o.externalBack())})("documentAdded",function(o){e.eBV(n);const s=e.XpG(2);return e.Njj(s.setWorkitemDocuments(o))})("saveDraft",function(){e.eBV(n);const o=e.XpG(2);return e.Njj(o.saveDraftAndQuit())}),e.k0s()}if(2&i){const n=e.XpG(2);e.Y8G("json",n.surveymodel)("readOnly",!1)("catId",null==n.selectedCategorie?null:n.selectedCategorie.id)("reponses",n.surveyReponse)("isDraft",!0)("citoyenLoggedIn",
1n.citoyenLoggedIn)("hideValeurTerrainQuestion",!0)}}function ti(i,a){if(1&i){const n=e.RV6();e.j41(0,"div",20),e.nrm(1,"i",32),e.j41(2,"h3"),e.EFF(3),e.k0s(),e.j41(4,"p"),e.EFF(5),e.k0s(),e.j41(6,"ion-button",33),e.bIt("click",function(){e.eBV(n);const o=e.XpG(2);return e.Njj(o.back())}),e.EFF(7),e.k0s()()}if(2&i){const n=e.XpG(2);e.R7$(3),e.JRh(n.titleEnvoie),e.R7$(2),e.JRh(n.remerciementMsg),e.R7$(2),e.SpI(" ",n.getBackText()," ")}}function ii(i,a){if(1&i){const n=e.RV6();e.j41(0,"div",20),e.nrm(1,"i",32),e.j41(2,"h3"),e.pXf(3,15),e.k0s(),e.j41(4,"p"),e.EFF(5),e.k0s(),e.j41(6,"ion-button",33),e.bIt("click",function(){e.eBV(n);const o=e.XpG(2);return e.Njj(o.back())}),e.EFF(7),e.k0s()()}if(2&i){const n=e.XpG(2);e.R7$(5),e.JRh(n.erreurMsg),e.R7$(2),e.SpI(" ",n.getBackText()," ")}}function oi(i,a){if(1&i&&(e.j41(0,"div",17),e.DNE(1,Kt,28,7,"div"),e.j41(2,"div",18),e.DNE(3,ei,2,7,"vplus-surveyjs-requete",19),e.k0s(),e.DNE(4,ti,8,3,"div",20)(5,ii,8,2,"div",20),e.k0s()),2&i){const n=e.XpG();e.R7$(),e.vxM(1,n.currentStep===n.EnumCreationStep.Identification?1:-1),e.R7$(2),e.Y8G("loadLockIf",n.currentStep===n.EnumCreationStep.Survey),e.R7$(),e.vxM(4,n.currentStep!==n.EnumCreationStep.Completed||n.isDraft?-1:4),e.R7$(),e.vxM(5,n.currentStep!==n.EnumCreationStep.Failed||n.isDraft?-1:5)}}let ni=(()=>{var i;class a{constructor(){this.surveyReponse={},this.isDraft=!1,this.EnumTypeWiIds=d.Op,this.EnumCreationStep=T.Zj,this.updateCitoyenSansCompteAction=E.setCurrentCitoyenSansCompte,this.surveyDocuments=[],this.statutList=[],this.pendingDeleteFiles=new Set,this.completedStepFormArray=[],this.selectedIndex=0,this.loading=!1,this.citoyenLoggedIn=!1,this.isEditing=!1,this.store=(0,e.WQX)(M.il),this.appConfig=(0,e.WQX)(q.o),this.route=(0,e.WQX)(f.nX),this.asyncCourrielValidators=(0,e.WQX)(k.H),this.router=(0,e.WQX)(f.Ix),this.location=(0,e.WQX)(h.aZ),this.actions$=(0,e.WQX)(W.En),this.dialog=(0,e.WQX)(ie.bZ),this.destroyRef=(0,e.WQX)(e.abz),this.fileService=(0,e.WQX)(Gt.E),this.localisationService=(0,e.WQX)(Y.A),this.adresseResidenceStorageService=(0,e.WQX)(bt.Q)}ngOnInit(){this.adresseResidenceStorageService.removeAddress(),this.isEditing=this.route.snapshot.url.some(s=>"poursuite"===s.path),this.wiType=this.route.snapshot.data.module===I.AL.Requete?d.Op.Requete:d.Op.Permis,this.inviteConfig=this.resolveInviteConfig(),this.fromOrganisation="1"===this.route.snapshot.queryParams.organisation,this.titleEnvoie=this.wiType===d.Op.Requete?"Requ\xEAte envoy\xE9e !":"Demande de permis envoy\xE9e !",this.remerciementMsg=this.wiType===d.Op.Requete?"Merci de nous avoir contact\xE9. Votre requ\xEAte a bien \xE9t\xE9 transmise.":"Merci de nous avoir contact\xE9. Votre demande de permis a bien \xE9t\xE9 transmise.",this.erreurMsg=this.wiType===d.Op.Requete?"Une erreur est survenue lors de la soumission de votre requ\xEAte.":"Une erreur est survenue lors de la soumission de votre demande de permis",this.store.select(m.selectCurrentUser).pipe((0,b.s)(1)).subscribe(s=>{s||"1"!==this.route.snapshot.queryParams.invite?(this.context=T.n6.AvecCompte,this.currentStep=T.Zj.Survey):(this.context=T.n6.SansCompte,this.currentStep=T.Zj.Identification),this.initForms();const l=null==s?void 0:s.adresses[0];null!=l&&l.adresse&&this.adresseResidenceStorageService.updateAddress(l.adresse,l.adresseProvenanceId)}),(0,x.z)([this.store.select(g.ci),this.store.select(g.Pg),this.store.select(g.PD),this.store.select(m.selectIsLoggedIn)]).pipe((0,b.s)(1)).subscribe(([s,l,c,_])=>{var C;this.statutList=c,this.currentCatState=l,this.selectedCategorie=s.find(p=>p.id===l.categorieId&&p.actif&&!p.limitCreationByApplicant&&p.typeWiId===this.wiType),this.selectedSousCategorie=null===(C=this.selectedCategorie)||void 0===C?void 0:C.sousCategorieList.find(p=>p.id===l.sousCategorieId&&p.actif&&!p.limitCreationByApplicant),this.citoyenLoggedIn=_,this.brouillonCitoyenId=this.statutList.find(p=>p.statCatId===T.wx.BrouillonCitoyen&&p.typeWIId===this.wiType).statutId,this.selectedSousCategorie?(this.surveymodel=this.selectedSousCategorie.surveyModel,this.store.dispatch(E.setSurveyVersion({payload:this.selectedSousCategorie.surveyVersion}))):(this.surveymodel=this.selectedCategorie.surveyModel,this.store.dispatch(E.setSurveyVersion({payload:this.selectedCategorie.surveyVersion})))}),this.store.select(g.x8).pipe((0,S.pQ)(this.destroyRef),(0,re.Q)(this.router.events.pipe((0,K.p)(s=>s instanceof f.Z)))).subscribe(s=>{var l,c;s.no&&(!this.isEditing||this.brouillonCitoyenId&&s.statutId&&s.statutId!==this.brouillonCitoyenId)&&this.store.dispatch(E.resetCurrentWorkitem({payload:{type:this.wiType,fromOrganisation:this.fromOrganisation}})),this.currentWorkitemVW=(0,Ne.cloneDeep)(s),this.isEditing&&(null===(l=this.currentWorkitemVW.surveyDocuments)||void 0===l?void 0:l.length)>0&&0===(null===(c=this.surveyDocuments)||void 0===c?void 0:c.length)&&(this.surveyDocuments=this.currentWorkitemVW.surveyDocuments)}),this.currentCitoyenSansCompte$=this.store.select(g.K_),this.store.select(g.Rt).pipe((0,S.pQ)(this.destroyRef)).subscribe(s=>{s&&(this.currentStep=T.Zj.Completed)}),this.displayAddressNotFound=this.localisationService.getCurrentLocalisation()===d.fi.FR;const o=JSON.parse(this.surveyReponse);this.store.dispatch(E.setSurveyReponses({payload:o}))}ngAfterViewInit(){this.savedWorkItem=(0,Ne.cloneDeep)(this.currentWorkitemVW)}resolveInviteConfig(){const t=this.wiType===d.Op.Permis?this.appConfig.appConfig.citoyenInvitePermisForm:this.appConfig.appConfig.citoyenInviteReqForm;return null!=t?t:{isInviteCitoyenHasPhone:!0,isInviteCitoyenHasAddress:!0,isInviteCitoyenHasPhoneRequired:!1,isInviteCitoyenHasAddressRequired:!1}}initForms(){if(this.context===T.n6.SansCompte){const t=[(0,y.Bjz)()];this.inviteConfig.isInviteCitoyenHasAddressRequired&&t.push(u.k0.required);const o=[u.k0.pattern(this.appConfig.appConfig.telPattern)];this.inviteConfig.isInviteCitoyenHasPhoneRequired&&o.push(u.k0.required),this.citoyenSansCompteForm=new u.gE({id:new u.MJ(null),perId:new u.MJ(null),inscrit:new u.MJ(!1),invite:new u.MJ(!0),nom:new u.MJ("",u.k0.required),prenom:new u.MJ("",u.k0.required),courriel:new u.MJ("",t,this.asyncCourrielValidators.validateCourriel()),telephone:new u.MJ("",o),adresse:new u.MJ(null)}),this.citoyenSansCompteForm.controls.adresse.valueChanges.pipe((0,S.pQ)(this.destroyRef)).subscribe(s=>{s&&this.adresseResidenceStorageService.updateAddress(s)})}}setWorkitemDocuments(t){this.surveyDocuments.push(t),this.currentWorkitemVW.surveyDocuments=this.surveyDocuments}submit(t){var o;if(Array.isArray(null===(o=this.surveymodel)||void 0===o?void 0:o.pages)&&this.surveymodel.pages.some(_=>Array.isArray(_.elements)&&_.elements.length>0)&&null==t)return void this.store.dispatch(new m.Actions.ShowSnackBar("Une erreur est survenue lors de l'envoi de l'affectation. Veuillez r\xE9essayer.",m.EnumSnackBarType.Ec
1hec));this.pendingDeleteFiles=this.surveyRef.getPendingFileToDelete();const l=this.surveyRef.surveyModel.getAllQuestions().find(_=>_.name===y.QpI.ValeurTerrain);l&&t[y.QpI.Emplacement]&&t[y.QpI.Emplacement]!==y.orq&&(t[y.QpI.ValeurTerrain]=l.defaultValue),this.store.dispatch(E.setSurveyReponses({payload:t})),this.store.dispatch(E.setCurrentCategorie({payload:this.currentCatState})),this.surveyDocuments=this.getFilterDocumentsOfficiels(),(!this.isEditing||this.currentWorkitemVW.statutId!==this.brouillonCitoyenId)&&(this.currentWorkitemVW.wiId=null,this.currentWorkitemVW.no=null,this.currentWorkitemVW.id=null),this.currentWorkitemVW.statutId="";const c=this.getInfoChanges();this.store.dispatch(E.setCurrentWorkitem({payload:this.currentWorkitemVW})),this.store.dispatch(E.createCurrentWorkitem({payload:{surveyDocuments:this.surveyDocuments,infoModification:c,surveyReponses:t}})),this.actions$.pipe((0,W.gp)(E.createCurrentWorkitemSuccess,E.createCurrentWorkitemFailed),(0,b.s)(1),(0,K.p)(()=>!this.isDraft)).subscribe(_=>{_.type===E.createCurrentWorkitemSuccess.type?this.surveyRef.clearPendingDeletes():this.currentStep=T.Zj.Failed})}validateIdentification(){this.citoyenSansCompteForm.invalid?this.citoyenSansCompteForm.markAllAsTouched():this.currentStep=T.Zj.Survey}externalBack(){this.context===T.n6.SansCompte?this.currentStep=T.Zj.Identification:this.locationBack()}onLeaveConfirmed(){this.pendingDeleteFiles=this.surveyRef.getPendingFileToDelete(!0),(0,ce.H)(this.pendingDeleteFiles).pipe((0,S.pQ)(this.destroyRef),(0,te.Z)(t=>this.hardDeleteFile(t))).subscribe()}locationBack(){this.location.back()}back(){if(this.citoyenSansCompteForm)return void this.router.navigate(["accueil"]);const t=this.fromOrganisation?["organisation"]:["utilisateur"];window.innerWidth>=960&&t.push(this.fromOrganisation?"admin":"profil"),t.push(this.wiType===d.Op.Requete?"requete":"permis"),this.router.navigate(t)}getBackText(){return this.citoyenSansCompteForm?"Retour \xE0 l'accueil":this.wiType===d.Op.Requete?"Retour \xE0 mes requ\xEAtes":"Retour \xE0 mes demandes de permis"}getFilterDocumentsOfficiels(){const t=[];return this.surveyRef.surveyModel.getAllQuestions(!0).filter(s=>s.value&&("file"===s.getType()||"paneldynamic"===s.getType())).map(s=>s.value).forEach(s=>{Array.isArray(s)&&s.forEach(l=>{l.name?t.push(l.name):Object.values(l).forEach(_=>{Array.isArray(_)&&_.forEach(C=>{C.name&&t.push(C.name)})})})}),this.surveyDocuments.filter(s=>t.includes(s.fileName))}surveyChanged(t){this.store.dispatch(E.setSurveyReponses({payload:t})),this.surveyDocuments=this.getFilterDocumentsOfficiels()}saveDraftAndQuit(){this.pendingDeleteFiles=this.surveyRef.getPendingFileToDelete(),this.isDraft=!0,this.saveAndQuitDialogRef=this.dialog.open(Vt,{width:d.Uq.Medium,data:{fromOrganisation:this.fromOrganisation,wiTypeId:this.wiType}}),this.saveAndQuitDialogRef.afterClosed().pipe((0,S.pQ)(this.destroyRef)).subscribe(t=>{t?(this.store.dispatch(E.setCurrentCategorie({payload:this.currentCatState})),this.surveyDocuments=this.getFilterDocumentsOfficiels(),this.currentWorkitemVW.statutId=this.brouillonCitoyenId,this.currentWorkitemVW.surveyDocuments=this.surveyDocuments,this.store.dispatch(E.setCurrentWorkitem({payload:this.currentWorkitemVW})),this.loading=!0,this.store.dispatch(E.createCurrentWorkitem({payload:{surveyDocuments:this.surveyDocuments}}))):this.isDraft=!1}),this.actions$.pipe((0,W.gp)(E.createCurrentWorkitemSuccess,E.createCurrentWorkitemFailed),(0,b.s)(1),(0,_e.M)(()=>this.loading=!1),(0,K.p)(()=>this.isDraft),(0,te.Z)(t=>{if(t.type===E.createCurrentWorkitemSuccess.type){const o=this.wiType===d.Op.Requete?"Requ\xEAte enregistr\xE9e en brouillon avec succ\xE8s":"Demande de permis enregistr\xE9e en brouillon avec succ\xE8s";return this.store.dispatch(new m.Actions.ShowSnackBar(o)),(0,ce.H)(this.pendingDeleteFiles).pipe((0,te.Z)(s=>this.hardDeleteFile(s)),(0,w.T)(()=>t))}return(0,Ut.of)(t)}),(0,_e.M)(({type:t})=>{t===E.createCurrentWorkitemSuccess.type&&this.surveyRef.clearPendingDeletes()}),(0,Dt.j)(()=>{const t=this.fromOrganisation?["organisation"]:["utilisateur"];window.innerWidth>=960&&t.push(this.fromOrganisation?"admin":"profil"),t.push(this.wiType===d.Op.Requete?"requete":"permis"),this.router.navigate(t)}),(0,S.pQ)(this.destroyRef)).subscribe()}hardDeleteFile(t){return t?this.fileService.hardDeleteFileS3(t).pipe((0,Ft.W)(()=>(this.store.dispatch(new m.Actions.ShowSnackBar("\xC9chec de suppression du fichier",m.EnumSnackBarType.Ec
1hec)),Pe.w))):Pe.w}getInfoChanges(){const t=new I.NO;if(this.currentWorkitemVW.statutId!==this.savedWorkItem.statutId){var o,s;const l=this.statutList.find(_=>_.statutId===this.currentWorkitemVW.statutId),c=this.statutList.find(_=>_.statutId===this.savedWorkItem.statutId);t.diff.push(new I.cm({fr:"Statut",en:"Status"},!1,{label:{fr:null==c?void 0:c.statusLocalisations.find(_=>_.lclzTag===d.fi.FR).statusNom,en:null==c||null===(o=c.statusLocalisations.find(_=>_.lclzTag===d.fi.EN))||void 0===o?void 0:o.statusNom},value:this.savedWorkItem.statutId},{label:{fr:null==l?void 0:l.statusLocalisations.find(_=>_.lclzTag===d.fi.FR).statusNom,en:null==l||null===(s=l.statusLocalisations.find(_=>_.lclzTag===d.fi.EN))||void 0===s?void 0:s.statusNom},value:this.currentWorkitemVW.statutId}))}return t.diff.length>0?t:null}unloadNotification(t){if(this.pendingDeleteFiles=this.surveyRef.getPendingFileToDelete(!0),this.pendingDeleteFiles.size)return t.preventDefault(),!1}onPageHide(){this.pendingDeleteFiles=this.surveyRef.getPendingFileToDelete(!0),this.pendingDeleteFiles.size&&(0,ce.H)(this.pendingDeleteFiles).pipe((0,S.pQ)(this.destroyRef),(0,te.Z)(t=>this.hardDeleteFile(t))).subscribe()}}return(i=a).\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.VBU({type:i,selectors:[["vplus-creation-affectation"]],viewQuery:function(t,o){if(1&t&&(e.GBs(kt,5),e.GBs(jt,5),e.GBs(xt,5),e.GBs(de.z,5)),2&t){let s;e.mGM(s=e.lsd())&&(o.surveyRef=s.first),e.mGM(s=e.lsd())&&(o.stepper=s.first),e.mGM(s=e.lsd())&&(o.inputAdresseGoogleRef=s.first),e.mGM(s=e.lsd())&&(o.singlePageSurveysRef=s)}},hostBindings:function(t,o){1&t&&e.bIt("beforeunload",function(l){return o.unloadNotification(l)},!1,e.tSv)("pagehide",function(){return o.onPageHide()},!1,e.tSv)},inputs:{surveyReponse:"surveyReponse",isDraft:"isDraft"},decls:6,vars:3,consts:()=>{let n,t,o,s,l,c,_,C,p,R,L,O,B,H,A;return n="Identification",t="Pr\xE9nom",o=" Champ obligatoire ",s="Nom",l=" Champ obligatoire ",c="Retour",_="Suivant",C="Courriel",p=" Champ obligatoire ",R=" Courriel non valide ",L=" Adresse courriel d\xE9j\xE0 utilis\xE9e par un compte citoyen ",O="T\xE9l\xE9phone",B=" Champ obligatoire ",H=" T\xE9l\xE9phone non valide ",A="Erreur",[["surveyRef",""],n,t,o,s,l,c,_,C,p,R,L,O,B,H,A,[3,"back"],[1,"standard-page-content"],[1,"max-720"],[3,"json","readOnly","catId","reponses","isDraft","citoyenLoggedIn","hideValeurTerrainQuestion","submitSurvey","surveyChanged","externalBack","documentAdded","saveDraft",4,"loadLockIf"],[1,"requete-envoye","max-720"],[1,"max-720",3,"formGroup","vplusSyncStore","vplusSyncAction"],[1,"identification-title"],[1,"form-field-inline-section"],["required","","matInput","","type","text","formControlName","prenom"],["required","","matInput","","type","text","formControlName","nom"],[1,"sv-navigation-footer","max-720","spacing-top"],["type","button","mat-stroked-button","",1,"custom-button-standard","custom-button-stroked",3,"click"],["type","button","mat-raised-button","",1,"custom-button-full","custom-button-standard","sv-next-btn",3,"click"],["matInput","","type","email","formControlName","courriel",3,"required"],["matInput","","type","tel","maskTelephoneEvents","","formControlName","telephone",3,"required","imask","unmask"],[3,"submitSurvey","surveyChanged","externalBack","documentAdded","saveDraft","json","readOnly","catId","reponses","isDraft","citoyenLoggedIn","hideValeurTerrainQuestion"],[1,"icon-formulaire-primeur"],["expand","false",1,"ion-custom-button-standard","ion-custom-button-full",3,"click"]]},template:function(t,o){1&t&&(e.j41(0,"div")(1,"vplus-req-toolbar",16),e.bIt("back",function(){return o.locationBack()}),e.EFF(2),e.DNE(3,zt,1,1),e.k0s(),e.DNE(4,Wt,1,0,"vplus-loading-spinner")(5,oi,6,4),e.k0s()),2&t&&(e.R7$(2),e.SpI("",null==o.selectedCategorie?null:o.selectedCategorie.nom," "),e.R7$(),e.vxM(3,o.selectedSousCategorie?3:-1),e.R7$(),e.vxM(4,o.loading?4:5))},dependencies:[le.fg,U.rl,U.nJ,U.TL,J.$z,u.qT,u.me,u.BC,u.cb,u.YS,u.j4,u.JD,Ae.Q,y.oM4,y.xGI,Xt.Zq,P.Jm,Qt.x,fe.N,de.z,h.Jj],styles:[".stepper-disabled .mat-horizontal-stepper-header{pointer-events:none!important}.mobile-request-spacing[_ngcontent-%COMP%]{padding:18px 18px 0}@media (min-width: 960px){.mobile-request-spacing[_ngcontent-%COMP%]{padding:0}} .sv-pageRoot>.sv_row>.sv_p_container>h4.sv_title-underline{margin-bottom:2rem;padding-bottom:1rem;padding-top:2rem;
1border-bottom:1px solid var(--divider-color);display:flex;align-items:center;font-size:1.3rem}@media (min-width: 600px){ .sv-pageRoot>.sv_row>.sv_p_container>h4.sv_title-underline{font-size:1.5rem}}@media (min-width: 1280px){ .sv-pageRoot>.sv_row>.sv_p_container>h4.sv_title-underline{font-size:1.6rem}}.save-draft-button[_ngcontent-%COMP%]{font-size:14px;margin-left:auto}@media (max-width: 768px){.save-draft-button[_ngcontent-%COMP%]{display:none!important}}.mobile-save-draft-button[_ngcontent-%COMP%]{font-size:14px;margin:auto;display:flex!important}@media (min-width: 769px){.mobile-save-draft-button[_ngcontent-%COMP%]{display:none!important}}.save-and-quit-container[_ngcontent-%COMP%]{padding-top:1vh}@media (min-width: 769px){.save-and-quit-container[_ngcontent-%COMP%]{display:none!important}}.showAllAffectations[_ngcontent-%COMP%]{margin-top:33px}.identification-title[_ngcontent-%COMP%]{font-size:1.4rem}@media (min-width: 600px){.identification-title[_ngcontent-%COMP%]{font-size:1.55rem}}"]}),a})();const si=["wiEditeur"],ai=i=>({"filter-searche-global-active":i});function ri(i,a){if(1&i&&e.nrm(0,"vplus-creation-affectation",6,1),2&i){const n=e.XpG();e.Y8G("surveyReponse",n.surveyReponse)}}function li(i,a){1&i&&e.nrm(0,"app-copyright-footer")}let ve=(()=>{var i;class a{constructor(){this.isLoaded=!1,this.surveyReponse={},this.platform=(0,e.WQX)(se.OD),this.appMetaTags=(0,e.WQX)(F.W),this.store=(0,e.WQX)(M.il),this.route=(0,e.WQX)(f.nX),this.selectIsSearchHeaderVisible$=this.store.select(m.selectIsSearchHeaderVisible),this.isMobile=this.platform.is("mobileweb")||this.platform.is("ios")||this.platform.is("android")}onContentClick(){this.store.dispatch(m.Actions.setIsSearchHeaderVisible({payload:!1}))}ionViewWillEnter(){this.isLoaded=!0,this.wiType=this.route.snapshot.data.module===I.AL.Requete?d.Op.Requete:d.Op.Permis,this.fromOrganisation="1"===this.route.snapshot.queryParams.organisation,(0,x.z)([this.store.select(g.Pg),this.store.select(g.ci),this.store.select(g.x8)]).pipe((0,b.s)(1)).subscribe(([t,o,s])=>{this.surveyReponse=null==s?void 0:s.surveyReponse;const l=o.find(p=>p.id===t.categorieId),_=(null!=l&&l.sousCategorieList?l.sousCategorieList.filter(p=>p.actif&&!p.limitCreationByApplicant):[]).find(p=>p.id===t.sousCategorieId);let C=this.wiType===d.Op.Requete?"Nouvelle requ\xEAte":"Nouvelle demande de permis";C+=` - ${null==l?void 0:l.nom}`,_&&(C+=` - ${null==_?void 0:_.nom}`),this.appMetaTags.updateMetaTags(C)})}onScroll(){document.querySelectorAll("sv-ng-popup sv-ng-popup-container, .autocomplete").forEach(t=>{const o=t.firstElementChild;"none"!==(null==o?void 0:o.style.display)&&(o.style.display="none")})}ionViewWillLeave(){this.isLoaded=!1,this.store.dispatch(E.resetCurrentWorkitem({payload:{type:this.wiType,fromOrganisation:this.fromOrganisation}}))}}return(i=a).\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.VBU({type:i,selectors:[["vplus-creation-affectation-container"]],viewQuery:function(t,o){if(1&t&&e.GBs(si,5),2&t){let s;e.mGM(s=e.lsd())&&(o.wiEditeur=s.first)}},decls:7,vars:10,consts:[["ionContent",""],["wiEditeur",""],["defaultHref","/requete","headerTitle","",1,"hide-desktop","mobile-header",3,"returnButtonType","menuId"],["ckdScrollableIonContent","","id","requeteCreation",3,"ionScroll","click","scrollEvents","ngClass"],[1,"main-page-container"],[3,"surveyReponse",4,"ngIf"],[3,"surveyReponse"]],template:function(t,o){if(1&t){const s=e.RV6();e.nrm(0,"vplus-mobile-header",2),e.j41(1,"ion-content",3,0),e.nI1(3,"async"),e.bIt("ionScroll",function(){return e.eBV(s),e.Njj(o.onScroll())})("click",function(){return e.eBV(s),e.Njj(o.onContentClick())}),e.j41(4,"div",4),e.DNE(5,ri,2,1,"vplus-creation-affectation",5)(6,li,1,0,"app-copyright-footer"),e.k0s()()}2&t&&(e.Y8G("returnButtonType","back-button")("menuId","requeteCreation"),e.R7$(),e.Y8G("scrollEvents",!0)("ngClass",e.eq3(8,ai,e.bMT(3,6,o.selectIsSearchHeaderVisible$))),e.R7$(4),e.Y8G("ngIf",o.isLoaded),e.R7$(),e.vxM(6,o.isMobile?-1:6))},dependencies:[h.YU,h.bT,z.f,P.W9,Ie.x,Z.G,ni,h.Jj],encapsulation:2}),a})();const _i=i=>({"filter-searche-global-active":i});function ci(i,a){1&i&&(e.j41(0,"h2",17),e.pXf(1,3),e.k0s())}function di(i,a){1&i&&(e.j41(0,"h2",17),e.pXf(1,4),e.k0s())}function ui(i,a){if(1&i){const n=e.RV6();e.j41(0,"div",10)(1,"div",11),e.DNE(2,ci,2,0,"h2",12)(3,di,2,0,"h2",12),e.j41(4,"p")(5,"span"),e.pXf(6,0),e.k0s(),e.j41(7,"b"),e.EFF(8),e.k0s()(),e.j41(9,"p")(10,"span"),e.pXf(11,1),e.k0s(),e.j41(12,"b"),e.EFF(13),e.k0s()(),e.j41(14,"div",13)(15,"div",14)(16,"div",15)(17,"ion-button",16),e.bIt("click",function(){e.eBV(n);const o=e.XpG();return e.Njj(o.envoyerCodeAccess())}),e.j41(18,"span"),e.pXf(19,2),e.k0s()()()()()()()}if(2&i){const n=e.XpG();e.R7$(2),e.Y8G("ngIf",n.isPermis),e.R7$(),e.Y8G("ngIf",!n.isPermis),e.R7$(5),e.E5c(" ",n.affectationType.toLowerCase()," ",n.no," ",n.wi.no,""),e.R7$(5),e.SpI(" ",n.courrielCioyen,"")}}let Ci=(()=>{var i;class a{constructor(){this.requeteService=(0,e.WQX)(ae.t),this.route=(0,e.WQX)(f.nX),this.appMetaTags=(0,e.WQX)(F.W),this.store=(0,e.WQX)(M.il),this.router=(0,e.WQX)(f.Ix),this.destroyRef=(0,e.WQX)(e.abz),this.no=" n\xB0 ",this.dataLoaded=!1,this.docOfficiels=[],this.isPermis=!1,this.selectIsSearchHeaderVisible$=this.store.select(m.selectIsSearchHeaderVisible)}
1ngOnInit(){this.wiType=this.route.snapshot.data.module,this.isPermis=this.wiType===I.AL.Permis,this.appMetaTags.updateMetaTags(this.isPermis?"Consulter ma demande de permis":"Consulter ma requ\xEAte"),this.affectationId=this.route.snapshot.params.id,this.perId=this.route.snapshot.queryParams.perId,this.affectationType=this.isPermis?"Demande de permis":"Requ\xEAte",this.submitBtnText="Envoyer le code",this.requeteService.getWIInfosWithAccessCode(this.affectationId,null,!1,this.perId).pipe((0,S.pQ)(this.destroyRef)).subscribe(t=>{this.wi=t,this.courrielCioyen=t.courrielMasque,this.dataLoaded=!0})}onContentClick(){this.store.dispatch(m.Actions.setIsSearchHeaderVisible({payload:!1}))}envoyerCodeAccess(){this.requeteService.sendAccessCode(this.wi.wiId,this.perId).pipe((0,S.pQ)(this.destroyRef)).subscribe(t=>{"OK"===t.code?(this.router.navigate([`${this.wiType.toLowerCase()}/invite/`,this.wi.wiId],{queryParams:{perId:this.perId||null}}),this.store.dispatch(new m.Actions.ShowSnackBar("Un nouveau code d'acc\xE8s s\xE9curis\xE9 vous a \xE9t\xE9 envoy\xE9 \xE0 votre courriel."))):this.store.dispatch(new m.Actions.ShowSnackBar("Une erreur est survenue lors de la g\xE9n\xE9ration de votre code d'acc\xE8s. Veuillez r\xE9essayer plus tard.",m.EnumSnackBarType.Echec))})}}return(i=a).\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.VBU({type:i,selectors:[["vplus-envoyer-code-access-affectation-invite"]],decls:7,vars:10,consts:()=>{let n,t,o,s,l;return n="Vous avez obtenu un lien s\xE9curis\xE9 pour consulter votre",t="Afin de v\xE9rifier votre identit\xE9, un code d'acc\xE8s vous sera envoy\xE9 \xE0",o="Envoyer le code",s="Consultation d'une demande de permis",l="Consultation d'une requ\xEAte",[n,t,o,s,l,["returnButtonType","back-button",1,"hide-desktop","mobile-header",3,"headerTitle","defaultHref","forceDefault","menuId"],["id","permisInviteDocuments","scrollEvents","true",3,"click","ngClass"],[1,"main-page-container"],[1,"standard-page-content"],["class","max-720",4,"ngIf"],[1,"max-720"],[1,"email-verification"],["class","form-section-title",4,"ngIf"],[1,"padding-bottom-12"],[1,"auth-form-content"],[1,"auth-form-actions","margin-top-1"],["type","submit","expand","block",1,"ion-custom-button-full","ion-custom-button-standard",3,"click"],[1,"form-section-title"]]},template:function(t,o){1&t&&(e.nrm(0,"vplus-mobile-header",5),e.j41(1,"ion-content",6),e.nI1(2,"async"),e.bIt("click",function(){return o.onContentClick()}
1),e.j41(3,"div",7)(4,"div",8),e.DNE(5,ui,20,6,"div",9),e.k0s(),e.nrm(6,"app-copyright-footer"),e.k0s()()),2&t&&(e.Y8G("headerTitle","")("defaultHref","/accueil")("forceDefault",!0)("menuId","permisInviteDocuments"),e.R7$(),e.Y8G("ngClass",e.eq3(8,_i,e.bMT(2,6,o.selectIsSearchHeaderVisible$))),e.R7$(4),e.Y8G("ngIf",o.dataLoaded))},dependencies:[h.YU,h.bT,z.f,P.Jm,P.W9,Z.G,h.Jj],encapsulation:2}),a})();var ue=r(55430),Ce=r(52486),Re=r(62509),Ei=r(74424);const Me=i=>{var a;const n=(0,e.WQX)(q.o),t=(0,e.WQX)(f.Ix),o=(0,e.WQX)(M.il),l=(null===(a=i.pathFromRoot.find(_=>{var C;return null===(C=_.data)||void 0===C?void 0:C.module}))||void 0===a?void 0:a.data.module)===I.AL.Permis?d.Op.Permis:d.Op.Requete,c=l===d.Op.Permis?n.appConfig.paramList.allowInvitePermis:n.appConfig.paramList.allowInviteReq;return(0,x.z)([o.select(m.selectIsLoggedIn),o.select(g.ci),o.select(g.Pg),o.select(g.uk)]).pipe((0,w.T)(([_,C,p,R])=>{const L=(0,Ei.a)(C,p,l,R);if(_||"1"===i.queryParams.invite&&c&&L)return!0;const O={...i.queryParams};return t.navigate(["/",l===d.Op.Requete?"requete":"permis","creation","connexion"],{queryParams:O}),!1}))};var pi=r(16883);let ye=(()=>{var i;class a{constructor(t,o){this.store=t,this.router=o}canActivate(){return this.store.select(m.selectIsLoggedIn).pipe((0,w.T)(t=>!t||(this.router.navigate(["/page-inaccessible"]),!1)))}}return(i=a).\u0275fac=function(t){return new(t||i)(e.KVO(M.il),e.KVO(f.Ix))},i.\u0275prov=e.jDH({token:i,factory:i.\u0275fac,providedIn:"root"}),a})();var Le=r(95212);let Ee=(()=>{var i;class a{constructor(t,o){this.router=t,this.store=o}canActivate(t){var o;const s=t.data.module===I.AL.Requete?d.Op.Requete:d.Op.Permis,l="1"===t.queryParams.organisation,c=null===(o=t.routeConfig)||void 0===o||null===(o=o.path)||void 0===o?void 0:o.startsWith("poursuite");return(0,x.z)([this.store.select(g.ci),this.store.select(g.Pg)]).pipe((0,w.T)(([_,C])=>{const R=_.filter(O=>O.actif&&!O.limitCreationByApplicant&&O.typeWiId===s).find(O=>O.id===C.categorieId);if(!R)return!1;if(!C.sousCategorieId)return c||!R.disableQuestionnaireStart;const L=R.sousCategorieList.find(O=>O.id===C.sousCategorieId);return!!L&&(c||!L.disableQuestionnaireStart)}),(0,w.T)(_=>(_||this.router.navigate(["/",s===d.Op.Requete?"requete":"permis"],{queryParams:{invite:"1"===t.queryParams.invite?1:0,organisation:l?1:0}}),_)))}}return(i=a).\u0275fac=function(t){return new(t||i)(e.KVO(f.Ix),e.KVO(M.il))},i.\u0275prov=e.jDH({token:i,factory:i.\u0275fac,providedIn:"root"}),a})();var $e=r(40129);const fi=f.iI.forChild([{path:"",pathMatch:"full",resolve:{accueil:Re.y,reset:Le.H},component:$t},{path:"poursuite/:no",component:ve,canActivate:[$e.n,Ee,Me],canDeactivate:[Te]},{path:"creation",component:ve,canActivate:[$e.n,Ee,Me],canDeactivate:[Te]},{path:"",resolve:{accueil:Re.y},children:[{path:"connexion",canActivate:[ue.Q],component:Ce.n},{path:":no/connexion",canActivate:[ue.Q],component:Ce.n},{path:"creation/connexion",canActivate:[Ee,ue.Q],component:Ce.n},{path:"liste",component:Ze,canActivate:[pi.i]},{path:"invite/:id",component:ft,canActivate:[ye]},{path:"invite/envoyer-code-access/:id",component:Ci,canActivate:[ye]}]}]);var mi=r(95338),Ti=r(10916),Si=r(49193),hi=r(24319);let gi=(()=>{var i;class a{constructor(){}}return(i=a).\u0275fac=function(t){return new(t||i)},i.\u0275mod=e.$C({type:i}),i.\u0275inj=e.G2t({providers:[Si.K,Le.H,j.b,k.H],imports:[Ti.G,hi.b,mi.h,fi,oe.aP,V.Z,X.W,de.z,D.n,Q.q]}),a})()},55430:(pe,G,r)=>{r.d(G,{Q:()=>X});var j=r(35052),V=r(51188),D=r(54438);const X=()=>{const Q=(0,D.WQX)(V.Ix);return!!(0,D.WQX)(j.o).appConfig.allowConnection||Q.createUrlTree(["page-non-trouvee"])}},24339:(pe,G,r)=>{r.d(G,{b:()=>oe});var j=r(7673),V=r(1807),D=r(25558),X=r(96354),Q=r(17446),k=r(54438);let oe=(()=>{var E;class ${constructor(f){this.utilisateurService=f}validateAdresse(){return f=>""===f.value||null===f.value?(0,j.of)(null):(0,V.O)(300).pipe((0,D.n)(()=>this.utilisateurService.validateAdresse(f.value).pipe((0,X.T)(F=>!0===F.invalidAddress?{invalidAddress:!0}:null))))}}return(E=$).\u0275fac=function(f){return new(f||E)(k.KVO(Q.$))},E.\u0275prov=k.jDH({token:E,factory:E.\u0275fac}),$})()}}]);
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.