1"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[9012],{9012:(D,v,e)=>{e.r(v),e.d(v,{OAuth2ConsentModule:()=>pt});var c=e(5231),t=e(4438),f=e(1552),n=e(5451),p=e(6247),u=e(7805),S=e(7786),b=e(7673),A=e(5060),x=e(8810),g=e(5482);class O{constructor(T,o){this.clientName=T,this.grantableScopes=o}}class h{constructor(T){this.scope=T}}class d{constructor(T){this.scopes=T}hasScopes(){return this.scopes.length>0}}var E=e(7348),y=e(6354),B=e(9437),l=e(1397),G=e(516),a=e(8854),m=e(6884),I=e(2652),C=e(3408),V=e(1626);let R=(()=>{class s{constructor(o,i,r,U,ht,mt,ut){this.http=o,this.flowPageService=i,this.flowSessionService=r,this.scopesService=U,this.validations=ht,this.pageAlertService=mt,this.languageService=ut}getConsent(){return(0,S.h)(this.onLanguageChange(),this.onStepUiConfig())}grant(o){const i=JSON.stringify({scopes:o.scopes.filter(r=>r.scope.granted).map(r=>r.scope.scope)});return this.http.post((0,E.OZ)(["public","authentication","oauth2","authorization-server","consent","local","grant"]),i,(0,I.R)()).pipe((0,y.T)(r=>this.flowSessionService.createFlowSession(r)),(0,B.W)(r=>this.handleValidationFailed(r)))}deny(){return this.http.post((0,E.OZ)(["public","authentication","oauth2","authorization-server","consent","local","deny"]),null,{observe:"response"}).pipe((0,y.T)(o=>this.flowSessionService.createFlowSession(o)))}onStepUiConfig(){return this.flowPageService.getStepUiConfig().pipe((0,l.Z)(o=>{const i=o.additionalAttribute("consent");return i?(0,b.of)(this.toConsent(i)):this.getConsentFromServer()}))}onLanguageChange(){return this.languageService.onLanguageChange.pipe((0,l.Z)(()=>this.getConsentFromServer()))}getConsentFromServer(){return this.http.post((0,E.OZ)(["public","authentication","oauth2","authorization-server","consent","local","retrieve"]),null,{observe:"response"}).pipe((0,y.T)(o=>this.toConsent({clientName:o.body.data.attributes.clientName,grantableScopes:o.body.data.attributes.grantableScopes})))}toConsent(o){return new O(o.clientName,this.toGrantableScopes(this.scopesService.createOAuth2Scopes(o.grantableScopes||[])))}handleValidationFailed(o){return this.hasScopesRequiredError(o)?(this.pageAlertService.error("error.oauth2-consent-scope-value-required").display(),A.t):(0,x.$)(()=>o)}hasScopesRequiredError(o){return this.validations.getServerValidationErrorsWithCodes(o,["VALIDATION_FAILED"]).filter(r=>"/scopes"===r.source?.pointer&&"REQUIRED"===r.meta?.detail).length>0}toGrantableScopes(o){return new d(o.scopes.map(i=>new h(i)))}static#t=this.\u0275fac=function(i){return new(i||s)(t.KVO(V.Qq),t.KVO(p.z),t.KVO(g.Q),t.KVO(a.w),t.KVO(G.R),t.KVO(m.D),t.KVO(C.g))};static#e=this.\u0275prov=t.jDH({token:s,factory:s.\u0275fac})}return s})();var K=e(2263),L=e(8141),j=e(5558),P=e(9025),W=e(7893),_=e(7376),M=e(177),Y=e(57),N=e(4160),X=e(9099),$=e(7493),H=e(3641),w=e(9710),z=e(9856),J=e(6453),Z=e(2426),Q=e(3813),k=e(1463),q=e(2506);const tt=s=>({date:s});function et(s,T){1&s&&t.nrm(0,"iam-text-message",8),2&s&&t.Y8G("id","empty-scopes")("text","authentication.oauth2.consent.empty-scopes")}function nt(s,T){if(1&s&&(t.nrm(0,"iam-checkbox",11),t.nI1(1,"formatDate"),t.nI1(2,"translate")),2&s){const o=T.$implicit,i=t.XpG(3);t.Y8G("id","scope-"+o.scope.scope)("label",o.scope.translatedScope+" "+t.i5U(2,6,i.scopeLabelResource(o.scope),t.eq3(9,tt,t.i5U(1,3,o.scope.updatedAt,i.formatDateOnly()))))("control",i.form.controls[o.scope.scope])}}function ot(s,T){if(1&s&&(t.j41(0,"iam-row-with-label",9),t.DNE(1,nt,3,11,"iam-checkbox",10),t.k0s()),2&s){const o=t.XpG().ngIf;t.Y8G("id","grantableOAuth2Scopes")("label","authentication.oauth2.consent.scopes.authorization"),t.R7$(),t.Y8G("ngForOf",o.grantableScopes.scopes)}}function at(s,T){if(1&s){const o=t.RV6();t.j41(0,"iam-page",2),t.nrm(1,"iam-text-row",3),t.j41(2,"iam-form",4),t.bIt("formSubmit",function(){t.eBV(o);const r=t.XpG();return t.Njj(r.grant())}),t.DNE(3,et,1,2,"iam-text-message",5)(4,ot,2,3,"ng-template",null,0,t.C5r),t.nrm(6,"iam-dynamic-step-activation-checkboxes"),t.j41(7,"iam-button-row"),t.nrm(8,"iam-button",6),t.j41(9,"iam-button",7),t.bIt("buttonClick",function(){t.eBV(o);const r=t.XpG();return t.Njj(r.deny())}),t.k0s(),t.nrm(10,"iam-goto-buttons"),t.k0s()()()}if(2&s){const o=T.ngIf,i=t.sdS(5),r=t.XpG();t.Y8G("pageId",r.pageId)("bodyAttributes",r.bodyAttributes)("title","authentication.oauth2.consent.title"),t.R7$(),t.Y8G("id","clientName")("label","authentication.oauth2.consent.client.name")("value",o.clientName),t.R7$(),t.Y8G("form",r.form),t.R7$(),t.Y8G("ngIf",!o.grantableScopes.hasScopes())("ngIfElse",i),t.R7$(5),t.Y8G("id","grantOAuth2Scopes")("submit",!0)("text","authentication.oauth2.consent.actions.grant")("disabled",!r.form.valid),t.R7$(),t.Y8G("id","denyConsent")("text","authentication.oauth2.consent.actions.deny")}}let st=(()=>{class s extends n.V{constructor(o,i,r){super(o,i),this.service=r}get pageId(){return"iamAuthOAuth2Consent"}ngOnInit(){this.consent=this.initUiConfig().pipe((0,j.n)(()=>this.service.getConsent()),(0,L.M)(o=>this.initForm(o)))}grant(){this.service.grant(this.form.model).subscribe({next:o=>this.handleSuccessfulStep(o),error:o=>this.handleFailedStep(o)})}deny(){this.service.deny().subscribe({next:o=>this.handleSuccessfulStep(o),error:o=>this.handleFailedStep(o)})}formatDateOnly(){return W.c.DATE}scopeLabelResource(o){return o.updatedAt?o.granted?"authentication.oauth2.consent.scopes.previously.granted":"authentication.oauth2.consent.scopes.previously.denied":""}initForm(o){this.form=K.l.of((0,_.cloneDeep)(o.grantableScopes),{prefixOrMapping:this.controlsMapping(o.grantableScopes)})}
1controlsMapping(o){const i={};return o.scopes.forEach((r,U)=>{i["scopes["+U+"].scope.granted"]=r.scope.scope}),i}static#t=this.\u0275fac=function(i){return new(i||s)(t.rXU(p.z),t.rXU(u.b),t.rXU(R))};static#e=this.\u0275cmp=t.VBU({type:s,selectors:[["ng-component"]],standalone:!1,features:[t.Jv_([R,{provide:P.k,useValue:"authentication.oauth2.consent.scope."},a.w,P.b]),t.Vt3],decls:2,vars:3,consts:[["scopeInstructions",""],[3,"pageId","bodyAttributes","title",4,"ngIf"],[3,"pageId","bodyAttributes","title"],[3,"id","label","value"],[3,"formSubmit","form"],[3,"id","text",4,"ngIf","ngIfElse"],[3,"id","submit","text","disabled"],[3,"buttonClick","id","text"],[3,"id","text"],[3,"id","label"],[3,"id","label","control",4,"ngFor","ngForOf"],[3,"id","label","control"]],template:function(i,r){1&i&&(t.DNE(0,at,11,15,"iam-page",1),t.nI1(1,"async")),2&i&&t.Y8G("ngIf",t.bMT(1,1,r.consent))},dependencies:[M.Sq,M.bT,Y.m,N.Q,X.a,$.E,H.P,w.s,z.U,J.I,Z.J,Q.H,M.Jj,k.t,q.I],encapsulation:2})}return s})();var it=e(9373),rt=e(7613);let F=(()=>{class s{constructor(o,i){this.uiService=o,this.routes=i}canActivate(){return this.uiService.getStepUiConfig().pipe((0,y.T)(o=>o.additionalAttribute("consent")),(0,l.Z)(o=>this.redirectToRemoteConsent(o)),(0,y.T)(()=>!1))}redirectToRemoteConsent(o){return this.routes.navigateTo(o.redirectUrl,{queryParamsHandling:"merge",queryParams:{consent_token:o.token}})}static#t=this.\u0275fac=function(i){return new(i||s)(t.KVO(it.I),t.KVO(rt.BV))};static#e=this.\u0275prov=t.jDH({token:s,factory:s.\u0275fac})}return s})();const lt=[{path:"",component:st,pathMatch:"full",runGuardsAndResolvers:"always"},{path:"redirect",canActivate:[()=>(0,t.WQX)(F).canActivate()],component:e(9557).n}];let pt=(()=>{class s{static#t=this.\u0275fac=function(i){return new(i||s)};static#e=this.\u0275mod=t.$C({type:s});static#n=this.\u0275inj=t.G2t({providers:[F],imports:[c.iI.forChild(lt),f.G]})}return s})()},3841:(D,v,e)=>{e.d(v,{L:()=>n});var c=e(7376),f=e(4438);let n=(()=>{class p{transform(S){return(0,c.upperFirst)((0,c.camelCase)(S))}static#t=this.\u0275fac=function(b){return new(b||p)};static#e=this.\u0275pipe=f.EJ8({name:"upperCamelCase",type:p,pure:!0,standalone:!1});static#n=this.\u0275prov=f.jDH({token:p,factory:p.\u0275fac})}return p})()},2506:(D,v,e)=>{e.d(v,{I:()=>f});var c=e(7893),t=e(4438);let f=(()=>{class n{constructor(u){this.dates=u}transform(u,S=c.c.DATE_TIME){const b="string"==typeof u?this.dates.toDate(u):u;return b?this.dates.toString(b,S):void 0}static#t=this.\u0275fac=function(S){return new(S||n)(t.rXU(c.A,16))};static#e=this.\u0275pipe=t.EJ8({name:"formatDate",type:n,pure:!1,standalone:!1})}return n})()},7493:(D,v,e)=>{e.d(v,{E:()=>B});var c=e(6247),t=e(8141),f=e(3597),n=e(4438),p=e(177),u=e(2315),S=e(7301),b=e(9417),A=e(2816),x=e(1463);function g(l,G){if(1&l&&(n.nrm(0,"iam-checkbox-row",1),n.nI1(1,"translate")),2&l){const a=n.XpG();n.Y8G("id",a.checkboxId)("label",n.bMT(1,5,a.translationKey))("control",a.control)("labelRight",!0)("disabled",a.disabled)}}let O=(()=>{class l{get hostCss(){return"iam-dynamic-step-activation-checkbox"}set checkboxId(a){a&&(this._id=a)}get checkboxId(){return this._id}set targetStep(a){a&&(this._target=a,this.translationKey=this.translationKey.replace("{targetStepId}",a.targetStepId))}get targetStep(){return this._target}constructor(a,m){this.currentFlow=a,this.flowPageService=m,this.checkboxChangedEvent=new n.bkB,this.stepUiConfig=this.flowPageService.getStepUiConfig(),this.translationKey=this.keyPrefix()+".pages.actions.dynamic-step.{targetStepId}"}ngOnInit(){this.control=new b.hs,this.control.setValue(this._target.activated),this._checkboxSubscription=this.control.valueChanges.subscribe(a=>{this._target.activated=a,this.checkboxChangedEvent.emit({targetStepId:this._target.targetStepId,activated:a})})}ngOnDestroy(){this._checkboxSubscription.unsubscribe()}get disabled(){return!this._target.activated&&!this._target.activatable||this._target.activated&&!this._target.deactivatable}keyPrefix(){const a=this.currentFlow.retrieveType();return(0,S.U)(a)}static#t=this.\u0275fac=function(m){return new(m||l)(n.rXU(u.E),n.rXU(c.z))};
1static#e=this.\u0275cmp=n.VBU({type:l,selectors:[["iam-dynamic-step-activation-checkbox"]],hostVars:2,hostBindings:function(m,I){2&m&&n.HbH(I.hostCss)},inputs:{checkboxId:"checkboxId",targetStep:"targetStep"},outputs:{checkboxChangedEvent:"checkboxChangedEvent"},standalone:!1,decls:2,vars:3,consts:[[3,"id","label","control","labelRight","disabled",4,"ngIf"],[3,"id","label","control","labelRight","disabled"]],template:function(m,I){if(1&m&&(n.DNE(0,g,2,7,"iam-checkbox-row",0),n.nI1(1,"async")),2&m){let C;n.Y8G("ngIf",null==(C=n.bMT(1,1,I.stepUiConfig))||null==C.pageSettings?null:C.pageSettings.dynamicStepActivationTargets)}},dependencies:[p.bT,A.D,x.t,p.Jj],encapsulation:2})}return l})();var h=e(9856),d=e(3841);function E(l,G){if(1&l){const a=n.RV6();n.j41(0,"iam-dynamic-step-activation-checkbox",3),n.nI1(1,"upperCamelCase"),n.bIt("checkboxChangedEvent",function(I){n.eBV(a);const C=n.XpG(2);return n.Njj(C.handleCheckboxChanges(I))}),n.k0s()}if(2&l){const a=G.$implicit;n.Y8G("targetStep",a)("checkboxId","dsaCheckbox"+n.bMT(1,2,a.targetStepId))}}function y(l,G){if(1&l&&(n.j41(0,"iam-row-with-label",1),n.DNE(1,E,2,4,"iam-dynamic-step-activation-checkbox",2),n.k0s()),2&l){const a=n.XpG();n.Y8G("withoutLabel",!0),n.R7$(),n.Y8G("ngForOf",a.dynamicStepActivationTargets)}}let B=(()=>{class l{constructor(a,m){this.flowPageService=a,this.dynamicStepActivationService=m,this.stepUiConfig=this.flowPageService.getStepUiConfig().pipe((0,t.M)(I=>this.setDynamicStepActivationTargets(I)))}handleCheckboxChanges(a){this.dynamicStepActivationService.addActivation(a)}setDynamicStepActivationTargets(a){this.dynamicStepActivationTargets=a.pageAttribute("dynamicStepActivationTargets")}static#t=this.\u0275fac=function(m){return new(m||l)(n.rXU(c.z),n.rXU(f.T))};static#e=this.\u0275cmp=n.VBU({type:l,selectors:[["iam-dynamic-step-activation-checkboxes"]],standalone:!1,decls:2,vars:3,consts:[[3,"withoutLabel",4,"ngIf"],[3,"withoutLabel"],[3,"targetStep","checkboxId","checkboxChangedEvent",4,"ngFor","ngForOf"],[3,"checkboxChangedEvent","targetStep","checkboxId"]],template:function(m,I){if(1&m&&(n.DNE(0,y,2,2,"iam-row-with-label",0),n.nI1(1,"async")),2&m){let C;n.Y8G("ngIf",(null==(C=n.bMT(1,1,I.stepUiConfig))||null==C.pageSettings||null==C.pageSettings.dynamicStepActivationTargets?null:C.pageSettings.dynamicStepActivationTargets.length)>0)}},dependencies:[p.Sq,p.bT,O,h.U,p.Jj,d.L],encapsulation:2})}return l})()},9710:(D,v,e)=>{e.d(v,{s:()=>p});var c=e(4438),f=(e(2263),e(9417));const n=["*"];let p=(()=>{class u{constructor(){this.autocomplete="off",this.formSubmit=new c.bkB}static#t=this.\u0275fac=function(A){return new(A||u)};static#e=this.\u0275cmp=c.VBU({type:u,selectors:[["iam-form"]],inputs:{autocomplete:"autocomplete",form:"form"},outputs:{formSubmit:"formSubmit"},standalone:!1,ngContentSelectors:n,decls:2,vars:2,consts:[[3,"ngSubmit","formGroup"]],template:function(A,x){1&A&&(c.NAR(),c.j41(0,"form",0),c.bIt("ngSubmit",function(O){return x.formSubmit.emit(O)}),c.SdG(1),c.k0s()),2&A&&(c.Y8G("formGroup",x.form.formGroup),c.BMQ("autocomplete",x.autocomplete))},dependencies:[f.qT,f.cb,f.j4],encapsulation:2})}return u})()},9099:(D,v,e)=>{e.d(v,{a:()=>x});var c=e(6247),t=e(7673),f=e(6354),n=e(4438),p=e(177),u=e(3594),S=e(3841);function b(g,O){if(1&g&&(n.nrm(0,"iam-goto-button",2),n.nI1(1,"upperCamelCase")),2&g){const h=O.$implicit,d=n.XpG(2);n.Y8G("currentStepId",d.currentStepId)("targetStepId",h)("disableWhenBusy",d.disableAllWhenBusy)("right",d.allRight)("buttonId","gotoButton"+n.bMT(1,6,h))("beforeGotoTargetStep",d.allBeforeGotoTargetStep)}}function A(g,O){if(1&g&&(n.qex(0),n.DNE(1,b,2,8,"iam-goto-button",1),n.nI1(2,"async"),n.bVm()),2&g){const h=n.XpG();n.R7$(),n.Y8G("ngForOf",n.bMT(2,1,h.gotoTargetsStepIds))}}let x=(()=>{class g{constructor(h){this.flowPageService=h,this.disableAllWhenBusy=!0,this.allRight=!0,this.allBeforeGotoTargetStep=this.nopBeforeGotoTargetStep,this.stepUiConfig=this.flowPageService.getStepUiConfig()}get hostCss(){return"iam-btns-goto-wrapper"}ngOnInit(){this.gotoTargetsStepIds=this.stepUiConfig.pipe((0,f.T)(h=>this.setCurrentStepIdAndGetGotoTargetsStepIds(h)))}setCurrentStepIdAndGetGotoTargetsStepIds(h){return this.currentStepId=h.pageId.replace(/\//g,""),h.pageAttribute("interactiveGotoTargets").targetStepIds}nopBeforeGotoTargetStep(){return(0,t.of)(!0)}static#t=this.\u0275fac=function(d){return new(d||g)(n.rXU(c.z))};static#e=this.\u0275cmp=n.VBU({type:g,selectors:[["iam-goto-buttons"]],hostVars:2,hostBindings:function(d,E){2&d&&n.HbH(E.hostCss)},inputs:{disableAllWhenBusy:"disableAllWhenBusy",allRight:"allRight",allBeforeGotoTargetStep:"allBeforeGotoTargetStep"},standalone:!1,decls:2,vars:3,consts:[[4,"ngIf"],[3,"currentStepId","targetStepId","disableWhenBusy","right","buttonId","beforeGotoTargetStep",4,"ngFor","ngForOf"],[3,"currentStepId","targetStepId","disableWhenBusy","right","buttonId","beforeGotoTargetStep"]],template:function(d,E){if(1&d&&(n.DNE(0,A,3,3,"ng-container",0),n.nI1(1,"async")),2&d){let y;n.Y8G("ngIf",null==(y=n.bMT(1,1,E.stepUiConfig))||null==y.pageSettings?null:y.pageSettings.interactiveGotoTargets)}},dependencies:[p.Sq,p.bT,u.Z,p.Jj,S.L],encapsulation:2})}return g})()}}]);
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.