(self.webpackChunkserver_side_rendering=self.webpackChunkserver_side_rendering||[]).push([[760],{77428:(e,t,n)=>{"use strict";n.d(t,{O:()=>F});var o=n(57826),i=n(40475),s=n(12596),r=n(6856),l=n(76355),a=n(86014);function c(e,t){if(1&e){const e=o["ɵɵgetCurrentView"]();o["ɵɵelementStart"](0,"a",12),o["ɵɵlistener"]("click",(function(){return o["ɵɵrestoreView"](e),o["ɵɵnextContext"]().changeSelectionForAll(!0)})),o["ɵɵtext"](1,"multiSelect.selectAll"),o["ɵɵelementEnd"]()}}function p(e,t){if(1&e){const e=o["ɵɵgetCurrentView"]();o["ɵɵelementStart"](0,"a",13),o["ɵɵlistener"]("click",(function(){return o["ɵɵrestoreView"](e),o["ɵɵnextContext"]().changeSelectionForAll(!1)})),o["ɵɵtext"](1,"multiSelect.deselectAll"),o["ɵɵelementEnd"]()}}function d(e,t){if(1&e&&(o["ɵɵelementStart"](0,"label",18),o["ɵɵtext"](1),o["ɵɵelementEnd"]()),2&e){const e=o["ɵɵnextContext"]().$implicit;o["ɵɵpropertyInterpolate"]("for",e.value),o["ɵɵadvance"](1),o["ɵɵtextInterpolate"](e.label)}}function u(e,t){if(1&e&&(o["ɵɵelementStart"](0,"label",19),o["ɵɵtext"](1),o["ɵɵelementEnd"]()),2&e){const e=o["ɵɵnextContext"]().$implicit;o["ɵɵpropertyInterpolate"]("for",e.value),o["ɵɵadvance"](1),o["ɵɵtextInterpolate"](e.label)}}function f(e,t){if(1&e&&(o["ɵɵelementStart"](0,"label",18),o["ɵɵtext"](1),o["ɵɵelementEnd"]()),2&e){const e=o["ɵɵnextContext"]().$implicit;o["ɵɵpropertyInterpolate"]("for",e.value),o["ɵɵadvance"](1),o["ɵɵtextInterpolate"](e.value)}}function h(e,t){if(1&e){const e=o["ɵɵgetCurrentView"]();o["ɵɵelementStart"](0,"li",14),o["ɵɵtext"](1,"\n                        "),o["ɵɵelementStart"](2,"input",15),o["ɵɵlistener"]("click",(function(){const t=o["ɵɵrestoreView"](e).index;return o["ɵɵnextContext"]().toggleOptionFirst(t)})),o["ɵɵelementEnd"](),o["ɵɵtext"](3,"\n                        "),o["ɵɵtemplate"](4,d,2,2,"label",16),o["ɵɵtext"](5,"\n                        "),o["ɵɵtemplate"](6,u,2,2,"label",17),o["ɵɵtext"](7,"\n                        "),o["ɵɵtemplate"](8,f,2,2,"label",16),o["ɵɵtext"](9,"\n                    "),o["ɵɵelementEnd"]()}if(2&e){const e=t.$implicit,n=o["ɵɵnextContext"]();o["ɵɵadvance"](2),o["ɵɵpropertyInterpolate"]("id",e.value),o["ɵɵproperty"]("checked",e.selected),o["ɵɵadvance"](2),o["ɵɵproperty"]("ngIf",e.label&&!n.translateOptionLabel),o["ɵɵadvance"](2),o["ɵɵproperty"]("ngIf",e.label&&n.translateOptionLabel),o["ɵɵadvance"](2),o["ɵɵproperty"]("ngIf",!e.label)}}function m(e,t){if(1&e&&(o["ɵɵelementStart"](0,"label",18),o["ɵɵtext"](1),o["ɵɵelementEnd"]()),2&e){const e=o["ɵɵnextContext"]().$implicit;o["ɵɵpropertyInterpolate"]("for",e.value),o["ɵɵadvance"](1),o["ɵɵtextInterpolate"](e.label)}}function g(e,t){if(1&e&&(o["ɵɵelementStart"](0,"label",19),o["ɵɵtext"](1),o["ɵɵelementEnd"]()),2&e){const e=o["ɵɵnextContext"]().$implicit;o["ɵɵpropertyInterpolate"]("for",e.value),o["ɵɵadvance"](1),o["ɵɵtextInterpolate"](e.label)}}function x(e,t){if(1&e&&(o["ɵɵelementStart"](0,"label",18),o["ɵɵtext"](1),o["ɵɵelementEnd"]()),2&e){const e=o["ɵɵnextContext"]().$implicit;o["ɵɵpropertyInterpolate"]("for",e.value),o["ɵɵadvance"](1),o["ɵɵtextInterpolate"](e.value)}}function C(e,t){if(1&e){const e=o["ɵɵgetCurrentView"]();o["ɵɵelementStart"](0,"li",14),o["ɵɵtext"](1,"\n                        "),o["ɵɵelementStart"](2,"input",15),o["ɵɵlistener"]("click",(function(){const t=o["ɵɵrestoreView"](e).index;return o["ɵɵnextContext"]().toggleOptionSecond(t)})),o["ɵɵelementEnd"](),o["ɵɵtext"](3,"\n                        "),o["ɵɵtemplate"](4,m,2,2,"label",16),o["ɵɵtext"](5,"\n                        "),o["ɵɵtemplate"](6,g,2,2,"label",17),o["ɵɵtext"](7,"\n                        "),o["ɵɵtemplate"](8,x,2,2,"label",16),o["ɵɵtext"](9,"\n                    "),o["ɵɵelementEnd"]()}if(2&e){const e=t.$implicit,n=o["ɵɵnextContext"]();o["ɵɵadvance"](2),o["ɵɵpropertyInterpolate"]("id",e.value),o["ɵɵproperty"]("checked",e.selected),o["ɵɵadvance"](2),o["ɵɵproperty"]("ngIf",e.label&&!n.translateOptionLabel),o["ɵɵadvance"](2),o["ɵɵproperty"]("ngIf",e.label&&n.translateOptionLabel),o["ɵɵadvance"](2),o["ɵɵproperty"]("ngIf",!e.label)}}const b=function(e){return{tag:"textContent",label:e}};function v(e,t){if(1&e&&o["ɵɵelement"](0,"p",20),2&e){const e=o["ɵɵnextContext"]();o["ɵɵproperty"]("bxTranslate",o["ɵɵpureFunction1"](1,b,e.errorMessage))}}const y=function(e,t,n){return{"invalid-field":e,"corrected-field":t,active:n}},S=function(){return{"active-field":!0}},O=function(e){return{active:e}};let F=(()=>{class e{constructor(e,t){this.elementRef=e,this.translateService=t,this.state="",this.translateOptionLabel=!0,this.optionsUpdated=new o.EventEmitter,this.propagateChange=()=>{},this.propagateTouch=()=>{}}set options(e){const t=Math.floor(e.length/2);this.optionsFirst=e.slice(0,t),this.optionsSecond=e.slice(t),this.updateMessage()}closeGlobal(e){this.elementRef.nativeElement.contains(e.target)||(this.opened=!1)}ngOnInit(){this.opened=this.config.opened,this.required=this.config.required,this.label=this.config.label,this.setTranslateOptionLabelFromConfig(),this.translateSubscription=this.translateService.loadTranslations(this.translateService.getCategory(this.config.severalSelectedLabel)).subscribe((e=>{this.translations=e,this.allOptionsSelectedTranslation=e[this.config.allSelectedLabel],this.noOptionsSelectedTranslation=e[this.config.noneSelectedLabel],this.severalOptionsSelectedTranslation=e[this.config.severalSelectedLabel],this.updateMessage(),this.notifyUpdate()}))}ngOnDestroy(){this.translateSubscription&&this.translateSubscription.unsubscribe()}toggleOpen(){this.opened=!this.opened}toggleOptionFirst(e){this.optionsFirst[e].selected=!this.optionsFirst[e].selected,this.updateMessage(),this.notifyUpdate()}toggleOptionSecond(e){this.optionsSecond[e].selected=!this.optionsSecond[e].selected,this.updateMessage(),this.notifyUpdate()}changeSelectionForAll(e){this.optionsFirst=this.optionsFirst.map((t=>(t.selected=e,t))),this.optionsSecond=this.optionsSecond.map((t=>(t.selected=e,t))),this.updateMessage(),this.notifyUpdate()}writeValue(e){e?(this.optionsFirst=this.optionsFirst.map((t=>(t.selected=e.includes(t.value),t))),this.optionsSecond=this.optionsSecond.map((t=>(t.selected=e.includes(t.value),t))),this.updateMessage()):(this.optionsFirst=this.optionsFirst.map((e=>(e.selected=!this.config.deSelectedByDefault,e))),this.optionsSecond=this.optionsSecond.map((e=>(e.selected=!this.config.deSelectedByDefault,e))),this.updateMessage()),this.notifyUpdate()}registerOnChange(e){this.propagateChange=e}registerOnTouched(e){this.propagateTouch=e}updateMessage(){if(this.numOfSelectedOptions=this.optionsFirst.concat(this.optionsSecond).filter((e=>e.selected)).length,this.optionsFirst.length+this.optionsSecond.length===this.numOfSelectedOptions&&this.numOfSelectedOptions>0)this.resultMessageLabel=this.allOptionsSelectedTranslation;else if(1===this.numOfSelectedOptions)this.resultMessageLabel=this.getSelected(this.optionsFirst.filter((e=>e.selected)).length?this.optionsFirst:this.optionsSecond);else if(0===this.numOfSelectedOptions)this.resultMessageLabel=this.noOptionsSelectedTranslation;else{let e={};this.config&&this.severalOptionsSelectedTranslation&&(e[this.config.severalSelectedLabelPlaceholderName]=this.numOfSelectedOptions.toString(),this.resultMessageLabel=this.translateService.interpolate(this.severalOptionsSelectedTranslation,e))}}getSelected(e){const t=e.filter((e=>e.selected))[0],n=t.label;return n?this.translations&&this.translations[n]?this.translations[n]:n:t.value}notifyUpdate(){let e=this.optionsFirst.concat(this.optionsSecond).filter((e=>e.selected)).map((e=>e.value));e=0===e.length?void 0:e,this.propagateChange(e),this.optionsUpdated.emit(this.optionsFirst.concat(this.optionsSecond)),this.notifyUpdateValues=[e,this.optionsFirst.concat(this.optionsSecond)]}setTranslateOptionLabelFromConfig(){let e=this.config.translateOptionLabel;null!=e&&(this.translateOptionLabel=e)}}return e.ɵfac=function(t){return new(t||e)(o["ɵɵdirectiveInject"](o.ElementRef),o["ɵɵdirectiveInject"](s.s))},e.ɵcmp=o["ɵɵdefineComponent"]({type:e,selectors:[["bx-multi-select"]],hostBindings:function(e,t){1&e&&o["ɵɵlistener"]("click",(function(e){return t.closeGlobal(e)}),!1,o["ɵɵresolveDocument"])},inputs:{bxId:"bxId",options:"options",state:"state",translateOptionLabel:"translateOptionLabel",errorMessage:"errorMessage",config:"config"},outputs:{optionsUpdated:"optionsUpdated"},features:[o["ɵɵProvidersFeature"]([{provide:i.NG_VALUE_ACCESSOR,useExisting:(0,o.forwardRef)((()=>e)),multi:!0}])],decls:35,vars:20,consts:[[1,"custom-dropdown","custom-field","multi-select",3,"ngClass"],["type","text","readonly","readonly",1,"selected-elements",3,"disabled","id","value","click"],[1,"active-field",3,"ngClass"],[3,"bxRequiredField","mandatory"],[1,"icon","icon-arrow-down"],[1,"multi-select-container",3,"ngClass"],[1,"multi-select-options"],[1,"clear-all"],["class","custom-link select-all",3,"bxTranslate","click",4,"ngIf"],["class","custom-link deselect-all",3,"bxTranslate","click",4,"ngIf"],["class","custom-checkbox native-toggle",4,"ngFor","ngForOf"],["class","error-msg",3,"bxTranslate",4,"ngIf"],[1,"custom-link","select-all",3,"bxTranslate","click"],[1,"custom-link","deselect-all",3,"bxTranslate","click"],[1,"custom-checkbox","native-toggle"],["type","checkbox","role","checkbox",3,"id","checked","click"],[3,"for",4,"ngIf"],[3,"for","bxTranslate",4,"ngIf"],[3,"for"],[3,"for","bxTranslate"],[1,"error-msg",3,"bxTranslate"]],template:function(e,t){1&e&&(o["ɵɵtext"](0,"\n        "),o["ɵɵelementStart"](1,"figure",0),o["ɵɵtext"](2,"\n            "),o["ɵɵelementStart"](3,"input",1),o["ɵɵlistener"]("click",(function(){return t.toggleOpen()})),o["ɵɵelementEnd"](),o["ɵɵtext"](4,"\n            "),o["ɵɵelementStart"](5,"label",2),o["ɵɵtext"](6,"\n                "),o["ɵɵelement"](7,"span",3),o["ɵɵtext"](8,"\n                "),o["ɵɵelement"](9,"i",4),o["ɵɵtext"](10,"\n            "),o["ɵɵelementEnd"](),o["ɵɵtext"](11,"\n            "),o["ɵɵelementStart"](12,"div",5),o["ɵɵtext"](13,"\n                "),o["ɵɵelementStart"](14,"ul",6),o["ɵɵtext"](15,"\n                    "),o["ɵɵelementStart"](16,"li",7),o["ɵɵtext"](17,"\n                        "),o["ɵɵtemplate"](18,c,2,0,"a",8),o["ɵɵtext"](19,"\n                        "),o["ɵɵtemplate"](20,p,2,0,"a",9),o["ɵɵtext"](21,"\n                    "),o["ɵɵelementEnd"](),o["ɵɵtext"](22,"\n                    "),o["ɵɵtemplate"](23,h,10,5,"li",10),o["ɵɵtext"](24,"\n                "),o["ɵɵelementEnd"](),o["ɵɵtext"](25,"\n                "),o["ɵɵelementStart"](26,"ul",6),o["ɵɵtext"](27,"\n                    "),o["ɵɵtemplate"](28,C,10,5,"li",10),o["ɵɵtext"](29,"\n                "),o["ɵɵelementEnd"](),o["ɵɵtext"](30,"\n            "),o["ɵɵelementEnd"](),o["ɵɵtext"](31,"\n            "),o["ɵɵtemplate"](32,v,1,3,"p",11),o["ɵɵtext"](33,"\n        "),o["ɵɵelementEnd"](),o["ɵɵtext"](34,"\n    ")),2&e&&(o["ɵɵadvance"](1),o["ɵɵproperty"]("ngClass",o["ɵɵpureFunction3"](13,y,"error"===t.state,"valid"===t.state,t.opened)),o["ɵɵadvance"](2),o["ɵɵpropertyInterpolate"]("id",t.bxId),o["ɵɵpropertyInterpolate"]("value",t.resultMessageLabel),o["ɵɵproperty"]("disabled",t.config.disabled),o["ɵɵadvance"](2),o["ɵɵproperty"]("ngClass",o["ɵɵpureFunction0"](17,S)),o["ɵɵadvance"](2),o["ɵɵproperty"]("bxRequiredField",t.label)("mandatory",t.required),o["ɵɵadvance"](5),o["ɵɵproperty"]("ngClass",o["ɵɵpureFunction1"](18,O,t.opened)),o["ɵɵadvance"](6),o["ɵɵproperty"]("ngIf",t.config.selectAll),o["ɵɵadvance"](2),o["ɵɵproperty"]("ngIf",t.config.deselectAll),o["ɵɵadvance"](3),o["ɵɵproperty"]("ngForOf",t.optionsFirst),o["ɵɵadvance"](5),o["ɵɵproperty"]("ngForOf",t.optionsSecond),o["ɵɵadvance"](4),o["ɵɵproperty"]("ngIf",t.errorMessage))},directives:[r.NgClass,l.w,r.NgIf,r.NgForOf,a.P],styles:["[_nghost-%COMP%]   .clear-all[_ngcontent-%COMP%]   a[_ngcontent-%COMP%] {\n  margin-right: 10px; }\n\n[_nghost-%COMP%]   .multi-select-container[_ngcontent-%COMP%] {\n  z-index: 2; }\n\n[_nghost-%COMP%]   .multi-select-container[_ngcontent-%COMP%]   label[_ngcontent-%COMP%] {\n    vertical-align: middle;\n    line-height: 1.17em;\n    padding-right: 19px; }\n\n[_nghost-%COMP%]   .multi-select-container[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   .custom-checkbox[_ngcontent-%COMP%] {\n    overflow: visible; }\n\n.two-rows[_nghost-%COMP%]   .multi-select-options[_ngcontent-%COMP%] {\n  width: 50%;\n  float: left;\n  padding: 0 10px; }\n\n.two-rows[_nghost-%COMP%]   .multi-select-options[_ngcontent-%COMP%]:first-child {\n    border-right: var(--multiSelectTwoColumsBorder, 2px solid #CECED3); }\n\n.two-rows[_nghost-%COMP%]   .multi-select-options[_ngcontent-%COMP%]:last-child {\n    padding-top: 36px; }\n\n.one-row[_nghost-%COMP%]   .multi-select-options[_ngcontent-%COMP%] {\n  width: 100%;\n  padding: 0 10px; }\n\n.one-row[_nghost-%COMP%]   .multi-select-options[_ngcontent-%COMP%]:first-child {\n    border-right: 0; }"]}),e})()},39803:(e,t,n)=>{"use strict";n.d(t,{q:()=>l});var o=n(84704),i=n(6856),s=n(82009),r=n(57826);let l=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=r["ɵɵdefineNgModule"]({type:e}),e.ɵinj=r["ɵɵdefineInjector"]({imports:[[i.CommonModule,o.a,s.D]]}),e})()},22490:(e,t,n)=>{"use strict";n.d(t,{O:()=>i.O,q:()=>o.q});var o=n(39803),i=n(77428)},72145:(e,t,n)=>{"use strict";n.d(t,{z:()=>a});var o=n(23550),i=n(4309),s=n(42998);class r{static fromJsonToHostedPlayer(e){return{profileId:e.profileId,isHostRequested:e.isHostRequested,hostId:e.hostId,hostName:e.hostName,contactFrequency:e.contactFrequency,preferredContactTime:e.preferredContactTime,preferredContactType:e.preferredContactType,preferredContactTimeFrom:e.preferredContactTimeFrom,preferredContactTimeTo:e.preferredContactTimeTo,familyKnows:e.familyKnows,strategy:e.strategy,nonFiatCertificationFull:e.nonFiatCertificationFull,nonFiatCertificationMedium:e.nonFiatCertificationMedium,nonFiatCertificationNone:e.nonFiatCertificationNone}}static fromJsonToPublicHostedPlayer(e){return{isHostRequested:e.isHostRequested,contactFrequency:e.contactFrequency,preferredContactType:e.preferredContactType,preferredContactTimeFrom:e.preferredContactTimeFrom,preferredContactTimeTo:e.preferredContactTimeTo}}static fromHostedPlayerToJson({contactFrequency:e,familyKnows:t,isHostRequested:n,hostId:o,hostName:i,nonFiatCertificationFull:s,nonFiatCertificationMedium:r,nonFiatCertificationNone:l,preferredContactTime:a,preferredContactType:c,preferredContactTimeFrom:p,preferredContactTimeTo:d,profileId:u,strategy:f}){return{profileId:u,isHostRequested:void 0!==n?n:null,hostId:o||null,hostName:i||null,contactFrequency:e||null,preferredContactTime:a||null,preferredContactType:c||null,preferredContactTimeFrom:p||null,preferredContactTimeTo:d||null,familyKnows:t||null,strategy:f||null,nonFiatCertificationFull:s||null,nonFiatCertificationMedium:r||null,nonFiatCertificationNone:l||null}}}var l=n(57826);let a=(()=>{class e{constructor(e){this.http=e,this.PROFILE_BASE_URL="/services/profile/v1/profiles"}getHostedPlayerUrl(t){const n=t||e.SESSION_ID_PLACEHOLDER;return`${this.PROFILE_BASE_URL}/${n}/hosted-player`}getPublicHostedPlayer(){return this.http.get(this.getHostedPlayerUrl(),{withCredentials:!0}).pipe((0,s.map)((e=>r.fromJsonToPublicHostedPlayer(e))),(0,s.catchError)((e=>404==e.status?(0,i.of)({}):(0,i.throwError)(e))))}getHostedPlayer(e){return this.http.get(this.getHostedPlayerUrl(e),{withCredentials:!0}).pipe((0,s.map)((e=>r.fromJsonToHostedPlayer(e))),(0,s.catchError)((e=>404==e.status?(0,i.of)({}):(0,i.throwError)(e))))}updateHostedPlayer(e){return this.http.put(this.getHostedPlayerUrl(e.profileId),r.fromHostedPlayerToJson(e),{withCredentials:!0})}updateHostedPlayerSupervisor(e){return this.http.put(`${this.getHostedPlayerUrl(e.profileId)}-supervisor`,r.fromHostedPlayerToJson(e),{withCredentials:!0})}}return e.SESSION_ID_PLACEHOLDER="<sessionId>",e.ɵfac=function(t){return new(t||e)(l["ɵɵinject"](o.HttpClient))},e.ɵprov=l["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})()},35108:(e,t,n)=>{var o=n(83006),i=n(16071),s=n(63253);e.exports=o((function(e,t,n){return i(e,s(t,n))}))}}]);