1"use strict";(self.webpackChunkyanport_app=self.webpackChunkyanport_app||[]).push([[4175],{765:(Dt,G,c)=>{c.d(G,{e:()=>A});var A=function(P){return P.fibonacci=s=>s<=1?s:P.fibonacci(s-1)+P.fibonacci(s-2),P.safeDivide=(s,F)=>(s||F)&&F?s/F:0,P.truncateDecimals=(s,F)=>{const p=Math.pow(10,F);return Math.trunc(s*p)/p},P}(A||{})},34175:(Dt,G,c)=>{c.r(G),c.d(G,{BillingModule:()=>Yo});var A=c(38132),P=c(57049),s=c(2615),F=c(14884),p=c(89143),t=c(73664);function kt(n,o){if(1&n){const i=t.RV6();t.j41(0,"div",4)(1,"app-billing-consumption-indicator-toggle",7),t.bIt("onToggleChange",function(a){s.eBV(i);const r=t.XpG();return s.Njj(r.onChangeConsumptionIndicatorType(a))}),t.k0s()()}if(2&n){const i=t.XpG();t.R7$(),t.Y8G("indicatorType",i.consumptionIndicatorType())}}let nt=(()=>{var n;class o{constructor(){this.OfferType=p.yUy.OfferType,this.consumptionIndicatorType=(0,s.vPA)(F.Z.CREDIT)}onChangeConsumptionIndicatorType(e){this.consumptionIndicatorType.set(e)}static#t=n=()=>(this.\u0275fac=function(a){return new(a||o)},this.\u0275cmp=t.VBU({type:o,selectors:[["app-billing-remaining-credits-card"]],inputs:{currentPeriodConsumedCredits:"currentPeriodConsumedCredits",subscription:"subscription"},standalone:!1,decls:10,vars:4,consts:[["appearance","outlined",1,"billing-card-container"],[1,"billing-remaining-credits-card-container"],[1,"header"],[1,"title"],[1,"filter-buttons-container"],[1,"remaining-credits-bar-container"],[3,"currentPeriodConsumedCredits","indicatorType","subscription"],[3,"onToggleChange","indicatorType"]],template:function(a,r){1&a&&(t.j41(0,"mat-card",0)(1,"mat-card-content")(2,"div",1)(3,"div",2)(4,"div",3)(5,"h3"),t.EFF(6,"Mes cr\xe9dits"),t.k0s()(),t.nVh(7,kt,2,1,"div",4),t.k0s(),t.j41(8,"div",5),t.nrm(9,"app-remaining-credits-bar",6),t.k0s()()()()),2&a&&(t.R7$(7),t.vxM(r.subscription.offerType===r.OfferType.LICENSE_AND_CONSUMPTION?7:-1),t.R7$(2),t.Y8G("currentPeriodConsumedCredits",r.currentPeriodConsumedCredits)("indicatorType",r.consumptionIndicatorType())("subscription",r.subscription))},styles:["[_ngcontent-%COMP%]:root{--app-primary-color-0: #000000;--app-primary-color-10: #001947;--app-primary-color-20: #002C71;--app-primary-color-25: #003688;--app-primary-color-30: #00419F;--app-primary-color-35: #0E4CB2;--app-primary-color-40: #2459BF;--app-primary-color-50: #4473D9;--app-primary-color-60: #608DF5;--app-primary-color-70: #87A9FF;--app-primary-color-80: #B1C5FF;--app-primary-color-90: #DAE2FF;--app-primary-color-95: #EEF0FF;--app-primary-color-98: #FAF8FF;--app-primary-color-99: #FEFBFF;--app-primary-color-100: #FFFFFF;--app-tertiary-color-0: #000000;--app-tertiary-color-10: #400010;--app-tertiary-color-20: #67001E;--app-tertiary-color-25: #7C0026;--app-tertiary-color-30: #8E0C30;--app-tertiary-color-35: #9F1C3B;--app-tertiary-color-40: #AF2A46;--app-tertiary-color-50: #D1445D;--app-tertiary-color-60: #F35D75;--app-tertiary-color-70: #FF8795;--app-tertiary-color-80: #FFB2B9;--app-tertiary-color-90: #FFDADC;--app-tertiary-color-95: #FFECED;--app-tertiary-color-98: #FFF8F7;--app-tertiary-color-99: #FFFBFF;--app-tertiary-color-100: #FFFFFF}.mat-mdc-card[_ngcontent-%COMP%]{color:#616161;height:100%;box-sizing:border-box}.mat-mdc-card[_ngcontent-%COMP%] .mat-mdc-card-content[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--spacer-3);margin-bottom:var(--spacer)}.mat-mdc-card[_ngcontent-%COMP%] .mat-mdc-card-content[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{flex:1 1 0;min-width:fit-content}.mat-mdc-card[_ngcontent-%COMP%] .mat-mdc-card-content[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;font:var(--md-sys-typescale-title-medium);letter-spacing:var(--md-sys-typescale-title-medium-tracking)}.mat-mdc-card[_ngcontent-%COMP%] .mat-mdc-card-content[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .filter-buttons-container[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;align-items:center;flex-wrap:wrap;gap:var(--spacer-2)}.billing-card-container[_ngcontent-%COMP%]{flex:1 1 0}@media (max-width: 599px){.mat-card[_ngcontent-%COMP%] .mat-card-content[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{flex-direction:column}.mat-card[_ngcontent-%COMP%] .mat-card-content[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .filter-buttons-container[_ngcontent-%COMP%]{justify-content:center}}",".mat-mdc-card-content[_ngcontent-%COMP%]{height:100%}.mat-mdc-card-content[_ngcontent-%COMP%] .billing-remaining-credits-card-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;box-sizing:border-box}.mat-mdc-card-content[_ngcontent-%COMP%] .billing-remaining-credits-card-container[_ngcontent-%COMP%] .remaining-credits-bar-container[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column;justify-content:center}"],changeDetection:0}))}return n(),o})();var D=c(17705),h=c(88834),y=c(99213),v=c(59115),f=c(70759);function Bt(n,o){if(1&n){const i=t.RV6();t.j41(0,"button",4),t.bIt("click",function(){const a=s.eBV(i).$implicit,r=t.XpG
1();return s.Njj(r.onIntervalSelected.emit(a))}),t.EFF(1),t.nI1(2,"translate"),t.k0s()}if(2&n){const i=o.$implicit,e=t.XpG();t.AVh("selected",e.intervalUnit===i),t.R7$(),t.JRh(t.bMT(2,3,i))}}let St=(()=>{var n;class o{constructor(){this.onIntervalSelected=(0,D.CGW)(),this.values=[p.adT.DAYS,p.adT.MONTHS,p.adT.QUARTERS,p.adT.YEARS]}static#t=n=()=>(this.\u0275fac=function(a){return new(a||o)},this.\u0275cmp=t.VBU({type:o,selectors:[["app-billing-interval-select"]],inputs:{intervalUnit:"intervalUnit"},outputs:{onIntervalSelected:"onIntervalSelected"},standalone:!1,decls:9,vars:5,consts:[["intervalUnitMenu","matMenu"],["mat-stroked-button","",3,"matMenuTriggerFor"],[3,"overlapTrigger"],["mat-menu-item","",3,"selected"],["mat-menu-item","",3,"click"]],template:function(a,r){if(1&a&&(t.j41(0,"button",1)(1,"mat-icon"),t.EFF(2,"date_range"),t.k0s(),t.EFF(3),t.nI1(4,"translate"),t.k0s(),t.j41(5,"mat-menu",2,0),t.Z7z(7,Bt,3,5,"button",3,t.fX1),t.k0s()),2&a){const l=t.sdS(6);t.Y8G("matMenuTriggerFor",l),t.R7$(3),t.SpI(" ",t.bMT(4,3,r.intervalUnit),"\n"),t.R7$(2),t.Y8G("overlapTrigger",!1),t.R7$(2),t.Dyx(r.values)}},dependencies:[h.$z,y.An,v.kk,v.fb,v.Cp,f.D9],styles:[".mat-icon[_ngcontent-%COMP%]{font-size:24px!important;height:24px!important;width:24px!important;line-height:24px!important;margin-right:var(--spacer-1)}"]}))}return n(),o})();var m=c(89417),I=c(95232);class U{constructor(o){this.id=o.id,this.label=o.label,this.avatarUrl=o.avatarUrl}static fromUser(o){return new U({id:o.safeId(),label:o.personalInfo.fullName||"",avatarUrl:o.personalInfo.avatarUrl})}static fromApiToken(o){return new U({id:o.safeId(),label:o.subject})}}var et=c(18743),It=c(57876),ot=c(16622),M=c(20039),xt=c(40936),it=c(18359),Rt=c(99172),O=c(5964),L=c(70152),At=c(23294),rt=c(25558),x=c(96354),Q=c(60850),T=c(69588),W=c(40100),$t=c(4867);const jt=["principalInput"],Ut=["menuTrigger"];function wt(n,o){if(1&n&&(t.j41(0,"button",5,4)(2,"mat-icon"),t.EFF(3),t.k0s(),t.j41(4,"span"),t.EFF(5),t.k0s()()),2&n){const i=t.XpG(),e=t.sdS(3);t.Y8G("matMenuTriggerFor",e),t.R7$(3),t.JRh(i.IconUtils.USERS_ICON),t.R7$(2),t.JRh(i.buttonLabel())}}function Nt(n,o){if(1&n&&(t.j41(0,"button",5,4)(2,"div",14)(3,"div",15),t.nrm(4,"app-avatar",16),t.k0s(),t.j41(5,"span"),t.EFF(6),t.k0s()()()),2&n){const i=t.XpG(),e=t.sdS(3);t.Y8G("matMenuTriggerFor",e),t.R7$(4),t.Y8G("url",null==i.selectedPrincipal?null:i.selectedPrincipal.avatarUrl)("name",null==i.selectedPrincipal?null:i.selectedPrincipal.label),t.R7$(2),t.JRh(null==i.selectedPrincipal?null:i.selectedPrincipal.label)}}function Gt(n,o){if(1&n){const i=t.RV6();t.j41(0,"button",12),t.bIt("click",function(){const a=s.eBV(i).$implicit,r=t.XpG
1();return s.Njj(r.selectPrincipal(a))}),t.j41(1,"div",14),t.nrm(2,"app-avatar",16),t.j41(3,"span"),t.EFF(4),t.k0s()()()}if(2&n){const i=o.$implicit;t.R7$(2),t.Y8G("url",i.avatarUrl)("name",i.label),t.R7$(2),t.JRh(i.label)}}let Lt=(()=>{var n;class o{constructor(){this.fb=(0,s.WQX)(m.ok),this.userService=(0,s.WQX)(I.DL),this.apiTokenService=(0,s.WQX)(I.v0),this.IconUtils=It.H,this.onPrincipalSelected=(0,D.CGW)(),this.suggestedPrincipals=(0,s.vPA)((0,M.B8)()),this.buttonLabel=(0,s.vPA)("Tout le monde"),this.watcher=new it.yU,this.principalControl=this.fb.nonNullable.control("")}ngOnInit(){this.principalControl.valueChanges.pipe((0,Rt.Z)(""),(0,O.p)(xt.A),(0,L.B)(200),(0,At.F)(),(0,rt.n)(e=>this.loadUsers(e))).subscribe(e=>this.suggestedPrincipals.set(e))}ngOnChanges(e){e.productSettings&&this.productSettings?.type!==e.productSettings?.previousValue?.type&&(this.buttonLabel.set(this.productSettings.type===et.Yt.Type.API?"Tous les tokens":"Tout le monde"),this.selectPrincipal(void 0),this.watcher.add(this.loadUsers().subscribe(a=>this.suggestedPrincipals.set(a)))),e.selectedPrincipal&&this.principalControl.setValue(this.selectedPrincipal?.label??"")}ngOnDestroy(){this.watcher.unsubscribe()}selectPrincipal(e){this.onPrincipalSelected.emit(e),this.menuTrigger?.closeMenu()}loadUsers(e){return this.productSettings.type===et.Yt.Type.API?this.apiTokenService.search(new p.IN4({organizationIds:this.organization.id?M.NZ.of(this.organization.id):(0,M.NZ)(),queryString:ot.J.searchExactTerms(e+"*")})).pipe((0,x.T)(a=>a.hits.map(r=>U.fromApiToken(r)))):this.userService.search(new p.rxi({organizationId:this.organization.id,queryString:ot.J.searchExactTerms(e+"*")})).pipe((0,x.T)(a=>a.hits.map(r=>U.fromUser(r))))}static#t=n=()=>(this.\u0275fac=function(a){return new(a||o)},this.\u0275cmp=t.VBU({type:o,selectors:[["app-billing-principal-select"]],viewQuery:function(a,r){if(1&a&&(t.GBs(jt,7),t.GBs(Ut,7)),2&a){let l;t.mGM(l=t.lsd())&&(r.input=l.first),t.mGM(l=t.lsd())&&(r.menuTrigger=l.first)}},inputs:{selectedPrincipal:"selectedPrincipal",productSettings:"productSettings",organization:"organization"},outputs:{onPrincipalSelected:"onPrincipalSelected"},standalone:!1,features:[t.OA$],decls:21,vars:8,consts:[["principalMenu","matMenu"],["principalInput",""],["auto","matAutocomplete"],["origin","matAutocompleteOrigin"],["menuTrigger","matMenuTrigger"],["mat-stroked-button","",3,"matMenuTriggerFor"],[1,"billing-menu-layout",3,"overlapTrigger","xPosition"],[3,"click"],["appearance","fill"],["matPrefix",""],["matInput","","placeholder","Rechercher...",3,"formControl","matAutocomplete","matAutocompleteConnectedTo"],["matAutocompleteOrigin",""],["mat-menu-item","",3,"click"],["mat-menu-item",""],[1,"button-layout"],[1,"billing-user-avatar"],[3,"url","name"]],template:function(a,r){if(1&a){const l=t.RV6();t.nVh(0,wt,6,3,"button",5)(1,Nt,7,4,"button",5),t.j41(2,"mat-menu",6,0)(4,"div",7),t.bIt("click",function(j){return s.eBV(l),s.Njj(j.stopPropagation())}),t.j41(5,"mat-form-field",8)(6,"mat-icon",9),t.EFF(7,"search"),t.k0s(),t.nrm(8,"input",10,1)(10,"mat-autocomplete",null,2),t.k0s(),t.j41(12,"div",11,3)(14,"button",12),t.bIt("click",function(){return s.eBV(l),s.Njj(r.selectPrincipal(void 0))}),t.j41(15,"mat-icon"),t.EFF(16),t.k0s(),t.j41(17,"span"),t.EFF(18),t.k0s()(),t.Z7z(19,Gt,5,3,"button",13,t.fX1),t.k0s()()()}if(2&a){const l=t.sdS(11),C=t.sdS(13);t.vxM(r.selectedPrincipal?1:0),t.R7$(2),t.Y8G("overlapTrigger",!1)("xPosition","before"),t.R7$(6),t.Y8G("formControl",r.principalControl)("matAutocomplete",l)("matAutocompleteConnectedTo",C),t.R7$(8),t.JRh(r.IconUtils.USERS_ICON),t.R7$(2),t.JRh(r.buttonLabel()),t.R7$(),t.Dyx(r.suggestedPrincipals())}},dependencies:[Q.$3,Q.pN,Q.Vn,T.rl,T.JW,W.fg,h.$z,y.An,v.kk,v.fb,v.Cp,m.me,m.BC,m.l_,$t.f],styles:[".button-layout[_ngcontent-%COMP%]{display:flex;align-items:center}.button-layout[_ngcontent-%COMP%] .billing-user-avatar[_ngcontent-%COMP%] > app-avatar[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center} .billing-menu-layout .mat-mdc-menu-content{padding-top:0;max-height:260px}
1.mat-icon[_ngcontent-%COMP%], app-avatar[_ngcontent-%COMP%]{margin-right:var(--spacer-2);font-size:24px!important;height:24px!important;width:24px!important;line-height:24px!important}"],changeDetection:0}))}return n(),o})();var at=c(89938),Vt=c(97586),_=c.n(Vt),Yt=c(68736);let zt=(()=>{var n;class o{constructor(){this.startDate=_()().utc().startOf("month"),this.endDate=_()().utc().endOf("month"),this.selectDate=(0,D.CGW)(),this.endDateLimit=_()().utc().endOf("month"),this.timeSelector=at.f.fromDates(this.startDate,this.endDate,p.adT.DAYS)}ngOnChanges(e){(e.startDate||e.endDate)&&(this.timeSelector=at.f.fromDates(this.startDate,this.endDate,p.adT.DAYS))}handleSelectDate(e){this.selectDate.emit(e)}static#t=n=()=>(this.\u0275fac=function(a){return new(a||o)},this.\u0275cmp=t.VBU({type:o,selectors:[["app-billing-period-select"]],inputs:{startDate:"startDate",endDate:"endDate"},outputs:{selectDate:"selectDate"},standalone:!1,features:[t.OA$],decls:10,vars:9,consts:[["periodPicker","matMenu"],["mat-stroked-button","",3,"matMenuTriggerFor"],[1,"button-layout"],[3,"overlapTrigger","xPosition"],[3,"onChange","timeSelector","endDateLimit","theme"]],template:function(a,r){if(1&a){const l=t.RV6();t.j41(0,"button",1)(1,"div",2)(2,"mat-icon"),t.EFF(3,"edit_calendar"),t.k0s(),t.j41(4,"span"),t.EFF(5),t.nI1(6,"timeSelector"),t.k0s()()(),t.j41(7,"mat-menu",3,0)(9,"app-period-date-picker",4),t.bIt("onChange",function(j){return s.eBV(l),s.Njj(r.handleSelectDate(j))}),t.k0s()()}if(2&a){const l=t.sdS(8);t.Y8G("matMenuTriggerFor",l),t.R7$(5),t.JRh(t.bMT(6,7,r.timeSelector)),t.R7$(2),t.Y8G("overlapTrigger",!1)("xPosition","before"),t.R7$(2),t.Y8G("timeSelector",r.timeSelector)("endDateLimit",r.endDateLimit)("theme","flat-light")}},dependencies:[h.$z,y.An,v.kk,v.Cp,Yt.P,f.hO],styles:[".mat-icon[_ngcontent-%COMP%]{margin-right:var(--spacer-1);font-size:24px!important;height:24px!important;width:24px!important;line-height:24px!important}.button-layout[_ngcontent-%COMP%]{display:flex;gap:var(--spacer-2);align-items:center}"],changeDetection:0}))}return n(),o})();var V=c(59295),ct=c(40590);function Xt(n,o){1&n&&(t.j41(0,"mat-icon",5),t.EFF(1,"info"),t.k0s()),2&n&&t.Y8G("inline",!0)("matTooltip","Simulation en euros sur la base de l'offre essentielle")}function Qt(n,o){if(1&n){const i=t.RV6();t.j41(0,"app-billing-consumption-indicator-toggle",13),t.bIt("onToggleChange",function(a){s.eBV(i);const r=t.XpG();return s.Njj(r.onChangeConsumptionIndicatorType(a))}),t.k0s()}if(2&n){const i=t.XpG();t.Y8G("indicatorType",i.consumptionIndicatorType())}}let lt=(()=>{var n;class o{constructor(){this.ConsumptionIndicatorType=F.Z,this.offerTypeToggle=[p.yUy.OfferType.LICENSE_AND_CONSUMPTION,p.yUy.OfferType.CONSUMPTION_ONLY,p.yUy.OfferType.LICENSE_ONLY],this.onQueryUpdate=(0,D.CGW)(),this.query=(0,s.vPA)({startDate:_()().utc().subtract(1,"month").startOf("day"),endDate:_()().utc().endOf("day"),intervalUnit:p.adT.DAYS}),this.consumptionIndicatorType=(0,s.vPA)(F.Z.CURRENCY),this.currentData=(0,V.EW)(()=>{const e=this.consumptionIndicatorType(),a=this.aggregationCreditDataSignal(),r=this.aggregationCurrencyDataSignal();return e===F.Z.CREDIT?a:r}),this.plotOptions=(0,V.EW)(()=>({consumptionIndicatorType:this.consumptionIndicatorType(),intervalUnit:this.query().intervalUnit})),this.aggregationCreditDataSignal=(0,s.vPA)(new ct.D({})),this.aggregationCurrencyDataSignal=(0,s.vPA)(new ct.D({})),this.OfferType=p.yUy.OfferType}ngOnInit(){this.onQueryUpdate.emit(this.query())}ngOnChanges(e){e.aggregationCreditData&&this.aggregationCreditDataSignal.set(this.aggregationCreditData),e.aggregationCurrencyData&&this.aggregationCurrencyDataSignal.set(this.aggregationCurrencyData),e.subscription&&this.consumptionIndicatorType.set(this.defaultIndicatorType(this.subscription))}onUpdateSelectedPrincipal(e){this.query.update(a=>({...a,principal:e})),this.onQueryUpdate.emit(this.query())}handleSelectDate(e){this.query.update(a=>({...a,startDate:e.dateMin(),endDate:e.dateMax()})),this.onQueryUpdate.emit(this.query())}handleSelectIntervalUnit(e){this.query.update(a=>({...a,intervalUnit:e})),this.onQueryUpdate.emit(this.query())}onChangeConsumptionIndicatorType(e){this.consumptionIndicatorType.set(e)}defaultIndicatorType(e){return e.offerType===p.yUy.OfferType.LICENSE_AND_PACKS?F.Z.CREDIT:F.Z.CURRENCY}static#t=n=()=>(this.\u0275fac=function(a){return new(a||o)},this.\u0275cmp=t.VBU({type:o,selectors:[["app-billing-sku-details-card"]],inputs:{aggregationCreditData:"aggregationCreditData",aggregationCurrencyData:"aggregationCurrencyData",productSettings:"productSettings",organization:"organization",subscription:"subscription"},outputs:{onQueryUpdate:"onQueryUpdate"},standalone:!1,features:[t.OA$],decls:15,vars:13,consts:[["appearance","outlined",1,"billing-card-container"],[1,"billing-sku-details-card-container"],[1,"header"],[1,"title"],[1,"mat-title-medium"],[3,"inline","matTooltip"],[1,"filter-buttons-container"],[3,"selectDate","startDate","endDate"],[3,"onIntervalSelected","intervalUnit"],[3,"onPrincipalSelected","selectedPrincipal","productSettings","organization"],[3,"indicatorType"],[3,"data","options"],[3,"data","indicatorType","intervalUnit"],[3,"onToggleChange","indicatorType"]],template:function(a,r){1&a&&(t.j41(0,"mat-card",0)(1,"mat-card-content")(2,"div",1)(3,"div",2)(4,"div",3)(5,"h3",4),t.EFF(6,"Suivi de consommation"),t.k0s(),t.nVh(7,Xt,2,2,"mat-icon",5),t.k0s(),t.j41(8,"div",6)(9,"app-billing-period-select",7),t.bIt("selectDate",function(C){return r.handleSelectDate(C)}),t.k0s(),t.j41(10,"app-billing-interval-select",8),t.bIt("onIntervalSelected",function(C){return r.handleSelectIntervalUnit(C)}),t.k0s(),t.j41(11,"app-billing-principal-select",9),t.bIt("onPrincipalSelected",function(C){return r.onUpdateSelectedPrincipal(C)}),t.k0s(),t.nVh(12,Qt,1,1,"app-billing-consumption-indicator-toggle",10),t.k0s()(),t.nrm(13,"app-billing-sku-details-chart",11)(14,"app-billing-sku-details-table",12),t.k0s()()()),2&a&&(t.R
17$(7),t.vxM(r.subscription.offerType===r.OfferType.LICENSE_ONLY?7:-1),t.R7$(2),t.Y8G("startDate",r.query().startDate)("endDate",r.query().endDate),t.R7$(),t.Y8G("intervalUnit",r.query().intervalUnit),t.R7$(),t.Y8G("selectedPrincipal",r.query().principal)("productSettings",r.productSettings)("organization",r.organization),t.R7$(),t.vxM(r.offerTypeToggle.includes(r.subscription.offerType)?12:-1),t.R7$(),t.Y8G("data",r.currentData().data)("options",r.plotOptions()),t.R7$(),t.Y8G("data",r.currentData().data)("indicatorType",r.consumptionIndicatorType())("intervalUnit",r.query().intervalUnit))},styles:["[_ngcontent-%COMP%]:root{--app-primary-color-0: #000000;--app-primary-color-10: #001947;--app-primary-color-20: #002C71;--app-primary-color-25: #003688;--app-primary-color-30: #00419F;--app-primary-color-35: #0E4CB2;--app-primary-color-40: #2459BF;--app-primary-color-50: #4473D9;--app-primary-color-60: #608DF5;--app-primary-color-70: #87A9FF;--app-primary-color-80: #B1C5FF;--app-primary-color-90: #DAE2FF;--app-primary-color-95: #EEF0FF;--app-primary-color-98: #FAF8FF;--app-primary-color-99: #FEFBFF;--app-primary-color-100: #FFFFFF;--app-tertiary-color-0: #000000;--app-tertiary-color-10: #400010;--app-tertiary-color-20: #67001E;--app-tertiary-color-25: #7C0026;--app-tertiary-color-30: #8E0C30;--app-tertiary-color-35: #9F1C3B;--app-tertiary-color-40: #AF2A46;--app-tertiary-color-50: #D1445D;--app-tertiary-color-60: #F35D75;--app-tertiary-color-70: #FF8795;--app-tertiary-color-80: #FFB2B9;--app-tertiary-color-90: #FFDADC;--app-tertiary-color-95: #FFECED;--app-tertiary-color-98: #FFF8F7;--app-tertiary-color-99: #FFFBFF;--app-tertiary-color-100: #FFFFFF}.mat-mdc-card[_ngcontent-%COMP%]{color:#616161;height:100%;box-sizing:border-box}.mat-mdc-card[_ngcontent-%COMP%] .mat-mdc-card-content[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--spacer-3);margin-bottom:var(--spacer)}.mat-mdc-card[_ngcontent-%COMP%] .mat-mdc-card-content[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{flex:1 1 0;min-width:fit-content}.mat-mdc-card[_ngcontent-%COMP%] .mat-mdc-card-content[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;font:var(--md-sys-typescale-title-medium);letter-spacing:var(--md-sys-typescale-title-medium-tracking)}.mat-mdc-card[_ngcontent-%COMP%] .mat-mdc-card-content[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .filter-buttons-container[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;align-items:center;flex-wrap:wrap;gap:var(--spacer-2)}.billing-card-container[_ngcontent-%COMP%]{flex:1 1 0}@media (max-width: 599px){.mat-card[_ngcontent-%COMP%] .mat-card-content[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{flex-direction:column}.mat-card[_ngcontent-%COMP%] .mat-card-content[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .filter-buttons-container[_ngcontent-%COMP%]{justify-content:center}}",".mat-mdc-card[_ngcontent-%COMP%] .billing-sku-details-card-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between}.mat-mdc-card[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--spacer-2)}"],changeDetection:0}))}return n(),o})();var st=c(68336),pt=c(765),E=c(28539);class Wt extends p.cTQ{constructor(o,i,e){super(void 0,i.width),this.data=o,this.options=i,this.translateService=e}chart(){return{...super.chart(),type:"column"}}exporting(){return{...super.exporting(),enabled:!1}}legend(){return{...super.legend(),enabled:!0,itemStyle:{color:p.cTQ.colors.grey,fontWeight:"400"}}}series(){return this.data.map((o,i)=>this.individualSeries(i,o)).toList().map((o,i)=>(o.color=this.color(this.data.size,i),o)).toArray()}individualSeries(o,i){return{id:o.toLowerCase(),type:"column",name:this.translateService.translate(`SKU_${o}`),data:this.computePoints(i).toArray()}}computePoints(o){return o.points.map(i=>({x:i.x.valueOf(),y:E.X.ofNullable(i.y.sum).map(e=>pt.e.truncateDecimals(e,3)).orElse(i.y.sum)}))}xAxis(){let o,i;switch(this.options.intervalUnit){case p.adT.MONTHS:o=2592e6,i=function(){return`${_()(this.value).format("MMM")} ${_()(this.value).year()}`};break;
1case p.adT.QUARTERS:o=7776e6,i=function(){return new st.O(_()(this.value)).format()};break;case p.adT.YEARS:o=31104e6,i=function(){return`${_()(this.value).year()}`};break;default:o=864e5,i=function(){return _()(this.value).format("L")}}return{...super.xAxis(),type:"datetime",tickInterval:o,labels:{formatter:i}}}yAxis(){return{...super.yAxis(),max:this.data.map((o,i)=>o.points).every(o=>o.isEmpty())?120:void 0,min:0,labels:{format:this.options.consumptionIndicatorType===F.Z.CURRENCY?`{value:,4f} ${p.cTQ.units.price}`:"{text}"}}}plot(){return{...super.plot(),column:{stacking:"normal"}}}tooltip(){const o=this;return{...super.tooltip(),formatter:function(){if(!this.points)return;const i=o.options.consumptionIndicatorType===F.Z.CURRENCY?` ${p.cTQ.units.price}`:"";let e="";return this.points.forEach(a=>{e+=`<span style="color:${a.color}">\u25cf</span> ${a.series.name} : <b>${a.y}${i}</b><br/>`}),e}}}}var Jt=c(21264),dt=c.n(Jt);const Ht=["billingSkuDetailsChart"];let Zt=(()=>{var n;class o{constructor(){this.translateService=(0,s.WQX)(I.c$)}ngAfterViewInit(){this.highChart=dt().chart(this.chartContainer.nativeElement,this.chart.getOptions()),this.resizeObserver=new ResizeObserver(e=>{this.chartWidth=this.chartContainer.nativeElement.offsetWidth,this.redraw()}),this.resizeObserver.observe(this.chartContainer.nativeElement)}ngOnChanges(e){(e.data||e.options)&&this.redraw()}ngOnDestroy(){this.highChart&&this.highChart.destroy(),this.resizeObserver&&this.resizeObserver.disconnect()}redraw(){this.chart=new Wt(this.data,{...this.options,width:this.chartWidth},this.translateService),this.highChart&&this.highChart.update(this.chart.getOptions(),!0,!0)}static#t=n=()=>(this.\u0275fac=function(a){return new(a||o)},this.\u0275cmp=t.VBU({type:o,selectors:[["app-billing-sku-details-chart"]],viewQuery:function(a,r){if(1&a&&t.GBs(Ht,7),2&a){let l;t.mGM(l=t.lsd())&&(r.chartContainer=l.first)}},inputs:{data:"data",options:"options"},standalone:!1,features:[t.OA$],decls:2,vars:0,consts:[["billingSkuDetailsChart",""]],template:function(a,r){1&a&&t.nrm(0,"div",null,0)},encapsulation:2,changeDetection:0}))}return n(),o})();var mt=c(83677),d=c(76192),Y=c(40455),u=c(72200);function qt(n,o){1&n&&t.nrm(0,"th",11)}function Kt(n,o){if(1&n&&(t.j41(0,"span",13),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n){const i=o;t.Y8G("matTooltip",i.sku)("matTooltipPosition","left"),t.R7$(),t.SpI(" ",t.bMT(2,3,"SKU_"+i.sku)," ")}}function tn(n,o){if(1&n&&(t.j41(0,"td",12),t.nVh(1,Kt,3,5,"span",13),t.k0s()),2&n){let i;const e=o.$implicit,a=t.XpG();t.R7$(),t.vxM((i=a.getBillingData(e))?1:-1,i)}}function nn(n,o){1&n&&(t.j41(0,"td",14),t.EFF(1," Total"),t.k0s())}function en(n,o){if(1&n&&(t.j41(0,"th",11),t.EFF(1),t.k0s()),2&n){const i=t.XpG().$implicit;t.R7$(),t.SpI(" ",i)}}function on(n,o){if(1&n&&(t.EFF(0),t.nI1(1,"currency")),2&n){const i=t.XpG(),e=t.XpG(2).$implicit;t.SpI(" ",t.ii3(1,1,i[e],"EUR","symbol","1.0-7")," ")}}function rn(n,o){if(1&n&&(t.EFF(0),t.nI1(1,"number"),t.nI1(2,"empty")),2&n){const i=t.XpG(),e=t.XpG(2).$implicit;t.SpI(" ",t.i5U(2,3,t.bMT(1,1,i[e]),"-")," ")}}function an(n,o){if(1&n&&t.nVh(0,on,2,6)(1,rn,3,6),2&n){const i=t.XpG(3);t.vxM(i.indicatorType===i.ConsumptionIndicatorType.CURRENCY?0:1)}}function cn(n,o){if(1&n&&(t.j41(0,"td",12),t.nVh(1,an,2,1),t.k0s()),2&n){let i;const e=o.$implicit,a=t.XpG(2);t.R7$(),t.vxM((i=a.getBillingData(e))?1:-1,i)}}function ln(n,o){if(1&n&&(t.EFF(0),t.nI1(1,"currency")),2&n){const i=t.XpG(2).$implicit,e=t.XpG();t.SpI(" ",t.ii3(1,1,e.getTotal(i),"EUR","symbol","1.0-7")," ")}}function sn(n,o){if(1&n&&(t.EFF(0),t.nI1(1,"number"),t.nI1(2,"empty")),2&n){const i=t.XpG(2).$implicit,e=t.XpG();t.SpI(" ",t.i5U(2,3,t.bMT(1,1,e.getTotal(i)),"-")," ")}}function pn(n,o){if(1&n&&(t.j41(0,"td",14),t.nVh(1,ln,2,6)(2,sn,3,6),t.k0s()),2&n){const i=t.XpG(2);t.R7$(),t.vxM(i.indicatorType===i.ConsumptionIndicatorType.CURRENCY?1:2)}}function dn(n,o){1&n&&(t.qex(0,6),t.DNE(1,en,2,1,"th",3)(2,cn,2,1,"td",4)(3,pn,3,1,"td",5),t.bVm()),2&n&&t.Y8G("matColumnDef",t.mNQ(o.$implicit))}function mn(n,o){1&n&&(t.j41(0,"th",11),t.EFF(1," Total"),t.k0s())}function un(n,o){if(1&n&&(t.EFF(0),t.nI1(1,"currency")),2&n){const i=t.XpG();t.SpI(" ",t.ii3(1,1,i.total,"EUR","symbol","1.0-7")," ")}}function gn(n,o){if(1&n&&(t.EFF(0),t.nI1(1,"number"),t.nI1(2,"empty")),2&n){const i=t.XpG();t.SpI(" ",t.i5U(2,3,t.bMT(1,1,i.total),"-")," ")}}function Fn(n,o){if(1&n&&t.nVh(0,un,2,6)(1,gn,3,6),2&n){const i=t.XpG(2);t.vxM(i.indicatorType===i.ConsumptionIndicatorType.CURRENCY?0:1)}}function Cn(n,o){if(1&n&&(t.j41(0,"td",12),t.nVh(1,Fn,2,1),t.k0s()),2&n){let i;const e=o.$implicit,a=t.XpG();t.R7$(),t.vxM((i=a.getBillingData(e))?1:-1,i)}}function yn(n,o){if(1&n&&(t.EFF(0),t.nI1(1,"currency")),2&n){const i=t.XpG(2);t.SpI(" ",t.ii3(1,1,i.getTotal(),"EUR","symbol","1.0-7")," ")}}function hn(n,o){if(1&n&&(t.EFF(0),t.nI1(1,"number"),t.nI1(2,"empty")),2&n){const i=t.XpG(2);t.SpI(" ",t.i5U(2,3,t.bMT(1,1,i.getTotal()),"-")," ")}}function bn(n,o){if(1&n&&(t.j41(0,"td",14),t.nVh(1,yn,2,6)(2,hn,3,6),t.k0s()),2&n){const i=t.XpG();t.R7$(),t.vxM(i.indicatorType===i.ConsumptionIndicatorType.CURRENCY?1:2)}}function fn(n,o){1&n&&t.nrm(0,"tr",15)}function _n(n,o){1&n&&t.nrm(0,"tr",16)}function Pn(n,o){1&n&&t.nrm(0,"tr",17)}let vn=(()=>{var n;class o{constructor(){this.ConsumptionIndicatorType=F.Z,this.displayedColumns=[],this.dataSource=[]}ngOnChanges(e){e.data&&(this.dataSource=this.computeDataSource(),this.dates=this.computeDates(),this.displayedColumns=["sku",...this.dates,"total"])}trackDates(e,a){return a}getTotal(e){let a;return a=this.dataSource.map(e?r=>r[e]:r=>this.dates.filter(l=>r.hasOwnProperty(l)).reduce((l,C)=>l+r[C],0)),a=a.reduce((r,l)=>r+Number(l),0),(0,mt.A)(a,7)}getBillingData(e){return e}computeDataSource(){return this.data.map((e,a)=>({sku:a.toString(),...e.points.reduce((r,l)=>({...r,[this.formatDate(l.x)]:l.y.sum}),{}),total:(0,mt.A)(e.points.reduce((r,l)=>r+l.y.sum,0),7)})).toList().toArray()}computeDates(){return this.data.toList().flatMap(e=>e.points.map(a=>this.formatDate(a.x))).toOrderedSet()}formatDate(e){switch(this.intervalUnit){case p.adT.MONTHS:return`${e.format("MMM")} ${e.year()}`;
1case p.adT.QUARTERS:return new st.O(e).format();case p.adT.YEARS:return`${e.year()}`;default:return e.format("L")}}static#t=n=()=>(this.\u0275fac=function(a){return new(a||o)},this.\u0275cmp=t.VBU({type:o,selectors:[["app-billing-sku-details-table"]],inputs:{data:"data",indicatorType:"indicatorType",intervalUnit:"intervalUnit"},standalone:!1,features:[t.OA$],decls:15,vars:4,consts:[[1,"billing-table-container"],["mat-table","",3,"dataSource"],["matColumnDef","sku","sticky",""],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["mat-footer-cell","",4,"matFooterCellDef"],[3,"matColumnDef"],["matColumnDef","total","stickyEnd",""],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-footer-row","",4,"matFooterRowDef"],["mat-header-cell",""],["mat-cell",""],[3,"matTooltip","matTooltipPosition"],["mat-footer-cell",""],["mat-header-row",""],["mat-row",""],["mat-footer-row",""]],template:function(a,r){1&a&&(t.j41(0,"div",0)(1,"table",1),t.qex(2,2),t.DNE(3,qt,1,0,"th",3)(4,tn,2,1,"td",4)(5,nn,2,0,"td",5),t.bVm(),t.Z7z(6,dn,4,2,"ng-container",6,r.trackDates,!0),t.qex(8,7),t.DNE(9,mn,2,0,"th",3)(10,Cn,2,1,"td",4)(11,bn,3,1,"td",5),t.bVm(),t.DNE(12,fn,1,0,"tr",8)(13,_n,1,0,"tr",9)(14,Pn,1,0,"tr",10),t.k0s()()),2&a&&(t.R7$(),t.Y8G("dataSource",r.dataSource),t.R7$(5),t.Dyx(r.dates),t.R7$(6),t.Y8G("matHeaderRowDef",r.displayedColumns),t.R7$(),t.Y8G("matRowDefColumns",r.displayedColumns),t.R7$(),t.Y8G("matFooterRowDef",r.displayedColumns))},dependencies:[d.Zl,d.tL,d.ji,d.cC,d.YV,d.iL,d.Zq,d.xW,d.KS,d.$R,d.Qo,d.YZ,d.NB,d.iF,Y.oV,u.QX,u.oe,f.y5,f.D9],styles:["[_ngcontent-%COMP%]:root{--app-primary-color-0: #000000;--app-primary-color-10: #001947;--app-primary-color-20: #002C71;--app-primary-color-25: #003688;--app-primary-color-30: #00419F;--app-primary-color-35: #0E4CB2;--app-primary-color-40: #2459BF;--app-primary-color-50: #4473D9;--app-primary-color-60: #608DF5;--app-primary-color-70: #87A9FF;--app-primary-color-80: #B1C5FF;--app-primary-color-90: #DAE2FF;--app-primary-color-95: #EEF0FF;--app-primary-color-98: #FAF8FF;--app-primary-color-99: #FEFBFF;--app-primary-color-100: #FFFFFF;--app-tertiary-color-0: #000000;--app-tertiary-color-10: #400010;--app-tertiary-color-20: #67001E;--app-tertiary-color-25: #7C0026;--app-tertiary-color-30: #8E0C30;--app-tertiary-color-35: #9F1C3B;--app-tertiary-color-40: #AF2A46;--app-tertiary-color-50: #D1445D;--app-tertiary-color-60: #F35D75;--app-tertiary-color-70: #FF8795;--app-tertiary-color-80: #FFB2B9;--app-tertiary-color-90: #FFDADC;--app-tertiary-color-95: #FFECED;--app-tertiary-color-98: #FFF8F7;--app-tertiary-color-99: #FFFBFF;--app-tertiary-color-100: #FFFFFF}.billing-table-container[_ngcontent-%COMP%]{width:100%;overflow:auto}.billing-table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th.mat-mdc-header-cell[_ngcontent-%COMP%], .billing-table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td.mat-mdc-cell[_ngcontent-%COMP%], .billing-table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td.mat-mdc-footer-cell[_ngcontent-%COMP%]{color:#616161;font:var(--md-sys-typescale-body-small);letter-spacing:var(--md-sys-typescale-body-small-tracking);padding:var(--spacer-1) var(--spacer-2)}.billing-table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th.mat-mdc-header-cell[_ngcontent-%COMP%]{text-align:center}.billing-table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td.mat-mdc-cell[_ngcontent-%COMP%], .billing-table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td.mat-mdc-footer-cell[_ngcontent-%COMP%]{text-align:right}.billing-table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .mat-column-sku[_ngcontent-%COMP%]{min-width:130px}.billing-table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th.mat-mdc-header-cell[_ngcontent-%COMP%]:first-child{border:none}.billing-table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th.mat-mdc-header-cell[_ngcontent-%COMP%]:not(:first-child), .billing-table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .mat-mdc-cell[_ngcontent-%COMP%], .billing-table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .mat-mdc-footer-cell[_ngcontent-%COMP%]{border-top:1px solid var(--md-sys-color-outline-variant);border-right:none;border-bottom:none;border-left:1px solid var(--md-sys-color-outline-variant)}.billing-table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th.mat-mdc-header-cell[_ngcontent-%COMP%]:not(:first-child):last-child, .billing-table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .mat-mdc-cell[_ngcontent-%COMP%]:last-child, .billing-table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .mat-mdc-footer-cell[_ngcontent-%COMP%]:last-child{border-top:1px solid var(--md-sys-color-outline-variant);border-right:1px solid var(--md-sys-color-outline-variant);border-bottom:none;border-left:1px solid var(--md-sys-color-outline);font-weight:500}.billing-table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .mat-mdc-footer-row[_ngcontent-%COMP%] .mat-mdc-footer-cell[_ngcontent-%COMP%]{border-top:1px solid var(--md-sys-color-outline);font-weight:500}"],changeDetection:0}))}return n(),o})();var Mn=c(31189);const On=n=>[n];function En(n,o){1&n&&(t.j41(0,"th",10),t.EFF(1,"Fonctionnalit\xe9"),t.k0s())}function Tn(n,o){if(1&n&&(t.j41(0,"span",12),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n){const i=o;t.Y8G("matTooltipDisabled",!i.sku)("matTooltip",i.sku)("matTooltipPosition","before"),t.R7$(),t.SpI(" ",t.bMT(2,4,"SKU_"+i.sku)," ")}}function Dn(n,o){if(1&n&&(t.j41(0,"td",11),t.nVh(1,Tn,3,6,"span",12),t.k0s()),2&n){let i;const e=o.$implicit,a=t.XpG(2);t.R7$(),t.vxM((i=a.getData(e))?1:-1,i)}}function kn(n,o){1&n&&(t.j41(0,"th",10),t.EFF(1,"Co\xfbt en cr\xe9dits"),t.k0s())}function Bn(n,o){1&n&&t.EFF(0,"cr\xe9dit")}function Sn(n,o){1&n&&t.EFF(0,"cr\xe9dit")}function In(n,o){1&n&&t.EFF(0,"cr\xe9dits")}function xn(n,o){if(1&n&&(t.EFF(0),t.j41(1,"span",13),t.DNE(2,Bn,1,0,"ng-template",14)(3,Sn,1,0,"ng-template",15)(4,In,1,0,"ng-template",16),t.k0s()),2&n){const i=o;t.SpI(" ",i.productSkuCreditCost," "),t.R7$(),t.Y8G("ngPlural",i.productSkuCreditCost)}}function Rn(n,o){if(1&n&&(t.j41(0,"td",11),t.nVh(1,xn,5,2),t.k0s()),2&n){let i;const e=o.$implicit,a=t.XpG(2);t.R7$(),t.vxM((i=a.getData(e))?1:-1,i)}}function An(n,o){1&n&&(t.j41(0,"th",10),t.EFF(1,"Co\xfbt en euro"),t.k0s())}function $n(n,o){1&n&&(t.j41(0,"span",17),t.EFF(1),t.nI1(2,"currency"),t.k0s()),2&n&&(t.R7$(),t.JRh(t.ii3(2,1,o.productSkuCost,"EUR","symbol","1.0-7")))}function jn(n,o){if(1&n&&(t.j41(0,"td",11),t.nVh(1,$n,3,6,"span",17),t.k0s()),2&n){let i;const e=o.$implicit,a=t.XpG(2);t.R7$(),t.vxM((i=a.getData(e))?1:-1,i)}}function Un(n,o){1&n&&t.nrm(0,"tr",18)}function wn(n,o){1&n&&t.nrm(0,"tr",19)}function Nn(n,o){if(1&n&&(t.j41(0,"table",1),t.qex(1,3),t.DNE(2,En,2,0,"th",4)(3,Dn,2,1,"td",5),t.bVm(),t.qex(4,6),t.DNE(5,kn,2,0,"th",4)(6,Rn,2,1,"td",5),t.bVm(),t.qex(7,7),t.DNE(8,An,2,0,"th",4)(9,jn,2,1,"td",5),t.bVm(),t.DNE(10,Un,1,0,"tr",8)(11,wn,1,0,"tr",9),t.k0s()),2&n){const i=t.XpG();t.Y8G("dataSource",i.dataSource),t.R7$(10),t.Y8G("matHeaderRowDef",i.displayedColumns),t.R7$(),t.Y8G("matRowDefColumns",i.displayedColumns)}}function Gn(n,o){1&n&&(t.j41(0,"p",2),t.EFF(1," Comprenez comment vos cr\xe9dits sont consomm\xe9s : retrouvez ici le co\xfbt de chaque fonctionnalit\xe9 que vous avez utilis\xe9e."),t.nrm(2,"br")(3,"br"),t.EFF(4," Vous souhaitez conna\xeetre l'ensemble de nos tarifs et grille de consommation ? "),t.j41(5,"a",20),t.EFF(6,"Cliquez ici pour voir la grille tarifaire compl\xe8te"),t.k0s()())}function Ln(n,o){if(1&n&&(t.j41(0,"td",26),t.EFF(1),t.nI1(2,"intervalFormat"),t.k0s()),2&n){const i=t.XpG(2);t.R7$(),t.SpI("Cr\xe9dits forfaitaire ",t.i5U(2,1,i.subscriptionPeriod(),"lettered")," *")}}function Vn(n,o){if(1&n&&(t.j41(0,"td",11)(1,"span",17),t.EFF(2),t.nI1(3,"intervalFormat"),t.k0s()()),2&n){const i=t.XpG(2);t.R7$(2),t.Lme("",i.subscription.creditsIncluded," ",t.i5U(3,2,i.subscriptionPeriod(),"perInterval"))}}function Yn(n,o){1&n&&t.nrm(0,"tr",27)}function zn(n,o){if(1&n&&(t.EFF(0),t.nI1(1,"currency")),2&n){const i=t.XpG(2);t.SpI(" (soit ",t.ii3(1,1,i.subscription.creditUnitPrice,"EUR","symbol","1.0-7")," par cr\xe9dit) ")}}function Xn(n,o){if(1&n&&(t.j41(0,"div")(1,"table",1),t.qex(2,21),t.DNE(3,Ln,3,4,"td",22),t.bVm(),t.qex(4,23),t.DNE(5,Vn,4,5,"td",5),t.bVm(),t.DNE(6,Yn,1,0,"tr",24),t.k0s(),t.j41(7,"div",25),t.EFF(8),t.nVh(9,zn,2,6),t.k0s()()),2&n){const i=t.XpG();t.R7$(),t.Y8G("dataSource",t.eq3(4,On,null==i.subscription?null:i.subscription.creditsIncluded)),t.R7$(5),t.Y8G("matRowDefColumns",i.periodCreditsColumns),t.R7$(2),t.SpI(" * ",i.meteredPeriodExplainLabel()," "),t.R7$(),t.vxM(i.subscription.creditUnitPrice?9:-1)}}let Qn=(()=>{var n;class o{constructor(){this.consumedSkus=(0,M.NZ)(),this.dataSource=[],this.displayedColumns=["sku","productSkuCreditCost","productSkuCost"],this.periodCreditsColumns=["label","value"],this.offersWithUnitCost=[p.yUy.OfferType.LICENSE_AND_CONSUMPTION,p.yUy.OfferType.CONSUMPTION_ONLY,p.yUy.OfferType.LICENSE_ONLY],this.subscriptionPeriod=(0,s.vPA)(void 0),this.meteredPeriodExplainLabel=(0,s.vPA)("des cr\xe9dits vous sont octroy\xe9s durant la p\xe9riode de votre forfait")}ngOnChanges(e){(e.productSkuGrid||e.consumedSkus||e.subscription)&&(this.dataSource=this.computeDataSource()),e.subscription&&(this.displayedColumns=this.subscription.creditUnitPrice&&this.offersWithUnitCost.includes(this.subscription.offerType)?["sku","productSkuCreditCost","productSkuCost"]:["sku","productSkuCreditCost"],this.subscriptionPeriod.set(this.subscription.getIntervalUnit()),this.meteredPeriodExplainLabel.set(this.getMeteredPeriodExplainLabel()))}computeDataSource(){return this.productSkuGrid?.productSkuCosts.filter((e,a)=>this.consumedSkus.contains(a)).reduce((e,a,r)=>e.add(this.computeUpSellTableDataFrom(r,a)),(0,M.NZ)()).toArray()??[]}computeUpSellTableDataFrom(e,a){return{sku:e,productSkuCreditCost:a,productSkuCost:(this.subscription.convertCreditsToEuros(a)??0).toString()}}getData(e){return e}getMeteredPeriodExplainLabel(){let e;const a=this.subscription.creditsIncluded??"Des",r=E.X.ofNullable(this.subscription.fixedPrice).map(l=>" pour un montant de "+l+" \u20ac").orElse("");switch(this.subscription.getIntervalUnit()){case p.adT.YEARS:e="chaque ann\xe9e";break;
1case p.adT.QUARTERS:e="chaque trimestre";break;case p.adT.MONTHS:e="chaque mois";break;case p.adT.DAYS:e="chaque jour";break;default:e="sur la p\xe9riode de votre abonnement"}return`${a} cr\xe9dits vous sont octroy\xe9s ${e}${r}`}static#t=n=()=>(this.\u0275fac=function(a){return new(a||o)},this.\u0275cmp=t.VBU({type:o,selectors:[["app-billing-upsell-table"]],inputs:{subscription:"subscription",productSkuGrid:"productSkuGrid",consumedSkus:"consumedSkus"},standalone:!1,features:[t.OA$],decls:4,vars:2,consts:[[1,"upsell-table-container"],["mat-table","",3,"dataSource"],[1,"upsell-empty-state"],["matColumnDef","sku"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","productSkuCreditCost"],["matColumnDef","productSkuCost"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],[3,"matTooltipDisabled","matTooltip","matTooltipPosition"],[3,"ngPlural"],["ngPluralCase","=0"],["ngPluralCase","=1"],["ngPluralCase","other"],[1,"emphase-label"],["mat-header-row",""],["mat-row",""],["href","https://support.yanport.com/hc/fr/articles/21444802613916-Comment-suivre-le-d%C3%A9tail-de-ma-consommation-par-fonctionnalit%C3%A9-et-par-utilisateur","target","_blank"],["matColumnDef","label"],["mat-cell","","colspan","2",4,"matCellDef"],["matColumnDef","value"],["mat-row","","class","keep-border-top",4,"matRowDef","matRowDefColumns"],[1,"explain-label"],["mat-cell","","colspan","2"],["mat-row","",1,"keep-border-top"]],template:function(a,r){1&a&&(t.j41(0,"div",0),t.nVh(1,Nn,12,3,"table",1)(2,Gn,7,0,"p",2),t.nVh(3,Xn,10,6,"div"),t.k0s()),2&a&&(t.R7$(),t.vxM(r.dataSource.length>0?1:2),t.R7$(2),t.vxM(null!=r.subscription&&r.subscription.creditsIncluded?3:-1))},dependencies:[d.Zl,d.tL,d.ji,d.cC,d.YV,d.iL,d.KS,d.$R,d.YZ,d.NB,Y.oV,u.IJ,u.WO,u.oe,f.D9,Mn.V],styles:["[_ngcontent-%COMP%]:root{--app-primary-color-0: #000000;--app-primary-color-10: #001947;--app-primary-color-20: #002C71;--app-primary-color-25: #003688;--app-primary-color-30: #00419F;--app-primary-color-35: #0E4CB2;--app-primary-color-40: #2459BF;--app-primary-color-50: #4473D9;--app-primary-color-60: #608DF5;--app-primary-color-70: #87A9FF;--app-primary-color-80: #B1C5FF;--app-primary-color-90: #DAE2FF;--app-primary-color-95: #EEF0FF;--app-primary-color-98: #FAF8FF;--app-primary-color-99: #FEFBFF;--app-primary-color-100: #FFFFFF;--app-tertiary-color-0: #000000;--app-tertiary-color-10: #400010;--app-tertiary-color-20: #67001E;--app-tertiary-color-25: #7C0026;--app-tertiary-color-30: #8E0C30;--app-tertiary-color-35: #9F1C3B;--app-tertiary-color-40: #AF2A46;--app-tertiary-color-50: #D1445D;--app-tertiary-color-60: #F35D75;--app-tertiary-color-70: #FF8795;--app-tertiary-color-80: #FFB2B9;--app-tertiary-color-90: #FFDADC;--app-tertiary-color-95: #FFECED;--app-tertiary-color-98: #FFF8F7;--app-tertiary-color-99: #FFFBFF;--app-tertiary-color-100: #FFFFFF}.upsell-table-container[_ngcontent-%COMP%]{width:100%;overflow:auto;display:flex;flex-direction:column;gap:var(--spacer-5)}.upsell-table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.upsell-table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .mat-mdc-header-row[_ngcontent-%COMP%] th.mat-mdc-header-cell[_ngcontent-%COMP%]{color:#616161;font:var(--md-sys-typescale-title-small);letter-spacing:var(--md-sys-typescale-title-small-tracking)}.upsell-table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .mat-mdc-row[_ngcontent-%COMP%] td.mat-mdc-cell[_ngcontent-%COMP%]{color:#616161;font:var(--md-sys-typescale-body-medium);letter-spacing:var(--md-sys-typescale-body-medium-tracking)}.upsell-table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .mat-mdc-row[_ngcontent-%COMP%] td.mat-mdc-cell[_ngcontent-%COMP%] .emphase-label[_ngcontent-%COMP%]{color:var(--md-sys-color-secondary);font-weight:500}.upsell-table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th.mat-mdc-header-cell[_ngcontent-%COMP%], .upsell-table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td.mat-mdc-cell[_ngcontent-%COMP%]{padding:1em;border-top:1px solid var(--md-sys-color-outline-variant);border-right:none;border-bottom:none;border-left:1px solid var(--md-sys-color-outline-variant)}.upsell-table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th.mat-mdc-header-cell[_ngcontent-%COMP%]:last-child, .upsell-table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td.mat-mdc-cell[_ngcontent-%COMP%]:last-child{border-right:1px solid var(--md-sys-color-outline-variant)}.upsell-table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .mat-mdc-row[_ngcontent-%COMP%]:not(.keep-border-top):first-child td.mat-mdc-cell[_ngcontent-%COMP%]{border-top:none}.upsell-table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .mat-mdc-row[_ngcontent-%COMP%]:last-child td.mat-mdc-cell[_ngcontent-%COMP%], .upsell-table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .mat-mdc-header-row[_ngcontent-%COMP%] th.mat-mdc-header-cell[_ngcontent-%COMP%]{border-bottom:1px solid var(--md-sys-color-outline-variant)}.upsell-table-container[_ngcontent-%COMP%] .upsell-empty-state[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:underline}.explain-label[_ngcontent-%COMP%]{color:#9e9e9e;font:var(--md-sys-typescale-body-small);letter-spacing:var(--md-sys-typescale-body-small-tracking);margin-top:var(--spacer-1)}"],changeDetection:0}))}return n(),o})(),ut=(()=>{var n;class o{constructor(){this.consumedSkus=(0,M.NZ)()}static#t=n=()=>(this.\u0275fac=function(a){return new(a||o)},this.\u0275cmp=t.VBU({type:o,selectors:[["app-billing-upsell-card"]],inputs:{subscription:"subscription",productSkuGrid:"productSkuGrid",consumedSkus:"consumedSkus"},standalone:!1,decls:7,vars:3,consts:[["appearance","outlined",1,"billing-card-container"],[1,"header"],[1,"title"],[3,"subscription","productSkuGrid","consumedSkus"]],template:function(a,r){1&a&&(t.j41(0,"mat-card",0)(1,"mat-card-content")(2,"div",1)(3,"div",2)(4,"h3"),t.EFF(5,"D\xe9tails du co\xfbt par fonctionnalit\xe9s"),t.k0s()()(),t.nrm(6,"app-billing-upsell-table",3),t.k0s()()),2&a&&(t.R
17$(6),t.Y8G("subscription",r.subscription)("productSkuGrid",r.productSkuGrid)("consumedSkus",r.consumedSkus))},styles:["[_ngcontent-%COMP%]:root{--app-primary-color-0: #000000;--app-primary-color-10: #001947;--app-primary-color-20: #002C71;--app-primary-color-25: #003688;--app-primary-color-30: #00419F;--app-primary-color-35: #0E4CB2;--app-primary-color-40: #2459BF;--app-primary-color-50: #4473D9;--app-primary-color-60: #608DF5;--app-primary-color-70: #87A9FF;--app-primary-color-80: #B1C5FF;--app-primary-color-90: #DAE2FF;--app-primary-color-95: #EEF0FF;--app-primary-color-98: #FAF8FF;--app-primary-color-99: #FEFBFF;--app-primary-color-100: #FFFFFF;--app-tertiary-color-0: #000000;--app-tertiary-color-10: #400010;--app-tertiary-color-20: #67001E;--app-tertiary-color-25: #7C0026;--app-tertiary-color-30: #8E0C30;--app-tertiary-color-35: #9F1C3B;--app-tertiary-color-40: #AF2A46;--app-tertiary-color-50: #D1445D;--app-tertiary-color-60: #F35D75;--app-tertiary-color-70: #FF8795;--app-tertiary-color-80: #FFB2B9;--app-tertiary-color-90: #FFDADC;--app-tertiary-color-95: #FFECED;--app-tertiary-color-98: #FFF8F7;--app-tertiary-color-99: #FFFBFF;--app-tertiary-color-100: #FFFFFF}.mat-mdc-card[_ngcontent-%COMP%]{color:#616161;height:100%;box-sizing:border-box}.mat-mdc-card[_ngcontent-%COMP%] .mat-mdc-card-content[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--spacer-3);margin-bottom:var(--spacer)}.mat-mdc-card[_ngcontent-%COMP%] .mat-mdc-card-content[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{flex:1 1 0;min-width:fit-content}.mat-mdc-card[_ngcontent-%COMP%] .mat-mdc-card-content[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;font:var(--md-sys-typescale-title-medium);letter-spacing:var(--md-sys-typescale-title-medium-tracking)}.mat-mdc-card[_ngcontent-%COMP%] .mat-mdc-card-content[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .filter-buttons-container[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;align-items:center;flex-wrap:wrap;gap:var(--spacer-2)}.billing-card-container[_ngcontent-%COMP%]{flex:1 1 0}@media (max-width: 599px){.mat-card[_ngcontent-%COMP%] .mat-card-content[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{flex-direction:column}.mat-card[_ngcontent-%COMP%] .mat-card-content[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .filter-buttons-container[_ngcontent-%COMP%]{justify-content:center}}","[_ngcontent-%COMP%]:root{--app-primary-color-0: #000000;--app-primary-color-10: #001947;--app-primary-color-20: #002C71;--app-primary-color-25: #003688;--app-primary-color-30: #00419F;--app-primary-color-35: #0E4CB2;--app-primary-color-40: #2459BF;--app-primary-color-50: #4473D9;--app-primary-color-60: #608DF5;--app-primary-color-70: #87A9FF;--app-primary-color-80: #B1C5FF;--app-primary-color-90: #DAE2FF;--app-primary-color-95: #EEF0FF;--app-primary-color-98: #FAF8FF;--app-primary-color-99: #FEFBFF;--app-primary-color-100: #FFFFFF;--app-tertiary-color-0: #000000;--app-tertiary-color-10: #400010;--app-tertiary-color-20: #67001E;--app-tertiary-color-25: #7C0026;--app-tertiary-color-30: #8E0C30;--app-tertiary-color-35: #9F1C3B;--app-tertiary-color-40: #AF2A46;--app-tertiary-color-50: #D1445D;--app-tertiary-color-60: #F35D75;--app-tertiary-color-70: #FF8795;--app-tertiary-color-80: #FFB2B9;--app-tertiary-color-90: #FFDADC;--app-tertiary-color-95: #FFECED;--app-tertiary-color-98: #FFF8F7;--app-tertiary-color-99: #FFFBFF;--app-tertiary-color-100: #FFFFFF}.hint-box[_ngcontent-%COMP%]{padding:var(--spacer-2);color:#0000008a;font-size:13px;border:1px solid rgba(0,0,0,.54);border-radius:5px;margin-top:var(--spacer);display:flex;gap:4px;align-items:center}"],changeDetection:0}))}return n(),o})(),gt=(()=>{var n;class o{constructor(){this.onToggleChange=(0,D.CGW)(),this.label=(0,s.vPA)("Cr\xe9dit")}ngOnChanges(e){e.indicatorType&&this.label.set(this.indicatorType===F.Z.CREDIT?"Cr\xe9dit":"\u20ac")}toggleIndicatorType(){this.onToggleChange.emit(this.indicatorType===F.Z.CREDIT?F.Z.CURRENCY:F.Z.CREDIT)}static#t=n=()=>(this.\u0275fac=function(a){return new(a||o)},this.\u0275cmp=t.VBU({type:o,selectors:[["app-billing-consumption-indicator-toggle"]],inputs:{indicatorType:"indicatorType"},outputs:{onToggleChange:"onToggleChange"},standalone:!1,features:[t.OA$],decls:4,vars:1,consts:[["mat-stroked-button","",3,"click"]],template:function(a,r){1&a&&(t.j41(0,"button",0),t.bIt("click",function(){return r.toggleIndicatorType()}),t.j41(1,"mat-icon"),t.EFF(2,"swap_vert"),t.k0s(),t.EFF(3),t.k0s()),2&a&&(t.R
17$(3),t.SpI(" ",r.label(),"\n"))},dependencies:[h.$z,y.An],styles:["mat-icon[_ngcontent-%COMP%]{margin-right:var(--spacer-1);font-size:24px!important;height:24px!important;width:24px!important;line-height:24px!important}"]}))}return n(),o})();var k=c(36471),Wn=c(69793),w=c(1413),B=c(54394);let Ft=(()=>{var n;class o extends Wn.H{statusColor(e){switch(e){case w.q.Status.DRAFT:case w.q.Status.VOID:return"grey";case w.q.Status.OPEN:return"orange";case w.q.Status.PAID:return"green";case w.q.Status.UNCOLLECTIBLE:return"red";default:return}}static#t=n=()=>(this.\u0275fac=(()=>{let e;return function(r){return(e||(e=t.xGo(o)))(r||o)}})(),this.\u0275cmp=t.VBU({type:o,selectors:[["app-invoice-status-chip"]],features:[t.Vt3],decls:3,vars:4,consts:[["disableRipple","",1,"small-chip",3,"ngClass"]],template:function(a,r){1&a&&(t.j41(0,"mat-chip",0),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&a&&(t.Y8G("ngClass",r.statusColor(r.status)),t.R7$(),t.SpI(" ",t.bMT(2,2,r.status?"INVOICE.STATUS."+r.status:void 0),"\n"))},dependencies:[B.L,u.MD,u.YU,k.YN,k.Jl,f.D9],styles:["[_ngcontent-%COMP%]:root{--app-primary-color-0: #000000;--app-primary-color-10: #001947;--app-primary-color-20: #002C71;--app-primary-color-25: #003688;--app-primary-color-30: #00419F;--app-primary-color-35: #0E4CB2;--app-primary-color-40: #2459BF;--app-primary-color-50: #4473D9;--app-primary-color-60: #608DF5;--app-primary-color-70: #87A9FF;--app-primary-color-80: #B1C5FF;--app-primary-color-90: #DAE2FF;--app-primary-color-95: #EEF0FF;--app-primary-color-98: #FAF8FF;--app-primary-color-99: #FEFBFF;--app-primary-color-100: #FFFFFF;--app-tertiary-color-0: #000000;--app-tertiary-color-10: #400010;--app-tertiary-color-20: #67001E;--app-tertiary-color-25: #7C0026;--app-tertiary-color-30: #8E0C30;--app-tertiary-color-35: #9F1C3B;--app-tertiary-color-40: #AF2A46;--app-tertiary-color-50: #D1445D;--app-tertiary-color-60: #F35D75;--app-tertiary-color-70: #FF8795;--app-tertiary-color-80: #FFB2B9;--app-tertiary-color-90: #FFDADC;--app-tertiary-color-95: #FFECED;--app-tertiary-color-98: #FFF8F7;--app-tertiary-color-99: #FFFBFF;--app-tertiary-color-100: #FFFFFF}.mat-mdc-chip[_ngcontent-%COMP%]{--mat-chip-outline-width: 0}.mat-mdc-chip.green[_ngcontent-%COMP%]{background-color:#a5d6a7;--mat-chip-label-text-color: rgba(0, 0, 0, .87)}.mat-mdc-chip.orange[_ngcontent-%COMP%]{background-color:var(--md-extended-color-warning);--mat-chip-label-text-color: var(--md-extended-color-on-warning)}.mat-mdc-chip.red[_ngcontent-%COMP%]{background-color:var(--md-sys-color-error);--mat-chip-label-text-color: var(--md-sys-color-on-error)}.mat-mdc-chip.grey[_ngcontent-%COMP%]{background-color:#757575;--mat-chip-label-text-color: white}"],changeDetection:0}))}return n(),o})(),Jn=(()=>{var n;class o{constructor(){this.customerSupportService=(0,s.WQX)(I.Dq)}showZendesk(){this.customerSupportService.open()}static#t=n=()=>(this.\u0275fac=function(a){return new(a||o)},this.\u0275cmp=t.VBU({type:o,selectors:[["app-billing-subscription-contact-card"]],decls:31,vars:0,consts:[[1,"subscription-card"],[1,"subscription-contact-block"],[1,"subscription-card-row"],["mat-stroked-button","","href","mailto:[email protected]",1,"full-row","content-size"],["mat-stroked-button","","href","mailto:[email protected]",1,"full-row","content-size"],["mat-stroked-button","",1,"full-row","content-size",3,"click"]],template:function(a,r){1&a&&(t.j41(0,"div",0)(1,"h2"),t.EFF(2,"Besoin d'aide"),t.k0s(),t.j41(3,"div",1)(4,"div")(5,"h3",2)(6,"mat-icon"),t.EFF(7,"description"),t.k0s(),t.j41(8,"span"),t.EFF(9,"Un souci avec une facture ?"),t.k0s()(),t.j41(10,"div",2)(11,"a",3),t.EFF(12," Contacter l'\xe9quipe administrative "),t.k0s()()(),t.j41(13,"div")(14,"h3",2)(15,"mat-icon"),t.EFF(16,"desktop_windows"),t.k0s(),t.j41(17,"span"),t.EFF(18,"Une question sur votre abonnement ?"),t.k0s()(),t.j41(19,"div",2)(20,"a",4),t.EFF(21," Contacter l'\xe9quipe commerciale "),t.k0s()()()(),t.j41(22,"div")(23,"h3",2)(24,"mat-icon"),t.EFF(25,"support_agent"),t.k0s(),t.j41(26,"span"),t.EFF(27,"Vous avez une question ?"),t.k0s()(),t.j41(28,"div",2)(29,"a",5),t.bIt("click",function(){return r.showZendesk()}),t.EFF(30," Contacter le support "),t.k0s()()()())},dependencies:[y.m_,y.An,h.Hl,h.$z],styles:["[_ngcontent-%COMP%]:root{--app-primary-color-0: #000000;--app-primary-color-10: #001947;--app-primary-color-20: #002C71;--app-primary-color-25: #003688;--app-primary-color-30: #00419F;--app-primary-color-35: #0E4CB2;--app-primary-color-40: #2459BF;--app-primary-color-50: #4473D9;--app-primary-color-60: #608DF5;--app-primary-color-70: #87A9FF;--app-primary-color-80: #B1C5FF;--app-primary-color-90: #DAE2FF;--app-primary-color-95: #EEF0FF;--app-primary-color-98: #FAF8FF;--app-primary-color-99: #FEFBFF;
1--app-primary-color-100: #FFFFFF;--app-tertiary-color-0: #000000;--app-tertiary-color-10: #400010;--app-tertiary-color-20: #67001E;--app-tertiary-color-25: #7C0026;--app-tertiary-color-30: #8E0C30;--app-tertiary-color-35: #9F1C3B;--app-tertiary-color-40: #AF2A46;--app-tertiary-color-50: #D1445D;--app-tertiary-color-60: #F35D75;--app-tertiary-color-70: #FF8795;--app-tertiary-color-80: #FFB2B9;--app-tertiary-color-90: #FFDADC;--app-tertiary-color-95: #FFECED;--app-tertiary-color-98: #FFF8F7;--app-tertiary-color-99: #FFFBFF;--app-tertiary-color-100: #FFFFFF}.subscription-justify-items-stretch[_nghost-%COMP%] .subscription-card[_ngcontent-%COMP%]{height:100%;box-sizing:border-box}.subscription-card[_ngcontent-%COMP%]{padding:calc(var(--spacer) * 2);display:grid;align-items:baseline;background-color:var(--md-sys-color-surface);border:.5px solid var(--md-sys-color-outline-variant);border-radius:var(--spacer-2-5);color:#616161}.subscription-card[_ngcontent-%COMP%] .subscription-card-row[_ngcontent-%COMP%]{padding:var(--spacer-1) 0;display:grid;grid-template-columns:24px auto;align-items:center;column-gap:var(--spacer-2)}.subscription-card[_ngcontent-%COMP%] .subscription-card-row[_ngcontent-%COMP%] .indented[_ngcontent-%COMP%]{grid-column:2/3}.subscription-card[_ngcontent-%COMP%] .subscription-card-row[_ngcontent-%COMP%] .full-row[_ngcontent-%COMP%]{grid-column:1/3}.subscription-card[_ngcontent-%COMP%] .subscription-card-row[_ngcontent-%COMP%] .content-size[_ngcontent-%COMP%]{justify-self:baseline}.subscription-card[_ngcontent-%COMP%] .subscription-card-row[_ngcontent-%COMP%] > .mat-icon[_ngcontent-%COMP%]{font-size:24px!important;height:24px!important;width:24px!important;line-height:24px!important}.subscription-card[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .subscription-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--md-sys-typescale-title-medium);letter-spacing:var(--md-sys-typescale-title-medium-tracking);margin-bottom:0}.subscription-card[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer}.subscription-card[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:not(.mat-button-base){text-decoration:underline}",".subscription-card[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font:var(--md-sys-typescale-title-large);letter-spacing:var(--md-sys-typescale-title-large-tracking)}.subscription-card[_ngcontent-%COMP%] .subscription-contact-block[_ngcontent-%COMP%]{display:flex;flex-flow:wrap;row-gap:var(--spacer-2);column-gap:var(--spacer-4);margin-bottom:var(--spacer-2)}"],changeDetection:0}))}return n(),o})();var R=c(32591),Hn=c(86156),Ct=c(29183);function Zn(n,o){1&n&&(t.j41(0,"th",12),t.EFF(1,"Description"),t.k0s())}function qn(n,o){if(1&n&&(t.j41(0,"div",14),t.EFF(1),t.nI1(2,"empty"),t.k0s(),t.j41(3,"div"),t.EFF(4),t.k0s()),2&n){t.XpG();const i=t.r8f(1);t.R7$(),t.JRh(t.i5U(2,3,i.description,"-")),t.R7$(3),t.Lme("",null==i.periodStart?null:i.periodStart.format("L")," - ",null==i.periodEnd?null:i.periodEnd.format("L"))}}function Kn(n,o){if(1&n&&(t.j41(0,"td",13),t.SS7(1),t.nVh(2,qn,5,6),t.k0s()),2&n){const i=o.$implicit;t.R7$();const e=t.bH3(t.XpG().getElement(i));t.R7$(),t.vxM(e.isTotal?-1:2)}}function te(n,o){1&n&&(t.j41(0,"th",12),t.EFF(1,"Quantit\xe9"),t.k0s())}function ne(n,o){if(1&n&&(t.j41(0,"span"),t.EFF(1),t.k0s()),2&n){t.XpG();const i=t.r8f(1);t.R7$(),t.JRh(i.quantity)}}function ee(n,o){1&n&&(t.j41(0,"span",14),t.EFF(1,"Total"),t.k0s())}function oe(n,o){if(1&n&&(t.j41(0,"td",13),t.SS7(1),t.nVh(2,ne,2,1,"span")(3,ee,2,0,"span",14),t.k0s()),2&n){const i=o.$implicit;t.R7$();const e=t.bH3(t.XpG().getElement(i));t.R7$(),t.vxM(e.isTotal?3:2)}}function ie(n,o){1&n&&(t.j41(0,"th",12),t.EFF(1,"Montant"),t.k0s())}function re(n,o){if(1&n&&(t.j41(0,"td",13)(1,"span"),t.EFF(2),t.nI1(3,"currency"),t.k0s()()),2&n){const i=o.$implicit,e=t.XpG().getElement(i);t.R7$(),t.AVh("typography-label-large",e.isTotal),t.R7$(),t.SpI(" ",t.ii3(3,3,e.amount,"EUR","symbol","1.2-2")," ")}}function ae(n,o){1&n&&t.nrm(0,"tr",15)}function ce(n,o){1&n&&t.nrm(0,"tr",16)}let J=(()=>{var n;class o{constructor(){this.data=(0,s.WQX)(R.Vh),this.displayedColumns=["description","quantity","amount"],this.tableRowDatas=(0,s.vPA)([]),this.tableRowDatas.set(this.data.invoice.lines.map(e=>({...e,isTotal:!1})).push({amount:this.data.invoice.amount,isTotal:!0}).toArray())}getElement(e){return e}static#t=n=()=>(this.\u0275fac=function(a){return new(a||o)},this.\u0275cmp=t.VBU({type:o,selectors:[["app-billing-subscription-invoice-modal"]],decls:17,vars:3,consts:[["titleLabel","D\xe9tail de la prochaine facture"],["ngProjectAs","modal-content",5,["modal
1-content"]],["mat-table","",3,"dataSource"],["matColumnDef","description"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","quantity"],["matColumnDef","amount"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["ngProjectAs","modal-footer",5,["modal-footer"]],["mat-button","","type","button","mat-dialog-close",""],["mat-header-cell",""],["mat-cell",""],[1,"typography-label-large"],["mat-header-row",""],["mat-row",""]],template:function(a,r){1&a&&(t.j41(0,"app-modal",0),t.qex(1,1),t.j41(2,"table",2),t.qex(3,3),t.DNE(4,Zn,2,0,"th",4)(5,Kn,3,2,"td",5),t.bVm(),t.qex(6,6),t.DNE(7,te,2,0,"th",4)(8,oe,4,2,"td",5),t.bVm(),t.qex(9,7),t.DNE(10,ie,2,0,"th",4)(11,re,4,8,"td",5),t.bVm(),t.DNE(12,ae,1,0,"tr",8)(13,ce,1,0,"tr",9),t.k0s(),t.bVm(),t.qex(14,10),t.j41(15,"button",11),t.EFF(16,"Fermer"),t.k0s(),t.bVm(),t.k0s()),2&a&&(t.R7$(2),t.Y8G("dataSource",r.tableRowDatas()),t.R7$(10),t.Y8G("matHeaderRowDef",r.displayedColumns),t.R7$(),t.Y8G("matRowDefColumns",r.displayedColumns))},dependencies:[h.$z,d.$R,d.YV,d.cC,R.tx,d.KS,d.tL,d.Zl,Ct.z,d.YZ,d.ji,d.NB,d.iL,B.L,u.oe,f.y5],styles:["table[_ngcontent-%COMP%]{--mat-table-header-headline-font: var(--md-sys-typescale-label-large-font);--mat-table-header-headline-size: var(--md-sys-typescale-label-large-size);--mat-table-header-headline-line-height: var(--md-sys-typescale-label-large-line-height);--mat-table-header-headline-weight: var(--md-sys-typescale-label-large-weight);--mat-table-header-headline-tracking: var(--md-sys-typescale-label-large-tracking)}table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding-top:var(--spacer-2);padding-bottom:var(--spacer-2)}table[_ngcontent-%COMP%] .mat-column-quantity[_ngcontent-%COMP%], table[_ngcontent-%COMP%] .mat-column-amount[_ngcontent-%COMP%]{text-align:right}"]}))}return n(),o})();function le(n,o){1&n&&(t.j41(0,"mat-icon",4),t.EFF(1,"info"),t.k0s()),2&n&&t.Y8G("matTooltip",o)}function se(n,o){1&n&&(t.j41(0,"span"),t.EFF(1,"Pas de prochaine facture"),t.k0s())}function pe(n,o){if(1&n&&(t.j41(0,"span"),t.EFF(1,"Prochaine facture pr\xe9vue le "),t.j41(2,"b"),t.EFF(3),t.nI1(4,"empty"),t.k0s(),t.EFF(5),t.j41(6,"b"),t.EFF(7),t.nI1(8,"currency"),t.nI1(9,"empty"),t.k0s()()),2&n){let i;const e=t.XpG();t.R7$(3),t.JRh(t.i5U(4,3,null==(i=e.nextInvoiceDate())?null:i.format("L"),"-")),t.R7$(2),t.JRh(e.nextInvoice?" d'un montant de ":""),t.R7$(2),t.JRh(t.i5U(9,11,t.ii3(8,6,null==e.nextInvoice?null:e.nextInvoice.amount,"EUR","symbol","1.2-2"),""))}}function de(n,o){if(1&n){const i=t.RV6();t.j41(0,"p",3)(1,"button",7),t.bIt("click",function(){s.eBV(i);const a=t.XpG();return s.Njj(a.openInvoiceModal())}),t.EFF(2," D\xe9tail de la facture "),t.k0s()()}}(J||(J={})).Data=class o{};let me=(()=>{var n;class o{constructor(){this.currentDate=_().utc(),this.status=p.qOK.Status,this.nextInvoiceDate=(0,s.vPA)(void 0),this.dialog=(0,s.WQX)(R.bZ)}ngOnChanges(e){(e.subscription||e.nextInvoice)&&this.subscription&&this.nextInvoiceDate.set(this.subscription.status===p.yUy.Status.TRIALING?this.subscription.currentPeriodEnd:this.subscription.offerType===p.yUy.OfferType.PER_SEAT&&this.nextInvoice?this.nextInvoice.creationDate:this.subscription.currentPeriodEnd?.clone().add(1,"day"))}infoTooltip(){switch(this.subscription?.offerType){case p.yUy.OfferType.CONSUMPTION_ONLY:return"Le montant de vos factures varie selon votre consommation";case p.yUy.OfferType.LICENSE_AND_CONSUMPTION:return"Le montant de vos factures peut varier selon votre consommation"}}openInvoiceModal(){this.nextInvoice&&this.dialog.open(J,{width:"90vw",maxWidth:"520px",data:{invoice:this.nextInvoice}})}static#t=n=()=>(this.\u0275fac=function(a){return new(a||o)},this.\u0275cmp=t.VBU({type:o,selectors:[["app-billing-subscription-invoice-card"]],inputs:{subscription:"subscription",nextInvoice:"nextInvoice"},features:[t.OA$],decls:30,vars:22,consts:[[1,"subscription-card"],[1,"title-container"],[3,"status"],[1,"subscription-card-row"],[1,"info-icon",3,"matTooltip"],["mat-flat-button","","target","_blank",1,"indented","content-size","secondary",3,"href"],[1,"subscription-card-row","next-invoice-info"],["mat-flat-button","",1,"indented","content-size","secondary",3,"click"]],template:function(a,r){if(1&a&&(t.j41(0,"div",0)(1,"div",1)(2,"h2"),t.EFF(3,"Derni\xe8re facture"),t.k0s(),t.j41(4,"mat-chip-set"),t.nrm(5,"app-invoice-status-chip",2),t.k0s()(),t.j41(6,"p",3)(7,"mat-icon"),t.EFF(8,"calendar_today"),t.k0s(),t.j41(9,"span"),t.EFF(10," Facture du "),t.j41(11,"b"),t.EFF(12),t.nI1(13,"empty"),t.nI1(14,"empty"),t.k0s(),t.EFF(15," d'un montant de "),t.j41(16,"b"),t.EFF(17),t.nI1(18,"currency"),t.nI1(19,"empty"),t.k0s(),t.nVh(20,le,2,1,"mat-icon",4),t.k0s()(),t.j41(21,"p",3)(22,"a",5),t.EFF(23," Consulter ma facture "),t.k0s()(),t.j41(24,"p",6)(25,"mat-icon"),t.EFF(26,"alarm"),t.k0s(),t.nVh(27,se,2,0,"span")(28,pe,10,14,"span"),t.k0s(),t.nVh(29,de,3,0,"p",3),t.k0s()),2&a){let l;t.R7$(5),t.Y8G("status",(null==r.subscription||null==r.subscription.latestInvoice?null:r.subscription.latestInvoice.status)??r.status.VOID),t.R7$(7),t.Lme("",t.i5U(13,8,null==r.subscription||null==r.subscription.currentPeriodStart?null:r.subscription.currentPeriodStart.format("L"),"-")," au ",t.i5U(14,11,null==r.subscription||null==r.subscription.currentPeriodEnd?null:r.subscription.currentPeriodEnd.format("L"),"-")),t.R7$(5),t.JRh(t.i5U(19,19,t.ii3(18,14,null==r.subscription||null==r.subscription.latestInvoice?null:r.subscription.latestInvoice.amount,"EUR","symbol","1.2-2"),"-")),t.R7$(3),t.vxM((l=r.infoTooltip())?20:-1,l),t.R7$(2),t.Y8G("href",null==r.subscription||null==r.subscription.latestInvoice?null:r.subscription.latestInvoice.url,t.B4B),t.R7$(5),t.vxM(null!=r.subscription&&null!=r.subscription.cancelDate&&r.subscription.cancelDate.isBefore(r.currentDate)?27:28),t.R7$(2),t.vxM(r.
1nextInvoice?29:-1)}},dependencies:[B.L,y.m_,y.An,k.YN,k.Jo,h.Hl,h.$z,Hn.u,Y.oV,Ft,f.y5,u.oe],styles:["[_ngcontent-%COMP%]:root{--app-primary-color-0: #000000;--app-primary-color-10: #001947;--app-primary-color-20: #002C71;--app-primary-color-25: #003688;--app-primary-color-30: #00419F;--app-primary-color-35: #0E4CB2;--app-primary-color-40: #2459BF;--app-primary-color-50: #4473D9;--app-primary-color-60: #608DF5;--app-primary-color-70: #87A9FF;--app-primary-color-80: #B1C5FF;--app-primary-color-90: #DAE2FF;--app-primary-color-95: #EEF0FF;--app-primary-color-98: #FAF8FF;--app-primary-color-99: #FEFBFF;--app-primary-color-100: #FFFFFF;--app-tertiary-color-0: #000000;--app-tertiary-color-10: #400010;--app-tertiary-color-20: #67001E;--app-tertiary-color-25: #7C0026;--app-tertiary-color-30: #8E0C30;--app-tertiary-color-35: #9F1C3B;--app-tertiary-color-40: #AF2A46;--app-tertiary-color-50: #D1445D;--app-tertiary-color-60: #F35D75;--app-tertiary-color-70: #FF8795;--app-tertiary-color-80: #FFB2B9;--app-tertiary-color-90: #FFDADC;--app-tertiary-color-95: #FFECED;--app-tertiary-color-98: #FFF8F7;--app-tertiary-color-99: #FFFBFF;--app-tertiary-color-100: #FFFFFF}.subscription-justify-items-stretch[_nghost-%COMP%] .subscription-card[_ngcontent-%COMP%]{height:100%;box-sizing:border-box}.subscription-card[_ngcontent-%COMP%]{padding:calc(var(--spacer) * 2);display:grid;align-items:baseline;background-color:var(--md-sys-color-surface);border:.5px solid var(--md-sys-color-outline-variant);border-radius:var(--spacer-2-5);color:#616161}.subscription-card[_ngcontent-%COMP%] .subscription-card-row[_ngcontent-%COMP%]{padding:var(--spacer-1) 0;display:grid;grid-template-columns:24px auto;align-items:center;column-gap:var(--spacer-2)}.subscription-card[_ngcontent-%COMP%] .subscription-card-row[_ngcontent-%COMP%] .indented[_ngcontent-%COMP%]{grid-column:2/3}.subscription-card[_ngcontent-%COMP%] .subscription-card-row[_ngcontent-%COMP%] .full-row[_ngcontent-%COMP%]{grid-column:1/3}.subscription-card[_ngcontent-%COMP%] .subscription-card-row[_ngcontent-%COMP%] .content-size[_ngcontent-%COMP%]{justify-self:baseline}.subscription-card[_ngcontent-%COMP%] .subscription-card-row[_ngcontent-%COMP%] > .mat-icon[_ngcontent-%COMP%]{font-size:24px!important;height:24px!important;width:24px!important;line-height:24px!important}.subscription-card[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .subscription-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--md-sys-typescale-title-medium);letter-spacing:var(--md-sys-typescale-title-medium-tracking);margin-bottom:0}.subscription-card[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer}.subscription-card[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:not(.mat-button-base){text-decoration:underline}","[_ngcontent-%COMP%]:root{--app-primary-color-0: #000000;--app-primary-color-10: #001947;--app-primary-color-20: #002C71;--app-primary-color-25: #003688;--app-primary-color-30: #00419F;--app-primary-color-35: #0E4CB2;--app-primary-color-40: #2459BF;--app-primary-color-50: #4473D9;--app-primary-color-60: #608DF5;--app-primary-color-70: #87A9FF;--app-primary-color-80: #B1C5FF;--app-primary-color-90: #DAE2FF;--app-primary-color-95: #EEF0FF;--app-primary-color-98: #FAF8FF;--app-primary-color-99: #FEFBFF;--app-primary-color-100: #FFFFFF;--app-tertiary-color-0: #000000;--app-tertiary-color-10: #400010;--app-tertiary-color-20: #67001E;--app-tertiary-color-25: #7C0026;--app-tertiary-color-30: #8E0C30;--app-tertiary-color-35: #9F1C3B;--app-tertiary-color-40: #AF2A46;--app-tertiary-color-50: #D1445D;--app-tertiary-color-60: #F35D75;--app-tertiary-color-70: #FF8795;--app-tertiary-color-80: #FFB2B9;--app-tertiary-color-90: #FFDADC;--app-tertiary-color-95: #FFECED;--app-tertiary-color-98: #FFF8F7;--app-tertiary-color-99: #FFFBFF;--app-tertiary-color-100: #FFFFFF}.subscription-card[_ngcontent-%COMP%] .title-container[_ngcontent-%COMP%]{display:flex;column-gap:var(--spacer-3)}.subscription-card[_ngcontent-%COMP%] .title-container[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font:var(--md-sys-typescale-title-large);letter-spacing:var(--md-sys-typescale-title-large-tracking)}.subscription-card[_ngcontent-%COMP%] .subscription-card-row[_ngcontent-%COMP%]{font-weight:400}.subscription-card[_ngcontent-%COMP%] .info-icon[_ngcontent-%COMP%]{margin-left:var(--spacer-1);font-size:16px!important;height:16px!important;width:16px!important;line-height:16px!important;--mat-icon-color: #bdbdbd}"],changeDetection:0}))}return n(),o})();var S=c(89079),ue=c(67575),yt=c(18738),g=c(59640);function ge(n,o){1&n&&t.EFF(0,"licences attribu\xe9es")}
1function Fe(n,o){1&n&&t.EFF(0,"licence attribu\xe9e")}function Ce(n,o){1&n&&t.EFF(0,"licences attribu\xe9es")}let ye=(()=>{var n;class o{constructor(){this.subscription=D.hFB.required(),this.organizationUsersCount=D.hFB.required(),this.licenseQuantity=(0,V.EW)(()=>this.subscription()?.seats),this.licenseQuantityPercentage=(0,V.EW)(()=>{const e=this.licenseQuantity(),a=this.organizationUsersCount();return E.X.ofNullable(e).map(r=>a/r*100).orUndefined()}),this.dialog=(0,s.WQX)(R.bZ),this.destroyRef=(0,s.WQX)(s.abz),this.store=(0,s.WQX)(g.il)}manageLicenses(){const e=this.licenseQuantity()??0,a=this.organizationUsersCount(),r=this.subscription();r&&this.dialog.open(H,{width:"90vw",maxWidth:"470px",data:{subscription:r,licenseQuantity:e,organizationUsersCount:a},panelClass:["overridden-vendor-design","app-modal--primary-theme"]}).afterClosed().pipe((0,S.pQ)(this.destroyRef),(0,O.p)(Boolean)).subscribe(C=>this.store.dispatch(yt.P.Action.updateSubscriptionLicense({licenseQuantity:C})))}static#t=n=()=>(this.\u0275fac=function(a){return new(a||o)},this.\u0275cmp=t.VBU({type:o,selectors:[["app-billing-subscription-licenses-card"]],inputs:{subscription:[1,"subscription"],organizationUsersCount:[1,"organizationUsersCount"]},decls:18,vars:7,consts:[[1,"subscription-card"],[1,"subscription-license-quantity"],[3,"ngPlural"],["ngPluralCase","=0"],["ngPluralCase","=1"],["ngPluralCase","other"],["mode","determinate",3,"value"],[1,"subscription-notice","typography-body-small"],["mat-stroked-button","","color","primary",3,"click"]],template:function(a,r){1&a&&(t.j41(0,"div",0)(1,"h2"),t.EFF(2,"Licences"),t.k0s(),t.j41(3,"p",1)(4,"span"),t.EFF(5),t.nI1(6,"empty"),t.k0s(),t.j41(7,"span",2),t.DNE(8,ge,1,0,"ng-template",3)(9,Fe,1,0,"ng-template",4)(10,Ce,1,0,"ng-template",5),t.k0s()(),t.nrm(11,"mat-progress-bar",6),t.j41(12,"span",7),t.EFF(13," Une licence est disponible lorsqu\u2019elle n\u2019est attribu\xe9e \xe0 aucun utilisateur actif et qu\u2019aucune invitation n\u2019est en attente. "),t.k0s(),t.j41(14,"button",8),t.bIt("click",function(){return r.manageLicenses()}),t.j41(15,"mat-icon"),t.EFF(16,"settings_account_box"),t.k0s(),t.EFF(17," G\xe9rer les licences "),t.k0s()()),2&a&&(t.R7$(5),t.Lme("",r.organizationUsersCount(),"/",t.i5U(6,4,r.licenseQuantity(),"-"),"\xa0"),t.R7$(2),t.Y8G("ngPlural",r.organizationUsersCount()),t.R7$(4),t.Y8G("value",r.licenseQuantityPercentage()))},dependencies:[y.An,u.IJ,h.$z,B.L,u.WO,ue.HM,f.y5],styles:["[_ngcontent-%COMP%]:root{--app-primary-color-0: #000000;--app-primary-color-10: #001947;--app-primary-color-20: #002C71;--app-primary-color-25: #003688;--app-primary-color-30: #00419F;--app-primary-color-35: #0E4CB2;--app-primary-color-40: #2459BF;--app-primary-color-50: #4473D9;--app-primary-color-60: #608DF5;--app-primary-color-70: #87A9FF;--app-primary-color-80: #B1C5FF;--app-primary-color-90: #DAE2FF;--app-primary-color-95: #EEF0FF;--app-primary-color-98: #FAF8FF;--app-primary-color-99: #FEFBFF;--app-primary-color-100: #FFFFFF;--app-tertiary-color-0: #000000;--app-tertiary-color-10: #400010;--app-tertiary-color-20: #67001E;--app-tertiary-color-25: #7C0026;--app-tertiary-color-30: #8E0C30;--app-tertiary-color-35: #9F1C3B;--app-tertiary-color-40: #AF2A46;--app-tertiary-color-50: #D1445D;--app-tertiary-color-60: #F35D75;--app-tertiary-color-70: #FF8795;--app-tertiary-color-80: #FFB2B9;--app-tertiary-color-90: #FFDADC;--app-tertiary-color-95: #FFECED;--app-tertiary-color-98: #FFF8F7;--app-tertiary-color-99: #FFFBFF;--app-tertiary-color-100: #FFFFFF}.subscription-justify-items-stretch[_nghost-%COMP%] .subscription-card[_ngcontent-%COMP%]{height:100%;box-sizing:border-box}.subscription-card[_ngcontent-%COMP%]{padding:calc(var(--spacer) * 2);display:grid;align-items:baseline;background-color:var(--md-sys-color-surface);border:.5px solid var(--md-sys-color-outline-variant);border-radius:var(--spacer-2-5);color:#616161}.subscription-card[_ngcontent-%COMP%] .subscription-card-row[_ngcontent-%COMP%]{padding:var(--spacer-1) 0;display:grid;grid-template-columns:24px auto;align-items:center;column-gap:var(--spacer-2)}.subscription-card[_ngcontent-%COMP%] .subscription-card-row[_ngcontent-%COMP%] .indented[_ngcontent-%COMP%]{grid-column:2/3}.subscription-card[_ngcontent-%COMP%] .subscription-card-row[_ngcontent-%COMP%] .full-row[_ngcontent-%COMP%]{grid-column:1/3}.subscription-card[_ngcontent-%COMP%] .subscription-card-row[_ngcontent-%COMP%] .content-size[_ngcontent-%COMP%]{justify-self:baseline}.subscription-card[_ngcontent-%COMP%] .subscription-card-row[_ngcontent-%COMP%] > .mat-icon[_ngcontent-%COMP%]{font-size:24px!important;height:24px!important;width:24px!important;line-height:24px!important}.subscription-card[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .subscription-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--md-sys-typescale-title-medium);letter-spacing:var(--md-sys-typescale-title-medium-tracking);margin-bottom:0}.subscription-card[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer}.subscription-card[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:not(.mat-button-base){text-decoration:underline}","[_ngcontent-%COMP%]:root{--app-primary-color-0: #000000;--app-primary-color-10: #001947;--app-primary-color-20: #002C71;--app-primary-color-25: #003688;--app-primary-color-30: #00419F;--app-primary-color-35: #0E4CB2;--app-primary-color-40: #2459BF;--app-primary-color-50: #4473D9;--app-primary-color-60: #608DF5;--app-primary-color-70: #87A9FF;--app-primary-color-80: #B1C5FF;--app-primary-color-90: #DAE2FF;--app-primary-color-95: #EEF0FF;--app-primary-color-98: #FAF8FF;--app-primary-color-99: #FEFBFF;
1--app-primary-color-100: #FFFFFF;--app-tertiary-color-0: #000000;--app-tertiary-color-10: #400010;--app-tertiary-color-20: #67001E;--app-tertiary-color-25: #7C0026;--app-tertiary-color-30: #8E0C30;--app-tertiary-color-35: #9F1C3B;--app-tertiary-color-40: #AF2A46;--app-tertiary-color-50: #D1445D;--app-tertiary-color-60: #F35D75;--app-tertiary-color-70: #FF8795;--app-tertiary-color-80: #FFB2B9;--app-tertiary-color-90: #FFDADC;--app-tertiary-color-95: #FFECED;--app-tertiary-color-98: #FFF8F7;--app-tertiary-color-99: #FFFBFF;--app-tertiary-color-100: #FFFFFF}.subscription-card[_ngcontent-%COMP%]{--mat-progress-bar-track-shape: 4px;--mat-progress-bar-track-height: 8px;--mat-progress-bar-active-indicator-color: var(--app-primary-color-60);--mat-progress-bar-active-indicator-height: 8px}.subscription-card[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font:var(--md-sys-typescale-title-large);letter-spacing:var(--md-sys-typescale-title-large-tracking)}.subscription-card[_ngcontent-%COMP%] .subscription-license-quantity[_ngcontent-%COMP%]{color:var(--app-primary-color-60);text-align:center}.subscription-card[_ngcontent-%COMP%] .mat-mdc-progress-bar[_ngcontent-%COMP%]{--mat-progress-bar-active-indicator-color: var(--app-primary-color-60);padding:var(--spacer-2) 0}.subscription-card[_ngcontent-%COMP%] .subscription-notice[_ngcontent-%COMP%]{color:#9e9e9e;padding-bottom:var(--spacer-2-5)}.subscription-card[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:fit-content}"],changeDetection:0}))}return n(),o})();var ht=c(98604),he=c(35974),be=c(13226),bt=c(7673),fe=c(99437);function _e(n,o){1&n&&t.EFF(0,"licence")}function Pe(n,o){1&n&&t.EFF(0,"licences")}function ve(n,o){if(1&n&&(t.j41(0,"mat-error"),t.EFF(1),t.j41(2,"span",16),t.DNE(3,_e,1,0,"ng-template",17)(4,Pe,1,0,"ng-template",18),t.k0s(),t.EFF(5," minimum "),t.k0s()),2&n){const i=t.XpG();t.R7$(),t.SpI(" ",i.data.organizationUsersCount," "),t.R7$(),t.Y8G("ngPlural",i.data.organizationUsersCount)}}let H=(()=>{var n;class o{constructor(){this.data=(0,s.WQX)(R.Vh),this.dialogRef=(0,s.WQX)(R.CP),this.fb=(0,s.WQX)(m.Qk),this.destroyRef=(0,s.WQX)(s.abz),this.billingService=(0,s.WQX)(I.Di),this.quantityControl=this.fb.control(this.data.licenseQuantity,{validators:[m.k0.required,m.k0.min(this.data.organizationUsersCount)]}),this.updatedLicenseAmount=(0,S.ot)(this.quantityControl.valueChanges.pipe((0,S.pQ)(this.destroyRef),(0,L.B)(500),(0,O.p)(e=>this.quantityControl.valid),(0,x.T)(e=>{if(e!==this.data.licenseQuantity)return E.X.ofNullable(this.data.subscription.getLicenseItem()).map(a=>a.price.getTier(e)?.unitAmountDecimal).map(a=>e*a).orUndefined()}))),this.nextInvoiceAmount=(0,S.ot)(this.quantityControl.valueChanges.pipe((0,S.pQ)(this.destroyRef),(0,L.B)(500),(0,O.p)(e=>this.quantityControl.valid&&!!this.data.subscription.externalId),(0,x.T)(e=>({subscriptionId:E.X.ofNullable(this.data.subscription.externalId).orElseThrow(()=>new Error("subscription externalId must be present")),request:new he.I({licenseQuantity:e})})),(0,rt.n)(({subscriptionId:e,request:a})=>(0,be.T)(()=>a.licenseQuantity===this.data.licenseQuantity,(0,bt.of)(void 0),this.billingService.subscriptionCreateInvoicePreview(e,a).pipe((0,O.p)(r=>r.isPresent()),(0,x.T)(r=>r.get().amount),(0,fe.W)(r=>(0,bt.of)(void 0)))))))}submit(){this.quantityControl.valid&&this.dialogRef.close(this.quantityControl.value)}static#t=n=()=>(this.\u0275fac=function(a){return new(a||o)},this.\u0275cmp=t.VBU({type:o,selectors:[["app-billing-subscription-licenses-modal"]],decls:37,vars:17,consts:[[1,"billing-subscription-licenses-modal",3,"ngSubmit"],["titleLabel","G\xe9rer les licences"],["ngProjectAs","modal-content",5,["modal
1-content"]],[1,"billing-subscription-licenses-modal-content"],[1,"licenses-form-container"],["appearance","outline","floatLabel","always"],["matInput","","type","number","placeholder","1","required","",3,"formControl"],["align","end",1,"light-grey-text"],[1,"typography-body-small"],[1,"licenses-summary-container"],[1,"typography-title-small"],[1,"licenses-summary-container-row"],[1,"light-grey-text","typography-body-small"],["ngProjectAs","modal-footer",5,["modal-footer"]],["mat-button","","type","button","mat-dialog-close",""],["mat-flat-button","","type","submit",1,"accent"],[3,"ngPlural"],["ngPluralCase","=1"],["ngPluralCase","other"]],template:function(a,r){1&a&&(t.j41(0,"form",0),t.bIt("ngSubmit",function(){return r.submit()}),t.j41(1,"app-modal",1),t.qex(2,2),t.j41(3,"div",3)(4,"div",4)(5,"mat-form-field",5)(6,"mat-label"),t.EFF(7,"Nombre total de licences"),t.k0s(),t.nrm(8,"input",6),t.j41(9,"mat-hint",7),t.EFF(10),t.k0s(),t.nVh(11,ve,6,2,"mat-error"),t.k0s(),t.j41(12,"div",8),t.EFF(13,"Modifiez ce nombre pour ajouter ou retirer des licences."),t.k0s()(),t.j41(14,"div",9)(15,"p",10),t.EFF(16,"R\xe9sum\xe9 de la modification"),t.k0s(),t.j41(17,"p",11)(18,"span"),t.EFF(19,"Nouveau montant mensuel des licences"),t.k0s(),t.j41(20,"span"),t.EFF(21),t.nI1(22,"number"),t.k0s()(),t.j41(23,"p",11)(24,"span"),t.EFF(25,"Montant de la prochaine facture"),t.k0s(),t.j41(26,"span"),t.EFF(27),t.nI1(28,"currency"),t.nI1(29,"empty"),t.k0s()(),t.j41(30,"div",12),t.EFF(31," La r\xe9gularisation au prorata sera appliqu\xe9e sur votre prochaine facture. "),t.k0s()()(),t.bVm(),t.qex(32,13),t.j41(33,"button",14),t.EFF(34,"Annuler"),t.k0s(),t.j41(35,"button",15),t.EFF(36,"Confirmer"),t.k0s(),t.bVm(),t.k0s()()),2&a&&(t.R7$(8),t.Y8G("formControl",r.quantityControl),t.R7$(2),t.Lme("",r.data.organizationUsersCount,"/",r.data.licenseQuantity," utilis\xe9es"),t.R7$(),t.vxM(r.quantityControl.hasError("required")||r.quantityControl.hasError("min")?11:-1),t.R7$(10),t.JRh(r.updatedLicenseAmount()?t.i5U(22,6,r.updatedLicenseAmount(),"1.2-2")+" \u20ac/mois":"-"),t.R7$(6),t.JRh(t.i5U(29,14,t.ii3(28,9,r.nextInvoiceAmount(),"EUR","symbol","1.2-2"),"-")))},dependencies:[T.MV,T.TL,W.fg,T.nJ,h.$z,u.IJ,u.WO,B.L,m.YN,m.qT,m.me,m.Q0,m.BC,m.cb,m.YS,m.cV,T.rl,R.tx,m.X1,m.l_,ht.u,Ct.z,u.QX,f.y5,u.oe],styles:["[_ngcontent-%COMP%]:root{--app-primary-color-0: #000000;--app-primary-color-10: #001947;--app-primary-color-20: #002C71;--app-primary-color-25: #003688;--app-primary-color-30: #00419F;--app-primary-color-35: #0E4CB2;--app-primary-color-40: #2459BF;--app-primary-color-50: #4473D9;--app-primary-color-60: #608DF5;--app-primary-color-70: #87A9FF;--app-primary-color-80: #B1C5FF;--app-primary-color-90: #DAE2FF;--app-primary-color-95: #EEF0FF;--app-primary-color-98: #FAF8FF;--app-primary-color-99: #FEFBFF;--app-primary-color-100: #FFFFFF;--app-tertiary-color-0: #000000;--app-tertiary-color-10: #400010;--app-tertiary-color-20: #67001E;--app-tertiary-color-25: #7C0026;--app-tertiary-color-30: #8E0C30;--app-tertiary-color-35: #9F1C3B;--app-tertiary-color-40: #AF2A46;--app-tertiary-color-50: #D1445D;--app-tertiary-color-60: #F35D75;--app-tertiary-color-70: #FF8795;--app-tertiary-color-80: #FFB2B9;--app-tertiary-color-90: #FFDADC;--app-tertiary-color-95: #FFECED;--app-tertiary-color-98: #FFF8F7;--app-tertiary-color-99: #FFFBFF;--app-tertiary-color-100: #FFFFFF}.billing-subscription-licenses-modal[_ngcontent-%COMP%] .billing-subscription-licenses-modal-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--spacer-3)}.billing-subscription-licenses-modal[_ngcontent-%COMP%] .billing-subscription-licenses-modal-content[_ngcontent-%COMP%] .light-grey-text[_ngcontent-%COMP%]{color:#9e9e9e}.billing-subscription-licenses-modal[_ngcontent-%COMP%] .billing-subscription-licenses-modal-content[_ngcontent-%COMP%] .licenses-form-container[_ngcontent-%COMP%], .billing-subscription-licenses-modal[_ngcontent-%COMP%] .billing-subscription-licenses-modal-content[_ngcontent-%COMP%] .licenses-summary-container[_ngcontent-%COMP%]{padding:var(--spacer-4);border-radius:var(--card-border-radius)}.billing-subscription-licenses-modal[_ngcontent-%COMP%] .billing-subscription-licenses-modal-content[_ngcontent-%COMP%] .licenses-form-container[_ngcontent-%COMP%]{border:1px solid #e0e0e0;--mat-form-field-outlined-container-shape: var(--spacer-2-5)}.billing-subscription-licenses-modal[_ngcontent-%COMP%] .billing-subscription-licenses-modal-content[_ngcontent-%COMP%] .licenses-form-container[_ngcontent-%COMP%] .mat-mdc-form-field[_ngcontent-%COMP%]{width:240px;padding-bottom:var(--spacer-2-5)}.billing-subscription-licenses-modal[_ngcontent-%COMP%] .billing-subscription-licenses-modal-content[_ngcontent-%COMP%] .licenses-summary-container[_ngcontent-%COMP%]{background-color:var(--md-sys-color-surface-container)}.billing-subscription-licenses-modal[_ngcontent-%COMP%] .billing-subscription-licenses-modal-content[_ngcontent-%COMP%] .licenses-summary-container[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:var(--spacer-3)}.billing-subscription-licenses-modal[_ngcontent-%COMP%] .billing-subscription-licenses-modal-content[_ngcontent-%COMP%] .licenses-summary-container[_ngcontent-%COMP%] .licenses-summary-container-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.billing-subscription-licenses-modal[_ngcontent-%COMP%] .billing-subscription-licenses-modal-content[_ngcontent-%COMP%] .licenses-summary-container[_ngcontent-%COMP%] .licenses-summary-container-row[_ngcontent-%COMP%]:not(:last-child){margin-bottom:var(--spacer-2)}"]}
1))}return n(),o})();(H||(H={})).Data=class o{};var z=c(71997),Me=c(15217);const Oe=(n,o)=>o.label;function Ee(n,o){if(1&n&&t.nrm(0,"img",8),2&n){const i=t.XpG();t.Y8G("src",null==i.subscription?null:i.subscription.productLogo,t.B4B)}}function Te(n,o){1&n&&t.eu8(0)}function De(n,o){if(1&n&&t.DNE(0,Te,1,0,"ng-container",14),2&n){t.XpG();const i=t.sdS(25);t.Y8G("ngTemplateOutlet",i)}}function ke(n,o){1&n&&t.eu8(0)}function Be(n,o){if(1&n&&t.DNE(0,ke,1,0,"ng-container",14),2&n){t.XpG();const i=t.sdS(27);t.Y8G("ngTemplateOutlet",i)}}function Se(n,o){1&n&&t.eu8(0)}function Ie(n,o){if(1&n&&t.DNE(0,Se,1,0,"ng-container",14),2&n){t.XpG();const i=t.sdS(29);t.Y8G("ngTemplateOutlet",i)}}function xe(n,o){1&n&&t.eu8(0)}function Re(n,o){if(1&n&&t.DNE(0,xe,1,0,"ng-container",14),2&n){t.XpG();const i=t.sdS(31);t.Y8G("ngTemplateOutlet",i)}}function Ae(n,o){1&n&&t.eu8(0)}function $e(n,o){if(1&n&&t.DNE(0,Ae,1,0,"ng-container",14),2&n){t.XpG();const i=t.sdS(33);t.Y8G("ngTemplateOutlet",i)}}function je(n,o){if(1&n&&(t.j41(0,"p",12)(1,"mat-icon"),t.EFF(2),t.k0s(),t.j41(3,"span",15)(4,"span"),t.EFF(5),t.nI1(6,"translate"),t.k0s(),t.j41(7,"span"),t.EFF(8),t.nI1(9,"empty"),t.k0s()()()),2&n){const i=o.$implicit;t.Y8G("hidden",i.hidden),t.R7$(2),t.JRh(i.icon),t.R7$(3),t.JRh(t.bMT(6,4,i.label)),t.R7$(3),t.JRh(t.i5U(9,6,i.formattedDate,"-"))}}function Ue(n,o){1&n&&(t.j41(0,"p",13)(1,"span",16),t.EFF(2,"Sans engagement, reconduction tacite"),t.k0s()())}function we(n,o){if(1&n&&(t.j41(0,"div")(1,"span",17),t.EFF(2),t.nI1(3,"currency"),t.nI1(4,"empty"),t.k0s(),t.j41(5,"span",18),t.EFF(6),t.nI1(7,"intervalFormat"),t.k0s()(),t.j41(8,"p",19),t.EFF(9),t.nI1(10,"number"),t.nI1(11,"empty"),t.k0s()),2&n){const i=t.XpG();t.R7$(2),t.SpI("",t.i5U(4,8,t.ii3(3,3,null==i.subscription?null:i.subscription.fixedPrice,"EUR","symbol","1.0-0"),"-")," HT"),t.R7$(4),t.JRh(t.bMT(7,11,null==i.subscription?null:i.subscription.getIntervalUnit())),t.R7$(3),t.SpI("",t.i5U(11,16,t.i5U(10,13,null==i.subscription?null:i.subscription.creditsIncluded,"1.0-0"),"-")," cr\xe9dits inclus sur la p\xe9riode")}}function Ne(n,o){if(1&n&&(t.j41(0,"div")(1,"span",17),t.EFF(2),t.nI1(3,"currency"),t.nI1(4,"empty"),t.k0s(),t.j41(5,"span",18),t.EFF(6),t.nI1(7,"intervalFormat"),t.k0s()(),t.j41(8,"p",19),t.EFF(9),t.nI1(10,"number"),t.nI1(11,"empty"),t.k0s()),2&n){const i=t.XpG();t.R7$(2),t.SpI("",t.i5U(4,8,t.ii3(3,3,null==i.subscription?null:i.subscription.fixedPrice,"EUR","symbol","1.0-0"),"-")," HT"),t.R7$(4),t.JRh(t.bMT(7,11,null==i.subscription?null:i.subscription.getIntervalUnit())),t.R7$(3),t.SpI("",t.i5U(11,16,t.i5U(10,13,null==i.subscription?null:i.subscription.creditsIncluded,"1.0-0"),"-")," cr\xe9dits inclus sur la p\xe9riode")}}function Ge(n,o){if(1&n&&(t.j41(0,"div")(1,"span",17),t.EFF(2),t.nI1(3,"currency"),t.nI1(4,"empty"),t.k0s(),t.j41(5,"span",18),t.EFF(6),t.nI1(7,"intervalFormat"),t.k0s()(),t.j41(8,"p",19),t.EFF(9,"Le montant de vos factures ne varie pas selon votre consommation"),t.k0s()),2&n){const i=t.XpG();t.R7$(2),t.SpI("",t.i5U(4,7,t.ii3(3,2,null==i.subscription?null:i.subscription.fixedPrice,"EUR","symbol","1.0-0"),"-")," HT"),t.R7$(4),t.JRh(t.bMT(7,10,null==i.subscription?null:i.subscription.getIntervalUnit()))}}function Le(n,o){if(1&n&&(t.j41(0,"div")(1,"span",17),t.EFF(2),t.nI1(3,"currency"),t.nI1(4,"empty"),t.k0s(),t.j41(5,"span",18),t.EFF(6,"/ cr\xe9dit"),t.k0s()(),t.j41(7,"p",19),t.EFF(8,"Le montant de vos factures varie selon votre consommation"),t.k0s()),2&n){const i=t.XpG();t.R7$(2),t.SpI("",t.i5U(4,6,t.ii3(3,1,null==i.subscription?null:i.subscription.creditUnitPrice,"EUR","symbol","1.0-5"),"-")," HT")}}function Ve(n,o){if(1&n&&(t.j41(0,"div")(1,"span",17),t.EFF(2),t.nI1(3,"currency"),t.nI1(4,"empty"),t.k0s(),t.j41(5,"span",18),t.EFF(6),t.nI1(7,"intervalFormat"),t.k0s()(),t.j41(8,"p",19),t.EFF(9,"Prix unitaire par license"),t.k0s()),2&n){const i=t.XpG();t.R7$(2),t.SpI("",t.i5U(4,7,t.ii3(3,2,null==i.subscription?null:i.subscription.getLicensePrice(),"EUR","symbol","1.2-2"),"-")," HT"),t.R7$(4),t.JRh(t.bMT(7,10,null==i.subscription?null:i.subscription.getIntervalUnit()))}}let Ye=(()=>{var n;class o{constructor(){this.SubscriptionOfferType=p.yUy.OfferType,this.SubscriptionStatus=p.yUy.Status,this.subscriptionDates=(0,s.vPA)((0,M.B8)())}ngOnChanges(e){e.subscription&&this.subscriptionDates.set((0,M.B8)([{icon:"event",label:"SUBSCRIPTION.DATE.START_DATE",formattedDate:this.subscription?.startDate?.format("L")},{icon:"event_repeat",label:"SUBSCRIPTION.DATE.RENEW_DATE",formattedDate:this.subscription?.currentPeriodEnd?.clone()?.add(1,"day")?.format("L"),hidden:this.subscription?.status===p.yUy.Status.CANCELED},{icon:"free_cancellation",label:"SUBSCRIPTION.DATE.CANCEL_DATE",formattedDate:this.subscription?.cancelDate?.clone()?.add(1,"day")?.format("L"),hidden:this.subscription?.status!==p.yUy.Status.CANCELED}
1]))}static#t=n=()=>(this.\u0275fac=function(a){return new(a||o)},this.\u0275cmp=t.VBU({type:o,selectors:[["app-billing-subscription-product-card"]],inputs:{subscription:"subscription"},features:[t.OA$],decls:34,vars:12,consts:[["licenseAndConsumption",""],["licenseAndPacks",""],["licenseOnly",""],["consumptionOnly",""],["perSeats",""],[1,"subscription-card"],[1,"subscription-product-upper-block"],[1,"subscription-logo-container"],["alt","Logo du produit",3,"src"],[3,"status"],[1,"subscription-description"],[1,"subscription-offer-amount-block"],[1,"subscription-card-row",3,"hidden"],[1,"subscription-info","subscription-card-row"],[4,"ngTemplateOutlet"],[1,"subscription-date"],[1,"full-row"],[1,"main-amount-info"],[1,"main-amount-interval"],[1,"sub-amount-info"]],template:function(a,r){if(1&a&&(t.j41(0,"div",5)(1,"div",6)(2,"div",7),t.nVh(3,Ee,1,1,"img",8),t.j41(4,"mat-chip-set"),t.nrm(5,"app-subscription-status-chip",9),t.k0s()(),t.j41(6,"h1"),t.EFF(7),t.nI1(8,"translate"),t.nI1(9,"uppercase"),t.k0s(),t.j41(10,"p",10),t.EFF(11),t.nI1(12,"translate"),t.k0s(),t.j41(13,"div",11),t.nVh(14,De,1,1,"ng-container")(15,Be,1,1,"ng-container")(16,Ie,1,1,"ng-container")(17,Re,1,1,"ng-container")(18,$e,1,1,"ng-container"),t.k0s()(),t.j41(19,"div"),t.nrm(20,"mat-divider"),t.Z7z(21,je,10,9,"p",12,Oe),t.k0s(),t.nVh(23,Ue,3,0,"p",13),t.k0s(),t.DNE(24,we,12,19,"ng-template",null,0,t.C5r)(26,Ne,12,19,"ng-template",null,1,t.C5r)(28,Ge,10,12,"ng-template",null,2,t.C5r)(30,Le,9,9,"ng-template",null,3,t.C5r)(32,Ve,10,12,"ng-template",null,4,t.C5r)),2&a){let l;t.R7$(3),t.vxM(null!=r.subscription&&r.subscription.productLogo?3:-1),t.R7$(2),t.Y8G("status",null==r.subscription?null:r.subscription.status),t.R7$(2),t.JRh(t.bMT(9,8,(null==r.subscription?null:r.subscription.externalName)??t.bMT(8,6,null==r.subscription?null:r.subscription.product))),t.R7$(4),t.SpI(" ",(null==r.subscription?null:r.subscription.description)??"D\xe9tail de votre abonnement \xe0 "+((null==r.subscription?null:r.subscription.externalName)??t.bMT(12,10,null==r.subscription?null:r.subscription.product))," "),t.R7$(3),t.vxM((l=null==r.subscription?null:r.subscription.offerType)===r.SubscriptionOfferType.LICENSE_AND_CONSUMPTION?14:l===r.SubscriptionOfferType.LICENSE_AND_PACKS?15:l===r.SubscriptionOfferType.LICENSE_ONLY?16:l===r.SubscriptionOfferType.CONSUMPTION_ONLY?17:l===r.SubscriptionOfferType.PER_SEAT?18:-1),t.R7$(7),t.Dyx(r.subscriptionDates()),t.R7$(2),t.vxM((null==r.subscription?null:r.subscription.status)!==r.SubscriptionStatus.CANCELED?23:-1)}},dependencies:[B.L,u.MD,u.T3,y.m_,y.An,z.w,z.q,k.YN,k.Jo,Me.J,f.y5,f.D9,u.QX,u.oe,u.Pc,f.Vb],styles:["[_ngcontent-%COMP%]:root{--app-primary-color-0: #000000;--app-primary-color-10: #001947;--app-primary-color-20: #002C71;--app-primary-color-25: #003688;--app-primary-color-30: #00419F;--app-primary-color-35: #0E4CB2;--app-primary-color-40: #2459BF;--app-primary-color-50: #4473D9;--app-primary-color-60: #608DF5;--app-primary-color-70: #87A9FF;--app-primary-color-80: #B1C5FF;--app-primary-color-90: #DAE2FF;--app-primary-color-95: #EEF0FF;--app-primary-color-98: #FAF8FF;--app-primary-color-99: #FEFBFF;--app-primary-color-100: #FFFFFF;--app-tertiary-color-0: #000000;--app-tertiary-color-10: #400010;--app-tertiary-color-20: #67001E;--app-tertiary-color-25: #7C0026;--app-tertiary-color-30: #8E0C30;--app-tertiary-color-35: #9F1C3B;--app-tertiary-color-40: #AF2A46;--app-tertiary-color-50: #D1445D;--app-tertiary-color-60: #F35D75;--app-tertiary-color-70: #FF8795;--app-tertiary-color-80: #FFB2B9;--app-tertiary-color-90: #FFDADC;--app-tertiary-color-95: #FFECED;--app-tertiary-color-98: #FFF8F7;--app-tertiary-color-99: #FFFBFF;--app-tertiary-color-100: #FFFFFF}.subscription-justify-items-stretch[_nghost-%COMP%] .subscription-card[_ngcontent-%COMP%]{height:100%;box-sizing:border-box}.subscription-card[_ngcontent-%COMP%]{padding:calc(var(--spacer) * 2);display:grid;align-items:baseline;background-color:var(--md-sys-color-surface);border:.5px solid var(--md-sys-color-outline-variant);border-radius:var(--spacer-2-5);color:#616161}.subscription-card[_ngcontent-%COMP%] .subscription-card-row[_ngcontent-%COMP%]{padding:var(--spacer-1) 0;display:grid;grid-template-columns:24px auto;align-items:center;column-gap:var(--spacer-2)}.subscription-card[_ngcontent-%COMP%] .subscription-card-row[_ngcontent-%COMP%] .indented[_ngcontent-%COMP%]{grid-column:2/3}.subscription-card[_ngcontent-%COMP%] .subscription-card-row[_ngcontent-%COMP%] .full-row[_ngcontent-%COMP%]{grid-column:1/3}.subscription-card[_ngcontent-%COMP%] .subscription-card-row[_ngcontent-%COMP%] .content-size[_ngcontent-%COMP%]{justify-self:baseline}.subscription-card[_ngcontent-%COMP%] .subscription-card-row[_ngcontent-%COMP%] > .mat-icon[_ngcontent-%COMP%]{font-size:24px!important;height:24px!important;width:24px!important;line-height:24px!important}.subscription-card[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .subscription-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--md-sys-typescale-title-medium);letter-spacing:var(--md-sys-typescale-title-medium-tracking);margin-bottom:0}.subscription-card[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer}.subscription-card[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:not(.mat-button-base){text-decoration:underline}","[_ngcontent-%COMP%]:root{--app-primary-color-0: #000000;--app-primary-color-10: #001947;--app-primary-color-20: #002C71;--app-primary-color-25: #003688;--app-primary-color-30: #00419F;--app-primary-color-35: #0E4CB2;--app-primary-color-40: #2459BF;--app-primary-color-50: #4473D9;--app-primary-color-60: #608DF5;--app-primary-color-70: #87A9FF;--app-primary-color-80: #B1C5FF;--app-primary-color-90: #DAE2FF;--app-primary-color-95: #EEF0FF;--app-primary-color-98: #FAF8FF;--app-primary-color-99: #FEFBFF;
1--app-primary-color-100: #FFFFFF;--app-tertiary-color-0: #000000;--app-tertiary-color-10: #400010;--app-tertiary-color-20: #67001E;--app-tertiary-color-25: #7C0026;--app-tertiary-color-30: #8E0C30;--app-tertiary-color-35: #9F1C3B;--app-tertiary-color-40: #AF2A46;--app-tertiary-color-50: #D1445D;--app-tertiary-color-60: #F35D75;--app-tertiary-color-70: #FF8795;--app-tertiary-color-80: #FFB2B9;--app-tertiary-color-90: #FFDADC;--app-tertiary-color-95: #FFECED;--app-tertiary-color-98: #FFF8F7;--app-tertiary-color-99: #FFFBFF;--app-tertiary-color-100: #FFFFFF}.subscription-card[_ngcontent-%COMP%] .subscription-product-upper-block[_ngcontent-%COMP%] .subscription-logo-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between;margin-bottom:var(--spacer-4);height:48px;font:var(--md-sys-typescale-title-large);letter-spacing:var(--md-sys-typescale-title-large-tracking)}.subscription-card[_ngcontent-%COMP%] .subscription-product-upper-block[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font:var(--md-sys-typescale-headline-large);letter-spacing:var(--md-sys-typescale-headline-large-tracking);font-weight:bolder;margin-bottom:var(--spacer-2)}.subscription-card[_ngcontent-%COMP%] .subscription-product-upper-block[_ngcontent-%COMP%] .subscription-description[_ngcontent-%COMP%]{font:var(--md-sys-typescale-body-medium);letter-spacing:var(--md-sys-typescale-body-medium-tracking);color:#9e9e9e;min-height:80px;padding-bottom:var(--spacer-3);box-sizing:border-box}.subscription-card[_ngcontent-%COMP%] .subscription-product-upper-block[_ngcontent-%COMP%] .subscription-offer-amount-block[_ngcontent-%COMP%] .main-amount-info[_ngcontent-%COMP%]{font:var(--md-sys-typescale-headline-extrabold);letter-spacing:var(--md-sys-typescale-headline-extrabold-tracking);color:var(--md-sys-color-secondary)}.subscription-card[_ngcontent-%COMP%] .subscription-product-upper-block[_ngcontent-%COMP%] .subscription-offer-amount-block[_ngcontent-%COMP%] .main-amount-interval[_ngcontent-%COMP%]{font:var(--md-sys-typescale-headline-small);letter-spacing:var(--md-sys-typescale-headline-small-tracking);font-weight:500;margin-left:var(--spacer-1)}.subscription-card[_ngcontent-%COMP%] .subscription-product-upper-block[_ngcontent-%COMP%] .subscription-offer-amount-block[_ngcontent-%COMP%] .sub-amount-info[_ngcontent-%COMP%]{font:var(--md-sys-typescale-title-large);letter-spacing:var(--md-sys-typescale-title-large-tracking);margin-bottom:0;min-height:68px}.subscription-card[_ngcontent-%COMP%] .mat-divider[_ngcontent-%COMP%]{margin:var(--spacer-3) 0}.subscription-card[_ngcontent-%COMP%] .subscription-card-row[_ngcontent-%COMP%] > .subscription-date[_ngcontent-%COMP%]{display:flex;flex-flow:wrap;justify-content:space-between}.subscription-card[_ngcontent-%COMP%] .subscription-info[_ngcontent-%COMP%]{font:var(--md-sys-typescale-body-medium);letter-spacing:var(--md-sys-typescale-body-medium-tracking);align-self:end;margin-top:var(--spacer-5);color:#757575}"],changeDetection:0}))}return n(),o})();var ft=c(983);const ze=(n,o)=>["/",n,o];let Xe=(()=>{var n;class o{constructor(){this.Route=P.q,this.billingService=(0,s.WQX)(I.Di)}ngOnChanges(e){if(e.subscription){const a=E.X.ofNullable(this.subscription).map(r=>this.billingService.createBillingPortalSession(r));this.customerPortalLink$=a.orElse(ft.w),this.customerInfoPortalLink$=a.map(r=>r.pipe((0,x.T)(l=>`${l}/customer/update`))).orElse(ft.w)}}static#t=n=()=>(this.\u0275fac=function(a){return new(a||o)},this.\u0275cmp=t.VBU({type:o,selectors:[["app-billing-subscription-quick-access-card"]],inputs:{subscription:"subscription"},features:[t.OA$],decls:24,vars:10,consts:[[1,"subscription-card"],[1,"subscription-card-row"],["target","_blank",1,"external-link",3,"href"],[3,"routerLink"]],template:function(a,r){1&a&&(t.j41(0,"div",0)(1,"h2"),t.EFF(2,"Acc\xe8s rapide"),t.k0s(),t.j41(3,"p",1)(4,"mat-icon"),t.EFF(5,"credit_score"),t.k0s(),t.j41(6,"a",2),t.nI1(7,"async"),t.EFF(8," Modifier mes informations "),t.j41(9,"mat-icon"),t.EFF(10,"open_in_new"),t.k0s()()(),t.j41(11,"p",1)(12,"mat-icon"),t.EFF(13,"settings"),t.k0s(),t.j41(14,"a",2),t.nI1(15,"async"),t.EFF(16," G\xe9rer mon moyen de paiement "),t.j41(17,"mat-icon"),t.EFF(18,"open_in_new"),t.k0s()()(),t.j41(19,"p",1)(20,"mat-icon"),t.EFF(21,"receipt_long"),t.k0s(),t.j41(22,"a",3),t.EFF(23," Consulter mes factures "),t.k0s()()()),2&a&&(t.R
17$(6),t.Y8G("href",t.bMT(7,3,r.customerInfoPortalLink$),t.B4B),t.R7$(8),t.Y8G("href",t.bMT(15,5,r.customerPortalLink$),t.B4B),t.R7$(8),t.Y8G("routerLink",t.l_i(7,ze,r.Route.URL.BILLING,r.Route.URL.BILLING_INVOICES)))},dependencies:[A.iI,A.Wk,y.m_,y.An,u.Jj],styles:["[_ngcontent-%COMP%]:root{--app-primary-color-0: #000000;--app-primary-color-10: #001947;--app-primary-color-20: #002C71;--app-primary-color-25: #003688;--app-primary-color-30: #00419F;--app-primary-color-35: #0E4CB2;--app-primary-color-40: #2459BF;--app-primary-color-50: #4473D9;--app-primary-color-60: #608DF5;--app-primary-color-70: #87A9FF;--app-primary-color-80: #B1C5FF;--app-primary-color-90: #DAE2FF;--app-primary-color-95: #EEF0FF;--app-primary-color-98: #FAF8FF;--app-primary-color-99: #FEFBFF;--app-primary-color-100: #FFFFFF;--app-tertiary-color-0: #000000;--app-tertiary-color-10: #400010;--app-tertiary-color-20: #67001E;--app-tertiary-color-25: #7C0026;--app-tertiary-color-30: #8E0C30;--app-tertiary-color-35: #9F1C3B;--app-tertiary-color-40: #AF2A46;--app-tertiary-color-50: #D1445D;--app-tertiary-color-60: #F35D75;--app-tertiary-color-70: #FF8795;--app-tertiary-color-80: #FFB2B9;--app-tertiary-color-90: #FFDADC;--app-tertiary-color-95: #FFECED;--app-tertiary-color-98: #FFF8F7;--app-tertiary-color-99: #FFFBFF;--app-tertiary-color-100: #FFFFFF}.subscription-justify-items-stretch[_nghost-%COMP%] .subscription-card[_ngcontent-%COMP%]{height:100%;box-sizing:border-box}.subscription-card[_ngcontent-%COMP%]{padding:calc(var(--spacer) * 2);display:grid;align-items:baseline;background-color:var(--md-sys-color-surface);border:.5px solid var(--md-sys-color-outline-variant);border-radius:var(--spacer-2-5);color:#616161}.subscription-card[_ngcontent-%COMP%] .subscription-card-row[_ngcontent-%COMP%]{padding:var(--spacer-1) 0;display:grid;grid-template-columns:24px auto;align-items:center;column-gap:var(--spacer-2)}.subscription-card[_ngcontent-%COMP%] .subscription-card-row[_ngcontent-%COMP%] .indented[_ngcontent-%COMP%]{grid-column:2/3}.subscription-card[_ngcontent-%COMP%] .subscription-card-row[_ngcontent-%COMP%] .full-row[_ngcontent-%COMP%]{grid-column:1/3}.subscription-card[_ngcontent-%COMP%] .subscription-card-row[_ngcontent-%COMP%] .content-size[_ngcontent-%COMP%]{justify-self:baseline}.subscription-card[_ngcontent-%COMP%] .subscription-card-row[_ngcontent-%COMP%] > .mat-icon[_ngcontent-%COMP%]{font-size:24px!important;height:24px!important;width:24px!important;line-height:24px!important}.subscription-card[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .subscription-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--md-sys-typescale-title-medium);letter-spacing:var(--md-sys-typescale-title-medium-tracking);margin-bottom:0}.subscription-card[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer}.subscription-card[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:not(.mat-button-base){text-decoration:underline}",".subscription-card[_ngcontent-%COMP%]{grid-auto-rows:min-content}.subscription-card[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font:var(--md-sys-typescale-title-large);letter-spacing:var(--md-sys-typescale-title-large-tracking)}.subscription-card[_ngcontent-%COMP%] .subscription-card-row[_ngcontent-%COMP%]{margin-bottom:var(--spacer-3)}.subscription-card[_ngcontent-%COMP%] .subscription-card-row[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--md-sys-color-secondary)}.subscription-card[_ngcontent-%COMP%] .subscription-card-row[_ngcontent-%COMP%] a.external-link[_ngcontent-%COMP%] > .mat-icon[_ngcontent-%COMP%]{font-size:16px!important;height:16px!important;width:16px!important;line-height:16px!important}"],changeDetection:0}))}return n(),o})(),_t=(()=>{var n;class o{constructor(){this.onBillingThresholdUpdated=(0,D.CGW)()}billingThresholdUpdated(e){this.onBillingThresholdUpdated.emit(e)}static#t=n=()=>(this.\u0275fac=function(a){return new(a||o)},this.\u0275cmp=t.VBU({type:o,selectors:[["app-billing-threshold-alert-card"]],inputs:{billingThreshold:"billingThreshold",subscription:"subscription"},outputs:{onBillingThresholdUpdated:"onBillingThresholdUpdated"},standalone:!1,decls:7,vars:2,consts:[["appearance","outlined",1,"billing-card-container"],[1,"header"],[1,"title"],[3,"onBillingThresholdUpdated","billingThreshold","subscription"]],template:function(a,r){1&a&&(t.j41(0,"mat-card",0)(1,"mat-card-content")(2,"div",1)(3,"div",2)(4,"h3"),t.EFF(5,"Gestion du budget"),t.k0s()()(),t.j41(6,"app-billing-threshold-alert-form",3),t.bIt("onBillingThresholdUpdated",function(C){return r.billingThresholdUpdated(C)}
1),t.k0s()()()),2&a&&(t.R7$(6),t.Y8G("billingThreshold",r.billingThreshold)("subscription",r.subscription))},styles:["[_ngcontent-%COMP%]:root{--app-primary-color-0: #000000;--app-primary-color-10: #001947;--app-primary-color-20: #002C71;--app-primary-color-25: #003688;--app-primary-color-30: #00419F;--app-primary-color-35: #0E4CB2;--app-primary-color-40: #2459BF;--app-primary-color-50: #4473D9;--app-primary-color-60: #608DF5;--app-primary-color-70: #87A9FF;--app-primary-color-80: #B1C5FF;--app-primary-color-90: #DAE2FF;--app-primary-color-95: #EEF0FF;--app-primary-color-98: #FAF8FF;--app-primary-color-99: #FEFBFF;--app-primary-color-100: #FFFFFF;--app-tertiary-color-0: #000000;--app-tertiary-color-10: #400010;--app-tertiary-color-20: #67001E;--app-tertiary-color-25: #7C0026;--app-tertiary-color-30: #8E0C30;--app-tertiary-color-35: #9F1C3B;--app-tertiary-color-40: #AF2A46;--app-tertiary-color-50: #D1445D;--app-tertiary-color-60: #F35D75;--app-tertiary-color-70: #FF8795;--app-tertiary-color-80: #FFB2B9;--app-tertiary-color-90: #FFDADC;--app-tertiary-color-95: #FFECED;--app-tertiary-color-98: #FFF8F7;--app-tertiary-color-99: #FFFBFF;--app-tertiary-color-100: #FFFFFF}.mat-mdc-card[_ngcontent-%COMP%]{color:#616161;height:100%;box-sizing:border-box}.mat-mdc-card[_ngcontent-%COMP%] .mat-mdc-card-content[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--spacer-3);margin-bottom:var(--spacer)}.mat-mdc-card[_ngcontent-%COMP%] .mat-mdc-card-content[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{flex:1 1 0;min-width:fit-content}.mat-mdc-card[_ngcontent-%COMP%] .mat-mdc-card-content[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;font:var(--md-sys-typescale-title-medium);letter-spacing:var(--md-sys-typescale-title-medium-tracking)}.mat-mdc-card[_ngcontent-%COMP%] .mat-mdc-card-content[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .filter-buttons-container[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;align-items:center;flex-wrap:wrap;gap:var(--spacer-2)}.billing-card-container[_ngcontent-%COMP%]{flex:1 1 0}@media (max-width: 599px){.mat-card[_ngcontent-%COMP%] .mat-card-content[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{flex-direction:column}.mat-card[_ngcontent-%COMP%] .mat-card-content[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .filter-buttons-container[_ngcontent-%COMP%]{justify-content:center}}"]}))}return n(),o})();var Qe=c(40651),Pt=c(23029),We=c(82765),Z=c(96183);function Je(n,o){1&n&&(t.j41(0,"mat-error"),t.EFF(1,"0 minimum"),t.k0s())}function He(n,o){1&n&&(t.j41(0,"span"),t.EFF(1,", "),t.k0s())}function Ze(n,o){if(1&n&&(t.j41(0,"span"),t.EFF(1),t.k0s(),t.nVh(2,He,2,0,"span")),2&n){const i=o.$implicit,e=o.$index,a=o.$count;t.R7$(),t.SpI("",100*i,"%"),t.R7$(),t.vxM(e!==a-1?2:-1)}}function qe(n,o){if(1&n&&(t.j41(0,"mat-option",9),t.EFF(1),t.k0s()),2&n){const i=o.$implicit;t.Y8G("value",i),t.R7$(),t.SpI(" ",100*i,"% ")}}let Ke=(()=>{var n;class o{constructor(){this.onBillingThresholdUpdated=(0,D.CGW)(),this.defaultThresholds=Qe.b.DEFAULT_THRESHOLDS,this.creditsMode=(0,s.vPA)(!1),this.fb=(0,s.WQX)(m.ok),this.thresholdForm=this.fb.nonNullable.group({active:this.fb.nonNullable.control(!1,m.k0.required),monthlyBudget:this.fb.nonNullable.control(void 0,[m.k0.required,m.k0.min(0)]),thresholds:this.fb.nonNullable.control(this.defaultThresholds.toArray())})}ngOnInit(){this.thresholdForm.valueChanges.pipe((0,O.p)(Boolean),(0,L.B)(1e3)).subscribe(()=>this.updateBillingThreshold())}ngOnChanges(e){e.subscription&&this.creditsMode.set(this.subscription?.offerType===p.yUy.OfferType.LICENSE_AND_PACKS),e.billingThreshold&&this.billingThreshold&&this.thresholdForm.patchValue({active:this.billingThreshold.active??!1,monthlyBudget:this.creditsMode()?this.billingThreshold.monthlyBudget:E.X.ofNullable(this.subscription?.convertCreditsToEuros(this.billingThreshold.monthlyBudget)).map(a=>pt.e.truncateDecimals(a,2)).orUndefined(),thresholds:this.billingThreshold.thresholds.toArray().sort()??[]},{emitEvent:!1})}updateBillingThreshold(){if(!this.billingThreshold||!this.thresholdForm.touched&&this.thresholdForm.pristine||this.thresholdForm.invali
1d)return;const e=this.thresholdForm.getRawValue(),a=this.billingThreshold.patch({monthlyBudget:(this.creditsMode()?e.monthlyBudget:this.subscription?.convertEurosToCredits(e.monthlyBudget))??0,active:e.active,thresholds:(0,M.NZ)(e.thresholds)});this.onBillingThresholdUpdated.emit(a)}static#t=n=()=>(this.\u0275fac=function(a){return new(a||o)},this.\u0275cmp=t.VBU({type:o,selectors:[["app-billing-threshold-alert-form"]],inputs:{billingThreshold:"billingThreshold",subscription:"subscription"},outputs:{onBillingThresholdUpdated:"onBillingThresholdUpdated"},standalone:!1,features:[t.OA$],decls:24,vars:6,consts:[[3,"formGroup"],[3,"formControl"],[1,"threshold-alert-text"],[1,"monthly-budget-field"],["appearance","outline",1,"billing-threshold-field-spacing","budget-field"],["matInput","","type","number","placeholder","Budget mensuel","required","","min","0",3,"formControl"],["appearance","outline",1,"billing-threshold-field-spacing","thresholds-field"],["placeholder","Seuils de budget","multiple","",3,"formControl"],[1,"thresholds-select"],[3,"value"]],template:function(a,r){1&a&&(t.j41(0,"form",0),t.nrm(1,"mat-checkbox",1),t.j41(2,"span",2),t.EFF(3,"Je souhaite \xeatre notifi\xe9(e) par mail lorsque mon budget de"),t.k0s(),t.j41(4,"div",3)(5,"mat-form-field",4),t.nrm(6,"input",5),t.nVh(7,Je,2,0,"mat-error"),t.k0s(),t.j41(8,"span",2)(9,"b"),t.EFF(10),t.k0s(),t.EFF(11,"\xa0"),t.k0s()(),t.j41(12,"span",2),t.EFF(13,"est consomm\xe9 \xe0"),t.k0s(),t.j41(14,"mat-form-field",6)(15,"mat-select",7)(16,"mat-select-trigger")(17,"div",8),t.Z7z(18,Ze,3,2,null,null,t.fX1),t.k0s()(),t.Z7z(20,qe,2,2,"mat-option",9,t.fX1),t.k0s()(),t.j41(22,"span",2),t.EFF(23,"."),t.k0s()()),2&a&&(t.Y8G("formGroup",r.thresholdForm),t.R7$(),t.Y8G("formControl",r.thresholdForm.controls.active),t.R7$(5),t.Y8G("formControl",r.thresholdForm.controls.monthlyBudget),t.R7$(),t.vxM(r.thresholdForm.controls.monthlyBudget.hasError("min")?7:-1),t.R7$(3),t.JRh(r.creditsMode()?"cr\xe9dits":"\u20ac"),t.R7$(5),t.Y8G("formControl",r.thresholdForm.controls.thresholds),t.R7$(3),t.Dyx(r.thresholdForm.controls.thresholds.value),t.R7$(2),t.Dyx(r.defaultThresholds))},dependencies:[Pt.wT,T.rl,T.TL,W.fg,We.So,Z.VO,Z.$2,m.qT,m.me,m.Q0,m.BC,m.cb,m.YS,m.VZ,m.l_,m.j4],styles:["form[_ngcontent-%COMP%]{display:flex;align-items:baseline;flex-flow:row wrap;box-sizing:border-box;--mat-form-field-container-height: 40px;--mat-form-field-filled-label-display: none;--mat-form-field-container-vertical-padding: 8px;--mat-form-field-filled-with-label-container-padding-top: 8px;--mat-form-field-filled-with-label-container-padding-bottom: 8px}form[_ngcontent-%COMP%] > .monthly-budget-field[_ngcontent-%COMP%], form[_ngcontent-%COMP%] > .threshold-alert-text[_ngcontent-%COMP%]{display:flex;align-items:baseline}.mat-mdc-form-field[_ngcontent-%COMP%]{max-width:90px}.mat-mdc-form-field[_ngcontent-%COMP%]{margin:0 var(--spacer-2)}.billing-threshold-field-spacing.budget-field[_ngcontent-%COMP%]{min-width:105px}.billing-threshold-field-spacing.thresholds-field[_ngcontent-%COMP%]{min-width:155px}"],changeDetection:0}))}return n(),o})();var b=c(25596);const to=(n,o)=>o.externalId;function no(n,o){if(1&n&&(t.j41(0,"mat-option",8),t.EFF(1),t.nI1(2,"currency"),t.k0s()),2&n){const i=o.$implicit;t.Y8G("value",i.externalId),t.R7$(),t.Lme(" ",i.credits," cr\xe9dits - ",t.ii3(2,3,i.unitAmountDecimal,"EUR","symbol","1.2-2")," ")}}let eo=(()=>{var n;class o{constructor(){this.billingService=(0,s.WQX)(I.Di),this.formBuilder=(0,s.WQX)(m.ok),this.packs=(0,M.B8)(),this.selectedPack=(0,s.vPA)(void 0),this.watcher=new it.yU,this.packControl=this.formBuilder.control(null,[m.k0.required])}ngOnInit(){this.watcher.add(this.packControl.valueChanges.subscribe(e=>this.selectedPack.set(this.packs.find(a=>a.externalId===e))))}ngOnChanges(e){e.packs&&this.packControl.setValue(this.packs.first()?.externalId??null)}ngOnDestroy(){this.watcher.unsubscribe()}createPackCheckout(){if(!this.packControl.valid||!this.organization?.id||!this.productSettings?.type)return;const e=new p.jzc({organizationId:this.organization.id,product:this.productSettings.type,priceId:E.X.ofNullable(this.packControl.value).orElseThrow(()=>new Error("pack must be present"))});this.watcher.add(this.billingService.createPackCheckout(e).subscribe(a=>window.open(a,"_self")))}static#t=n=()=>(this.\u0275fac=function(a){return new(a||o)},this.\u0275cmp=t.VBU({type:o,selectors:[["app-billing-pack-checkout-card"]],inputs:{organization:"organization",productSettings:"productSettings",subscription:"subscription",packs:"packs"},standalone:!1,features:[t.OA$],decls:36,vars:13,consts:[["appearance","outlined",1,"billing-card-container"],[1,"header"],[1,"title"],[1,"billing-pack-checkout-container"],[1,"billing-pack-checkout-form"],["appearance","outline","floatLabel","always"],[1,"field-title"],["placeholder","Choisissez votre pack",3,"formControl"],[3,"value"],["mat-flat-button","",1,"billing-pack-checkout-form-button","accent",3,"click","disabled"],[1,"billing-pack-checkout-recap"],[1,"mat-title-small"],[1,"billing-pack-checkout-recap-credits-included"],[1,"billing-pack-checkout-recap-period-end"],[1,"billing-pack-checkout-recap-total-amount","mat-title-small"]],template:function(a,r){if(1&a&&(t.j41(0,"mat-card",0)(1,"mat-card-content")(2,"div",1)(3,"div",2)(4,"h3"),t.EFF(5,"Achat de cr\xe9dits"),t.k0s()()(),t.j41(6,"div",3)(7,"div",4)(8,"p"),t.EFF(9,"Besoin de plus de cr\xe9dits ? Ce pack s'ajoutera \xe0 vos cr\xe9dits inclus avec votre offre."),t.k0s(),t.j41(10,"mat-form-field",5)(11,"mat-label",6),t.EFF(12,"Choisissez votre pack"),t.k0s(),t.j41(13,"mat-select",7),t.Z7z(14,no,3,8,"mat-option",8,to),t.k0s()(),t.j41(16,"button",9),t.bIt("click",function(){return r.createPackCheckout()}),t.EFF(17," Proc\xe9der \xe0 l'achat "),t.k0s()(),t.j41(18,"div",10)(19,"h4",11),t.EFF(20,"R\xe9capitulatif"),t.k0s(),t.j41(21,"p",12)(22,"span"),t.EFF(23,"Cr\xe9dits inclus"),t.k0s(),t.j41(24,"span"),t.EFF(25),t.k0s()(),t.j41(26,"p",13),t.EFF(27),t.nI1(28,"date"),t.k0s(),t.nrm(29,"mat-divider"),t.j41(30,"h4",14)(31,"span"),t.EFF(32,"Total"),t.k0s(),t.j41(33,"span"),t.EFF(34),t.nI1(35,"currency"),t.k0s()()()()()()),2&a){let l,C,j;t.R7$(13),t.Y8G("formControl",r.packControl),t.R7$(),t.Dyx(r.packs),t.R7$(2),t.Y8G("disabled",!r.packControl.valid),t.R7$(9),t.SpI("",null==(l=r.selectedPack())?null:l.credits," cr\xe9dits"),t.R7$(2),t.SpI("Dur\xe9e de validit\xe9 jusqu'au ",t.i5U(28,5,null==r.subscription||null==r.subscription.currentPeriodEnd||null==(C=r.subscription.currentPeriodEnd.clone())?null:C.toDate(),"dd/MM/yyyy")),t.R7$(7),t.JRh(t.ii3(35,8,null==(j=r.selectedPack())?null:j.unitAmou
1ntDecimal,"EUR","symbol","1.2-2"))}},dependencies:[Pt.wT,T.rl,T.nJ,h.$z,z.q,Z.VO,b.RN,b.m2,m.BC,m.l_,u.oe,u.vh],styles:["[_ngcontent-%COMP%]:root{--app-primary-color-0: #000000;--app-primary-color-10: #001947;--app-primary-color-20: #002C71;--app-primary-color-25: #003688;--app-primary-color-30: #00419F;--app-primary-color-35: #0E4CB2;--app-primary-color-40: #2459BF;--app-primary-color-50: #4473D9;--app-primary-color-60: #608DF5;--app-primary-color-70: #87A9FF;--app-primary-color-80: #B1C5FF;--app-primary-color-90: #DAE2FF;--app-primary-color-95: #EEF0FF;--app-primary-color-98: #FAF8FF;--app-primary-color-99: #FEFBFF;--app-primary-color-100: #FFFFFF;--app-tertiary-color-0: #000000;--app-tertiary-color-10: #400010;--app-tertiary-color-20: #67001E;--app-tertiary-color-25: #7C0026;--app-tertiary-color-30: #8E0C30;--app-tertiary-color-35: #9F1C3B;--app-tertiary-color-40: #AF2A46;--app-tertiary-color-50: #D1445D;--app-tertiary-color-60: #F35D75;--app-tertiary-color-70: #FF8795;--app-tertiary-color-80: #FFB2B9;--app-tertiary-color-90: #FFDADC;--app-tertiary-color-95: #FFECED;--app-tertiary-color-98: #FFF8F7;--app-tertiary-color-99: #FFFBFF;--app-tertiary-color-100: #FFFFFF}.billing-pack-checkout-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:var(--spacer-3)}.billing-pack-checkout-container[_ngcontent-%COMP%] .billing-pack-checkout-form[_ngcontent-%COMP%]{flex:1}.billing-pack-checkout-container[_ngcontent-%COMP%] .billing-pack-checkout-form[_ngcontent-%COMP%] .billing-pack-checkout-form-button[_ngcontent-%COMP%]{width:100%}.billing-pack-checkout-container[_ngcontent-%COMP%] .billing-pack-checkout-recap[_ngcontent-%COMP%]{flex:1;background-color:#f5f5f5;border-radius:4px;padding:var(--spacer-3)}.billing-pack-checkout-container[_ngcontent-%COMP%] .billing-pack-checkout-recap[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--md-sys-typescale-body-small);letter-spacing:var(--md-sys-typescale-body-small-tracking)}.billing-pack-checkout-container[_ngcontent-%COMP%] .billing-pack-checkout-recap[_ngcontent-%COMP%] .billing-pack-checkout-recap-credits-included[_ngcontent-%COMP%]{display:flex;justify-content:space-between;margin-bottom:var(--spacer-1)}.billing-pack-checkout-container[_ngcontent-%COMP%] .billing-pack-checkout-recap[_ngcontent-%COMP%] .billing-pack-checkout-recap-period-end[_ngcontent-%COMP%]{margin-bottom:0}.billing-pack-checkout-container[_ngcontent-%COMP%] .billing-pack-checkout-recap[_ngcontent-%COMP%] .mat-divider[_ngcontent-%COMP%]{margin:var(--spacer-3) 0}.billing-pack-checkout-container[_ngcontent-%COMP%] .billing-pack-checkout-recap[_ngcontent-%COMP%] .billing-pack-checkout-recap-total-amount[_ngcontent-%COMP%]{display:flex;justify-content:space-between;margin-bottom:0}","[_ngcontent-%COMP%]:root{--app-primary-color-0: #000000;--app-primary-color-10: #001947;--app-primary-color-20: #002C71;--app-primary-color-25: #003688;--app-primary-color-30: #00419F;--app-primary-color-35: #0E4CB2;--app-primary-color-40: #2459BF;--app-primary-color-50: #4473D9;--app-primary-color-60: #608DF5;--app-primary-color-70: #87A9FF;--app-primary-color-80: #B1C5FF;--app-primary-color-90: #DAE2FF;--app-primary-color-95: #EEF0FF;--app-primary-color-98: #FAF8FF;--app-primary-color-99: #FEFBFF;--app-primary-color-100: #FFFFFF;--app-tertiary-color-0: #000000;--app-tertiary-color-10: #400010;--app-tertiary-color-20: #67001E;--app-tertiary-color-25: #7C0026;--app-tertiary-color-30: #8E0C30;--app-tertiary-color-35: #9F1C3B;--app-tertiary-color-40: #AF2A46;--app-tertiary-color-50: #D1445D;--app-tertiary-color-60: #F35D75;--app-tertiary-color-70: #FF8795;--app-tertiary-color-80: #FFB2B9;--app-tertiary-color-90: #FFDADC;--app-tertiary-color-95: #FFECED;--app-tertiary-color-98: #FFF8F7;--app-tertiary-color-99: #FFFBFF;--app-tertiary-color-100: #FFFFFF}.mat-mdc-card[_ngcontent-%COMP%]{color:#616161;height:100%;box-sizing:border-box}.mat-mdc-card[_ngcontent-%COMP%] .mat-mdc-card-content[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--spacer-3);margin-bottom:var(--spacer)}.mat-mdc-card[_ngcontent-%COMP%] .mat-mdc-card-content[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{flex:1 1 0;min-width:fit-content}.mat-mdc-card[_ngcontent-%COMP%] .mat-mdc-card-content[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;font:var(--md-sys-typescale-title-medium);letter-spacing:var(--md-sys-typescale-title-medium-tracking)}.mat-mdc-card[_ngcontent-%COMP%] .mat-mdc-card-content[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .filter-buttons-container[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;align-items:center;flex-wrap:wrap;gap:var(--spacer-2)}.billing-card-container[_ngcontent-%COMP%]{flex:1 1 0}@media (max-width: 599px){.mat-card[_ngcontent-%COMP%] .mat-card-content[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{flex-direction:column}.mat-card[_ngcontent-%COMP%] .mat-card-content[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .filter-buttons-container[_ngcontent-%COMP%]{justify-content:center}}"]}))}return n(),o})();function oo(n,o){if(1&n&&(t.j41(0,"div",4)(1,"h4",5),t.EFF(2,"Budget d\xe9fini"),t.k0s(),t.j41(3,"p",6),t.EFF(4),t.nI1(5,"date"),t.nI1(6,"date"),t.k0s(),t.j41(7,"h1",7),t.EFF(8),t.nI1(9,"currency"),t.nI1(10,"currency"),t.k0s()()),2&n){let i;const e=t.XpG();t.R7$(4),t.Lme("",t.i5U(5,4,null==e.subscription||null==e.subscription.currentPeriodStart||null==(i=e.subscription.currentPeriodStart.clone())?null:i.toDate(),"dd/MM/yyyy")," - ",t.i5U(6,7,null==e.subscription||null==e.subscription.currentPeriodEnd||null==(i=e.subscription.currentPeriodEnd.clone())?null:i.toDate(),"dd/MM/yyyy")),t.R7$(4),t.Lme("",t.ii3(9,10,e.eurosConsumption(),"EUR","symbol","1.0-2")," / ",t.ii3(10,15,e.monthlyBudget(),"EUR","symbol","1.0-2"))}}function io(n,o){1&n&&(t.j41(0,"div",4)(1,"h4",5),t.EFF(2,"Budget non d\xe9fini"),t.k0s(),t.j41(3,"p",6),t.EFF(4,'Vous pouvez d\xe9finir et activer un budget dans la partie "Gestion du budget" ci-dessous.'),t.k0s()())}let ro=(()=>{var n;class o{constructor(){this.eurosConsumption=(0,s.vPA)(void 0),this.monthlyBudget=(0,s.vPA)(void 0)}ngOnChanges(e){(e.subscription||e.creditsConsumption)&&this.eurosConsumption.set(this.subscription?.convertCreditsToEuros(this.creditsConsumption)),(e.subscription||e.billingThreshold)&&this.monthlyBudget.set(this.subscription?.convertCreditsToEuros(this.billingThreshold?.monthlyBudget))}static#t=n=()=>(this.\u0275fac=function(a){return new(a||o)},this.\u0275cmp=t.VBU({type:o,selectors:[["app-billing-off-plan-consumption-card"]],inputs:{subscription:"subscription",billingThreshold:"billingThreshold",creditsConsumption:"creditsConsumption",offPlanCredits:"offPlanCredits"},standalone:!1,features:[t.OA$],decls:19,vars:10,consts:[["appearance","outlined",1,"billing-card-container"],[1,"header"],[1,"title"],[1,"off-plan-consumption-container"],[1,"off-plan-credits-block"],[1,"mat-title-small"],[1,"off-plan-credits-subtitle"],[1,"off-plan-credits-stat","mat-headline-small"],["vertical",""]],template:function(a,r){if(1&a&&(t.j41(0,"mat-card",0)(1,"mat-card-content")(2,"div",1)(3,"div",2)(4,"h3"),t.EFF(5,"Consommation hors plan"),t.k0s()()(),t.j41(6,"div",3)(7,"div",4)(8,"h4",5),t.EFF(9,"Cr\xe9dits consomm\xe9s hors plan"),t.k0s(),t.j41(10,"p",6),t.EFF(11),t.nI1(12,"date"),t.nI1(13,"date"),t.k0s(),t.j41(14,"h1",7),t.EFF(15),t.k0s()(),t.nrm(16,"mat-divider",8),t.nVh(17,oo,11,20,"div",4)(18,io,5,0,"div",4),t.k0s()()()),2&a){let l;t.R7$(11),t.Lme("",t.i5U(12,4,null==r.subscription||null==r.subscription.currentPeriodStart||null==(l=r.subscription.currentPeriodStart.clone())?null:l.toDate(),"dd/MM/yyyy")," - ",t.i5U(13,7,null==r.subscription||null==r.subscription.currentPeriodEnd||null==(l=r.subscription.currentPeriodEnd.clone())?null:l.toDate(),"dd/MM/yyyy")),t.R7$(4),t.JRh(r.offPlanCredits),t.R7$(2),t.vxM(null!=r.billingThreshold&&r.billingThreshold.active?17:18)}},dependencies:[z.q,b.RN,b.m2,u.oe,u.vh],styles:[".off-plan-consumption-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:var(--spacer-3)}.off-plan-consumption-container[_ngcontent-%COMP%] .off-plan-credits-block[_ngcontent-%COMP%]{flex:1;text-align:center}.off-plan-consumption-container[_ngcontent-%COMP%] .off-plan-credits-block[_ngcontent-%COMP%] .off-plan-credits-stat[_ngcontent-%COMP%]{font-weight:500}.off-plan-consumption-container[_ngcontent-%COMP%] .off-plan-credits-block[_ngcontent-%COMP%] .off-plan-credits-subtitle[_ngcontent-%COMP%]{font-weight:300}","[_ngcontent-%COMP%]:root{--app-primary-color-0: #000000;--app-primary-color-10: #001947;--app-primary-color-20: #002C71;--app-primary-color-25: #003688;--app-primary-color-30: #00419F;--app-primary-color-35: #0E4CB2;--app-primary-color-40: #2459BF;--app-primary-color-50: #4473D9;--app-primary-color-60: #608DF5;--app-primary-color-70: #87A9FF;--app-primary-color-80: #B1C5FF;--app-primary-color-90: #DAE2FF;--app-primary-color-95: #EEF0FF;--app-primary-color-98: #FAF8FF;--app-primary-color-99: #FEFBFF;
1--app-primary-color-100: #FFFFFF;--app-tertiary-color-0: #000000;--app-tertiary-color-10: #400010;--app-tertiary-color-20: #67001E;--app-tertiary-color-25: #7C0026;--app-tertiary-color-30: #8E0C30;--app-tertiary-color-35: #9F1C3B;--app-tertiary-color-40: #AF2A46;--app-tertiary-color-50: #D1445D;--app-tertiary-color-60: #F35D75;--app-tertiary-color-70: #FF8795;--app-tertiary-color-80: #FFB2B9;--app-tertiary-color-90: #FFDADC;--app-tertiary-color-95: #FFECED;--app-tertiary-color-98: #FFF8F7;--app-tertiary-color-99: #FFFBFF;--app-tertiary-color-100: #FFFFFF}.mat-mdc-card[_ngcontent-%COMP%]{color:#616161;height:100%;box-sizing:border-box}.mat-mdc-card[_ngcontent-%COMP%] .mat-mdc-card-content[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--spacer-3);margin-bottom:var(--spacer)}.mat-mdc-card[_ngcontent-%COMP%] .mat-mdc-card-content[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{flex:1 1 0;min-width:fit-content}.mat-mdc-card[_ngcontent-%COMP%] .mat-mdc-card-content[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;font:var(--md-sys-typescale-title-medium);letter-spacing:var(--md-sys-typescale-title-medium-tracking)}.mat-mdc-card[_ngcontent-%COMP%] .mat-mdc-card-content[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .filter-buttons-container[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;align-items:center;flex-wrap:wrap;gap:var(--spacer-2)}.billing-card-container[_ngcontent-%COMP%]{flex:1 1 0}@media (max-width: 599px){.mat-card[_ngcontent-%COMP%] .mat-card-content[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{flex-direction:column}.mat-card[_ngcontent-%COMP%] .mat-card-content[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .filter-buttons-container[_ngcontent-%COMP%]{justify-content:center}}"]}))}return n(),o})();var N=c(55911),$=c(9878);class ao extends p.cTQ{constructor(o,i,e){super(p.cTQ.colors.primary,void 0,280),this.datePreset=o,this.subscriptionData=i,this.packData=e}chart(){return{...super.chart(),type:"column",marginRight:25}}exporting(){return{enabled:!1}}legend(){return{enabled:!0}}plot(){return{...super.plot(),column:{stacking:"normal"}}}tooltip(){return{...super.tooltip(),shared:!1,formatter:function(){const i=[],e="display: flex; justify-content: space-between";return i.push('<div style="min-width: 150px">'),i.push(`<p style="color: ${this.color}; font-weight: bold">${this.series.name}</p>`),this.point?.y&&i.push(`<div style="${e}"><span>Co\xfbt</span><span>${(()=>(0,u.vv)(this.point.y,"fr",p.cTQ.units.price,"EUR"))()}</span></div>`),this.point?.options?.custom?.credits&&i.push(`<div style="${e}"><span>Cr\xe9dits</span><span>${this.point?.options?.custom?.credits}</span></div>`),i.push(`<div style="color: #757575; text-transform: capitalize; margin-top: 4px">${_()(this.x).format("MMMM YYYY")}</div>`),i.push("</div>"),i},useHTML:!0,backgroundColor:"#FFFFFF",borderColor:"#FAFAFA",borderRadius:8,style:{color:"#373737",fontSize:"14px",fontFamily:"Roboto, sans-serif"}}}xAxis(){const o=_().utc(),i=(0,$.U)(this.datePreset);return{...super.xAxis(),min:E.X.ofNullable(i).map(e=>o.clone().subtract(e).valueOf()).orUndefined(),max:o.valueOf(),type:"datetime",labels:{step:1}}}yAxis(){return{...super.yAxis(),reversedStacks:!1,labels:{format:"{text} \u20ac"}}}series(){const o=[{type:"column",name:"Abonnement",data:this.subscriptionData.map(i=>({x:i.x.valueOf(),y:i.y.amount})).toArray()}];return this.packData.size>0&&o.push({type:"column",name:"Achat de cr\xe9dits",data:this.packData.map(i=>({x:i.x.valueOf(),y:i.y.amount,custom:{credits:i.y.credits}})).toArray()}),o}}const co=["billingInvoicesChart"];let lo=(()=>{var n;class o{ngAfterViewInit(){this.highChart=dt().chart(this.chartContainer.nativeElement,this.chart.getOptions())}ngOnChanges(e){(e.datePreset||e.subscriptionData||e.packData)&&(this.chart=new ao(this.datePreset,this.subscriptionData,this.packData),this.redraw())}ngOnDestroy(){this.highChart&&this.highChart.destroy()}redraw(){this.highChart&&this.highChart.update(this.chart.getOptions(),!0,!0)}static#t=n=()=>(this.\u0275fac=function(a){return new(a||o)},this.\u0275cmp=t.VBU({type:o,selectors:[["app-billing-invoices-chart"]],viewQuery:function(a,r){if(1&a&&t.GBs(co,7),2&a){let l;t.mGM(l=t.lsd())&&(r.chartContainer=l.first)}},inputs:{datePreset:"datePreset",subscriptionData:"subscriptionData",packData:"packData"},features:[t.OA$],decls:2,vars:0,consts:[["billingInvoicesChart",""]],template:function(a,r){1&a&&t.Hgh(0,"div",null,0)},encapsulation:2,changeDetection:0}))}return n(),o})();function so(n,o){if(1&n){const i=t.RV6();t.j41(0,"button",9),t.bIt("click",function(){const a=s.eBV(i).$implicit,r=t.XpG
1();return s.Njj(r.selectDatePreset(a))}),t.EFF(1),t.nI1(2,"translate"),t.k0s()}if(2&n){const i=o.$implicit,e=t.XpG();t.AVh("selected",e.datePreset===i),t.R7$(),t.SpI(" ",t.bMT(2,3,"DATE_PRESET."+i)," ")}}let po=(()=>{var n;class o{constructor(){this.datePreset=$.C.SINCE_1_YEAR,this.datePresets=[$.C.SINCE_1_YEAR,$.C.SINCE_2_YEAR,$.C.SINCE_5_YEAR,$.C.SINCE_FOREVER]}selectDatePreset(e){this.datePreset=e}static#t=n=()=>(this.\u0275fac=function(a){return new(a||o)},this.\u0275cmp=t.VBU({type:o,selectors:[["app-billing-invoices-graph"]],inputs:{subscriptionData:"subscriptionData",packData:"packData"},decls:16,vars:8,consts:[["dateSelectorMenu","matMenu"],["appearance","outlined"],[1,"billing-invoices-chart-settings-container"],[1,"mat-title-medium"],["mat-stroked-button","",1,"grey-700",3,"matMenuTriggerFor"],["iconPositionEnd",""],[3,"overlapTrigger"],["mat-menu-item","",3,"selected"],[3,"datePreset","subscriptionData","packData"],["mat-menu-item","",3,"click"]],template:function(a,r){if(1&a&&(t.j41(0,"mat-card",1)(1,"mat-card-content")(2,"div",2)(3,"h3",3),t.EFF(4,"Suivi de facturation"),t.k0s(),t.j41(5,"button",4)(6,"span"),t.EFF(7),t.nI1(8,"translate"),t.k0s(),t.j41(9,"mat-icon",5),t.EFF(10,"arrow_drop_down"),t.k0s()(),t.j41(11,"mat-menu",6,0),t.Z7z(13,so,3,5,"button",7,t.fX1),t.k0s()(),t.nrm(15,"app-billing-invoices-chart",8),t.k0s()()),2&a){const l=t.sdS(12);t.R7$(5),t.Y8G("matMenuTriggerFor",l),t.R7$(2),t.JRh(t.bMT(8,6,"DATE_PRESET."+r.datePreset)),t.R7$(4),t.Y8G("overlapTrigger",!1),t.R7$(2),t.Dyx(r.datePresets),t.R7$(2),t.Y8G("datePreset",r.datePreset)("subscriptionData",r.subscriptionData)("packData",r.packData)}},dependencies:[B.L,y.m_,y.An,b.Hu,b.RN,b.m2,v.Cn,v.kk,v.fb,v.Cp,h.Hl,h.$z,lo,f.D9],styles:[".billing-invoices-chart-settings-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"]}))}return n(),o})();var q=c(96695),X=c(2042),mo=c(22598);function uo(n,o){1&n&&t.nrm(0,"tr",20)}function go(n,o){1&n&&t.nrm(0,"tr",21)}function Fo(n,o){1&n&&(t.j41(0,"th",22),t.EFF(1," Date de cr\xe9ation "),t.k0s())}function Co(n,o){if(1&n&&(t.j41(0,"td",23),t.EFF(1),t.k0s()),2&n){const i=o.$implicit,e=t.XpG();t.R7$(),t.SpI(" ",e.getElement(i).creationDate.format("L")," ")}}function yo(n,o){1&n&&(t.j41(0,"th",24),t.EFF(1," Factures n\xb0 "),t.k0s())}function ho(n,o){if(1&n&&(t.j41(0,"td",23),t.EFF(1),t.k0s()),2&n){const i=o.$implicit,e=t.XpG();t.R7$(),t.SpI(" ",e.getElement(i).reference," ")}}function bo(n,o){1&n&&(t.j41(0,"th",25),t.EFF(1," P\xe9riode "),t.k0s())}function fo(n,o){if(1&n&&(t.j41(0,"td",23),t.EFF(1),t.k0s()),2&n){const i=o.$implicit,e=t.XpG();t.R7$(),t.Lme(" ",e.getElement(i).periodStart.format("L")," - ",e.getElement(i).periodEnd.format("L")," ")}}function _o(n,o){1&n&&(t.j41(0,"th",26),t.EFF(1," Montant TTC "),t.k0s())}function Po(n,o){if(1&n&&(t.j41(0,"td",23),t.EFF(1),t.nI1(2,"currency"),t.k0s()),2&n){const i=o.$implicit,e=t.XpG();t.R7$(),t.SpI(" ",t.ii3(2,1,e.getElement(i).amount,"EUR","symbol","1.2-2")," ")}}function vo(n,o){1&n&&(t.j41(0,"th",27),t.EFF(1," Date de paiement "),t.k0s())}function Mo(n,o){if(1&n&&(t.j41(0,"td",23),t.EFF(1),t.k0s()),2&n){let i;const e=o.$implicit,a=t.XpG();t.R7$(),t.SpI(" ",null==(i=a.getElement(e).paymentDate)?null:i.format("L")," ")}}function Oo(n,o){1&n&&(t.j41(0,"th",28),t.EFF(1," Statut "),t.k0s())}function Eo(n,o){if(1&n&&(t.j41(0,"td",23)(1,"mat-chip-set"),t.nrm(2,"app-invoice-status-chip",29),t.k0s()()),2&n){const i=o.$implicit,e=t.XpG();t.R7$(2),t.Y8G("status",e.getElement(i).status)}}function To(n,o){1&n&&(t.j41(0,"th",30),t.EFF(1,"Actions"),t.k0s())}function Do(n,o){1&n&&(t.j41(0,"a",31)(1,"mat-icon"),t.EFF(2,"search"),t.k0s()()),2&n&&t.Y8G("href",o,t.B4B)}function ko(n,o){1&n&&(t.j41(0,"a",31)(1,"mat-icon"),t.EFF(2,"download"),t.k0s()()),2&n&&t.Y8G("href",o,t.B4B)}function Bo(n,o){if(1&n&&(t.j41(0,"td",23),t.nVh(1,Do,3,1,"a",31),t.nVh(2,ko,3,1,"a",31),t.k0s()),2&n){let i,e;
1const a=o.$implicit,r=t.XpG();t.R7$(),t.vxM((i=r.getElement(a).url)?1:-1,i),t.R7$(),t.vxM((e=r.getElement(a).downloadUrl)?2:-1,e)}}let So=(()=>{var n;class o{constructor(){this.dataSource=new d.I6([]),this.pageSize=20,this.displayedColumns=["creationDate","reference","period","amount","paymentDate","status","actions"]}ngAfterViewInit(){this.dataSource.sort=this.sort,this.dataSource.paginator=this.paginator,this.dataSource.sortingDataAccessor=(e,a)=>{switch(a){case"creationDate":return e.creationDate.valueOf();case"reference":return e.reference??"";case"period":return e.periodStart.valueOf();case"amount":return e.amount;case"paymentDate":return e.paymentDate?.valueOf()??Number.MAX_VALUE;case"status":return E.X.ofNullable(e.status).map(r=>Object.keys(p.qOK.Status).findIndex(l=>l===r)).orElse(Number.MAX_VALUE);default:return e.externalId}}}ngOnChanges(e){e.invoices&&(this.dataSource.data=this.invoices.toArray())}trackById(e,a){return a.externalId}getElement(e){return e}static#t=n=()=>(this.\u0275fac=function(a){return new(a||o)},this.\u0275cmp=t.VBU({type:o,selectors:[["app-billing-invoices-table"]],viewQuery:function(a,r){if(1&a&&(t.GBs(X.B4,7),t.GBs(q.iy,7)),2&a){let l;t.mGM(l=t.lsd())&&(r.sort=l.first),t.mGM(l=t.lsd())&&(r.paginator=l.first)}},inputs:{invoices:"invoices"},features:[t.OA$],decls:26,vars:7,consts:[[1,"billing-invoices-table-container"],["mat-table","","matSort","","matSortActive","creationDate","matSortDirection","desc",3,"dataSource","trackBy"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],["matColumnDef","creationDate"],["mat-header-cell","","mat-sort-header","","sortActionDescription","Trier par date de cr\xe9ation",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","reference"],["mat-header-cell","","mat-sort-header","","sortActionDescription","Trier par num\xe9ro de facture",4,"matHeaderCellDef"],["matColumnDef","period"],["mat-header-cell","","mat-sort-header","","sortActionDescription","Trier par p\xe9riode",4,"matHeaderCellDef"],["matColumnDef","amount"],["mat-header-cell","","mat-sort-header","","sortActionDescription","Trier par montant",4,"matHeaderCellDef"],["matColumnDef","paymentDate"],["mat-header-cell","","mat-sort-header","","sortActionDescription","Trier par date de paiement",4,"matHeaderCellDef"],["matColumnDef","status"],["mat-header-cell","","mat-sort-header","","sortActionDescription","Trier par statut",4,"matHeaderCellDef"],["matColumnDef","actions"],["mat-header-cell","",4,"matHeaderCellDef"],["showFirstLastButtons","","aria-label","Select billing page",3,"length","pageSize"],["mat-header-row",""],["mat-row",""],["mat-header-cell","","mat-sort-header","","sortActionDescription","Trier par date de cr\xe9ation"],["mat-cell",""],["mat-header-cell","","mat-sort-header","","sortActionDescription","Trier par num\xe9ro de facture"],["mat-header-cell","","mat-sort-header","","sortActionDescription","Trier par p\xe9riode"],["mat-header-cell","","mat-sort-header","","sortActionDescription","Trier par montant"],["mat-header-cell","","mat-sort-header","","sortActionDescription","Trier par date de paiement"],["mat-header-cell","","mat-sort-header","","sortActionDescription","Trier par statut"],[3,"status"],["mat-header-cell",""],["mat-icon-button","","target","_blank",3,"href"]],template:function(a,r){1&a&&(t.j41(0,"div",0)(1,"table",1),t.DNE(2,uo,1,0,"tr",2)(3,go,1,0,"tr",3),t.qex(4,4),t.DNE(5,Fo,2,0,"th",5)(6,Co,2,1,"td",6),t.bVm(),t.qex(7,7),t.DNE(8,yo,2,0,"th",8)(9,ho,2,1,"td",6),t.bVm(),t.qex(10,9),t.DNE(11,bo,2,0,"th",10)(12,fo,2,2,"td",6),t.bVm(),t.qex(13,11),t.DNE(14,_o,2,0,"th",12)(15,Po,3,6,"td",6),t.bVm(),t.qex(16,13),t.DNE(17,vo,2,0,"th",14)(18,Mo,2,1,"td",6),t.bVm(),t.qex(19,15),t.DNE(20,Oo,2,0,"th",16)(21,Eo,3,1,"td",6),t.bVm(),t.qex(22,17),t.DNE(23,To,2,0,"th",18)(24,Bo,3,2,"td",6),t.bVm(),t.k0s()(),t.nrm(25,"mat-paginator",19)),2&a&&(t.R7$(),t.Y8G("dataSource",r.dataSource)("trackBy",r.trackById),t.R7$(),t.Y8G("matHeaderRowDef",r.displayedColumns)("matHeaderRowDefSticky",!0),t.R7$(),t.Y8G("matRowDefColumns",r.dis
1playedColumns),t.R7$(22),t.Y8G("length",r.invoices.size)("pageSize",r.pageSize))},dependencies:[B.L,y.m_,y.An,X.NQ,X.B4,X.aE,d.tP,d.Zl,d.tL,d.ji,d.cC,d.YV,d.iL,d.KS,d.$R,d.YZ,d.NB,q.Ou,q.iy,k.YN,k.Jo,h.Hl,mo.iY,Ft,u.oe],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column}[_nghost-%COMP%] .billing-invoices-table-container[_ngcontent-%COMP%]{overflow:auto;height:100%;background-color:#fff}"]}))}return n(),o})();var vt=c(97383),K=c(72461),Mt=c(68788),Ot=c(89756),tt=c(10760);let Io=(()=>{var n;class o{constructor(){this.store=(0,s.WQX)(g.il)}ngOnInit(){this.invoices$=this.store.pipe((0,g.Lt)(e=>e.billing.invoices.invoices)),this.subscriptionInvoiceAggregations$=this.store.pipe((0,g.Lt)(e=>vt.z.selectSubscriptionInvoiceAggregations(e.billing.invoices))),this.packInvoiceAggregations$=this.store.pipe((0,g.Lt)(e=>vt.z.selectPackInvoiceAggregations(e.billing.invoices)))}static#t=n=()=>(this.\u0275fac=function(a){return new(a||o)},this.\u0275cmp=t.VBU({type:o,selectors:[["app-billing-invoices"]],decls:10,vars:9,consts:[[1,"toolbar"],["title","Mes factures"],[3,"subscriptionData","packData"],[3,"invoices"]],template:function(a,r){1&a&&(t.j41(0,"app-main")(1,"div",0)(2,"mat-toolbar"),t.nrm(3,"app-title-bar",1),t.k0s()(),t.j41(4,"section"),t.nrm(5,"app-billing-invoices-graph",2),t.nI1(6,"async"),t.nI1(7,"async"),t.nrm(8,"app-billing-invoices-table",3),t.nI1(9,"async"),t.k0s()()),2&a&&(t.R7$(5),t.Y8G("subscriptionData",t.bMT(6,3,r.subscriptionInvoiceAggregations$))("packData",t.bMT(7,5,r.packInvoiceAggregations$)),t.R7$(3),t.Y8G("invoices",t.bMT(9,7,r.invoices$)))},dependencies:[N.s5,N.KQ,Mt.w,Ot.I,tt.$,po,So,K.z,u.Jj],styles:["[_ngcontent-%COMP%]:root{--app-primary-color-0: #000000;--app-primary-color-10: #001947;--app-primary-color-20: #002C71;--app-primary-color-25: #003688;--app-primary-color-30: #00419F;--app-primary-color-35: #0E4CB2;--app-primary-color-40: #2459BF;--app-primary-color-50: #4473D9;--app-primary-color-60: #608DF5;--app-primary-color-70: #87A9FF;--app-primary-color-80: #B1C5FF;--app-primary-color-90: #DAE2FF;--app-primary-color-95: #EEF0FF;--app-primary-color-98: #FAF8FF;--app-primary-color-99: #FEFBFF;--app-primary-color-100: #FFFFFF;--app-tertiary-color-0: #000000;--app-tertiary-color-10: #400010;--app-tertiary-color-20: #67001E;--app-tertiary-color-25: #7C0026;--app-tertiary-color-30: #8E0C30;--app-tertiary-color-35: #9F1C3B;--app-tertiary-color-40: #AF2A46;--app-tertiary-color-50: #D1445D;--app-tertiary-color-60: #F35D75;--app-tertiary-color-70: #FF8795;--app-tertiary-color-80: #FFB2B9;--app-tertiary-color-90: #FFDADC;--app-tertiary-color-95: #FFECED;--app-tertiary-color-98: #FFF8F7;--app-tertiary-color-99: #FFFBFF;--app-tertiary-color-100: #FFFFFF}.toolbar[_ngcontent-%COMP%]{position:relative}.toolbar[_ngcontent-%COMP%] .mat-toolbar[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:space-between;height:auto;min-height:64px}.toolbar[_ngcontent-%COMP%] .mat-toolbar[_ngcontent-%COMP%]{height:64px}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;row-gap:var(--spacer);width:100%;height:100%;padding:var(--spacer);box-sizing:border-box}section[_ngcontent-%COMP%] app-billing-invoices-graph[_ngcontent-%COMP%]{flex-shrink:0}section[_ngcontent-%COMP%] app-billing-invoices-table[_ngcontent-%COMP%]{flex:1;min-height:0}"]}))}return n(),o})();function xo(n,o){if(1&n&&t.nrm(0,"app-billing-subscription-licenses-card",5),2&n){const i=t.XpG();t.Y8G("@easeIn3",!0)("subscription",i.subscription())("organizationUsersCount",i.organizationUsersCount())}}let Et=(()=>{var n;class o{constructor(){this.store=(0,s.WQX)(g.il),this.subscription=(0,S.ot)(this.store.pipe((0,g.Lt)(e=>e.home.subscription.entity),(0,O.p)(Boolean))),this.nextInvoice=(0,S.ot)(this.store.pipe((0,g.Lt)(e=>e.home.subscription.nextInvoice),(0,O.p)(Boolean))),this.organizationUsersCount=(0,S.ot)(this.store.pipe((0,g.Lt)(e=>e.home.subscription.organizationUsersCount),(0,O.p)(Boolean)),{initialValue:0})}static#t=n=()=>(this.\u0275fac=function(a){return new(a||o)},this.\u0275cmp=t.VBU({type:o,selectors:[["app-billing-subscription"]],decls:11,vars:9,consts:[[1,"toolbar"],["title","Mon abonnement"],[1,"subscription-justify-items-stretch",3,"subscription"],[1,"subscription-right-block"],[1,"subscription-justify-items-stretch",3,"subscription","nextInvoice"],[1,"subscription-justify-items-stretch",3,"subscription","organizationUsersCount"],[1,"subscription-justify-items-stretch"]],template:function(a,r){if(1&a&&(t.j41(0,"app-main")(1,"div",0)(2,"mat-toolbar"),t.nrm(3,"app-title-bar",1),t.k0s()(),t.j41(4,"section"),t.nrm(5,"app-billing-subscription-product-card",2),t.j41(6,"div",3),t.nrm(7,"app-billing-subscription-invoice-card",4),t.nVh(8,xo,1,3,"app-billing-subscription-licenses-card",5),t.nrm(9,"app-billing-subscription-quick-access-card",2)(10,"app-billing-subscription-contact-card",6),t.k0s()()()),2&a){let l;t.R7$(5),t.Y8G("@easeIn1",!0)("subscription",r.subscription()),t.R7$(2),t.Y8G("@easeIn2",!0)("subscription",r.subscription())("nextInvoice",r.nextInvoice()),t.R7$(),t.vxM(null!=(l=r.subscription())&&l.hasLicenses()&&null!=(l=r.subscription())&&l.active()?8:-1),t.R7$(),t.Y8G("@easeIn4",!0)("subscription",r.subscription()),t.R7$(),t.Y8G("@easeIn5",!0)}},dependencies:[N.s5,N.KQ,Mt.w,Ot.I,tt.$,Jn,me,Ye,ye,Xe,K.z],styles:["[_ngcontent-%COMP%]:root{--app-primary-color-0: #000000;--app-primary-color-10: #001947;--app-primary-color-20: #002C71;--app-primary-color-25: #003688;--app-primary-color-30: #00419F;--app-primary-color-35: #0E4CB2;--app-primary-color-40: #2459BF;--app-primary-color-50: #4473D9;--app-primary-color-60: #608DF5;--app-primary-color-70: #87A9FF;--app-primary-color-80: #B1C5FF;--app-primary-color-90: #DAE2FF;--app-primary-color-95: #EEF0FF;--app-primary-color-98: #FAF8FF;--app-primary-color-99: #FEFBFF;
1--app-primary-color-100: #FFFFFF;--app-tertiary-color-0: #000000;--app-tertiary-color-10: #400010;--app-tertiary-color-20: #67001E;--app-tertiary-color-25: #7C0026;--app-tertiary-color-30: #8E0C30;--app-tertiary-color-35: #9F1C3B;--app-tertiary-color-40: #AF2A46;--app-tertiary-color-50: #D1445D;--app-tertiary-color-60: #F35D75;--app-tertiary-color-70: #FF8795;--app-tertiary-color-80: #FFB2B9;--app-tertiary-color-90: #FFDADC;--app-tertiary-color-95: #FFECED;--app-tertiary-color-98: #FFF8F7;--app-tertiary-color-99: #FFFBFF;--app-tertiary-color-100: #FFFFFF}section[_ngcontent-%COMP%]{padding:var(--spacer-4);display:grid;grid-template-columns:440px auto;gap:var(--spacer-4)}@media (max-width: 1279px){section[_ngcontent-%COMP%]{grid-template-columns:minmax(350px,1fr) auto}}@media (max-width: 959px){section[_ngcontent-%COMP%]{grid-template-columns:1fr}}section[_ngcontent-%COMP%] .subscription-right-block[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:wrap;gap:var(--spacer-4)}section[_ngcontent-%COMP%] .subscription-right-block[_ngcontent-%COMP%] app-billing-subscription-invoice-card[_ngcontent-%COMP%]:has(+app-billing-subscription-licenses-card), section[_ngcontent-%COMP%] .subscription-right-block[_ngcontent-%COMP%] app-billing-subscription-licenses-card[_ngcontent-%COMP%]{width:calc(50% - var(--spacer-4)/2)}section[_ngcontent-%COMP%] .subscription-right-block[_ngcontent-%COMP%] app-billing-subscription-invoice-card[_ngcontent-%COMP%]{width:100%}section[_ngcontent-%COMP%] .subscription-right-block[_ngcontent-%COMP%] app-billing-subscription-quick-access-card[_ngcontent-%COMP%]{width:350px}section[_ngcontent-%COMP%] .subscription-right-block[_ngcontent-%COMP%] app-billing-subscription-contact-card[_ngcontent-%COMP%]{width:calc(100% - 350px - var(--spacer-4))}@media (max-width: 1439px){section[_ngcontent-%COMP%] .subscription-right-block[_ngcontent-%COMP%]{flex-direction:column}section[_ngcontent-%COMP%] .subscription-right-block[_ngcontent-%COMP%] .subscription-justify-items-stretch[_ngcontent-%COMP%]{width:100%}}"],data:{animation:[p.X55.cardEaseIn1,p.X55.cardEaseIn2,p.X55.cardEaseIn3,p.X55.cardEaseIn4,p.X55.cardEaseIn5]},changeDetection:0}))}return n(),o})();var Tt=c(8855);function Ro(n,o){if(1&n&&(t.nrm(0,"app-billing-remaining-credits-card",3),t.nI1(1,"async")),2&n){const i=t.XpG(),e=t.XpG();t.Y8G("@easeIn1",!0)("currentPeriodConsumedCredits",t.bMT(1,3,e.currentPeriodConsumption$))("subscription",i)}}function Ao(n,o){if(1&n&&(t.nrm(0,"app-billing-off-plan-consumption-card",4),t.nI1(1,"async"),t.nI1(2,"async"),t.nI1(3,"async")),2&n){const i=t.XpG(),e=t.XpG();t.Y8G("@easeIn2",!0)("subscription",i)("billingThreshold",t.bMT(1,5,e.billingThreshold$))("creditsConsumption",t.bMT(2,7,e.currentPeriodConsumption$))("offPlanCredits",t.bMT(3,9,e.currentPeriodOffPlanCredits$))}}function $o(n,o){if(1&n&&(t.nrm(0,"app-billing-pack-checkout-card",5),t.nI1(1,"async"),t.nI1(2,"async"),t.nI1(3,"async")),2&n){const i=t.XpG(),e=t.XpG();t.Y8G("@easeIn2",!0)("organization",t.bMT(1,5,e.organization$))("productSettings",t.bMT(2,7,e.productSettings$))("subscription",i)("packs",t.bMT(3,9,e.packs$))}}function jo(n,o){if(1&n){const i=t.RV6();t.j41(0,"app-billing-threshold-alert-card",11),t.nI1(1,"async"),t.nI1(2,"async"),t.bIt("onBillingThresholdUpdated",function(a){s.eBV(i);const r=t.XpG(2);return s.Njj(r.updateBillingThreshold(a))}),t.k0s()}if(2&n){const i=t.XpG(2);t.Y8G("@easeIn3",!0)("billingThreshold",t.bMT(1,3,i.billingThreshold$))("subscription",t.bMT(2,5,i.subscription$))}}function Uo(n,o){if(1&n){const i=t.RV6();t.j41(0,"section")(1,"div",2),t.nVh(2,Ro,2,5,"app-billing-remaining-credits-card",3),t.nVh(3,Ao,4,11,"app-billing-off-plan-consumption-card",4)(4,$o,4,11,"app-billing-pack-checkout-card",5),t.k0s(),t.j41(5,"div",6),t.nVh(6,jo,3,7,"app-billing-threshold-alert-card",7),t.k0s(),t.j41(7,"div",8)(8,"app-billing-sku-details-card",9),t.nI1(9,"async"),t.nI1(10,"async"),t.nI1(11,"async"),t.nI1(12,"async"),t.bIt("onQueryUpdate",function(a){s.eBV(i);const r=t.XpG();return s.Njj(r.onDailyQueryUpdate(a))}),t.k0s(),t.nrm(13,"app-billing-upsell-card",10),t.nI1(14,"async"),t.nI1(15,"async"),t.k0s()()}if(2&n){const i=o,e=t.XpG();t.R7$(2),t.vxM(i.offerType&&e.offerTypeRemainingCredits.includes(i.offerType)?2:-1),t.R7$(),t.vxM(i.offerType&&e.offerTypeOffPlanConsumption.includes(i.offerType)?3:i.offerType===e.OfferType.LICENSE_AND_PACKS?4:-1),t.R7$(3),t.vxM(i.offerType!==e.OfferType.LICENSE_ONLY?6:-1),t.R7$(2),t.Y8G("@easeIn4",!0)("aggregationCreditData",t.bMT(9,13,e.creditsConsumptionEvolutionBySku$))("aggregationCurrencyData",t.bMT(10,15,e.currencyConsumptionEvolutionBySku$))("productSettings",t.bMT(11,17,e.productSettings$))("organization",t.bMT(12,19,e.organization$))("subscription",i),t.R7$(5),t.Y8G("@easeIn5",!0)("subscription",i)("consumedSkus",t.bMT(14,21,e.consumedSkus$))("productSkuGrid",t.bMT(15,23,e.productSkuGrid$))}}let wo=(()=>{var n;class o{constructor(){this.offerTypeRemainingCredits=[p.yUy.OfferType.LICENSE_AND_CONSUMPTION,p.yUy.OfferType.LICENSE_AND_PACKS],this.offerTypeOffPlanConsumption=[p.yUy.OfferType.LICENSE_AND_CONSUMPTION,p.yUy.OfferType.CONSUMPTION_ONLY],this.OfferType=p.yUy.OfferType,this.Source=p.yUy.Source,this.store=(0,s.WQX)(g.il)}ngOnInit(){this.subscription$=this.store.pipe((0,g.Lt)(e=>e.home.subscription.entity),(0,O.p)(Boolean)),this.organization$=this.store.pipe((0,g.Lt)(e=>e.home.organization.entity),(0,O.p)(Boolean)),this.productSettings$=this.store.pipe((0,g.Lt)(e=>e.home.productSettings.entity),(0,O.p)(Boolean)),this.creditsConsumptionEvolutionBySku$=this.store.pipe((0,g.Lt)(e=>e.billing.consumption.creditsConsumptionEvolutionBySku)),this.consumedSkus$=this.creditsConsumptionEvolutionBySku$.pipe((0,x.T)(e=>e.data.keySeq().toSet())),this.currencyConsumptionEvolutionBySku$=this.store.pipe((0,g.Lt)(e=>e.billing.consumption.currencyConsumptionEvolutionBySku)),this.currentPeriodConsumption$=this.store.pipe((0,g.Lt)(e=>e.home.subscription.creditsConsumption)),this.currentPeriodOffPlanCredits$=this.store.pipe((0,g.Lt)(yt.P.getCurrentPeriodOffPlanCredits)),this.productSkuGrid$=this.store.pipe((0,g.Lt)(e=>e.home.subscription.productSkuGrid)),this.billingThreshold$=this.store.pipe((0,g.Lt)(e=>e.billing.consumption.billingThreshold)),this.packs$=this.store.pipe((0,g.Lt)(e=>e.billing.consumption.packs))}onDailyQueryUpdate(e){const a=E.X.ofNullable(e.principal).map(r=>M.CD.of(r.id)).orElse((0,M.CD)());this.store.dispatch(Tt.u.Action.loadConsumptionBySku({principalIds:a,selectedDateMin:e.startDate,
1selectedDateMax:e.endDate,intervalUnit:e.intervalUnit}))}updateBillingThreshold(e){this.store.dispatch(Tt.u.Action.updateBillingThreshold({billingThreshold:e}))}static#t=n=()=>(this.\u0275fac=function(a){return new(a||o)},this.\u0275cmp=t.VBU({type:o,selectors:[["app-billing-consumption"]],standalone:!1,decls:6,vars:3,consts:[[1,"toolbar"],["title","Ma consommation"],[1,"sub-section","two-columns"],[3,"currentPeriodConsumedCredits","subscription"],[3,"subscription","billingThreshold","creditsConsumption","offPlanCredits"],[3,"organization","productSettings","subscription","packs"],[1,"sub-section"],[3,"billingThreshold","subscription"],[1,"sub-section","three-columns"],[3,"onQueryUpdate","aggregationCreditData","aggregationCurrencyData","productSettings","organization","subscription"],[3,"subscription","consumedSkus","productSkuGrid"],[3,"onBillingThresholdUpdated","billingThreshold","subscription"]],template:function(a,r){if(1&a&&(t.j41(0,"app-main")(1,"div",0)(2,"mat-toolbar"),t.nrm(3,"app-title-bar",1),t.k0s()(),t.nVh(4,Uo,16,25,"section"),t.nI1(5,"async"),t.k0s()),2&a){let l;t.R7$(4),t.vxM((l=t.bMT(5,1,r.subscription$))?4:-1,l)}},dependencies:[N.KQ,tt.$,K.z,lt,ut,nt,_t,eo,ro,u.Jj],styles:["[_ngcontent-%COMP%]:root{--app-primary-color-0: #000000;--app-primary-color-10: #001947;--app-primary-color-20: #002C71;--app-primary-color-25: #003688;--app-primary-color-30: #00419F;--app-primary-color-35: #0E4CB2;--app-primary-color-40: #2459BF;--app-primary-color-50: #4473D9;--app-primary-color-60: #608DF5;--app-primary-color-70: #87A9FF;--app-primary-color-80: #B1C5FF;--app-primary-color-90: #DAE2FF;--app-primary-color-95: #EEF0FF;--app-primary-color-98: #FAF8FF;--app-primary-color-99: #FEFBFF;--app-primary-color-100: #FFFFFF;--app-tertiary-color-0: #000000;--app-tertiary-color-10: #400010;--app-tertiary-color-20: #67001E;--app-tertiary-color-25: #7C0026;--app-tertiary-color-30: #8E0C30;--app-tertiary-color-35: #9F1C3B;--app-tertiary-color-40: #AF2A46;--app-tertiary-color-50: #D1445D;--app-tertiary-color-60: #F35D75;--app-tertiary-color-70: #FF8795;--app-tertiary-color-80: #FFB2B9;--app-tertiary-color-90: #FFDADC;--app-tertiary-color-95: #FFECED;--app-tertiary-color-98: #FFF8F7;--app-tertiary-color-99: #FFFBFF;--app-tertiary-color-100: #FFFFFF}.toolbar[_ngcontent-%COMP%]{position:relative}.toolbar[_ngcontent-%COMP%] .mat-toolbar[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:space-between;height:auto;min-height:64px}.toolbar[_ngcontent-%COMP%] .mat-toolbar[_ngcontent-%COMP%]{height:64px}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--spacer-3);margin:var(--spacer-3) var(--spacer-3) var(--spacer-5) var(--spacer-3)}section[_ngcontent-%COMP%] .sub-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--spacer-3)}section[_ngcontent-%COMP%] .sub-section[_ngcontent-%COMP%] app-billing-remaining-credits-card[_ngcontent-%COMP%], section[_ngcontent-%COMP%] .sub-section[_ngcontent-%COMP%] app-billing-off-plan-consumption-card[_ngcontent-%COMP%], section[_ngcontent-%COMP%] .sub-section[_ngcontent-%COMP%] app-billing-pack-checkout-card[_ngcontent-%COMP%], section[_ngcontent-%COMP%] .sub-section[_ngcontent-%COMP%] app-billing-threshold-alert-card[_ngcontent-%COMP%], section[_ngcontent-%COMP%] .sub-section[_ngcontent-%COMP%] app-billing-sku-details-card[_ngcontent-%COMP%], section[_ngcontent-%COMP%] .sub-section[_ngcontent-%COMP%] app-billing-upsell-card[_ngcontent-%COMP%]{flex:1}@media (min-width: 1280px){section[_ngcontent-%COMP%] .sub-section[_ngcontent-%COMP%]{display:grid;align-items:stretch;grid-template-columns:repeat(1,1fr)}section[_ngcontent-%COMP%] .sub-section.two-columns[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr)}section[_ngcontent-%COMP%] .sub-section.three-columns[_ngcontent-%COMP%]{grid-template-columns:repeat(3,1fr)}section[_ngcontent-%COMP%] .sub-section.three-columns[_ngcontent-%COMP%] app-billing-sku-details-card[_ngcontent-%COMP%]{grid-column:1/3}}"],data:{animation:[p.X55.cardEaseIn1,p.X55.cardEaseIn2,p.X55.cardEaseIn3,p.X55.cardEaseIn4,p.X55.cardEaseIn5]},changeDetection:0}))}return n(),o})();var No=c(69559),Go=c(57212),Lo=c(52385);const Vo=[{path:"",redirectTo:`${P.q.URL.BILLING_SUBSCRIPTION}`,pathMatch:"full"},{path:`${P.q.URL.BILLING_SUBSCRIPTION}`,component:Et},{path:`${P.q.URL.BILLING_CONSUMPTION}`,component:wo},{path:`${P.q.URL.BILLING_INVOICES}`,component:Io}];let Yo=(()=>{var n;class o{static#t=n=()=>(this.\u0275fac=function(a){return new(a||o)},this.\u0275mod=t.$C({type:o}),this.\u0275inj=s.G2t({imports:[No.G,Go.G,A.iI.forChild(Vo),ht.u,Et]}))}return n(),o})();t.wjB(lt,function(){return[y.An,Y.oV,b.RN,b.m2,St,Lt,zt,gt,Zt,vn]},[]),t.wjB(ut,function(){return[b.RN,b.m2,Qn]},[]),t.wjB(nt,function(){return[b.RN,b.m2,Lo.r,gt]},[]),t.wjB(_t,function(){return[b.RN,b.m2,Ke]},[])}}]);
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.