1(self.webpackChunkstoryplayr_app_angular=self.webpackChunkstoryplayr_app_angular||[]).push([[972],{87972:(F,R,d)=>{"use strict";d.r(R),d.d(R,{AccountModule:()=>ll});var _=d(28048),h=d(85707),I=d(81619),p=d(36895),S=d(83980),e=d(94650),U=d(96842),u=d(4258),v=d(43627),f=d(86344),m=d(92589),C=d(65268),r=d(24006);function me(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"a",32),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.goToSignup("trial"))}),e._uU(1),e.ALo(2,"transloco"),e.qZA()}2&i&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"TEST_15_DAYS")," "))}function he(i,a){if(1&i&&(e.TgZ(0,"div",33)(1,"span",20),e._uU(2),e.ALo(3,"transloco"),e.qZA(),e.TgZ(4,"span",21),e._uU(5),e.qZA()()),2&i){const t=e.oxw(2);e.xp6(2),e.hij("",e.lcZ(3,2,"PRICE_TTC")," :"),e.xp6(3),e.hij("",t.prices[t.classesNumber].price," \u20ac")}}function fe(i,a){if(1&i&&(e.TgZ(0,"div",19)(1,"span",20),e._uU(2),e.ALo(3,"transloco"),e.qZA(),e.TgZ(4,"span",21),e._uU(5),e.qZA()()),2&i){const t=e.oxw(2);e.xp6(2),e.hij("",e.lcZ(3,2,"AVERAGE_PRICE_PER_CLASS")," :"),e.xp6(3),e.hij("",t.getAveragePricePerClass()," \u20ac")}}function ve(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"a",34),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.goToSignup("payment"))}),e._uU(1),e.ALo(2,"transloco"),e.ALo(3,"transloco"),e.ALo(4,"transloco"),e.ALo(5,"transloco"),e.qZA()}if(2&i){const t=e.oxw(2);e.xp6(1),e.HOy(" ",e.lcZ(2,4,"I_SUBSCRIBE")," ",e.lcZ(3,6,"FOR")," ",t.classesNumber," ",t.classesNumber>1?e.lcZ(4,8,"CLASSES"):e.lcZ(5,10,"CLASS")," ")}}function Se(i,a){1&i&&(e.TgZ(0,"div"),e._uU(1," Si vous souhaitez souscrire pour un plus grand nombre de classes, merci d'\xe9crire \xe0 [email protected] afin de vous envoyer un devis personnalis\xe9. "),e.qZA())}function Ae(i,a){if(1&i&&(e.TgZ(0,"a",35),e._uU(1),e.ALo(2,"transloco"),e.qZA()),2&i){const t=e.oxw(2);e.Q6J("uiSref",t.stpLangageService.langPrefix+"contact"),e.xp6(1),e.hij(" ",e.lcZ(2,2,"I_HAVE_QUESTIONS")," ")}}function Ze(i,a){if(1&i&&(e.TgZ(0,"a",36),e._uU(1),e.ALo(2,"transloco"),e.qZA()),2&i){const t=e.oxw(2);e.MGl("href","",t.stpLangageService.langPrefix,"/contact",e.LSH),e.xp6(1),e.hij(" ",e.lcZ(2,2,"I_HAVE_QUESTIONS")," ")}}function xe(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",1)(1,"div",2)(2,"div",3)(3,"h1",4),e._uU(4),e.ALo(5,"transloco"),e.qZA(),e.TgZ(6,"ul",5)(7,"li"),e._uU(8),e.ALo(9,"transloco"),e.qZA(),e.TgZ(10,"li"),e._uU(11),e.ALo(12,"transloco"),e.qZA(),e.TgZ(13,"li"),e._uU(14),e.ALo(15,"transloco"),e.qZA()(),e.TgZ(16,"div",6),e._uU(17),e.ALo(18,"transloco"),e.qZA(),e.TgZ(19,"div",7)(20,"a",8),e._uU(21),e.ALo(22,"transloco"),e.qZA()(),e.TgZ(23,"picture"),e._UZ(24,"source",9)(25,"source",10)(26,"img",11),e.qZA()(),e.TgZ(27,"div",12)(28,"div",13)(29,"h2",14),e._uU(30),e.ALo(31,"transloco"),e.qZA(),e.TgZ(32,"div",15),e._uU(33),e.ALo(34,"transloco"),e.qZA(),e.TgZ(35,"div"),e._uU(36),e.ALo(37,"transloco"),e.qZA(),e.YNc(38,me,3,3,"a",16),e.TgZ(39,"div",17)(40,"div",18),e._uU(41),e.ALo(42,"transloco"),e.qZA(),e.TgZ(43,"div")(44,"div",19)(45,"span",20),e._uU(46),e.ALo(47,"transloco"),e.qZA(),e.TgZ(48,"span",21)(49,"input",22),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.classesNumber=o)}),e.qZA()()(),e.YNc(50,he,6,4,"div",23),e.YNc(51,fe,6,4,"div",24),e.qZA()(),e.TgZ(52,"div"),e.YNc(53,ve,6,12,"a",25),e.YNc(54,Se,2,0,"div",26),e.qZA(),e.TgZ(55,"div"),e.YNc(56,Ae,3,4,"a",27),e.YNc(57,Ze,3,4,"a",28),e.qZA()()(),e.TgZ(58,"div",29)(59,"div")(60,"a",30),e._uU(61),e.ALo(62,"transloco"),e.qZA()(),e.TgZ(63,"div",31)(64,"a",30),e._uU(65),e.ALo(66,"transloco"),e.qZA()()()()()}if(2&i){const t=e.oxw();e.xp6(4),e.hij(" ",e.lcZ(5,24,"SCHOOL_PRICE_TITLE")," "),e.xp6(4),e.Oqu(e.lcZ(9,26,"SCHOOL_PRICE_ITEM1")),e.xp6(3),e.Oqu(e.lcZ(12,28,"SCHOOL_PRICE_ITEM2")),e.xp6(3),e.Oqu(e.lcZ(15,30,"SCHOOL_PRICE_ITEM3")),e.xp6(3),e.hij(" ",e.lcZ(18,32,"EDUCATION_INCLUDES_ALL_READING_AID")," "),e.xp6(3),e.MGl("href","",t.stpLangageService.langPrefix,"/aide-lecture",e.LSH),e.xp6(1),e.hij(" ",e.lcZ(22,34,"SEE_DETAILS_READING_HELP")," "),e.xp6(9),e.hij(" ",e.lcZ(31,36,"EDUCATION_SUBSCRIPTION")," "),e.xp6(3),e.hij(" ",e.lcZ(34,38,"SCHOOL_PRICES_TXT1")," "),e.xp6(3),e.hij(" ",e.lcZ(37,40,"SCHOOL_PRICES_TXT2")," "),e.xp6(2),e.Q6J("ngIf",!t.stpSession.isLogged()),e.xp6(3),e.Oqu(e.l
1cZ(42,42,"CALCULATE_PRICE")),e.xp6(5),e.hij("",e.lcZ(47,44,"NUMBER_OF_CLASSES")," :"),e.xp6(3),e.Q6J("ngModel",t.classesNumber),e.xp6(1),e.Q6J("ngIf",t.prices[t.classesNumber].price),e.xp6(1),e.Q6J("ngIf",t.prices[t.classesNumber].price),e.xp6(2),e.Q6J("ngIf",t.prices[t.classesNumber].price),e.xp6(1),e.Q6J("ngIf",!t.prices[t.classesNumber].price),e.xp6(2),e.Q6J("ngIf",!t.isBot),e.xp6(1),e.Q6J("ngIf",t.isBot),e.xp6(3),e.Q6J("uiSref",t.stpLangageService.langPrefix+"subscribe"),e.xp6(1),e.hij(" ",e.lcZ(62,46,"ARE_YOU_A_FAMILY")," "),e.xp6(3),e.Q6J("uiSref",t.stpLangageService.langPrefix+"mediatheque"),e.xp6(1),e.hij(" ",e.lcZ(66,48,"ARE_YOU_A_LIBRARY")," ")}}let Te=(()=>{class i{constructor(t,n,o,s,l,c){this.stpResponsive=t,this.stateService=n,this.apiService=o,this.stpConfig=s,this.stpSession=l,this.stpLangageService=c}ngOnInit(){this.isBot=this.stpResponsive.isBot(),this.prices=[],this.apiService.get(this.stpConfig.api+"/api/subscriptions/getClassroomPrices").subscribe(t=>{this.prices=t},t=>{console.error(t)}),this.classesNumber=1}getAveragePricePerClass(){if(!this.prices[0])return"loading";let t=this.prices[this.classesNumber].price/this.classesNumber;return t*=100,t=Math.round(t),t/=100,t}goToSignup(t){this.stateService.go(this.stpLangageService.langPrefix+"educationSignuppremium",{next:t,quantity:this.classesNumber})}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(U.g),e.Y36(u.b2),e.Y36(v.s),e.Y36(f.P),e.Y36(m.i),e.Y36(C.s))},i.\u0275cmp=e.Xpm({type:i,selectors:[["stp-home"]],decls:1,vars:1,consts:[["class","container stp-container-v3",4,"ngIf"],[1,"container","stp-container-v3"],[1,"row"],[1,"col-lg-6","col-md-6","visible-md","visible-lg",2,"padding-right","60px"],[1,"stp-color-red","stp-title-big-and-thin","stp-color-red",2,"margin-bottom","25px"],[1,"stp-regular-font","stp-text-bold",2,"margin-bottom","25px","padding-left","20px"],[1,"stp-regular-font","stp-text-bold",2,"background-color","#7fc13e","color","white","padding","15px","margin-bottom","15px"],[2,"margin-bottom","25px"],[1,"stp-text-bold","stp-color-red","stp-text-underline",3,"href"],["srcset","assets/images/v3/subscribe-mosaic.webp","type","image/webp"],["srcset","assets/images/v3/subscribe-mosaic.jpg","type","image/jpeg"],["alt","subscribe-mosaic","src","assets/images/v3/subscribe-mosaic.jpg",1,"stp-full-size-element"],[1,"col-lg-6","col-md-6","col-sm-12","col-xs-12",2,"margin-top","20px"],[1,"stp-box-shadow","stp-regular-font",2,"border-radius","20px","text-align","center","padding","30px 60px","margin-bottom","35px"],[1,"stp-color-red","stp-text-bold",2,"margin-bottom","5px","font-size","23px"],[1,"stp-regular-font",2,"font-weight","700"],["class","stp-button-big stp-button-white stp-button-red-hover","rel","nofollow","style","margin-top: 10px;",3,"click",4,"ngIf"],[1,"stp-regular-font",2,"border","1px solid lightgrey","padding","10px 30px","margin","10px 5px 25px 5px"],[1,"row",2,"margin-bottom","15px"],[1,"row",2,"margin-bottom","10px"],[2,"float","left"],[2,"float","right"],["type","number","min","1","max","30",2,"text-align","right","width","50px",3,"ngModel","ngModelChange"],["class","row stp-text-bold","style","margin-bottom: 10px;",4,"ngIf"],["class","row","style","margin-bottom: 10px;",4,"ngIf"],["class","stp-button-big stp-button-white stp-button-red-hover","rel","nofollow","style","margin-bottom: 10px;",3,"click",4,"ngIf"],[4,"ngIf"],["class","stp-text-bold stp-color-red stp-text-underline","style","margin-bottom: 10px;",3,"uiSref",4,"ngIf"],["class","stp-text-bold stp-color-red stp-text-underline","style","margin-bottom: 10px;",3,"href",4,"ngIf"],[1,"stp-regular-font","stp-text-bold","stp-text-center"],[1,"stp-color-red",3,"uiSref"],[2,"margin-top","10px"],["rel","nofollow",1,"stp-button-big","stp-button-white","stp-button-red-hover",2,"margin-top","10px",3,"click"],[1,"row","stp-text-bold",2,"margin-bottom","10px"],["rel","nofollow",1,"stp-button-big","stp-button-white","stp-button-red-hover",2,"margin-bottom","10px",3,"click"],[1,"stp-text-bold","stp-color-red","stp-text-underline",2,"margin-bottom","10px",3,"uiSref"],[1,"stp-text-bold","stp-color-red","stp-text-underline",2,"margin-bottom","10px",3,"href"]],template:function(t,n){1&t&&e.YNc(0,xe,67,50,"div",0),2&t&&e.Q6J("ngIf",!!n.prices&&n.prices.length>0)},dependencies:[_.bcJ,_.KeH,p.O5,r.Fj,r.wV,r.JJ,r.qQ,r.Fd,r.On,h.Ot],encapsulation:2}),i})();var b=d(8535),be=d(17489),w=d.n(be),M=d(17450),Y=d(86648),K=d(28316),P=d(8978),N=d(13779);const Q=function(){return{standalone:!0}},Ce=function(){return{page:"cgu"}};function Ne(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"form",18),e.NdJ("submit",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.signup())}),e.TgZ(1,"div",1)(2,"div",19)(3,"input",20),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.user.lastName=o)}),e.ALo(4,"transloco"),e.qZA()(),e.TgZ(5,"div",19)(6,"input",20),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.user.firstName=o)}),e.ALo(7,"transloco"),e.qZA()()(),e.TgZ(8,"div",21)(9,"input",22),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.user.email=o)}),e.ALo(10,"transloco"),e.qZA()(),e.TgZ(11,"div",21)(12,"input",23),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.user.password=o)}),e.ALo(13,"transloco"),e.qZA()(),e.TgZ(14,"div",21)(15,"div",24)(16,"label")(17,"input",25),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(!!(s.user.acceptTerms=o))}),e.qZA(),e._uU(18),e.ALo(19,"transloco"),e.TgZ(20,"a",26),e._uU(21),e.ALo(22,"transloco"),e.qZA()()()(),e._UZ(23,"div",27),e.TgZ(24,"button",28),e._uU(25),e.ALo(26,"transloco"),e.qZA(),e.TgZ(27,"div")(28,"a",29),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.goBack())}),e._uU(29),e.ALo(30,"transloco"),e.qZA()()()}if(2&i){const t=e.oxw();e.xp6(3),e.MGl("placeholder","",e.lcZ(4,25,"LASTNAME"),"*"),e.Q6J("ngModel",t.user.lastName)("disabled",t.ui.pending)("ngModelOptions",e.DdM(41,Q)),e.xp6(3),e.MGl("placeholder","",e.lcZ(7,27,"FIRSTNAME"),"*"),e.Q6J("ngModel",t.user.firstName)("disabled",t.ui.pending)("ngModelOptions",e.DdM(42,Q)),e.xp6(3),e.MGl("placeholder","",e.lcZ(10,29,"EMAIL"),"*"),e.Q6J("ngModel",t.user.email)("disabled",t.ui.pending||!!t.discover)("ngModelOptions",e.DdM(43,Q)),e.xp6(3),e.MGl("placeholder","",e.lcZ(13,31,"CHOOSEPASSWORD"),"*"),e.Q6J("ngModel",t.user.password)("disabled",t.ui.pending)("ngModelOptions",e.DdM(44,Q)),e.xp6(
15),e.Q6J("ngModel",!!t.user.acceptTerms)("ngModelOptions",e.DdM(45,Q)),e.xp6(1),e.hij(" ",e.lcZ(19,33,"ACCEPT_PART1")," "),e.xp6(2),e.Q6J("uiSref",t.stpLangageService.langPrefix+"static")("uiParams",e.DdM(46,Ce)),e.xp6(1),e.hij(" ",e.lcZ(22,35,"ACCEPT_PART2")," "),e.xp6(3),e.Q6J("disabled",!t.user.acceptTerms||!1),e.xp6(1),e.hij(" ",e.lcZ(26,37,"NEXT")," "),e.xp6(4),e.hij(" ",e.lcZ(30,39,"BACK")," ")}}let Me=(()=>{class i{constructor(t,n,o,s,l,c,g,A,L,y,H,B){this.stpSeo=t,this.translocoService=n,this.apiService=o,this.stpConfig=s,this.spEventService=l,this.stpLangageService=c,this.stpNavigationService=g,this.stpAuthService=A,this.stpSession=L,this.stateService=y,this.Flash=H,this.stpEventService=B,this.loadRecaptchaScript()}loadRecaptchaScript(){const t=document.createElement("script");t.src="https://www.google.com/recaptcha/api.js?onload=onloadRecaptchaCallbackGlobal&render=explicit",t.async=!0,t.defer=!0,window.onloadRecaptchaCallbackGlobal=()=>{window.grecaptcha&&this.captchaUsage&&this.renderRecaptcha()},t.onerror=()=>{console.error("Failed to load recaptcha script")},document.head.appendChild(t)}ngOnInit(){this.stpSeo.setTitle(this.translocoService.translate("PAGETITLE_SIGNUP")),this.stpSeo.setTitle("Inscription"),this.selectedPlan=null;let t=this.stateService.params.plan;if(this.publicPlans=this.getPublicPlans,t&&this.publicPlans.forEach(o=>{o.stripeId==t&&(this.selectedPlan=o)}),!this.selectedPlan)return void this.stateService.go(this.stpLangageService.langPrefix+"subscribe");if(this.stpSession.isLogged())return void this.stateService.go(this.stpLangageService.langPrefix+"payment",{plan:this.selectedPlan.stripeId});let n=this.stpSession.getSharedObjectForDiscover();this.getCaptchaUsage(),w().extend(this,{stpConfig:this.stpConfig,hasSharedObjectForDiscoverInSignupContext:!!n,params:this.stateService.params,ui:{pending:!1},user:{}}),n&&(this.user.email=n.recipient_email,this.user.sharedForDiscoverId=n._id),this.params.promocode&&(this.user.promoCode=this.params.promocode),setTimeout(()=>{this.user.acceptTerms=!0},500)}facebookCallback(){this.stateService.go(this.stpLangageService.langPrefix.replace("#","").replace("/","")+"payment",{plan:this.selectedPlan.stripeId})}displayPromocode(){return this.params.paramCookie.promocode}backToSubscribe(t){this.stateService.go(this.stpLangageService.langPrefix+"subscribe"),this.selectedPlan=null}goBack(){if(this.stpSession.isWebApp())this.stpNavigationService.goBack();else{const t=document.referrer;t&&-1!==t.indexOf(this.stpConfig.app)&&-1===t.indexOf(this.stpConfig.api+"/api")?window.history.back():this.stateService.go(this.stpLangageService.langPrefix+"bibliotheque")}}getCaptchaUsage(){this.apiService.get(this.stpConfig.api+"/api/config/getCaptchaUsage").subscribe(t=>{if(this.captchaUsage=t.captchaUsage,this.captchaUsage){const n=document.getElementById("recaptcha");if(!n)return;n.style.display="block",this.renderRecaptcha()}else{const n=document.getElementById("next");n&&n.removeAttribute("disabled")}},t=>{console.error("Error checking captcha usage:",t)})}renderRecaptcha(){if(!window.grecaptcha)return void setTimeout(()=>this.renderRecaptcha(),500);if(!this.stpConfig.recaptchaKey)return void console.error("recaptchaKey is not set in config");if(!document.getElementById("recaptcha"))return;const n=()=>{grecaptcha.reset("recaptcha")},o=s=>{this.recaptchaToken=s;const l=document.getElementById("next");l&&l.removeAttribute("disabled")};try{grecaptcha.render("recaptcha",{sitekey:this.stpConfig.recaptchaKey,callback:o,"expired-callback":n})}catch(s){console.error("Error rendering recaptcha:",s)}}signup(){if(!this.recaptchaToken&&this.captchaUsage)return alert("Captcha non valid\xe9 !");this.ui.pending=!0,this.params.promocode&&(this.user.promoCode=this.params.promocode),this.user.country=this.stpLangageService.getCurrentCountryCode(),this.user.language=this.stpLangageService.getCurrentLanguage(),this.user.currency=this.stpLangageService.getCurrentCurrencyCode(),this.stpAuthService.signup(this.user,!1,t=>{this.ui.pending=!1,!t&&this.stpSession.fetchFromServerAndRefreshSession().then(()=>{this.stpEventService.signup(),this.stateService.go(this.stpLangageService.langPrefix+"payment",{plan:this.selectedPlan.stripeId})})})}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(M.i),e.Y36(h.Vn),e.Y36(v.s),e.Y36(f.P),e.Y36(Y.m),e.Y36(C.s),e.Y36(K.j),e.Y36(P.b),e.Y36(m.i),e.Y36(u.b2),e.Y36(N.M),e.Y36(Y.m))},i.\u0275cmp=e.Xpm({type:i,selectors:[["stp-signup"]],inputs:{getPublicPlans:"getPublicPlans"},decls:44,vars:32,consts:[[1,"container","stp-container-v3"],[1,"row"],[1,"col-lg-6","col-md-6","visible-md","visible-lg",2,"padding-right","60px"],[1,"stp-color-red","stp-title-big-and-thin","stp-color-red",2,"margin-bottom","25px"],[1,"stp-regular-font","stp-text-bold",2,"margin-bottom","25px","padding-left","20px"],[1,"stp-regular-font","stp-text-bold",2,"background-color","#7fc13e","color","white","padding","15px","margin-bottom","15px"],["srcset","assets/images/v3/signup-mosaic.webp","type","image/webp"],["srcset","assets/images/v3/signup-mosaic.jpg","type","image/jpeg"],["alt","signup-mosaic","src","assets/images/v3/signup-mosaic.jpg",1,"stp-full-size-element"],[1,"col-lg-6","col-md-6","col-sm-12","col-xs-12",2,"margin-top","20px"],[1,"stp-box-sha
1dow","stp-regular-font",2,"border-radius","20px","text-align","center","padding","30px 60px","margin-bottom","35px"],[2,"margin-bottom","50px","font-size","23px"],["name","form",3,"submit",4,"ngIf"],[1,"stp-hr"],[1,"stp-small-font","stp-text-bold",2,"margin-bottom","10px"],[1,"stp-small-font","stp-text-bold",2,"margin-bottom","25px"],[2,"color","white","background-color","red","border-radius","15px","border","none","padding","5px 15px",3,"uiSref"],[2,"font-size","14px","text-align","left"],["name","form",3,"submit"],[1,"form-group","col-6"],["required","","type","text",1,"form-control",3,"ngModel","disabled","ngModelOptions","placeholder","ngModelChange"],[1,"form-group"],["required","","type","email",1,"form-control",3,"ngModel","disabled","ngModelOptions","placeholder","ngModelChange"],["required","","type","password",1,"form-control",3,"ngModel","disabled","ngModelOptions","placeholder","ngModelChange"],[1,"checkbox"],["type","checkbox","required","true",3,"ngModel","ngModelOptions","ngModelChange"],["target","_blank",3,"uiSref","uiParams"],["id","recaptcha",1,"form-group",2,"display","none"],["id","next",1,"stp-text-bold","stp-payment-button",2,"width","100%","border","none",3,"disabled"],["href","#","rel","nofollow",3,"click"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"h1",3),e._uU(4),e.ALo(5,"transloco"),e.qZA(),e.TgZ(6,"ul",4)(7,"li"),e._uU(8),e.ALo(9,"transloco"),e.qZA(),e.TgZ(10,"li"),e._uU(11),e.ALo(12,"transloco"),e.qZA(),e.TgZ(13,"li"),e._uU(14),e.ALo(15,"transloco"),e.qZA()(),e.TgZ(16,"div",5),e._uU(17),e.ALo(18,"transloco"),e.qZA(),e.TgZ(19,"picture"),e._UZ(20,"source",6)(21,"source",7)(22,"img",8),e.qZA()(),e.TgZ(23,"div",9)(24,"div",10)(25,"h2",11),e._uU(26),e.ALo(27,"transloco"),e.qZA(),e.YNc(28,Ne,31,47,"form",12),e._UZ(29,"hr",13),e.TgZ(30,"div",14),e._uU(31),e.ALo(32,"transloco"),e.qZA(),e.TgZ(33,"div",15)(34,"a",16),e._uU(35),e.ALo(36,"transloco"),e.qZA()(),e.TgZ(37,"div",17)(38,"i"),e._uU(39),e.ALo(40,"transloco"),e._UZ(41,"br"),e._uU(42),e.ALo(43,"transloco"),e.qZA()()()()()()),2&t&&(e.xp6(4),e.hij(" ",e.lcZ(5,12,"SUBSCRIBE_TXT10")," "),e.xp6(4),e.Oqu(e.lcZ(9,14,"SUBSCRIBE_TXT11")),e.xp6(3),e.Oqu(e.lcZ(12,16,"SUBSCRIBE_TXT12")),e.xp6(3),e.Oqu(e.lcZ(15,18,"SUBSCRIBE_TXT13")),e.xp6(3),e.hij(" ",e.lcZ(18,20,"SUBSCRIBE_TXT14")," "),e.xp6(9),e.Oqu(e.lcZ(27,22,"CREATE_ACCOUNT")),e.xp6(2),e.Q6J("ngIf",!!n.user),e.xp6(3),e.hij(" ",e.lcZ(32,24,"ACCOUNT_ALREADY")," "),e.xp6(3),e.Q6J("uiSref",n.stpLangageService.langPrefix+"login"),e.xp6(1),e.hij(" ",e.lcZ(36,26,"LOGIN")," "),e.xp6(4),e.hij(" ",e.lcZ(40,28,"DATA_COLLECTION_CNIL_PART1")," "),e.xp6(3),e.hij(" ",e.lcZ(43,30,"DATA_COLLECTION_CNIL_PART2")," "))},dependencies:[_.bcJ,_.KeH,p.O5,r._Y,r.Fj,r.Wl,r.JJ,r.JL,r.Q7,r.Zs,r.On,r.F,h.Ot],encapsulation:2}),i})();var Z=d(98162),q=d(98370),E=d(15861),V=d(3679);let ne=(()=>{class i{constructor(){}loadStripeScript(){return new Promise((t,n)=>{if(window.Stripe)return void t();const o=document.createElement("script");o.src="https://js.stripe.com/v3/",o.async=!0,o.onload=()=>t(),o.onerror=s=>n(s),document.body.appendChild(o)})}}return i.\u0275fac=function(t){return new(t||i)},i.\u0275prov=e.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();var G=d(58509);function Le(i,a){1&i&&(e.TgZ(0,"div",56)(1,"div",57),e._UZ(2,"div")(3,"div"),e.qZA(),e.TgZ(4,"p",58),e._uU(5),e.ALo(6,"transloco"),e.qZA()()),2&i&&(e.xp6(5),e.Oqu(e.l
1cZ(6,1,"LOADING_TEXT")))}function ye(i,a){if(1&i&&(e.TgZ(0,"div",8),e._uU(1),e.qZA()),2&i){const t=e.oxw(2);e.xp6(1),e.hij(" ",t.selectedPlan.longPlanName," ")}}function Pe(i,a){if(1&i&&(e.TgZ(0,"div",8),e._uU(1),e.qZA()),2&i){const t=e.oxw(2);e.xp6(1),e.hij(" ",t.selectedPlan.longPlanNameEn," ")}}function qe(i,a){1&i&&(e.TgZ(0,"ul",66)(1,"li",67),e._uU(2),e.ALo(3,"transloco"),e.qZA(),e.TgZ(4,"li"),e._uU(5),e.ALo(6,"transloco"),e.qZA(),e.TgZ(7,"li"),e._uU(8),e.ALo(9,"transloco"),e.qZA(),e.TgZ(10,"li"),e._uU(11),e.ALo(12,"transloco"),e.qZA()()),2&i&&(e.xp6(2),e.hij("",e.lcZ(3,4,"CHOOSE_PLAN_MONTHLY_TEXT_1"),"*"),e.xp6(3),e.Oqu(e.lcZ(6,6,"CHOOSE_PLAN_MONTHLY_TEXT_2")),e.xp6(3),e.Oqu(e.lcZ(9,8,"CHOOSE_PLAN_MONTHLY_TEXT_3")),e.xp6(3),e.Oqu(e.lcZ(12,10,"CHOOSE_PLAN_MONTHLY_TEXT_4")))}function Ee(i,a){if(1&i&&(e.TgZ(0,"h2",59)(1,"div",60),e.YNc(2,ye,2,1,"div",61),e.YNc(3,Pe,2,1,"div",61),e.TgZ(4,"div"),e.YNc(5,qe,13,12,"ul",62),e.qZA()(),e.TgZ(6,"div",63)(7,"div",64),e._UZ(8,"div",65),e.qZA()()()),2&i){const t=e.oxw();e.xp6(2),e.Q6J("ngIf",!!t.selectedPlan&&"fr"===t.stpLangageService.getCurrentLanguage()),e.xp6(1),e.Q6J("ngIf",!!t.selectedPlan&&"fr"!==t.stpLangageService.getCurrentLanguage()),e.xp6(2),e.Q6J("ngIf",!!t.selectedPlan&&t.isMonthlyPlan(t.selectedPlan)),e.xp6(3),e.Q6J("innerHtml",t.getPriceLabel(),e.oJD)}}function Oe(i,a){if(1&i&&(e.TgZ(0,"span",70),e._uU(1),e.qZA()),2&i){const t=e.oxw(2);e.xp6(1),e.hij("\n",t.selectedPlan.longPlanName,"\n")}}function Ie(i,a){if(1&i&&(e.TgZ(0,"span",70),e._uU(1),e.qZA()),2&i){const t=e.oxw(2);e.xp6(1),e.hij("\n",t.selectedPlan.longPlanNameEn,"\n")}}function Ue(i,a){if(1&i&&(e.TgZ(0,"h2",59),e.YNc(1,Oe,2,1,"span",68),e.YNc(2,Ie,2,1,"span",68),e.TgZ(3,"div",63)(4,"div",64)(5,"div",69),e._uU(6),e.ALo(7,"transloco"),e.qZA()()()()),2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngIf","fr"===t.stpLangageService.getCurrentLanguage()),e.xp6(1),e.Q6J("ngIf","fr"!==t.stpLangageService.getCurrentLanguage()),e.xp6(4),e.lnq(" ",t.schoolPrices[t.quantity].price-t.reduction,"\u20ac / ",t.quantity," ",t.quantity>1?"CLASSES":e.lcZ(7,5,"CLASS")," ")}}function we(i,a){1&i&&(e.TgZ(0,"span",84),e._UZ(1,"i",85),e.qZA())}function Je(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",77),e.NdJ("click",function(){const s=e.CHM(t).$implicit,l=e.oxw(2);return e.KtG(l.selectedSavedCardId=s.paymentMethodId)}),e.TgZ(1,"label",78)(2,"input",79),e.NdJ("change",function(){const s=e.CHM(t).$implicit,l=e.oxw(2);return e.KtG(l.selectedSavedCardId=s.paymentMethodId)}),e.qZA(),e.TgZ(3,"span",80)(4,"span",81),e._uU(5),e.qZA(),e.TgZ(6,"span",82),e._uU(7),e.qZA()()(),e.YNc(8,we,2,0,"span",83),e.qZA()}if(2&i){const t=a.$implicit,n=e.oxw(2);e.ekj("stp-payment-card-option-selected",n.selectedSavedCardId===t.paymentMethodId),e.xp6(1),e.MGl("for","saved-card-",t.paymentMethodId,""),e.xp6(1),e.MGl("id","saved-card-",t.paymentMethodId,""),e.Q6J("checked",n.selectedSavedCardId===t.paymentMethodId),e.xp6(3),e.Oqu(t.brand),e.xp6(2),e.lnq("\u2022\u2022\u2022\u2022 ",t.last4," \xb7 ",t.exp_month,"/",t.exp_year,""),e.xp6(1),e.Q6J("ngIf",n.selectedSavedCardId===t.paymentMethodId)}}function Re(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div")(1,"div",19)(2,"div",71)(3,"div",72),e._uU(4),e.ALo(5,"transloco"),e.qZA(),e.TgZ(6,"div",73),e.YNc(7,Je,9,10,"div",74),e.qZA()()(),e.TgZ(8,"button",75),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return o.showAddCardModal=!0,e.KtG(o.mountNewCardFields())}),e._uU(9),e.ALo(10,"transloco"),e.qZA(),e.TgZ(11,"button",76),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.subscribeWithSavedCard())}),e._uU(12),e.ALo(13,"transloco"),e.qZA()()}if(2&i){const t=e.oxw();e.xp6(4),e.Oqu(e.lcZ(5,5,"CARD_NUMBER")),e.xp6(3),e.Q6J("ngForOf",t.savedCards),e.xp6(2),e.hij(" ",e.lcZ(10,7,"ADD_CARD")," "),e.xp6(2),e.Q6J("disabled",t.ui.cardPending||!t.selectedSavedCardId),e.xp6(1),e.hij(" ",e.lcZ(13,9,"PAY")," ")}}function Ye(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",5)(1,"div",86)(2,"div",33),e._uU(3),e.ALo(4,"transloco"),e.qZA(),e._UZ(5,"div",87),e.qZA()(),e.TgZ(6,"div",19)(7,"div",88)(8,"div",89),e._uU(9),e.ALo(10,"transloco"),e.qZA(),e._UZ(11,"div",90),e.qZA(),e.TgZ(12,"div",88)(13,"div",89),e._uU(14),e.ALo(15,"transloco"),e.qZA(),e._UZ(16,"div",91),e.qZA()(),e.TgZ(17,"button",76),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.subscribe())}),e._uU(18),e.ALo(19,"transloco"),e.qZA()}if(2&i){const t=e.oxw();
1e.xp6(3),e.Oqu(e.lcZ(4,5,"CARD_NUMBER")),e.xp6(6),e.Oqu(e.lcZ(10,7,"EXP_DATE")),e.xp6(5),e.Oqu(e.lcZ(15,9,"CARD_CRYPTO")),e.xp6(3),e.Q6J("disabled",t.ui.cardPending||!t.ui.cardNumberValid||!t.ui.cardExpiryValid||!t.ui.cardCvcValid),e.xp6(1),e.hij(" ",e.lcZ(19,11,"PAY")," ")}}function Fe(i,a){1&i&&(e.TgZ(0,"div",33),e._uU(1),e.ALo(2,"transloco"),e.qZA()),2&i&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"ENTER_PROMOCODE_AND_CONFIRM")," "))}function ke(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",86)(1,"input",92),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.paymentPromocode.code=o)}),e.qZA(),e.TgZ(2,"a",93),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.submitPromocode())}),e._uU(3),e.ALo(4,"transloco"),e.qZA()()}if(2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngModel",t.paymentPromocode.code),e.xp6(2),e.hij(" ",e.lcZ(4,2,"VALIDATE")," ")}}function De(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",86),e._uU(1," \u279c "),e.TgZ(2,"a",94),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.enablePromocodeField())}),e._uU(3),e.ALo(4,"transloco"),e.qZA()()}2&i&&(e.xp6(3),e.Oqu(e.lcZ(4,1,"I_HAVE_PROMO_CODE")))}function Qe(i,a){1&i&&(e.TgZ(0,"div",95),e._uU(1),e.ALo(2,"transloco"),e.qZA()),2&i&&(e.xp6(1),e.hij(" * : ",e.lcZ(2,1,"ONLY_NEW_SUBSCRIBER_NOTE")," "))}let Ge=(()=>{class i{constructor(t,n,o,s,l,c,g,A,L,y,H,B){this.stpSubscription=t,this.stpConfig=n,this.apiService=o,this.stpSeo=s,this.stpSession=l,this.stpLangageService=c,this.stpEventService=g,this.stateService=A,this.Flash=L,this.stpAuth=y,this.translocoService=H,this.stpStripeService=B,this.showLogoutModal=!1,this.ui={cardPending:!1,cardNumberValid:!1,cardExpiryValid:!1,cardCvcValid:!1},this.savedCards=[],this.selectedSavedCardId=null,this.showAddCardModal=!1,this.addCardUi={cardPending:!1,cardNumberValid:!1,cardExpiryValid:!1,cardCvcValid:!1}}ngOnInit(){var t=this;return(0,E.Z)(function*(){if(t.publicPlans=yield t.stpSubscription.getPublicPlans(),t.classroomPlans=yield t.stpSubscription.getClassroomPlans(),t.subscription=yield t.stpSubscription.getMines(),t.loadSavedCards(),t.page="payment",!t.stpSession.isGar()){yield t.stpStripeService.loadStripeScript(),t.stripe=Stripe(t.stpConfig.stripeKey);let o=t.stripe.elements();t.cardNumber=o.create("cardNumber",{classes:{base:"form-control cardnumber"}}),t.cardExpiry=o.create("cardExpiry",{classes:{base:"form-control cardexpiration"}}),t.cardCvc=o.create("cardCvc",{classes:{base:"form-control cardcrypto"}}),t.cardNumber.mount("#card-number-payment"),t.cardExpiry.mount("#card-expiry-payment"),t.cardCvc.mount("#card-cvc-payment"),t.cardNumber.on("change",s=>{t.ui.cardNumberValid=s.complete&&!s.error}),t.cardExpiry.on("change",s=>{t.ui.cardExpiryValid=s.complete&&!s.error}),t.cardCvc.on("change",s=>{t.ui.cardCvcValid=s.complete&&!s.error})}if(t.stpSeo.setTitle(t.translocoService.translate("PAGETITLE_PAYMENT")),t.getSchoolPlanPrices(),t.stpSession.isLogged()){if(w().extend(t,{card:{},ui:{},selectedPlan:null,displayPromoCodeForm:!1,paymentPromocode:{},isClassroomPlan:null,quantity:null,showPromocodeField:!1,reduction:0,stpLangageService:t.stpLangageService}),t.stateService.params.plan){let o=t.getPlanByStripeId(t.stateService.params.plan);if(!o)return t.stateService.params.plan||null;t.selectedPlan=o;let s=t.selectedPlan.stripeId;t.isClassroomPlan=!1;for(let l in t.classroomPlans)s===t.classroomPlans[l]&&(t.isClassroomPlan=!0)}t.quantity=t.stateService.params.quantity||1}else t.stateService.go(t.stpLangageService.langPrefix+"subscribe")})()}get hasValidSavedCards(){return this.savedCards.length>0}normalizeSavedCards(t){return Array.isArray(t)?t.map(o=>o&&o.card&&"object"==typeof o.card?{...o,brand:o.card.brand,exp_month:o.card.exp_month,exp_year:o.card.exp_year,last4:o.card.last4,paymentMethodId:o.id||o.stripe_id||o.paymentMethodId}:{...o,paymentMethodId:o.id||o.stripe_id||o.paymentMethodId}).filter(o=>!!(o&&o.exp_month&&o.exp_year)&&new Date(Number(o.exp_year),Number(o.exp_month),0,23,59,59,999).getTime()>=Date.now()):[]}loadSavedCards(){!this.stpSubscription||this.stpSubscription.getAllCards((t,n)=>{if(t)return this.savedCards=[],void(this.selectedSavedCardId=null);const o=this.normalizeSavedCards(Array.isArray(n)?n:n&&n.cards?n.cards:[]);this.savedCards=o,this.selectedSavedCardId=o.length?o.find(s=>s.isDefault)?.paymentMethodId||o[0].paymentMethodId:null})}subscribeWithSavedCard(){var t=this;return(0,E.Z)(function*(){if(!t.selectedSavedCardId||!t.selectedPlan)return;t.ui.cardPending=!0;let n=0;n=t.isClassroomPlan?100*t.schoolPrices[t.quantity].price:t.selectedPlan.price,t.handlePayment({payment_method_id:t.selectedSavedCardId,amount:n,planType:t.selectedPlan.type,promocode:t.paymentPromocode.code?t.paymentPromocode.code:null})})()}handleCardSetupFor3DSecure(t,n=this.cardNumber,o){this.stpEventService.createLogEvent("handleCardSetupFor3DSecure : waiting for authorization for setup_intent_client_secret "+t),this.stripe.handleCardSetup(t,n).then(s=>{s.error?(console.log(s.error),this.stpEventService.createErrorLogEvent("handleCardSetupFor3DSecure : got error from stripe.handleCardSetup, code = "+JSON.stringify(s.error)),this.ui.cardPending=!1,this.addCardUi.cardPending=!1):o?o():this.handlePayment({payment_method_id:s.setupIntent.payment_method,setup_intent_id:s.setupIntent.id})})}handleCardActionFor3DSecure(t,n=this.cardNumber,o,s=!this.selectedPlan||"PDI"===this.selectedPlan.type){s?this.handleCardSetupFor3DSecure(t,n,o):(this.stpEventService.createLogEvent("handleCardActionFor3DSecure PDD : waiting for authorizationfor payment_intent_client_secret "+t),this.stripe.handleCardAction(t).then(l=>{l.error?(console.log(l.error),this.stpEventService.createErrorLogEvent("got error from stripe.handleCardAction, code = "+JSON.stringify(l.error)),this.ui.cardPending=!1,this.addCardUi.cardPending=!1):o?o():this.handlePayment({payment_intent_id:l.paymentIntent.i
1d})}))}showError(t){this.Flash.errorTranslate(t,{timeout:8e3})}hasTranslation(t){try{return this.translocoService.translate(t)!==t}catch{return!1}}getPlanByStripeId(t){for(let n=0;n<this.publicPlans.length;n++)if(this.publicPlans[n].stripeId===t)return this.publicPlans[n];return null}getSchoolPlanPrices(){this.apiService.get(this.stpConfig.api+"/api/subscriptions/getClassroomPrices").subscribe(t=>{this.schoolPrices=t},t=>{console.error(t)})}isExpired(){let t=new Date;if(!this.subscription||null==this.subscription.endDate)return!1;let n=new Date(String(this.subscription.endDate).substr(0,10));return t.getTime()>n.getTime()}isMonthlyPlan(t){return!!t&&t.stripeId.indexOf("monthly")>=0}getStripeIdWithNoPrefix(){return this.stpSession.getPreferredCurrencyCode()!=V.g.CURRENCYCODE_EURO?this.selectedPlan.stripeId.replace(this.stpSession.getPreferredCurrencyCode()+"-","").replace(this.stpSession.getPreferredCurrencyCode()+"_",""):this.selectedPlan.stripeId}backToSubscribe(){this.stateService.go(this.stpLangageService.langPrefix+"subscribe"),this.selectedPlan=null}setDisplayPromoCodeForm(t){this.displayPromoCodeForm=t}handlePayment(t){this.apiService.post(this.stpConfig.api+"/api/stripe/confirmPayment",t).subscribe(n=>{n.error?(this.stpEventService.createErrorLogEvent("got error /api/stripe/confirmPayment = "+JSON.stringify(n.error)),this.ui.cardPending=!1):n.requires_action?this.handleCardActionFor3DSecure(n.payment_intent_client_secret):this.validateAndCreateUserSubscription()},n=>{this.stpEventService.createErrorLogEvent("got error /api/stripe/confirmPayment = "+JSON.stringify(n.error)),n.error&&n.error.raw&&n.error.raw.code&&(this.hasTranslation(n.error.raw.code)?this.Flash.errorTranslate(n.error.raw.code,{timeout:8e3}):this.Flash.errorTranslate("STP_GENERIC_PAYMENT_ERROR",{timeout:8e3})),this.ui.cardPending=!1})}validateAndCreateUserSubscription(){let t=0;t="school"===this.selectedPlan.target?this.schoolPrices[this.quantity].discount+this.reduction:this.reduction/100;let n={planStripeId:this.selectedPlan.stripeId,emailTemplate:this.selectedPlan.emailTemplate,discount:t,quantity:this.quantity};this.stpEventService.createLogEvent("before subscribe, stripeId = "+n.planStripeId+"planStripeId "+n.planStripeId),this.paymentPromocode.success&&(n.promocodeObject=this.paymentPromocode.promoCodeObject,n.uniqueCode=this.paymentPromocode.code),this.stpSubscription.subscribe(n,o=>{if(o)return this.ui.cardPending=!1,(o.status=320)?this.showLogoutModal=!0:(this.stpEventService.createErrorLogEvent("Erreur interne from spSubscription.subscribe, code = "+JSON.stringify(o)),this.showError("Erreur interne au moment de la cr\xe9ation de l'abonnement. Nous en sommes d\xe9sol\xe9s. Vous pouvez nous signaler l'erreur en nous \xe9crivant \xe0 [email protected]."));this.stpSession.fetchFromServerAndRefreshSession().then(()=>{this.isClassroomPlan?this.stateService.go(this.stpLangageService.langPrefix+"welcomeSubscriber",1===this.quantity?{userTypeToWelcome:"welcomeSingleClassroom"}:{userTypeToWelcome:"welcomeEducationAdmin"}):this.stateService.go(this.stpLangageService.langPrefix+"enqueteProfil",{from:"subscribe"})})})}subscribe(){var t=this;return(0,E.Z)(function*(){if(t.ui.cardPending=!0,!t.stripe)return t.ui.cardPending=!1,void t.showError("Payment initialization failed");let n=null;try{n=(yield t.stripe.createToken(t.cardNumber)).token}catch(s){console.error(`call to JS Stripe API createToken failed with ${s.message}`)}t.stripe.createPaymentMethod({type:"card",card:{token:n.id}}).then(s=>{if(s.error)console.log(s.error),t.stpEventService.createErrorLogEvent("got error from subscribe, createPaymentMethod = "+JSON.stringify(s.error)),t.ui.cardPending=!1,t.showError(s.error.message);else{let l=0;l=t.isClassroomPlan?100*t.schoolPrices[t.quantity].price:t.selectedPlan.price,t.handlePayment({payment_method_id:s.paymentMethod.id,amount:l,planType:t.selectedPlan.type,promocode:t.paymentPromocode.code?t.paymentPromocode.code:null})}})})()}getPriceLabel(){if(!this.selectedPlan)return;let t=this.selectedPlan.price/100,n=this.reduction/100;if(this.reduction){let o="au lieu de";return"en"===this.stpLangageService.getCurrentLanguage()&&(o="instead of"),Math.round(100*(t-n))/100+"\u20ac "+o+" "+t+"\u20ac"}{if(!this.selectedPlan||!this.selectedPlan.priceLabel)return;let o=this.selectedPlan.priceLabel.split(",");return'<span class="stp-price-first-number">
1'+o[0]+"</span>,"+o[1]+' <span class="stp-subscription-duration">/'+("PDI"===this.selectedPlan.type?"mois":"an")+"</span>"}}submitPromocode(){this.stpSubscription.getPromocodeByCodeValue(this.paymentPromocode.code,(t,n)=>{if(t)return this.paymentPromocode.success=!1,this.showError("Ce code promo n'existe pas. Merci de v\xe9rifier le code saisi");if(n.target&&n.target!==this.selectedPlan.target)return this.showError("Ce code promo n'est pas disponible pour ce type d'abonnement.");if("reduction pourcentage"===n.type){if(this.paymentPromocode.success=!0,"PDD"!==this.selectedPlan.type)return this.showError("Ce code promo est valable pour un abonnement annuel uniquement.");this.reduction="school"===this.selectedPlan.target?Math.round(this.schoolPrices[this.quantity].price*n.offer_amount/100):Math.round(this.selectedPlan.price*n.offer_amount/100),this.paymentPromocode.promoCodeObject=n,this.displayPromoCodeForm=!1}else if("reduction amount"===n.type){if(this.paymentPromocode.success=!0,"PDD"!==this.selectedPlan.type)return this.showError("Ce code promo est valable pour un abonnement annuel uniquement.");this.reduction="school"===this.selectedPlan.target?n.offer_amount/100:n.offer_amount,this.paymentPromocode.promoCodeObject=n,this.displayPromoCodeForm=!1}else{if(!n.planObject)return this.paymentPromocode.success=!1,this.showError("Ce code promo ne permet pas d'avoir un abonnement \xe0 prix r\xe9duit. Merci de v\xe9rifier le code saisi");this.paymentPromocode.success=!0,this.selectedPlan=n.planObject,this.paymentPromocode.promoCodeObject=n,this.displayPromoCodeForm=!1}})}enablePromocodeField(){this.showPromocodeField=!0}closeAddCardModal(){this.showAddCardModal=!1,this.addCardUi={cardPending:!1,cardNumberValid:!1,cardExpiryValid:!1,cardCvcValid:!1}}mountNewCardFields(){if(this.stripe&&this.showAddCardModal&&!this.addCardNumber){const t=this.stripe.elements();this.addCardNumber=t.create("cardNumber",{classes:{base:"form-control cardnumber"}}),this.addCardExpiry=t.create("cardExpiry",{classes:{base:"form-control cardexpiration"}}),this.addCardCvc=t.create("cardCvc",{classes:{base:"form-control cardcrypto"}}),this.addCardNumber.on("change",n=>{this.addCardUi.cardNumberValid=n.complete&&!n.error}),this.addCardExpiry.on("change",n=>{this.addCardUi.cardExpiryValid=n.complete&&!n.error}),this.addCardCvc.on("change",n=>{this.addCardUi.cardCvcValid=n.complete&&!n.error}),setTimeout(()=>{this.addCardNumber.mount("#card-number-payment-new"),this.addCardExpiry.mount("#card-expiry-payment-new"),this.addCardCvc.mount("#card-cvc-payment-new")},0)}}addSavedCard(){!this.stripe||!this.addCardNumber||(this.addCardUi.cardPending=!0,this.stripe.createPaymentMethod({type:"card",card:this.addCardNumber}).then(t=>{if(t.error)return this.addCardUi.cardPending=!1,void this.showError(t.error.message);this.apiService.post(this.stpConfig.api+"/api/stripe/setupDefaultCard",{payment_method_id:t.paymentMethod.id}).subscribe(n=>{if(n.error)return this.addCardUi.cardPending=!1,void this.showError(n.error.message||"CARD_ERROR");n.requires_action?this.handleCardActionFor3DSecure(n.setup_intent_client_secret,this.addCardNumber,()=>{this.loadSavedCards(),this.showAddCardModal=!1,this.addCardUi.cardPending=!1,this.Flash.successTranslate("CARD_ADDED_SUCCESSFULLY")},!0):(this.loadSavedCards(),this.showAddCardModal=!1,this.addCardUi.cardPending=!1,this.Flash.successTranslate("CARD_ADDED_SUCCESSFULLY"))},n=>{this.addCardUi.cardPending=!1,this.showError(n&&n.error?n.error.message:"CARD_ERROR")})}))}closeModal(){this.showLogoutModal=!1}logoutAndRedirect(){this.showLogoutModal=!1,this.stpAuth.logout().then(()=>{this.stateService.go(this.stpLangageService.langPrefix+"signup")})}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(q.z),e.Y36(f.P),e.Y36(v.s),e.Y36(M.i),e.Y36(m.i),e.Y36(C.s),e.Y36(Y.m),e.Y36(u.b2),e.Y36(N.M),e.Y36(P.b),e.Y36(h.Vn),e.Y36(ne))},i.\u0275cmp=e.Xpm({type:i,selectors:[["stp-payment"]],decls:100,vars:55,consts:[[3,"show","hideFooter","close"],[1,"d-flex","justify-content-center","stp-margin-top-bottom"],["type","button",1,"stp-btn-small-pill","stp-button-green",3,"click"],["type","button",1,"stp-btn-small-pill","stp-button-red",3,"click"],[1,"container","stp-container-v3","padded","transparent"],[1,"row"],[1,"col-lg-6","col-md-6","visible-md","visible-lg",2,"margin-top","20px"],[1,"stp-white-container-with-shadow","padded"],[1,"stp-payment-title"],["srcset","assets/images/payment/payment_lfl.jpg","type","image/jpeg"],["alt","payment-img","src","assets/images/payment/payment_lfl.jpg",1,"stp-full-size-element",2,"margin-bottom","15px"],[1,"d-flex"],["src","assets/images/payment/payment_lfl_icon.jpg",1,"stp-lfl-payment"],[1,"col-lg-6","col-md-6","col-sm-12","col-xs-12","stp-text-center",2,"margin-top","20px"],["class","stp-payment-loader",4,"ngIf"],["class","d-flex flex-wrap row","style","margin-top: 0px;",4,"ngIf"],[4,"ngIf","ngIfElse"],["newCardForm",""],["style","text-align: left;",4,"ngIf"],[1,"row",2,"margin-bottom","15px"],["class","col-12",4,"ngIf"],[1,"stp-payment-explain"],[1,"bi","bi-shield-lock-fill","stp-payment-lock"],[2,"padding-left","10px"],[1,"stp-payment-method-allowed"],[1,"d-flex","flex-wrap"],["src","assets/images/payment/logo-cb.png",1,"stp-payment-logo"],["src","assets/images/payment/Visa-logo.png",1,"stp-payment-logo"],["src","assets/images/payment/Mastercard-logo.png",1,"stp-payment-logo"],["src","assets/images/payment/American-Express-logo.png",1,"stp-payment-logo"],["src","assets/images/payment/logo-diners.png",1,"stp-payment-logo"],["src","assets/images/payment/logo-unionpay.png",1,"stp-payment-logo"],["src","assets/images/payment/logo-jcb.png",1,"stp-payment-logo"],[2,"text-align","left"],[1,"stp-inline-block","stp-rotate-180"],["href","","rel","nofollow",1,"stp-promocode-link",3,"click"],["style","font-size: 12px; margin-top: 25px; color: red;",4,"ngIf"],[1,"stp-grey-modal",3,"dialogTitle","show","close"],[1,"form-group"],[1,"col-xs-offset-1","col-xs-5"],["for","inputCardNumber"],[1,"col-xs-5",2,"text-align","right"],["height","20","alt","CB","src","/assets/images/payment/American-Express-logo.png"],["height","20","alt","MasterCard","src","/assets/images/payment/Mastercard-logo.png"],["height","20","alt","Visa","src","/assets/images/payment/Visa-logo.png"],[1,"col-xs-offset-1","col-xs-10"],["id","card-number-payment-new"],[2,"display","block","width","60px"],["id","card-expiry-payment-new"],[1,"col-xs-5"],[1,"form-group","marged-bot"],["for","inputCardCrypto"],["id","card-cvc-payment-new"],[1,"clearfix"],[2,"text-align","center","margin-bottom","50px"],[1,"btn","btn-success",3,"disabled","click"],[1,"stp-payment-loader"],[1,"lds-ripple"],[1,"stp-payment-loading-text"],[1,"d-flex","flex-wrap","row",2,"margin-top","0px"],[1,"col-sm-7","stp-payment-title-block"],["class","stp-payment-title",4,"ngIf"],["class","stp-choose-plan-explanations",4,"ngIf"],[1,"col-sm-5"],[1,"stp-payment-price-header","selected"],[1,"stp-price-container",3,"innerHtml"],[1,"stp-choose-plan-explanations"],[1,"stp-choose-plan-explanations-emphase"],["class","stp-payment-title col-sm-7",4,"ngIf"],[1,"stp-price-container"],[1,"stp-payment-title","col-sm-7"],[1,"col-12",2,"text-align","left"],[1,"stp-payment-title",2,"font-size","18px","margin-bottom","10px"],[1,"stp-payment-card-list"],["class","stp-payment-card-option",3,"stp-payment-card-option-selected","click",4,"ngFor","ngForOf"],["type","button",1,"stp-text-bold","stp-button-medium","stp-payment-button-new",2,"margin-bottom","15px",3,"click"],[1,"stp-text-bold","stp-button-medium","stp-payment-button-new",3,"disabled","click"],[1,"stp-payment-card-option",3,"click"],[1,"stp-payment-card-option__content",3,"for"],["type","checkbox",1,"stp-payment-card-option__checkbox",3,"id","checked","change"],[1,"stp-payment-card-option__info"],[1,"stp-payment-card-option__brand"],[1,"stp-payment-card-option__meta"],["class","stp-payment-card-option__check",4,"ngIf"],[1,"stp-payment-card-option__check"],["aria-hidden","true",1,"bi","bi-check"],[1,"col-12"],["id","card-number-payment"],[1,"col-6"],[2,"text-align","left","margin-top","15px"],["id","card-expiry-payment"],["id","card-cvc-payment"],["focus-me","!!selectedPlan","type","text","placeholder","",1,"form-control","col-8",2,"display","inline",3,"ngModel","ngModelChange"],[1,"col-4",2,"color","#ea559d","display","inline","margin-top","4px","text-decoration","underline",3,"click"],[1,"stp-promocode-link",3,"click"],[2,"font-size","12px","margin-top","25px","color","red"]],template:function(t,n){if(1&t&&(e.TgZ(0,"stpModalDialog",0),e.NdJ("close",function(){return n.closeModal()}),e.TgZ(1,"div"),e._uU(2),e.ALo(3,"transloco"),e.qZA(),e.TgZ(4,"div",1)(5,"button",2),e.NdJ("click",function(){return n.logoutAndRedirect()}),e._uU(6),e.ALo(7,"transloco"),e.qZA(),e.TgZ(8,"button",3),e.NdJ("click",function(){return n.closeModal()}),e._uU(9),e.ALo(10,"transloco"),e.qZA()()(),e.TgZ(11,"div",4)(12,"div",5)(13,"div",6)(14,"div",7)(1
15,"div",8),e._uU(16),e.ALo(17,"transloco"),e.qZA(),e.TgZ(18,"picture"),e._UZ(19,"source",9)(20,"img",10),e.qZA(),e.TgZ(21,"div")(22,"div",11),e._UZ(23,"img",12),e.TgZ(24,"div"),e._uU(25),e.ALo(26,"transloco"),e.qZA()(),e._UZ(27,"br"),e.TgZ(28,"div"),e._uU(29),e.ALo(30,"transloco"),e.qZA()()()(),e.TgZ(31,"div",13)(32,"div",7),e.YNc(33,Le,7,3,"div",14),e.YNc(34,Ee,9,4,"h2",15),e.YNc(35,Ue,8,7,"h2",15),e.YNc(36,Re,14,11,"div",16),e.YNc(37,Ye,20,13,"ng-template",null,17,e.W1O),e.YNc(39,Fe,3,3,"div",18),e.TgZ(40,"div",19),e.YNc(41,ke,5,4,"div",20),e.YNc(42,De,5,3,"div",20),e.qZA(),e.TgZ(43,"div",21)(44,"div",11),e._UZ(45,"div",22),e.TgZ(46,"div",23)(47,"div"),e._uU(48),e.ALo(49,"transloco"),e.qZA(),e.TgZ(50,"div",24),e._uU(51),e.ALo(52,"transloco"),e.qZA(),e.TgZ(53,"div",25),e._UZ(54,"img",26)(55,"img",27)(56,"img",28)(57,"img",29)(58,"img",30)(59,"img",31)(60,"img",32),e.qZA()()()(),e.TgZ(61,"div",33)(62,"span",34),e._uU(63,"\u279c"),e.qZA(),e.TgZ(64,"a",35),e.NdJ("click",function(){return n.backToSubscribe()}),e._uU(65),e.ALo(66,"transloco"),e.qZA()(),e.YNc(67,Qe,3,3,"div",36),e.qZA()()()(),e.TgZ(68,"stpModalDialog",37),e.NdJ("close",function(){return n.closeAddCardModal()}),e.ALo(69,"transloco"),e.TgZ(70,"div",5)(71,"div",38)(72,"div",39)(73,"label",40),e._uU(74),e.ALo(75,"transloco"),e.qZA()(),e.TgZ(76,"div",41),e._UZ(77,"img",42)(78,"img",43)(79,"img",44),e.qZA(),e.TgZ(80,"div",45),e._UZ(81,"div",46),e.qZA()()(),e.TgZ(82,"div",5)(83,"div",39)(84,"div",38)(85,"label",47),e._uU(86),e.ALo(87,"transloco"),e.qZA(),e._UZ(88,"div",48),e.qZA()(),e.TgZ(89,"div",49)(90,"div",50)(91,"label",51),e._uU(92),e.ALo(93,"transloco"),e.qZA(),e._UZ(94,"div",52),e.qZA()(),e._UZ(95,"div",53),e.qZA(),e.TgZ(96,"div",54)(97,"button",55),e.NdJ("click",function(){return n.addSavedCard()}),e._uU(98),e.ALo(99,"transloco"),e.qZA()()()),2&t){const o=e.MAs(38);e.Q6J("show",n.showLogoutModal)("hideFooter",!0),e.xp6(2),e.hij(" ",e.lcZ(3,27,"LOGOUT_MODAL_TEXT")," "),e.xp6(4),e.hij(" ",e.lcZ(7,29,"CONTINUE")," "),e.xp6(3),e.hij(" ",e.lcZ(10,31,"CANCEL")," "),e.xp6(7),e.hij(" ",e.lcZ(17,33,"PAYMENT_LFL_TITLE")," "),e.xp6(9),e.hij(" ",e.lcZ(26,35,"PAYMENT_LFL_TEXT_1")," "),e.xp6(4),e.hij(" ",e.lcZ(30,37,"PAYMENT_LFL_TEXT_2")," "),e.xp6(4),e.Q6J("ngIf",n.ui.cardPending),e.xp6(1),e.Q6J("ngIf",!n.isClassroomPlan),e.xp6(1),e.Q6J("ngIf",!!n.selectedPlan&&n.isClassroomPlan),e.xp6(1),e.Q6J("ngIf",n.hasValidSavedCards)("ngIfElse",o),e.xp6(3),e.Q6J("ngIf",n.showPromocodeField),e.xp6(2),e.Q6J("ngIf",n.showPromocodeField),e.xp6(1),e.Q6J("ngIf",!n.showPromocodeField),e.xp6(6),e.Oqu(e.lcZ(49,39,"PAYMENT_EXPLAIN")),e.xp6(3),e.Oqu(e.lcZ(52,41,"PAYMENT_METHOD_ALLOWED")),e.xp6(14),e.hij(" ",e.lcZ(66,43,"BACK_TO_SUBSCRIBE")," "),e.xp6(2),e.Q6J("ngIf",!!n.selectedPlan&&n.isMonthlyPlan(n.selectedPlan)),e.xp6(1),e.Q6J("dialogTitle",e.lcZ(69,45,"ADD_NEW_CARD"))("show",n.showAddCardModal),e.xp6(6),e.Oqu(e.lcZ(75,47,"CARD_NUMBER")),e.xp6(12),e.Oqu(e.lcZ(87,49,"EXP_DATE")),e.xp6(6),e.Oqu(e.lcZ(93,51,"CARD_CRYPTO")),e.xp6(5),e.Q6J("disabled",n.addCardUi.cardPending||!n.addCardUi.cardNumberValid||!n.addCardUi.cardExpiryValid||!n.addCardUi.cardCvcValid),e.xp6(1),e.hij(" ",e.lcZ(99,53,"ADD_CARD")," ")}},dependencies:[p.sg,p.O5,r.Fj,r.JJ,r.On,G.Z,h.Ot],encapsulation:2}),i})();var W=d(14080),oe=d(97841),se=d(58547);function je(i,a){if(1&i&&(e.TgZ(0,"h1",21),e._uU(1),e.qZA()),2&i){const t=e.oxw(2);e.xp6(1),e.hij(" ",t.featuredStories.title," ")}}function He(i,a){if(1&i&&(e.TgZ(0,"div",22),e._UZ(1,"stpStoryBlock",23),e.qZA()),2&i){const t=a.$implicit;e.xp6(1),e.Q6J("story",t)}}function Be(i,a){if(1&i&&(e.TgZ(0,"div",17),e.YNc(1,je,2,1,"h1",18),e._UZ(2,"p",19),e.YNc(3,He,2,1,"div",20),e.qZA()),2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",t.featuredStories.title),e.xp6(1),e.Q6J("innerHtml",t.featuredStories.description,e.oJD),e.xp6(1),e.Q6J("ngForOf",t.featuredStories.stories)}}function Ke(i,a){1&i&&(e.TgZ(0,"div",24),e._uU(1),e.ALo(2,"transloco"),e.qZA()),2&i&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"LOGIN_EMAIL_REQUIRED")," "))}function We(i,a){1&i&&(e.TgZ(0,"div",24),e._uU(1),e.ALo(2,"transloco"),e.qZA()),2&i&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"LOGIN_EMAIL_INVALID")," "))}function $e(i,a){1&i&&(e.TgZ(0,"div",24),e._uU(1),e.ALo(2,"transloco"),e.qZA()),2&i&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"LOGIN_PASSWORD_REQUIRED")," "))}function ze(i,a){if(1&i&&(e.TgZ(0,"div",25),e._UZ(1,"input",26),e.ALo(2,"transloco"),e.YNc(3,$e,3,3,"div",9),e.qZA()),2&i){const t=e.oxw();let n;e.xp6(1),e.s9C("placeholder",e.lcZ(2,3,"PASSWORD")),e.Q6J("disabled",t.ui.formPending),e.xp6(2),e.Q6J("ngIf",(null==(n=t.loginForm.get("password"))?null:n.touched)&&(null==(n=t.loginForm.get("password"))?null:n.hasError("trimmedRequired")))}}function Ve(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",27)(1,"a",28),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.ui.forgotPass=!0)}),e._uU(2),e.ALo(3,"transloco"),e.qZA()()}2&i&&(e.xp6(2),e.hij(" ",e.lcZ(3,1,"FORGOTTEN_PASSWORD")," "))}function Xe(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div")(1,"div",29),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.login())}),e._uU(2),e.ALo(3,"transloco"),e.qZA(),e.TgZ(4,"a",28),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.ui.forgotPass=!0)}),e._uU(5),e.ALo(6,"transloco"),e.qZA()()}2&i&&(e.xp6(2),e.hij(" ",e.lcZ(3,2,"SEND")," "),e.xp6(3),e.hij(" ",e.lcZ(6,4,"CANCEL")," "))}function et(i,a){if(1&i&&(e.TgZ(0,"button",30),e._uU(1),e.ALo(2,"transloco"),e.qZA()),2&i){const t=e.oxw();
1e.Q6J("disabled",t.ui.formPending||t.loginForm.invalid),e.xp6(1),e.hij(" ",e.lcZ(2,2,"LOGIN")," ")}}function tt(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div")(1,"div",31),e._uU(2),e.ALo(3,"transloco"),e.qZA(),e.TgZ(4,"div",32),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.gotoSignup())}),e._uU(5),e.ALo(6,"transloco"),e.qZA()()}2&i&&(e.xp6(2),e.hij(" ",e.lcZ(3,2,"NOT_YET_ACCOUNT")," "),e.xp6(3),e.hij(" ",e.lcZ(6,4,"LETSGO")," "))}function it(i,a){if(1&i&&(e.ynx(0),e.YNc(1,tt,7,6,"div",12),e.BQk()),2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",!t.ui.forgotPass)}}function nt(i,a){1&i&&(e.TgZ(0,"div",33),e._uU(1),e.ALo(2,"transloco"),e.qZA()),2&i&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"LOGIN_STUDENT")," "))}const ot=/^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}$/i;function ae(i){const a=i.value;return null==a||""===String(a).trim()?{trimmedRequired:!0}:null}function st(i){const a=i.value;return null==a||""===String(a).trim()||ot.test(String(a).trim())?null:{email:!0}}let at=(()=>{class i{constructor(t,n,o,s,l,c,g,A,L,y){this.stpSeo=t,this.stpConfig=n,this.stpSession=o,this.stateService=s,this.stpLangageService=l,this.stpAuthService=c,this.Flash=g,this.stpEventService=A,this.stpCatalogService=L,this.stpCookieService=y,this.loginForm=new r.cw({identifier:new r.NI("",[ae,st]),password:new r.NI("",[ae])}),this.isFeaturedStoryLoaded=!1,this.wantSubscribe=!1}ngOnInit(){this.page="login",this.stpSeo.setTitle("Connexion"),this.stpCatalogService.getPageComponent().subscribe(t=>{this.featuredStories=t,this.isFeaturedStoryLoaded=!0},t=>{console.error(t)}),w().extend(this,{ui:{formPending:!1,forgotPass:!1}})}gotoSignup(){this.stateService.go(this.stpLangageService.langPrefix+"signup")}facebookCallback(){this.stateService.go(this.stpSession.defaultLandingPage())}login(){var t=this;const n=this.loginForm.get("identifier");if(n?.markAsTouched(),this.ui.forgotPass){if(n?.invalid)return;return void this.stpAuthService.forgot(String(n?.value).trim(),s=>{s?this.Flash.errorTranslate(s.error.message):(this.ui.forgotPass=!1,this.Flash.successTranslate("FORGOT_SUCCESS"))})}if(this.loginForm.markAllAsTouched(),this.loginForm.invalid)return;const o={identifier:String(this.loginForm.value.identifier).trim(),password:String(this.loginForm.value.password).trim()};this.ui.formPending=!0,this.stpAuthService.login(o,function(){var s=(0,E.Z)(function*(l){if(t.ui.formPending=!1,l)return void t.Flash.errorTranslate(l.error.message);const g=function c(A){const L=new Date;return L.setDate(L.getDate()+A),L}(400);t.stpCookieService.setCookie("AUTHENTIFIED","YES",{expires:g}),t.Flash.successTranslate("LOGIN_SUCCESS"),t.stpSession.fetchFromServerAndRefreshSession().then(()=>{t.stpEventService.connection("LOGIN");let A=t.wantSubscribe?"subscribe":t.stpSession.defaultLandingPage();t.stateService.go(t.stpLangageService.langPrefix+A)})});return function(l){return s.apply(this,arguments)}}())}getCurrentStepForLogin(){return this.wantSubscribe?"login":void 0}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(M.i),e.Y36(f.P),e.Y36(m.i),e.Y36(u.b2),e.Y36(C.s),e.Y36(P.b),e.Y36(N.M),e.Y36(Y.m),e.Y36(W.u),e.Y36(oe.u))},i.\u0275cmp=e.Xpm({type:i,selectors:[["stp-login"]],decls:29,vars:24,consts:[[1,"container","stp-container-v3"],[1,"row"],["class","col-lg-6 col-md-6 visible-md visible-lg","style","padding-right: 60px;",4,"ngIf"],[1,"col-lg-6","col-md-6","col-sm-12","col-xs-12",2,"margin-top","20px"],[1,"stp-box-shadow","stp-regular-font","stp-auth-container"],[2,"margin-bottom","50px","font-size","23px","font-weight","bold"],[3,"formGroup","ngSubmit"],[1,"form-group"],["formControlName","identifier","focus-me","true","type","email",1,"form-control","stp-login-form-control",3,"disabled","placeholder"],["class","text-danger stp-login-field-error",4,"ngIf"],["class","form-group stp-anim-slide",4,"ngIf"],["class","stp-forgot-password",4,"ngIf"],[4,"ngIf"],["class","stp-text-bold stp-login-button","type","submit",3,"disabled",4,"ngIf"],[3,"uiSref"],["class","stp-text-bold stp-payment-button",4,"ngIf"],[1,"stp-data-collection-cnil"],[1,"col-lg-6","col-md-6","visible-md","visible-lg",2,"padding-right","60px"],["class","stp-color-red stp-title-big-and-thin stp-color-red","style","margin-bottom: 25px;",4,"ngIf"],[1,"stp-regular-font",3,"innerHtml"],["class","col-6",4,"ngFor","ngForOf"],[1,"stp-color-red","stp-title-big-and-thin","stp-color-red",2,"margin-bottom","25px"],[1,"col-6"],[1,"stp-center-element",2,"margin-bottom","30px","max-width","300px",3,"story"],[1,"text-danger","stp-login-field-error"],[1,"form-group","stp-anim-slide"],["formControlName","password","type","password",1,"form-control","stp-login-form-control",3,"disabled","placeholder"],[1,"stp-forgot-password"],[3,"click"],[1,"stp-text-bold","stp-payment-button",3,"click"],["type","submit",1,"stp-text-bold","stp-login-button",3,"disabled"],[1,"stp-text-bold"],[1,"stp-text-bold","stp-login-button","stp-center-element","stp-login-signup-button",3,"click"],[1,"stp-text-bold","stp-payment-button"]],template:function(t,n){if(1&t&&(e.TgZ(0,"div",0)(1,"div",1),e.YNc(2,Be,4,3,"div",2),e.TgZ(3,"div",3)(4,"div",4)(5,"h2",5),e._uU(6),e.ALo(7,"transloco"),e.qZA(),e.TgZ(8,"form",6),e.NdJ("ngSubmit",function(){return n.login()}),e.TgZ(9,"div")(10,"div",7),e._UZ(11,"input",8),e.ALo(12,"transloco"),e.YNc(13,Ke,3,3,"div",9),e.YNc(14,We,3,3,"div",9),e.qZA(),e.YNc(15,ze,4,5,"div",10),e.YNc(16,Ve,4,3,"div",11),e.YNc(17,Xe,7,6,"div",12),e.YNc(18,et,3,4,"button",13),e.YNc(19,it,2,1,"ng-container",12),e.TgZ(20,"a",14),e.YNc(21,nt,3,3,"div",15),e.qZA()()(),e.TgZ(22,"div",16)(23,"i"),e._uU(24),e.ALo(25,"transloco"),e._UZ(26,"br"),e._uU(27),e.ALo(28,"transloco"),e.qZA()()()()()()),2&t){let o,s;e.xp6(2),e.Q6J("ngIf",n.isFeaturedStoryLoaded),e.xp6(4),e.hij(" ",e.lcZ(7,16,"LOGIN")," "),e.xp6(2),e.Q6J("formGroup",n.loginForm),e.xp6(3),e.s9C("placeholder",e.lcZ(12,18,"EMAIL")),e.Q6J("disabled",n.ui.formPending),e.xp6(2),e.Q6J("ngIf",(null==(o=n.loginForm.get("identifier"))?null:o.touched)&&(null==(o=n.loginForm.get("identifier"))?null:o.hasError("trimmedRequired"))),e.xp6(1),e.Q6J("ngIf",(null==(s=n.loginForm.get("identifier"))?null:s.touched)&&(null==(s=n.loginForm.get("identifier"))?null:s.hasError("email"))),e.xp6(1),e.Q6J("ngIf",!n.ui.forgotPass),e.xp6(1),e.Q6J("ngIf",!n.ui.forgotPass),e.xp6(1),e.Q6J("ngIf",n.ui.forgotPass),e.xp6(1),e.Q6J("ngIf",!n.ui.forgotPass),e.xp6(1),e.Q6J("ngIf",!n.stpSession.isWebApp()),e.xp6(1),e.Q6J("uiSref",n.stpLangageService.langPrefix+"loginStudent"),e.xp6(1),e.Q6J("ngIf",!n.ui.forgotPass),e.xp6(3),e.hij(" ",e.lcZ(25,20,"DATA_COLLECTION_CNIL_PART1")," "),e.xp6(3),e.hij(" ",e.lcZ(28,22,"DATA_COLLECTION_CNIL_PART2")," ")}},dependencies:[_.bcJ,_.KeH,p.sg,p.O5,r._Y,r.Fj,r.JJ,r.JL,r.sg,r.u,se.g,h.Ot],encapsulation:2}),i})();function rt(i,a){if(1&i&&(e.TgZ(0,"div",20),e._UZ(1,"stpStoryBlock",21),e.qZA()),2&i){const t=a.$implicit;e.xp6(1),e.Q6J("story",t)}}function lt(i,a){if(1&i&&(e.TgZ(0,"div",16)(1,"h1",17),e._uU(2),e.qZA(),e._UZ(3,"div",18),e.YNc(4,rt,2,1,"div",19),e.qZA()),2&i){const t=e.oxw();e.xp6(2),e.hij(" ",t.featuredStories.title," "),e.xp6(1),e.Q6J("innerHTML",t.featuredStories.description,e.oJD),e.xp6(1),e.Q6J("ngForOf",t.featuredStories.stories)}}const X=function(){return{standalone:!0}},ct=function(){return{post:"questions-generales"}};let pt=(()=>{class i{constructor(t,n,o,s,l,c){this.stpCatalogService=t,this.stpLangageService=n,this.stateService=o,this.Flash=s,this.stpSession=l,this.stpAuthService=c,this.user={group:void 0,username:void 0,password:void 0},this.formPending=!1,this.initInProgress=!0}ngOnInit(){this.stpCatalogService.getPageComponent("login").subscribe(t=>{this.featuredStories=t,this.initInProgress=!1},t=>{console.error(t)})}login(){this.formPending=!0,this.stpAuthService.loginStudent(this.user,t=>{this.formPending=!1,t?this.Flash.errorTranslate(t.error.message?t.error.message:t.error):(this.Flash.successTranslate("LOGIN_SUCCESS"),this.stpSession.fetchFromServerAndRefreshSession().then(()=>{this.stateService.go(this.stpLangageService.langPrefix+"rallyeStudent")}))})}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(W.u),e.Y36(C.s),e.Y36(u.b2),e.Y36(N.M),e.Y36(m.i),e.Y36(P.b))},i.\u0275cmp=e.Xpm({type:i,selectors:[["stp-student-login"]],decls:30,vars:40,consts:[[1,"container","stp-container-v3"],[1,"row"],["class","col-lg-6 col-md-6 visible-md visible-lg","style","padding-right: 60px;",4,"ngIf"],[1,"col-lg-6","col-md-6","col-sm-12","col-xs-12",2,"margin-top","20px"],[1,"stp-box-sha
1dow","stp-regular-font","stp-auth-container"],[2,"font-size","23px","font-weight","bold"],[1,"stp-regular-font",2,"margin-bottom","10px","font-size","13px"],[3,"submit"],[1,"form-group"],["focus-me","true","required","","type","group",1,"form-control","stp-login-form-control",3,"ngModel","disabled","ngModelOptions","placeholder","ngModelChange"],["required","","type","username",1,"form-control","stp-login-form-control",3,"ngModel","disabled","ngModelOptions","placeholder","ngModelChange"],[1,"form-group","stp-anim-slide"],["required","","type","password",1,"form-control","stp-login-form-control",3,"ngModel","disabled","ngModelOptions","placeholder","ngModelChange"],["type","submit",1,"stp-text-bold","stp-login-button"],[2,"font-size","14px"],[1,"qr-code-link",3,"uiSref","uiParams"],[1,"col-lg-6","col-md-6","visible-md","visible-lg",2,"padding-right","60px"],[1,"stp-color-red","stp-title-big-and-thin","stp-color-red",2,"margin-bottom","25px"],[1,"stp-regular-font",2,"margin-bottom","25px",3,"innerHTML"],["class","col-6",4,"ngFor","ngForOf"],[1,"col-6"],[1,"stp-center-element",2,"margin-bottom","30px","max-width","300px",3,"story"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1),e.YNc(2,lt,5,3,"div",2),e.TgZ(3,"div",3)(4,"div",4)(5,"h2",5),e._uU(6),e.ALo(7,"transloco"),e.qZA(),e.TgZ(8,"div",6),e._uU(9),e.ALo(10,"transloco"),e.qZA(),e.TgZ(11,"form",7),e.NdJ("submit",function(){return n.login()}),e.TgZ(12,"div",8)(13,"input",9),e.NdJ("ngModelChange",function(s){return n.user.group=s}),e.ALo(14,"transloco"),e.qZA()(),e.TgZ(15,"div",8)(16,"input",10),e.NdJ("ngModelChange",function(s){return n.user.username=s}),e.ALo(17,"transloco"),e.qZA()(),e.TgZ(18,"div",11)(19,"input",12),e.NdJ("ngModelChange",function(s){return n.user.password=s}),e.ALo(20,"transloco"),e.qZA()(),e.TgZ(21,"button",13),e._uU(22),e.ALo(23,"transloco"),e.qZA()(),e.TgZ(24,"div",14),e._uU(25),e.ALo(26,"transloco"),e.TgZ(27,"a",15),e._uU(28),e.ALo(29,"transloco"),e.qZA()()()()()()),2&t&&(e.xp6(2),e.Q6J("ngIf",!n.initInProgress),e.xp6(4),e.hij(" ",e.lcZ(7,20,"LOGIN")," "),e.xp6(3),e.hij(" ",e.lcZ(10,22,"STUDENT_LOGIN_TXT")," "),e.xp6(4),e.s9C("placeholder",e.lcZ(14,24,"GROUP")),e.Q6J("ngModel",n.user.group)("disabled",n.formPending)("ngModelOptions",e.DdM(36,X)),e.xp6(3),e.s9C("placeholder",e.lcZ(17,26,"STUDENT")),e.Q6J("ngModel",n.user.username)("disabled",n.formPending)("ngModelOptions",e.DdM(37,X)),e.xp6(3),e.s9C("placeholder",e.lcZ(20,28,"STUDENT_PASS")),e.Q6J("ngModel",n.user.password)("disabled",n.formPending)("ngModelOptions",e.DdM(38,X)),e.xp6(3),e.hij(" ",e.lcZ(23,30,"LOGIN")," "),e.xp6(3),e.hij("",e.lcZ(26,32,"NEW_QR_CODE_FEATURE")," "),e.xp6(2),e.Q6J("uiSref",n.stpLangageService.langPrefix+"aideAccueil")("uiParams",e.DdM(39,ct)),e.xp6(1),e.Oqu(e.lcZ(29,34,"KNOW_MORE")))},dependencies:[_.bcJ,_.KeH,p.sg,p.O5,r._Y,r.Fj,r.JJ,r.JL,r.Q7,r.On,r.F,se.g,h.Ot],encapsulation:2}),i})(),dt=(()=>{class i{constructor(t,n,o,s,l){this.stpAuthService=t,this.stpLangageService=n,this.translocoService=o,this.Flash=s,this.stateService=l,this.user={password:"",confirmpassword:""},this.ui={pending:!1}}ngOnInit(){this.resetForm=new r.cw({password:new r.NI("",r.kI.minLength(1)),confirmpassword:new r.NI("",r.kI.minLength(1))})}checkPassword(){return this.user.password===this.user.confirmpassword||(this.Flash.error(this.translocoService.translate("PASSWORD_NOT_MATCH")),!1)}reset(){!this.checkPassword()||this.stpAuthService.resetPassword(this.stateService.params.id,this.stateService.params.token,this.user.password,(t,n)=>{n?(this.Flash.success(this.translocoService.translate("PASSWORD_MODIFIED")),this.stateService.go(this.stpLangageService.langPrefix+"login")):this.Flash.error(this.translocoService.translate("TOKEN_DOES_NOT_EXISTS"))})}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(P.b),e.Y36(C.s),e.Y36(h.Vn),e.Y36(N.M),e.Y36(u.b2))},i.\u0275cmp=e.Xpm({type:i,selectors:[["stp-reset-password"]],decls:19,vars:18,consts:[[1,"container-fluid","stp-container","min-full"],[1,"row-fluid"],[1,"col-lg-6","col-lg-offset-3","col-md-6","col-md-offset-3","col-sm-8","col-sm-offset-2","col-xs-12","stp-box-sha
1dow","stp-regular-font","stp-signup-container"],[1,"text-center"],[1,"marged-bot-half","stp-records-list--title"],["name","form",1,"marged-bot-half",3,"formGroup","submit"],[1,"form-group"],["formControlName","password","required","","type","password",1,"form-control",3,"ngModel","disabled","placeholder","ngModelChange"],["formControlName","confirmpassword","required","","type","password",1,"form-control",3,"ngModel","disabled","placeholder","ngModelChange"],[1,"stp-button-medium","stp-btn-red",3,"disabled"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"h4",4),e._uU(5),e.ALo(6,"transloco"),e.qZA()(),e.TgZ(7,"div")(8,"form",5),e.NdJ("submit",function(){return n.reset()}),e.TgZ(9,"div",6)(10,"input",7),e.NdJ("ngModelChange",function(s){return n.user.password=s}),e.ALo(11,"transloco"),e.qZA()(),e.TgZ(12,"div",6)(13,"input",8),e.NdJ("ngModelChange",function(s){return n.user.confirmpassword=s}),e.ALo(14,"transloco"),e.qZA()(),e.TgZ(15,"div",3)(16,"button",9),e._uU(17),e.ALo(18,"transloco"),e.qZA()()()()()()()),2&t&&(e.xp6(5),e.Oqu(e.l
1cZ(6,10,"NEW_PASSWORD")),e.xp6(3),e.Q6J("formGroup",n.resetForm),e.xp6(2),e.MGl("placeholder","",e.lcZ(11,12,"NEW_PASSWORD"),"*"),e.Q6J("ngModel",n.user.password)("disabled",n.ui.pending),e.xp6(3),e.MGl("placeholder","",e.lcZ(14,14,"CONFIRM_PASSWORD"),"*"),e.Q6J("ngModel",n.user.confirmpassword)("disabled",n.ui.pending),e.xp6(3),e.Q6J("disabled",!n.resetForm.valid||n.ui.pending),e.xp6(1),e.hij(" ",e.lcZ(18,16,"SEND")," "))},dependencies:[r._Y,r.Fj,r.JJ,r.JL,r.Q7,r.sg,r.u,h.Ot],encapsulation:2}),i})();var j=d(3755);function ut(i,a){1&i&&(e.TgZ(0,"h2",25),e._uU(1," Offre d'essai - 15 jours gratuits "),e.qZA())}function gt(i,a){1&i&&(e.TgZ(0,"h2",25),e._uU(1," Inscription \xe9cole "),e.qZA())}function _t(i,a){1&i&&(e.TgZ(0,"h2",25),e._uU(1,"Inscription \xe9coles, offre gratuite"),e.qZA())}function mt(i,a){1&i&&(e.TgZ(0,"h2",25),e._uU(1,"Inscription m\xe9diath\xe8ques"),e.qZA())}function ht(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",7)(1,"input",26),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.user.password=o)}),e.ALo(2,"transloco"),e.qZA()()}if(2&i){const t=e.oxw();e.xp6(1),e.MGl("placeholder","",e.lcZ(2,3,"CHOOSEPASSWORD"),"*"),e.Q6J("ngModel",t.user.password)("disabled",t.ui.pending)}}function ft(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",7)(1,"input",27),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.user.schoolName=o)}),e.ALo(2,"transloco"),e.qZA()()}if(2&i){const t=e.oxw();e.xp6(1),e.MGl("placeholder","",e.lcZ(2,3,"SCHOOLNAME")," *"),e.Q6J("ngModel",t.user.schoolName)("disabled",t.ui.pending)}}function vt(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",7)(1,"input",27),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.user.schoolName=o)}),e.ALo(2,"transloco"),e.qZA()()}if(2&i){const t=e.oxw();e.xp6(1),e.MGl("placeholder","",e.lcZ(2,3,"LIBRARYNAME")," *"),e.Q6J("ngModel",t.user.schoolName)("disabled",t.ui.pending)}}function St(i,a){if(1&i&&(e.TgZ(0,"option"),e._uU(1),e.ALo(2,"transloco"),e.qZA()),2&i){const t=a.$implicit;e.xp6(1),e.Oqu(e.lcZ(2,1,t.name))}}function At(i,a){if(1&i&&(e.TgZ(0,"div"),e._UZ(1,"hr",28),e.TgZ(2,"div",29),e._uU(3),e.ALo(4,"transloco"),e.qZA(),e.TgZ(5,"div",30)(6,"button",31),e._uU(7),e.ALo(8,"transloco"),e.qZA()(),e.TgZ(9,"div",32)(10,"i"),e._uU(11),e.ALo(12,"transloco"),e._UZ(13,"br"),e._uU(14),e.ALo(15,"transloco"),e.qZA()()()),2&i){const t=e.oxw();e.xp6(3),e.hij(" ",e.lcZ(4,5,"ACCOUNT_ALREADY")," "),e.xp6(3),e.Q6J("uiSref",t.stpLangageService.langPrefix+"login"),e.xp6(1),e.hij(" ",e.lcZ(8,7,"LOGIN")," "),e.xp6(4),e.hij(" ",e.lcZ(12,9,"DATA_COLLECTION_CNIL_PART1")," "),e.xp6(3),e.hij(" ",e.lcZ(15,11,"DATA_COLLECTION_CNIL_PART2")," ")}}const Zt=function(){return{page:"cgu"}};let xt=(()=>{class i{constructor(t,n,o,s,l,c,g,A,L){this.stpSeo=t,this.stpAuthService=n,this.stpConfig=o,this.Flash=s,this.stpSession=l,this.stpAccountService=c,this.stpLangageService=g,this.stpSubscription=A,this.stateService=L,this.isSignupSchoolPremium=!0,this.countryList=V.g.COUNTRIES,this.ui={pending:!1},this.discover=!1,this.isSignupSchoolFree=!1,this.isSignupLibrary=!1}ngOnInit(){var t=this;return(0,E.Z)(function*(){t.signupPremiumForm=new r.cw({lastName:new r.NI("",r.kI.minLength(1)),firstName:new r.NI("",r.kI.minLength(1)),email:new r.NI("",[r.kI.required,r.kI.pattern("^[a-z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,4}$")]),password:new r.NI("",r.kI.minLength(1)),schoolName:new r.NI("",r.kI.minLength(1)),addressLine1:new r.NI("",r.kI.minLength(1)),addressLine2:new r.NI("",r.kI.minLength(1)),town:new r.NI("",r.kI.minLength(1)),country:new r.NI("",r.kI.minLength(1)),zipCode:new r.NI("",r.kI.minLength(1)),acceptTerms:new r.NI(!1,r.kI.requiredTrue)}),t.page="signup",t.stpSeo.setTitle("Inscription r\xe9serv\xe9e aux \xe9coles, offre premium");const n=t.stpSession.getSharedObjectForDiscover();t.planQuantity=t.stateService.params.quantity,t.next=t.stateService.params.next,t.classroomPlans=yield t.stpSubscription.getClassroomPlans(),t.stpSession.isLogged()&&t.stpSession.isSchool()?t.stateService.go(t.stpLangageService.langPrefix+"payment",{plan:t.classroomPlans["plan-for-classes"],quantity:t.planQuantity}):(w().extend(t,{stpConfig:t.stpConfig,hasSharedObjectForDiscoverInSignupContext:!!n,params:t.stateService.params.paramCookie,ui:{pending:!1},user:{}}),t.stpSession.isLogged()&&t.loadCurrentUser(),n&&(t.user.email=n.recipient_email,t.user.sharedForDiscoverId=n._id),t?.params?.promocode&&(t.user.promoCode=t.params.promocode))})()}signup(){if(this.stpSession.isLogged())return this.updateProfile();this.ui.pending=!0,this.user.userIsSchoolPremium=!0,this.user.language=this.stpLangageService.getCurrentLanguage(),this.stpAuthService.signup(this.user,!1,t=>{this.ui.pending=!1,!t&&this.stpSession.fetchFromServerAndRefreshSession().then(()=>{console.log("next is "+this.next),"payment"===this.next?this.stateService.go(this.stpLangageService.langPrefix+"payment",{plan:this.classroomPlans["plan-for-classes"],quantity:this.planQuantity}):this.stateService.go(this.stpLangageService.langPrefix+"welcomeSubscriber","trial"===this.next?{userTypeToWelcome:"welcomeEducationTryperiod"}:{userTypeToWelcome:"welcomeFamily"})})})}nextIsTrial(){return"trial"===this.next}updateProfile(){this.stpAccountService.updateProfile(this.stpSession.whoami()._id,this.user,t=>{if(t)return console.error(t);this.stateService.go(this.stpLangageService.langPrefix+"payment",{plan:this.classroomPlans["plan-for-classes"],quantity:this.planQuantity})})}loadCurrentUser(){this.stpAccountService.getInfoForAccount(this.stpSession.whoami()._id,(t,n)=>{if(t)return console.error(t);this.user=n})}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(M.i),e.Y36(P.b),e.Y36(f.P),e.Y36(N.M),e.Y36(m.i),e.Y36(j.O),e.Y36(C.s),e.Y36(q.z),e.Y36(u.b2))},i.\u0275cmp=e.Xpm({type:i,selectors:[["stp-school-signup-premium"]],decls:54,vars:61,consts:[[1,"container","stp-container-v3"],[1,"row"],[1,"col-lg-12","col-md-12","col-sm-12","col-xs-12",2,"margin-top","20px"],[1,"stp-box-sha
1dow","stp-regular-font",2,"border-radius","20px","text-align","center","padding","30px 60px","margin-bottom","35px"],["style","margin-bottom: 50px; font-size: 23px;",4,"ngIf"],["name","form",3,"formGroup","submit"],[1,"col-lg-6"],[1,"form-group"],["formControlName","lastName","focus-me","true","required","","type","text",1,"form-control",3,"ngModel","disabled","placeholder","ngModelChange"],["formControlName","firstName","required","","type","text",1,"form-control",3,"ngModel","disabled","placeholder","ngModelChange"],["formControlName","email","required","","type","email",1,"form-control",3,"ngModel","disabled","placeholder","ngModelChange"],["class","form-group",4,"ngIf"],["formControlName","addressLine1","required","","type","text",1,"form-control",3,"ngModel","disabled","placeholder","ngModelChange"],["formControlName","addressLine2","type","text",1,"form-control",3,"ngModel","disabled","placeholder","ngModelChange"],["formControlName","zipCode","required","","type","text",1,"form-control",3,"ngModel","disabled","placeholder","ngModelChange"],["formControlName","town","required","","type","text",1,"form-control",3,"ngModel","disabled","placeholder","ngModelChange"],["formControlName","country","required","","type","select",1,"form-control",3,"ngModel","disabled","ngModelChange"],[4,"ngFor","ngForOf"],[1,"col-lg-12"],[1,"checkbox"],["type","checkbox","formControlName","acceptTerms","required","true",3,"ngModel","ngModelChange"],["target","_blank",3,"uiSref","uiParams"],[1,"stp-text-center"],[1,"stp-text-bold","stp-payment-button",2,"width","100%","border","none",3,"disabled"],[4,"ngIf"],[2,"margin-bottom","50px","font-size","23px"],["formControlName","password","required","","type","password",1,"form-control",3,"ngModel","disabled","placeholder","ngModelChange"],["formControlName","schoolName","required","","type","text",1,"form-control",3,"ngModel","disabled","placeholder","ngModelChange"],[1,"stp-hr"],[1,"stp-small-font","stp-text-bold",2,"margin-bottom","10px"],[1,"stp-small-font","stp-text-bold",2,"margin-bottom","25px"],[2,"color","white","background-color","red","border-radius","15px","border","none","padding","5px 15px",3,"uiSref"],[2,"font-size","14px","text-align","left"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),e.YNc(4,ut,2,0,"h2",4),e.YNc(5,gt,2,0,"h2",4),e.YNc(6,_t,2,0,"h2",4),e.YNc(7,mt,2,0,"h2",4),e.TgZ(8,"form",5),e.NdJ("submit",function(){return n.signup()}),e.TgZ(9,"div",1)(10,"div",6)(11,"div",7)(12,"input",8),e.NdJ("ngModelChange",function(s){return n.user.lastName=s}),e.ALo(13,"transloco"),e.qZA()(),e.TgZ(14,"div",7)(15,"input",9),e.NdJ("ngModelChange",function(s){return n.user.firstName=s}),e.ALo(16,"transloco"),e.qZA()(),e.TgZ(17,"div",7)(18,"input",10),e.NdJ("ngModelChange",function(s){return n.user.email=s}),e.ALo(19,"transloco"),e.qZA()(),e.YNc(20,ht,3,5,"div",11),e.qZA(),e.TgZ(21,"div",6),e.YNc(22,ft,3,5,"div",11),e.YNc(23,vt,3,5,"div",11),e.TgZ(24,"div",7)(25,"input",12),e.NdJ("ngModelChange",function(s){return n.user.addressLine1=s}),e.ALo(26,"transloco"),e.qZA()(),e.TgZ(27,"div",7)(28,"input",13),e.NdJ("ngModelChange",function(s){return n.user.addressLine2=s}),e.ALo(29,"transloco"),e.qZA()(),e.TgZ(30,"div",7)(31,"input",14),e.NdJ("ngModelChange",function(s){return n.user.zipCode=s}),e.ALo(32,"transloco"),e.qZA()(),e.TgZ(33,"div",7)(34,"input",15),e.NdJ("ngModelChange",function(s){return n.user.town=s}),e.ALo(35,"transloco"),e.qZA()(),e.TgZ(36,"div",7)(37,"select",16),e.NdJ("ngModelChange",function(s){return n.user.country=s}),e.YNc(38,St,3,3,"option",17),e.qZA()()(),e.TgZ(39,"div",18)(40,"div",7)(41,"div",19)(42,"label")(43,"input",20),e.NdJ("ngModelChange",function(s){return n.user.acceptTerms=s}),e.qZA(),e._uU(44),e.ALo(45,"transloco"),e.TgZ(46,"a",21),e._uU(47),e.ALo(48,"transloco"),e.qZA()()()(),e.TgZ(49,"div",22)(50,"button",23),e._uU(51),e.ALo(52,"transloco"),e.qZA()()()()(),e.YNc(53,At,16,13,"div",24),e.qZA()()()()),2&t&&(e.xp6(4),e.Q6J("ngIf",n.isSignupSchoolPremium&&n.nextIsTrial()),e.xp6(1),e.Q6J("ngIf",n.isSignupSchoolPremium&&!n.nextIsTrial()),e.xp6(1),e.Q6J("ngIf",n.isSignupSchoolFree),e.xp6(1),e.Q6J("ngIf",n.isSignupLibrary),e.xp6(1),e.Q6J("formGroup",n.signupPremiumForm),e.xp6(4),e.MGl("placeholder","",e.lcZ(13,40,"LASTNAME"),"*"),e.Q6J("ngModel",n.user.lastName)("disabled",n.ui.pending),e.xp6(3),e.MGl("placeholder","",e.lcZ(16,42,"FIRSTNAME"),"*"),e.Q6J("ngModel",n.user.firstName)("disabled",n.ui.pending),e.xp6(3),e.MGl("placeholder","",e.lcZ(19,44,"EMAIL"),"*"),e.Q6J("ngModel",n.user.email)("disabled",n.ui.pending||!!n.discover),e.xp6(2),e.Q6J("ngIf",!n.stpSession.isLogged()),e.xp6(2),e.Q6J("ngIf",n.isSignupSchoolFree||n.isSignupSchoolPremium),e.xp6(1),e.Q6J("ngIf",n.isSignupLibrary),e.xp6(2),e.MGl("placeholder","",e.lcZ(26,46,"ADDRESS")," *"),e.Q6J("ngModel",n.user.addressLine1)("disabled",n.ui.pending),e.xp6(3),e.s9C("placeholder",e.lcZ(29,48,"ADDRESSLINE2")),e.Q6J("ngModel",n.user.addressLine2)("disabled",n.ui.pending),e.xp6(3),e.MGl("placeholder","",e.lcZ(32,50,"ZIPCODE")," *"),e.Q6J("ngModel",n.user.zipCode)("disabled",n.ui.pending),e.xp6(3),e.MGl("placeholder","",e.lcZ(35,52,"CITY")," *"),e.Q6J("ngModel",n.user.town)("disabled",n.ui.pending),e.xp6(3),e.Q6J("ngModel",n.user.country)("disabled",n.ui.pending),e.xp6(1),e.Q6J("ngForOf",n.countryList),e.xp6(5),e.Q6J("ngModel",n.user.acceptTerms),e.xp6(1),e.hij(" ",e.lcZ(45,54,"ACCEPT_PART1")," "),e.xp6(2),e.Q6J("uiSref",n.stpLangageService.langPrefix+"static")("uiParams",e.DdM(60,Zt)),e.xp6(1),e.hij(" ",e.lcZ(48,56,"ACCEPT_PART2")," "),e.xp6(3),e.Q6J("disabled",!n.signupPremiumForm.valid||n.ui.pending),e.xp6(1),e.hij(" ",e.lcZ(52,58,"LETSGO")," "),e.xp6(2),e.Q6J("ngIf",!(null!=n.params&&n.params.partenaire)))},dependencies:[_.bcJ,_.KeH,p.sg,p.O5,r._Y,r.YN,r.Kr,r.Fj,r.Wl,r.EJ,r.JJ,r.JL,r.Q7,r.Zs,r.sg,r.u,h.Ot],encapsulation:2}),i})();function Tt(i,a){1&i&&(e.TgZ(0,"div")(1,"h1",17),e._uU(2),e.ALo(3,"transloco"),e.qZA(),e.TgZ(4,"ul",18)(5,"li"),e._uU(6),e.ALo(7,"transloco"),e.qZA(),e.TgZ(8,"li"),e._uU(9),e.ALo(10,"transloco"),e.qZA(),e.TgZ(11,"li"),e._uU(12),e.ALo(13,"transloco"),e.qZA()()()),2&i&&(e.xp6(2),e.hij(" ",e.lcZ(3,4,"CLASS_SUBSCRIPTION")," "),e.xp6(4),e.Oqu(e.l
1cZ(7,6,"SUBSCRIBE_TXT11")),e.xp6(3),e.Oqu(e.lcZ(10,8,"SUBSCRIBE_TXT12")),e.xp6(3),e.Oqu(e.lcZ(13,10,"SUBSCRIBE_TXT13")))}function bt(i,a){if(1&i&&(e.TgZ(0,"div")(1,"h1",17),e._uU(2," Partenariat Lire et Faire Lire "),e.qZA(),e.TgZ(3,"ul",18)(4,"li"),e._uU(5),e.qZA(),e.TgZ(6,"li"),e._uU(7,"Des nouveaut\xe9s tous les mois."),e.qZA(),e.TgZ(8,"li"),e._uU(9,"Projection du livre \xe0 l\u2019\xe9cran en pr\xe9sentiel avec le livre papier."),e.qZA(),e.TgZ(10,"li"),e._uU(11,"A distance, enregistrez votre voix et partagez vos narrations avec les enfants."),e.qZA()()()),2&i){const t=e.oxw();e.xp6(5),e.hij("",t.stpConfig.catalogBooksCount," livres pour les 3-18 ans.")}}function Ct(i,a){if(1&i&&(e.TgZ(0,"div"),e._uU(1),e.qZA()),2&i){const t=e.oxw();e.xp6(1),e.hij(" ",t.schoolName," ")}}function Nt(i,a){1&i&&(e.TgZ(0,"div")(1,"p"),e._uU(2),e.ALo(3,"transloco"),e.qZA()()),2&i&&(e.xp6(2),e.hij(" ",e.lcZ(3,1,"SCHOOL_NOT_FOUND")," "))}function Mt(i,a){1&i&&(e.TgZ(0,"div")(1,"p"),e._uU(2),e.ALo(3,"transloco"),e.qZA()()),2&i&&(e.xp6(2),e.Oqu(e.lcZ(3,1,"MAX_CLASSROOM_REACHED")))}const Lt=function(){return{page:"cgu"}};function yt(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div")(1,"form",19),e.NdJ("submit",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.signup())}),e.TgZ(2,"div",1)(3,"div",20)(4,"input",21),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.user.lastName=o)}),e.ALo(5,"transloco"),e.qZA()(),e.TgZ(6,"div",20)(7,"input",22),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.user.firstName=o)}),e.ALo(8,"transloco"),e.qZA()()(),e.TgZ(9,"div",23)(10,"input",24),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.user.email=o)}),e.ALo(11,"transloco"),e.qZA()(),e.TgZ(12,"div",23)(13,"input",25),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.user.password=o)}),e.ALo(14,"transloco"),e.qZA()(),e.TgZ(15,"div",23)(16,"div",26)(17,"label")(18,"input",27),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.user.acceptTerms=o)}),e.qZA(),e._uU(19),e.ALo(20,"transloco"),e.TgZ(21,"a",28),e._uU(22),e.ALo(23,"transloco"),e.qZA()()()(),e.TgZ(24,"div",29)(25,"button",30),e._uU(26),e.ALo(27,"transloco"),e.qZA()()()()}if(2&i){const t=e.oxw();e.xp6(1),e.Q6J("formGroup",t.schoolSignupForm),e.xp6(3),e.MGl("placeholder","",e.lcZ(5,20,"LASTNAME"),"*"),e.Q6J("ngModel",t.user.lastName)("disabled",t.ui.pending),e.xp6(3),e.MGl("placeholder","",e.lcZ(8,22,"FIRSTNAME"),"*"),e.Q6J("ngModel",t.user.firstName)("disabled",t.ui.pending),e.xp6(3),e.MGl("placeholder","",e.lcZ(11,24,"EMAIL"),"*"),e.Q6J("ngModel",t.user.email)("disabled",t.ui.pending||!!t.discover),e.xp6(3),e.MGl("placeholder","",e.lcZ(14,26,"CHOOSEPASSWORD"),"*"),e.Q6J("ngModel",t.user.password)("disabled",t.ui.pending),e.xp6(5),e.Q6J("ngModel",t.user.acceptTerms),e.xp6(1),e.hij(" ",e.lcZ(20,28,"ACCEPT_PART1")," "),e.xp6(2),e.Q6J("uiSref",t.stpLangageService.langPrefix+"static")("uiParams",e.DdM(34,Lt)),e.xp6(1),e.hij(" ",e.lcZ(23,30,"ACCEPT_PART2")," "),e.xp6(3),e.Q6J("disabled",!t.schoolSignupForm.valid||t.ui.pending),e.xp6(1),e.hij(" ",e.lcZ(27,32,"CLASS_REGISTRATION")," ")}}let Pt=(()=>{class i{constructor(t,n,o,s,l,c,g,A){this.stpConfig=t,this.stpSession=n,this.stpSeo=o,this.stateService=s,this.stpLangageService=l,this.stpAuthService=c,this.stpAccountService=g,this.Flash=A,this.ui={pending:!1},this.discover=!1}ngOnInit(){this.schoolSignupForm=new r.cw({lastName:new r.NI("",r.kI.minLength(1)),firstName:new r.NI("",r.kI.minLength(1)),email:new r.NI("",[r.kI.required,r.kI.pattern("^[a-z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,4}$")]),password:new r.NI("",r.kI.minLength(1)),acceptTerms:new r.NI(!1,r.kI.requiredTrue)}),this.page="signup",this.stpSeo.setTitle("Inscription r\xe9serv\xe9e aux classes des \xe9coles abonn\xe9es"),this.master=this.stpSession.whoami();const t=this.stateService.params;this.schoolId=t.masterid,this.masterClassroomsLimitReached=!1,this.isLfl="c85c4af5-815b-457b-bf8c-461a8f4d046f"===this.schoolId,this.backToMaster="true"==t.backToMaster,this.stpAccountService.getInfoForAccount(this.schoolId,(n,o)=>
1{if(n)return console.log("error in getInfoForAccount for this.schoolId = "+this.schoolId+"err = "+n);null==o||null==o||(this.schoolName=o.schoolName,this.accountInfoId=o._id,console.log("got master info = "+this.accountInfoId))}),this.stpAccountService.masterClassroomsLimitReached(this.schoolId,(n,o)=>{if(n)return console.error(n);this.masterClassroomsLimitReached=o}),w().extend(this,{stpConfig:this.stpConfig,ui:{pending:!1},user:{}})}signup(){this.ui.pending=!0,this.user.master=this.schoolId,this.user.userType="education",this.user.language=this.stpLangageService.getCurrentLanguage(),this.stpAuthService.signup(this.user,this.backToMaster,t=>{this.ui.pending=!1,!t&&this.stpSession.fetchFromServerAndRefreshSession().then(()=>{console.log("BACKTOMASTER = "+this.backToMaster),this.Flash.successTranslate(this.backToMaster?"SUCCESS_CLASSROOM_SIGNUP_AND_BACKTOMASTER":"SUCCESS_CLASSROOM_SIGNUP"),this.backToMaster?this.stateService.go(this.stpLangageService.langPrefix+"compte"):this.stpSession.isLflPartner()?(console.log("this.stpSession.isLflPartner"),this.stateService.go(this.stpLangageService.langPrefix+"welcomeSubscriber",{userTypeToWelcome:"welcomeLfl"})):(console.log("spSession is not LFL of course"),this.stateService.go(this.stpLangageService.langPrefix+"welcomeSubscriber",{userTypeToWelcome:"welcomeFamily"}))})})}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(f.P),e.Y36(m.i),e.Y36(M.i),e.Y36(u.b2),e.Y36(C.s),e.Y36(P.b),e.Y36(j.O),e.Y36(N.M))},i.\u0275cmp=e.Xpm({type:i,selectors:[["stp-school-signup-classroom"]],decls:37,vars:25,consts:[[1,"container","stp-container-v3"],[1,"row"],[1,"col-lg-6","col-md-6","visible-md","visible-lg",2,"padding-right","60px"],[4,"ngIf"],[1,"stp-regular-font","stp-text-bold",2,"background-color","#7fc13e","color","white","padding","15px","margin-bottom","15px"],["srcset","assets/images/v3/signup-mosaic.webp","type","image/webp"],["srcset","assets/images/v3/signup-mosaic.jpg","type","image/jpeg"],["alt","signup-mosaic","src","assets/images/v3/signup-mosaic.jpg",1,"stp-full-size-element"],[1,"col-lg-6","col-md-6","col-sm-12","col-xs-12",2,"margin-top","20px"],[1,"stp-box-shadow","stp-regular-font",2,"border-radius","20px","text-align","center","padding","30px 60px","margin-bottom","35px"],[2,"margin-bottom","10px","font-size","23px"],[2,"margin-bottom","50px"],[1,"stp-hr"],[1,"stp-small-font","stp-text-bold",2,"margin-bottom","10px"],[1,"stp-small-font","stp-text-bold",2,"margin-bottom","25px"],[2,"color","white","background-color","red","border-radius","15px","border","none","padding","5px 15px",3,"uiSref"],[2,"font-size","14px","text-align","left"],[1,"stp-color-red","stp-title-big-and-thin","stp-color-red",2,"margin-bottom","25px"],[1,"stp-regular-font","stp-text-bold",2,"margin-bottom","25px","padding-left","20px"],["name","form",3,"formGroup","submit"],[1,"form-group","col-6"],["formControlName","lastName","focus-me","true","required","","type","text",1,"form-control",3,"ngModel","disabled","placeholder","ngModelChange"],["formControlName","firstName","required","","type","text",1,"form-control",3,"ngModel","disabled","placeholder","ngModelChange"],[1,"form-group"],["formControlName","email","required","","type","email",1,"form-control",3,"ngModel","disabled","placeholder","ngModelChange"],["formControlName","password","required","","type","password",1,"form-control",3,"ngModel","disabled","placeholder","ngModelChange"],[1,"checkbox"],["type","checkbox","formControlName","acceptTerms","required","true",3,"ngModel","ngModelChange"],["target","_blank",3,"uiSref","uiParams"],[1,"stp-text-center"],[1,"stp-text-bold","stp-payment-button",2,"width","100%","border","none",3,"disabled"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2),e.YNc(3,Tt,14,12,"div",3),e.YNc(4,bt,12,1,"div",3),e.TgZ(5,"div",4),e._uU(6),e.ALo(7,"transloco"),e.qZA(),e.TgZ(8,"picture"),e._UZ(9,"source",5)(10,"source",6)(11,"img",7),e.qZA()(),e.TgZ(12,"div",8)(13,"div",9)(14,"h2",10),e._uU(15),e.ALo(16,"transloco"),e.qZA(),e.TgZ(17,"div",11),e.YNc(18,Ct,2,1,"div",3),e.YNc(19,Nt,4,3,"div",3),e.YNc(20,Mt,4,3,"div",3),e.qZA(),e.YNc(21,yt,28,35,"div",3),e._UZ(22,"hr",12),e.TgZ(23,"div",13),e._uU(24),e.ALo(25,"transloco"),e.qZA(),e.TgZ(26,"div",14)(27,"a",15),e._uU(28),e.ALo(29,"transloco"),e.qZA()(),e.TgZ(30,"div",16)(31,"i"),e._uU(32),e.ALo(33,"transloco"),e._UZ(34,"br"),e._uU(35),e.ALo(36,"transloco"),e.qZA()()()()()()),2&t&&(e.xp6(3),e.Q6J("ngIf",!n.isLfl),e.xp6(1),e.Q6J("ngIf",n.isLfl),e.xp6(2),e.hij(" ",e.lcZ(7,13,"SUBSCRIBE_TXT14")," "),e.xp6(9),e.Oqu(e.l
1cZ(16,15,"CREATE_ACCOUNT")),e.xp6(3),e.Q6J("ngIf",null!=n.accountInfoId),e.xp6(1),e.Q6J("ngIf",null==n.accountInfoId),e.xp6(1),e.Q6J("ngIf",null!=n.accountInfoId&&n.masterClassroomsLimitReached),e.xp6(1),e.Q6J("ngIf",null!=n.accountInfoId&&!n.masterClassroomsLimitReached),e.xp6(3),e.hij(" ",e.lcZ(25,17,"ACCOUNT_ALREADY")," "),e.xp6(3),e.Q6J("uiSref",n.stpLangageService.langPrefix+"login"),e.xp6(1),e.hij(" ",e.lcZ(29,19,"LOGIN")," "),e.xp6(4),e.hij(" ",e.lcZ(33,21,"DATA_COLLECTION_CNIL_PART1")," "),e.xp6(3),e.hij(" ",e.lcZ(36,23,"DATA_COLLECTION_CNIL_PART2")," "))},dependencies:[_.bcJ,_.KeH,p.O5,r._Y,r.Fj,r.Wl,r.JJ,r.JL,r.Q7,r.Zs,r.sg,r.u,h.Ot],encapsulation:2}),i})();var qt=d(44047);function Et(i,a){1&i&&(e.TgZ(0,"h2",25),e._uU(1," Offre d'essai - 15 jours gratuits "),e.qZA())}function Ot(i,a){1&i&&(e.TgZ(0,"h2",25),e._uU(1," Inscription \xe9cole "),e.qZA())}function It(i,a){1&i&&(e.TgZ(0,"h2",25),e._uU(1,"Inscription \xe9coles, offre gratuite"),e.qZA())}function Ut(i,a){1&i&&(e.TgZ(0,"h2",25),e._uU(1,"Inscription m\xe9diath\xe8ques"),e.qZA())}function wt(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",7)(1,"input",26),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.user.password=o)}),e.ALo(2,"transloco"),e.qZA()()}if(2&i){const t=e.oxw();e.xp6(1),e.MGl("placeholder","",e.lcZ(2,3,"CHOOSEPASSWORD"),"*"),e.Q6J("ngModel",t.user.password)("disabled",t.ui.pending)}}function Jt(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",7)(1,"input",27),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.user.schoolName=o)}),e.ALo(2,"transloco"),e.qZA()()}if(2&i){const t=e.oxw();e.xp6(1),e.MGl("placeholder","",e.lcZ(2,3,"SCHOOLNAME")," *"),e.Q6J("ngModel",t.user.schoolName)("disabled",t.ui.pending)}}function Rt(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",7)(1,"input",27),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.user.schoolName=o)}),e.ALo(2,"transloco"),e.qZA()()}if(2&i){const t=e.oxw();e.xp6(1),e.MGl("placeholder","",e.lcZ(2,3,"LIBRARYNAME")," *"),e.Q6J("ngModel",t.user.schoolName)("disabled",t.ui.pending)}}function Yt(i,a){1&i&&(e.TgZ(0,"div"),e._UZ(1,"hr",28),e.TgZ(2,"div",29),e._uU(3),e.ALo(4,"transloco"),e.qZA(),e.TgZ(5,"div",30)(6,"button",31),e._uU(7),e.ALo(8,"transloco"),e.qZA()(),e.TgZ(9,"div",32)(10,"i"),e._uU(11),e.ALo(12,"transloco"),e._UZ(13,"br"),e._uU(14),e.ALo(15,"transloco"),e.qZA()()()),2&i&&(e.xp6(3),e.hij(" ",e.lcZ(4,4,"ACCOUNT_ALREADY")," "),e.xp6(4),e.hij(" ",e.lcZ(8,6,"LOGIN")," "),e.xp6(4),e.hij(" ",e.lcZ(12,8,"DATA_COLLECTION_CNIL_PART1")," "),e.xp6(3),e.hij(" ",e.lcZ(15,10,"DATA_COLLECTION_CNIL_PART2")," "))}const Ft=function(){return{page:"cgu"}};let kt=(()=>{class i{constructor(t,n,o,s,l,c,g){this.stpSeo=t,this.stateService=n,this.stpLangageService=o,this.stpAuthService=s,this.Flash=l,this.stpSession=c,this.stpConfig=g,this.isSignupLibrary=!0,this.countryList=V.g.COUNTRIES,this.ui={pending:!1},this.discover=!1,this.isSignupSchoolPremium=!1,this.isSignupSchoolFree=!1,this.next=""}ngOnInit(){this.signupMediathequeForm=new r.cw({lastName:new r.NI("",r.kI.minLength(1)),firstName:new r.NI("",r.kI.minLength(1)),email:new r.NI("",[r.kI.required,r.kI.pattern("^[a-z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,4}$")]),password:new r.NI("",r.kI.minLength(1)),schoolName:new r.NI("",r.kI.minLength(1)),addressLine1:new r.NI("",r.kI.minLength(1)),addressLine2:new r.NI("",r.kI.minLength(1)),town:new r.NI("",r.kI.minLength(1)),country:new r.NI("",r.kI.minLength(1)),zipCode:new r.NI("",r.kI.minLength(1)),acceptTerms:new r.NI(!1,r.kI.requiredTrue)}),this.page="signup",this.stpSeo.setTitle("Inscription r\xe9serv\xe9e aux m\xe9diath\xe8ques");let t=this.stpSession.getSharedObjectForDiscover();w().extend(this,{stpConfig:this.stpConfig,hasSharedObjectForDiscoverInSignupContext:!!t,params:this.stateService.params.paramCookie,ui:{pending:!1},user:{}}),t&&(this.user.email=t.recipient_email,this.user.sharedForDiscoverId=t._id),this.params.promocode&&(this.user.promoCode=this.params.promocode)}signup(){this.ui.pending=!0,this.user.userIsMediatheque=!0,this.stpAuthService.signup(this.user,!1,t=>{this.ui.pending=!1,!t&&this.stpSession.fetchFromServerAndRefreshSession().then(()=>{this.stateService.go(this.stpLangageService.langPrefix+"welcomeSubscriber")})})}nextIsTrial(){return"trial"===this.next}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(M.i),e.Y36(u.b2),e.Y36(C.s),e.Y36(P.b),e.Y36(N.M),e.Y36(m.i),e.Y36(f.P))},i.\u0275cmp=e.Xpm({type:i,selectors:[["stp-mediatheque-signup"]],decls:56,vars:63,consts:[[1,"container","stp-container-v3"],[1,"row"],[1,"col-lg-12","col-md-12","col-sm-12","col-xs-12",2,"margin-top","20px"],[1,"stp-box-sha
1dow","stp-regular-font",2,"border-radius","20px","text-align","center","padding","30px 60px","margin-bottom","35px"],["style","margin-bottom: 50px; font-size: 23px;",4,"ngIf"],["name","form",3,"formGroup","submit"],[1,"col-lg-6"],[1,"form-group"],["formControlName","lastName","focus-me","true","required","","type","text",1,"form-control",3,"ngModel","disabled","placeholder","ngModelChange"],["formControlName","firstName","required","","type","text",1,"form-control",3,"ngModel","disabled","placeholder","ngModelChange"],["formControlName","email","required","","type","email",1,"form-control",3,"ngModel","disabled","placeholder","ngModelChange"],["class","form-group",4,"ngIf"],["required","","type","text","formControlName","addressLine1",1,"form-control",3,"ngModel","disabled","placeholder","ngModelChange"],["type","text","formControlName","addressLine2",1,"form-control",3,"ngModel","disabled","placeholder","ngModelChange"],["required","","type","text","formControlName","zipCode",1,"form-control",3,"ngModel","disabled","placeholder","ngModelChange"],["required","","type","text","formControlName","town",1,"form-control",3,"ngModel","disabled","placeholder","ngModelChange"],["formControlName","country","required","","type","select","ng-options","opt.code as opt.name for opt in countryList",1,"form-control",3,"ngModel","disabled","ngModelChange"],["value",""],[1,"col-lg-12"],[1,"checkbox"],["type","checkbox","formControlName","acceptTerms","required","true",3,"ngModel","ngModelChange"],["target","_blank",3,"uiSref","uiParams"],[1,"stp-text-center"],[1,"stp-text-bold","stp-payment-button",2,"width","100%","border","none",3,"disabled"],[4,"ngIf"],[2,"margin-bottom","50px","font-size","23px"],["required","","formControlName","password","type","password",1,"form-control",3,"ngModel","disabled","placeholder","ngModelChange"],["required","","type","text","formControlName","schoolName",1,"form-control",3,"ngModel","disabled","placeholder","ngModelChange"],[1,"stp-hr"],[1,"stp-small-font","stp-text-bold",2,"margin-bottom","10px"],[1,"stp-small-font","stp-text-bold",2,"margin-bottom","25px"],[2,"color","white","background-color","red","border-radius","15px","border","none","padding","5px 15px"],[2,"font-size","14px","text-align","left"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),e.YNc(4,Et,2,0,"h2",4),e.YNc(5,Ot,2,0,"h2",4),e.YNc(6,It,2,0,"h2",4),e.YNc(7,Ut,2,0,"h2",4),e.TgZ(8,"form",5),e.NdJ("submit",function(){return n.signup()}),e.TgZ(9,"div",1)(10,"div",6)(11,"div",7)(12,"input",8),e.NdJ("ngModelChange",function(s){return n.user.lastName=s}),e.ALo(13,"transloco"),e.qZA()(),e.TgZ(14,"div",7)(15,"input",9),e.NdJ("ngModelChange",function(s){return n.user.firstName=s}),e.ALo(16,"transloco"),e.qZA()(),e.TgZ(17,"div",7)(18,"input",10),e.NdJ("ngModelChange",function(s){return n.user.email=s}),e.ALo(19,"transloco"),e.qZA()(),e.YNc(20,wt,3,5,"div",11),e.qZA(),e.TgZ(21,"div",6),e.YNc(22,Jt,3,5,"div",11),e.YNc(23,Rt,3,5,"div",11),e.TgZ(24,"div",7)(25,"input",12),e.NdJ("ngModelChange",function(s){return n.user.addressLine1=s}),e.ALo(26,"transloco"),e.qZA()(),e.TgZ(27,"div",7)(28,"input",13),e.NdJ("ngModelChange",function(s){return n.user.addressLine2=s}),e.ALo(29,"transloco"),e.qZA()(),e.TgZ(30,"div",7)(31,"input",14),e.NdJ("ngModelChange",function(s){return n.user.zipCode=s}),e.ALo(32,"transloco"),e.qZA()(),e.TgZ(33,"div",7)(34,"input",15),e.NdJ("ngModelChange",function(s){return n.user.town=s}),e.ALo(35,"transloco"),e.qZA()(),e.TgZ(36,"div",7)(37,"select",16),e.NdJ("ngModelChange",function(s){return n.user.country=s}),e.TgZ(38,"option",17),e._uU(39),e.ALo(40,"transloco"),e.qZA()()()(),e.TgZ(41,"div",18)(42,"div",7)(43,"div",19)(44,"label")(45,"input",20),e.NdJ("ngModelChange",function(s){return n.user.acceptTerms=s}),e.qZA(),e._uU(46),e.ALo(47,"transloco"),e.TgZ(48,"a",21),e._uU(49),e.ALo(50,"transloco"),e.qZA()()()(),e.TgZ(51,"div",22)(52,"button",23),e._uU(53),e.ALo(54,"transloco"),e.qZA()()()()(),e.YNc(55,Yt,16,12,"div",24),e.qZA()()()()),2&t&&(e.xp6(4),e.Q6J("ngIf",n.isSignupSchoolPremium&&n.nextIsTrial()),e.xp6(1),e.Q6J("ngIf",n.isSignupSchoolPremium&&!n.nextIsTrial()),e.xp6(1),e.Q6J("ngIf",n.isSignupSchoolFree),e.xp6(1),e.Q6J("ngIf",n.isSignupLibrary),e.xp6(1),e.Q6J("formGroup",n.signupMediathequeForm),e.xp6(4),e.MGl("placeholder","",e.lcZ(13,40,"LASTNAME"),"*"),e.Q6J("ngModel",n.user.lastName)("disabled",n.ui.pending),e.xp6(3),e.MGl("placeholder","",e.lcZ(16,42,"FIRSTNAME"),"*"),e.Q6J("ngModel",n.user.firstName)("disabled",n.ui.pending),e.xp6(3),e.MGl("placeholder","",e.lcZ(19,44,"EMAIL"),"*"),e.Q6J("ngModel",n.user.email)("disabled",n.ui.pending||!!n.discover),e.xp6(2),e.Q6J("ngIf",!n.stpSession.isLogged()),e.xp6(2),e.Q6J("ngIf",n.isSignupSchoolFree||n.isSignupSchoolPremium),e.xp6(1),e.Q6J("ngIf",n.isSignupLibrary),e.xp6(2),e.MGl("placeholder","",e.lcZ(26,46,"ADDRESS")," *"),e.Q6J("ngModel",n.user.addressLine1)("disabled",n.ui.pending),e.xp6(3),e.s9C("placeholder",e.lcZ(29,48,"ADDRESSLINE2")),e.Q6J("ngModel",n.user.addressLine2)("disabled",n.ui.pending),e.xp6(3),e.MGl("placeholder","",e.lcZ(32,50,"ZIPCODE")," *"),e.Q6J("ngModel",n.user.zipCode)("disabled",n.ui.pending),e.xp6(3),e.MGl("placeholder","",e.lcZ(35,52,"CITY")," *"),e.Q6J("ngModel",n.user.town)("disabled",n.ui.pending),e.xp6(3),e.Q6J("ngModel",n.user.country)("disabled",n.ui.pending),e.xp6(2),e.hij("",e.lcZ(40,54,"COUNTRY")," *"),e.xp6(6),e.Q6J("ngModel",n.user.acceptTerms),e.xp6(1),e.hij(" ",e.lcZ(47,56,"ACCEPT_PART1")," "),e.xp6(2),e.Q6J("uiSref",n.stpLangageService.langPrefix+"static")("uiParams",e.DdM(62,Ft)),e.xp6(1),e.hij(" ",e.lcZ(50,58,"ACCEPT_PART2")," "),e.xp6(3),e.Q6J("disabled",!n.signupMediathequeForm.valid||n.ui.pending),e.xp6(1),e.hij(" ",e.lcZ(54,60,"LETSGO")," "),e.xp6(2),e.Q6J("ngIf",!n.params.partenaire))},dependencies:[_.bcJ,_.KeH,p.O5,r._Y,r.YN,r.Kr,r.Fj,r.Wl,r.EJ,r.JJ,r.JL,r.Q7,r.Zs,r.sg,r.u,h.Ot],encapsulation:2}),i})();function Dt(i,a){if(1&i&&(e.TgZ(0,"div",7),e._uU(1),e.qZA()),2&i){const t=e.oxw();e.xp6(1),e.hij(" ",t.schoolName," ")}}function Qt(i,a){1&i&&(e.TgZ(0,"div",7)(1,"p"),e._uU(2),e.ALo(3,"transloco"),e.qZA()()),2&i&&(e.xp6(2),e.hij(" ",e.lcZ(3,1,"SCHOOL_NOT_FOUND")," "))}function Gt(i,a){if(1&i&&(e.TgZ(0,"div"),e._UZ(1,"hr",19),e.TgZ(2,"div",7)(3,"div",20)(4,"strong"),e._uU(5),e.ALo(6,"transloco"),e.qZA()(),e._UZ(7,"i",21),e.TgZ(8,"a",22),e._uU(9),e.ALo(10,"transloco"),e.qZA()(),e.TgZ(11,"div",23)(12,"i",24),e._uU(13),e.ALo(14,"transloco"),e._UZ(15,"br"),e._uU(16),e.ALo(17,"transloco"),e.qZA()()()),2&i){const t=e.oxw(2);e.xp6(5),e.hij(" ",e.lcZ(6,5,"ACCOUNT_ALREADY")," "),e.xp6(3),e.Q6J("uiSref",t.stpLangageService.langPrefix+"login"),e.xp6(1),e.hij(" ",e.lcZ(10,7,"CONNECT_HERE")," "),e.xp6(4),e.hij(" ",e.lcZ(14,9,"DATA_COLLECTION_CNIL_PART1")," "),e.xp6(3),e.hij(" ",e.lcZ(17,11,"DATA_COLLECTION_CNIL_PART2")," ")}}const jt=function(){return{page:"cgu"}};function Ht(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div")(1,"form",8),e.NdJ("submit",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.signup())}),e.TgZ(2,"div",9)(3,"input",10),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.user.lastName=o)}),e.ALo(4,"transloco"),e.qZA()(),e.TgZ(5,"div",9)(6,"input",11),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.user.firstName=o)}),e.ALo(7,"transloco"),e.qZA()(),e.TgZ(8,"div",9)(9,"input",12),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.user.email=o)}),e.ALo(10,"transloco"),e.qZA()(),e.TgZ(11,"div",9)(12,"input",13),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.user.password=o)}),e.ALo(13,"transloco"),e.qZA()(),e.TgZ(14,"div",9)(15,"div",14)(16,"label")(17,"input",15),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.user.acceptTerms=o)}),e.qZA(),e._uU(18),e.ALo(19,"transloco"),e.TgZ(20,"a",16),e._uU(21),e.ALo(22,"transloco"),e.qZA()()()(),e.TgZ(23,"div",7)(24,"button",17),e._uU(25),e.ALo(26,"transloco"),e.qZA()()(),e.TgZ(27,"p",18),e._uU(28),e.ALo(29,"transloco"),e.qZA(),e.YNc(30,Gt,18,13,"div",5),e.qZA()}if(2&i){const t=e.oxw();e.xp6(3),e.MGl("placeholder","",e.lcZ(4,21,"LASTNAME"),"*"),e.Q6J("ngModel",t.user.lastName)("disabled",t.ui.pending),e.xp6(3),e.MGl("placeholder","",e.lcZ(7,23,"FIRSTNAME"),"*"),e.Q6J("ngModel",t.user.firstName)("disabled",t.ui.pending),e.xp6(3),e.MGl("placeholder","",e.lcZ(10,25,"EMAIL"),"*"),e.Q6J("ngModel",t.user.email)("disabled",t.ui.pending||!!t.discover),e.xp6(3),e.MGl("placeholder","",e.lcZ(13,27,"CHOOSEPASSWORD"),"*"),e.Q6J("ngModel",t.user.password)("disabled",t.ui.pending),e.xp6(5),e.Q6J("ngModel",t.user.acceptTerms),e.xp6(1),e.hij(" ",e.lcZ(19,29,"ACCEPT_PART1")," "),e.xp6(2),e.Q6J("uiSref",t.stpLangageService.langPrefix+"static")("uiParams",e.DdM(37,jt)),e.xp6(1),e.hij(" ",e.lcZ(22,31,"ACCEPT_PART2")," "),e.xp6(3),e.Q6J("disabled",t.form.$
1invalid||t.ui.pending),e.xp6(1),e.hij(" ",e.lcZ(26,33,"CLASS_REGISTRATION")," "),e.xp6(3),e.hij(" ",e.lcZ(29,35,"MANDATORY")," "),e.xp6(2),e.Q6J("ngIf",!t.params.partenaire)}}let Bt=(()=>{class i{constructor(t,n,o,s,l,c){this.stpSeo=t,this.stpAccountService=n,this.Flash=o,this.stpLangageServcice=s,this.stpConfig=l,this.stateService=c}ngOnInit(){this.page="signup-biblio",this.stpSeo.setTitle("Inscription r\xe9serv\xe9 aux biblioth\xe9quaires"),this.biblioMasterId=this.stateService.params.masterid,this.stpAccountService.getInfoForAccount(this.biblioMasterId,(t,n)=>{if(t)return console.log(t);null!=n&&(this.schoolName=n.schoolName,this.accountInfoId=n._id,this.expirationDateDelay=n.expirationDateDelayForMembers)}),w().extend(this,{stpConfig:this.stpConfig,ui:{pending:!1},user:{},signup:function(){this.ui.pending=!0,this.user.master=this.biblioMasterId,this.user.userType="biblio",this.user.expirationDateDelay=this.expirationDateDelay,this.stpAuthService.signup(this.user,!1,t=>{this.ui.pending=!1,!t&&this.stpSession.fetchFromServerAndRefreshSession().then(()=>{this.Flash.successTranslate("SUCCESS_LIBRARIAN_SIGNUP"),this.stateService.go(this.stpLangageServcice.langPrefix+"bibliotheque")})})}})}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(M.i),e.Y36(j.O),e.Y36(N.M),e.Y36(C.s),e.Y36(f.P),e.Y36(u.b2))},i.\u0275cmp=e.Xpm({type:i,selectors:[["stp-mediatheque-biblio-signup"]],decls:11,vars:6,consts:[[1,"container-fluid","stp-container-v3","min-full"],[1,"row-fluid"],[1,"stp-subscription","col-lg-6","col-lg-offset-3","col-md-6","col-md-offset-3","col-sm-8","col-sm-offset-2","col-xs-12","stp-box-shadow","stp-regular-font","stp-signup-container"],[1,"stp-title-signupform-red"],["class","text-center",4,"ngIf"],[4,"ngIf"],[1,"clearfix"],[1,"text-center"],["name","form",1,"marged-bot-half",3,"submit"],[1,"form-group"],["focus-me","true","required","","type","text",1,"form-control",3,"ngModel","disabled","placeholder","ngModelChange"],["required","","type","text",1,"form-control",3,"ngModel","disabled","placeholder","ngModelChange"],["required","","type","email",1,"form-control",3,"ngModel","disabled","placeholder","ngModelChange"],["required","","type","password",1,"form-control",3,"ngModel","disabled","placeholder","ngModelChange"],[1,"checkbox"],["type","checkbox","required","true",3,"ngModel","ngModelChange"],["target","_blank",3,"uiSref","uiParams"],[1,"stp-text-bold","stp-login-button",3,"disabled"],[1,"stp-text-discret"],[1,"dark"],[1,"marged-bot-half"],[1,"sprite","sprite-arrow-red"],[1,"red-link",3,"uiSref"],[2,"padding-top","20px"],[1,"stp-private-life-cnil"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"h2",3),e._uU(4),e.ALo(5,"transloco"),e.qZA(),e.YNc(6,Dt,2,1,"div",4),e._UZ(7,"br"),e.YNc(8,Qt,4,3,"div",4),e.YNc(9,Ht,31,38,"div",5),e.qZA(),e._UZ(10,"div",6),e.qZA()()),2&t&&(e.xp6(4),e.hij(" ",e.lcZ(5,4,"LIBRARIAN_SUBSCRIPTION")," "),e.xp6(2),e.Q6J("ngIf",null!=n.accountInfoId),e.xp6(2),e.Q6J("ngIf",null==n.accountInfoId),e.xp6(1),e.Q6J("ngIf",null!=n.accountInfoId))},dependencies:[_.bcJ,_.KeH,p.O5,r._Y,r.Fj,r.Wl,r.JJ,r.JL,r.Q7,r.Zs,r.On,r.F,h.Ot],encapsulation:2}),i})();function Kt(i,a){1&i&&e._UZ(0,"img",10)}function Wt(i,a){1&i&&e._UZ(0,"img",11)}function $t(i,a){if(1&i&&(e.TgZ(0,"h2",12),e._uU(1),e.qZA()),2&i){const t=e.oxw();e.xp6(1),e.hij(" ",t.biblioName," ")}}function zt(i,a){1&i&&(e.TgZ(0,"div"),e._uU(1),e.ALo(2,"transloco"),e.qZA()),2&i&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"FREE_ACCESS_AEFE")," "))}function Vt(i,a){1&i&&(e.TgZ(0,"h2",12),e._uU(1),e.ALo(2,"transloco"),e.qZA()),2&i&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"BIBLIO_NOT_FOUND")," "))}function Xt(i,a){if(1&i&&(e.TgZ(0,"div"),e._uU(1),e.ALo(2,"transloco"),e.qZA()),2&i){const t=e.oxw();e.xp6(1),e.hij(" ",e.lcZ(2,1,"SIGNUP_MEDIATHEQUE_WARNING").replace("%schoolname%",t.biblioName)," ")}}function ei(i,a){1&i&&(e.TgZ(0,"div"),e._uU(1),e.ALo(2,"transloco"),e.qZA()),2&i&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"SIGNUP_AEFE_WARNING")," "))}function ti(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",14)(1,"input",16),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw(2);return e.KtG(s.user.memberid=o)}),e.ALo(2,"transloco"),e.qZA()()}if(2&i){const t=e.oxw(2);e.xp6(1),e.MGl("placeholder","",e.lcZ(2,3,"MEMBERID"),"*"),e.Q6J("ngModel",t.user.memberid)("disabled",t.ui.pending||!!t.discover)}}function ii(i,a){if(1&i&&(e.TgZ(0,"option",26),e._uU(1),e.qZA()),2&i){const t=a.$implicit;e.s9C("value",t),e.xp6(1),e.Oqu(t)}}function ni(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",14)(1,"label"),e._uU(2),e.ALo(3,"transloco"),e.qZA(),e.TgZ(4,"select",24),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw(2);return e.KtG(s.user.library=o)}),e.ALo(5,"transloco"),e.YNc(6,ii,2,2,"option",25),e.qZA()()}if(2&i){const t=e.oxw(2);
1e.xp6(2),e.Oqu(e.lcZ(3,5,"SCHOOL_INSTITUTION")),e.xp6(2),e.MGl("placeholder","",e.lcZ(5,7,"SELECTLIBRARY"),"*"),e.Q6J("ngModel",t.user.library)("disabled",t.ui.pending||!!t.discover),e.xp6(2),e.Q6J("ngForOf",t.relatedLibraries)}}function oi(i,a){if(1&i&&(e.TgZ(0,"option",26),e._uU(1),e.qZA()),2&i){const t=a.$implicit;e.s9C("value",t),e.xp6(1),e.Oqu(t)}}function si(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",14)(1,"label"),e._uU(2),e.ALo(3,"transloco"),e.qZA(),e.TgZ(4,"select",27),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw(2);return e.KtG(s.user.adherProfile=o)}),e.YNc(5,oi,2,2,"option",25),e.qZA()()}if(2&i){const t=e.oxw(2);e.xp6(2),e.Oqu(e.lcZ(3,4,"YOU_ARE")),e.xp6(2),e.Q6J("ngModel",t.user.adherProfile)("disabled",t.ui.pending||!!t.discover),e.xp6(1),e.Q6J("ngForOf",t.adherProfileList)}}function ai(i,a){if(1&i&&(e.TgZ(0,"div"),e._UZ(1,"hr",28),e.TgZ(2,"div",8)(3,"div",29)(4,"strong"),e._uU(5),e.ALo(6,"transloco"),e.qZA()(),e._UZ(7,"i",30),e.TgZ(8,"a",31),e._uU(9),e.ALo(10,"transloco"),e.qZA()(),e.TgZ(11,"div",32)(12,"i",33),e._uU(13),e.ALo(14,"transloco"),e._UZ(15,"br"),e._uU(16),e.ALo(17,"transloco"),e.qZA()()()),2&i){const t=e.oxw(2);e.xp6(5),e.hij(" ",e.lcZ(6,5,"ACCOUNT_ALREADY")," "),e.xp6(3),e.Q6J("uiSref",t.stpLangageService.langPrefix+"login"),e.xp6(1),e.hij(" ",e.lcZ(10,7,"CONNECT_HERE")," "),e.xp6(4),e.hij(" ",e.lcZ(14,9,"DATA_COLLECTION_CNIL_PART1")," "),e.xp6(3),e.hij(" ",e.lcZ(17,11,"DATA_COLLECTION_CNIL_PART2")," ")}}const ri=function(){return{page:"cgu"}};function li(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div")(1,"form",13),e.NdJ("submit",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.signup())}),e.TgZ(2,"div",14)(3,"input",15),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.user.lastName=o)}),e.ALo(4,"transloco"),e.qZA()(),e.TgZ(5,"div",14)(6,"input",16),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.user.firstName=o)}),e.ALo(7,"transloco"),e.qZA()(),e.TgZ(8,"div",14)(9,"input",17),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.user.email=o)}),e.ALo(10,"transloco"),e.qZA()(),e.YNc(11,ti,3,5,"div",18),e.YNc(12,ni,7,9,"div",18),e.YNc(13,si,6,6,"div",18),e.TgZ(14,"div",14)(15,"input",19),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.user.password=o)}),e.ALo(16,"transloco"),e.qZA()(),e.TgZ(17,"div",14)(18,"div",20)(19,"label")(20,"input",21),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.user.acceptTerms=o)}),e.qZA(),e._uU(21),e.ALo(22,"transloco"),e.TgZ(23,"a",22),e._uU(24),e.ALo(25,"transloco"),e.qZA()()()(),e.TgZ(26,"div",8)(27,"button",23),e._uU(28),e.ALo(29,"transloco"),e.qZA()()(),e.YNc(30,ai,18,13,"div",7),e.qZA()}if(2&i){const t=e.oxw();e.xp6(3),e.MGl("placeholder","",e.lcZ(4,23,"LASTNAME"),"*"),e.Q6J("ngModel",t.user.lastName)("disabled",t.ui.pending),e.xp6(3),e.MGl("placeholder","",e.lcZ(7,25,"FIRSTNAME"),"*"),e.Q6J("ngModel",t.user.firstName)("disabled",t.ui.pending),e.xp6(3),e.MGl("placeholder","",e.lcZ(10,27,"EMAIL"),"*"),e.Q6J("ngModel",t.user.email)("disabled",t.ui.pending||!!t.discover),e.xp6(2),e.Q6J("ngIf",t.displayMemberId),e.xp6(1),e.Q6J("ngIf",t.relatedLibraries),e.xp6(1),e.Q6J("ngIf",t.adherProfileList),e.xp6(2),e.MGl("placeholder","",e.lcZ(16,29,"CHOOSEPASSWORD"),"*"),e.Q6J("ngModel",t.user.password)("disabled",t.ui.pending),e.xp6(5),e.Q6J("ngModel",t.user.acceptTerms),e.xp6(1),e.hij(" ",e.lcZ(22,31,"ACCEPT_PART1")," "),e.xp6(2),e.Q6J("uiSref",t.stpLangageService.langPrefix+"static")("uiParams",e.DdM(37,ri)),e.xp6(1),e.hij(" ",e.lcZ(25,33,"ACCEPT_PART2")," "),e.xp6(3),e.Q6J("disabled",t.ui.pending),e.xp6(1),e.hij(" ",e.lcZ(29,35,"I_SIGN_UP")," "),e.xp6(2),e.Q6J("ngIf",!t.params.partenaire)}}let ci=(()=>{class i{constructor(t,n,o,s,l,c,g,A,L){this.stpSeo=t,this.stpLangageService=n,this.Flash=o,this.stpAuthService=s,this.stpSessionService=l,this.stpAccountService=c,this.stpConfig=g,this.router=A,this.stateService=L,this.ui={pending:!1},this.discover=!1,this.params={partenaire:null},this.isAEFE=!1}ngOnInit(){this.mediathequeMemberSignupForm=new r.cw({lastName:new r.NI("",r.kI.minLength(1)),firstName:new r.NI("",r.kI.minLength(1)),email:new r.NI("",[r.k
1I.required,r.kI.pattern("^[a-z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,4}$")]),memberid:new r.NI("",r.kI.minLength(1)),library:new r.NI(null,[]),password:new r.NI("",r.kI.minLength(1)),acceptTerms:new r.NI(!1,r.kI.requiredTrue)}),this.page="signup",this.stpSeo.setTitle("Inscription r\xe9serv\xe9e aux membres des m\xe9diath\xe8ques"),this.masterid=this.router.locationService.search().mediathequeid,this.params.partenaire=this.router.locationService.search().partenaire,this.isAEFE="6032f716-9577-4f2d-b8ee-5474c4e35327"===this.masterid,this.stpAccountService.getInfoForAccount(this.masterid,(t,n)=>{if(t)return this.Flash.errorTranslate(t.data.message),t;null!=n&&null!=n&&(this.biblioName=n.schoolName,n.memberidValidationPattern&&"no-member-id"!=n.memberidValidationPattern?(this.displayMemberId=!0,this.memberidValidationPattern=new RegExp(n.memberidValidationPattern)):this.displayMemberId=!1,this.expirationDateDelay=n.expirationDateDelayForMembers,this.relatedLibraries=n.relatedLibraries,this.adherProfileList=n.adherProfileList,this.slaveCanRecord=n.slaveCanRecord,this.accountInfoId=n._id)}),w().extend(this,{stpConfig:this.stpConfig,ui:{pending:!1},user:{library:null}})}signup(){return this.ui.pending=!0,this.user.master=this.masterid,this.user.userType="adher",this.user.biblioInvalid=!0,this.user.expirationDateDelay=this.expirationDateDelay,this.memberidValidationPattern&&!this.memberidValidationPattern.test(this.user.memberid)?(this.Flash.errorTranslate("BAD_MEMBERID"),void(this.ui.pending=!1)):this.relatedLibraries&&this.relatedLibraries.length>0&&!this.user.library?(this.Flash.errorTranslate("NEED_SCHOOL_OR_INSTITUTION"),void(this.ui.pending=!1)):this.adherProfileList&&this.adherProfileList.length>0&&!this.user.adherProfile?(this.Flash.errorTranslate("NEED_ADHER_PROFILE"),void(this.ui.pending=!1)):void this.stpAuthService.signup(this.user,!1,t=>{this.ui.pending=!1,!t&&this.stpSessionService.fetchFromServerAndRefreshSession().then(()=>{this.Flash.successTranslate("SUCCESS_BIBLIO_SIGNUP"),this.stateService.go(this.stpLangageService.langPrefix+"bibliotheque")})})}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(M.i),e.Y36(C.s),e.Y36(N.M),e.Y36(P.b),e.Y36(m.i),e.Y36(j.O),e.Y36(f.P),e.Y36(u.aU),e.Y36(u.b2))},i.\u0275cmp=e.Xpm({type:i,selectors:[["stp-mediatheque-member-signup"]],decls:17,vars:11,consts:[[1,"container-fluid","stp-container-v3","min-full"],[1,"row-fluid"],[1,"stp-subscription","col-lg-6","col-lg-offset-3","col-md-6","col-md-offset-3","col-sm-8","col-sm-offset-2","col-xs-12","stp-box-shadow","stp-regular-font","stp-signup-container"],[1,"d-flex","justify-content-center",2,"gap","10px"],["src","assets/images/partners/LOGO-FLAM.png","alt","LOGO FLAM","style","flex: 1; max-width: 40%; height: auto; object-fit: contain;",4,"ngIf"],["src","assets/images/partners/LOGO-AEFE.jpg","alt","LOGO AEFE","style","flex: 1; max-width: 40%; height: auto; object-fit: contain;",4,"ngIf"],["class","stp-title-signupform-red",4,"ngIf"],[4,"ngIf"],[1,"text-center"],[1,"clearfix"],["src","assets/images/partners/LOGO-FLAM.png","alt","LOGO FLAM",2,"flex","1","max-width","40%","height","auto","object-fit","contain"],["src","assets/images/partners/LOGO-AEFE.jpg","alt","LOGO AEFE",2,"flex","1","max-width","40%","height","auto","object-fit","contain"],[1,"stp-title-signupform-red"],["name","form",1,"marged-bot-half",3,"submit"],[1,"form-group"],["focus-me","true","required","","type","text",1,"form-control",3,"ngModel","disabled","placeholder","ngModelChange"],["required","","type","text",1,"form-control",3,"ngModel","disabled","placeholder","ngModelChange"],["required","","type","email",1,"form-control",3,"ngModel","disabled","placeholder","ngModelChange"],["class","form-group",4,"ngIf"],["required","","type","password",1,"form-control",3,"ngModel","disabled","placeholder","ngModelChange"],[1,"checkbox"],["type","checkbox","required","true",3,"ngModel","ngModelChange"],["target","_blank",3,"uiSref","uiParams"],[1,"stp-button-medium","stp-btn-red",3,"disabled"],["id","selectLibraries","required","",1,"form-control",2,"width","100%",3,"ngModel","placeholder","disabled","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["id","adherProfileList","required","",1,"form-control",2,"width","100%",3,"ngModel","disabled","ngModelChange"],[1,"dark"],[1,"marged-bot-half"],[1,"sprite","sprite-arrow-red"],[1,"red-link",3,"uiSref"],[2,"padding-top","20px"],[1,"stp-private-life-cnil"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),e.YNc(4,Kt,1,0,"img",4),e.YNc(5,Wt,1,0,"img",5),e.qZA(),e.YNc(6,$t,2,1,"h2",6),e.YNc(7,zt,3,3,"div",7),e.YNc(8,Vt,3,3,"h2",6),e.TgZ(9,"h4",8),e._uU(10),e.ALo(11,"transloco"),e.qZA(),e.YNc(12,Xt,3,3,"div",7),e.YNc(13,ei,3,3,"div",7),e._UZ(14,"br"),e.YNc(15,li,31,38,"div",7),e.qZA(),e._UZ(16,"div",9),e.qZA()()),2&t&&(e.xp6(4),e.Q6J("ngIf",n.isAEFE),e.xp6(1),e.Q6J("ngIf",n.isAEFE),e.xp6(1),e.Q6J("ngIf",null!=n.biblioName),e.xp6(1),e.Q6J("ngIf",n.isAEFE),e.xp6(1),e.Q6J("ngIf",null==n.biblioName),e.xp6(2),e.hij(" ",e.lcZ(11,9,"GLOBAL_SIGNUP")," "),e.xp6(2),e.Q6J("ngIf",null!=n.biblioName&&!n.isAEFE),e.xp6(1),e.Q6J("ngIf",null!=n.biblioName&&n.isAEFE),e.xp6(2),e.Q6J("ngIf",!!n.accountInfoId))},dependencies:[_.bcJ,_.KeH,p.sg,p.O5,r._Y,r.YN,r.Kr,r.Fj,r.Wl,r.EJ,r.JJ,r.JL,r.Q7,r.Zs,r.On,r.F,h.Ot],encapsulation:2}),i})();var pi=d(91760),di=d(61135),ui=d(40042),gi=d(22805),_i=d(56673),mi=d(50314),re=d(64624),le=d(60940),ce=d(94533),pe=d(46500),de=d(55213),O=d(25678);function hi(i,a){1&i&&(e.TgZ(0,"span",40),e._uU(1),e.ALo(2,"transloco"),e.qZA()),2&i&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"ERR_REQ")," "))}function fi(i,a){1&i&&(e.TgZ(0,"span",40),e._uU(1),e.ALo(2,"transloco"),e.qZA()),2&i&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"ERR_REQ")," "))}function vi(i,a){1&i&&(e.TgZ(0,"span",40),e._uU(1),e.ALo(2,"transloco"),e.qZA()),2&i&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"ERR_REQ")," "))}function Si(i,a){1&i&&(e.TgZ(0,"span",40),e._uU(1),e.ALo(2,"transloco"),e.qZA()),2&i&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"ERR_REQ")," "))}function Ai(i,a){1&i&&(e.TgZ(0,"span",40),e._uU(1),e.ALo(2,"transloco"),e.qZA()),2&i&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"ERR_REQ")," "))}function Zi(i,a){1&i&&(e.TgZ(0,"span",40),e._uU(1),e.ALo(2,"transloco"),e.qZA()),2&i&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"ERR_REQ")," "))}function xi(i,a){1&i&&(e.TgZ(0,"p",41),e._uU(1),e.ALo(2,"transloco"),e.qZA()),2&i&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"ERR_PASS_MISMATCH")," "))}const k=function(i){return{"has-error":i}};let Ti=(()=>{class i{constructor(t,n,o,s,l){this.stpSeo=t,this.stpSession=n,this.apiService=o,this.Flash=s,this.stpConfig=l,this.ui={password_validation:null,profilePending:!1,passwordPending:!1},this.displayPasswordValidation=!1,this.pass={newPass:void 0,newPassRepeat:void 0,actualPass:void 0}}ngOnInit(){this.page="profile",this.stpSeo.setTitle("Profil"),this.profile=this.stpSession.whoami()}
1updatePassword(t){t.$invalid||this.pass.newPass!==this.pass.newPassRepeat||(this.ui.passwordPending=!0,this.apiService.put(this.stpConfig.api+"/api/account/update-password",{oldPass:this.pass.actualPass,newPass:this.pass.newPass}).subscribe(()=>{this.Flash.successTranslate("SUCCESS.ACCOUNT.passwordChanged"),this.pass={newPass:null,newPassRepeat:null,actualPass:null},t.$setPristine()},()=>{this.ui.passwordPending=!1}))}updateProfile(t){if(!t.$invalid){if(this.profile.email!==this.stpSession.whoami().email&&!this.displayPasswordValidation)return void(this.displayPasswordValidation=!0);this.displayPasswordValidation=!1,this.ui.profilePending=!0,this.apiService.put(this.stpConfig.api+"/api/account/update-profile",{firstName:this.profile.firstName,lastName:this.profile.lastName,email:this.profile.email,language:this.profile.language,password:this.ui.password_validation}).subscribe(()=>{this.stpSession.fetchFromServerAndRefreshSession().then(()=>{this.Flash.successTranslate("SUCCESS.ACCOUNT.profileUpdated"),this.ui.profilePending=!1}).catch(()=>{this.ui.profilePending=!1})},()=>{this.ui.profilePending=!1})}}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(M.i),e.Y36(m.i),e.Y36(v.s),e.Y36(N.M),e.Y36(f.P))},i.\u0275cmp=e.Xpm({type:i,selectors:[["stpProfile"]],decls:96,vars:103,consts:[[1,"row"],[1,"col-sm-12"],[1,"stp-text-bold","stp-color-red",2,"margin","0px 0px 20px 0px"],[1,"col-sm-6"],[1,"panel","panel-default"],[1,"panel-heading"],[1,"panel-body"],["role","form","name","profF","novalidate","",3,"submit"],["profF",""],[1,"form-group",3,"ngClass"],["for","email"],["type","email","required","","id","email","name","email",1,"form-control",3,"disabled","placeholder","ngModel","ngModelChange"],["class","help-block",4,"ngIf"],["for","firstName"],["type","text","required","","id","firstName","name","firstName",1,"form-control",3,"disabled","placeholder","ngModel","ngModelChange"],["type","text","required","","id","lastName","name","lastName",1,"form-control",3,"disabled","placeholder","ngModel","ngModelChange"],[1,"form-group"],["for","language"],["id","language","name","language",1,"form-control",3,"disabled","ngModel","ngModelChange"],["value","fr"],["value","en"],["type","submit",1,"btn","btn-primary",3,"disabled"],["role","form","name","passF","novalidate","",3,"submit"],["passF",""],["for","actualPassword"],["type","password","required","","id","actualPassword","name","actualPassword",1,"form-control",3,"disabled","placeholder","ngModel","ngModelChange"],["for","newPassword"],["type","password","required","","id","newPassword","name","newPassword",1,"form-control",3,"disabled","placeholder","ngModel","ngModelChange"],["for","newPasswordRepeat"],["type","password","required","","id","newPasswordRepeat","name","newPasswordRepeat",1,"form-control",3,"disabled","placeholder","ngModel","ngModelChange"],["class","text-danger",4,"ngIf"],[1,"stp-grey-modal",3,"dialogTitle","show"],[2,"margin-top","80px"],[1,"text-center"],[1,"form-group","d-flex",2,"flex-wrap","wrap","justify-content","center","margin-top","50px"],[2,"margin-left","15px"],["for","password_validation"],["type","password","id","password_validation",2,"margin-left","15px",3,"ngModel","ngModelChange"],[2,"text-align","center","margin-top","50px","margin-bottom","50px"],[1,"btn","btn-success",3,"click"],[1,"help-block"],[1,"text-danger"]],template:function(t,n){if(1&t){const o=e.EpF();e.TgZ(0,"div",0)(1,"div",1)(2,"h2",2),e._uU(3),e.ALo(4,"transloco"),e.qZA()()(),e.TgZ(5,"div",0)(6,"div",3)(7,"div",4)(8,"div",5)(9,"h4"),e._uU(10),e.ALo(11,"transloco"),e.qZA()(),e.TgZ(12,"div",6)(13,"form",7,8),e.NdJ("submit",function(){e.CHM(o);const l=e.MAs(14);return e.KtG(n.updateProfile(l))}),e.TgZ(15,"div",9)(16,"label",10),e._uU(17),e.ALo(18,"transloco"),e.qZA(),e.TgZ(19,"input",11),e.NdJ("ngModelChange",function(l){return n.profile.email=l}),e.ALo(20,"transloco"),e.qZA(),e.YNc(21,hi,3,3,"span",12),e.qZA(),e.TgZ(22,"div",9)(23,"label",13),e._uU(24),e.ALo(25,"transloco"),e.qZA(),e.TgZ(26,"input",14),e.NdJ("ngModelChange",function(l){return n.profile.firstName=l}),e.ALo(27,"transloco"),e.qZA(),e.YNc(28,fi,3,3,"span",12),e.qZA(),e.TgZ(29,"div",9)(30,"label",13),e._uU(31),e.ALo(32,"transloco"),e.qZA(),e.TgZ(33,"input",15),e.NdJ("ngModelChange",function(l){return n.profile.lastName=l}),e.ALo(34,"transloco"),e.qZA(),e.YNc(35,vi,3,3,"span",12),e.qZA(),e.TgZ(36,"div",16)(37,"label",17),e._uU(38),e.ALo(39,"transloco"),e.qZA(),e.TgZ(40,"select",18),e.NdJ("ngModelChange",function(l){return n.profile.language=l}),e.TgZ(41,"option",19),e._uU(42,"Fran\xe7ais"),e.qZA(),e.TgZ(43,"option",20),e._uU(44,"English"),e.qZA()()(),e.TgZ(45,"button",21),e._uU(46),e.ALo(47,"transloco"),e.qZA()()()()(),e.TgZ(48,"div",3)(49,"div",4)(50,"div",5)(51,"h4"),e._uU(52),e.ALo(53,"transloco"),e.qZA()(),e.TgZ(54,"div",6)(55,"form",22,23),e.NdJ("submit",function(){e.CHM(o);const l=e.MAs(56);return e.KtG(n.updatePassword(l))}),e.TgZ(57,"div",9)(58,"label",24),e._uU(59),e.ALo(60,"transloco"),e.qZA(),e.TgZ(61,"input",25),e.NdJ("ngModelChange",function(l){return n.pass.actualPass=l}),e.ALo(62,"transloco"),e.qZA(),e.YNc(63,Si,3,3,"span",12),e.qZA(),e.TgZ(64,"div",9)(65,"label",26),e._uU(66),e.ALo(67,"transloco"),e.qZA(),e.TgZ(68,"input",27),e.NdJ("ngModelChange",function(l){return n.pass.newPass=l}),e.ALo(69,"transloco"),e.qZA(),e.YNc(70,Ai,3,3,"span",12),e.qZA(),e.TgZ(71,"div",9)(72,"label",28),e._uU(73),e.ALo(74,"transloco"),e.qZA(),e.TgZ(75,"input",29),e.NdJ("ngModelChange",function(l){return n.pass.newPassRepeat=l}),e.ALo(76,"transloco"),e.qZA(),e.YNc(77,Zi,3,3,"span",12),e.qZA(),e.YNc(78,xi,3,3,"p",30),e.TgZ(79,"button",21),e._uU(80),e.ALo(81,"transloco"),e.qZA()()()()()(),e.TgZ(82,"stpModalDialog",31)(83,"div",32)(84,"div",33),e._uU(85),e.ALo(86,"transloco"),e.qZA(),e.TgZ(87,"div",34)(88,"div",35)(89,"label",36),e._uU(90),e.ALo(91,"transloco"),e.qZA()(),e.TgZ(92,"input",37),e.NdJ("ngModelChange",function(l){return n.ui.password_validation=l}),e.qZA()()(),e.TgZ(93,"div",38)(94,"button",39),e.NdJ("click",function(){e.CHM(o);const l=e.MAs(14);return e.KtG(n.updateProfile(l))}),e._uU(95," Valider "),e.qZA()()()}if(2&t){const o=e.MAs(14),s=e.MAs(56);
1e.xp6(3),e.Oqu(e.lcZ(4,51,"PROFILE_PASSWORD")),e.xp6(7),e.Oqu(e.lcZ(11,53,"MODIF_INFOS")),e.xp6(5),e.Q6J("ngClass",e.VKq(91,k,o.email.$dirty&&o.email.$invalid)),e.xp6(2),e.Oqu(e.lcZ(18,55,"EMAIL")),e.xp6(2),e.s9C("placeholder",e.lcZ(20,57,"EMAIL")),e.Q6J("disabled",n.ui.profilePending)("ngModel",n.profile.email),e.xp6(2),e.Q6J("ngIf",o.email.$dirty&&o.email.$error.required),e.xp6(1),e.Q6J("ngClass",e.VKq(93,k,o.firstName.$dirty&&o.firstName.$invalid)),e.xp6(2),e.Oqu(e.lcZ(25,59,"FIRSTNAME")),e.xp6(2),e.s9C("placeholder",e.lcZ(27,61,"FIRSTNAME")),e.Q6J("disabled",n.ui.profilePending)("ngModel",n.profile.firstName),e.xp6(2),e.Q6J("ngIf",o.firstName.$dirty&&o.firstName.$error.required),e.xp6(1),e.Q6J("ngClass",e.VKq(95,k,o.lastName.$dirty&&o.lastName.$invalid)),e.xp6(2),e.Oqu(e.lcZ(32,63,"LASTNAME")),e.xp6(2),e.s9C("placeholder",e.lcZ(34,65,"LASTNAME")),e.Q6J("disabled",n.ui.profilePending)("ngModel",n.profile.lastName),e.xp6(2),e.Q6J("ngIf",o.lastName.$dirty&&o.lastName.$error.required),e.xp6(3),e.Oqu(e.lcZ(39,67,"PREFERRED_LANGUAGE")),e.xp6(2),e.Q6J("disabled",n.ui.profilePending)("ngModel",n.profile.language),e.xp6(5),e.Q6J("disabled",o.$invalid||n.ui.profilePending),e.xp6(1),e.hij(" ",e.lcZ(47,69,"MODIF_INFOS")," "),e.xp6(6),e.Oqu(e.lcZ(53,71,"MODIF_PASSWORD")),e.xp6(5),e.Q6J("ngClass",e.VKq(97,k,s.actualPassword.$dirty&&s.actualPassword.$invalid)),e.xp6(2),e.Oqu(e.lcZ(60,73,"ACTUAL_PASSWORD")),e.xp6(2),e.s9C("placeholder",e.lcZ(62,75,"ACTUAL_PASSWORD")),e.Q6J("disabled",n.ui.passwordPending)("ngModel",n.pass.actualPass),e.xp6(2),e.Q6J("ngIf",s.actualPassword.$dirty&&s.actualPassword.$error.required),e.xp6(1),e.Q6J("ngClass",e.VKq(99,k,s.newPassword.$dirty&&s.newPassword.$invalid)),e.xp6(2),e.Oqu(e.lcZ(67,77,"NEW_PASSWORD")),e.xp6(2),e.s9C("placeholder",e.lcZ(69,79,"NEW_PASSWORD")),e.Q6J("disabled",n.ui.passwordPending)("ngModel",n.pass.newPass),e.xp6(2),e.Q6J("ngIf",s.newPassword.$dirty&&s.newPassword.$error.required),e.xp6(1),e.Q6J("ngClass",e.VKq(101,k,s.newPasswordRepeat.$dirty&&s.newPasswordRepeat.$invalid)),e.xp6(2),e.Oqu(e.lcZ(74,81,"NEW_PASSWORD_REPEAT")),e.xp6(2),e.s9C("placeholder",e.lcZ(76,83,"NEW_PASSWORD_REPEAT")),e.Q6J("disabled",n.ui.passwordPending)("ngModel",n.pass.newPassRepeat),e.xp6(2),e.Q6J("ngIf",s.newPasswordRepeat.$dirty&&s.newPasswordRepeat.$error.required),e.xp6(1),e.Q6J("ngIf",s.newPasswordRepeat.$dirty&&s.newPassword.$dirty&&n.pass.newPass!==n.pass.newPassRepeat),e.xp6(1),e.Q6J("disabled",s.$invalid||n.pass.newPass!==n.pass.newPassRepeat||n.ui.passwordPending),e.xp6(1),e.hij(" ",e.lcZ(81,85,"MODIF_PASSWORD")," "),e.xp6(2),e.Q6J("show",n.displayPasswordValidation),e.xp6(3),e.Oqu(e.lcZ(86,87,"EMAIL_EDIT_PASSWORD")),e.xp6(5),e.Oqu(e.l
1cZ(91,89,"PASSWORD")),e.xp6(2),e.Q6J("ngModel",n.ui.password_validation)}},dependencies:[p.mk,p.O5,r._Y,r.YN,r.Kr,r.Fj,r.EJ,r.JJ,r.JL,r.Q7,r.On,r.F,G.Z,h.Ot],encapsulation:2}),i})();function bi(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"button",35),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.changeTab("abo"))}),e._uU(1),e.ALo(2,"transloco"),e.qZA()}if(2&i){const t=e.oxw();e.Q6J("ngClass","abo"===t.tabActive?"stp-button-red":"stp-button-white"),e.xp6(1),e.Oqu(e.lcZ(2,2,"SUBSCRIPTIONS"))}}function Ci(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"button",35),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.changeTab("profil"))}),e._uU(1),e.ALo(2,"transloco"),e.qZA()}if(2&i){const t=e.oxw();e.Q6J("ngClass","profil"===t.tabActive?"stp-button-red":"stp-button-white"),e.xp6(1),e.Oqu(e.lcZ(2,2,"PROFILE_PASSWORD"))}}function Ni(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"button",35),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.changeTab("classes"))}),e._uU(1,"Classes "),e.qZA()}if(2&i){const t=e.oxw();e.Q6J("ngClass","classes"===t.tabActive?"stp-button-red":"stp-button-white")}}function Mi(i,a){if(1&i){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",4)(2,"button",35),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.changeTab("config"))}),e._uU(3),e.ALo(4,"transloco"),e.qZA()(),e.BQk()}if(2&i){const t=e.oxw();e.xp6(2),e.Q6J("ngClass","config"===t.tabActive?"stp-button-red":"stp-button-white"),e.xp6(1),e.Oqu(e.lcZ(4,2,"SETTINGS"))}}function Li(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"button",35),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.changeTab("usage"))}),e._uU(1,"Conditions d'usage "),e.qZA()}if(2&i){const t=e.oxw();e.Q6J("ngClass","usage"===t.tabActive?"stp-button-red":"stp-button-white")}}function yi(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"a",36),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.logout())}),e._UZ(1,"i",37),e._uU(2),e.ALo(3,"transloco"),e.qZA()}2&i&&(e.xp6(2),e.hij(" ",e.lcZ(3,1,"LOGOUT")," "))}function Pi(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"a",36),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.refreshSession())}),e._UZ(1,"i",38),e._uU(2),e.ALo(3,"transloco"),e.qZA()}2&i&&(e.xp6(2),e.hij(" ",e.lcZ(3,1,"REFRESH")," "))}function qi(i,a){if(1&i&&(e.TgZ(0,"a",39),e._UZ(1,"i",40),e._uU(2),e.ALo(3,"transloco"),e.qZA()),2&i){const t=e.oxw();e.Q6J("uiSref",t.stpLangageService.langPrefix+"biblioAdherCreated"),e.xp6(2),e.hij(" ",e.lcZ(3,2,"STATISTICS")," ")}}function Ei(i,a){if(1&i&&(e.TgZ(0,"a",39),e._UZ(1,"i",40),e._uU(2),e.ALo(3,"transloco"),e.qZA()),2&i){const t=e.oxw();e.Q6J("uiSref",t.stpLangageService.langPrefix+"publisherReporting"),e.xp6(2),e.hij(" ",e.lcZ(3,2,"STATISTICS")," ")}}function Oi(i,a){if(1&i&&(e.TgZ(0,"div",44)(1,"span",45),e._uU(2,"\xc9chelle de police (accessibilit\xe9) :"),e.qZA(),e._uU(3),e.qZA()),2&i){const t=e.oxw(2);e.xp6(3),e.hij(" ",t.fontScaleDisplay," ")}}function Ii(i,a){if(1&i&&(e.TgZ(0,"div",46),e._uU(1),e._UZ(2,"br"),e._uU(3),e.qZA()),2&i){const t=e.oxw(2);e.xp6(1),e.AsE(" ",t.profile.firstName," ",t.profile.lastName," "),e.xp6(2),e.hij(" ",t.profile.email," ")}}function Ui(i,a){1&i&&(e.TgZ(0,"div")(1,"p"),e._uU(2),e.ALo(3,"transloco"),e.qZA(),e.TgZ(4,"p"),e._uU(5),e.ALo(6,"transloco"),e.qZA()()),2&i&&(e.xp6(2),e.hij(" ",e.lcZ(3,2,"YOUR_STARTED_DID_NOT_FINISH_SUBSCRIPTION01")," "),e.xp6(3),e.hij(" ",e.lcZ(6,4,"YOUR_STARTED_DID_NOT_FINISH_SUBSCRIPTION02")," "))}function wi(i,a){1&i&&(e.TgZ(0,"div")(1,"p"),e._uU(2),e.ALo(3,"transloco"),e.qZA(),e.TgZ(4,"p"),e._uU(5),e.ALo(6,"transloco"),e.qZA(),e.TgZ(7,"p"),e._uU(8),e.ALo(9,"transloco"),e.TgZ(10,"a",47),e._uU(11,"[email protected]"),e.qZA()()()),2&i&&(e.xp6(2),e.hij(" ",e.lcZ(3,3,"YOU_ARE_SCHOOLFREE01")," "),e.xp6(3),e.hij(" ",e.lcZ(6,5,"YOU_ARE_SCHOOLFREE02")," "),e.xp6(3),e.hij(" ",e.lcZ(9,7,"WRITE_TO_US_AT")," "))}function Ji(i,a){1&i&&(e.TgZ(0,"div")(1,"p",48),e._uU(2),e.ALo(3,"transloco"),e.ALo(4,"transloco"),e.ALo(5,"transloco"),e.qZA()()),2&i&&(e.xp6(2),e.lnq(" ",e.lcZ(3,3,"YOU_ARE_SCHOOL_ADMIN01"),". ",e.lcZ(4,5,"YOU_ARE_SCHOOL_ADMIN02"),". ",e.lcZ(5,7,"SCHOOL_ADMIN_CLIC_ON_CLASS"),". "))}function Ri(i,a){1&i&&(e.ynx(0),e.TgZ(1,"p",48),e._uU(2),e.ALo(3,"transloco"),e.TgZ(4,"a",49),e._uU(5),e.ALo(6,"transloco"),e.qZA()(),e.BQk()),2&i&&(e.xp6(2),e.hij(" ",e.lcZ(3,3,"YOU_ARE_TEACHER04")," "),e.xp6(2),e.Q6J("href","/blog/espace-de-lenseignant-gestion-comptes-eleves",e.LSH),e.xp6(1),e.Oqu(e.l
1cZ(6,5,"CLICK_HERE")))}function Yi(i,a){1&i&&(e.ynx(0),e.TgZ(1,"p",48),e._uU(2),e.ALo(3,"transloco"),e.qZA(),e.BQk()),2&i&&(e.xp6(2),e.hij(" ",e.lcZ(3,1,"YOU_ARE_TEACHER_ONAPP_01")," "))}function Fi(i,a){if(1&i&&(e.TgZ(0,"div")(1,"p",48),e._uU(2),e.ALo(3,"transloco"),e.ALo(4,"transloco"),e.ALo(5,"transloco"),e.ALo(6,"transloco"),e.ALo(7,"date"),e.ALo(8,"transloco"),e.ALo(9,"transloco"),e.qZA(),e.YNc(10,Ri,7,7,"ng-container",7),e.YNc(11,Yi,4,3,"ng-container",7),e.qZA()),2&i){const t=e.oxw(2);e.xp6(2),e.qoO([" ",e.lcZ(3,11,"YOU_ARE_TEACHER01"),", ",e.lcZ(4,13,"LINKED_TO_ACCOUNT")," ",t.stpSession.whoami().masterEmail," ",e.lcZ(5,15,"FROM_SCHOOL")," ",t.stpSession.whoami().masterSchoolName||t.stpSession.whoami().schoolName,", ",e.lcZ(6,17,t.subSchoolActiveString())," ",e.xi3(7,19,t.schoolExpiredDate(),"dd/MM/yyyy")," . ",e.lcZ(8,22,"YOU_ARE_TEACHER02")," . ",e.lcZ(9,24,"YOU_ARE_TEACHER03"),". "]),e.xp6(8),e.Q6J("ngIf",!t.stpSession.isWebApp()),e.xp6(1),e.Q6J("ngIf",t.stpSession.isWebApp())}}function ki(i,a){1&i&&(e.TgZ(0,"div"),e._UZ(1,"stpParagrapheEducation")(2,"stpParagrapheAideEnLigne"),e.qZA())}function Di(i,a){if(1&i&&(e.ynx(0),e.YNc(1,ki,3,0,"div",7),e.BQk()),2&i){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",t.stpSession.isSchoolMaster()||t.stpSession.hasRallyeAccess()&&!t.stpSession.isLflPartner())}}function Qi(i,a){1&i&&(e.TgZ(0,"div"),e._UZ(1,"stpParagrapheLflIntro"),e.TgZ(2,"div",2)(3,"div",50),e._UZ(4,"stpParagrapheLflAboFamille"),e.qZA(),e.TgZ(5,"div",3),e._UZ(6,"br")(7,"img",51),e.qZA()(),e.TgZ(8,"div",2)(9,"div",50),e._UZ(10,"stpParagrapheLflAboSchool"),e.qZA(),e.TgZ(11,"div",3),e._UZ(12,"br")(13,"img",52),e.qZA()()())}function Gi(i,a){1&i&&(e.TgZ(0,"div")(1,"p"),e._uU(2),e.ALo(3,"transloco"),e.qZA(),e.TgZ(4,"p"),e._uU(5),e.ALo(6,"transloco"),e.ALo(7,"transloco"),e.TgZ(8,"a",53),e._uU(9,"[email protected]"),e.qZA(),e._uU(10,". "),e.qZA()()),2&i&&(e.xp6(2),e.hij(" ",e.lcZ(3,3,"YOU_ARE_BIBLIO01")," "),e.xp6(3),e.AsE(" ",e.lcZ(6,5,"TO_SUBSCRIBE"),", ",e.lcZ(7,7,"WRITE_TO_US_AT")," "))}function ji(i,a){1&i&&(e.TgZ(0,"div")(1,"p"),e._uU(2),e.ALo(3,"transloco"),e.TgZ(4,"u"),e._uU(5),e.ALo(6,"transloco"),e.qZA()(),e.TgZ(7,"p"),e._uU(8),e.ALo(9,"transloco"),e.qZA(),e.TgZ(10,"p"),e._uU(11),e.ALo(12,"transloco"),e.qZA()()),2&i&&(e.xp6(2),e.hij(" ",e.lcZ(3,4,"YOU_ARE_STUDENT_IN_SCHOOL01")," "),e.xp6(3),e.hij("",e.lcZ(6,6,"IN_SCHOOL_WALLS"),"."),e.xp6(3),e.hij(" ",e.lcZ(9,8,"YOU_ARE_STUDENT_IN_SCHOOL02")," "),e.xp6(3),e.hij(" ",e.lcZ(12,10,"THANKS")," ! "))}function Hi(i,a){if(1&i&&(e.TgZ(0,"div")(1,"a",54),e._uU(2),e.ALo(3,"transloco"),e.qZA()()),2&i){const t=e.oxw(3);e.xp6(1),e.Q6J("uiSref",t.stpLangageService.langPrefix+"subscribe"),e.xp6(1),e.hij(" ",e.lcZ(3,2,"KNOW_MORE_ABOUT_FAMILY_SUBSCRIPTION")," ")}}function Bi(i,a){if(1&i&&(e.TgZ(0,"div")(1,"p"),e._uU(2),e.ALo(3,"transloco"),e.TgZ(4,"u"),e._uU(5),e.ALo(6,"transloco"),e.qZA()(),e.TgZ(7,"p"),e._uU(8),e.ALo(9,"transloco"),e.qZA(),e.TgZ(10,"p"),e._uU(11),e.ALo(12,"transloco"),e.qZA(),e.TgZ(13,"p"),e._uU(14),e.ALo(15,"transloco"),e.qZA(),e.YNc(16,Hi,4,4,"div",7),e.qZA()),2&i){const t=e.oxw(2);e.xp6(2),e.hij(" ",e.lcZ(3,6,"YOU_ARE_STUDENT_OUT_OF_SCHOOL01")," "),e.xp6(3),e.hij("",e.lcZ(6,8,"OUT_SCHOOL_WALLS"),"."),e.xp6(3),e.hij(" ",e.lcZ(9,10,"YOU_ARE_STUDENT_OUT_OF_SCHOOL02")," "),e.xp6(3),e.hij(" ",e.lcZ(12,12,"YOU_ARE_STUDENT_OUT_OF_SCHOOL02BIS")," "),e.xp6(3),e.hij(" ",e.lcZ(15,14,"YOU_ARE_STUDENT_OUT_OF_SCHOOL03")," "),e.xp6(2),e.Q6J("ngIf",t.stpSession.isWebSession())}}function Ki(i,a){if(1&i&&(e.TgZ(0,"p"),e._uU(1),e.ALo(2,"transloco"),e.TgZ(3,"strong"),e._uU(4),e.qZA(),e._uU(5,". "),e.qZA()),2&i){const t=e.oxw(3);e.xp6(1),e.hij(" ",e.lcZ(2,2,"ADHER_EXPL_1")," "),e.xp6(3),e.Oqu(t.stpSession.masterLabelForAdher())}}function Wi(i,a){if(1&i&&(e.TgZ(0,"p"),e._uU(1),e.ALo(2,"transloco"),e.TgZ(3,"strong"),e._uU(4),e.qZA(),e._uU(5,". "),e.qZA()),2&i){const t=e.oxw(3);e.xp6(1),e.hij(" ",e.lcZ(2,2,"ADHER_EXPL_1")," "),e.xp6(3),e.Oqu(t.stpSession.masterSchoolName())}}function $i(i,a){if(1&i&&(e.TgZ(0,"div",58)(1,"p")(2,"strong"),e._uU(3),e.ALo(4,"transloco"),e.qZA()(),e.TgZ(5,"p")(6,"strong"),e._uU(7,"email:"),e.qZA(),e._uU(8),e.qZA(),e.TgZ(9,"p")(10,"strong"),e._uU(11,"mot de passe:"),e.qZA(),e._uU(12),e.qZA()()),2&i){const t=e.oxw(3);
1e.xp6(3),e.Oqu(e.lcZ(4,3,"ADHER_EXPL_6")),e.xp6(5),e.hij(" ",t.stpSession.userAppEmail(),""),e.xp6(4),e.hij(" ",t.stpSession.userAppPassword(),"")}}function zi(i,a){1&i&&(e.TgZ(0,"p",59),e._uU(1," (Le compte actif est un compte recovery sso) "),e.qZA())}function Vi(i,a){if(1&i&&(e.TgZ(0,"div"),e.YNc(1,Ki,6,4,"p",7),e.YNc(2,Wi,6,4,"p",7),e.TgZ(3,"p"),e._uU(4),e.ALo(5,"transloco"),e.qZA(),e._UZ(6,"p",55),e.ALo(7,"transloco"),e.TgZ(8,"p"),e._uU(9),e.ALo(10,"transloco"),e.qZA(),e.TgZ(11,"p"),e._uU(12),e.ALo(13,"transloco"),e.qZA(),e.TgZ(14,"p"),e._uU(15),e.ALo(16,"transloco"),e.qZA(),e.YNc(17,$i,13,5,"div",56),e._UZ(18,"br")(19,"p",55),e.ALo(20,"transloco"),e.YNc(21,zi,2,0,"p",57),e.qZA()),2&i){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",t.stpSession.masterLabelForAdher()),e.xp6(1),e.Q6J("ngIf",!t.stpSession.masterLabelForAdher()),e.xp6(2),e.hij(" ",e.lcZ(5,10,"ADHER_EXPL_2")," "),e.xp6(2),e.Q6J("innerHTML",e.lcZ(7,12,"ADHER_EXPL_3"),e.oJD),e.xp6(3),e.hij(" ",e.lcZ(10,14,"ADHER_EXPL_4")," "),e.xp6(3),e.hij(" ",e.lcZ(13,16,"ADHER_EXPL_SCREENLESS")," "),e.xp6(3),e.hij(" ",e.lcZ(16,18,"ADHER_EXPL_5")," "),e.xp6(2),e.Q6J("ngIf",t.stpSession.userAppEmail()),e.xp6(2),e.Q6J("innerHTML",e.lcZ(20,20,"ADHER_EXPL_7"),e.oJD),e.xp6(2),e.Q6J("ngIf",t.stpSession.isSSOErrorAccount())}}function Xi(i,a){if(1&i&&(e.TgZ(0,"div")(1,"h2",41),e._uU(2," Informations "),e.qZA(),e.YNc(3,Oi,4,1,"div",42),e.YNc(4,Ii,4,3,"div",43),e.YNc(5,Ui,7,6,"div",7),e.YNc(6,wi,12,9,"div",7),e.YNc(7,Ji,6,9,"div",7),e.YNc(8,Fi,12,26,"div",7),e.YNc(9,Di,2,1,"ng-container",7),e.YNc(10,Qi,14,0,"div",7),e.YNc(11,Gi,11,9,"div",7),e.YNc(12,ji,13,12,"div",7),e.YNc(13,Bi,17,16,"div",7),e.YNc(14,Vi,22,22,"div",7),e.qZA()),2&i){const t=e.oxw();e.xp6(3),e.Q6J("ngIf",t.stpSession.isWebApp()),e.xp6(1),e.Q6J("ngIf",!t.stpSession.isRallyeStudent()&&!t.stpSession.isAdher()&&!t.stpSession.isLflPartner()),e.xp6(1),e.Q6J("ngIf",t.stpSession.isUserWhoStartedButNotFinishedSubscription()),e.xp6(1),e.Q6J("ngIf",!t.stpSession.isGar()&&t.stpSession.isSchoolFree()),e.xp6(1),e.Q6J("ngIf",!t.stpSession.isGar()&&t.stpSession.isSchoolMaster()),e.xp6(1),e.Q6J("ngIf",!t.stpSession.isGar()&&t.stpSession.hasRallyeAccess()&&!t.stpSession.isLflPartner()),e.xp6(1),e.Q6J("ngIf",!t.stpSession.isGar()&&!t.stpSession.isWebApp()),e.xp6(1),e.Q6J("ngIf",t.stpSession.isLflPartner()),e.xp6(1),e.Q6J("ngIf",t.stpSession.isMediatheque()),e.xp6(1),e.Q6J("ngIf",t.stpSession.isRallyeStudent()&&t.stpSession.isInSchool()),e.xp6(1),e.Q6J("ngIf",!t.stpSession.isGar()&&t.stpSession.isRallyeStudent()&&!t.stpSession.isInSchool()),e.xp6(1),e.Q6J("ngIf",t.stpSession.isAdher())}}function en(i,a){1&i&&(e.TgZ(0,"div"),e._uU(1),e.ALo(2,"transloco"),e.qZA()),2&i&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"LOADING_SUBSCRIPTION"),"... "))}function tn(i,a){if(1&i&&(e.TgZ(0,"p"),e._uU(1),e.ALo(2,"transloco"),e.TgZ(3,"strong"),e._uU(4),e.ALo(5,"date"),e.qZA(),e._uU(6,". "),e.qZA()),2&i){const t=e.oxw(4);e.xp6(1),e.hij(" ",e.lcZ(2,2,"YOUR_TRIAL_WILL_EXPIRE")," "),e.xp6(3),e.Oqu(e.xi3(5,4,t.stpSession.expirationDate(),"dd/MM/yyyy"))}}function nn(i,a){1&i&&(e.TgZ(0,"div")(1,"p"),e._uU(2),e.ALo(3,"transloco"),e.qZA(),e.TgZ(4,"p"),e._uU(5),e.ALo(6,"transloco"),e.qZA()()),2&i&&(e.xp6(2),e.hij(" ",e.lcZ(3,2,"YOUR_STARTED_DID_NOT_FINISH_SUBSCRIPTION01")," "),e.xp6(3),e.hij(" ",e.lcZ(6,4,"YOUR_STARTED_DID_NOT_FINISH_SUBSCRIPTION02")," "))}function on(i,a){if(1&i&&(e.TgZ(0,"p"),e._uU(1),e.ALo(2,"transloco"),e.TgZ(3,"strong"),e._uU(4),e.ALo(5,"date"),e.qZA(),e._uU(6,". "),e.qZA()),2&i){const t=e.oxw(4);e.xp6(1),e.hij(" ",e.lcZ(2,2,"YOUR_TRIAL_HAS_EXPIRED")," "),e.xp6(3),e.Oqu(e.xi3(5,4,t.stpSession.expirationDate(),"dd/MM/yyyy"))}}function sn(i,a){if(1&i&&(e.TgZ(0,"p"),e._uU(1),e.ALo(2,"transloco"),e.TgZ(3,"strong"),e._uU(4),e.qZA(),e._uU(5,". "),e._UZ(6,"br"),e._uU(7),e.ALo(8,"transloco"),e.TgZ(9,"strong"),e._uU(10),e.ALo(11,"date"),e.qZA(),e._uU(12,". "),e.qZA()),2&i){const t=e.oxw(5);e.xp6(1),e.hij(" ",e.lcZ(2,4,"YOU_HAVE_A_SUBSCRIPTION")," "),e.xp6(3),e.Oqu(t.profile.subscription.plan.name),e.xp6(3),e.hij(" ",e.lcZ(8,6,"YOUR_SUBSCRIPTION_WILL_EXPIRE")," "),e.xp6(3),e.Oqu(e.xi3(11,8,t.profile.subscription.endDate,"dd/MM/yyyy"))}}function an(i,a){if(1&i&&(e.TgZ(0,"p"),e._uU(1),e.ALo(2,"transloco"),e.TgZ(3,"strong"),e._uU(4),e.qZA(),e._uU(5,". "),e._UZ(6,"br"),e._uU(7),e.ALo(8,"transloco"),e.TgZ(9,"strong"),e._uU(10),e.ALo(11,"date"),e.qZA(),e._uU(12,". "),e.qZA()),2&i){const t=e.oxw(5);e.xp6(1),e.hij(" ",e.lcZ(2,4,"YOU_HAD_A_SUBSCRIPTION")," "),e.xp6(3),e.Oqu(t.profile.subscription.plan.name),e.xp6(3),e.hij(" ",e.lcZ(8,6,"YOUR_SUBSCRIPTION_EXPIRED")," "),e.xp6(3),e.Oqu(e.xi3(11,8,t.profile.subscription.endDate,"dd/MM/yyyy"))}}function rn(i,a){if(1&i&&(e.TgZ(0,"div"),e._uU(1),e.ALo(2,"transloco"),e.TgZ(3,"strong"),e._uU(4),e.ALo(5,"date"),e.qZA(),e._uU(6,". "),e.qZA()),2&i){const t=e.oxw(6);e.xp6(1),e.hij(" ",e.lcZ(2,2,"YOUR_SUBSCRIPTION_WILL_EXPIRE")," "),e.xp6(3),e.Oqu(e.xi3(5,4,t.profile.subscription.endDate,"dd/MM/yyyy"))}}function ln(i,a){if(1&i&&(e.TgZ(0,"div"),e._uU(1),e.ALo(2,"transloco"),e.ALo(3,"number"),e.ALo(4,"transloco"),e.TgZ(5,"strong"),e._uU(6),e.ALo(7,"date"),e.qZA(),e._uU(8,". "),e.qZA()),2&i){const t=e.oxw(6);e.xp6(1),e.lnq(" ",e.lcZ(2,4,"YOUR_SUBSCRIPTION_WILL_RENEW_AUTOMATICALLY")," ",e.lcZ(3,6,t.profile.subscription.plan.price/100)," \u20ac ",e.lcZ(4,8,"ON")," "),e.xp6(5),e.Oqu(e.xi3(7,10,t.getNextDebitDate(t.profile.subscription.startDate),"dd/MM/yyyy"))}}function cn(i,a){if(1&i&&(e.TgZ(0,"div"),e._uU(1),e.ALo(2,"transloco"),e.TgZ(3,"strong"),e._uU(4),e.qZA(),e._uU(5),e.ALo(6,"transloco"),e.TgZ(7,"strong"),e._uU(8),e.ALo(9,"date"),e.qZA(),e._uU(10,". "),e._UZ(11,"br"),e.YNc(12,rn,7,7,"div",7),e.YNc(13,ln,9,13,"div",7),e.qZA()),2&i){const t=e.oxw(5);e.xp6(1),e.hij(" ",e.lcZ(2,6,"YOU_HAVE_A_SUBSCRIPTION")," "),e.xp6(3),e.Oqu(t.profile.subscription.plan.name),e.xp6(1),e.hij(" ",e.lcZ(6,8,"SINCE")," "),e.xp6(3),e.Oqu(e.xi3(9,10,t.profile.subscription.startDate,"dd/MM/yyyy")),e.xp6(4),e.Q6J("ngIf",t.profile.subscription.endDate),e.xp6(1),e.Q6J("ngIf",!t.profile.subscription.endDate)}}function pn(i,a){if(1&i&&(e.TgZ(0,"div"),e._uU(1),e.ALo(2,"transloco"),e.TgZ(3,"strong"),e._uU(4),e.qZA(),e._uU(5),e.ALo(6,"transloco"),e.TgZ(7,"strong"),e._uU(8),e.ALo(9,"date"),e.qZA(),e._uU(10,". "),e._UZ(11,"br"),e._uU(12),e.ALo(13,"transloco"),e.TgZ(14,"strong"),e._uU(15),e.ALo(16,"date"),e.qZA(),e._uU(17,". "),e.qZA()),2&i){const t=e.oxw(5);e.xp6(1),e.hij(" ",e.lcZ(2,6,"YOU_HAD_A_SUBSCRIPTION")," "),e.xp6(3),e.Oqu(t.profile.subscription.plan.name),e.xp6(1),e.hij(" ",e.lcZ(6,8,"SINCE")," "),e.xp6(3),e.Oqu(e.xi3(9,10,t.profile.subscription.startDate,"dd/MM/yyyy")),e.xp6(4),e.hij(" ",e.lcZ(13,13,"YOUR_SUBSCRIPTION_EXPIRED")," "),e.xp6(3),e.Oqu(e.xi3(16,15,t.profile.subscription.endDate,"dd/MM/yyyy"))}}function dn(i,a){if(1&i&&(e.TgZ(0,"div",64),e.YNc(1,sn,13,11,"p",7),e.YNc(2,an,13,11,"p",7),e.YNc(3,cn,14,13,"div",7),e.YNc(4,pn,18,18,"div",7),e.qZA()),2&i){const t=e.oxw(4);e.xp6(1),e.Q6J("ngIf","PDD"===t.profile.subscription.plan.type&&!t.stpSession.isSubscriptionHasExpired()),e.xp6(1),e.Q6J("ngIf","PDD"===t.profile.subscription.plan.type&&t.stpSession.isSubscriptionHasExpired()),e.xp6(1),e.Q6J("ngIf","PDI"===t.profile.subscription.plan.type&&!t.stpSession.isSubscriptionHasExpired()),e.xp6(1),e.Q6J("ngIf","PDI"===t.profile.subscription.plan.type&&t.stpSession.isSubscriptionHasExpired())}}function un(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"button",68),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(6);return e.KtG(o.ui.resiliation.active=!0)}),e._uU(1),e.ALo(2,"transloco"),e.qZA()}2&i&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"END_MY_SUBSCRIPTION")," "))}function gn(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div")(1,"div",69),e._uU(2),e.ALo(3,"transloco"),e.TgZ(4,"a",70),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(6);return e.KtG(o.unsubscribe())}),e._uU(5," Oui "),e.qZA(),e.TgZ(6,"a",70),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(6);return e.KtG(o.ui.resiliation.active=!1)}),e._uU(7," Non "),e.qZA()()()}2&i&&(e.xp6(2),e.hij(" ",e.lcZ(3,1,"ARE_YOU_SURE_YOU_WANT_TO_RESILIATE")," "))}function _n(i,a){1&i&&(e.TgZ(0,"p",71),e._uU(1),e.ALo(2,"transloco"),e.qZA()),2&i&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"RESILIATION"),"... "))}function mn(i,a){if(1&i&&(e.TgZ(0,"div"),e.YNc(1,un,3,3,"button",65),e._uU(2," \xa0 "),e.TgZ(3,"button",66),e._uU(4),e.ALo(5,"transloco"),e.qZA(),e.YNc(6,gn,8,3,"div",7),e.YNc(7,_n,3,3,"p",67),e.qZA()),2&i){const t=e.oxw(5);e.xp6(1),e.Q6J("ngIf",!t.ui.resiliation.active),e.xp6(2),e.Q6J("uiSref",t.stpLangageService.langPrefix+"subscribe"),e.xp6(1),e.hij(" ",e.lcZ(5,5,"CHANGE_MY_SUBSCRIPTION")," "),e.xp6(2),e.Q6J("ngIf",t.ui.resiliation.active&&!t.ui.resiliation.pending),e.xp6(1),e.Q6J("ngIf",!!t.ui.resiliation.pending)}}function hn(i,a){if(1&i&&(e.ynx(0),e.YNc(1,mn,8,7,"div",7),e.BQk()),2&i){const t=e.oxw(4);e.xp6(1),e.Q6J("ngIf",!!t.profile.subscription&&!t.profile.subscription.endDate)}}function fn(i,a){1&i&&(e.TgZ(0,"div",62)(1,"p"),e._uU(2),e.ALo(3,"transloco"),e.qZA()()),2&i&&(e.xp6(2),e.hij(" ",e.lcZ(3,1,"YOUR_SUBSCRIPTION_IS_EXPIRING_YEARLY")," "))}function vn(i,a){1&i&&(e.TgZ(0,"div",62)(1,"p"),e._uU(2),e.ALo(3,"transloco"),e.qZA()()),2&i&&(e.xp6(2),e.hij(" ",e.lcZ(3,1,"YOUR_SUBSCRIPTION_IS_EXPIRING_MONTHLY")," "))}function Sn(i,a){if(1&i&&(e.TgZ(0,"a",66),e._uU(1),e.ALo(2,"transloco"),e.qZA()),2&i){const t=e.oxw(6);e.Q6J("uiSref",t.stpLangageService.langPrefix+"subscribe"),e.xp6(1),e.hij(" ",e.lcZ(2,2,"I_SUBSCRIBE_BEFORE_EXPIRATION")," ")}}const An=function(i,a){return{plan:i,quantity:a}};function Zn(i,a){if(1&i&&(e.TgZ(0,"a",75),e._uU(1),e.ALo(2,"transloco"),e.qZA()),2&i){const t=e.oxw(6);e.Q6J("uiSref",t.stpLangageService.langPrefix+"payment")("uiParams",e.WLB(5,An,t.stpSession.getCurrentSubscriptionPlanStripeId(),t.stpSession.getMaximumNumberOfClasses())),e.xp6(1),e.hij(" ",e.lcZ(2,3,"I_SUBSCRIBE_BEFORE_EXPIRATION")," ")}}function xn(i,a){if(1&i&&(e.TgZ(0,"div"),e._UZ(1,"hr"),e.YNc(2,fn,4,3,"div",73),e.YNc(3,vn,4,3,"div",73),e.YNc(4,Sn,3,4,"a",72),e.YNc(5,Zn,3,8,"a",74),e.qZA()),2&i){const t=e.oxw(5);e.xp6(2),e.Q6J("ngIf",!(!t.profile.subscription||"PDD"!==t.profile.subscription.plan.type||t.profile.subscription.isTrial||t.isExpirated()||t.stpSession.isSchoolMaster()
1)),e.xp6(1),e.Q6J("ngIf",!(!t.profile.subscription||"PDI"!==t.profile.subscription.plan.type||t.profile.subscription.isTrial||t.isExpirated()||t.stpSession.isSchoolMaster())),e.xp6(1),e.Q6J("ngIf",!(!t.profile.subscription||t.profile.subscription.isTrial||t.isExpirated()||t.stpSession.isSchoolMaster())),e.xp6(1),e.Q6J("ngIf",!!t.profile.subscription&&!t.profile.subscription.isTrial&&!t.isExpirated()&&t.stpSession.isSchoolMaster()&&t.stpSession.isSchoolSubscription())}}function Tn(i,a){if(1&i&&(e.TgZ(0,"a",66),e._uU(1),e.ALo(2,"transloco"),e.qZA()),2&i){const t=e.oxw(5);e.Q6J("uiSref",t.stpLangageService.langPrefix+"educationPrices"),e.xp6(1),e.hij(" ",e.lcZ(2,2,"I_SUBSCRIBE")," ")}}function bn(i,a){if(1&i&&(e.TgZ(0,"a",66),e._uU(1),e.ALo(2,"transloco"),e.qZA()),2&i){const t=e.oxw(5);e.Q6J("uiSref",t.stpLangageService.langPrefix+"subscribe"),e.xp6(1),e.hij(" ",e.lcZ(2,2,"I_SUBSCRIBE")," ")}}function Cn(i,a){if(1&i&&(e.ynx(0),e.YNc(1,xn,6,4,"div",7),e.YNc(2,Tn,3,4,"a",72),e.YNc(3,bn,3,4,"a",72),e.BQk()),2&i){const t=e.oxw(4);e.xp6(1),e.Q6J("ngIf",t.stpSession.isSubscriptionWillExpireNextMonth()),e.xp6(1),e.Q6J("ngIf",(!!t.profile.subscription&&t.profile.subscription.isTrial||t.isExpirated())&&t.stpSession.isSchoolPremium()),e.xp6(1),e.Q6J("ngIf",(!!t.profile.subscription&&t.profile.subscription.isTrial||t.isExpirated())&&!t.stpSession.isSchoolPremium())}}function Nn(i,a){1&i&&(e.ynx(0),e.TgZ(1,"p"),e._uU(2),e.ALo(3,"transloco"),e.qZA(),e.TgZ(4,"ul")(5,"li"),e._uU(6),e.ALo(7,"transloco"),e.qZA(),e.TgZ(8,"li"),e._uU(9),e.ALo(10,"transloco"),e.qZA(),e.TgZ(11,"li"),e._uU(12),e.ALo(13,"transloco"),e.qZA()(),e._uU(14," <!\u2013 #!endif \u2013> "),e.BQk()),2&i&&(e.xp6(2),e.hij(" ",e.lcZ(3,4,"SUBSCRIPTION_WEAPPP_INFO_01")," "),e.xp6(4),e.Oqu(e.lcZ(7,6,"SUBSCRIPTION_WEAPPP_INFO_02")),e.xp6(3),e.Oqu(e.lcZ(10,8,"SUBSCRIPTION_WEAPPP_INFO_03")),e.xp6(3),e.Oqu(e.lcZ(13,10,"SUBSCRIPTION_WEAPPP_INFO_04")))}function Mn(i,a){if(1&i&&(e.ynx(0),e.TgZ(1,"a",76),e._uU(2),e.ALo(3,"transloco"),e.qZA(),e.BQk()),2&i){const t=e.oxw(4);e.xp6(1),e.Q6J("uiSref",t.stpLangageService.langPrefix+"histo"),e.xp6(1),e.hij(" ",e.lcZ(3,2,"SUBSCRIPTION_HISTORY")," ")}}function Ln(i,a){if(1&i&&(e.TgZ(0,"div")(1,"h2",41),e._uU(2),e.ALo(3,"transloco"),e.qZA(),e.TgZ(4,"div",62),e.YNc(5,tn,7,7,"p",7),e.YNc(6,nn,7,6,"div",7),e.YNc(7,on,7,7,"p",7),e.YNc(8,dn,5,4,"div",63),e.qZA(),e.YNc(9,hn,2,1,"ng-container",7),e.YNc(10,Cn,4,3,"ng-container",7),e.YNc(11,Nn,15,12,"ng-container",7),e.YNc(12,Mn,4,4,"ng-container",7),e.qZA()),2&i){const t=e.oxw(3);e.xp6(2),e.hij(" ",e.lcZ(3,9,"SUBSCRIPTIONS")," "),e.xp6(3),e.Q6J("ngIf",t.stpSession.isTrialPeriodRunning()),e.xp6(1),e.Q6J("ngIf",t.stpSession.isUserWhoStartedButNotFinishedSubscription()),e.xp6(1),e.Q6J("ngIf",t.stpSession.isTrialExpired()),e.xp6(1),e.Q6J("ngIf",!t.profile.subscription.isTrial),e.xp6(1),e.Q6J("ngIf",!t.stpSession.isWebApp()),e.xp6(1),e.Q6J("ngIf",!t.stpSession.isWebApp()),e.xp6(1),e.Q6J("ngIf",t.stpSession.isWebApp()),e.xp6(1),e.Q6J("ngIf",!t.stpSession.isWebApp())}}function yn(i,a){1&i&&(e.TgZ(0,"span",90),e._uU(1),e.ALo(2,"transloco"),e.qZA()),2&i&&(e.xp6(1),e.hij("\u2713 ",e.lcZ(2,1,"DEFAULT"),""))}function Pn(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"button",91),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit,s=e.oxw(6);return e.KtG(s.setDefaultCard(o))}),e._UZ(1,"i",92),e._uU(2),e.ALo(3,"transloco"),e.qZA()}if(2&i){const t=e.oxw(7);e.Q6J("disabled",t.cardPending),e.xp6(2),e.hij(" ",e.lcZ(3,2,"SET_DEFAULT")," ")}}function qn(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",83)(1,"div",84)(2,"div")(3,"strong"),e._uU(4),e.ALo(5,"uppercase"),e.qZA(),e._uU(6),e.ALo(7,"transloco"),e.ALo(8,"transloco"),e.YNc(9,yn,3,3,"span",85),e.qZA(),e.TgZ(10,"div",86),e.YNc(11,Pn,4,4,"button",87),e.TgZ(12,"button",88),e.NdJ("click",function(){const s=e.CHM(t).$implicit,l=e.oxw(6);return e.KtG(l.deleteCardMethod(s))}),e._UZ(13,"i",89),e._uU(14),e.ALo(15,"transloco"),e.qZA()()()()}if(2&i){const t=a.$implicit,n=e.oxw(6);e.xp6(4),e.Oqu(e.lcZ(5,10,t.brand)),e.xp6(2),e.xDo(" ",e.lcZ(7,12,"ENDING_IN")," ****",t.last4," ",e.lcZ(8,14,"EXPIRES")," ",t.exp_month,"/",t.exp_year," "),e.xp6(3),e.Q6J("ngIf",t.isDefault),e.xp6(2),e.Q6J("ngIf",!t.isDefault),e.xp6(1),e.Q6J("disabled",n.deleteC
1ardPending[t.paymentMethodId]),e.xp6(2),e.hij(" ",e.lcZ(15,16,"DELETE")," ")}}function En(i,a){if(1&i&&(e.TgZ(0,"div",80)(1,"h4",81),e._uU(2),e.ALo(3,"transloco"),e.qZA(),e.YNc(4,qn,16,18,"div",82),e.qZA()),2&i){const t=e.oxw(5);e.xp6(2),e.Oqu(e.lcZ(3,2,"MY_CARDS")),e.xp6(2),e.Q6J("ngForOf",t.allCreditCards)}}function On(i,a){1&i&&(e.TgZ(0,"div",93),e._uU(1),e.ALo(2,"transloco"),e.qZA()),2&i&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"NO_CARDS_FOUND")," "))}function In(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div"),e._UZ(1,"hr"),e.TgZ(2,"h2",41),e._uU(3),e.ALo(4,"transloco"),e.qZA(),e.YNc(5,En,5,4,"div",77),e.YNc(6,On,3,3,"div",78),e.TgZ(7,"a",79),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(4);return e.KtG(o.showUpdateCBInfoModal())}),e._uU(8),e.ALo(9,"transloco"),e.qZA()()}if(2&i){const t=e.oxw(4);e.xp6(3),e.hij(" ",e.lcZ(4,4,"MY_PAYMENT_INFO")," "),e.xp6(2),e.Q6J("ngIf",t.allCreditCards&&t.allCreditCards.length>0),e.xp6(1),e.Q6J("ngIf",!t.allCreditCards||0===t.allCreditCards.length),e.xp6(2),e.hij(" ",e.lcZ(9,6,"ADD_CARD")," ")}}function Un(i,a){if(1&i&&(e.ynx(0),e.YNc(1,In,10,8,"div",7),e.BQk()),2&i){const t=e.oxw(3);e.xp6(1),e.Q6J("ngIf",t.stpSession.isMonthlySubscription())}}function wn(i,a){if(1&i&&(e.TgZ(0,"div")(1,"div",60),e.YNc(2,en,3,3,"div",61),e.YNc(3,Ln,13,11,"div",61),e.qZA(),e.YNc(4,Un,2,1,"ng-container",7),e.qZA()),2&i){const t=e.oxw(2);e.xp6(1),e.Q6J("ngSwitch",t.ui.subscription.pending),e.xp6(1),e.Q6J("ngSwitchCase",!0),e.xp6(1),e.Q6J("ngSwitchCase",!1),e.xp6(1),e.Q6J("ngIf",!t.stpSession.isWebApp())}}function Jn(i,a){if(1&i&&(e.TgZ(0,"div"),e.YNc(1,wn,5,4,"div",7),e.qZA()),2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngIf","abo"===t.tabActive)}}function Rn(i,a){1&i&&e._UZ(0,"stpProfile")}function Yn(i,a){1&i&&(e.TgZ(0,"th",110),e._uU(1),e.ALo(2,"transloco"),e.qZA()),2&i&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"CREATION_DATE"),""))}function Fn(i,a){if(1&i&&(e.TgZ(0,"td",111)(1,"span"),e._uU(2),e.qZA()()),2&i){const t=a.$implicit,n=e.oxw(3);e.xp6(2),e.hij(" ",n.formatDate(t.signupDate)," ")}}function kn(i,a){1&i&&(e.TgZ(0,"th",110),e._uU(1),e.ALo(2,"transloco"),e.qZA()),2&i&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"EMAIL"),""))}function Dn(i,a){if(1&i&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&i){const t=e.oxw().$implicit;e.xp6(1),e.Oqu(t.email)}}function Qn(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"input",113),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw().$implicit;return e.KtG(s.editEmail=o)}),e.qZA()}if(2&i){const t=e.oxw().$implicit;e.Q6J("ngModel",t.editEmail)}}function Gn(i,a){if(1&i&&(e.TgZ(0,"td",111),e.YNc(1,Dn,2,1,"span",7),e.YNc(2,Qn,1,1,"input",112),e.qZA()),2&i){const t=a.$implicit;e.xp6(1),e.Q6J("ngIf",!t.edit),e.xp6(1),e.Q6J("ngIf",t.edit)}}function jn(i,a){1&i&&(e.TgZ(0,"th",110),e._uU(1),e.ALo(2,"transloco"),e.qZA()),2&i&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"FIRSTNAME_&_LASTNAME"),""))}function Hn(i,a){if(1&i&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&i){const t=e.oxw().$implicit;e.xp6(1),e.Oqu(t.firstName)}}function Bn(i,a){if(1&i&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&i){const t=e.oxw().$implicit;e.xp6(1),e.Oqu(t.lastName)}}function Kn(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"input",115),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw().$implicit;return e.KtG(s.editFirstName=o)}),e.ALo(1,"transloco"),e.qZA()}if(2&i){const t=e.oxw().$implicit;e.s9C("placeholder",e.lcZ(1,2,"FIRSTNAME")),e.Q6J("ngModel",t.editFirstName)}}function Wn(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"input",115),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw().$implicit;return e.KtG(s.editLastName=o)}),e.ALo(1,"transloco"),e.qZA()}if(2&i){const t=e.oxw().$implicit;e.s9C("placeholder",e.lcZ(1,2,"LASTNAME")),e.Q6J("ngModel",t.editLastName)}}function $n(i,a){if(1&i&&(e.TgZ(0,"td",111),e.YNc(1,Hn,2,1,"span",7),e._uU(2," \xa0 "),e.YNc(3,Bn,2,1,"span",7),e.YNc(4,Kn,2,4,"input",114),e._UZ(5,"br"),e.YNc(6,Wn,2,4,"input",114),e.qZA()),2&i){const t=a.$implicit;e.xp6(1),e.Q6J("ngIf",!t.edit),e.xp6(2),e.Q6J("ngIf",!t.edit),e.xp6(1),e.Q6J("ngIf",t.edit),e.xp6(2),e.Q6J("ngIf",t.edit)}}function zn(i,a){1&i&&(e.TgZ(0,"th",110),e._uU(1),e.ALo(2,"transloco"),e.qZA()),2&i&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"LAST_LOGIN"),""))}function Vn(i,a){if(1&i&&(e.TgZ(0,"td",111)(1,"span"),e._uU(2),e.qZA()()),2&i){const t=a.$implicit,n=e.oxw(3);e.xp6(2),e.Oqu(n.formatDate(t.lastWebActivationDate))}}function Xn(i,a){1&i&&e._UZ(0,"th",110)}function eo(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"button",122),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit,s=e.oxw(4);return e.KtG(s.editSlave(o))}),e._UZ(1,"i",123),e.qZA()}}function to(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"button",124),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit,s=e.oxw(4);return e.KtG(s.deleteSlave(o))}),e._UZ(1,"i",89),e.qZA()}}function io(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"button",125),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit,s=e.oxw(4);return e.KtG(s.updateSlave(o))}),e._UZ(1,"i",126),e.qZA()}}function no(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"button",127),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit,s=e.oxw(4);return e.KtG(s.cancelEdit(o))}),e._UZ(1,"i",128),e.qZA()}}function oo(i,a){if(1&i&&(e.TgZ(0,"td",117),e.YNc(1,eo,2,0,"button",118),e._uU(2," \xa0 "),e.YNc(3,to,2,0,"button",119),e._uU(4," \xa0 "),e.YNc(5,io,2,0,"button",120),e._uU(6," \xa0 "),e.YNc(7,no,2,0,"button",121),e.qZA()),2&i){const t=a.$implicit;e.xp6(1),e.Q6J("ngIf",!t.edit),e.xp6(2),e.Q6J("ngIf",!t.edit),e.xp6(2),e.Q6J("ngIf",t.edit),e.xp6(2),e.Q6J("ngIf",t.edit)}}function so(i,a){1&i&&(e.ynx(0),e.YNc(1,Xn,1,0,"th",101),e.YNc(2,oo,8,4,"td",116),e.BQk())}function ao(i,a){1&i&&e._UZ(0,"th",110)}function ro(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"td",117)(1,"button",125),e.NdJ("click",function(){const s=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.restoreSlave(s))}),e._UZ(2,"i",38),e.qZA()()}}function lo(i,a){1&i&&(e.ynx(0),e.YNc(1,ao,1,0,"th",101),e.YNc(2,ro,3,0,"td",116),e.BQk())}function co(i,a){1&i&&e._UZ(0,"tr",129)}function po(i,a){1&i&&e._UZ(0,"tr",130)}function uo(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",131)(1,"input",132),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(o.showDeletedAccounts())}),e.qZA(),e.TgZ(2,"span",98),e._uU(3),e.ALo(4,"transloco"),e.qZA()()}
12&i&&(e.xp6(3),e.Oqu(e.lcZ(4,1,"DISPLAY_DELETED_ACCOUNTS")))}function go(i,a){if(1&i&&(e.TgZ(0,"div",96)(1,"div")(2,"table",99),e.ynx(3,100),e.YNc(4,Yn,3,3,"th",101),e.YNc(5,Fn,3,1,"td",102),e.BQk(),e.ynx(6,103),e.YNc(7,kn,3,3,"th",101),e.YNc(8,Gn,3,2,"td",102),e.BQk(),e.ynx(9,104),e.YNc(10,jn,3,3,"th",101),e.YNc(11,$n,7,4,"td",102),e.BQk(),e.ynx(12,105),e.YNc(13,zn,3,3,"th",101),e.YNc(14,Vn,3,1,"td",102),e.BQk(),e.ynx(15,106),e.YNc(16,so,3,0,"ng-container",7),e.YNc(17,lo,3,0,"ng-container",7),e.BQk(),e.YNc(18,co,1,0,"tr",107),e.YNc(19,po,1,0,"tr",108),e.qZA()(),e.YNc(20,uo,5,3,"div",109),e.qZA()),2&i){const t=e.oxw(2);e.xp6(2),e.Q6J("dataSource",t.tableParams),e.xp6(14),e.Q6J("ngIf",!t.v_showDeletedSlaves),e.xp6(1),e.Q6J("ngIf",t.v_showDeletedSlaves),e.xp6(1),e.Q6J("cdkHeaderRowDef",t.displayedColumns),e.xp6(1),e.Q6J("cdkRowDefColumns",t.displayedColumns),e.xp6(1),e.Q6J("ngIf",t.slaveAccountsDeleted.length>0)}}function _o(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",133)(1,"button",134),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.subscribeNewClass())}),e._uU(2),e.ALo(3,"transloco"),e.qZA()()}2&i&&(e.xp6(2),e.hij(" ",e.lcZ(3,1,"CLASS_SUBSCRIPTION_ADMIN")," "))}function mo(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div"),e._uU(1),e.ALo(2,"transloco"),e.TgZ(3,"div",135)(4,"div",136)(5,"pre",137),e._uU(6),e.qZA()(),e.TgZ(7,"a",138),e.NdJ("click",function(o){e.CHM(t);const s=e.oxw(3);return e.KtG(s.copySubscribeClassFormToClipboard(o))}),e._uU(8),e.ALo(9,"transloco"),e.qZA()(),e._UZ(10,"textarea",139),e.qZA()}if(2&i){const t=e.oxw(3);e.xp6(1),e.hij(" ",e.lcZ(2,3,"SCHOOLMASTER_SUBSCRIPTION_MESSAGE")," : "),e.xp6(5),e.Oqu(t.subscribeClassFormUrl()),e.xp6(2),e.hij(" ",e.lcZ(9,5,"COPY_URL")," ")}}function ho(i,a){1&i&&(e.TgZ(0,"div"),e._uU(1),e.ALo(2,"transloco"),e.qZA()),2&i&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"MASTER_MAX_CLASSROOM_REACHED")," "))}function fo(i,a){if(1&i&&(e.TgZ(0,"div",96),e.YNc(1,mo,11,7,"div",7),e.YNc(2,ho,3,3,"div",7),e.qZA()),2&i){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",!t.limitReached),e.xp6(1),e.Q6J("ngIf",t.limitReached)}}function vo(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",16)(1,"h2",41),e._uU(2),e.ALo(3,"transloco"),e.qZA(),e.TgZ(4,"div")(5,"p"),e._uU(6),e.ALo(7,"transloco"),e.ALo(8,"transloco"),e.qZA(),e.YNc(9,go,21,6,"div",94),e.qZA(),e.YNc(10,_o,4,3,"div",95),e.TgZ(11,"div",96)(12,"input",97),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.profile.adminIsAlsoClassroom=o)})("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.updateAdminIsAlsoClassroom())}),e.qZA(),e.TgZ(13,"span",98),e._uU(14),e.ALo(15,"transloco"),e.ALo(16,"transloco"),e.qZA()(),e.YNc(17,fo,3,2,"div",94),e.qZA()}if(2&i){const t=e.oxw();e.xp6(2),e.hij(" ",e.lcZ(3,11,"SLAVE_CLASS")," "),e.xp6(4),e.lnq(" ",e.lcZ(7,13,"SCHOOL_ADMIN_YOU_HAVE_RIGHT01")," ",t.stpSession.getMaximumNumberOfClasses()," ",e.lcZ(8,15,"SCHOOL_ADMIN_YOU_HAVE_RIGHT02")," . "),e.xp6(3),e.Q6J("ngIf",t.slaveAccounts.length>0),e.xp6(1),e.Q6J("ngIf",!t.limitReached),e.xp6(2),e.Q6J("ngModel",t.profile.adminIsAlsoClassroom),e.xp6(2),e.lnq("",e.lcZ(15,17,"ADMIN_ACCOUNT")," (",t.profile.email,") ",e.lcZ(16,19,"IS_ALSO_CLASS_ACCOUNT"),""),e.xp6(3),e.Q6J("ngIf",!t.isExpirated()&&!t.stpSession.isStandaloneClassroom())}}const Ao=function(){return{post:"telecharger-uploader-des-fichiers-sons-pour-creer-des-narrations"}};function Zo(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",141)(1,"h2",41),e._uU(2),e.ALo(3,"transloco"),e.qZA(),e.TgZ(4,"div",142)(5,"div")(6,"h4",143),e._uU(7),e.ALo(8,"transloco"),e.qZA(),e.TgZ(9,"div",144),e._uU(10),e.ALo(11,"transloco"),e.qZA(),e.TgZ(12,"div")(13,"input",145),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw(2);return e.KtG(s.recordingConfig=o)})("ngModelChange",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.updateRecordingConfig("DEFAULT"))}),e.qZA(),e.TgZ(14,"label",146),e._uU(15),e.ALo(16,"transloco"),e.qZA()(),e.TgZ(17,"div")(18,"input",147),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw(2);return e.KtG(s.recordingConfig=o)})("ngModelChange",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.updateRecordingConfig("NO_MP3_CONVERSION"))}),e.qZA(),e.TgZ(19,"label",148),e._uU(20),e.ALo(21,"transloco"),e.TgZ(22,"span",149),e._uU(23),e.ALo(24,"transloco"),e.qZA()()(),e.TgZ(25,"div")(26,"input",150),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw(2);return e.KtG(s.recordingConfig=o)})("ngModelChange",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.updateRecordingConfig("MP3_CONVERSION"))}),e.qZA(),e.TgZ(27,"label",151),e._uU(28),e.ALo(29,"transloco"),e.TgZ(30,"span",149),e._uU(31),e.ALo(32,"transloco"),e.qZA()()()(),e.TgZ(33,"div")(34,"h4",143),e._uU(35),e.ALo(36,"transloco"),e.qZA(),e.TgZ(37,"input",152),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw(2);return e.KtG(s.audioUploadRecording=o)})("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.updateAudioUploadRecording())}),e.qZA(),e.TgZ(38,"label",153),e._uU(39),e.ALo(40,"transloco"),e.TgZ(41,"span",149),e._uU(42),e.ALo(43,"transloco"),e.qZA(),e.TgZ(44,"a",154),e._uU(45),e.ALo(46,"transloco"),e.qZA()()()()()}if(2&i){const t=e.oxw(2);e.xp6(2),e.hij(" ",e.lcZ(3,18,"RECORDING_PARAMETERS_TITLE")," "),e.xp6(5),e.hij("",e.lcZ(8,20,"RECORDING_PARAMETERS")," : "),e.xp6(3),e.Oqu(e.l
1cZ(11,22,"RECORDING_PARAMETERS_EXPLANATION")),e.xp6(3),e.Q6J("ngModel",t.recordingConfig),e.xp6(2),e.Oqu(e.lcZ(16,24,"RECORDING_PARAMETERS_AUTOMATIC")),e.xp6(3),e.Q6J("ngModel",t.recordingConfig),e.xp6(2),e.hij(" ",e.lcZ(21,26,"RECORDING_PARAMETERS_SERVER_COMPRESSION")," "),e.xp6(3),e.Oqu(e.lcZ(24,28,"RECORDING_PARAMETERS_SERVER_COMPRESSION_EXPLANATION")),e.xp6(3),e.Q6J("ngModel",t.recordingConfig),e.xp6(2),e.hij(" ",e.lcZ(29,30,"RECORDING_PARAMETERS_LOCAL_COMPRESSION")," "),e.xp6(3),e.Oqu(e.lcZ(32,32,"RECORDING_PARAMETERS_LOCAL_COMPRESSION_EXPLANATION")),e.xp6(4),e.hij("",e.lcZ(36,34,"UPLOAD_RECORDINGS")," : "),e.xp6(2),e.Q6J("ngModel",t.audioUploadRecording),e.xp6(2),e.hij(" ",e.lcZ(40,36,"AUTHORIZE_UPLOAD"),". "),e.xp6(3),e.hij("",e.lcZ(43,38,"AUTHORIZE_UPLOAD_EXPLANATION"),"."),e.xp6(2),e.Q6J("uiSref",t.stpLangageService.langPrefix+"aide")("uiParams",e.DdM(42,Ao)),e.xp6(1),e.hij(" ",e.lcZ(46,40,"KNOW_MORE")," ")}}function xo(i,a){if(1&i&&(e.ynx(0),e.YNc(1,Zo,47,43,"div",140),e.BQk()),2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngIf","config"===t.tabActive)}}function To(i,a){1&i&&(e.TgZ(0,"div",155)(1,"h2",41),e._uU(2," Conditions d'usages "),e.qZA(),e.TgZ(3,"p"),e._uU(4," Nos ouvrages proviennent des publications papier de nos \xe9diteurs partenaires, et sont pour la plupart encore disponibles en librairie. Cela garantit la qualit\xe9 des illustrations et la richesse des textes. La lecture de nos ouvrages sur notre plateforme doit donc "),e.TgZ(5,"strong"),e._uU(6,"respecter le droit d\u2019auteurs"),e.qZA(),e._uU(7,". "),e.qZA(),e.TgZ(8,"h3",156),e._uU(9," Usages autoris\xe9s avec votre compte b\xe9n\xe9vole "),e.qZA(),e.TgZ(10,"p"),e._uU(11,"Avec ce compte b\xe9n\xe9vole, vous pouvez : "),e.qZA(),e.TgZ(12,"ul")(13,"li"),e._uU(14,"Naviguer et acc\xe9der \xe0 la totalit\xe9 du catalogue "),e.qZA(),e.TgZ(15,"li"),e._uU(16,"Enregistrer des narrations pour le groupe d'enfant aupr\xe8s de qui vous avez l'habitude de raconter des histoires "),e.qZA(),e.TgZ(17,"li"),e._uU(18,"Nous recommandons comme bonne pratique le partage d\u2019une histoire par semaine et par b\xe9n\xe9vole"),e.qZA(),e.TgZ(19,"li"),e._uU(20,"Quand vous intervenez dans une structure, vous pouvez lire/\xe9couter/raconter des histoires avec les enfants en utilisant le support Storyplay\u2019r "),e.qZA()(),e.TgZ(21,"h3",157),e._uU(22," Usage non autoris\xe9s avec votre compte b\xe9n\xe9vole "),e.qZA(),e.TgZ(23,"ul")(24,"li"),e._uU(25,"Vous n'\xeates pas sens\xe9 utiliser ce compte pour un usage personnel avec votre famille ou autre..."),e.qZA(),e.TgZ(26,"li"),e._uU(27,"Le lien de partage des narrations ne doit pas \xeatre diffus\xe9 au del\xe0 du groupe d'enfant (voire plus haut). "),e.qZA(),e.TgZ(28,"li"),e._uU(29,"Vous ne devez pas communiquer vos acc\xe8s : ni aux enseignants ni aux familles."),e.qZA()(),e.TgZ(30,"h3",157),e._uU(31," Usage autoris\xe9s pour les \xe9coles "),e.qZA(),e._uU(32," Les enseignants peuvent \xe9couter/regarder en classe les narrations enregistr\xe9es par le b\xe9n\xe9vole. "),e.TgZ(33,"h3",157),e._uU(34," Usage autoris\xe9s pour les enfants/familles "),e.qZA(),e._uU(35," Les enfants peuvent \xe9couter/regarder depuis chez eux les narrations enregistr\xe9es par le b\xe9n\xe9vole. "),e.qZA())}class ee extends pi.o2{constructor(a){super(),this.data=new di.X(a)}connect(){return this.data}disconnect(){}}let bo=(()=>{class i{constructor(t,n,o,s,l,c,g,A,L,y,H,B,cl,pl,dl,ul,gl){this.stpSession=t,this.stpConfig=n,this.stateService=o,this.translocoService=s,this.apiService=l,this.stpSubscription=c,this.stpAccountService=g,this.stpNavigationService=A,this.stpLangageService=L,this.stpEventService=y,this.Flash=H,this.stpSeo=B,this.stpNarrationSyncService=cl,this.stpCatalogService=pl,this.stpSyncService=dl,this.stpProfileSyncService=ul,this.stpStripeService=gl,this.newSubscription={isFakeSubscription:null,_id:null,endDate:null,plan:{_id:null,stripeId:null,type:null,name:null},isTrial:null,startDate:null},this.plans=[],this.slaveAccounts=[],this.accountsPerPage=10,this.allCreditCards=[],this.defaultCard=null,this.card={}
1,this.displayUpdateCBInfo=!1,this.cardPending=!1,this.deleteCardPending={},this.limitReached=!1,this.v_showDeletedSlaves=!1,this.ui={subscription:{pending:!0},suscribeForm:{active:!1},card:{},resiliation:{pending:!1,active:!1}},this.displayedColumns=["creationDate","email","firstNameLastName","lastLogin","buttons"],this.fontScaleDisplay="\u2014"}loadFontScale(){var t=this;return(0,E.Z)(function*(){try{const{value:n}=yield ui.T.get();t.fontScaleDisplay=null!=n?`${Math.round(100*n)} %`:"\u2014"}catch{t.fontScaleDisplay="\u2014"}})()}ngOnInit(){var t=this;return(0,E.Z)(function*(){t.appIsOnline=t.stpNavigationService.isAppOnline();const{needLogin:n}=t.stateService.current.data;if(n&&!t.stpSession.isLogged()){const g=t.stateService.href(t.stpLangageService.langPrefix+"login");window.location.href=g}let o=new Date;new Date(o.getFullYear(),o.getMonth(),o.getDate()),t.stpSession.isGar()||(yield t.stpStripeService.loadStripeScript(),t.stripe=window.Stripe(t.stpConfig.stripeKey)),t.stpSeo.setTitle("Compte"),t.profile=t.stpSession.getSession(),t.subscription=t.profile.subscription,t.ui.subscription.pending=!1;let l=t.stateService.params;t.tabActive=l.tabActive?l.tabActive:"info",t.stpSession.fetchFromServerAndRefreshSession().then(c=>{t.profile=c,t.recordingConfig=t.stpSession.getRecordingConfig(),t.audioUploadRecording=t.stpSession.canUploadRecord()}),t.stpAccountService.getSlaveAccounts((c,g)=>{if(c)return console.log(c);t.slaveAccounts=g,t.slaveAccountsDeleted=t.slaveAccounts.filter(function(A){return A.deleted}),t.slaveAccountsActive=t.slaveAccounts.filter(function(A){return!A.deleted}),t.tableParams=new ee(t.slaveAccountsActive),t.refreshLimitReached(),t.accountSelection=t.slaveAccounts[1]}),t.stpSubscription.getPublicPlans().then(c=>{t.plans=t.plans.filter(g=>!!g.stripeId)}).catch(c=>{t.showError(c)}),t.getCreditCard()})()}refreshLimitReached(){if(!this.stpSession.getMaximumNumberOfClasses())return!1;let t=0;this.profile&&(t=this.profile.adminIsAlsoClassroom?1:0),this.limitReached=this.stpSession.getMaximumNumberOfClasses()<=this.slaveAccountsActive.length+t}updateAdminIsAlsoClassroom(){if(this.limitReached&&!1===this.profile.adminIsAlsoClassroom)return document.getElementById("adminIsAlsoClassroom").checked=!1,this.profile.adminIsAlsoClassroom=!1,this.Flash.error("Nombre maximum de classes atteint.");this.stpAccountService.updateAdminIsAlsoClassroom(!this.profile.adminIsAlsoClassroom,t=>{if(t)return this.Flash.error("Error when trying to update value "+t);this.refreshLimitReached()})}isExpirated(){return this.stpSession.isSubscriptionHasExpired()}unsubscribe(){this.stpEventService.createLogEvent("customers unsubscribe, profile = "+this.profile.email),this.ui.resiliation.pending=!0,this.stpSubscription.unsubscribe(this.subscription._id,(t,n)=>{if(this.ui.resiliation.pending=!1,t)return this.showError("Un probl\xe8me est survenu...");this.subscription=n,this.ui.resiliation.active=!1,this.stateService.go(this.stpLangageService.langPrefix+"unsubscribe")})}getCreditCard(){this.stpSubscription.getAllCards((t,n)=>{if(t)console.error(t);else{let o=[];Array.isArray(n)?o=n:n&&Array.isArray(n.cards)?o=n.cards:n&&n.card&&(o=[n.card]),o=o.map(s=>s.card&&"object"==typeof s.card?{...s,brand:s.card.brand,exp_month:s.card.exp_month,exp_year:s.card.exp_year,last4:s.card.last4,paymentMethodId:s.id||s.stripe_id||s.paymentMethodId}:{...s,paymentMethodId:s.id||s.stripe_id||s.paymentMethodId}),this.allCreditCards=o,this.defaultCard=this.allCreditCards.find(s=>s.isDefault),console.log("Cards loaded:",this.allCreditCards)}})}setDefaultCard(t){this.cardPending=!0,this.stpSubscription.setDefaultCard(t.paymentMethodId,(n,o)=>{this.cardPending=!1,n?(this.showError("Error setting default card"),console.error(n)):(this.getCreditCard(),this.Flash.successTranslate("DEFAULT_CARD_UPDATED_SUCCESSFULLY"))})}deleteCardMethod(t){if(!confirm(this.translocoService.translate("CONFIRM_DELETE_CARD")))return;const n=t.paymentMethodId;this.deleteCardPending[n]=!0,this.stpSubscription.deleteCard(n,(o,s)=>{this.deleteCardPending[n]=!1,o?(this.showError("Error deleting card"),console.error(o)):(this.getCredit
1Card(),this.Flash.successTranslate("CARD_DELETED_SUCCESSFULLY"))})}showUpdateCBInfoModal(){this.displayUpdateCBInfo=!0;let t=this.stripe.elements(),n=t.create("cardNumber",{classes:{base:"form-control cardnumber"}}),o=t.create("cardExpiry",{classes:{base:"form-control cardexpiration"}}),s=t.create("cardCvc",{classes:{base:"form-control cardcrypto"}});this.cardNumber=n,setTimeout(()=>{n.mount("#card-number"),o.mount("#card-expiry"),s.mount("#card-cvc")},500)}modifyCreditCardInfo(){this.stpEventService.createLogEvent("modifyCreditCardInfo submitted"),this.cardPending=!0,this.stripe.createPaymentMethod("card",this.cardNumber).then(t=>{t.error?(console.log(t.error),this.cardPending=!1):this.handleSetup({payment_method_id:t.paymentMethod.id})})}handleSetup(t){this.stpEventService.createLogEvent("modifyCreditCardInfo > handleSetup - send info to our server"),this.apiService.post(this.stpConfig.api+"/api/stripe/setupDefaultCard",t).subscribe(n=>{n.error?(console.log(n.error),this.stpEventService.createErrorLogEvent("modifyCreditCardInfo > handleSetup : got error from confirmPayment, code = "+JSON.stringify(n.error)),this.cardPending=!1):n.requires_action?this.handleCardActionFor3DSecure(n.setup_intent_client_secret):(this.stpEventService.createLogEvent("modifyCreditCardInfo > handleSetup - stripe final success"),this.getCreditCard(),this.displayUpdateCBInfo=!1,this.cardPending=!1,this.Flash.successTranslate("CARD_ADDED_SUCCESSFULLY"))},n=>{console.log(n),this.cardPending=!1})}handleCardActionFor3DSecure(t){this.stpEventService.createLogEvent("modifyCreditCardInfo > handleCardActionFor3DSecure"),this.stripe.handleCardSetup(t,this.cardNumber).then(n=>{n.error?(console.log(n.error),this.stpEventService.createErrorLogEvent("modifyCreditCardInfo > handleCardActionFor3DSecure : got error from stripe, code = "+JSON.stringify(n.error)),this.cardPending=!1):(this.stpEventService.createLogEvent("modifyCreditCardInfo > handleCardActionFor3DSecure : success"),this.handleSetup({payment_method_id:n.setupIntent.payment_method,setup_intent_id:n.setupIntent.id}))})}getNextDebitDate(t){let n=new Date(t),o=new Date;return new Date(o.getFullYear(),o.getDate()<n.getDate()?o.getMonth():o.getMonth()+1,n.getDate())}displaySubscriptionInformations(){return this.stpSession.isUser()||this.stpSession.isSchoolMaster()}logout(){var t=this;return(0,E.Z)(function*(){try{const n=yield t.stpSession.logout();yield t.stpEventService.connection("LOGOUT");{if(n&&n.redirectUrl)return window.location.href=n.redirectUrl;const s=t.stateService.href(t.stpLangageService.langPrefix+"home");window.location.href=s}}catch(n){if(n)return void console.log(n)}})()}refreshSession(){this.stpSession.fetchFromServerAndRefreshSession().then(t=>{location.reload()}).catch(t=>{console.log(t)})}showError(t){this.Flash.errorTranslate(t)}subscribeNewClass(){this.stateService.go(this.stpLangageService.langPrefix.replace("#","").replace("/","")+"educationSignupclassroom",{masterid:this.stpSession.whoami()._id,backToMaster:"true"})}readLocalProfile(){}push(){}cleanTempFiles(){}testStoryFetchWriteRead(){}changeTab(t){this.tabActive=t}editSlave(t){t.editFirstName=t.firstName,t.editLastName=t.lastName,t.editEmail=t.email,t.edit=!0}cancelEdit(t){t.edit=!1}updateSlave(t){let n={};n._id=t._id,t.editFirstName!==t.firstName&&(n.firstName=t.editFirstName),t.editLastName!==t.lastName&&(n.lastName=t.editLastName),t.editEmail!==t.email&&(n.email=t.editEmail),this.apiService.post(this.stpConfig.api+"/api/account/update-slave",n).subscribe(o=>{t.firstName=t.editFirstName,t.lastName=t.editLastName,t.email=t.editEmail,t.edit=!1},o=>{this.Flash.error(400==o.status?"An account already exists with this email.":o)})}deleteSlave(t){if(!confirm(this.translocoService.translate("CONFIRM_CLASS_DELETE")))return;let n={};n._id=t._id,n.deleted=!0,this.apiService.post(this.stpConfig.api+"/api/account/delete-slave",n).subscribe(o=>{this.removeAccountFromDataset(t._id),this.refreshLimitReached(),this.Flash.success("Deleted")},o=>{console.log(o),this.Flash.error(o)})}restoreSlave(t){if(this.limitReached)return alert(this.translocoService.translate("MASTER_MAX_CLASSROOM_REACHED"));if(!confirm(this.translocoService.translate("CONFIRM_CLASS_RESTORE")))return;let n={};n._id=t._id,n.deleted=!1,this.apiService.post(this.stpConfig.api+"/api/account/restore-slave",n).subscribe(()=>{this.restoreAccountIntoDataset(t._id),this.refreshLimitReached(),this.Flash.success("Restored")},o=>{console.log(o),this.Flash.error(o)})}removeAccountFromDataset(t){let n=this.tableParams.data.getValue().findIndex(function(l){return l._id===t}),o=this.slaveAccountsActive.findIndex(function(l){return l._id===t});this.tableParams.data.next(this.tableParams.data.getValue().filter((l,c)=>c!==n));let s=this.slaveAccountsActive.splice(o,1);this.slaveAccountsDeleted.push(s[0])}restoreAccountIntoDataset(t){let n=this.tableParams.data.getValue().findIndex(function(l){return l._id===t}),o=this.slaveAccountsDeleted.findIndex(function(l){return l._id===t});this.tableParams.data.next(this.tableParams.data.getValue().filter((l,c)=>c!==n));let s=this.slaveAccountsDeleted.splice(o,1);this.slaveAccountsActive.push(s[0])}subscribeClassFormUrl(){return location.origin+"/education/signupclassroom?masterid="+this.stpSession.whoami()._id+"&backToMaster=false"}
1copySubscribeClassFormToClipboard(t){console.log("click on copySubscribeClassFormToClipboard");let n=document.querySelector("#copiedText");n.style.visibility="visible",n.innerHTML=this.subscribeClassFormUrl(),n.select();try{document.execCommand("copy"),t.currentTarget.classList.add("copied");let o=t.currentTarget;setTimeout(function(){o.classList.remove("copied")},1500)}catch{alert("use right-click + open in incognito mode instead")}n.style.visibility="hidden"}updateRecordingConfig(t){this.stpSession.updateRecordingConfig(t).then(n=>{this.recordingConfig=t}).catch(n=>console.error(n))}updateAudioUploadRecording(){this.stpSession.updateAudioUploadForRecording(!this.audioUploadRecording,t=>{if(t)return console.error(t);this.audioUploadRecording=this.stpSession.canUploadRecord()})}formatDate(t){return t?new Date(t).toLocaleDateString(this.translocoService.getActiveLang(),{year:"numeric",month:"short",day:"numeric"}):""}showDeletedAccounts(){this.v_showDeletedSlaves=!this.v_showDeletedSlaves,this.tableParams=new ee(this.v_showDeletedSlaves?this.slaveAccountsDeleted:this.slaveAccountsActive)}showSlaveAccountTable(){return this.v_showDeletedSlaves?this.slaveAccounts.length>0:this.slaveAccountsActive.length>0}closeModal(){this.displayUpdateCBInfo=!1}subSchoolActiveString(){const t=(new Date).toISOString(),n=this.stpSession.whoami().masterExpirationDate||this.stpSession.whoami().expirationDate;let o="SUB_ACTIVE_UNTIL";return n&&n<t&&(o="SUB_EXPIRED_SINCE"),o}schoolExpiredDate(){return this.stpSession.whoami().masterExpirationDate||this.stpSession.whoami().expirationDate}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(m.i),e.Y36(f.P),e.Y36(u.b2),e.Y36(h.Vn),e.Y36(v.s),e.Y36(q.z),e.Y36(j.O),e.Y36(K.j),e.Y36(C.s),e.Y36(Y.m),e.Y36(N.M),e.Y36(M.i),e.Y36(gi.o),e.Y36(W.u),e.Y36(_i.l),e.Y36(mi.k),e.Y36(ne))},i.\u0275cmp=e.Xpm({type:i,selectors:[["stp-compte"]],decls:64,vars:36,consts:[[1,"container","stp-container-v3"],[1,"stp-text-bold","stp-color-red",2,"margin-bottom","20px"],[1,"row","stp-account-main-block"],[1,"col-lg-3","col-md-3","col-sm-12","col-xs-12"],[1,"col-md-12","col-sm-3"],[1,"stp-button-big","stp-square-button",3,"ngClass","click"],["class","stp-button-big stp-square-button stp-button-white",3,"ngClass","click",4,"ngIf"],[4,"ngIf"],[1,"col-md-12","col-sm-3","stp-margin-top-15"],["class","stp-button-big stp-button-white","style","width: 100%;",3,"click",4,"ngIf"],[1,"col-md-12","col-sm-3",2,"margin-top","10px"],["class","stp-button-big stp-button-white","style","width: 100%;",3,"uiSref",4,"ngIf"],[1,"stp-info-block","col-lg-9","col-md-9","col-sm-12","col-xs-12"],["class","row",4,"ngIf"],["class","row","style","margin-top: 10px;",4,"ngIf"],[1,"stp-grey-modal",3,"dialogTitle","show","close"],[1,"row"],[1,"form-group"],[1,"col-xs-offset-1","col-xs-5"],["for","inputCardNumber"],[1,"col-xs-5",2,"text-align","right"],["height","20","alt","CB","src","/assets/images/payment/American-Express-logo.png"],["height","20","alt","MasterCard","src","/assets/images/payment/Mastercard-logo.png"],["height","20","alt","Visa","src","/assets/images/payment/Visa-logo.png"],[1,"col-xs-offset-1","col-xs-10"],["id","card-number"],[2,"display","block","width","60px"],["id","card-expiry"],[1,"col-xs-5"],[1,"form-group","marged-bot"],["for","inputCardCrypto"],["id","card-cvc"],[1,"clearfix"],[2,"text-align","center","margin-bottom","50px"],[1,"btn","btn-success",3,"disabled","click"],[1,"stp-button-big","stp-square-button","stp-button-white",3,"ngClass","click"],[1,"stp-button-big","stp-button-white",2,"width","100%",3,"click"],[1,"bi","bi-power"],[1,"bi","bi-arrow-clockwise"],[1,"stp-button-big","stp-button-white",2,"width","100%",3,"uiSref"],[1,"bi","bi-gear-wide"],[1,"stp-account-title"],["class","stp-account-profile-block","style","margin-bottom: 1rem;",4,"ngIf"],["class","stp-account-profile-block",4,"ngIf"],[1,"stp-account-profile-block",2,"margin-bottom","1rem"],[1,"stp-text-bold"],[1,"stp-account-profile-block"],["href","mailto:[email protected]"],[1,"stp-p-info"],[2,"color","red",3,"href"],[1,"col-lg-9","col-md-9","col-sm-12","col-xs-12"],["alt","home-mosaic","src","assets/images/v3/compte-lfl-famille.jpg",1,"stp-full-size-element"],["alt","home-mosaic","src","assets/images/v3/compte-lfl-ecole.jpg",1,"stp-full-size-element"],["href","mailto:[email protected]"],[2,"color","red",3,"uiSref"],[3,"innerHTML"],["class","adher-app-id",4,"ngIf"],["style","font-size: 10px;",4,"ngIf"],[1,"adher-app-id"],[2,"font-size","10px"],[3,"ngSwitch"],[4,"ngSwitchCase"],[1,"stp-account-sub-block"],["class","marged-bot",4,"ngIf"],[1,"marged-bot"],["class","stp-button-big stp-button-red",3,"click",4,"ngIf"],[1,"stp-button-big","stp-button-red",3,"uiSref"],["class","bg-info",4,"ngIf"],[1,"stp-button-big","stp-button-red",3,"click"],[1,"form-inline"],[1,"stp-button-small","stp-button-red",3,"click"],[1,"bg-info"],["class","stp-button-big stp-button-red",3,"uiSref",4,"ngIf"],["class","stp-account-sub-block",4,"ngIf"],["class","stp-button-big stp-button-red",3,"uiSref","uiParams",4,"ngIf"],[1,"stp-button-big","stp-button-red",3,"uiSref","uiParams"],[1,"stp-button-small","stp-button-white","stp-margin-top-15",3,"uiSref"],["class","stp-cards-list",4,"ngIf"],["style","margin: 15px 0; color: #999;",4,"ngIf"],[1,"stp-button-big","stp-button-red",2,"margin-top","20px",3,"click"],[1,"stp-cards-list"],[2,"margin-top","20px","margin-bottom","15px"],["class","stp-card-item","style","border: 1px solid #ccc; padding: 12px; margin-bottom: 10px; border-radius: 4px;
1",4,"ngFor","ngForOf"],[1,"stp-card-item",2,"border","1px solid #ccc","padding","12px","margin-bottom","10px","border-radius","4px"],[2,"display","flex","justify-content","space-between","align-items","center"],["style","margin-left: 10px; color: #28a745; font-weight: bold;",4,"ngIf"],[2,"display","flex","gap","10px"],["class","btn btn-sm btn-info",3,"disabled","click",4,"ngIf"],[1,"btn","btn-sm","btn-danger",3,"disabled","click"],[1,"bi","bi-trash"],[2,"margin-left","10px","color","#28a745","font-weight","bold"],[1,"btn","btn-sm","btn-info",3,"disabled","click"],[1,"bi","bi-star"],[2,"margin","15px 0","color","#999"],["class","stp-margin-top-15",4,"ngIf"],["style","margin: 10px 0px;",4,"ngIf"],[1,"stp-margin-top-15"],["id","adminIsAlsoClassroom","type","checkbox",3,"ngModel","ngModelChange","click"],[2,"margin-left","5px"],["cdk-table","",1,"table","table-bordered","stp-account-teachers-accounts-table",3,"dataSource"],["cdkColumnDef","creationDate"],["cdk-header-cell","",4,"cdkHeaderCellDef"],["cdk-cell","",4,"cdkCellDef"],["cdkColumnDef","email"],["cdkColumnDef","firstNameLastName"],["cdkColumnDef","lastLogin"],["cdkColumnDef","buttons"],["cdk-header-row","",4,"cdkHeaderRowDef"],["cdk-row","",4,"cdkRowDef","cdkRowDefColumns"],["style","font-size:12px; text-align:right;color:red;font-weight:600;",4,"ngIf"],["cdk-header-cell",""],["cdk-cell",""],["type","text",3,"ngModel","ngModelChange",4,"ngIf"],["type","text",3,"ngModel","ngModelChange"],["type","text",3,"ngModel","placeholder","ngModelChange",4,"ngIf"],["type","text",3,"ngModel","placeholder","ngModelChange"],["class","stp-table-last-column-with-icons",4,"cdkCellDef"],[1,"stp-table-last-column-with-icons"],["class","btn btn-primary stp-table-button-icon",3,"click",4,"ngIf"],["class","btn btn-danger stp-table-button-icon",3,"click",4,"ngIf"],["class","btn btn-success stp-table-button-icon",3,"click",4,"ngIf"],["class","btn btn-warning stp-table-button-icon",3,"click",4,"ngIf"],[1,"btn","btn-primary","stp-table-button-icon",3,"click"],[1,"bi","bi-pencil-fill"],[1,"btn","btn-danger","stp-table-button-icon",3,"click"],[1,"btn","btn-success","stp-table-button-icon",3,"click"],[1,"bi","bi-check-lg"],[1,"btn","btn-warning","stp-table-button-icon",3,"click"],[1,"bi","bi-x-lg"],["cdk-header-row",""],["cdk-row",""],[2,"font-size","12px","text-align","right","color","red","font-weight","600"],["id","deleted-accounts","type","checkbox",3,"click"],[2,"margin","10px 0px"],[1,"btn","btn-danger",3,"click"],[2,"text-align","center"],[2,"margin","10px","font-size","12px","font-weight","500"],[1,"stp-account-classroom-link"],[1,"stp-button-small","stp-button-white",2,"font-size","12px",3,"click"],["id","copiedText",2,"visibility","hidden","height","1px"],["class","row panel",4,"ngIf"],[1,"row","panel"],[1,"panel","panel-default","stp-compte-panel-padding"],[2,"font-weight","700"],[1,"stp-compte-text-info"],["type","radio","id","default","name","conversion-method","value","DEFAULT",1,"stp-compte-radio-button",2,"margin-right","5px",3,"ngModel","ngModelChange"],["for","default",1,"stp-compte-radio-label"],["type","radio","id","no-conversion","name","conversion-method","value","NO_MP3_CONVERSION",1,"stp-compte-radio-button",2,"margin-right","5px",3,"ngModel","ngModelChange"],["for","no-conversion",1,"stp-compte-radio-label"],[1,"normal-weight"],["type","radio","id","conversion","name","conversion-method","value","MP3_CONVERSION",1,"stp-compte-radio-button",2,"margin-right","5px",3,"ngModel","ngModelChange"],["for","conversion",1,"stp-compte-radio-label"],["type","checkbox","id","enable-audio-upload-for-recording",1,"stp-compte-radio-button",2,"margin-right","5px",3,"ngModel","ngModelChange","click"],["for","enable-audio-upload-for-recording",1,"stp-compte-radio-label"],[1,"link-in-text",3,"uiSref","uiParams"],[1,"row",2,"margin-top","10px"],[1,"stp-text-bold","stp-color-red",2,"margin","0px 0px 5px 0px"],[1,"stp-text-bold","stp-color-red",2,"margin","10px 0px 5px 0px"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"h1",1),e._uU(2),e.ALo(3,"transloco"),e.qZA(),e.TgZ(4,"div",2)(5,"div",3)(6,"div",4)(7,"button",5),e.NdJ("click",function(){return n.changeTab("info")}),e._uU(8,"Informations "),e.qZA()(),e.TgZ(9,"div",4),e.YNc(10,bi,3,4,"button",6),e.qZA(),e.TgZ(11,"div",4),e.YNc(12,Ci,3,4,"button",6),e.qZA(),e.TgZ(13,"div",4),e.YNc(14,Ni,2,1,"button",6),e.qZA(),e.YNc(15,Mi,5,4,"ng-container",7),e.TgZ(16,"div",4),e.YNc(17,Li,2,1,"button",6),e.qZA(),e.TgZ(18,"div",8),e.YNc(19,yi,4,3,"a",9),e.qZA(),e.TgZ(20,"div",10),e.YNc(21,Pi,4,3,"a",9),e.qZA(),e.TgZ(22,"div",10),e.YNc(23,qi,4,4,"a",11),e.YNc(24,Ei,4,4,"a",11),e.qZA()(),e.TgZ(25,"div",12),e.YNc(26,Xi,15,12,"div",7),e.YNc(27,Jn,2,1,"div",7),e.YNc(28,Rn,1,0,"stpProfile",7),e.YNc(29,vo,18,21,"div",13),e.YNc(30,xo,2,1,"ng-container",7),e.YNc(31,To,36,0,"div",14),e.qZA()()(),e.TgZ(32,"stpModalDialog",15),e.NdJ("close",function(){return n.closeModal()}),e.ALo(33,"transloco"),e.TgZ(34,"div",16)(35,"div",17)(36,"div",18)(37,"label",19),e._uU(38),e.ALo(39,"transloco"),e.qZA()(),e.TgZ(40,"div",20),e._UZ(41,"img",21)(42,"img",22)(43,"img",23),e.qZA(),e.TgZ(44,"div",24),e._UZ(45,"div",25),e.qZA()()(),e.TgZ(46,"div",16)(47,"div",18)(48,"div",17)(49,"label",26),e._uU(50),e.ALo(51,"transloco"),e.qZA(),e._UZ(52,"div",27),e.qZA()(),e.TgZ(53,"div",28)(54,"div",29)(55,"label",30),e._uU(56),e.ALo(57,"transloco"),e.qZA(),e._UZ(58,"div",31),e.qZA()(),e._UZ(59,"div",32),e.qZA(),e.TgZ(60,"div",33)(61,"button",34),e.NdJ("click",function(){return n.modifyCreditCardInfo()}),e._uU(62),e.ALo(63,"transloco"),e.qZA()()()),2&t&&(e.xp6(2),e.hij(" ",e.lcZ(3,24,"MY_ACCOUNT")," "),e.xp6(5),e.Q6J("ngClass","info"===n.tabActive?"stp-button-red":"stp-button-white"),e.xp6(3),e.Q6J("ngIf",n.displaySubscriptionInformations()&&!n.stpSession.isGar()),e.xp6(2),e.Q6J("ngIf",n.stpSession.canEditProfile()&&!n.stpSession.isGar()),e.xp6(2),e.Q6J("ngIf",n.stpSession.isSchoolMaster()
1),e.xp6(1),e.Q6J("ngIf",!n.stpSession.isWebApp()),e.xp6(2),e.Q6J("ngIf",n.stpSession.isLflPartner()),e.xp6(2),e.Q6J("ngIf",n.appIsOnline),e.xp6(2),e.Q6J("ngIf",n.appIsOnline),e.xp6(2),e.Q6J("ngIf",n.stpSession.isLogged()&&n.appIsOnline&&n.stpSession.isBiblioMaster()),e.xp6(1),e.Q6J("ngIf",n.stpSession.isLogged()&&n.appIsOnline&&n.stpSession.isEditor()),e.xp6(2),e.Q6J("ngIf","info"===n.tabActive),e.xp6(1),e.Q6J("ngIf",n.appIsOnline),e.xp6(1),e.Q6J("ngIf","profil"===n.tabActive),e.xp6(1),e.Q6J("ngIf","classes"===n.tabActive),e.xp6(1),e.Q6J("ngIf",!n.stpSession.isWebApp()),e.xp6(1),e.Q6J("ngIf","usage"===n.tabActive),e.xp6(1),e.Q6J("dialogTitle",e.lcZ(33,26,"ADD_NEW_CARD"))("show",n.displayUpdateCBInfo),e.xp6(6),e.Oqu(e.lcZ(39,28,"CARD_NUMBER")),e.xp6(12),e.Oqu(e.lcZ(51,30,"EXP_DATE")),e.xp6(6),e.Oqu(e.lcZ(57,32,"CARD_CRYPTO")),e.xp6(5),e.Q6J("disabled",n.cardPending),e.xp6(1),e.hij(" ",e.lcZ(63,34,"ADD_CARD")," "))},dependencies:[_.bcJ,_.KeH,p.mk,p.sg,p.O5,p.RF,p.n9,r.Fj,r.Wl,r._,r.JJ,r.On,re.S,le.t,G.Z,ce.B,pe.s,de.e,O.zC,O.Sq,O.O_,O.D5,O.fo,O.hD,O._J,O.Af,O.xN,O.s$,Ti,h.Ot,p.gd,p.JJ,p.uU],encapsulation:2}),i})();function Co(i,a){1&i&&(e.TgZ(0,"div"),e._uU(1),e.ALo(2,"transloco"),e.qZA()),2&i&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"NO_SUBSCRIPTION")," "))}const No=function(i){return{id:i}};function Mo(i,a){if(1&i&&(e.TgZ(0,"a",12),e._uU(1),e.ALo(2,"transloco"),e.qZA()),2&i){const t=e.oxw().index,n=e.oxw(3);e.Q6J("uiSref",n.stpLangageService.langPrefix+"invoice")("uiParams",e.VKq(5,No,t)),e.xp6(1),e.Oqu(e.lcZ(2,3,"SEE_INVOICE"))}}function Lo(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"a",13),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(4);return e.KtG(o.showExternalInvoiceAlert())}),e._uU(1),e.ALo(2,"transloco"),e.qZA()}2&i&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"SEE_INVOICE")))}function yo(i,a){if(1&i&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.qZA(),e.TgZ(5,"td"),e._uU(6),e.ALo(7,"date"),e.qZA(),e.TgZ(8,"td"),e._uU(9),e.ALo(10,"date"),e.qZA(),e.TgZ(11,"td"),e.YNc(12,Mo,3,7,"a",10),e.YNc(13,Lo,3,3,"a",11),e.qZA()()),2&i){const t=a.$implicit,n=e.oxw(3);e.xp6(2),e.Oqu(t.plan.name),e.xp6(2),e.Oqu(n.getSubPrice(t)),e.xp6(2),e.Oqu(e.xi3(7,6,t.startDate,"dd-MM-yyyy")),e.xp6(3),e.Oqu(e.xi3(10,9,t.endDate,"dd-MM-yyyy")),e.xp6(3),e.Q6J("ngIf","PDI"!==t.plan.type&&"stripe"===t.invoicePlatform),e.xp6(1),e.Q6J("ngIf","PDI"!==t.plan.type&&"stripe"!==t.invoicePlatform)}}function Po(i,a){if(1&i&&(e.TgZ(0,"div")(1,"table",8)(2,"thead")(3,"tr")(4,"th"),e._uU(5),e.ALo(6,"transloco"),e.qZA(),e.TgZ(7,"th"),e._uU(8),e.ALo(9,"transloco"),e.qZA(),e.TgZ(10,"th"),e._uU(11),e.ALo(12,"transloco"),e.qZA(),e.TgZ(13,"th"),e._uU(14),e.ALo(15,"transloco"),e.qZA(),e._UZ(16,"th"),e.qZA()(),e.TgZ(17,"tbody"),e.YNc(18,yo,14,12,"tr",9),e.qZA()()()),2&i){const t=e.oxw(2);
1e.xp6(5),e.Oqu(e.lcZ(6,5,"ABONNEMENTS")),e.xp6(3),e.Oqu(e.lcZ(9,7,"PRICE")),e.xp6(3),e.Oqu(e.lcZ(12,9,"START")),e.xp6(3),e.Oqu(e.lcZ(15,11,"END")),e.xp6(4),e.Q6J("ngForOf",t.subs)}}function qo(i,a){if(1&i&&(e.TgZ(0,"div",3)(1,"a",4),e._UZ(2,"i",5),e._uU(3),e.ALo(4,"transloco"),e.qZA(),e.TgZ(5,"h3"),e._uU(6),e.ALo(7,"transloco"),e.qZA(),e.TgZ(8,"div",6),e.YNc(9,Co,3,3,"div",7),e.YNc(10,Po,19,13,"div",7),e.qZA()()),2&i){const t=e.oxw();e.xp6(1),e.Q6J("uiSref",t.stpLangageService.langPrefix+"compte"),e.xp6(2),e.hij(" ",e.lcZ(4,6,"BACK")," "),e.xp6(3),e.hij(" ",e.lcZ(7,8,"SUBSCRIPTION_HISTORY")," "),e.xp6(2),e.Q6J("ngSwitch",!!t.subs.length),e.xp6(1),e.Q6J("ngSwitchCase",!1),e.xp6(1),e.Q6J("ngSwitchCase",!0)}}let Eo=(()=>{class i{constructor(t,n,o,s,l,c){this.stpSeo=t,this.stpConfg=n,this.stpSession=o,this.stpLangageService=s,this.stpSubscription=l,this.translocoService=c,this.subs=[],this.dataLoaded=!1}ngOnInit(){var t=this;return(0,E.Z)(function*(){t.page="compte",t.stpSeo.setTitle("Historique des souscriptions"),t.profile=t.stpSession.getSession();const n=yield t.stpSubscription.getMines();t.subs=Array.isArray(n)?n:"object"==typeof n?[n]:[],t.dataLoaded=!0})()}showExternalInvoiceAlert(){return alert(this.translocoService.translate("EXTERNAL_INVOICE_POPUP"))}getSubPrice(t){let c="usd"===t.plan.currency?"$":"\u20ac";return Math.round((t.plan.price*(t.quantity?t.quantity:1)/100-(t.discount?t.discount:0))*(1+(t.plan.TVA||0))*100)/100+" "+c}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(M.i),e.Y36(f.P),e.Y36(m.i),e.Y36(C.s),e.Y36(q.z),e.Y36(h.Vn))},i.\u0275cmp=e.Xpm({type:i,selectors:[["stp-histo"]],decls:3,vars:1,consts:[[1,"container","view",2,"background","white"],[1,"row"],["class","col-xs-12",4,"ngIf"],[1,"col-xs-12"],[1,"btn","btn-link",3,"uiSref"],[1,"bi","bi-arrow-left"],[3,"ngSwitch"],[4,"ngSwitchCase"],[1,"table"],[4,"ngFor","ngForOf"],["target","_blank",3,"uiSref","uiParams",4,"ngIf"],[3,"click",4,"ngIf"],["target","_blank",3,"uiSref","uiParams"],[3,"click"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1),e.YNc(2,qo,11,10,"div",2),e.qZA()()),2&t&&(e.xp6(2),e.Q6J("ngIf",n.dataLoaded))},dependencies:[_.bcJ,_.KeH,p.sg,p.O5,p.RF,p.n9,h.Ot,p.uU],encapsulation:2}),i})(),ue=(()=>{class i{constructor(t,n){this.apiService=t,this.stpConfig=n}getCustumerInfoById(t){return this.apiService.get(this.stpConfig.api+"/api/account/"+t+"/info")}}return i.\u0275fac=function(t){return new(t||i)(e.LFG(v.s),e.LFG(f.P))},i.\u0275prov=e.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function Oo(i,a){1&i&&(e.TgZ(0,"div",1)(1,"div",2),e._uU(2),e.ALo(3,"transloco"),e.qZA()()),2&i&&(e.xp6(2),e.hij(" ",e.lcZ(3,1,"EXTERNAL_INVOICE_POPUP")," "))}function Io(i,a){1&i&&(e.TgZ(0,"div")(1,"strong"),e._uU(2),e.ALo(3,"transloco"),e.qZA(),e._UZ(4,"br"),e.qZA()),2&i&&(e.xp6(2),e.Oqu(e.lcZ(3,1,"RECEIPT")))}function Uo(i,a){if(1&i&&(e.TgZ(0,"div")(1,"strong"),e._uU(2),e.ALo(3,"transloco"),e.qZA(),e._UZ(4,"br"),e.qZA()),2&i){const t=e.oxw(2);e.xp6(2),e.AsE("",e.lcZ(3,2,"FACTURE")," N\xb0 ",t.subs[t.invoiceToLoad].externalInvoiceNumber,"")}}function wo(i,a){if(1&i&&(e.TgZ(0,"div"),e._uU(1),e.ALo(2,"date"),e._UZ(3,"br"),e.qZA()),2&i){const t=e.oxw(2);e.xp6(1),e.hij(" Date : ",e.xi3(2,1,t.subs[t.invoiceToLoad].startDate,"dd-MM-yyyy"),"")}}function Jo(i,a){if(1&i&&(e.TgZ(0,"div")(1,"strong"),e._uU(2),e.qZA(),e._UZ(3,"br"),e.qZA()),2&i){const t=e.oxw(2);e.xp6(2),e.Oqu(t.profile.schoolName)}}function Ro(i,a){if(1&i&&(e.TgZ(0,"div")(1,"strong"),e._uU(2),e.qZA(),e._UZ(3,"br"),e.qZA()),2&i){const t=e.oxw(2);e.xp6(2),e.Oqu(t.profile.addressLine1)}}function Yo(i,a){if(1&i&&(e.TgZ(0,"div")(1,"strong"),e._uU(2),e.qZA(),e._UZ(3,"br"),e.qZA()),2&i){const t=e.oxw(2);e.xp6(2),e.Oqu(t.profile.addressLine2)}}function Fo(i,a){if(1&i&&(e.TgZ(0,"div")(1,"strong"),e._uU(2),e.qZA()()),2&i){const t=e.oxw(2);e.xp6(2),e.hij("",t.profile.zipCode,",")}}function ko(i,a){if(1&i&&(e.TgZ(0,"div")(1,"strong"),e._uU(2),e.qZA()()),2&i){const t=e.oxw(2);e.xp6(2),e.Oqu(t.profile.town)}}function Do(i,a){if(1&i&&(e.TgZ(0,"div")(1,"strong"),e._uU(2),e.ALo(3,"transloco"),e.qZA(),e._uU(4),e._UZ(5,"br"),e.qZA()),2&i){const t=e.oxw(2);e.xp6(2),e.hij("",e.lcZ(3,2,"SCHOOL_NAME")," : "),e.xp6(2),e.Oqu(t.profile.schoolName)}}function Qo(i,a){1&i&&(e.TgZ(0,"div")(1,"strong"),e._uU(2),e.ALo(3,"transloco"),e.qZA()()),2&i&&(e.xp6(2),e.Oqu(e.l
1cZ(3,1,"NO_SUBSCRIPTION")))}function Go(i,a){1&i&&(e.TgZ(0,"tr",24)(1,"td"),e._uU(2,"Dont :"),e.qZA()())}function jo(i,a){if(1&i&&(e.TgZ(0,"tr",24)(1,"td"),e._uU(2,"Acc\xe8s librairie"),e.qZA(),e._UZ(3,"td"),e.TgZ(4,"td"),e._uU(5),e.qZA(),e.TgZ(6,"td"),e._uU(7),e.qZA(),e.TgZ(8,"td"),e._uU(9),e.qZA()()),2&i){const t=e.oxw(3);e.xp6(5),e.Oqu(t.subs[t.invoiceToLoad].htSubAmntForLibraryBefDisc),e.xp6(2),e.Oqu(t.subs[t.invoiceToLoad].tvaAmountForLibrary),e.xp6(2),e.Oqu(t.subs[t.invoiceToLoad].ttcSubAmntForLibraryBefDisc)}}function Ho(i,a){if(1&i&&(e.TgZ(0,"tr",24)(1,"td"),e._uU(2,"Module lecture"),e.qZA(),e._UZ(3,"td"),e.TgZ(4,"td"),e._uU(5),e.qZA(),e.TgZ(6,"td"),e._uU(7),e.qZA(),e.TgZ(8,"td"),e._uU(9),e.qZA()()),2&i){const t=e.oxw(3);e.xp6(5),e.Oqu(t.subs[t.invoiceToLoad].htSubAmntForReadModuleBefDisc),e.xp6(2),e.Oqu(t.subs[t.invoiceToLoad].tvaAmountForReadModule),e.xp6(2),e.Oqu(t.subs[t.invoiceToLoad].ttcSubAmntForReadModuleBefDisc)}}function Bo(i,a){if(1&i&&(e.TgZ(0,"div")(1,"table",20)(2,"thead",21)(3,"tr")(4,"th"),e._uU(5),e.ALo(6,"transloco"),e.qZA(),e.TgZ(7,"th"),e._uU(8),e.ALo(9,"transloco"),e.qZA(),e.TgZ(10,"th"),e._uU(11,"Prix HT"),e.qZA(),e.TgZ(12,"th"),e._uU(13,"TVA"),e.qZA(),e.TgZ(14,"th"),e._uU(15,"TTC"),e.qZA()()(),e.TgZ(16,"tbody")(17,"tr",22)(18,"td"),e._uU(19),e.qZA(),e.TgZ(20,"td"),e._uU(21),e.qZA(),e.TgZ(22,"td"),e._uU(23),e.qZA(),e.TgZ(24,"td"),e._uU(25),e.qZA(),e.TgZ(26,"td"),e._uU(27),e.qZA()(),e.YNc(28,Go,3,0,"tr",23),e.YNc(29,jo,10,3,"tr",23),e.YNc(30,Ho,10,3,"tr",23),e.qZA()()()),2&i){const t=e.oxw(2);
1e.xp6(5),e.Oqu(e.lcZ(6,10,"PRODUCT")),e.xp6(3),e.Oqu(e.lcZ(9,12,"QUANTITY")),e.xp6(11),e.Oqu(t.subs[t.invoiceToLoad].plan.name),e.xp6(2),e.Oqu(t.subs[t.invoiceToLoad].quantity),e.xp6(2),e.Oqu(t.subs[t.invoiceToLoad].htSubAmntForLibraryBefDisc+t.subs[t.invoiceToLoad].htSubAmntForReadModuleBefDisc),e.xp6(2),e.Oqu(t.subs[t.invoiceToLoad].tvaAmountForLibrary+t.subs[t.invoiceToLoad].tvaAmountForReadModule),e.xp6(2),e.Oqu(t.subs[t.invoiceToLoad].ttcSubAmntForLibraryBefDisc+t.subs[t.invoiceToLoad].ttcSubAmntForReadModuleBefDisc),e.xp6(1),e.Q6J("ngIf",t.subs[t.invoiceToLoad].htSubAmntForReadModuleBefDisc),e.xp6(1),e.Q6J("ngIf",t.subs[t.invoiceToLoad].htSubAmntForReadModuleBefDisc),e.xp6(1),e.Q6J("ngIf",t.subs[t.invoiceToLoad].htSubAmntForReadModuleBefDisc)}}function Ko(i,a){if(1&i&&(e.TgZ(0,"span")(1,"strong"),e._uU(2,"Sous total : "),e.qZA(),e._uU(3),e._UZ(4,"br"),e.qZA()),2&i){const t=e.oxw(2);e.xp6(3),e.AsE("",t.subs[t.invoiceToLoad].htSubAmntBefDisc," ",t.currency,"")}}function Wo(i,a){if(1&i&&(e.TgZ(0,"span")(1,"strong"),e._uU(2,"Remise : "),e.qZA(),e._uU(3),e._UZ(4,"br"),e.qZA()),2&i){const t=e.oxw(2);e.xp6(3),e.lnq("",t.subs[t.invoiceToLoad].discount," ",t.currency," (",(100*t.subs[t.invoiceToLoad].discountPercentage).toFixed(2),"%)")}}function $o(i,a){if(1&i&&(e.TgZ(0,"span")(1,"strong"),e._uU(2,"Commission : "),e.qZA(),e._uU(3),e._UZ(4,"br"),e.qZA()),2&i){const t=e.oxw(2);e.xp6(3),e.lnq("",t.subs[t.invoiceToLoad.commission]," ",t.currency," (",(100*t.subs[t.invoiceToLoad].commissionPercentage).toFixed(2),"%)")}}function zo(i,a){if(1&i&&(e.TgZ(0,"div"),e._uU(1),e.ALo(2,"date"),e.qZA()),2&i){const t=e.oxw(2);e.xp6(1),e.hij(" Paiement effectu\xe9 le ",e.xi3(2,1,t.subs[t.invoiceToLoad].startDate,"dd-MM-yyyy"),". ")}}function Vo(i,a){if(1&i&&(e.TgZ(0,"div",1)(1,"div",3)(2,"div",4)(3,"div",5)(4,"div",6)(5,"div",7)(6,"div",8)(7,"div",9)(8,"strong"),e._uU(9,"Storyplayr SAS"),e.qZA(),e._UZ(10,"br"),e._uU(11," 8 rue Martin Bernard"),e._UZ(12,"br"),e._uU(13," 75013 PARIS"),e._UZ(14,"br"),e.qZA()(),e.TgZ(15,"div",8),e._UZ(16,"img",10),e.qZA()()(),e.TgZ(17,"div",11)(18,"div",7)(19,"div",12),e.YNc(20,Io,5,3,"div",13),e.YNc(21,Uo,5,4,"div",13),e.YNc(22,wo,4,4,"div",13),e.qZA(),e.TgZ(23,"div",14),e.YNc(24,Jo,4,1,"div",13),e.YNc(25,Ro,4,1,"div",13),e.YNc(26,Yo,4,1,"div",13),e.YNc(27,Fo,3,1,"div",13),e.YNc(28,ko,3,1,"div",13),e.qZA()(),e.TgZ(29,"div",15)(30,"div",16)(31,"strong"),e._uU(32),e.ALo(33,"transloco"),e.qZA(),e._uU(34),e._UZ(35,"br"),e.TgZ(36,"strong"),e._uU(37),e.ALo(38,"transloco"),e.qZA(),e._uU(39),e._UZ(40,"br"),e.TgZ(41,"strong"),e._uU(42,"Email : "),e.qZA(),e._uU(43),e._UZ(44,"br"),e.YNc(45,Do,6,4,"div",13),e.qZA()()(),e.TgZ(46,"div",17),e.YNc(47,Qo,4,3,"div",18),e.YNc(48,Bo,31,14,"div",18),e.TgZ(49,"div",19),e.YNc(50,Ko,5,2,"span",13),e.YNc(51,Wo,5,3,"span",13),e.YNc(52,$o,5,3,"span",13),e.TgZ(53,"strong"),e._uU(54),e.ALo(55,"transloco"),e.qZA(),e._uU(56),e._UZ(57,"br"),e.TgZ(58,"strong"),e._uU(59),e.ALo(60,"transloco"),e.qZA(),e._uU(61),e._UZ(62,"br"),e.TgZ(63,"strong"),e._uU(64),e.ALo(65,"transloco"),e.qZA(),e._uU(66),e._UZ(67,"br"),e.qZA(),e.YNc(68,zo,3,4,"div",13),e.qZA()()()()()),2&i){const t=e.oxw();e.xp6(20),e.Q6J("ngIf",!t.subs[t.invoiceToLoad].externalInvoiceNumber),e.xp6(1),e.Q6J("ngIf",t.subs[t.invoiceToLoad].externalInvoiceNumber),e.xp6(1),e.Q6J("ngIf",t.subs[t.invoiceToLoad].startDate),e.xp6(2),e.Q6J("ngIf",t.profile.schoolName),e.xp6(1),e.Q6J("ngIf",t.profile.addressLine1),e.xp6(1),e.Q6J("ngIf",t.profile.addressLine2),e.xp6(1),e.Q6J("ngIf",t.profile.zipCode),e.xp6(1),e.Q6J("ngIf",t.profile.town),e.xp6(4),e.hij("",e.lcZ(33,30,"FIRSTNAME")," : "),e.xp6(2),e.Oqu(t.profile.firstName),e.xp6(3),e.hij("",e.lcZ(38,32,"LASTNAME")," : "),e.xp6(2),e.Oqu(t.profile.lastName),e.xp6(4),e.Oqu(t.profile.email),e.xp6(2),e.Q6J("ngIf",t.profile.schoolName),e.xp6(1),e.Q6J("ngSwitch",!!t.subs.length),e.xp6(1),e.Q6J("ngSwitchCase",!1),e.xp6(1),e.Q6J("ngSwitchCase",!0),e.xp6(2),e.Q6J("ngIf",t.subs[t.invoiceToLoad].discount||t.subs[t.invoiceToLoad].commission),e.xp6(1),e.Q6J("ngIf",t.subs[t.invoiceToLoad].discount),e.xp6(1),e.Q6J("ngIf",t.subs[t.invoiceToLoad].commission),e.xp6(2),e.hij("",e.lcZ(55,34,"PRICE_BEFORE_TAX")," : "),e.xp6(2),e.AsE("",t.subs[t.invoiceToLoad].htSubAmntAftDisc," ",t.currency,""),e.xp6(3),e.hij("",e.lcZ(60,36,"VAT")," : "),e.xp6(2),e.AsE("",t.subs[t.invoiceToLoad].tvaReducedAmount+t.subs[t.invoiceToLoad].tvaNormalAmount," ",t.currency,""),e.xp6(3),e.hij("",e.lcZ(65,38,"PRICE_AFTER_TAX")," : "),e.xp6(2),e.AsE("",t.subs[t.invoiceToLoad].ttcSubAmntAftDisc," ",t.currency,""),e.xp6(2),e.Q6J("ngIf",t.subs[t.invoiceToLoad].startDate)}}let Xo=(()=>{class i{constructor(t,n,o,s,l,c){this.stpSeo=t,this.stpConfig=n,this.stpSession=o,this.stpInvoice=s,this.stateService=l,this.stpSubscription=c,this.page="invoice",this.subs=[]}ngOnInit(){var t=this;return(0,E.Z)(function*(){t.stpSeo.setTitle("Ma facture"),t.profile=t.stpSession.getSession(),t.subs=yield t.stpSubscription.getMines(),t.invoiceToLoad=t.stateService.params.id,console.log(t.subs),t.currency=t.subs[t.invoiceToLoad].plan.currency&&"usd"===t.subs[t.invoiceToLoad].plan.currency?"$":"\u20ac",t.stpSession.fetchFromServerAndRefreshSession().then(o=>{t.profile=o,t.stpInvoice.getCustumerInfoById(t.profile._id).subscribe(s=>{t.profile.customer=s})})})()}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(M.i),e.Y36(f.P),e.Y36(m.i),e.Y36(ue),e.Y36(u.b2),e.Y36(q.z))},i.\u0275cmp=e.Xpm({type:i,selectors:[["stp-invoice"]],decls:2,vars:2,consts:[["class","container view",4,"ngIf"],[1,"container","view"],[2,"background","white","padding","15px 25px","margin-top","25px","box-shadow","0px 0px 6px gray"],[1,"row-fluid"],[1,"col-xs-12","col-sm-8","col-sm-offset-2"],[1,"stp-invoice","panel","panel-default"],[1,"stp-invoice-panel-header"],[1,"row","stp-invoice-row"],[1,"col-xs-6"],[1,"stp-invoice-adress"],["alt","storyplayr","src","assets/images/v2/logo.png",1,"stp-invoice-logo"],[1,"stp-invoice-panel-body"],[1,"col-xs-8"],[4,"ngIf"],[1,"col-xs-4"],[1,"row"],[1,"col-xs-12"],[3,"ngSwitch"],[4,"ngSwitchCase"],[1,"offset-8","col-4","table-bordered","stp-pa
1dded-container"],[1,"table","table-bordered"],[1,"stp-invoice-thead-default"],[1,"invoice-no-border"],["class","invoice-detail",4,"ngIf"],[1,"invoice-detail"]],template:function(t,n){1&t&&(e.YNc(0,Oo,4,3,"div",0),e.YNc(1,Vo,69,40,"div",0)),2&t&&(e.Q6J("ngIf",n.subs&&n.subs[0]&&"stripe"!==n.subs[n.invoiceToLoad].invoicePlatform),e.xp6(1),e.Q6J("ngIf",n.subs&&n.subs[0]&&"stripe"===n.subs[n.invoiceToLoad].invoicePlatform))},dependencies:[p.O5,p.RF,p.n9,h.Ot,p.uU],encapsulation:2}),i})();function es(i,a){1&i&&(e.TgZ(0,"p",50),e._uU(1),e.ALo(2,"transloco"),e.qZA()),2&i&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"ERR_REQ")," "))}function ts(i,a){if(1&i&&(e.TgZ(0,"div"),e.YNc(1,es,3,3,"p",49),e.qZA()),2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",t.kdoForm.senderLastName.$error.required)}}function is(i,a){1&i&&(e.TgZ(0,"p",50),e._uU(1),e.ALo(2,"transloco"),e.qZA()),2&i&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"ERR_REQ")," "))}function ns(i,a){if(1&i&&(e.TgZ(0,"div"),e.YNc(1,is,3,3,"p",49),e.qZA()),2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",t.kdoForm.senderFirstName.$error.required)}}function os(i,a){1&i&&(e.TgZ(0,"p",50),e._uU(1),e.ALo(2,"transloco"),e.qZA()),2&i&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"ERR_REQ")," "))}function ss(i,a){1&i&&(e.TgZ(0,"p",50),e._uU(1," L'email n'est pas valide. "),e.qZA())}function as(i,a){if(1&i&&(e.TgZ(0,"div"),e.YNc(1,os,3,3,"p",49),e.YNc(2,ss,2,0,"p",49),e.qZA()),2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",t.kdoForm.senderEmail.$error.required),e.xp6(1),e.Q6J("ngIf",t.kdoForm.senderEmail.$error.email)}}function rs(i,a){1&i&&(e.TgZ(0,"p",50),e._uU(1),e.ALo(2,"transloco"),e.qZA()),2&i&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"ERR_REQ")," "))}function ls(i,a){if(1&i&&(e.TgZ(0,"div"),e.YNc(1,rs,3,3,"p",49),e.qZA()),2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",t.kdoForm.recipientLastName.$error.required)}}function cs(i,a){1&i&&(e.TgZ(0,"p",50),e._uU(1),e.ALo(2,"transloco"),e.qZA()),2&i&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"ERR_REQ")," "))}function ps(i,a){if(1&i&&(e.TgZ(0,"div"),e.YNc(1,cs,3,3,"p",49),e.qZA()),2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",t.kdoForm.recipientFirstName.$error.required)}}function ds(i,a){1&i&&(e.TgZ(0,"p",50),e._uU(1," Email requis. "),e.qZA())}function us(i,a){1&i&&(e.TgZ(0,"p",50),e._uU(1," L'email n'est pas valide. "),e.qZA())}function gs(i,a){if(1&i&&(e.TgZ(0,"div"),e.YNc(1,ds,2,0,"p",49),e.YNc(2,us,2,0,"p",49),e.qZA()),2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",t.kdoForm.recipientEmail.$error.required),e.xp6(1),e.Q6J("ngIf",t.kdoForm.recipientEmail.$error.email)}}function _s(i,a){1&i&&(e.TgZ(0,"p",50),e._uU(1," Num\xe9ro de carte requis "),e.qZA())}function ms(i,a){if(1&i&&(e.TgZ(0,"div"),e.YNc(1,_s,2,0,"p",49),e.qZA()),2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",t.kdoForm.cardNumber.$error.required)}}const J=function(i,a){return{"has-error":i,"has-success":a}};let hs=(()=>{class i{constructor(t,n,o,s,l){this.stpSeo=t,this.stpConfig=n,this.stpLangageService=o,this.apiService=s,this.Flash=l}ngOnInit(){this.page="giftcard",this.stpSeo.setTitle("Offrir storyplayr"),this.kdo.plan="yearly4999"}submit(t){t.$invalid||(this.ui.isSubmitting=!0,Stripe.card.createToken({number:this.kdo.cardNumber,cvc:this.kdo.cardCrypto,exp_month:this.kdo.cardExpMonth,exp_year:this.kdo.cardExpYear},function(n,o){this.$apply(function(){if(o.error)return this.Flash.errorTranslate(o.error.code),this.ui.isSubmitting=!1,this.ui.submissionStatus="ko";this.apiService.post(this.stpConfig.api+"/api/cartekdo",{senderFirstName:this.kdo.senderFirstName,senderLastName:this.kdo.senderLastName,senderEmail:this.kdo.senderEmail,recipientFirstName:this.kdo.recipientFirstName,recipientLastName:this.kdo.recipientLastName,recipientEmail:this.kdo.recipientEmail,stripeToken:o.id,plan:this.kdo.plan}).then(s=>{setTimeout(()=>{this.stateService.go(this.stpConfig.langPrefix+"giftcard",{code:s.data.code})},300)}).catch(s=>{this.ui.submissionStatus="ko",this.ui.isSubmitting=!1,this.Flash.errorTranslate("ERROR.KDO.cantCreate"),console.log(s)})})}))}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(M.i),e.Y36(f.P),e.Y36(C.s),e.Y36(v.s),e.Y36(N.M))},i.\u0275cmp=e.Xpm({type:i,selectors:[["stp-gift-card"]],decls:163,vars:183,consts:[[1,"container","stp-container-v3"],[1,"col-xs-12","stp-box-sha
1dow","stp-signup-container"],[1,"stp-title-red","text-center","marged-top-half","marged-bot-none"],["name","kdoForm","novalidate","",1,"marged-top-none",3,"submit"],[1,"row-fluid"],[1,"col-xs-12","col-sm-7"],[1,"stp-center-block","offer","text-left",2,"margin-top","1rem"],[1,"stp-records-list--title",2,"margin-bottom","3px"],[1,"marged-bot-half","stp-small-explanations"],[1,"form-group",3,"ngClass"],["required","","name","senderLastName","type","text",1,"form-control",3,"ngModel","disabled","placeholder","ngModelChange"],[4,"ngIf"],["name","senderFirstName","required","","type","text",1,"form-control",3,"disabled","ngModel","placeholder","ngModelChange"],["required","","name","senderEmail","type","email","placeholder","Votre email",1,"form-control",3,"ngModel","disabled","ngModelChange"],[2,"height","3px"],["required","","name","recipientLastName","type","text",1,"form-control",3,"disabled","ngModel","placeholder","ngModelChange"],["name","recipientFirstName","required","","type","text",1,"form-control",3,"ngModel","disabled","placeholder","ngModelChange"],["name","recipientEmail","required","","type","email",1,"form-control",3,"ngModel","disabled","placeholder","ngModelChange"],[1,"stp-records-list--title",2,"margin-bottom","0px"],[2,"margin-right","15px"],["height","25","alt","CB","ng-src","/assets/images/payment/CB.gif"],["height","25","alt","MasterCard","ng-src","/assets/images/payment/MasterCard.gif"],["height","25","alt","Visa","ng-src","/assets/images/payment/Visa.gif"],[1,"row"],[1,"form-group","col-xs-12",3,"ngClass"],["for","inputCardNum"],["id","inputCardNum","required","","name","cardNumber","type","text","placeholder","Num\xe9ro de carte",1,"form-control",3,"ngModel","disabled","ngModelChange"],[1,"form-group","col-xs-4",3,"ngClass"],["name","cardExpMonth","required","","type","text","placeholder","MM",1,"form-control",3,"ngModel","disabled","ngModelChange"],["required","","name","cardExpYear","type","text","placeholder","YYYY",1,"form-control",3,"ngModel","disabled","ngModelChange"],[1,"form-group","col-sm-4",3,"ngClass"],["for","inputCrypto"],["required","","name","cardCrypto","type","text","placeholder","CVC","id","inputCrypto",1,"form-control",3,"ngModel","disabled","ngModelChange"],[1,"text-center"],["type","submit",1,"btn","stp-btn-blue",3,"disabled"],[1,"col-xs-12","col-sm-5"],[1,"offer","marged-bot"],[1,"stp-small-explanations"],[1,"marged-top"],[1,"table","table-condensed"],[2,"border","0px"],[1,"stp-gift-family"],[1,"stp-gift-family-top"],[1,"stp-gift-family-bottom","marged-bot-half"],[1,"stp-btn-emphase","azur",3,"uiSref"],[2,"height","20px"],["src","/images/payment/ssl.jpg","alt","ssl",2,"height","30px"],["src","/images/payment/pci.png","alt","pci",2,"height","30px"],[1,"clearfix"],["class","help-block",4,"ngIf"],[1,"help-block"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"h2",2),e._uU(3),e.ALo(4,"transloco"),e.qZA(),e.TgZ(5,"form",3),e.NdJ("submit",function(){return n.submit(n.kdoForm)}),e.TgZ(6,"div",4)(7,"div",5)(8,"div",6)(9,"h3",7),e._uU(10),e.ALo(11,"transloco"),e.qZA(),e.TgZ(12,"div",8),e._uU(13),e.ALo(14,"transloco"),e.TgZ(15,"strong"),e._uU(16),e.ALo(17,"transloco"),e.qZA(),e._uU(18),e.ALo(19,"transloco"),e.qZA(),e.TgZ(20,"div",9)(21,"input",10),e.NdJ("ngModelChange",function(s){return n.kdo.senderLastName=s}),e.ALo(22,"transloco"),e.qZA(),e.YNc(23,ts,2,1,"div",11),e.qZA(),e.TgZ(24,"div",9)(25,"input",12),e.NdJ("ngModelChange",function(s){return n.kdo.senderFirstName=s}),e.ALo(26,"transloco"),e.qZA(),e.YNc(27,ns,2,1,"div",11),e.qZA(),e.TgZ(28,"div",9)(29,"input",13),e.NdJ("ngModelChange",function(s){return n.kdo.senderEmail=s}),e.qZA(),e.YNc(30,as,3,2,"div",11),e.qZA(),e._UZ(31,"div",14),e.TgZ(32,"h3",7),e._uU(33),e.ALo(34,"transloco"),e.qZA(),e.TgZ(35,"div",8),e._uU(36),e.ALo(37,"transloco"),e.TgZ(38,"strong"),e._uU(39),e.ALo(40,"transloco"),e.qZA(),e._uU(41),e.ALo(42,"transloco"),e.TgZ(43,"strong"),e._uU(44),e.ALo(45,"transloco"),e.qZA()(),e.TgZ(46,"div",9)(47,"input",15),e.NdJ("ngModelChange",function(s){return n.kdo.recipientLastName=s}),e.ALo(48,"transloco"),e.qZA(),e.YNc(49,ls,2,1,"div",11),e.qZA(),e.TgZ(50,"div",9)(51,"input",16),e.NdJ("ngModelChange",function(s){return n.kdo.recipientFirstName=s}),e.ALo(52,"transloco"),e.qZA(),e.YNc(53,ps,2,1,"div",11),e.qZA(),e.TgZ(54,"div",9)(55,"input",17),e.NdJ("ngModelChange",function(s){return n.kdo.recipientEmail=s}),e.ALo(56,"transloco"),e.qZA(),e.YNc(57,gs,3,2,"div",11),e.qZA(),e._UZ(58,"div",14),e.TgZ(59,"h3",18)(60,"span",19),e._uU(61),e.ALo(62,"transloco"),e.qZA()(),e.TgZ(63,"div",8),e._uU(64),e.ALo(65,"transloco"),e.TgZ(66,"div"),e._UZ(67,"img",20)(68,"img",21)(69,"img",22),e.qZA()(),e.TgZ(70,"div",23)(71,"div",24)(72,"label",25),e._uU(73),e.ALo(74,"transloco"),e.qZA(),e.TgZ(75,"input",26),e.NdJ("ngModelChange",function(s){return n.kdo.cardNumber=s}),e.qZA(),e.YNc(76,ms,2,1,"div",11),e.qZA()(),e.TgZ(77,"div",23)(78,"div",27)(79,"label"),e._uU(80),e.ALo(81,"transloco"),e.qZA(),e.TgZ(82,"input",28),e.NdJ("ngModelChange",function(s){return n.kdo.cardExpMonth=s}),e.qZA()(),e.TgZ(83,"div",27)(84,"label"),e._uU(85),e.ALo(86,"transloco"),e.qZA(),e.TgZ(87,"input",29),e.NdJ("ngModelChange",function(s){return n.kdo.cardExpYear=s}),e.qZA()(),e.TgZ(88,"div",30)(89,"label",31),e._uU(90),e.ALo(91,"transloco"),e.qZA(),e.TgZ(92,"input",32),e.NdJ("ngModelChange",function(s){return n.kdo.cardCrypto=s}),e.qZA()()(),e.TgZ(93,"div",33)(94,"button",34),e._uU(95),e.ALo(96,"transloco"),e.qZA()()()(),e.TgZ(97,"div",35)(98,"div",36)(99,"div")(100,"strong"),e._uU(101),e.ALo(102,"transloco"),e.qZA()(),e.TgZ(103,"div",37),e._uU(104),e.ALo(105,"transloco"),e.qZA(),e.TgZ(106,"div",38)(107,"table",39)(108,"tr",40)(109,"td"),e._uU(110),e.ALo(111,"transloco"),e.qZA(),e.TgZ(112,"td"),e._uU(113,"41,66\u20ac"),e.qZA()(),e.TgZ(114,"tr")(115,"td"),e._uU(116),e.ALo(117,"transloco"),e.qZA(),e.TgZ(118,"td"),e._uU(119,"8,33\u20ac"),e.qZA()(),e.TgZ(120,"tr")(121,"td")(122,"strong"),e._uU(123),e.ALo(124,"transloco"),e.qZA()(),e.TgZ(125,"td")(126,"strong"),e._uU(127,"49,99\u20ac"),e.qZA()()()()(),e.TgZ(128,"div",41)(129,"div",42)(130,"strong"),e._uU(131),e.ALo(132,"transloco"),e.qZA(),e._UZ(133,"br"),e._uU(134),e.ALo(135,"transloco"),e.qZA(),e.TgZ(136,"div",43)(137,"a",44),e._uU(138),e.ALo(139,"transloco"),e.qZA()()(),e.TgZ(140,"div")(141,"strong"),e._uU(142),e.ALo(143,"transloco"),e.qZA()(),e.TgZ(144,"div",37),e._uU(145),e.ALo(146,"transloco"),e.ALo(147,"transloco"),e.ALo(148,"transloco"),e.ALo(149,"transloco"),e.ALo(150,"transloco"),e.qZA(),e._UZ(151,"div",45),e.TgZ(152,"div")(153,"strong"),e._uU(154),e.ALo(155,"transloco"),e.qZA()(),e.TgZ(156,"p",37),e._uU(157),e.ALo(158,"transloco"),e.qZA(),e.TgZ(159,"div"),e._UZ(160,"img",46)(161,"img",47),e.qZA()()()(),e._UZ(162,"div",48),e.qZA()()()),2&t&&(e.xp6(3),e.hij(" ",e.lcZ(4,77,"OFR_TITLE")," "),e.xp6(7),e.hij(" ",e.lcZ(11,79,"OFR_3-1")," "),e.xp6(3),e.hij(" ",e.lcZ(14,81,"OFR_3-2")," "),e.xp6(3),e.Oqu(e.l
1cZ(17,83,"OFR_3-3")),e.xp6(2),e.hij(" ",e.lcZ(19,85,"OFR_3-4")," "),e.xp6(2),e.Q6J("ngClass",e.WLB(153,J,n.kdoForm.senderLastName.$invalid&&n.kdoForm.senderLastName.$dirty,n.kdoForm.senderLastName.$valid)),e.xp6(1),e.MGl("placeholder","",e.lcZ(22,87,"LASTNAME"),"*"),e.Q6J("ngModel",n.kdo.senderLastName)("disabled",n.ui.isSubmitting),e.xp6(2),e.Q6J("ngIf",n.kdoForm.senderLastName.$dirty),e.xp6(1),e.Q6J("ngClass",e.WLB(156,J,n.kdoForm.senderFirstName.$invalid&&n.kdoForm.senderFirstName.$dirty,n.kdoForm.senderFirstName.$valid)),e.xp6(1),e.MGl("placeholder","",e.lcZ(26,89,"FIRSTNAME"),"*"),e.Q6J("disabled",n.ui.isSubmitting)("ngModel",n.kdo.senderFirstName),e.xp6(2),e.Q6J("ngIf",n.kdoForm.senderFirstName.$dirty),e.xp6(1),e.Q6J("ngClass",e.WLB(159,J,n.kdoForm.senderEmail.$invalid&&n.kdoForm.senderEmail.$dirty,n.kdoForm.senderEmail.$valid)),e.xp6(1),e.Q6J("ngModel",n.kdo.senderEmail)("disabled",n.ui.isSubmitting),e.xp6(1),e.Q6J("ngIf",n.kdoForm.senderEmail.$dirty),e.xp6(3),e.hij(" ",e.lcZ(34,91,"OFR_4-1")," "),e.xp6(3),e.hij(" ",e.lcZ(37,93,"OFR_4-2")," "),e.xp6(3),e.Oqu(e.lcZ(40,95,"OFR_4-3")),e.xp6(2),e.hij(" ",e.lcZ(42,97,"OFR_4-4")," "),e.xp6(3),e.Oqu(e.lcZ(45,99,"OFR_4-5")),e.xp6(2),e.Q6J("ngClass",e.WLB(162,J,n.kdoForm.recipientLastName.$invalid&&n.kdoForm.recipientLastName.$dirty,n.kdoForm.recipientLastName.$valid)),e.xp6(1),e.MGl("placeholder","",e.lcZ(48,101,"LASTNAME"),"*"),e.Q6J("disabled",n.ui.isSubmitting)("ngModel",n.kdo.recipientLastName),e.xp6(2),e.Q6J("ngIf",n.kdoForm.recipientLastName.$dirty),e.xp6(1),e.Q6J("ngClass",e.WLB(165,J,n.kdoForm.recipientFirstName.$invalid&&n.kdoForm.recipientFirstName.$dirty,n.kdoForm.recipientFirstName.$valid)),e.xp6(1),e.MGl("placeholder","",e.lcZ(52,103,"FIRSTNAME"),"*"),e.Q6J("ngModel",n.kdo.recipientFirstName)("disabled",n.ui.isSubmitting),e.xp6(2),e.Q6J("ngIf",n.kdoForm.recipientFirstName.$dirty),e.xp6(1),e.Q6J("ngClass",e.WLB(168,J,n.kdoForm.recipientEmail.$invalid&&n.kdoForm.recipientEmail.$dirty,n.kdoForm.recipientEmail.$valid)),e.xp6(1),e.MGl("placeholder","",e.lcZ(56,105,"EMAIL"),"*"),e.Q6J("ngModel",n.kdo.recipientEmail)("disabled",n.ui.isSubmitting),e.xp6(2),e.Q6J("ngIf",n.kdoForm.recipientEmail.$dirty),e.xp6(4),e.Oqu(e.lcZ(62,107,"OFR_5-1")),e.xp6(3),e.hij(" ",e.lcZ(65,109,"OFR_5-2")," "),e.xp6(7),e.Q6J("ngClass",e.WLB(171,J,n.kdoForm.cardNumber.$invalid&&n.kdoForm.cardNumber.$dirty,n.kdoForm.cardNumber.$valid)),e.xp6(2),e.hij(" ",e.lcZ(74,111,"CARD_NUMBER")," "),e.xp6(2),e.Q6J("ngModel",n.kdo.cardNumber)("disabled",n.ui.isSubmitting),e.xp6(1),e.Q6J("ngIf",n.kdoForm.cardNumber.$dirty),e.xp6(2),e.Q6J("ngClass",e.WLB(174,J,n.kdoForm.cardExpMonth.$invalid&&n.kdoForm.cardExpMonth.$dirty,n.kdoForm.cardExpMonth.$valid)),e.xp6(2),e.Oqu(e.lcZ(81,113,"CARD_EXPMONTH")),e.xp6(2),e.Q6J("ngModel",n.kdo.cardExpMonth)("disabled",n.ui.isSubmitting),e.xp6(1),e.Q6J("ngClass",e.WLB(177,J,n.kdoForm.cardExpYear.$invalid&&n.kdoForm.cardExpYear.$dirty,n.kdoForm.cardExpYear.$valid)),e.xp6(2),e.Oqu(e.lcZ(86,115,"CARD_EXPYEAR")),e.xp6(2),e.Q6J("ngModel",n.kdo.cardExpYear)("disabled",n.ui.isSubmitting),e.xp6(1),e.Q6J("ngClass",e.WLB(180,J,n.kdoForm.cardCrypto.$invalid&&n.kdoForm.cardCrypto.$dirty,n.kdoForm.cardCrypto.$valid)),e.xp6(2),e.Oqu(e.lcZ(91,117,"CARD_CRYPTO")),e.xp6(2),e.Q6J("ngModel",n.kdo.cardCrypto)("disabled",n.ui.isSubmitting),e.xp6(2),e.Q6J("disabled",n.kdoForm.$invalid||n.ui.isSubmitting),e.xp6(1),e.hij(" ",e.lcZ(96,119,"SUBSCRIBE")," "),e.xp6(6),e.Oqu(e.lcZ(102,121,"ORDER_DETAIL")),e.xp6(3),e.hij(" ",e.lcZ(105,123,"GIFT_ONE_YEAR_UNLIMITED_ACCESS")," "),e.xp6(6),e.hij("",e.lcZ(111,125,"PRICE_BEFORE_TAX"),":"),e.xp6(6),e.Oqu(e.lcZ(117,127,"VAT")),e.xp6(7),e.Oqu(e.l
1cZ(124,129,"PRICE_AFTER_TAX")),e.xp6(8),e.Oqu(e.lcZ(132,131,"YOU_WANT_TO_SHARE")),e.xp6(3),e.hij(" ",e.lcZ(135,133,"POSSIBLE_WITH_FAMILY_PLAN")," "),e.xp6(3),e.Q6J("uiSref",n.stpLangageService.langPrefix+"subscribe"),e.xp6(1),e.hij(" ",e.lcZ(139,135,"I_WANT_TO_KNOW_MORE")," "),e.xp6(4),e.Oqu(e.lcZ(143,137,"SATISFY-1")),e.xp6(3),e.xDo(" ",e.lcZ(146,139,"SATISFY-2"),"",e.lcZ(147,141,"SATISFY-3"),"",e.lcZ(148,143,"SATISFY-4"),"",e.lcZ(149,145,"SATISFY-5")," ",e.lcZ(150,147,"SATISFY-6")," "),e.xp6(9),e.Oqu(e.lcZ(155,149,"PAYMENT_SECURITY")),e.xp6(3),e.hij(" ",e.lcZ(158,151,"PAYMENT_EXPLAIN")," "))},dependencies:[_.bcJ,_.KeH,p.mk,p.O5,r._Y,r.Fj,r.JJ,r.JL,r.Q7,r.On,r.F,h.Ot],encapsulation:2}),i})();function fs(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div")(1,"h2",8),e._uU(2),e.ALo(3,"transloco"),e.qZA(),e.TgZ(4,"div",9)(5,"button",10),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.print())}),e._uU(6),e.ALo(7,"transloco"),e.qZA(),e.TgZ(8,"button",10),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.ui.stateMail=!0)}),e._uU(9),e.ALo(10,"transloco"),e.qZA()(),e.TgZ(11,"stpModalDialog",11),e.NdJ("close",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.cancelMail())}),e.TgZ(12,"h2",12),e._uU(13),e.ALo(14,"transloco"),e.qZA(),e.TgZ(15,"form",13),e.NdJ("submit",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.sendMail())}),e.TgZ(16,"div",14)(17,"input",15),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.mail.receiver=o)}),e.ALo(18,"transloco"),e.qZA()(),e.TgZ(19,"div",14)(20,"textarea",16),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.mail.content=o)}),e.ALo(21,"transloco"),e.qZA()(),e.TgZ(22,"button",17),e._uU(23),e.ALo(24,"transloco"),e.qZA(),e.TgZ(25,"button",18),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.cancelMail())}),e._uU(26),e.ALo(27,"transloco"),e.qZA()()(),e.TgZ(28,"div",19),e._UZ(29,"img",20),e.qZA(),e.TgZ(30,"div",21),e._uU(31),e.ALo(32,"transloco"),e.TgZ(33,"strong",22)(34,"a",23),e._uU(35),e.qZA()(),e.TgZ(36,"strong",24),e._uU(37),e.qZA()()()}if(2&i){const t=e.oxw();e.xp6(2),e.hij(" ",e.lcZ(3,21,"GIFT_READY")," "),e.xp6(4),e.Oqu(e.lcZ(7,23,"GIFT_PRINT")),e.xp6(3),e.Oqu(e.lcZ(10,25,"GIFT_MAIL")),e.xp6(2),e.Q6J("show",t.ui.stateMail),e.xp6(2),e.hij(" ",e.lcZ(14,27,"GIFT_MAIL")," "),e.xp6(4),e.MGl("placeholder","",e.lcZ(18,29,"DEST_MAIL"),"*"),e.Q6J("ngModel",t.mail.receiver)("disabled",t.ui.stateSending),e.xp6(3),e.s9C("placeholder",e.lcZ(21,31,"PERSONAL_MSG")),e.Q6J("ngModel",t.mail.content)("disabled",t.ui.stateSending),e.xp6(2),e.Q6J("disabled",t.ui.stateSending),e.xp6(1),e.Oqu(e.lcZ(24,33,"SEND")),e.xp6(2),e.Q6J("disabled",t.ui.stateSending),e.xp6(1),e.Oqu(e.lcZ(27,35,"CANCEL")),e.xp6(5),e.hij(" ",e.lcZ(32,37,"GIFT_READY-1")," "),e.xp6(3),e.Q6J("href","/gift/"+t.card.code,e.LSH),e.xp6(1),e.AsE("",t.stpConfig.app,"/gift/",t.card.code,""),e.xp6(2),e.AsE(" ",t.stpConfig.app,"/gift/",t.card.code," ")}}let vs=(()=>{class i{constructor(t,n,o,s,l){this.stpSeo=t,this.stpConfig=n,this.apiService=o,this.Flash=s,this.stateService=l,this.card=null,this.mail={receiver:null,content:void 0},this.user={firstName:null,lastName:null,email:null,codekdo:null},this.ui={isLoaded:null,stateSending:void 0,stateMail:!1},this.print=function(){window.print()},this.sendMail=function(){this.ui.stateSending=!0,this.mail.senderName=this.card.senderFirstName+" "+this.card.senderLastName,this.mail.giftlink=this.stpConfig.app+"/gift/"+this.card.code,this.apiService.post(this.stpConfig.api+"/api/cartekdo/sendmail/"+this.stateService.params.code,this.mail).then(()=>{this.Flash.successTranslate("SUCCESS.KDO.mailSent")}).catch(function(c){console.log(c)}).finally(function(){this.ui.stateSending=!1,this.ui.stateMail=!1})},this.cancelMail=function(){this.mail={},this.mail.receiver=this.card.recipientEmail,this.ui.stateMail=!1}}ngOnInit(){this.page="carte-cadeau",this.stpSeo.setTitle("Carte cadeau"),this.apiService.get(this.stpConfig.api+"/api/cartekdo/bycode/"+this.stateService.params.code).subscribe(t=>{this.ui.isLoaded=!0,this.card=t.data,this.user.firstName=this.card.recipientFirstName,this.user.lastName=this.card.recipientLastName,this.user.email=this.card.recipientEmail,this.user.codekdo=this.card.code,this.mail.receiver=this.card.recipientEmail})}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(M.i),e.Y36(f.P),e.Y36(v.s),e.Y36(N.M),e.Y36(u.b2))},i.\u0275cmp=e.Xpm({type:i,selectors:[["stp-gift-card-view"]],decls:8,vars:1,consts:[[1,"container-fluid","stp-container"],[1,"row-fluid"],[1,"col-xs-12","col-sm-6","col-sm-offset-3","text-center"],["ng-show","!ui.isLoaded",1,"spinner"],[1,"dot1"],[1,"dot2"],[4,"ngIf"],[1,"clearfix"],[1,"stp-title-red"],[1,"marged-bot-half","hidden-print"],[1,"btn","btn-primary",3,"click"],[3,"show","close"],[1,"stp-title-red",2,"margin","1px 0 20px 0","text-align","center"],["name","form",3,"submit"],[1,"form-group"],["type","email","required","",1,"form-control",3,"ngModel","disabled","placeholder","ngModelChange"],["focus-me","!!ui.stateMail","cols","30","rows","5",1,"form-control",3,"ngModel","disabled","placeholder","ngModelChange"],["type","submit",1,"btn","btn-default",3,"disabled"],["type","button",1,"btn","btn-default",3,"disabled","click"],[1,"marged-bot-half"],["src","/images/v2/giftcard.jpg","alt","",2,"width","90%"],[1,"center-block","marged-bot-half",2,"font-size","13px","width","80%"],[1,"hidden-print"],[3,"href"],[1,"visible-print",2,"font-size","20px"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),e._UZ(4,"div",4)(5,"div",5),e.qZA(),e.YNc(6,fs,38,39,"div",6),e.qZA(),e._UZ(7,"div",7),e.qZA()()),2&t&&(e.xp6(6),e.Q6J("ngIf",!!n.card))},dependencies:[p.O5,r._Y,r.Fj,r.JJ,r.JL,r.Q7,r.On,r.F,G.Z,h.Ot],encapsulation:2}),i})();function Ss(i,a){1&i&&(e.TgZ(0,"p",16),e._uU(1," Les mots de passe ne correspondent pas. "),e.qZA())}const As=function(){return{page:"cgu"}};let Zs=(()=>{class i{constructor(t,n,o,s,l,c,g){this.stpSeo=t,this.apiService=n,this.stpSession=o,this.stpConfig=s,this.stpLangageService=l,this.stpAuthService=c,this.stateService=g,this.ui={isLoaded:!1,pending:!1},this.card=null,this.user={acceptTerms:null,repeatPassword:null,password:null,firstName:null,lastName:null,email:null,codekdo:null}}ngOnInit(){var t=this;return(0,E.Z)(function*(){t.signupForm=new r.cw({password:new r.NI("",r.kI.minLength(1)),repeatPassword:new r.NI("",r.kI.minLength(1))}),t.stpSeo.setTitle("Cadeau"),t.giftcard=yield t.apiService.get(t.
1stpConfig.api+"/api/cartekdo/bycode/"+t.stateService.params.code).toPromise(),t.ui.isLoaded=!0,t.card=t.giftcard.data,t.user.firstName=t.card.recipientFirstName,t.user.lastName=t.card.recipientLastName,t.user.email=t.card.recipientEmail,t.user.codekdo=t.card.code})()}signup(){this.ui.pending=!0,this.apiService.put(this.stpConfig.api+"/api/cartekdo/usecard",{password:this.user.password,email:this.user.email,code:this.stateService.params.code}).subscribe(()=>{this.stpAuthService.login({identifier:this.user.email,password:this.user.password,clientVersion:"1.3"},t=>{this.ui.pending=!1,!t&&this.stpSession.fetchFromServerAndRefreshSession().then(()=>{this.stateService.go(this.stpLangageService.langPrefix+"bibliotheque")})})},t=>{console.log(t),this.ui.pending=!1})}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(M.i),e.Y36(v.s),e.Y36(m.i),e.Y36(f.P),e.Y36(C.s),e.Y36(P.b),e.Y36(u.b2))},i.\u0275cmp=e.Xpm({type:i,selectors:[["stp-gift"]],decls:37,vars:45,consts:[[1,"container","view"],[1,"row"],[1,"col-xs-12","col-sm-6","col-sm-offset-3","col-sm-4","col-sm-offset-3"],[1,"text-center","marged-bot"],[1,"stp-title-red"],[1,"stp-center-block",2,"padding-top","1em",3,"formGroup","submit"],[1,"form-group"],["required","","type","text",1,"form-control",3,"ngModel","disabled","placeholder","ngModelChange"],["name","email","required","","type","email",1,"form-control",3,"disabled","placeholder","ngModel","ngModelChange"],["name","password","required","","focus-me","true","formControlName","password","type","password",1,"form-control",3,"disabled","placeholder","ngModel","ngModelChange"],["name","repeatPassword","formControlName","repeatPassword","required","","type","password",1,"form-control",3,"disabled","placeholder","ngModel","ngModelChange"],["class","help-block",4,"ngIf"],[1,"checkbox"],["type","checkbox","required","true",3,"ngModel","disabled","ngModelChange"],["target","_blank",3,"uiSref","uiParams"],[1,"btn","btn-success","btn-block",3,"disabled"],[1,"help-block"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"h3",4),e._uU(5),e.ALo(6,"transloco"),e.qZA(),e._uU(7),e.ALo(8,"transloco"),e.qZA(),e.TgZ(9,"form",5),e.NdJ("submit",function(){return n.signup()}),e.TgZ(10,"div",6)(11,"input",7),e.NdJ("ngModelChange",function(s){return n.user.lastName=s}),e.ALo(12,"transloco"),e.qZA()(),e.TgZ(13,"div",6)(14,"input",7),e.NdJ("ngModelChange",function(s){return n.user.firstName=s}),e.ALo(15,"transloco"),e.qZA()(),e.TgZ(16,"div",6)(17,"input",8),e.NdJ("ngModelChange",function(s){return n.user.email=s}),e.ALo(18,"transloco"),e.qZA()(),e.TgZ(19,"div",6)(20,"input",9),e.NdJ("ngModelChange",function(s){return n.user.password=s}),e.ALo(21,"transloco"),e.qZA()(),e.TgZ(22,"div",6)(23,"input",10),e.NdJ("ngModelChange",function(s){return n.user.repeatPassword=s}),e.ALo(24,"transloco"),e.qZA(),e.YNc(25,Ss,2,0,"p",11),e.qZA(),e.TgZ(26,"div",6)(27,"div",12)(28,"label")(29,"input",13),e.NdJ("ngModelChange",function(s){return n.user.acceptTerms=s}),e.qZA(),e._uU(30),e.ALo(31,"transloco"),e.TgZ(32,"a",14),e._uU(33),e.ALo(34,"transloco"),e.qZA()()()(),e.TgZ(35,"button",15),e._uU(36," M'inscrire "),e.qZA()()()()()),2&t&&(e.xp6(5),e.Oqu(e.l
1cZ(6,26,"ACTIVATE_GIFT")),e.xp6(2),e.hij(" ",e.lcZ(8,28,"ACTIVATE_GIFT-EXPLAIN")," "),e.xp6(2),e.Q6J("formGroup",n.signupForm),e.xp6(2),e.MGl("placeholder","",e.lcZ(12,30,"LASTNAME"),"*"),e.Q6J("ngModel",n.user.lastName)("disabled",n.ui.pending),e.xp6(3),e.MGl("placeholder","",e.lcZ(15,32,"FIRSTNAME"),"*"),e.Q6J("ngModel",n.user.firstName)("disabled",n.ui.pending),e.xp6(3),e.MGl("placeholder","",e.lcZ(18,34,"EMAIL"),"*"),e.Q6J("disabled",n.ui.pending)("ngModel",n.user.email),e.xp6(3),e.MGl("placeholder","",e.lcZ(21,36,"CHOOSEPASSWORD"),"*"),e.Q6J("disabled",n.ui.pending)("ngModel",n.user.password),e.xp6(3),e.MGl("placeholder","",e.lcZ(24,38,"CONFIRMPASSWORD"),"*"),e.Q6J("disabled",n.ui.pending)("ngModel",n.user.repeatPassword),e.xp6(2),e.Q6J("ngIf",""!==n.user.password&&""!==n.user.repeatPassword&&n.user.password!==n.user.repeatPassword),e.xp6(4),e.Q6J("ngModel",n.user.acceptTerms)("disabled",n.ui.pending),e.xp6(1),e.hij(" ",e.lcZ(31,40,"ACCEPT_PART1")," "),e.xp6(2),e.Q6J("uiSref",n.stpLangageService.langPrefix+"static")("uiParams",e.DdM(44,As)),e.xp6(1),e.hij(" ",e.lcZ(34,42,"ACCEPT_PART2")," "),e.xp6(2),e.Q6J("disabled",!n.signupForm.valid||n.user.password!==n.user.repeatPassword||n.ui.pending))},dependencies:[_.bcJ,_.KeH,p.O5,r._Y,r.Fj,r.Wl,r.JJ,r.JL,r.Q7,r.Zs,r.On,r.sg,r.u,h.Ot],encapsulation:2}),i})();function xs(i,a){if(1&i&&(e.TgZ(0,"div"),e._UZ(1,"hr",19),e.TgZ(2,"div",15)(3,"div",20),e._uU(4),e.ALo(5,"transloco"),e.qZA(),e.TgZ(6,"a",21),e._uU(7),e.ALo(8,"transloco"),e.qZA()(),e.TgZ(9,"div",22)(10,"i",23),e._uU(11),e.ALo(12,"transloco"),e._UZ(13,"br"),e._uU(14),e.ALo(15,"transloco"),e.qZA()()()),2&i){const t=e.oxw();e.xp6(4),e.hij(" ",e.lcZ(5,5,"ACTIVATE_MY_CODE_ALREADY_ACCOUNT")," "),e.xp6(2),e.Q6J("uiSref",t.stpLangageService.langPrefix+"login"),e.xp6(1),e.hij(" ",e.lcZ(8,7,"CONNECT_HERE")," "),e.xp6(4),e.hij(" ",e.lcZ(12,9,"DATA_COLLECTION_CNIL_PART1")," "),e.xp6(3),e.hij(" ",e.lcZ(15,11,"DATA_COLLECTION_CNIL_PART2")," ")}}const Ts=function(){return{page:"cgu"}};let bs=(()=>{class i{constructor(t,n,o,s,l,c,g,A){this.stpSeo=t,this.apiService=n,this.stpConfig=o,this.stpAuthService=s,this.stpSession=l,this.Flash=c,this.stpLangageService=g,this.stateService=A,this.ui={pending:void 0}}ngOnInit(){this.cadeauForm=new r.cw({lastName:new r.NI("",r.kI.minLength(1)),firstName:new r.NI("",r.kI.minLength(1)),email:new r.NI("",[r.kI.required,r.kI.pattern("^[a-z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,4}$")]),password:new r.NI("",r.kI.minLength(1)),promoCode:new r.NI("",r.kI.minLength(1)),acceptTerms:new r.NI(!1,r.kI.requiredTrue)}),this.params=this.stateService.params,this.page="signup",this.stpSeo.setTitle("Cadeau storyplayr"),w().extend(this,{stpConfig:this.stpConfig,params:this.stateService.params,ui:{pending:!1},user:{}}),this.params?.code&&(this.user.promoCode=this.params?.code)}signup(){this.ui.pending=!0,this.apiService.post(this.stpConfig.api+"/api/callCreateAccount",this.user).subscribe(()=>{this.stpAuthService.login(this.user,()=>{this.stpSession.fetchFromServerAndRefreshSession().then(()=>{this.stateService.go("welcomeSubscriber",{userTypeToWelcome:"welcomeFamily"}),this.ui.pending=!1}).catch(t=>console.error(t))})},t=>{t&&t.error.message&&(this.Flash.errorTranslate(t.error.message),this.ui.pending=!1)})}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(M.i),e.Y36(v.s),e.Y36(f.P),e.Y36(P.b),e.Y36(m.i),e.Y36(N.M),e.Y36(C.s),e.Y36(u.b2))},i.\u0275cmp=e.Xpm({type:i,selectors:[["stp-cadeau"]],decls:44,vars:50,consts:[[1,"container-fluid","stp-container"],[1,"row-fluid"],[1,"col-lg-offset-3","col-lg-6","col-md-offset-3","col-md-6","col-sm-offset-2","col-sm-8","col-xs-12","stp-box-shadow","stp-regular-font","stp-signup-container"],[1,"stp-title-signupform-red"],[1,"stp-signup-explanation",2,"margin-bottom","10px"],["name","form",3,"formGroup","submit"],[1,"form-group"],["formControlName","lastName","focus-me","true","required","","type","text",1,"form-control",3,"ngModel","disabled","placeholder","ngModelChange"],["formControlName","firstName","required","","type","text",1,"form-control",3,"ngModel","disabled","placeholder","ngModelChange"],["formControlName","email","required","","type","email",1,"form-control",3,"ngModel","disabled","placeholder","ngModelChange"],["formControlName","password","required","","type","password",1,"form-control",3,"ngModel","disabled","placeholder","ngModelChange"],["formControlName","promoCode","type","text",1,"form-control",3,"ngModel","disabled","placeholder","ngModelChange"],[1,"checkbox"],["type","checkbox","formControlName","acceptTerms","required","true",3,"ngModel","ngModelChange"],["target","_blank",3,"uiSref","uiParams"],[1,"text-center"],[1,"stp-button-medium","stp-btn-red",3,"disabled"],[4,"ngIf"],[1,"clearfix"],[1,"dark"],[1,"marged-bot"],[2,"color","red","font-weight","700",3,"uiSref"],[2,"padding-top","20px"],[1,"stp-private-life-cnil"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"h1",3),e._uU(4),e.ALo(5,"transloco"),e.qZA(),e.TgZ(6,"div",4),e._uU(7),e.ALo(8,"transloco"),e.qZA(),e.TgZ(9,"div")(10,"form",5),e.NdJ("submit",function(){return n.signup()}),e.TgZ(11,"div",6)(12,"input",7),e.NdJ("ngModelChange",function(s){return n.user.lastName=s}),e.ALo(13,"transloco"),e.qZA()(),e.TgZ(14,"div",6)(15,"input",8),e.NdJ("ngModelChange",function(s){return n.user.firstName=s}),e.ALo(16,"transloco"),e.qZA()(),e.TgZ(17,"div",6)(18,"input",9),e.NdJ("ngModelChange",function(s){return n.user.email=s}),e.ALo(19,"transloco"),e.qZA()(),e.TgZ(20,"div",6)(21,"input",10),e.NdJ("ngModelChange",function(s){return n.user.password=s}),e.ALo(22,"transloco"),e.qZA()(),e.TgZ(23,"div",6)(24,"label"),e._uU(25),e.ALo(26,"transloco"),e.qZA(),e.TgZ(27,"input",11),e.NdJ("ngModelChange",function(s){return n.user.promoCode=s}),e.ALo(28,"transloco"),e.qZA()(),e.TgZ(29,"div",6)(30,"div",12)(31,"label")(32,"input",13),e.NdJ("ngModelChange",function(s){return n.user.acceptTerms=s}),e.qZA(),e._uU(33),e.ALo(34,"transloco"),e.TgZ(35,"a",14),e._uU(36),e.ALo(37,"transloco"),e.qZA()()()(),e.TgZ(38,"div",15)(39,"button",16),e._uU(40),e.ALo(4
11,"transloco"),e.qZA()()(),e.YNc(42,xs,16,13,"div",17),e.qZA()(),e._UZ(43,"div",18),e.qZA()()),2&t&&(e.xp6(4),e.hij(" ",e.lcZ(5,27,"ACTIVATE_MY_CODE")," "),e.xp6(3),e.hij(" ",e.lcZ(8,29,"ACTIVATE_MY_CODE_EXPLANATIONS")," "),e.xp6(3),e.Q6J("formGroup",n.cadeauForm),e.xp6(2),e.MGl("placeholder","",e.lcZ(13,31,"LASTNAME"),"*"),e.Q6J("ngModel",n.user.lastName)("disabled",n.ui.pending),e.xp6(3),e.MGl("placeholder","",e.lcZ(16,33,"FIRSTNAME"),"*"),e.Q6J("ngModel",n.user.firstName)("disabled",n.ui.pending),e.xp6(3),e.MGl("placeholder","",e.lcZ(19,35,"EMAIL"),"*"),e.Q6J("ngModel",n.user.email)("disabled",n.ui.pending),e.xp6(3),e.MGl("placeholder","",e.lcZ(22,37,"CHOOSEPASSWORD"),"*"),e.Q6J("ngModel",n.user.password)("disabled",n.ui.pending),e.xp6(4),e.hij("",e.lcZ(26,39,"YOUR_CADEAU_CODE")," :"),e.xp6(2),e.s9C("placeholder",e.lcZ(28,41,"YOUR_CADEAU_CODE")),e.Q6J("ngModel",n.user.promoCode)("disabled",n.ui.pending||n.params.code),e.xp6(5),e.Q6J("ngModel",n.user.acceptTerms),e.xp6(1),e.hij(" ",e.lcZ(34,43,"ACCEPT_PART1")," "),e.xp6(2),e.Q6J("uiSref",n.stpLangageService.langPrefix+"static")("uiParams",e.DdM(49,Ts)),e.xp6(1),e.hij(" ",e.lcZ(37,45,"ACCEPT_PART2")," "),e.xp6(3),e.Q6J("disabled",!n.cadeauForm.valid||n.ui.pending),e.xp6(1),e.hij(" ",e.lcZ(41,47,"I_SIGN_UP")," "),e.xp6(2),e.Q6J("ngIf",!(null!=n.params&&n.params.partenaire)))},dependencies:[_.bcJ,_.KeH,p.O5,r._Y,r.Fj,r.Wl,r.JJ,r.JL,r.Q7,r.Zs,r.sg,r.u,h.Ot],encapsulation:2}),i})();function Cs(i,a){if(1&i&&(e.TgZ(0,"div",10),e._UZ(1,"img",11),e.qZA()),2&i){const t=e.oxw();e.xp6(1),e.Q6J("src",t.stpConfig.app+"/images/partenaires/"+t.partnerBrand(t.params.partenaire),e.LSH)}}function Ns(i,a){if(1&i&&(e.TgZ(0,"div",12),e._UZ(1,"img",13),e.qZA()),2&i){const t=e.oxw();e.xp6(1),e.Q6J("src",t.stpConfig.baseApp+"/assets/images/partenaires/"+t.partnerHead(t.params.partenaire),e.LSH)}}const Ms=function(){return{page:"cgu"}};function Ls(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"form",14),e.NdJ("submit",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.signup())}),e.TgZ(1,"div",15)(2,"input",16),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.user.lastName=o)}),e.ALo(3,"transloco"),e.qZA()(),e.TgZ(4,"div",15)(5,"input",17),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.user.firstName=o)}),e.ALo(6,"transloco"),e.qZA()(),e.TgZ(7,"div",15)(8,"input",18),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.user.email=o)}),e.ALo(9,"transloco"),e.qZA()(),e.TgZ(10,"div",15)(11,"input",19),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.user.password=o)}),e.ALo(12,"transloco"),e.qZA()(),e.TgZ(13,"div",15)(14,"label"),e._uU(15),e.ALo(16,"transloco"),e.qZA(),e.TgZ(17,"input",20),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.user.promoCode=o)}),e.ALo(18,"transloco"),e.qZA()(),e.TgZ(19,"div",15)(20,"div",21)(21,"label")(22,"input",22),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.user.acceptTerms=o)}),e.qZA(),e._uU(23),e.ALo(24,"transloco"),e.TgZ(25,"a",23),e._uU(26),e.ALo(27,"transloco"),e.qZA()()()(),e.TgZ(28,"div",12)(29,"button",24),e._uU(30),e.ALo(31,"transloco"),e.qZA()()()}if(2&i){const t=e.oxw();e.Q6J("formGroup",t.signupPartnerForm),e.xp6(2),e.MGl("placeholder","",e.lcZ(3,23,"LASTNAME"),"*"),e.Q6J("ngModel",t.user.lastName)("disabled",t.ui.pending),e.xp6(3),e.MGl("placeholder","",e.lcZ(6,25,"FIRSTNAME"),"*"),e.Q6J("ngModel",t.user.firstName)("disabled",t.ui.pending),e.xp6(3),e.MGl("placeholder","",e.lcZ(9,27,"EMAIL"),"*"),e.Q6J("ngModel",t.user.email)("disabled",t.ui.pending),e.xp6(3),e.MGl("placeholder","",e.lcZ(12,29,"CHOOSEPASSWORD"),"*"),e.Q6J("ngModel",t.user.password)("disabled",t.ui.pending),e.xp6(4),e.hij("",e.lcZ(16,31,"YOUR_PARTNER_CODE")," :"),e.xp6(2),e.s9C("placeholder",e.lcZ(18,33,"YOUR_PARTNER_CODE")),e.Q6J("ngModel",t.user.promoCode)("disabled",t.ui.pending||t.params.code),e.xp6(5),e.Q6J("ngModel",t.user.acceptTerms),e.xp6(1),e.hij(" ",e.lcZ(24,35,"ACCEPT_PART1")," "),e.xp6(2),e.Q6J("uiSref",t.stpLangageService.langPrefix+"static")("uiParams",e.DdM(41,Ms)),e.xp6(1),e.hij(" ",e.lcZ(27,37,"ACCEPT_PART2")," "),e.xp6(4),e.hij(" ",e.lcZ(31,39,"I_SIGN_UP")," ")}}function ys(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"form",14),e.NdJ("submit",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.usePartnerCode())}),e.TgZ(1,"div",15)(2,"label"),e._uU(3),e.ALo(4,"transloco"),e.qZA(),e.TgZ(5,"input",20),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.user.promoCode=o)}),e.ALo(6,"transloco"),e.qZA()(),e.TgZ(7,"div")(8,"button",25),e._uU(9," OK "),e.qZA()()()}if(2&i){const t=e.oxw();e.Q6J("formGroup",t.signupPartnerNonAnonymousForm),e.xp6(3),e.hij("",e.lcZ(4,6,"YOUR_PARTNER_CODE")," :"),e.xp6(2),e.s9C("placeholder",e.lcZ(6,8,"YOUR_PARTNER_CODE")),e.Q6J("ngModel",t.user.promoCode)("disabled",t.ui.pending||t.params.code),e.xp6(3),e.Q6J("disabled",!t.signupPartnerNonAnonymousForm.valid||t.ui.pending)}}function Ps(i,a){if(1&i&&(e.TgZ(0,"div"),e._UZ(1,"hr",26),e.TgZ(2,"div",12)(3,"div",27),e._uU(4),e.ALo(5,"transloco"),e.qZA(),e.TgZ(6,"a",28),e._uU(7),e.ALo(8,"transloco"),e.qZA()(),e.TgZ(9,"div",29)(10,"i",30),e._uU(11),e.ALo(12,"transloco"),e._UZ(13,"br"),e._uU(14),e.ALo(15,"transloco"),e.qZA()()()),2&i){const t=e.oxw();e.xp6(4),e.hij(" ",e.lcZ(5,5,"ACTIVATE_MY_CODE_ALREADY_ACCOUNT")," "),e.xp6(2),e.Q6J("uiSref",t.stpLangageService.langPrefix+"login"),e.xp6(1),e.hij(" ",e.lcZ(8,7,"CONNECT_HERE")," "),e.xp6(4),e.hij(" ",e.lcZ(12,9,"DATA_COLLECTION_CNIL_PART1")," "),e.xp6(3),e.hij(" ",e.lcZ(15,11,"DATA_COLLECTION_CNIL_PART2")," ")}}const qs=function(i,a){return{"col-md-6":i,"col-lg-6 col-lg-offset-3 col-md-6 col-md-offset-3 col-sm-8 col-sm-offset-2 col-xs-12":a}};let Es=(()=>{class i{constructor(t,n,o,s,l,c,g,A){this.stpConfig=t,this.stpSeo=n,this.stpAuthService=o,this.apiService=s,this.Flash=l,this.stpSession=c,this.stpLangageService=g,this.stateService=A,this.ui={pending:!1}}ngOnInit(){this.signupPartnerForm=new r.cw({lastName:new r.NI("",r.kI.minLength(1)),firstName:new r.NI("",r.kI.minLength(1)),email:new r.NI("",[r.k
1I.required,r.kI.pattern("^[a-z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,4}$")]),password:new r.NI("",r.kI.minLength(1)),promoCode:new r.NI("",r.kI.minLength(1)),acceptTerms:new r.NI(!1,r.kI.requiredTrue)}),this.signupPartnerNonAnonymousForm=new r.cw({promoCode:new r.NI("",r.kI.minLength(1))}),this.page="partenaire-signup",this.stpSeo.setTitle("Partenaire storyplayr"),this.params=this.stateService.params,this.partnersImages={aufeminin:{head:"au-feminin--head.jpg",brand:"au-feminin--brand.gif"},aifs:{head:"atlanta--head.png",brand:"atlanta--brand.jpg"}},w().extend(this,{stpConfig:this.stpConfig,stpSession:this.stpSession,params:this.stateService.params,ui:{pending:!1},user:{}}),this.params.code&&(this.user.promoCode=this.params.code)}signup(){if(this.signupPartnerForm.valid)this.ui.pending||(this.ui.pending=!0,this.apiService.post(this.stpConfig.api+"/api/callCreateAccount",this.user).subscribe(()=>{this.stpAuthService.login(this.user,t=>{if(t)throw t;this.stpSession.fetchFromServerAndRefreshSession().then(()=>{this.ui.pending=!1,this.stateService.go(this.stpLangageService.langPrefix+"welcomeSubscriber",{userTypeToWelcome:"welcomeFamily"})}).catch(n=>console.error(n))})},t=>{t&&t.error.message&&(this.Flash.errorTranslate(t.error.message),this.ui.pending=!1)}));else{const t=[],n=this.signupPartnerForm.controls;n.lastName.valid||t.push("fr"===this.stpLangageService.getCurrentLanguage()?"Nom":"Last Name"),n.firstName.valid||t.push("fr"===this.stpLangageService.getCurrentLanguage()?"Pr\xe9nom":"First Name"),n.email.valid||t.push((this.stpLangageService.getCurrentLanguage(),"Email")),n.password.valid||t.push("fr"===this.stpLangageService.getCurrentLanguage()?"Mot de passe":"Password"),n.acceptTerms.valid||t.push("fr"===this.stpLangageService.getCurrentLanguage()?"Conditions g\xe9n\xe9rales":"Terms & Conditions");const s=`${"fr"===this.stpLangageService.getCurrentLanguage()?"Veuillez remplir les champs suivants : ":"Please fill in the following required fields: "}${t.join(", ")}`;this.Flash.error(s)}}partnerHead(t){return!!(t&&this.partnersImages[t]&&this.partnersImages[t].head)&&this.partnersImages[t].head}partnerBrand(t){return!!(t&&this.partnersImages[t]&&this.partnersImages[t].brand)&&this.partnersImages[t].brand}usePartnerCode(){this.ui.pending=!0,this.apiService.post(this.stpConfig.api+"/api/subscriptions/subscribeWithPartnerCode",{uniquecode:this.user.promoCode}).subscribe(()=>{this.ui.pending=!1,this.stateService.go(this.stpLangageService.langPrefix+"welcomeSubscriber",{userTypeToWelcome:"welcomeFamily"})},t=>{(t&&t.error&&t.error.message||t&&t.message)&&this.Flash.errorTranslate(t.error?t.error.message:t.message),this.ui.pending=!1})}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(f.P),e.Y36(M.i),e.Y36(P.b),e.Y36(v.s),e.Y36(N.M),e.Y36(m.i),e.Y36(C.s),e.Y36(u.b2))},i.\u0275cmp=e.Xpm({type:i,selectors:[["stp-partenaire"]],decls:16,vars:15,consts:[[1,"container-fluid","stp-container"],[1,"row-fluid"],["class","col-md-6",4,"ngIf"],[1,"stp-box-shadow","stp-regular-font","stp-signup-container",3,"ngClass"],["class","text-center",4,"ngIf"],[1,"stp-title-signupform-red"],[1,"stp-signup-explanation",2,"margin-bottom","10px"],["name","form",3,"formGroup","submit",4,"ngIf"],[4,"ngIf"],[1,"clearfix"],[1,"col-md-6"],["alt","",2,"width","100%",3,"src"],[1,"text-center"],["alt","",3,"src"],["name","form",3,"formGroup","submit"],[1,"form-group"],["formControlName","lastName","focus-me","true","required","","type","text",1,"form-control",3,"ngModel","disabled","placeholder","ngModelChange"],["formControlName","firstName","required","","type","text",1,"form-control",3,"ngModel","disabled","placeholder","ngModelChange"],["formControlName","email","required","","type","email",1,"form-control",3,"ngModel","disabled","placeholder","ngModelChange"],["formControlName","password","required","","type","password",1,"form-control",3,"ngModel","disabled","placeholder","ngModelChange"],["formControlName","promoCode","type","text",1,"form-control",3,"ngModel","disabled","placeholder","ngModelChange"],[1,"checkbox"],["type","checkbox","formControlName","acceptTerms","required","true",3,"ngModel","ngModelChange"],["target","_blank",3,"uiSref","uiParams"],[1,"stp-button-medium","stp-btn-red"],[1,"stp-button-medium","stp-btn-red",3,"disabled"],[1,"dark"],[1,"marged-bot"],[2,"color","red","font-weight","700",3,"uiSref"],[2,"padding-top","20px","text-align","justify"],[1,"stp-private-life-cnil"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1),e.YNc(2,Cs,2,1,"div",2),e.TgZ(3,"div",3),e.YNc(4,Ns,2,1,"div",4),e.TgZ(5,"h1",5),e._uU(6),e.ALo(7,"transloco"),e.qZA(),e.TgZ(8,"div",6),e._uU(9),e.ALo(10,"transloco"),e.qZA(),e.TgZ(11,"div"),e.YNc(12,Ls,32,42,"form",7),e.YNc(13,ys,10,10,"form",7),e.YNc(14,Ps,16,13,"div",8),e.qZA()(),e._UZ(15,"div",9),e.qZA()()),2&t&&(e.xp6(2),e.Q6J("ngIf",n.partnerBrand(n.params.partenaire)),e.xp6(1),e.Q6J("ngClass",e.WLB(12,qs,n.partnerBrand(n.params.partenaire),!n.partnerBrand(n.params.partenaire))),e.xp6(1),e.Q6J("ngIf",n.partnerHead(n.params.partenaire)),e.xp6(2),e.hij(" ",e.lcZ(7,8,"ACTIVATE_MY_CODE")," "),e.xp6(3),e.hij(" ",e.lcZ(10,10,"ACTIVATE_MY_CODE_EXPLANATIONS")," "),e.xp6(3),e.Q6J("ngIf",n.stpSession.isAnonymous()),e.xp6(1),e.Q6J("ngIf",!n.stpSession.isAnonymous()),e.xp6(1),e.Q6J("ngIf",!n.params.partenaire&&n.stpSession.isAnonymous()))},dependencies:[_.bcJ,_.KeH,p.mk,p.O5,r._Y,r.Fj,r.Wl,r.JJ,r.JL,r.Q7,r.Zs,r.sg,r.u,h.Ot],encapsulation:2}),i})();var Os=d(63820);const Is=["withoutModule"],Us=["withModule"];function ws(i,a){1&i&&e._UZ(0,"img",80)}function Js(i,a){1&i&&e._UZ(0,"img",81)}function Rs(i,a){1&i&&(e.TgZ(0,"div",82),e._UZ(1,"div",83),e.ALo(2,"transloco"),e.qZA()),2&i&&(e.xp6(1),e.Q6J("innerHTML",e.lcZ(2,1,"CHOOSE_PLAN_MONTHLY_TO_ANNUAL_WARNING_NOT_CANCEL"),e.oJD))}function Ys(i,a){if(1&i&&(e.TgZ(0,"div",82),e._uU(1),e.ALo(2,"transloco"),e.ALo(3,"date"),e.ALo(4,"transloco"),e.qZA()),2&i){const t=e.oxw(2);e.xp6(1),e.lnq("",e.lcZ(2,3,"CHOOSE_PLAN_ANNUAL_TO_MONTHLY_WARNING_1")," ",e.xi3(3,5,t.stpSession.expirationDate(),"dd/MM/yyyy")," ",e.lcZ(4,8,"CHOOSE_PLAN_ANNUAL_TO_MONTHLY_WARNING_2")," ")}}function Fs(i,a){1&i&&(e.TgZ(0,"ul",84)(1,"li",85),e._uU(2),e.ALo(3,"transloco"),e.qZA(),e.TgZ(4,"li"),e._uU(5),e.ALo(6,"transloco"),e.qZA(),e.TgZ(7,"li"),e._uU(8),e.ALo(9,"transloco"),e.qZA(),e.TgZ(10,"li"),e._uU(11),e.ALo(12,"transloco"),e.qZA()()),2&i&&(e.xp6(2),e.hij("",e.lcZ(3,4,"CHOOSE_PLAN_MONTHLY_TEXT_1"),"* "),e.xp6(3),e.Oqu(e.l
1cZ(6,6,"CHOOSE_PLAN_MONTHLY_TEXT_2")),e.xp6(3),e.Oqu(e.lcZ(9,8,"CHOOSE_PLAN_MONTHLY_TEXT_3")),e.xp6(3),e.Oqu(e.lcZ(12,10,"CHOOSE_PLAN_MONTHLY_TEXT_4")))}function ks(i,a){1&i&&(e.TgZ(0,"ul",84)(1,"li"),e._uU(2),e.ALo(3,"transloco"),e.qZA(),e.TgZ(4,"li"),e._uU(5),e.ALo(6,"transloco"),e.qZA()()),2&i&&(e.xp6(2),e.Oqu(e.lcZ(3,2,"CHOOSE_PLAN_ANNUALLY_TEXT_1")),e.xp6(3),e.Oqu(e.lcZ(6,4,"CHOOSE_PLAN_ANNUALLY_TEXT_2")))}function Ds(i,a){if(1&i&&(e.TgZ(0,"div",86),e._uU(1),e.qZA()),2&i){const t=e.oxw(2);e.xp6(1),e.Oqu(t.plans["without-module"].name)}}function Qs(i,a){if(1&i&&(e.TgZ(0,"div",86),e._uU(1),e.qZA()),2&i){const t=e.oxw(2);e.xp6(1),e.Oqu(t.plans["without-module"].nameEn)}}function Gs(i,a){if(1&i&&(e.TgZ(0,"div",86),e._uU(1),e.qZA()),2&i){const t=e.oxw(2);e.xp6(1),e.Oqu(t.plans["with-module"].name)}}function js(i,a){if(1&i&&(e.TgZ(0,"div",86),e._uU(1),e.qZA()),2&i){const t=e.oxw(2);e.xp6(1),e.Oqu(t.plans["with-module"].nameEn)}}function Hs(i,a){1&i&&(e.TgZ(0,"ul",84)(1,"li",85),e._uU(2),e.ALo(3,"transloco"),e.qZA(),e.TgZ(4,"li"),e._uU(5),e.ALo(6,"transloco"),e.qZA(),e.TgZ(7,"li"),e._uU(8),e.ALo(9,"transloco"),e.qZA(),e.TgZ(10,"li"),e._uU(11),e.ALo(12,"transloco"),e.qZA()()),2&i&&(e.xp6(2),e.hij("",e.lcZ(3,4,"CHOOSE_PLAN_MONTHLY_TEXT_1"),"* "),e.xp6(3),e.Oqu(e.lcZ(6,6,"CHOOSE_PLAN_MONTHLY_TEXT_2")),e.xp6(3),e.Oqu(e.lcZ(9,8,"CHOOSE_PLAN_MONTHLY_TEXT_3")),e.xp6(3),e.Oqu(e.lcZ(12,10,"CHOOSE_PLAN_MONTHLY_TEXT_4")))}function Bs(i,a){1&i&&(e.TgZ(0,"ul",84)(1,"li"),e._uU(2),e.ALo(3,"transloco"),e.qZA(),e.TgZ(4,"li"),e._uU(5),e.ALo(6,"transloco"),e.qZA()()),2&i&&(e.xp6(2),e.Oqu(e.lcZ(3,2,"CHOOSE_PLAN_ANNUALLY_TEXT_1")),e.xp6(3),e.Oqu(e.lcZ(6,4,"CHOOSE_PLAN_ANNUALLY_TEXT_2")))}function Ks(i,a){if(1&i&&(e.TgZ(0,"div",86),e._uU(1),e.qZA()),2&i){const t=e.oxw(2);e.xp6(1),e.Oqu(t.plans["without-module"].name)}}function Ws(i,a){if(1&i&&(e.TgZ(0,"div",86),e._uU(1),e.qZA()),2&i){const t=e.oxw(2);e.xp6(1),e.Oqu(t.plans["without-module"].nameEn)}}function $s(i,a){if(1&i&&(e.TgZ(0,"div",86),e._uU(1),e.qZA()),2&i){const t=e.oxw(2);e.xp6(1),e.Oqu(t.plans["with-module"].name)}}function zs(i,a){if(1&i&&(e.TgZ(0,"div",86),e._uU(1),e.qZA()),2&i){const t=e.oxw(2);e.xp6(1),e.Oqu(t.plans["with-module"].nameEn)}}function Vs(i,a){1&i&&(e.TgZ(0,"div",87),e._uU(1),e.ALo(2,"transloco"),e.qZA()),2&i&&(e.xp6(1),e.hij(" * : ",e.lcZ(2,1,"ONLY_NEW_SUBSCRIBER_NOTE")," "))}const ge=function(i){return{active:i}};function Xs(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",5)(1,"div",6)(2,"div",7)(3,"div")(4,"h1",8),e._uU(5),e.ALo(6,"transloco"),e.qZA(),e.TgZ(7,"h2",9),e._uU(8),e.ALo(9,"transloco"),e.qZA()(),e.YNc(10,ws,1,0,"img",10),e.YNc(11,Js,1,0,"img",11),e.qZA(),e.TgZ(12,"div",12)(13,"a",13),e._uU(14),e.ALo(15,"transloco"),e.qZA()(),e.YNc(16,Rs,3,3,"div",14),e.YNc(17,Ys,5,10,"div",14),e.TgZ(18,"div",15)(19,"div",7),e._UZ(20,"div",16),e.TgZ(21,"div",17)(22,"div",7)(23,"div",18)(24,"h3",19),e._uU(25),e.ALo(26,"transloco"),e.qZA(),e.TgZ(27,"div",20)(28,"div",21),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.changeRecurrence("monthly"))}),e._uU(29),e.ALo(30,"transloco"),e.qZA(),e.TgZ(31,"div",21),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.changeRecurrence("annually"))}),e._uU(32),e.ALo(33,"transloco"),e.qZA()(),e.YNc(34,Fs,13,12,"ul",22),e.YNc(35,ks,7,6,"ul",22),e.qZA(),e.TgZ(36,"div",23)(37,"div",24,25),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.changePlan("without-module"))}),e.YNc(39,Ds,2,1,"div",26),e.YNc(40,Qs,2,1,"div",26),e.TgZ(41,"div",27)(42,"span",28),e._uU(43),e.qZA(),e._uU(44),e.TgZ(45,"span",29),e._uU(46),e.ALo(47,"transloco"),e.qZA()(),e.TgZ(48,"button",30),e._uU(49),e.ALo(50,"transloco"),e.qZA()(),e.TgZ(51,"div",31,32),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.changePlan("with-module"))}),e.YNc(53,Gs,2,1,"div",26),e.YNc(54,js,2,1,"div",26),e.TgZ(55,"div",27)(56,"span",28),e._uU(57),e.qZA(),e._uU(58),e.TgZ(59,"span",29),e._uU(60),e.ALo(61,"transloco"),e.qZA()(),e.TgZ(62,"button",30),e._uU(63),e.ALo(64,"transloco"),e.qZA()()()()()(),e.TgZ(65,"div",7),e._UZ(66,"div",16),e.TgZ(67,"div",17)(68,"div",7)(69,"div",33),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.openModal({moduleName:"story_access",iconName:"books",buttonWithPlaceholder:!0,noPicture:!0,buttonColor:"orange"}))}),e._UZ(70,"div",34),e.TgZ(71,"div",35),e._UZ(72,"span",36)(73,"span",37),e.qZA(),e.TgZ(74,"div",38),e._uU(75),e.ALo(76,"transloco"),e.qZA()(),e.TgZ(77,"div",23)(78,"div",39,25),e._UZ(80,"span",40),e.qZA(),e.TgZ(81,"div",41,32),e._UZ(83,"span",40),e.qZA()()()()(),e.TgZ(84,"div",7)(85,"div",42)(86,"div",43),e._uU(87),e.ALo(88,"transloco"),e.qZA()(),e.TgZ(89,"div",17)(90,"div",7)(91,"div",44),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.openModal({moduleName:"audio_version",iconName:"sound",buttonWithPlaceholder:!1,buttonColor:"orange"}))}),e._UZ(92,"div",34),e.TgZ(93,"div",45),e._UZ(94,"span",46),e.qZA(),e.TgZ(95,"div",38),e._uU(96),e.ALo(97,"transloco"),e.qZA()(),e.TgZ(98,"div",23)(99,"div",47,25),e._UZ(101,"span",40),e.qZA(),e.TgZ(102,"div",48,32),e._UZ(104,"span",40),e.qZA()()(),e.TgZ(105,"div",7)(106,"div",49),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.openModal({moduleName:"recording_feature",iconName:"record",buttonWithPlaceholder:!0}))}),e._UZ(107,"div",34),e.TgZ(108,"div",35),e._UZ(109,"span",36)(110,"span",50),e.qZA(),e.TgZ(111,"div",38),e._uU(112),e.ALo(113,"transloco"),e.qZA()(),e.TgZ(114,"div",23)(115,"div",51,25),e._UZ(117,"span",40),e.qZA(),e.TgZ(118,"div",52,32),e._UZ(120,"span",40),e.qZA()()(),e.TgZ(121,"div",7)(122,"div",53),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.openModal({moduleName:"screenless_mode",iconName:"sound",buttonWithPlaceholder:!1,noPicture:!0,buttonColor:"orange"}))}),e._UZ(123,"div",34),e.TgZ(124,"div",54),e._UZ(125,"img",55),e.qZA(),e.TgZ(126,"div",38),e._uU(127),e.ALo(128,"transloco"),e.qZA()(),e.TgZ(129,"div",23)(130,"div",51,25),e._UZ(132,"span",40),e.qZA(),e.TgZ(133,"div",52,32),e._UZ(135,"span",40),e.qZA()()(),e.TgZ(136,"div",7)(137,"div",44),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.openModal({moduleName:"debit_phrase",iconName:"turtle",buttonWithPlaceholder:!1}))}),e._UZ(138,"div",34),e.TgZ(139,"div",56),e._UZ(140,"span",57),e.qZA(),e.TgZ(141,"div",38),e._uU(142),e.ALo(143,"transloco"),e.qZA()(),e.TgZ(144,"div",23),e._UZ(145,"div",47,25),e.TgZ(147,"div",48,32),e._UZ(149,"span",40),e.qZA()()(),e.TgZ(150,"div",7)(1
151,"div",58),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.openModal({moduleName:"karaoke_inverse",iconName:"karaoke",buttonWithPlaceholder:!0}))}),e._UZ(152,"div",34),e.TgZ(153,"div",35),e._UZ(154,"span",36)(155,"span",59),e.qZA(),e.TgZ(156,"div",38),e._uU(157),e.ALo(158,"transloco"),e.qZA()(),e.TgZ(159,"div",23),e._UZ(160,"div",51,25),e.TgZ(162,"div",52,32),e._UZ(164,"span",40),e.qZA()()(),e.TgZ(165,"div",7)(166,"div",44),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.openModal({moduleName:"aide_prononciation",iconName:"text-to-speech",buttonWithPlaceholder:!0}))}),e._UZ(167,"div",34),e.TgZ(168,"div",35),e._UZ(169,"span",36)(170,"span",60),e.qZA(),e.TgZ(171,"div",38),e._uU(172),e.ALo(173,"transloco"),e.qZA()(),e.TgZ(174,"div",23),e._UZ(175,"div",47,25),e.TgZ(177,"div",48,32),e._UZ(179,"span",40),e.qZA()()()()(),e.TgZ(180,"div",7)(181,"div",61)(182,"div",43),e._uU(183),e.ALo(184,"transloco"),e.qZA()(),e.TgZ(185,"div",17)(186,"div",7)(187,"div",58),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.openModal({moduleName:"police",iconName:"font",buttonWithPlaceholder:!0}))}),e._UZ(188,"div",34),e.TgZ(189,"div",35),e._UZ(190,"span",36)(191,"span",62),e.qZA(),e.TgZ(192,"div",38),e._uU(193),e.ALo(194,"transloco"),e.qZA()(),e.TgZ(195,"div",23)(196,"div",51,25),e._UZ(198,"span",40),e.qZA(),e.TgZ(199,"div",52,32),e._UZ(201,"span",40),e.qZA()()(),e.TgZ(202,"div",7)(203,"div",44),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.openModal({moduleName:"taille",iconName:"font-size",buttonWithPlaceholder:!0}))}),e._UZ(204,"div",34),e.TgZ(205,"div",35),e._UZ(206,"span",36)(207,"span",63),e.qZA(),e.TgZ(208,"div",38),e._uU(209),e.ALo(210,"transloco"),e.qZA()(),e.TgZ(211,"div",23)(212,"div",47,25),e._UZ(214,"span",40),e.qZA(),e.TgZ(215,"div",48,32),e._UZ(217,"span",40),e.qZA()()(),e.TgZ(218,"div",7)(219,"div",58),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.openModal({moduleName:"couleurs",iconName:"color",buttonWithPlaceholder:!1}))}),e._UZ(220,"div",34),e.TgZ(221,"div",56),e._UZ(222,"span",64),e.qZA(),e.TgZ(223,"div",38),e._uU(224),e.ALo(225,"transloco"),e.qZA()(),e.TgZ(226,"div",23)(227,"div",51,25),e._UZ(229,"span",40),e.qZA(),e.TgZ(230,"div",52,32),e._UZ(232,"span",40),e.qZA()()(),e.TgZ(233,"div",7)(234,"div",44),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.openModal({moduleName:"phonemes",iconName:"plain-text",buttonWithPlaceholder:!1}))}),e._UZ(235,"div",34),e.TgZ(236,"div",56)(237,"span",65),e._uU(238,"/.../"),e.qZA()(),e.TgZ(239,"div",38),e._uU(240),e.ALo(241,"transloco"),e.qZA()(),e.TgZ(242,"div",23),e._UZ(243,"div",47,25),e.TgZ(245,"div",48,32),e._UZ(247,"span",40),e.qZA()()(),e.TgZ(248,"div",7)(249,"div",58),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.openModal({moduleName:"lettres_muettes",iconName:"silent",buttonWithPlaceholder:!0}))}),e._UZ(250,"div",34),e.TgZ(251,"div",35),e._UZ(252,"span",36)(253,"span",66),e.qZA(),e.TgZ(254,"div",38),e._uU(255),e.ALo(256,"transloco"),e.qZA()(),e.TgZ(257,"div",23),e._UZ(258,"div",51,25),e.TgZ(260,"div",52,32),e._UZ(262,"span",40),e.qZA()()(),e.TgZ(263,"div",7)(264,"div",58),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.openModal({moduleName:"syllables",iconName:"syllables",buttonWithPlaceholder:!0}))}),e._UZ(265,"div",34),e.TgZ(266,"div",35),e._UZ(267,"span",36)(268,"span",67),e.qZA(),e.TgZ(269,"div",38),e._uU(270),e.ALo(271,"transloco"),e.qZA()(),e.TgZ(272,"div",23),e._UZ(273,"div",51,25),e.TgZ(275,"div",52,32),e._UZ(277,"span",40),e.qZA()()(),e.TgZ(278,"div",7)(279,"div",58),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.openModal({moduleName:"punctuation",iconName:"punctuation",buttonWithPlaceholder:!0}))}),e._UZ(280,"div",34),e.TgZ(281,"div",35),e._UZ(282,"span",36)(283,"span",68),e.qZA(),e.TgZ(284,"div",38),e._uU(285),e.ALo(286,"transloco"),e.qZA()(),e.TgZ(287,"div",23),e._UZ(288,"div",51,25),e.TgZ(290,"div",52,32),e._UZ(292,"span",40),e.qZA()()(),e.TgZ(293,"div",7)(294,"div",44),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.openModal({moduleName:"ecartement",iconName:"line-height",buttonWithPlaceholder:!0}))}),e._UZ(295,"div",34),e.TgZ(296,"div",35),e._UZ(297,"span",36)(298,"span",69),e.qZA(),e.TgZ(299,"div",38),e._uU(300),e.ALo(301,"transloco"),e.qZA()(),e.TgZ(302,"div",23),e._UZ(303,"div",47,25),e.TgZ(305,"div",48,32),e._UZ(307,"span",40),e.qZA()()(),e.TgZ(308,"div",7)(309,"div",58),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.openModal({moduleName:"couleurs_alternees",iconName:"line-color",buttonWithPlaceholder:!0}))}),e._UZ(310,"div",34),e.TgZ(311,"div",35),e._UZ(312,"span",36)(313,"span",70),e.qZA(),e.TgZ(314,"div",38),e._uU(315),e.ALo(316,"transloco"),e.qZA()(),e.TgZ(317,"div",23),e._UZ(318,"div",51,25),e.TgZ(320,"div",52,32),e._UZ(322,"span",40),e.qZA()()(),e.TgZ(323,"div",7)(324,"div",44),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();
1return e.KtG(o.openModal({moduleName:"regle",iconName:"cursor",buttonWithPlaceholder:!0}))}),e._UZ(325,"div",34),e.TgZ(326,"div",35),e._UZ(327,"span",36)(328,"span",71),e.qZA(),e.TgZ(329,"div",38),e._uU(330),e.ALo(331,"transloco"),e.qZA()(),e.TgZ(332,"div",23),e._UZ(333,"div",47,25),e.TgZ(335,"div",48,32),e._UZ(337,"span",40),e.qZA()()()()(),e.TgZ(338,"div",7),e._UZ(339,"div",16),e.TgZ(340,"div",17)(341,"div",7)(342,"div",72)(343,"div",35),e._UZ(344,"span",36)(345,"span",73),e.qZA(),e.TgZ(346,"div",38),e._uU(347),e.ALo(348,"transloco"),e.qZA()(),e.TgZ(349,"div",23)(350,"div",47,25),e._UZ(352,"span",40),e.qZA(),e.TgZ(353,"div",48,32),e._UZ(355,"span",40),e.qZA()()(),e.TgZ(356,"div",7)(357,"div",74)(358,"div",35),e._UZ(359,"span",36)(360,"span",68),e.qZA(),e.TgZ(361,"div",38),e._uU(362),e.ALo(363,"transloco"),e.qZA()(),e.TgZ(364,"div",23),e._UZ(365,"div",47,25),e.TgZ(367,"div",52,32),e._UZ(369,"span",40),e.qZA()()()()(),e.TgZ(370,"div",7),e._UZ(371,"div",16),e.TgZ(372,"div",17)(373,"div",7)(374,"div",18),e.YNc(375,Hs,13,12,"ul",22),e.YNc(376,Bs,7,6,"ul",22),e.qZA(),e.TgZ(377,"div",23)(378,"div",75,25),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.changePlan("without-module"))}),e.YNc(380,Ks,2,1,"div",26),e.YNc(381,Ws,2,1,"div",26),e.TgZ(382,"div",27)(383,"span",28),e._uU(384),e.qZA(),e._uU(385),e.TgZ(386,"span",29),e._uU(387),e.ALo(388,"transloco"),e.qZA()(),e.TgZ(389,"button",30),e._uU(390),e.ALo(391,"transloco"),e.qZA()(),e.TgZ(392,"div",76,32),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.changePlan("with-module"))}),e.YNc(394,$s,2,1,"div",26),e.YNc(395,zs,2,1,"div",26),e.TgZ(396,"div",27)(397,"span",28),e._uU(398),e.qZA(),e._uU(399),e.TgZ(400,"span",29),e._uU(401),e.ALo(402,"transloco"),e.qZA()(),e.TgZ(403,"button",30),e._uU(404),e.ALo(405,"transloco"),e.qZA()()()()()(),e.TgZ(406,"div",77)(407,"button",78),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.goToPlanChosenSubscribe())}),e._uU(408),e.ALo(409,"transloco"),e.qZA()()(),e.YNc(410,Vs,3,3,"div",79),e.qZA()()}if(2&i){const t=e.oxw();e.xp6(5),e.hij(" ",e.lcZ(6,70,"CHOOSE_PLAN_TITLE")," "),e.xp6(3),e.hij(" ",e.lcZ(9,72,"CHOOSE_PLAN_SUB_TITLE")," "),e.xp6(2),e.Q6J("ngIf","fr"===t.stpLangageService.getCurrentLanguage()),e.xp6(1),e.Q6J("ngIf","fr"!==t.stpLangageService.getCurrentLanguage()),e.xp6(2),e.Q6J("uiSref",t.stpLangageService.langPrefix+"educationPrices"),e.xp6(1),e.hij(" \u279c ",e.lcZ(15,74,"ARE_YOU_A_SCHOOL")," "),e.xp6(2),e.Q6J("ngIf",t.isSwitchingReccurence("monthly_to_annual")&&!t.subscriptionIsCancelled()),e.xp6(1),e.Q6J("ngIf",t.isSwitchingReccurence("annual_to_monthly")),e.xp6(8),e.Oqu(e.lcZ(26,76,"CHOOSE_PLAN_FORMULA")),e.xp6(3),e.Tol(e.VKq(142,ge,"monthly"===t.recurrence)),e.xp6(1),e.Oqu(e.lcZ(30,78,"CHOOSE_PLAN_MONTHLY")),e.xp6(2),e.Tol(e.VKq(144,ge,"annually"===t.recurrence)),e.xp6(1),e.Oqu(e.lcZ(33,80,"CHOOSE_PLAN_ANNUALLY")),e.xp6(2),e.Q6J("ngIf","monthly"===t.recurrence),e.xp6(1),e.Q6J("ngIf","annually"===t.recurrence),e.xp6(4),e.Q6J("ngIf","fr"===t.stpLangageService.getCurrentLanguage()),e.xp6(1),e.Q6J("ngIf","fr"!==t.stpLangageService.getCurrentLanguage()),e.xp6(3),e.Oqu(t.plans["without-module"].price1),e.xp6(1),e.hij(",",t.plans["without-module"].price2," "),e.xp6(2),e.hij("/",e.lcZ(47,82,t.plans["without-module"].recurrence),""),e.xp6(2),e.Q6J("disabled",t.isMyPlan("without-module")||"without-module"===t.planChosen),e.xp6(1),e.hij(" ",e.lcZ(50,84,t.getButtonString("without-module"))," "),e.xp6(4),e.Q6J("ngIf","fr"===t.stpLangageService.getCurrentLanguage()),e.xp6(1),e.Q6J("ngIf","fr"!==t.stpLangageService.getCurrentLanguage()),e.xp6(3),e.Oqu(t.plans["with-module"].price1),e.xp6(1),e.hij(",",t.plans["with-module"].price2," "),e.xp6(2),e.hij("/",e.lcZ(61,86,t.plans["without-module"].recurrence),""),e.xp6(2),e.Q6J("disabled",t.isMyPlan("with-module")||"with-module"===t.planChosen),e.xp6(1),e.hij(" ",e.lcZ(64,88,t.getButtonString("with-module"))," "),e.xp6(12),e.hij(" ",e.lcZ(76,90,"CHOOSE_PLAN_STORY_ACCESS")," "),e.xp6(12),e.Oqu(e.lcZ(88,92,"CHOOSE_PLAN_AUDIO")),e.xp6(9),e.hij(" ",e.lcZ(97,94,"CHOOSE_PLAN_LISTEN")," "),e.xp6(16),e.hij(" ",e.lcZ(113,96,"CHOOSE_PLAN_RECORD")," "),e.xp6(15),e.hij(" ",e.lcZ(128,98,"CHOOSE_PLAN_SCREENLESS_MODE_TITLE")," "),e.xp6(15),e.hij(" ",e.lcZ(143,100,"CHOOSE_PLAN_SPEECH_RATE")," "),e.xp6(15),e.hij(" ",e.lcZ(158,102,"CHOOSE_PLAN_KARAO
1KE")," "),e.xp6(15),e.hij(" ",e.lcZ(173,104,"CHOOSE_PLAN_TEXT_TO_SPEECH")," "),e.xp6(11),e.Oqu(e.lcZ(184,106,"CHOOSE_PLAN_TEXT")),e.xp6(10),e.hij(" ",e.lcZ(194,108,"CHOOSE_PLAN_FONT")," "),e.xp6(16),e.hij(" ",e.lcZ(210,110,"CHOOSE_PLAN_FONT_SIZE")," "),e.xp6(15),e.hij(" ",e.lcZ(225,112,"CHOOSE_PLAN_COLORS")," "),e.xp6(16),e.hij(" ",e.lcZ(241,114,"CHOOSE_PLAN_PHONEMES")," "),e.xp6(15),e.hij(" ",e.lcZ(256,116,"CHOOSE_PLAN_SILENT")," "),e.xp6(15),e.hij(" ",e.lcZ(271,118,"syllables")," "),e.xp6(15),e.hij(" ",e.lcZ(286,120,"punctuation")," "),e.xp6(15),e.hij(" ",e.lcZ(301,122,"CHOOSE_PLAN_WORD_SPACING")," "),e.xp6(15),e.hij(" ",e.lcZ(316,124,"CHOOSE_PLAN_ALTERNATE_COLOR")," "),e.xp6(15),e.hij(" ",e.lcZ(331,126,"CHOOSE_PLAN_RULER")," "),e.xp6(17),e.hij(" ",e.lcZ(348,128,"CHOOSE_PLAN_OFFLINE")," "),e.xp6(15),e.hij(" ",e.lcZ(363,130,"CHOOSE_PLAN_ACTIVITIES")," "),e.xp6(13),e.Q6J("ngIf","monthly"===t.recurrence),e.xp6(1),e.Q6J("ngIf","annually"===t.recurrence),e.xp6(4),e.Q6J("ngIf","fr"===t.stpLangageService.getCurrentLanguage()),e.xp6(1),e.Q6J("ngIf","fr"!==t.stpLangageService.getCurrentLanguage()),e.xp6(3),e.Oqu(t.plans["without-module"].price1),e.xp6(1),e.hij(",",t.plans["without-module"].price2," "),e.xp6(2),e.hij("/",e.lcZ(388,132,t.plans["without-module"].recurrence),""),e.xp6(2),e.Q6J("disabled",t.isMyPlan("without-module")||"without-module"===t.planChosen),e.xp6(1),e.hij(" ",e.lcZ(391,134,t.getButtonString("without-module"))," "),e.xp6(4),e.Q6J("ngIf","fr"===t.stpLangageService.getCurrentLanguage()),e.xp6(1),e.Q6J("ngIf","fr"!==t.stpLangageService.getCurrentLanguage()),e.xp6(3),e.Oqu(t.plans["with-module"].price1),e.xp6(1),e.hij(",",t.plans["with-module"].price2," "),e.xp6(2),e.hij("/",e.lcZ(402,136,t.plans["without-module"].recurrence),""),e.xp6(2),e.Q6J("disabled",t.isMyPlan("with-module")||"with-module"===t.planChosen),e.xp6(1),e.hij(" ",e.lcZ(405,138,t.getButtonString("with-module"))," "),e.xp6(4),e.Oqu(e.lcZ(409,140,"monthly"===t.recurrence?"START_TRIAL":"I_SUBSCRIBE")),e.xp6(2),e.Q6J("ngIf","monthly"===t.recurrence)}}let ea=(()=>{class i{constructor(t,n,o,s,l,c,g,A){this.stpSeo=t,this.stpSession=n,this.playrStateService=o,this.stpSubscriptions=s,this.stpConfig=l,this.stateService=c,this.stpLangageService=g,this.stpAuth=A,this.plansAvailable=!1,this.showLogoutModal=!1}ngOnInit(){var t=this;return(0,E.Z)(function*(){t.stpSeo.setTitle("Formules d'abonnement Storyplay'r pour les familles"),t.publicPlans=yield t.stpSubscriptions.getPublicPlans();const n=t.publicPlans.findIndex(function(y){return"2022-monthly-basic-699"===y.stripeId}),o=t.publicPlans.findIndex(function(y){return"2022-monthly-premium-799"===y.stripeId}),s=t.publicPlans[n].priceLabel.split(",");let l=t.publicPlans[o].priceLabel.split(",");t.plansMonthly={_id:null,stripeId:null,type:null,name:null,"without-module":{name:t.publicPlans[n].shortPlanName,nameEn:t.publicPlans[n].shortPlanNameEn,price1:s[0],price2:s[1],recurrence:"MONTH",stripeId:t.publicPlans[n].stripeId},"with-module":{name:t.publicPlans[o].shortPlanName,nameEn:t.publicPlans[o].shortPlanNameEn,price1:l[0],price2:l[1],recurrence:"MONTH",stripeId:t.publicPlans[o].stripeId}};const c=t.publicPlans.findIndex(function(y){return"2022-yearly-basic-6999"===y.stripeId}),g=t.publicPlans.findIndex(function(y){return"2022-yearly-premium-7999"===y.stripeId});let A=t.publicPlans[c].priceLabel.split(","),L=t.publicPlans[g].priceLabel.split(",");t.plansAnnual={_id:null,stripeId:null,longPlanName:null,type:null,name:null,"without-module":{name:t.publicPlans[c].shortPlanName,nameEn:t.publicPlans[c].shortPlanNameEn,price1:A[0],price2:A[1],recurrence:"YEAR",stripeId:t.publicPlans[c].stripeId},"with-module":{name:t.publicPlans[g].shortPlanName,nameEn:t.publicPlans[g].shortPlanNameEn,price1:L[0],price2:L[1],recurrence:"YEAR",stripeId:t.publicPlans[g].stripeId}},t.session=t.stpSession.whoami(),t.plans=t.plansMonthly,t.recurrence="monthly",t.planChosen="without-module",t.plansAvailable=!0})()}ngAfterViewInit(){setTimeout(()=>{this.choosePlanIfUserAlreadyHaveOne()},500)}choosePlanIfUserAlreadyHaveOne(){this.session&&this.session.subscription&&this.session.subscription.plan&&this.session.subscription.plan.stripeId===this.plans["without-module"].stripeId?this.changePlan("with-module",!0):this.session&&this.session.subscription&&this.session.subscription.plan&&this.session.subscription.plan.stripeId===this.plans["with-module"].stripeId&&this.changePlan("without-module",!0)}changePlan(t,n){this.planChosen!=t&&(!n&&(this.isMyPlan(t)||this.planChosen===t)||(this.planChosen=t,"with-module"==t?this.withModule.map(s=>s.nativeElement.classList.add("selected")):this.withoutModule.map(s=>s.nativeElement.classList.add("selected")),"with-module"==t?this.withoutModule.map(s=>s.nativeElement.classList.remove("selected")):this.withModule.map(s=>s.nativeElement.classList.remove("selected"))))}isMyPlan(t){return this.session&&this.session.subscription&&this.session.subscription.plan&&"PDI"===this.session.subscription.plan.type&&this.session.subscription.plan.stripeId===this.plans[t].stripeId&&!this.stpSession.isSubscriptionHasExpired()}openModal(t){this.playrStateService.event.emit({eventName:"showModuleLectureMod
1al",datas:t})}getPlanChosenName(){return"fr"===this.stpLangageService.getCurrentLanguage()?this.plans[this.planChosen].name:this.plans[this.planChosen].nameEn}getPlanChosenPrice1(){return this.plans[this.planChosen].price1}getPlanChosenPrice2(){return this.plans[this.planChosen].price2}subscriptionIsCancelled(){return!(!(this.session.subscription&&this.session.subscription&&this.session.subscription.endDate)||this.stpSession.isSubscriptionHasExpired())}_moveToSignup(){this.isSwitchingReccurence("monthly_to_annual")&&!this.subscriptionIsCancelled()||this.isSwitchingReccurence("annual_to_monthly")?document.getElementById("warning_sub").scrollIntoView({behavior:"auto",block:"center",inline:"center"}):this.stateService.go(this.stpLangageService.langPrefix+"signup",{plan:this.plans[this.planChosen].stripeId})}goToPlanChosenSubscribe(){if("rallyeStudent"===this.session.userType||"adher"===this.session.userType)return this.showLogoutModal=!0;this._moveToSignup()}getPlanChosenRecurrence(){return this.plans[this.planChosen].recurrence}changeRecurrence(t){this.recurrence=t,this.plans="annually"===t?this.plansAnnual:this.plansMonthly,this.choosePlanIfUserAlreadyHaveOne()}getButtonString(t){return this.isMyPlan(t)?"YOUR_PLAN":t===this.planChosen?"SELECTED":"SELECT"}isSwitchingReccurence(t){return!(!("monthly_to_annual"===t&&"annually"===this.recurrence&&this.session&&this.session.subscription&&this.session.subscription.plan)||"2022-monthly-basic-699"!==this.session.subscription.plan.stripeId&&"2022-monthly-premium-799"!==this.session.subscription.plan.stripeId||this.stpSession.isSubscriptionHasExpired())||"annual_to_monthly"===t&&"monthly"===this.recurrence&&this.session&&this.session.subscription&&this.session.subscription.plan&&("2022-yearly-basic-6999"===this.session.subscription.plan.stripeId||"2022-yearly-premium-7999"===this.session.subscription.plan.stripeId)&&!this.stpSession.isSubscriptionHasExpired()}closeModal(){this.showLogoutModal=!1}logoutAndRedirect(){this.showLogoutModal=!1,this.stpAuth.logout().then(()=>{this.stateService.go(this.stpLangageService.langPrefix+"signup")})}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(M.i),e.Y36(m.i),e.Y36(Os.X),e.Y36(q.z),e.Y36(f.P),e.Y36(u.b2),e.Y36(C.s),e.Y36(P.b))},i.\u0275cmp=e.Xpm({type:i,selectors:[["stp-choose-plan"]],viewQuery:function(t,n){if(1&t&&(e.Gf(Is,5),e.Gf(Us,5)),2&t){let o;e.iGM(o=e.CRH())&&(n.withoutModule=o),e.iGM(o=e.CRH())&&(n.withModule=o)}},decls:12,vars:12,consts:[[3,"show","hideFooter","close"],[1,"d-flex","justify-content-center","stp-margin-top-bottom"],["type","button",1,"stp-btn-small-pill","stp-button-green",3,"click"],["type","button",1,"stp-btn-small-pill","stp-button-red",3,"click"],["class","container stp-container-v3 padded transparent",4,"ngIf"],[1,"container","stp-container-v3","padded","transparent"],[1,"stp-white-container-with-shadow","stp-choose-plan-responsive","padded","stp-choose-plan-stars-background","offset-15","width-70"],[1,"d-flex"],[1,"stp-choose-plan-title"],[1,"stp-color-red",2,"width","100%"],["class","stp-choose-plan-macaron","src","assets/images/illustrations_details_outils/macaron_sans_pubs.png",4,"ngIf"],["class","stp-choose-plan-macaron","src","assets/images/illustrations_details_outils/macaron_sans_pubs_en.png",4,"ngIf"],[2,"width","80%","font-size","12px","margin-bottom","60px"],[1,"stp-choose-plan-link",3,"uiSref"],["class","stp-choose-plan-warning","id","warning_sub",4,"ngIf"],[2,"margin-top","30px"],[1,"stp-choose-plan-table-side"],[1,"stp-choose-plan-cell-row"],[1,"stp-choose-plan-cell-group"],[1,"stp-choose-plan-h3"],[1,"stp-choose-plan-monthly-annually"],[1,"stp-cursor-pointer",3,"click"],["class","stp-choose-plan-explanations",4,"ngIf"],[1,"d-flex","text-center","stp-choose-plan-cell-group"],[1,"stp-choose-plan-table-header","selected",3,"click"],["withoutModule",""],["class","stp-table-title",4,"ngIf"],[1,"stp-price-container"],[1,"stp-price-first-number"],[1,"stp-subscription-duration"],[1,"stp-button-small","stp-button-blue","full-width","small-uppercase-font","stp-choose-plan-hide-responsive",2,"margin-top","10px",3,"disabled"],[1,"stp-choose-plan-table-header",3,"click"],["withModule",""],[1,"stp-choose-plan-cell","without-border","stp-choose-plan-cell-group","light","d-flex","stp-cursor-pointer",2,"background-color","#7fc14842",3,"click"],[1,"stp-round-button-with-shadow","small-blue","margin-right","vertical-center","question-mark","stp-choose-plan-hide-responsive"],[1,"stp-round-button-fixed-aide-lecture"],[1,"placeholder"],[1,"round-button","books"],[1,"stp-cell-title"],[1,"stp-choose-plan-cell","without-border","light","checkmark","selected"],[1,"bi","bi-check-lg"],[1,"stp-choose-plan-cell","without-border","light","checkmark"],[1,"stp-choose-plan-table-side","stp-choose-plan-cell-border-top",2,"background-color","#e7ebee"],[1,"stp-choose-plan-vertical-text"],[1,"stp-choose-plan-cell","stp-choose-plan-cell-group","d-flex","stp-cursor-pointer",3,"click"],[1,"stp-round-button-with-shadow","orange","margin-right"],[1,"round-button-icon","sound"],[1,"stp-choose-plan-cell","checkmark","selected"],[1,"stp-choose-plan-cell","checkmark"],[1,"stp-choose-plan-cell","light","d-flex","stp-choose-plan-cell-group","stp-cursor-pointer","stp-cursor-pointer",3,"click"],[1,"round-button","record"],[1,"stp-choose-plan-cell","light","checkmark","selected"],[1,"stp-choose-plan-cell","light","checkmark"],[1,"stp-choose-plan-cell","light","d-flex","stp-choose-plan-cell-group","stp-cursor-pointer",3,"click"],[1,"stp-round-button-fixed-aide-lecture","margin-right","stp-choose-plan-screenless-icon"],["src","assets/images/storybox/icone_audio_4.png","alt","Mode Sans \xc9cran",1,"stp-choose-plan-screenless-icon-img"],[1,"stp-round-button-with-shadow","margin-right"],[1,"round-button-icon","turtle"],[1,"stp-choose-plan-cell","light","stp-choose-plan-cell-group","d-flex","stp-cursor-pointer",3,"click"],[1,"round-button","karaoke"],[1,"round-button","text-to-speech"],[1,"stp-choose-plan-table-side","stp-choose-plan-cell-border-top",2,"background-color","#dbe0e3"],[1,"round-button","font"],[1,"round-button","font-size"],[1,"round-button-icon","costp-choose-plan-explanations-emphaselor"],[1,"round-button-icon","plain-text"],[1,"round-button","silent"],[1,"round-button","syllables"],[1,"round-button","punctuation"],[1,"round-button","line-height"],[1,"round-button","line-color"],[1,"round-button","cursor"],[1,"stp-choose-plan-cell","stp-choose-plan-cell-group","d-flex"],[1,"round-button","text-frame"],[1,"stp-choose-plan-cell","light","stp-choose-plan-cell-group","d-flex"],[1,"stp-choose-plan-table-header","bottom","selected",3,"click"],[1,"stp-choose-plan-table-header","bottom",3,"click"],[1,"d-flex","choose-plan-subscribe-button-label-container"],["id","choose-plan-subscribe-button",1,"stp-button-medium","stp-button-choose-plan-subscribe",3,"click"],["style","margin-top: 30px; font-size: 12px; color: red;",4,"ngIf"],["src","assets/images/illustrations_details_outils/macaron_sans_pubs.png",1,"stp-choose-plan-macaron"],["src","assets/images/illustrations_details_outils/macaron_sans_pubs_en.png",1,"stp-choose-plan-macaron"],["id","warning_sub",1,"stp-choose-plan-warning"],[3,"innerHTML"],[1,"stp-choose-plan-explanations"],[1,"stp-choose-plan-explanations-emphase"],[1,"stp-table-title"],[2,"margin-top","30px","font-size","12px","color","red"]],template:function(t,n){1&t&&(e.TgZ(0,"stpModalDialog",0),e.NdJ("close",function(){return n.closeModal()}),e.TgZ(1,"div"),e._uU(2),e.ALo(3,"transloco"),e.qZA(),e.TgZ(4,"div",1)(5,"button",2),e.NdJ("click",function(){return n.logoutAndRedirect()}),e._uU(6),e.ALo(7,"transloco"),e.qZA(),e.TgZ(8,"button",3),e.NdJ("click",function(){return n.closeModal()}),e._uU(9),e.ALo(10,"transloco"),e.qZA()()(),e.YNc(11,Xs,411,146,"div",4)),2&t&&(e.Q6J("show",n.showLogoutModal)("hideFooter",!0),e.xp6(2),e.hij(" ",e.lcZ(3,6,"LOGOUT_MODAL_TEXT")," "),e.xp6(4),e.hij(" ",e.lcZ(7,8,"CONTINUE")," "),e.xp6(3),e.hij(" ",e.lcZ(10,10,"CANCEL")," "),e.xp6(2),e.Q6J("ngIf",n.plansAvailable))},dependencies:[_.bcJ,_.KeH,p.O5,G.Z,h.Ot,p.uU],encapsulation:2}),i})();function ta(i,a){if(1&i&&(e.TgZ(0,"div",2)(1,"div",3)(2,"div",4)(3,"div",5),e._uU(4),e.ALo(5,"transloco"),e.qZA(),e.TgZ(6,"p",6)(7,"strong"),e._uU(8),e.ALo(9,"transloco"),e.qZA()(),e.TgZ(10,"p",6)(11,"strong"),e._uU(12),e.ALo(13,"transloco"),e.qZA()(),e._UZ(14,"br"),e.TgZ(15,"div",7)(16,"div",8)(17,"div",9)(18,"strong"),e._uU(19),e.ALo(20,"transloco"),e.qZA()(),e.TgZ(21,"p"),e._uU(22),e.ALo(23,"transloco"),e.qZA(),e.TgZ(24,"p")(25,"a",10),e._uU(26),e.ALo(27,"transloco"),e.qZA()()(),e.TgZ(28,"div",11),e._UZ(29,"img",12)(30,"br")(31,"img",12),e.qZA()(),e._UZ(32,"br"),e.TgZ(33,"div",7)(34,"div",8)(35,"div",9)(36,"strong"),e._uU(37),e.ALo(38,"transloco"),e.qZA()(),e.TgZ(39,"p"),e._uU(40),e.ALo(4
11,"transloco"),e._UZ(42,"br"),e._uU(43),e.ALo(44,"transloco"),e._UZ(45,"br"),e._uU(46),e.ALo(47,"transloco"),e.qZA(),e.TgZ(48,"p"),e._uU(49),e.ALo(50,"transloco"),e.qZA()(),e.TgZ(51,"div",11),e._UZ(52,"img",13)(53,"br")(54,"img",12),e.qZA()(),e._UZ(55,"br"),e.TgZ(56,"div",7)(57,"div",8)(58,"div",9)(59,"strong"),e._uU(60),e.ALo(61,"transloco"),e.qZA()(),e.TgZ(62,"p"),e._uU(63),e.ALo(64,"transloco"),e._UZ(65,"br"),e.qZA(),e.TgZ(66,"p"),e._uU(67),e.ALo(68,"transloco"),e.qZA()(),e.TgZ(69,"div",11),e._UZ(70,"img",12)(71,"br")(72,"img",12),e.qZA()(),e.TgZ(73,"div",14)(74,"div",8)(75,"div",9)(76,"strong"),e._uU(77),e.ALo(78,"transloco"),e.qZA()(),e.TgZ(79,"p"),e._uU(80),e.ALo(81,"transloco"),e.TgZ(82,"strong"),e._uU(83),e.ALo(84,"transloco"),e.qZA(),e._uU(85),e.ALo(86,"transloco"),e.qZA(),e.TgZ(87,"p"),e._uU(88),e.ALo(89,"transloco"),e.qZA(),e.TgZ(90,"p"),e._uU(91),e.ALo(92,"transloco"),e.qZA()(),e.TgZ(93,"div",11),e._UZ(94,"img",12),e.qZA()()(),e._UZ(95,"div",15),e.qZA()()),2&i){const t=e.oxw();e.xp6(4),e.hij(" ",e.lcZ(5,27,"DOWNLOAD_WELCOME")," "),e.xp6(4),e.Oqu(e.lcZ(9,29,"DOWNLOAD_MSG1")),e.xp6(4),e.Oqu(e.lcZ(13,31,"DOWNLOAD_MSG4")),e.xp6(7),e.Oqu(e.l
1cZ(20,33,"DOWNLOAD_MSG5")),e.xp6(3),e.hij(" ",e.lcZ(23,35,"DOWNLOAD_MSG6")," "),e.xp6(4),e.Oqu(e.lcZ(27,37,"DOWNLOAD_MSG7")),e.xp6(3),e.MGl("src","",t.stpConfig.api,"/img/common/device-desktop.png",e.LSH),e.xp6(2),e.MGl("src","",t.stpConfig.api,"/img/common/device-icons-browsers.png",e.LSH),e.xp6(6),e.Oqu(e.lcZ(38,39,"DOWNLOAD_MSG8")),e.xp6(3),e.hij(" ",e.lcZ(41,41,"DOWNLOAD_MSG9"),""),e.xp6(3),e.hij(" - ",e.lcZ(44,43,"DOWNLOAD_MSG10"),""),e.xp6(3),e.hij(" - ",e.lcZ(47,45,"DOWNLOAD_MSG11")," "),e.xp6(3),e.hij(" ",e.lcZ(50,47,"DOWNLOAD_MSG12")," "),e.xp6(3),e.MGl("src","",t.stpConfig.api,"/img/common/device-tablets-landscape.png",e.LSH),e.xp6(2),e.MGl("src","",t.stpConfig.api,"/img/common/device-icons-apps.png",e.LSH),e.xp6(6),e.Oqu(e.lcZ(61,49,"DOWNLOAD_MSG14")),e.xp6(3),e.hij(" ",e.lcZ(64,51,"DOWNLOAD_MSG15"),""),e.xp6(4),e.hij(" ",e.lcZ(68,53,"DOWNLOAD_MSG16")," "),e.xp6(3),e.MGl("src","",t.stpConfig.api,"/img/common/device-smartphone.png",e.LSH),e.xp6(2),e.MGl("src","",t.stpConfig.api,"/img/common/device-icons-apps.png",e.LSH),e.xp6(5),e.Oqu(e.l
1cZ(78,55,"DOWNLOAD_MSG_MONTHLY1")),e.xp6(3),e.hij(" ",e.lcZ(81,57,"DOWNLOAD_MSG_MONTHLY2")," "),e.xp6(3),e.Oqu(e.lcZ(84,59,"DOWNLOAD_MSG_MONTHLY3")),e.xp6(2),e.hij(". ",e.lcZ(86,61,"DOWNLOAD_MSG_MONTHLY4"),". "),e.xp6(3),e.hij(" ",e.lcZ(89,63,"DOWNLOAD_MSG_MONTHLY5"),". "),e.xp6(3),e.hij(" ",e.lcZ(92,65,"DOWNLOAD_MSG_MONTHLY6")," "),e.xp6(3),e.Q6J("src",t.stpConfig.baseApp+"/assets/images/v2/calendar-icon-250px.png",e.LSH)}}function ia(i,a){1&i&&(e.TgZ(0,"div",16)(1,"div",5),e._uU(2),e.ALo(3,"transloco"),e.qZA(),e.TgZ(4,"div",3)(5,"div",8)(6,"p"),e._uU(7," Nous sommes ravis de vous offrir 15 jours d\u2019essai gratuit \xe0 notre plateforme. "),e.qZA(),e._UZ(8,"stpParagrapheEducation")(9,"stpParagrapheAideEnLigne"),e.TgZ(10,"p"),e._uU(11," Merci beaucoup et bonnes lectures !!! "),e.qZA()(),e.TgZ(12,"div",17),e._UZ(13,"img",18)(14,"img",19),e.qZA()()()),2&i&&(e.xp6(2),e.hij(" ",e.lcZ(3,1,"DOWNLOAD_WELCOME")," "))}const na=function(){return{post:"ecole-inscrire-nouvelle-classe"}};function oa(i,a){if(1&i&&(e.TgZ(0,"div",16)(1,"div",5),e._uU(2),e.ALo(3,"transloco"),e.qZA(),e.TgZ(4,"div",3)(5,"div",8)(6,"p"),e._uU(7," Nous sommes ravis que votre \xe9cole rejoigne notre plateforme. "),e.qZA(),e.TgZ(8,"p"),e._uU(9," Vous avez un compte administrateur qui vous permet d'inscrire les enseignants sur votre espace. Pour cela, rendez-vous sur notre page d'aide en ligne : "),e.TgZ(10,"a",20),e._uU(11," Gestion de comptes enseignants"),e.qZA(),e._uU(12,". "),e.qZA(),e._UZ(13,"stpParagrapheEducation")(14,"stpParagrapheAideEnLigne"),e.TgZ(15,"p"),e._uU(16," Merci beaucoup et bonnes lectures !!! "),e.qZA()(),e.TgZ(17,"div",17),e._UZ(18,"img",18)(19,"img",19),e.qZA()()()),2&i){const t=e.oxw();e.xp6(2),e.hij(" ",e.lcZ(3,3,"DOWNLOAD_WELCOME")," "),e.xp6(8),e.Q6J("uiSref",t.stpLangageService.langPrefix+"aide")("uiParams",e.DdM(5,na))}}function sa(i,a){1&i&&(e.TgZ(0,"div",16)(1,"div",5),e._uU(2),e.ALo(3,"transloco"),e.qZA(),e.TgZ(4,"div",3)(5,"div",8)(6,"p"),e._uU(7," Nous sommes ravis que votre classe rejoigne notre plateforme. "),e.qZA(),e._UZ(8,"stpParagrapheEducation")(9,"stpParagrapheAideEnLigne"),e.TgZ(10,"p"),e._uU(11," Merci beaucoup et bonnes lectures !!! "),e.qZA()(),e.TgZ(12,"div",17),e._UZ(13,"img",18)(14,"img",19),e.qZA()()()),2&i&&(e.xp6(2),e.hij(" ",e.lcZ(3,1,"DOWNLOAD_WELCOME")," "))}function aa(i,a){1&i&&(e.TgZ(0,"div",2)(1,"div",5),e._uU(2),e.ALo(3,"transloco"),e.qZA(),e.TgZ(4,"div",3)(5,"div",8),e._UZ(6,"stpParagrapheLflIntro")(7,"stpParagrapheLflAboFamille")(8,"stpParagrapheLflAboSchool"),e.qZA(),e.TgZ(9,"div",17),e._UZ(10,"img",18)(11,"img",19),e.qZA()()()),2&i&&(e.xp6(2),e.hij(" ",e.lcZ(3,1,"DOWNLOAD_WELCOME")," "))}let ra=(()=>{class i{constructor(t,n,o){this.stateService=t,this.stpLangageService=n,this.stpConfig=o}ngOnInit(){this.welcomePage=this.stateService.params.userTypeToWelcome}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(u.b2),e.Y36(C.s),e.Y36(f.P))},i.\u0275cmp=e.Xpm({type:i,selectors:[["stp-welcome"]],decls:5,vars:5,consts:[["class","container stp-container-v3",4,"ngIf"],["class","container stp-container-v3 stp-info-block",4,"ngIf"],[1,"container","stp-container-v3"],[1,"row-fluid"],[1,"stp-downloadapp",2,"margin-top","10px"],[1,"stp-title-red","text-center","remove-padding-top","marged-bot"],[1,"text-center"],[1,"container-fluid","static-section","marged-top-double"],[1,"col-md-8"],[1,"stp-title-big-and-thin","stp-color-red","azur","marged-bot","smaller-font"],["href","/",1,"stp-link","red"],[1,"col-md-4","text-center"],["alt","",3,"src"],["alt","","width","90%","height","90%",3,"src"],[1,"container-fluid","static-section","marged-top-double",2,"margin-top","50px"],[1,"clearfix"],[1,"container","stp-container-v3","stp-info-block"],[1,"col-md-4"],["src","assets/images/v3/welcome-img-01.png",1,"stp-full-size-element"],["src","assets/images/v3/welcome-img-02.png",1,"stp-full-size-element"],[3,"uiSref","uiParams"]],template:function(t,n){1&t&&(e.YNc(0,ta,96,67,"div",0),e.YNc(1,ia,15,3,"div",1),e.YNc(2,oa,20,6,"div",1),e.YNc(3,sa,15,3,"div",1),e.YNc(4,aa,12,3,"div",0)),2&t&&(e.Q6J("ngIf","welcomeFamily"===n.welcomePage),e.xp6(1),e.Q6J("ngIf","welcomeEducationTryperiod"===n.welcomePage),e.xp6(1),e.Q6J("ngIf","welcomeEducationAdmin"===n.welcomePage),e.xp6(1),e.Q6J("ngIf","welcomeSingleClassroom"===n.welcomePage),e.xp6(1),e.Q6J("ngIf","welcomeLfl"===n.welcomePage))},dependencies:[p.O5,re.S,le.t,ce.B,pe.s,de.e,_.bcJ,_.KeH,h.Ot],encapsulation:2}),i})();var la=d(47316),_e=d(69504);function ca(i,a){1&i&&(e.TgZ(0,"div")(1,"p")(2,"b"),e._uU(3,"Afin d'inscrire votre/vos groupes d'\xe9l\xe8ves sur Storyplay'r, il faut que des \xe9l\xe8ves de ces groupes se connectent une premi\xe8re fois \xe0 Storyplay'r depuis le GAR. Ils apparaitront alors sur cet \xe9cran et vous pourrez les s\xe9lectionner."),e.qZA()()())}function pa(i,a){1&i&&(e.TgZ(0,"div")(1,"p")(2,"b"),e._uU(3,"Si vous ne l'avez pas encore fait, merci de cocher ci-dessous votre/vos groupes d'\xe9l\xe8ves sur Storyplay'r."),e.qZA()()())}function da(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div")(1,"input",10),e.NdJ("click",function(){const s=e.CHM(t).$implicit,l=e.oxw();return e.KtG(l.createOrDeleteGarGroup(s))}),e.qZA(),e.TgZ(2,"label",11),e._uU(3),e.qZA()()}if(2&i){const t=a.$implicit,n=e.oxw();e.xp6(1),e.s9C("id",t),e.s9C("name",t),e.Q6J("checked",n.groupExists(t)),e.xp6(1),e.s9C("for",t),e.xp6(1),e.Oqu(t)}}let ua=(()=>{class i{constructor(t,n,o,s,l,c,g){this.stpSession=t,this.apiService=n,this.stpConfigService=o,this.stpRallyeService=s,this.stpEventService=l,this.translocoService=c,this.Flash=g,this.groups=[],this.isLoading=!1}ngOnInit(){this.session=this.stpSession.getSession(),this.initGroups()}initGroups(){this.stpSession.whoami().group&&this.stpSession.whoami().group.forEach(t=>{this.stpRallyeService.expandGroup(t).subscribe(n=>{this.groups.push(n)})})}deleteGroup(t){this.isLoading=!0,this.stpRallyeService.deleteGroup(t).subscribe(()=>{this.stpEventService.createDeleteGroupEvent(),this.groups.splice(this.groups.indexOf(t),1),this.isLoading=!1},()=>{this.Flash.error(this.translocoService.translate("ERROR_CONTACT_US")),this.isLoading=!1})}groupExists(t){const n=t+"-"+this.session.garSchoolUAI;return this.groups.find(s=>-1!==s.groupId.indexOf(n))}createOrDeleteGarGroup(t){const n=this.groupExists(t);console.log(n),n?this.deleteGroup(n):this.createGarGroup(t)}createGarGroup(t){this.isLoading=!0,this.apiService.post(this.stpConfigService.api+"/api/group/createGarStoryplayrGroup",{garDIV_APP:t}).subscribe(n=>{this.isLoading=!1,this.groups.push(n)},()=>{this.isLoading=!1})}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(m.i),e.Y36(v.s),e.Y36(f.P),e.Y36(_e.q),e.Y36(Y.m),e.Y36(h.Vn),e.Y36(N.M))},i.\u0275cmp=e.Xpm({type:i,selectors:[["stp-gar-education"]],decls:18,vars:6,consts:[[1,"container","stp-container-v3"],["alt","storyplay'r logo","src","assets/images/v2/logo.png",1,"stp-top-bar-logo",2,"max-width","265px"],[1,"sp-gar-home-block"],[1,"row","d-flex"],[1,"col-7"],[1,"stp-title-red","remove-padding-top","font-30","marged-bot-20"],[4,"ngIf"],[4,"ngFor","ngForOf"],[1,"col-5"],[3,"uiSref"],["type","checkbox",3,"id","name","checked","click"],[2,"padding-left","10px",3,"for"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0),e._UZ(1,"img",1),e.TgZ(2,"div",2)(3,"div"),e._uU(4),e._UZ(5,"br"),e.qZA(),e.TgZ(6,"div",3)(7,"div",4)(8,"div",5),e._uU(9,"Inscription des classes"),e.qZA(),e.YNc(10,ca,4,0,"div",6),e.YNc(11,pa,4,0,"div",6),e.YNc(12,da,4,5,"div",7),e.qZA(),e.TgZ(13,"div",8)(14,"div",5),e._uU(15,"Acc\xe8s \xe0 Storyplay'r"),e.qZA(),e.TgZ(16,"a",9),e._uU(17,"Acc\xe9der \xe0 la biblioth\xe8que"),e.qZA()()()()()),2&t&&(e.xp6(4),e.AsE(" Bonjour ",n.session.firstName," ",n.session.lastName,", bienvenue sur Storyplay'r."),e.xp6(6),e.Q6J("ngIf",!n.session.listeGarClasses||0===n.session.listeGarClasses.length),e.xp6(1),e.Q6J("ngIf",n.session.listeGarClasses&&n.session.listeGarClasses.length>0),e.xp6(1),e.Q6J("ngForOf",n.session.listeGarClasses),e.xp6(4),e.Q6J("uiSref","bibliotheque"))},dependencies:[_.bcJ,_.KeH,p.sg,p.O5],encapsulation:2}),i})();var ga=d(5963),te=d(96370);function _a(i,a){1&i&&(e.TgZ(0,"div",5)(1,"b"),e._uU(2," Vous \xeates bien connect\xe9 \xe0 Storyplay'r en tant qu'\xe9l\xe8ve. Merci de patienter en attendant que votre enseignant cr\xe9e votre groupe. "),e.qZA()())}function ma(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div")(1,"span"),e._uU(2),e.qZA(),e.TgZ(3,"button",11),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit,s=e.oxw(2);return e.KtG(s.createStudentUser(o))}),e._uU(4,"Je m'inscris"),e.qZA()()}if(2&i){const t=e.oxw().$implicit;e.xp6(2),e.Oqu(t.groupName)}}function ha(i,a){if(1&i&&(e.TgZ(0,"div"),e.YNc(1,ma,5,1,"div",10),e.qZA()),2&i){const t=a.$implicit;e.xp6(1),e.Q6J("ngIf",!t.hasAlreadySubscribed)}}function fa(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div")(1,"span"),e._uU(2),e.qZA(),e.TgZ(3,"button",11),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit,s=e.oxw(2);return e.KtG(s.autologinToGroup(o))}),e._uU(4,"J'acc\xe8de"),e.qZA()()}if(2&i){const t=e.oxw().$implicit;e.xp6(2),e.Oqu(t.groupName)}}function va(i,a){if(1&i&&(e.TgZ(0,"div"),e.YNc(1,fa,5,1,"div",10),e.qZA()),2&i){const t=a.$implicit;e.xp6(1),e.Q6J("ngIf",t.hasAlreadySubscribed)}}function Sa(i,a){if(1&i&&(e.TgZ(0,"div",6)(1,"div",7)(2,"div",8),e._uU(3,"Inscription"),e.qZA(),e.YNc(4,ha,2,1,"div",9),e.qZA(),e.TgZ(5,"div",7)(6,"div",8),e._uU(7,"Acc\xe8s \xe0 Storyplay'r"),e.qZA(),e.YNc(8,va,2,1,"div",9),e.qZA()()),2&i){const t=e.oxw();e.xp6(4),e.Q6J("ngForOf",t.groups),e.xp6(4),e.Q6J("ngForOf",t.groups)}}let Aa=(()=>{class i{constructor(t,n,o,s,l,c,g){this.stpSession=t,this.apiService=n,this.stpConfigService=o,this.stpRallyeService=s,this.stpEventService=l,this.translocoService=c,this.Flash=g,this.groups=[],this.currentEtag=null}ngOnInit(){this.session=this.stpSession.getSession(),this.initGroups()}ngOnDestroy(){this.pollingSubscription&&this.pollingSubscription.unsubscribe()}initGroups(){this.stpSession.whoami().listeGarClasses&&(this.fetchGroups(),this.pollingSubscription=(0,ga.H)(1e4,1e4).subscribe(()=>{this.fetchGroups()}))}fetchGroups(){let t=new te.WM({Accept:"application/json","Content-Type":"application/json"});this.currentEtag&&(t=t.set("If-None-Match",this.currentEtag)),this.apiService.post(this.stpConfigService.api+"/api/group/gar/getGarStudentGroups",{},t).subscribe({next:n=>{n.etag&&(this.currentEtag=n.etag),n&&Array.isArray(n.groups)&&(this.groups=[],n.groups.forEach(o=>{this.groups.push(o)}))},error:n=>{304!==n.status&&console.error("Error fetching groups:",n)}})}createStudentUser(t){this.apiService.post(this.stpConfigService.api+"/api/account/gar/createGarStudent",{group_id:t._id}).subscribe(()=>{const n=this.groups.findIndex(o=>o._id===t._id);this.groups[n].hasAlreadySubscribed=!0})}autologinToGroup(t){window.location.href=this.stpConfigService.api+"/api/account/gar/autologinGarStudent?groupId="+encodeURIComponent(t.groupId)}groupExists(t){const n=t+"-"+this.session.garSchoolUAI;return this.groups.find(o=>o.groupId===n)}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(m.i),e.Y36(v.s),e.Y36(f.P),e.Y36(_e.q),e.Y36(Y.m),e.Y36(h.Vn),e.Y36(N.M))},i.\u0275cmp=e.Xpm({type:i,selectors:[["stp-gar-student-choose-group"]],decls:8,vars:3,consts:[[1,"container","stp-container-v3"],["alt","storyplay'r logo","src","assets/images/v2/logo.png",1,"stp-top-bar-logo",2,"max-width","265px"],[1,"sp-gar-home-block"],["style","margin-top: 25px;",4,"ngIf"],["class","row d-flex",4,"ngIf"],[2,"margin-top","25px"],[1,"row","d-flex"],[1,"col-6"],[1,"stp-title-red","remove-padding-top","font-30","marged-bot-20"],[4,"ngFor","ngForOf"],[4,"ngIf"],[1,"stp-btn-small-pill","stp-button-red",3,"click"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0),e._UZ(1,"img",1),e.TgZ(2,"div",2)(3,"div"),e._uU(4),e._UZ(5,"br"),e.qZA(),e.YNc(6,_a,3,0,"div",3),e.YNc(7,Sa,9,2,"div",4),e.qZA()()),2&t&&(e.xp6(4),e.hij(" Bonjour ",n.session.firstName,", bienvenue sur Storyplay'r."),e.xp6(2),e.Q6J("ngIf",!n.groups||0===n.groups.length),e.xp6(1),e.Q6J("ngIf",n.groups&&n.groups.length>0))},dependencies:[p.sg,p.O5],encapsulation:2}),i})(),Za=(()=>{class i{constructor(){}ngOnInit(){}}return i.\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.Xpm({type:i,selectors:[["stp-gar-not-setup"]],decls:5,vars:0,consts:[[1,"container","stp-container-v3"],["alt","storyplay'r logo","src","assets/images/v2/logo.png",1,"stp-top-bar-logo",2,"max-width","265px"],[1,"sp-gar-home-block"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0),e._UZ(1,"img",1),e.TgZ(2,"div",2)(3,"div"),e._uU(4," Storyplay'r n'a pas \xe9t\xe9 configur\xe9 pour accueillir des utilisateurs de votre \xe9tablissement. Nous vous prions de nous en excuser. "),e.qZA()()())},encapsulation:2}),i})(),xa=(()=>{class i{constructor(){}ngOnInit(){}}return i.\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.Xpm({type:i,selectors:[["stp-gar-logout"]],decls:5,vars:0,consts:[[1,"container","stp-container-v3"],["alt","storyplay'r logo","src","assets/images/v2/logo.png",1,"stp-top-bar-logo",2,"max-width","265px"],[1,"sp-gar-home-block"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0),e._UZ(1,"img",1),e.TgZ(2,"div",2)(3,"div"),e._uU(4," Vous \xeates bien d\xe9connect\xe9 de Storyplay'r. Si vous souhaitez vous reconnecter merci de passer par votre ENT. "),e.qZA()()())},encapsulation:2}),i})();var $=d(77579),D=d(82722);function Ta(i,a){if(1&i&&(e.TgZ(0,"option",11),e._uU(1),e.qZA()),2&i){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.Oqu(t)}}function ba(i,a){1&i&&(e.TgZ(0,"div")(1,"p"),e._uU(2),e.ALo(3,"transloco"),e.qZA()()),2&i&&(e.xp6(2),e.Oqu(e.l
1cZ(3,1,"USERS_STATS_CHOOSE_YEAR")))}function Ca(i,a){if(1&i&&(e.TgZ(0,"tr")(1,"td",16),e._uU(2),e.ALo(3,"transloco"),e.qZA(),e.TgZ(4,"td",16),e._uU(5),e.qZA()()),2&i){const t=a.$implicit;e.xp6(2),e.Oqu(e.lcZ(3,2,t.month)),e.xp6(3),e.Oqu(t.value)}}function Na(i,a){if(1&i&&(e.TgZ(0,"div")(1,"table",14)(2,"thead")(3,"tr")(4,"th"),e._uU(5),e.ALo(6,"transloco"),e.qZA(),e.TgZ(7,"th"),e._uU(8),e.ALo(9,"transloco"),e.qZA()()(),e.TgZ(10,"tbody"),e.YNc(11,Ca,6,4,"tr",15),e.qZA()()()),2&i){const t=e.oxw(2);e.xp6(5),e.Oqu(e.lcZ(6,3,"MONTH")),e.xp6(3),e.Oqu(e.lcZ(9,5,"BIBLIO_NUMBER_OF_ACCOUNT_CREATED")),e.xp6(3),e.Q6J("ngForOf",t.createdCountOnMonth)}}function Ma(i,a){if(1&i&&(e.TgZ(0,"div",12),e.YNc(1,ba,4,3,"div",13),e.YNc(2,Na,12,7,"div",13),e.qZA()),2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",!t.selectedYear),e.xp6(1),e.Q6J("ngIf",t.selectedYear)}}let La=(()=>{class i{constructor(t,n,o,s,l,c,g){this.stpSeo=t,this.apiService=n,this.stpConfig=o,this.stpSession=s,this.Flash=l,this.stateService=c,this.stpLangageService=g,this.destroy$=new $.x,this.accounts=[],this.accountsFilteredByYear=[],this.yearlist=[],this.createdCountOnMonth=[{value:0,month:"JANUARY"},{value:0,month:"FEBRUARY"},{value:0,month:"MARCH"},{value:0,month:"APRIL"},{value:0,month:"MAY"},{value:0,month:"JUNE"},{value:0,month:"JULY"},{value:0,month:"AUGUST"},{value:0,month:"SEPTEMBER"},{value:0,month:"OCTOBER"},{value:0,month:"NOVEMBER"},{value:0,month:"DECEMBER"}],this.selectedYear=0,this.startingYear=9999,this.searchInProgress=!1,this.loader=!0,this.overlay=!1}ngOnInit(){this.stpSeo.setTitle("Statistiques des comptes cr\xe9\xe9s"),this.search()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}search(){this.overlay=!0,this.searchInProgress=!0;const t=this.stpSession.whoami()._id;this.apiService.get(this.stpConfig.api+"/api/biblio/"+t+"/accounts").pipe((0,D.R)(this.destroy$)).subscribe({next:n=>{this.accounts=n},error:n=>{console.error("Error fetching accounts:",n),this.Flash.errorTranslate("ERROR_LOADING_DATA"),this.loader=!1,this.overlay=!1,this.searchInProgress=!1},complete:()=>{if(this.loader=!1,this.overlay=!1,this.searchInProgress=!1,this.accounts.length>0){this.startingYear=parseInt(this.accounts[this.accounts.length-1].signupDate.substring(0,4)),this.createYearList(this.startingYear);const n=new Date;this.changeYearFilter(n.getFullYear())}}})}createYearList(t){this.yearlist=[];let n=t;for(;new Date(n,0).getTime()<Date.now();)this.yearlist.unshift(n),n++;this.yearlist.length>0&&(this.selectedYear=this.yearlist[0])}changeYearFilter(t){const n="string"==typeof t?parseInt(t,10):t;!n||(this.selectedYear=n,this.accountsFilteredByYear=this.accounts.filter(o=>o.signupDate.substring(0,4)===String(n)),this.loader=!0,this.resetCount(),this.countNumberOfAccountCreatedEachMonth())}countNumberOfAccountCreatedEachMonth(){this.accountsFilteredByYear.forEach(t=>{const n=parseInt(t.signupDate.substring(5,7))-1;n>=0&&n<12&&this.createdCountOnMonth[n].value++}),this.loader=!1}resetCount(){this.createdCountOnMonth.forEach(t=>{t.value=0})}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(M.i),e.Y36(v.s),e.Y36(f.P),e.Y36(m.i),e.Y36(N.M),e.Y36(u.b2),e.Y36(C.s))},i.\u0275cmp=e.Xpm({type:i,selectors:[["stp-biblio-adher-created"]],decls:28,vars:19,consts:[[1,"container","stp-container-v3"],[1,"col-xs-12",2,"margin-bottom","20px"],[1,"nav","nav-tabs"],[1,"active"],[1,"disabled",2,"color","#777","cursor","default","padding","10px 15px","display","block"],[3,"uiSref"],[1,"col-xs-12","well"],[1,"col-xs-12","row"],[3,"value","change"],[3,"value",4,"ngFor","ngForOf"],["style","margin-top: 15px;",4,"ngIf"],[3,"value"],[2,"margin-top","15px"],[4,"ngIf"],[1,"table","table-bordered","table-hover"],[4,"ngFor","ngForOf"],[1,"sp-trimed-cell"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"ul",2)(3,"li",3)(4,"span",4),e._uU(5),e.ALo(6,"transloco"),e.qZA()(),e.TgZ(7,"li")(8,"a",5),e._uU(9),e.ALo(10,"transloco"),e.qZA()()()(),e.TgZ(11,"h1"),e._uU(12),e.ALo(13,"transloco"),e.qZA(),e.TgZ(14,"div",6)(15,"p"),e._uU(16),e.ALo(17,"transloco"),e.qZA(),e.TgZ(18,"p")(19,"i"),e._uU(20),e.ALo(21,"transloco"),e.qZA()()(),e.TgZ(22,"div",7)(23,"div"),e._uU(24," Ann\xe9e : "),e.TgZ(25,"select",8),e.NdJ("change",function(s){return n.changeYearFilter(s.target.value)}),e.YNc(26,Ta,2,2,"option",9),e.qZA()(),e.YNc(27,Ma,3,2,"div",10),e.qZA()()),2&t&&(e.xp6(5),e.hij(" ",e.lcZ(6,9,"BIBLIO_HEADLINE_USERS_STATS")," "),e.xp6(3),e.Q6J("uiSref",n.stpLangageService.langPrefix+"biblioOpenedByMonth"),e.xp6(1),e.hij(" ",e.lcZ(10,11,"BIBLIO_HEADLINE_READING_STATS")," "),e.xp6(3),e.hij(" ",e.lcZ(13,13,"BIBLIO_HEADLINE_USERS_STATS")," "),e.xp6(4),e.hij(" ",e.lcZ(17,15,"BIBLIO_HEADLINE_USERS_DESCRIPTION")," "),e.xp6(4),e.Oqu(e.l
1cZ(21,17,"BIBLIO_HEADLINE_USERS_DESCRIPTION_NOTE")),e.xp6(5),e.Q6J("value",n.selectedYear),e.xp6(1),e.Q6J("ngForOf",n.yearlist),e.xp6(1),e.Q6J("ngIf",!n.loader))},dependencies:[_.bcJ,_.KeH,p.sg,p.O5,r.YN,r.Kr,h.Ot],encapsulation:2}),i})();function ya(i,a){if(1&i&&(e.TgZ(0,"option",14),e._uU(1),e.qZA()),2&i){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.Oqu(t)}}function Pa(i,a){1&i&&(e.TgZ(0,"div")(1,"p"),e._uU(2),e.ALo(3,"transloco"),e.qZA()()),2&i&&(e.xp6(2),e.Oqu(e.lcZ(3,1,"USERS_STATS_CHOOSE_YEAR")))}function qa(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"th")(1,"a",19),e.NdJ("click",function(){const s=e.CHM(t).index,l=e.oxw(3);return e.KtG(l.sortMonth(s))}),e._uU(2),e.ALo(3,"transloco"),e.qZA()()}if(2&i){const t=a.$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,t))}}function Ea(i,a){if(1&i&&(e.TgZ(0,"td",24),e._uU(1),e.qZA()),2&i){const t=a.$implicit,n=e.oxw(4);e.Q6J("ngStyle",n.adaptBackgroundColor(t)),e.xp6(1),e.hij(" ",t," ")}}function Oa(i,a){if(1&i&&(e.TgZ(0,"tr")(1,"td",22),e._uU(2),e.qZA(),e.YNc(3,Ea,2,2,"td",23),e.TgZ(4,"td",20),e._uU(5),e.qZA()()),2&i){const t=a.$implicit;e.xp6(2),e.Oqu(t.title),e.xp6(1),e.Q6J("ngForOf",t.monthlyCount),e.xp6(2),e.Oqu(t.events.length)}}function Ia(i,a){if(1&i&&(e.TgZ(0,"td",20),e._uU(1),e.qZA()),2&i){const t=a.$implicit;e.xp6(1),e.Oqu(t)}}function Ua(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",16)(1,"table",17)(2,"thead")(3,"tr")(4,"th"),e._uU(5),e.ALo(6,"transloco"),e.qZA(),e.YNc(7,qa,4,3,"th",18),e.TgZ(8,"th")(9,"a",19),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.sortTotal())}),e._uU(10,"Total"),e.qZA()()()(),e.TgZ(11,"tbody"),e.YNc(12,Oa,6,3,"tr",18),e.TgZ(13,"tr")(14,"td",20),e._uU(15,"Total"),e.qZA(),e.YNc(16,Ia,2,1,"td",21),e.qZA()()()()}if(2&i){const t=e.oxw(2);
1e.xp6(5),e.Oqu(e.lcZ(6,4,"BIBLIO_REPORTING_TITLE")),e.xp6(2),e.Q6J("ngForOf",t.monthList),e.xp6(5),e.Q6J("ngForOf",t.booksOpenedArray),e.xp6(4),e.Q6J("ngForOf",t.totalEachMonth)}}function wa(i,a){if(1&i&&(e.TgZ(0,"div"),e.YNc(1,Pa,4,3,"div",13),e.YNc(2,Ua,17,6,"div",15),e.qZA()),2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",!t.yearfilter),e.xp6(1),e.Q6J("ngIf",t.yearfilter)}}let Ja=(()=>{class i{constructor(t,n,o,s,l,c,g){this.stpSeo=t,this.apiService=n,this.stpConfig=o,this.stpSession=s,this.Flash=l,this.stateService=c,this.stpLangageService=g,this.destroy$=new $.x,this.accounts=[],this.booksOpened={},this.sortBooksOpened={},this.booksOpenedArray=[],this.totalEachMonth=[0,0,0,0,0,0,0,0,0,0,0,0,0],this.yearlist=[],this.monthList=["JANUARY","FEBRUARY","MARCH","APRIL","MAY","JUNE","JULY","AUGUST","SEPTEMBER","OCTOBER","NOVEMBER","DECEMBER"],this.yearfilter=(new Date).getFullYear().toString(),this.startingYear=9999,this.searchInProgress=!1,this.loader=!0,this.overlay=!1}ngOnInit(){this.stpSeo.setTitle("Statistiques des livres ouverts par mois"),this.buildYearList(),this.search()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}mapObjectInArray(t){const n=[];return Object.keys(t).forEach(o=>{n.push({events:t[o],title:o})}),n}sortObjectInArray(t){const n={};return Object.keys(t).sort().forEach(o=>{n[o]=t[o]}),n}adaptBackgroundColor(t){const o=Math.round(255*(1-t/(t+10)));return{"background-color":"rgb(255,"+o+","+o+")"}}calculateTotalOnYear(){for(let t=0;t<12;++t)this.totalEachMonth[12]+=this.totalEachMonth[t]}createCountOnEachMonth(t){const n=[0,0,0,0,0,0,0,0,0,0,0,0];t.forEach(o=>{o.monthlyCount=n.slice(),o.events.forEach(s=>{const l=parseInt(s.epochDate.substring(5,7))-1;++o.monthlyCount[l],++this.totalEachMonth[l]})}),this.calculateTotalOnYear()}createYearList(t){for(;new Date(t,0).getTime()<Date.now();)this.yearlist.unshift(t),++t;this.yearlist.length>0&&(this.yearfilter=this.yearlist[0].toString())}buildYearList(){const t=this.stpSession.whoami()._id;this.apiService.get(this.stpConfig.api+"/api/biblio/"+t+"/accounts").pipe((0,D.R)(this.destroy$)).subscribe({next:n=>{this.accounts=n},error:n=>{console.error("Error fetching accounts:",n),this.Flash.errorTranslate("ERROR_LOADING_DATA")},complete:()=>{this.accounts.length>0&&(this.startingYear=parseInt(this.accounts[this.accounts.length-1].signupDate.substring(0,4)),this.createYearList(this.startingYear))}})}search(){this.overlay=!0,this.searchInProgress=!0,this.totalEachMonth=[0,0,0,0,0,0,0,0,0,0,0,0,0];let t=(new te.LE).set("start",this.yearfilter+"-01-01").set("end",this.yearfilter+"-12-31").set("filterByMonth","true");const n=this.stpSession.whoami()._id;this.apiService.get(this.stpConfig.api+"/api/events/reporting-for-mediatheque/"+n,t).pipe((0,D.R)(this.destroy$)).subscribe({next:o=>{this.booksOpened=o,this.sortBooksOpened=this.sortObjectInArray(this.booksOpened),this.booksOpenedArray=this.mapObjectInArray(this.sortBooksOpened),this.createCountOnEachMonth(this.booksOpenedArray)},error:o=>{console.error("Error fetching book openings data:",o),this.Flash.errorTranslate("ERROR_LOADING_DATA")},complete:()=>{this.loader=!1,this.overlay=!1,this.searchInProgress=!1}})}changeYearFilter(t){this.yearfilter=t.toString(),this.loader=!0,this.overlay=!0,this.searchInProgress=!0,this.search()}sortMonth(t){this.booksOpenedArray=this.booksOpenedArray.sort((n,o)=>(o.monthlyCount?.[t]||0)-(n.monthlyCount?.[t]||0))}sortTotal(){this.booksOpenedArray=this.booksOpenedArray.sort((t,n)=>n.events.length-t.events.length)}getCSVDownloadUrl(){const t=this.stpSession.whoami()._id;return this.stpConfig.api+"/api/events/reporting-for-mediatheque-csv/"+t+"?start="+this.yearfilter+"-01-01&end="+this.yearfilter+"-12-31"}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(M.i),e.Y36(v.s),e.Y36(f.P),e.Y36(m.i),e.Y36(N.M),e.Y36(u.b2),e.Y36(C.s))},i.\u0275cmp=e.Xpm({type:i,selectors:[["stp-biblio-opened-by-month"]],decls:27,vars:27,consts:[[1,"container","stp-container-v3"],[1,"col-xs-12",2,"margin-bottom","20px"],[1,"nav","nav-tabs"],[3,"uiSref"],[1,"active"],[1,"disabled",2,"color","#777","cursor","default","padding","10px 15px","display","block"],[1,"col-xs-12","well"],[1,"col-xs-12","row","d-flex"],[1,"sp-year-filter",2,"margin","auto 0"],[1,"biblio-accounts-created-filter-dropdown",3,"value","change"],[3,"value",4,"ngFor","ngForOf"],[1,"btn","btn-primary",2,"margin-left","15px",3,"href"],[1,"col-xs-12","row"],[4,"ngIf"],[3,"value"],["style","margin-top: 15px;",4,"ngIf"],[2,"margin-top","15px"],[1,"table","table-bordered","table-hover"],[4,"ngFor","ngForOf"],["href","javascript:void(0)",3,"click"],[2,"font-weight","bold"],["style","font-weight: bold",4,"ngFor","ngForOf"],[1,"sp-trimed-cell"],["class","sp-trimed-cell adapt-color",3,"ngStyle",4,"ngFor","ngForOf"],[1,"sp-trimed-cell","adapt-color",3,"ngStyle"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"ul",2)(3,"li")(4,"a",3),e._uU(5),e.ALo(6,"transloco"),e.qZA()(),e.TgZ(7,"li",4)(8,"span",5),e._uU(9),e.ALo(10,"transloco"),e.qZA()()()(),e.TgZ(11,"h1"),e._uU(12),e.ALo(13,"transloco"),e.qZA(),e.TgZ(14,"div",6),e._uU(15),e.ALo(16,"transloco"),e.qZA(),e.TgZ(17,"div",7)(18,"div",8),e._uU(19," Ann\xe9e : "),e.TgZ(20,"select",9),e.NdJ("change",function(s){return n.changeYearFilter(s.target.value)}),e.YNc(21,ya,2,2,"option",10),e.qZA()(),e.TgZ(22,"a",11),e._uU(23),e.ALo(24,"transloco"),e.qZA()(),e.TgZ(25,"div",12),e.YNc(26,wa,3,2,"div",13),e.qZA()()),2&t&&(e.xp6(4),e.Q6J("uiSref",n.stpLangageService.langPrefix+"biblioAdherCreated"),e.xp6(1),e.hij(" ",e.lcZ(6,17,"BIBLIO_HEADLINE_USERS_STATS")," "),e.xp6(4),e.hij(" ",e.lcZ(10,19,"BIBLIO_HEADLINE_READING_STATS")," "),e.xp6(3),e.hij(" ",e.lcZ(13,21,"BIBLIO_HEADLINE_READING_STATS")," "),e.xp6(3),e.hij(" ",e.lcZ(16,23,"BIBLIO_DESCRIPTION_OPENINGS_BY_MONTH")," "),e.xp6(5),e.Q6J("value",n.yearfilter),e.xp6(1),e.Q6J("ngForOf",n.yearlist),e.xp6(1),e.Udp("pointer-events",!n.yearfilter||n.loader?"none":"auto")("opacity",!n.yearfilter||n.loader?"0.5":"1"),e.ekj("disabled",!n.yearfilter||n.loader),e.Q6J("href",n.getCSVDownloadUrl(
1),e.LSH),e.uIk("download","books-opened-"+n.yearfilter+".csv"),e.xp6(1),e.hij(" ",e.lcZ(24,25,"DOWNLOAD_CSV")," "),e.xp6(3),e.Q6J("ngIf",!n.loader))},dependencies:[_.bcJ,_.KeH,p.sg,p.O5,p.PC,r.YN,r.Kr,h.Ot],encapsulation:2}),i})();var Ra=d(81548);let Ya=(()=>{class i{transform(t){return t?t.toString().replace(",","\xa0").replace(".",","):""}}return i.\u0275fac=function(t){return new(t||i)},i.\u0275pipe=e.Yjl({name:"formatNumbersInFrench",type:i,pure:!0}),i})();function Fa(i,a){if(1&i&&(e.TgZ(0,"option",25),e._uU(1),e.qZA()),2&i){const t=e.oxw().$implicit;e.Q6J("value",t.key),e.xp6(1),e.Oqu(t.name)}}function ka(i,a){if(1&i&&(e.ynx(0),e.YNc(1,Fa,2,2,"option",24),e.BQk()),2&i){const t=a.$implicit,n=e.oxw();e.xp6(1),e.Q6J("ngIf",n.isAdmin()||t.visible)}}function Da(i,a){1&i&&e._UZ(0,"div",26)}function Qa(i,a){if(1&i&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td",31),e._uU(4),e.qZA(),e.TgZ(5,"td",31),e._uU(6),e.ALo(7,"formatNumbersInFrench"),e.ALo(8,"number"),e.qZA()()),2&i){const t=a.$implicit,n=e.oxw(2);e.xp6(2),e.AsE("",t.title," ",n.getIsbnIfNotNull(t),""),e.xp6(2),e.Oqu(t.count),e.xp6(2),e.Oqu(e.lcZ(7,4,e.lcZ(8,6,t.amountCA)))}}function Ga(i,a){if(1&i&&(e.TgZ(0,"div",27)(1,"div",28)(2,"table",29)(3,"thead")(4,"tr")(5,"th",30),e._uU(6,"Donn\xe9es globales Storyplay'r"),e.qZA()()(),e.TgZ(7,"tbody")(8,"tr")(9,"td"),e._uU(10,"Montant revers\xe9 \xe0 tous les \xe9diteurs (en \u20ac HT)"),e.qZA(),e.TgZ(11,"td",31),e._uU(12),e.ALo(13,"formatNumbersInFrench"),e.ALo(14,"number"),e.qZA()(),e.TgZ(15,"tr")(16,"td"),e._uU(17,"Nombre total d'ouvertures (lectures et \xe9coutes) des albums"),e.qZA(),e.TgZ(18,"td",31),e._uU(19),e.ALo(20,"formatNumbersInFrench"),e.ALo(21,"number"),e.qZA()()()(),e.TgZ(22,"table",29)(23,"thead")(24,"tr")(25,"th",30),e._uU(26),e.qZA()()(),e.TgZ(27,"tbody")(28,"tr")(29,"td"),e._uU(30),e.qZA(),e.TgZ(31,"td",32),e._uU(32),e.ALo(33,"formatNumbersInFrench"),e.ALo(34,"number"),e.qZA()(),e.TgZ(35,"tr")(36,"td"),e._uU(37),e.qZA(),e.TgZ(38,"td",32),e._uU(39),e.ALo(40,"formatNumbersInFrench"),e.ALo(41,"number"),e.qZA()()()()(),e.TgZ(42,"div",33)(43,"table",29)(44,"thead")(45,"tr")(46,"th",34),e._uU(47),e.qZA()()(),e.TgZ(48,"tbody")(49,"tr")(50,"td"),e._uU(51,"Titre"),e.qZA(),e.TgZ(52,"td",31),e._uU(53,"Ouvertures"),e.qZA(),e.TgZ(54,"td",31),e._uU(55,"Montant revers\xe9 (\u20ac)"),e.qZA()(),e.YNc(56,Qa,9,8,"tr",12),e.TgZ(57,"tr")(58,"td")(59,"strong"),e._uU(60,"TOTAL"),e.qZA()(),e.TgZ(61,"td",31)(62,"strong"),e._uU(63),e.ALo(64,"formatNumbersInFrench"),e.ALo(65,"number"),e.qZA()(),e.TgZ(66,"td",31)(67,"strong"),e._uU(68),e.ALo(69,"formatNumbersInFrench"),e.ALo(70,"number"),e.qZA()()()()()()()),2&i){const t=e.oxw();e.xp6(12),e.Oqu(e.lcZ(13,11,e.lcZ(14,13,t.reporting.additionalData.totalCA/2))),e.xp6(7),e.Oqu(e.l
1cZ(20,15,e.lcZ(21,17,t.reporting.additionalData.totalEvents))),e.xp6(7),e.hij("Donn\xe9es globales ",null==t.reporting.editor?null:t.reporting.editor.name,""),e.xp6(4),e.hij("Montant revers\xe9 \xe0 ",null==t.reporting.editor?null:t.reporting.editor.name," (en \u20ac HT)"),e.xp6(2),e.Oqu(e.lcZ(33,19,e.lcZ(34,21,t.reporting.additionalData.totalEditor))),e.xp6(5),e.hij("Nombre total d'ouvertures des albums ",null==t.reporting.editor?null:t.reporting.editor.name,""),e.xp6(2),e.Oqu(e.lcZ(40,23,e.lcZ(41,25,t.reporting.additionalData.totalCount))),e.xp6(8),e.hij("Donn\xe9es d\xe9taill\xe9es ",null==t.reporting.editor?null:t.reporting.editor.name,""),e.xp6(9),e.Q6J("ngForOf",t.reporting.stories),e.xp6(7),e.Oqu(e.lcZ(64,27,e.lcZ(65,29,t.reporting.additionalData.totalCount))),e.xp6(5),e.Oqu(e.lcZ(69,31,e.lcZ(70,33,t.reporting.additionalData.totalEditor)))}}function ja(i,a){1&i&&(e.TgZ(0,"div",35),e._UZ(1,"hr"),e.qZA())}let Ha=(()=>{class i{constructor(t,n,o,s,l,c,g){this.stpSeo=t,this.apiService=n,this.stpConfig=o,this.stpSession=s,this.Flash=l,this.stateService=c,this.stpLangageService=g,this.destroy$=new $.x,this.loading=!1,this.reporting={},this.editorId="",this.reportingKey="",this.configurations=Ra._;const A=this.stpSession.whoami();this.editorId=A?.editor||""}ngOnInit(){this.stpSeo.setTitle("Votre reddition des comptes Storyplay'r")}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}getIsbnIfNotNull(t){return t.isbn&&"null"!=t.isbn?" - "+t.isbn:""}getReporting(){if(!this.reportingKey)return void this.Flash.error("Veuillez s\xe9lectionner une p\xe9riode");const t=this.configurations.reporting.find(o=>o.key===this.reportingKey);if(!t)return void this.Flash.error("Configuration de p\xe9riode invalide");this.loading=!0;let n=(new te.LE).set("year",t.year.toString()).set("start",t.startDate).set("end",t.endDate);this.apiService.get(this.stpConfig.api+"/api/editor/"+this.editorId+"/reporting",n).pipe((0,D.R)(this.destroy$)).subscribe({next:o=>{this.reporting=o},error:o=>{console.error("Error fetching reporting data:",o),this.Flash.error("Erreur lors du chargement des donn\xe9es"),this.loading=!1},complete:()=>{this.loading=!1}})}excelExport(){if(!this.reportingKey)return void this.Flash.error("Veuillez s\xe9lectionner une p\xe9riode");const t=this.configurations.reporting.find(o=>o.key===this.reportingKey);t?window.location.href=`${this.stpConfig.api}/api/editor/${this.editorId}/exportReporting?start=${t.startDate}&end=${t.endDate}&year=${t.year}`:this.Flash.error("Configuration de p\xe9riode invalide")}isAdmin(){return this.stpSession.isAdmin()}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(M.i),e.Y36(v.s),e.Y36(f.P),e.Y36(m.i),e.Y36(N.M),e.Y36(u.b2),e.Y36(C.s))},i.\u0275cmp=e.Xpm({type:i,selectors:[["stp-publisher-reporting"]],decls:57,vars:7,consts:[[1,"container","stp-container-v3"],[1,"col-xs-12",2,"margin-bottom","20px"],[1,"nav","nav-tabs"],[1,"active"],[1,"disabled",2,"color","#777","cursor","default","padding","10px 15px","display","block"],[3,"uiSref"],[1,"sp-backoffice-page-title"],[1,"well","marged-bot","col-xs-12"],[1,"form-inline",3,"ngSubmit"],[1,"row","marged-bot-half"],[1,"form-group","col-sm-4"],["name","reportingKey",3,"ngModel","ngModelChange"],[4,"ngFor","ngForOf"],["type","submit",1,"btn","btn-primary",3,"disabled"],[1,"bi","bi-search"],[1,"sp-backoffice-explanations","marged-bot"],[1,"col-xs-12","alert","alert-info","small"],[1,"sp-backoffice-explanations","marged-bot","small"],[1,"col-xs-12","alert","alert-warning"],[1,"btn","btn-success",3,"click"],[1,"bi","bi-download"],["class","stp-circle-loader",4,"ngIf"],["class","marged-bot col-xs-12 row",4,"ngIf"],["class","col-xs-offset-1 col-xs-10",4,"ngIf"],[3,"value",4,"ngIf"],[3,"value"],[1,"stp-circle-loader"],[1,"marged-bot","col-xs-12","row"],[1,"col-xs-5"],[1,"table","table-striped","table-hover"],["colspan","2"],["align","right"],["width","25%","align","right"],[1,"col-xs-7"],["colspan","3"],[1,"col-xs-offset-1","col-xs-10"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"ul",2)(3,"li",3)(4,"span",4),e._uU(5," Reddition des comptes "),e.qZA()(),e.TgZ(6,"li")(7,"a",5),e._uU(8," Prix public de location "),e.qZA()()()(),e.TgZ(9,"div",6),e._uU(10,"Votre reddition des comptes Storyplay'r"),e.qZA(),e.TgZ(11,"div",7)(12,"form",8),e.NdJ("ngSubmit",function(){return n.getReporting()}),e.TgZ(13,"div",9)(14,"div",10)(15,"select",11),e.NdJ("ngModelChange",function(s){return n.reportingKey=s}),e.YNc(16,ka,2,1,"ng-container",12),e.qZA()(),e.TgZ(17,"div",10)(18,"button",13),e._UZ(19,"i",14),e._uU(20," Obtenir la reddition "),e.qZA()()()()(),e.TgZ(21,"div",15)(22,"div",16)(23,"p"),e._uU(24,"Voici les informations g\xe9n\xe9rales concernant la reddition Storyplay'r de la p\xe9riode choisie"),e.qZA(),e.TgZ(25,"p"),e._uU(26,"Merci de nous transmettre votre facture \xe0 l'adresse suivante : "),e.TgZ(27,"strong"),e._uU(28,"[email protected]"),e.qZA(),e._uU(29," (le montant affich\xe9 ci-dessous est HT)."),e.qZA(),e.TgZ(30,"p"),e._uU(31,"Pour la r\xe9mun\xe9ration des auteurs, nous vous fournissons en d\xe9tail, album par album :"),e.qZA(),e.TgZ(32,"ul")(33,"li"),e._uU(34,"le Nombre d'ouvertures (lectures et \xe9coutes) par les abonn\xe9s"),e.qZA(),e.TgZ(35,"li"),e._uU(36,"le Montant HT qui vous est revers\xe9 "),e.TgZ(37,"strong"),e._uU(38,"pour cet album"),e.qZA()()(),e.TgZ(39,"p"),e._uU(40," Ce d\xe9tail doit vous permettre de reverser les droits aux auteurs. "),e.qZA(),e.TgZ(41,"p"),e._uU(42," Vous pouvez exporter ce d\xe9tail au format Excel en appuyant sur le bouton vert ci-dessous. "),e.qZA()()(),e.TgZ(43,"div",17)(44,"div",18),e._uU(45," Ces donn\xe9es sont "),e.TgZ(46,"strong"),e._uU(47,"strictement confidentielles"),e.qZA(),e._uU(48," et ne pourront \xeatre transmises \xe0 des tiers sans l'autorisation pr\xe9alable de Storyplay'r. "),e.qZA()(),e.TgZ(49,"a",19),e.NdJ("click",function(){return n.excelExport()}),e._UZ(50,"i",20),e._uU(51," Exporter vers Excel "),e.qZA(),e._UZ(52,"br")(53,"br"),e.YNc(54,Da,1,0,"div",21),e.YNc(55,Ga,71,35,"div",22),e.YNc(56,ja,2,0,"div",23),e.qZA()),2&t&&(e.xp6(7),e.Q6J("uiSref",n.stpLangageService.langPrefix+"publisherPrices"),e.xp6(8),e.Q6J("ngModel",n.reportingKey),e.xp6(1),e.Q6J("ngForOf",n.configurations.reporting),e.xp6(2),e.Q6J("disabled",n.loading),e.xp6(36),e.Q6J("ngIf",n.loading),e.xp6(1),e.Q6J("ngIf",!n.loading&&(null==n.reporting.additionalData?null:n.reporting.additionalData.totalCA)>0),e.xp6(1),e.Q6J("ngIf",!n.loading))},dependencies:[_.bcJ,_.KeH,p.sg,p.O5,r._Y,r.YN,r.Kr,r.EJ,r.JJ,r.JL,r.On,r.F,p.JJ,Ya],encapsulation:2}),i})();function Ba(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td",16)(4,"strong"),e._uU(5),e.qZA(),e._uU(6),e.qZA(),e.TgZ(7,"td",17)(8,"input",18),e.NdJ("ngModelChange",function(o){const l=e.CHM(t).$implicit;return e.KtG(l.newPagePriceCents=o)}),e.qZA(),e.TgZ(9,"button",19),e.NdJ("click",function(){const s=e.CHM(t).$implicit,l=e.oxw();return e.KtG(l.updateStoryPagePrice(s))}),e._uU(10,"Soumettre"),e.qZA()()()}if(2&i){const t=a.$implicit,n=e.oxw();e.xp6(2),e.lnq(" ",t.title,"",t.isbn?" - ":"","",t.isbn," "),e.xp6(3),e.Oqu(t.pagePriceCents),e.xp6(1),e.hij("",t.pagePriceCents?n.getLastUpdatePriceString(t.datePagePriceModified):"Prix non d\xe9fini"," "),e.xp6(2),e.Q6J("ngModel",t.newPagePriceCents),e.xp6(1),e.Q6J("disabled",n.updating)}}function Ka(i,a){1&i&&(e.TgZ(0,"span"),e._uU(1,"Mise \xe0 jour en cours..."),e.qZA())}function Wa(i,a){1&i&&(e.TgZ(0,"span"),e._uU(1,"Soumettre pour tous les livres"),e.qZA())}let $a=(()=>{class i{constructor(t,n,o,s,l,c,g){this.stpSeo=t,this.apiService=n,this.stpConfig=o,this.stpSession=s,this.Flash=l,this.stateService=c,this.stpLangageService=g,this.destroy$=new $.x,this.stories=[],this.editorId="",this.updating=!1,this.editorId=this.stpSession.whoami().editor}ngOnInit(){this.stpSeo.setTitle("Prix public de location"),this.initCurrentEditorStories()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}initCurrentEditorStories(){this.apiService.get(this.stpConfig.api+`/api/editor/${this.editorId}/getStories`).pipe((0,D.R)(this.destroy$)).subscribe({next:t=>{this.stories=t.map(n=>(n.pagePriceCents||(n.newPagePriceCents=1),n))},error:t=>{console.error(t)}})}updateStoryPagePrice(t,n){!t.newPagePriceCents||t.newPagePriceCents>4?alert("Nous sommes d\xe9sol\xe9 mais le prix demand\xe9 est incompatible avec l'offre Storyplayr. En accord avec l'article 5.1 du contrat Storyplay'r, nous ne pouvons publier ce titre \xe0 ce prix l\xe0 dans le cadre de notre offre."):this.apiService.post(this.stpConfig.api+`/api/editor/${this.editorId}/updateStoryPagePrice`,{storyId:t._id,pagePriceCents:t.newPagePriceCents}).pipe((0,D.R)(this.destroy$)).subscribe({next:o=>{t.pagePriceCents=o.pagePriceCents,t.datePagePriceModified=o.datePagePriceModified,n&&n()},error:o=>{console.error(o),n&&n(o)}})}getLastUpdatePriceString(t){const n=new Date(t),o=n.getMinutes()<10?"0"+n.getMinutes():n.getMinutes().toString();return` (d\xe9fini le ${n.getDate()}/${n.getMonth()+1}/${n.getFullYear()} \xe0 ${n.getHours()}h${o})`}getStoriesWithoutPrice(){return this.stories.filter(t=>!t.pagePriceCents).length}updateAll(t){const n=this.stories.length;let o=t||0;for(;o<n;){const s=this.stories[o];if(s.newPagePriceCents&&s.newPagePriceCents!==s.pagePriceCents)return this.updating=!0,this.updateStoryPagePrice(s,l=>{this.updating=!1,l&&this.Flash.error("Failed to update page price for story "+s.title),this.updateAll(++o)});++o}this.updating=!1}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(M.i),e.Y36(v.s),e.Y36(f.P),e.Y36(m.i),e.Y36(N.M),e.Y36(u.b2),e.Y36(C.s))},i.\u0275cmp=e.Xpm({type:i,selectors:[["stpPublisherPrices"]],decls:32,vars:6,consts:[[1,"container","stp-container-v3"],[1,"col-xs-12",2,"margin-bottom","20px"],[1,"nav","nav-tabs"],[3,"uiSref"],[1,"active"],[1,"disabled",2,"color","#777","cursor","default","padding","10px 15px","display","block"],[1,"col-xs-12","stp-editor-prices"],[1,"row"],[1,"col-xs-12","col-sm-10","col-md-8"],[1,"col-xs-12"],[1,"table"],[1,"text-center"],[4,"ngFor","ngForOf"],[1,"text-right"],[1,"btn","btn-primary",3,"disabled","click"],[4,"ngIf"],[1,"page-price"],[1,"text-center","d-flex"],["type","number",1,"text-center","small-input",3,"ngModel","ngModelChange"],[1,"btn","btn-primary",2,"margin-left","10px",3,"disabled","click"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"ul",2)(3,"li")(4,"a",3),e._uU(5," Reddition des comptes "),e.qZA()(),e.TgZ(6,"li",4)(7,"span",5),e._uU(8," Prix public de location "),e.qZA()()()(),e.TgZ(9,"div",6)(10,"h2"),e._uU(11,"Prix public de location"),e.qZA(),e.TgZ(12,"div",7)(13,"p",8),e._uU(14," En tant qu\u2019\xe9diteur des \u0153uvres dans l\u2019application Storyplay\u2019r, vous devez d\xe9finir ci-dessous le prix public de \xab location \xbb de vos \u0153uvres par double-pages lues, pour que vos livres puissent \xeatre pr\xe9sents sur notre plateforme : "),e.qZA(),e.TgZ(15,"p",9),e._uU(16),e.qZA()(),e.TgZ(17,"table",10)(18,"thead")(19,"tr")(20,"th"),e._uU(21,"Titre"),e.qZA(),e.TgZ(22,"th",11),e._uU(23,"Prix TTC par double-page (en cent. \u20ac)"),e.qZA(),e.TgZ(24,"th",11),e._uU(25,"Nouveau prix (en cent. \u20ac)"),e.qZA()()(),e.TgZ(26,"tbody"),e.YNc(27,Ba,11,7,"tr",12),e.qZA()(),e.TgZ(28,"div",13)(29,"button",14),e.NdJ("click",function(){return n.updateAll()}),e.YNc(30,Ka,2,0,"span",15),e.YNc(31,Wa,2,0,"span",15),e.qZA()()()()),2&t&&(e.xp6(4),e.Q6J("uiSref",n.stpLangageService.langPrefix+"publisherReporting"),e.xp6(12),e.hij(" Nombre d'histoire(s) n'ayant pas encore de prix fix\xe9: ",n.getStoriesWithoutPrice()," "),e.xp6(11),e.Q6J("ngForOf",n.stories),e.xp6(2),e.Q6J("disabled",n.updating),e.xp6(1),e.Q6J("ngIf",n.updating),e.xp6(1),e.Q6J("ngIf",!n.updating))},dependencies:[_.bcJ,_.KeH,p.sg,p.O5,r.Fj,r.wV,r.JJ,r.On],encapsulation:2}),i})();var za=d(3873);function Va(i,a){1&i&&(e.TgZ(0,"p"),e._uU(1,"Nous sommes en train de v\xe9rifier la connexion"),e.qZA())}function Xa(i,a){1&i&&e._UZ(0,"stpCatalogSpinner")}let er=(()=>{class i{constructor(t,n,o,s,l,c,g,A,L,y){this.stpSeo=t,this.stpConfig=n,this.stpSession=o,this.stateService=s,this.stpLangageService=l,this.stpAuthService=c,this.Flash=g,this.stpEventService=A,this.stpCatalogService=L,this.apiService=y,this.loading=!0}ngOnInit(){const n=this.stateService.params.mediathequeid,o=this.stateService.params.target,s=this.stateService.params.token,l=this.stateService.params.userid;let c=this.stpConfig.api+"/api/"+this.stateService.params.portalProvider+"/test/login",g="?";n&&(c+=g+"mediathequeid="+n,g="&"),o&&(c+=g+"target="+o,g="&"),s&&(c+=g+"token="+s,g="&"),l&&(c+=g+"userid="+l,g="&"),c+=g+"noredirect=true",c+=g+"prefix=cvs",this.apiService.get(c).subscribe(A=>{console.log("query done"),console.log(A),this.stpSession.fetchFromServerAndRefreshSession().then(()=>{this.stpEventService.connection("LOGIN"),this.loading=!1,window.location.href=this.stpLangageService.langPrefix+A.targetRedirect})})}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(M.i),e.Y36(f.P),e.Y36(m.i),e.Y36(u.b2),e.Y36(C.s),e.Y36(P.b),e.Y36(N.M),e.Y36(Y.m),e.Y36(W.u),e.Y36(v.s))},i.\u0275cmp=e.Xpm({type:i,selectors:[["stp-login-mediatheque"]],decls:4,vars:2,consts:[[1,"container","stp-container-v3"],[1,"row"],[4,"ngIf"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1),e.YNc(2,Va,2,0,"p",2),e.YNc(3,Xa,1,0,"stpCatalogSpinner",2),e.qZA()()),2&t&&(e.xp6(2),e.Q6J("ngIf",n.loading),e.xp6(1),e.Q6J("ngIf",n.loading))},dependencies:[p.O5,za.G],encapsulation:2}),i})();var x=d(25349),T=d(53796);let tr=(()=>{class i{constructor(t,n,o){this.stateService=t,this.stpLangageService=n,this.stpConfig=o}ngOnInit(){}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(u.b2),e.Y36(C.s),e.Y36(f.P))},i.\u0275cmp=e.Xpm({type:i,selectors:[["stp-subscription-canceled"]],decls:14,vars:9,consts:[[1,"container","stp-container-v3","stp-info-block"],[1,"stp-title-red","text-center","remove-padding-top","marged-bot"],[1,"row-fluid"],[1,"col-12","text-center"],["href","/",1,"stp-link","red"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1),e._uU(2),e.ALo(3,"transloco"),e.qZA(),e.TgZ(4,"div",2)(5,"div",3)(6,"p")(7,"strong"),e._uU(8),e.ALo(9,"transloco"),e.qZA()(),e.TgZ(10,"p")(11,"a",4),e._uU(12),e.ALo(13,"transloco"),e.qZA()()()()()),2&t&&(e.xp6(2),e.hij(" ",e.lcZ(3,3,"SUBSCRIPTION_CANCELED_TITLE")," "),e.xp6(6),e.Oqu(e.l
1cZ(9,5,"SUBSCRIPTION_CANCELED_MESSAGE")),e.xp6(4),e.Oqu(e.lcZ(13,7,"SUBSCRIPTION_CANCELED_RETURN")))},dependencies:[h.Ot],encapsulation:2}),i})(),ir=(()=>{class i{constructor(t,n,o,s,l){this.apiService=t,this.stpConfig=n,this.stpAuthService=o,this.stpSessionService=s,this.Flash=l,console.log("%cStpQrAutologinService initialized","color: green ;font-size:15px;")}extractAccountIdFromUrl(t){try{return new URL(t.replace("storyplayr://","https://")).searchParams.get("accountId")}catch(n){return console.error("Error parsing QR deep link URL:",n),null}}validateAndLoginWithQrCode(t,n){return new Promise(o=>{t?this.apiService.get(`${this.stpConfig.api}/api/account/qr-autologin/${t}/${n}`).subscribe(l=>{o({success:!0,message:"Login successful"})},l=>{console.error("QR Code validation failed:",l),this.Flash.errorTranslate("QR_CODE_INVALID"),o({success:!1,error:l.error?.message||"QR code validation failed"})}):o({success:!1,error:"Invalid account ID"})})}}return i.\u0275fac=function(t){return new(t||i)(e.LFG(v.s),e.LFG(f.P),e.LFG(P.b),e.LFG(m.i),e.LFG(N.M))},i.\u0275prov=e.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function nr(i,a){1&i&&(e.TgZ(0,"div",5),e._UZ(1,"div",6),e.TgZ(2,"h2"),e._uU(3,"Connecting to your account..."),e.qZA(),e.TgZ(4,"p"),e._uU(5,"Please wait while we validate your QR code"),e.qZA()())}function or(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",7)(1,"div",8),e._uU(2,"\u{1f4f1}"),e.qZA(),e.TgZ(3,"h2"),e._uU(4,"How would you like to login?"),e.qZA(),e.TgZ(5,"p",9),e._uU(6,"You can use the Storyplayr app for a better experience, or continue on this website."),e.qZA(),e.TgZ(7,"div",10)(8,"button",11),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.openInApp())}),e.TgZ(9,"span",12),e._uU(10,"\u{1f4f2}"),e.qZA(),e._uU(11," Open in App "),e.qZA(),e.TgZ(12,"button",13),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.loginOnWeb())}),e.TgZ(13,"span",12),e._uU(14,"\u{1f310}"),e.qZA(),e._uU(15," Continue on Web "),e.qZA()(),e.TgZ(16,"p",14),e._uU(17,"If the app doesn't open, make sure Storyplayr is installed on your device."),e.qZA()()}}function sr(i,a){if(1&i&&(e.TgZ(0,"div",15)(1,"div",16),e._uU(2,"\u26a0\ufe0f"),e.qZA(),e.TgZ(3,"h2"),e._uU(4,"Connection Failed"),e.qZA(),e.TgZ(5,"p"),e._uU(6),e.qZA(),e.TgZ(7,"p",17),e._uU(8,"Redirecting to login page..."),e.qZA()()),2&i){const t=e.oxw();e.xp6(6),e.Oqu(t.loginError)}}let ar=(()=>{class i{constructor(t,n,o,s){this.stateService=t,this.stpQrAutologinService=n,this.stpLangageService=o,this.Flash=s,this.isLoading=!0,this.loginError=null,this.accountId=null,this.showOptions=!1,this.MOBILE=!1}ngOnInit(){this.accountId=this.stateService.params.accountId,this.secret=this.stateService.params.secret,this.accountId?this.showWebOptions():this.handleLoginError("Invalid QR code")}showWebOptions(){this.isLoading=!1,this.showOptions=!0}openInApp(){const t=`storyplayr://autologin?accountId=${this.accountId}&secret=${this.secret}`;console.log("Attempting to open app with deep link:",t),window.location.href=t}loginOnWeb(){this.showOptions=!1,this.isLoading=!0,this.performQrAutologin()}performQrAutologin(){var t=this;return(0,E.Z)(function*(){try{const n=yield t.stpQrAutologinService.validateAndLoginWithQrCode(t.accountId,t.secret);n.success?setTimeout(()=>{t.stateService.go(t.stpLangageService.langPrefix+"rallyeStudent")},1e3):t.handleLoginError(n.error||"Login failed")}catch(n){console.error("QR autologin error:",n),t.handleLoginError("An unexpected error occurred")}})()}handleLoginError(t){this.isLoading=!1,this.showOptions=!1,this.loginError=t,this.Flash.errorTranslate(t),setTimeout(()=>{this.stateService.go(this.stpLangageService.langPrefix+"login")},3e3)}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(u.b2),e.Y36(ir),e.Y36(C.s),e.Y36(N.M))},i.\u0275cmp=e.Xpm({type:i,selectors:[["stp-qr-autologin"]],decls:5,vars:3,consts:[[1,"qr-autologin-container"],[1,"qr-autologin-content"],["class","loading-state",4,"ngIf"],["class","options-state",4,"ngIf"],["class","error-state",4,"ngIf"],[1,"loading-state"],[1,"spinner"],[1,"options-state"],[1,"options-icon"],[1,"options-description"],[1,"options-buttons"],[1,"btn","btn-primary",3,"click"],[1,"btn-icon"],[1,"btn","btn-secondary",3,"click"],[1,"options-note"],[1,"error-state"],[1,"error-icon"],[1,"redirect-message"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1),e.YNc(2,nr,6,0,"div",2),e.YNc(3,or,18,0,"div",3),e.YNc(4,sr,9,1,"div",4),e.qZA()()),2&t&&(e.xp6(2),e.Q6J("ngIf",n.isLoading&&!n.showOptions),e.xp6(1),e.Q6J("ngIf",n.showOptions&&!n.MOBILE),e.xp6(1),e.Q6J("ngIf",n.loginError&&!n.isLoading&&!n.showOptions))},dependencies:[p.O5],styles:[".qr-autologin-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;min-height:100vh;background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif}.qr-autologin-content[_ngcontent-%COMP%]{background:#fff;border-radius:12px;padding:60px 40px;text-align:center;box-shadow:0 10px 40px #0003;max-width:400px;width:90%}.loading-state[_ngcontent-%COMP%] .spinner[_ngcontent-%COMP%]{width:60px;height:60px;margin:0 auto 30px;border:4px solid #f3f3f3;border-top:4px solid #667eea;border-radius:50%;animation:spin 1s linear infinite}.loading-state[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{color:#333;font-size:24px;margin-bottom:12px;font-weight:600}.loading-state[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#666;font-size:14px;margin:0}.options-state[_ngcontent-%COMP%] .options-icon[_ngcontent-%COMP%]{font-size:60px;margin-bottom:20px;
1display:block}.options-state[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{color:#333;font-size:24px;margin-bottom:12px;font-weight:600}.options-state[_ngcontent-%COMP%] .options-description[_ngcontent-%COMP%]{color:#666;font-size:14px;margin-bottom:32px;line-height:1.5}.options-state[_ngcontent-%COMP%] .options-buttons[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px;margin-bottom:20px}.options-state[_ngcontent-%COMP%] .options-buttons[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{padding:12px 24px;border:none;border-radius:8px;font-size:16px;font-weight:600;cursor:pointer;transition:all .3s ease;display:flex;align-items:center;justify-content:center;gap:10px}.options-state[_ngcontent-%COMP%] .options-buttons[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%] .btn-icon[_ngcontent-%COMP%]{font-size:18px}.options-state[_ngcontent-%COMP%] .options-buttons[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]:active{transform:scale(.98)}.options-state[_ngcontent-%COMP%] .options-buttons[_ngcontent-%COMP%] .btn.btn-primary[_ngcontent-%COMP%]{background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);color:#fff;box-shadow:0 4px 15px #667eea66}.options-state[_ngcontent-%COMP%] .options-buttons[_ngcontent-%COMP%] .btn.btn-primary[_ngcontent-%COMP%]:hover{box-shadow:0 6px 20px #667eea99}.options-state[_ngcontent-%COMP%] .options-buttons[_ngcontent-%COMP%] .btn.btn-secondary[_ngcontent-%COMP%]{background:#f0f0f0;color:#333;border:2px solid #ddd}.options-state[_ngcontent-%COMP%] .options-buttons[_ngcontent-%COMP%] .btn.btn-secondary[_ngcontent-%COMP%]:hover{background:#e8e8e8;border-color:#bbb}.options-state[_ngcontent-%COMP%] .options-note[_ngcontent-%COMP%]{color:#999;font-size:12px;margin:0;font-style:italic}.error-state[_ngcontent-%COMP%] .error-icon[_ngcontent-%COMP%]{font-size:60px;margin-bottom:20px;display:block}.error-state[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{color:#d32f2f;font-size:24px;margin-bottom:12px;font-weight:600}.error-state[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#666;font-size:14px;margin:8px 0}.error-state[_ngcontent-%COMP%] p.redirect-message[_ngcontent-%COMP%]{color:#999;font-size:12px;margin-top:16px;font-style:italic}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@media (max-width: 480px){.qr-autologin-content[_ngcontent-%COMP%]{padding:40px 24px}.loading-state[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .options-state[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .error-state[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:20px}.options-state[_ngcontent-%COMP%] .options-buttons[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{padding:12px 16px;font-size:14px}.options-state[_ngcontent-%COMP%] .options-buttons[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%] .btn-icon[_ngcontent-%COMP%]{font-size:16px}}"]}),i})();var rr=d(90456),lr=d.n(rr);function cr(i,a){1&i&&(e.TgZ(0,"span"),e._uU(1,"s"),e.qZA())}function pr(i,a){if(1&i&&(e.TgZ(0,"div",6)(1,"p",7),e._uU(2),e.ALo(3,"transloco"),e.ALo(4,"transloco"),e.YNc(5,cr,2,0,"span",8),e.qZA()()),2&i){const t=e.oxw();e.xp6(2),e.lnq("",e.lcZ(3,4,"SURVEY-SUCCESS-MESSAGE")," ",t.redirectCountdown," ",e.lcZ(4,6,"SURVEY-SUCCESS-SECONDS"),""),e.xp6(3),e.Q6J("ngIf",1!==t.redirectCountdown)}}function dr(i,a){if(1&i&&(e.TgZ(0,"div",9)(1,"h1",10),e._uU(2),e.ALo(3,"transloco"),e.qZA()()),2&i){const t=e.oxw();e.xp6(2),e.Oqu(e.lcZ(3,1,"subscribe"===t.fromParam?"SURVEY-TITLE-FROM-SUBSCRIPTION":"SURVEY-TITLE"))}}function ur(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"input",51),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw(2);return e.KtG(s.relationshipOther=o)}),e.ALo(1,"transloco"),e.qZA()}if(2&i){const t=e.oxw(2);e.Q6J("ngModel",t.relationshipOther)("placeholder",e.lcZ(1,2,"RELATIONSHIP-SPECIFY"))}}function gr(i,a){if(1&i&&(e.TgZ(0,"option",52),e._uU(1),e.qZA()),2&i){const t=a.$implicit;e.Q6J("value",t.code),e.xp6(1),e.Oqu(t.name)}}function _r(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"input",53),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw(2);return e.KtG(s.nativeLanguageOther=o)}),e.ALo(1,"transloco"),e.qZA()}if(2&i){const t=e.oxw(2);e.Q6J("ngModel",t.nativeLanguageOther)("placeholder",e.lcZ(1,2,"LANGUAGE-SPECIFY"))}}function mr(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"input",54),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw(2);return e.KtG(s.subscriptionReasonOther=o)}),e.ALo(1,"transloco"),e.qZA()}if(2&i){const t=e.oxw(2);e.Q6J("ngModel",t.subscriptionReasonOther)("placeholder",e.lcZ(1,2,"REASON-SPECIFY"))}}function hr(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"input",55),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw(2);return e.KtG(s.discoveryMethodOther=o)}),e.ALo(1,"transloco"),e.qZA()}if(2&i){const t=e.oxw(2);e.Q6J("ngModel",t.discoveryMethodOther)("placeholder",e.lcZ(1,2,"DISCOVERY-SPECIFY"))}}function fr(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"form",11),e.NdJ("ngSubmit",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.submitSurvey())}),e.TgZ(1,"fieldset",12)(2,"h2",13),e._uU(3),e.ALo(4,"transloco"),e.qZA(),e.TgZ(5,"div",14)(6,"div",15)(7,"div",16)(8,"label",17),e._uU(9),e.ALo(10,"transloco"),e.qZA(),e.TgZ(11,"input",18),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.children[0].firstName=o)})("change",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.onChildFirstNameChange(0,o.target.value))}),e.ALo(12,"transloco"),e.qZA()(),e.TgZ(13,"div",16)(14,"label",19),e._uU(15),e.ALo(16,"transloco"),e.qZA(),e.TgZ(17,"input",20),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.children[0].dateOfBirth=o)})("change",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.onChildDateOfBirthChange(0,o.target.value))}),e.qZA()()()(),e.TgZ(18,"div",14)(19,"div",15)(20,"div",16)(21,"input",21),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.children[1].firstName=o)})("change",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.onChildFirstNameChange(1,o.target.value))}),e.ALo(22,"transloco"),e.qZA()(),e.TgZ(23,"div",16)(24,"input",22),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.children[1].dateOfBirth=o)})("change",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.onChildDateOfBirthChange(1,o.target.value))}),e.qZA()()()(),e.TgZ(25,"div",14)(26,"div",15)(27,"div",16)(28,"input",23),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.children[2].firstName=o)})("change",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.onChildFirstNameChange(2,o.target.value))}),e.ALo(29,"transloco"),e.qZA()(),e.TgZ(30,"div",16)(31,"input",24),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.children[2].dateOfBirth=o)})("change",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.onChildDateOfBirthChange(2,o.target.value))}),e.qZA()()()()(),e.TgZ(32,"fieldset",12)(33,"h2",13),e._uU(34),e.ALo(35,"transloco"),e.qZA(),e.TgZ(36,"div",16)(37,"div",25)(38,"label",26)(39,"input",27),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.relationship=o)}
1),e.qZA(),e._uU(40),e.ALo(41,"transloco"),e.qZA(),e.TgZ(42,"label",26)(43,"input",28),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.relationship=o)}),e.qZA(),e._uU(44),e.ALo(45,"transloco"),e.qZA(),e.TgZ(46,"label",26)(47,"input",29),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.relationship=o)}),e.qZA(),e._uU(48),e.ALo(49,"transloco"),e.qZA(),e.YNc(50,ur,2,4,"input",30),e.qZA()()(),e.TgZ(51,"fieldset",12)(52,"h2",13),e._uU(53),e.ALo(54,"transloco"),e.qZA(),e.TgZ(55,"div",16)(56,"select",31),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.nativeLanguage=o)}),e.TgZ(57,"option",32),e._uU(58),e.ALo(59,"transloco"),e.qZA(),e.YNc(60,gr,2,2,"option",33),e.TgZ(61,"option",34),e._uU(62),e.ALo(63,"transloco"),e.qZA()(),e.YNc(64,_r,2,4,"input",35),e.qZA()(),e.TgZ(65,"fieldset",12)(66,"h2",13),e._uU(67),e.ALo(68,"transloco"),e.qZA(),e.TgZ(69,"div",16)(70,"div",36)(71,"label",37)(72,"input",38),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.subscriptionReasons.pleasure=o)}),e.qZA(),e._uU(73),e.ALo(74,"transloco"),e.qZA(),e.TgZ(75,"label",37)(76,"input",39),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.subscriptionReasons.accessibility=o)}),e.qZA(),e._uU(77),e.ALo(78,"transloco"),e.qZA(),e.TgZ(79,"label",37)(80,"input",40),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.subscriptionReasons.learning=o)}),e.qZA(),e._uU(81),e.ALo(82,"transloco"),e.qZA(),e.TgZ(83,"label",37)(84,"input",41),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.subscriptionReasons.french=o)}),e.qZA(),e._uU(85),e.ALo(86,"transloco"),e.qZA(),e.TgZ(87,"label",37)(88,"input",42),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.subscriptionReasons.other=o)}),e.qZA(),e._uU(89),e.ALo(90,"transloco"),e.qZA(),e.YNc(91,mr,2,4,"input",43),e.qZA()()(),e.TgZ(92,"fieldset",12)(93,"h2",13),e._uU(94),e.ALo(95,"transloco"),e.qZA(),e.TgZ(96,"div",16)(97,"div",25)(98,"label",26)(99,"input",44),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.discoveryMethod=o)}),e.qZA(),e._uU(100),e.ALo(101,"transloco"),e.qZA(),e.TgZ(102,"label",26)(103,"input",45),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.discoveryMethod=o)}),e.qZA(),e._uU(104),e.ALo(105,"transloco"),e.qZA(),e.TgZ(106,"label",26)(107,"input",46),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.discoveryMethod=o)}),e.qZA(),e._uU(108),e.ALo(109,"transloco"),e.qZA(),e.TgZ(110,"label",26)(111,"input",47),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.discoveryMethod=o)}),e.qZA(),e._uU(112),e.ALo(113,"transloco"),e.qZA(),e.TgZ(114,"label",26)(115,"input",48),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.discoveryMethod=o)}),e.qZA(),e._uU(116),e.ALo(117,"transloco"),e.qZA(),e.TgZ(118,"label",26)(119,"input",49),e.NdJ("ngModelChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.discoveryMethod=o)}),e.qZA(),e._uU(120),e.ALo(121,"transloco"),e.qZA(),e.YNc(122,hr,2,4,"input",50),e.qZA()()()()}if(2&i){const t=e.oxw();e.xp6(3),e.Oqu(e.lcZ(4,52,"QUESTION-1-TITLE")),e.xp6(6),e.hij(" ",e.lcZ(10,54,"FIELD-FIRSTNAME")," "),e.xp6(2),e.Q6J("ngModel",t.children[0].firstName)("placeholder",e.lcZ(12,56,"FIELD-FIRSTNAME")),e.xp6(4),e.hij(" ",e.lcZ(16,58,"FIELD-DATEOFBIRTH")," "),e.xp6(2),e.Q6J("ngModel",t.children[0].dateOfBirth),e.xp6(4),e.Q6J("ngModel",t.children[1].firstName)("placeholder",e.lcZ(22,60,"FIELD-FIRSTNAME")),e.xp6(3),e.Q6J("ngModel",t.children[1].dateOfBirth),e.xp6(4),e.Q6J("ngModel",t.children[2].firstName)("placeholder",e.lcZ(29,62,"FIELD-FIRSTNAME")),e.xp6(3),e.Q6J("ngModel",t.children[2].dateOfBirth),e.xp6(3),e.Oqu(e.lcZ(35,64,"QUESTION-2-TITLE")),e.xp6(5),e.Q6J("ngModel",t.relationship),e.xp6(1),e.hij(" ",e.lcZ(41,66,"RELATIONSHIP-PARENT")," "),e.xp6(3),e.Q6J("ngModel",t.relationship),e.xp6(1),e.hij(" ",e.lcZ(45,68,"RELATIONSHIP-GRANDPARENT")," "),e.xp6(3),e.Q6J("ngModel",t.relationship
1),e.xp6(1),e.hij(" ",e.lcZ(49,70,"RELATIONSHIP-OTHER")," "),e.xp6(2),e.Q6J("ngIf","other"===t.relationship),e.xp6(3),e.Oqu(e.lcZ(54,72,"QUESTION-3-TITLE")),e.xp6(3),e.Q6J("ngModel",t.nativeLanguage),e.xp6(2),e.Oqu(e.lcZ(59,74,"LANGUAGE-SELECT-PLACEHOLDER")),e.xp6(2),e.Q6J("ngForOf",t.languages),e.xp6(2),e.Oqu(e.lcZ(63,76,"LANGUAGE-OTHER")),e.xp6(2),e.Q6J("ngIf","other"===t.nativeLanguage),e.xp6(3),e.Oqu(e.lcZ(68,78,"QUESTION-4-TITLE")),e.xp6(5),e.Q6J("ngModel",t.subscriptionReasons.pleasure),e.xp6(1),e.hij(" ",e.lcZ(74,80,"REASON-PLEASURE")," "),e.xp6(3),e.Q6J("ngModel",t.subscriptionReasons.accessibility),e.xp6(1),e.hij(" ",e.lcZ(78,82,"REASON-ACCESSIBILITY")," "),e.xp6(3),e.Q6J("ngModel",t.subscriptionReasons.learning),e.xp6(1),e.hij(" ",e.lcZ(82,84,"REASON-LEARNING")," "),e.xp6(3),e.Q6J("ngModel",t.subscriptionReasons.french),e.xp6(1),e.hij(" ",e.lcZ(86,86,"REASON-FRENCH")," "),e.xp6(3),e.Q6J("ngModel",t.subscriptionReasons.other),e.xp6(1),e.hij(" ",e.lcZ(90,88,"REASON-OTHER")," "),e.xp6(2),e.Q6J("ngIf",t.subscriptionReasons.other),e.xp6(3),e.Oqu(e.lcZ(95,90,"QUESTION-5-TITLE")),e.xp6(5),e.Q6J("ngModel",t.discoveryMethod),e.xp6(1),e.hij(" ",e.lcZ(101,92,"DISCOVERY-SEARCH")," "),e.xp6(3),e.Q6J("ngModel",t.discoveryMethod),e.xp6(1),e.hij(" ",e.lcZ(105,94,"DISCOVERY-SOCIAL")," "),e.xp6(3),e.Q6J("ngModel",t.discoveryMethod),e.xp6(1),e.hij(" ",e.lcZ(109,96,"DISCOVERY-WORDOFMOUTH")," "),e.xp6(3),e.Q6J("ngModel",t.discoveryMethod),e.xp6(1),e.hij(" ",e.lcZ(113,98,"DISCOVERY-SCHOOL")," "),e.xp6(3),e.Q6J("ngModel",t.discoveryMethod),e.xp6(1),e.hij(" ",e.lcZ(117,100,"DISCOVERY-LIBRARY")," "),e.xp6(3),e.Q6J("ngModel",t.discoveryMethod),e.xp6(1),e.hij(" ",e.lcZ(121,102,"DISCOVERY-OTHER")," "),e.xp6(2),e.Q6J("ngIf","other"===t.discoveryMethod)}}const vr=function(){return{userTypeToWelcome:"welcomeFamily"}},Sr=function(i,a){return{thematic:i,age:a}};function Ar(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",56)(1,"button",57),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.submitSurvey())}),e._uU(2),e.ALo(3,"transloco"),e.ALo(4,"transloco"),e.qZA(),e.TgZ(5,"a",58),e._uU(6),e.ALo(7,"transloco"),e.qZA()()}if(2&i){const t=e.oxw();e.xp6(1),e.Q6J("disabled",!t.isFormValid()||t.isLoading),e.xp6(1),e.hij(" ",t.isLoading?e.lcZ(3,5,"BUTTON-SUBMIT-LOADING"):e.lcZ(4,7,"BUTTON-SUBMIT")," "),e.xp6(3),e.Q6J("uiSref","subscribe"===t.fromParam?t.stpLangageService.langPrefix+"welcomeSubscriber":t.fromParam)("uiParams","subscribe"===t.fromParam?e.DdM(11,vr):e.WLB(12,Sr,t.fromParamThematic,t.fromParamAge)),e.xp6(1),e.hij(" ",e.lcZ(7,9,"BUTTON-SKIP")," ")}}let ie=[{name:"educationPrices",url:"/education/prices",parent:"layout",views:{"stp-top-bar@layout":{component:S.f},"stp-message-bar@layout":{component:x.e},"stp-main-container@layout":{component:Te},"stp-footer-bar@layout":{component:b.G},"stp-flash-messages@layout":{component:T.A}}},{name:"signup",url:"/signup",parent:"layout",views:{"stp-top-bar@layout":{component:S.f},"stp-message-bar@layout":{component:x.e},"stp-main-container@layout":{component:Me},"stp-footer-bar@layout":{component:b.G},"stp-flash-messages@layout":{component:T.A}},resolve:[{token:"refreshSession",deps:[m.i],resolveFn:Z.dx},{token:"getPublicPlans",deps:[q.z],resolveFn:Z.h1},{token:"garRedirect",deps:[m.i],resolveFn:Z.nB}],params:{plan:null}},{name:"payment",url:"/payment",parent:"layout",views:{"stp-top-bar@layout":{component:S.f},"stp-message-bar@layout":{component:x.e},"stp-main-container@layout":{component:Ge},"stp-footer-bar@layout":{component:b.G},"stp-flash-messages@layout":{component:T.A}},params:{plan:{dynamic:!0},quantity:{dynamic:!0}},resolve:[{token:"refreshSession",deps:[m.i],resolveFn:Z.dx},{token:"getPublicPlans",deps:[q.z],resolveFn:Z.h1},{token:"classromPlans",deps:[q.z],resolveFn:Z.tI}]},{name:"login",url:"/login",parent:"layout",views:{"stp-top-bar@layout":{component:S.f},"stp-message-bar@layout":{component:x.e},"stp-main-container@layout":{component:at},"stp-footer-bar@layout":{component:b.G},"stp-flash-messages@layout":{component:T.A}},resolve:[{token:"garRedirect",deps:[m.i],resolveFn:Z.nB}]},{name:"qrAutologin",url:"/qr-autologin/:accountId/:secret",parent:"layout",views:{"stp-top-bar@layout":{component:S.f},"stp-message-bar@layout":{component:x.e},"stp-main-container@layout":{component:ar},"stp-footer-bar@layout":{component:b.G},"stp-flash-messages@layout":{component:T.A}}
1,data:{skipAuth:!0,displayMessageBar:!1}},{name:"loginMediatheque",url:"/login-mediatheque/:portalProvider?mediathequeid&target&token&userid",parent:"layout",views:{"stp-top-bar@layout":{component:S.f},"stp-message-bar@layout":{component:x.e},"stp-main-container@layout":{component:er},"stp-footer-bar@layout":{component:b.G},"stp-flash-messages@layout":{component:T.A}},resolve:[{token:"garRedirect",deps:[m.i],resolveFn:Z.nB}]},{name:"loginStudent",url:"/login-student",parent:"layout",views:{"stp-top-bar@layout":{component:S.f},"stp-message-bar@layout":{component:x.e},"stp-main-container@layout":{component:pt},"stp-footer-bar@layout":{component:b.G},"stp-flash-messages@layout":{component:T.A}},resolve:[{token:"garRedirect",deps:[m.i],resolveFn:Z.nB}]},{name:"new-password",url:"/new-password/:id/:token",parent:"layout",views:{"stp-top-bar@layout":{component:S.f},"stp-message-bar@layout":{component:x.e},"stp-main-container@layout":{component:dt},"stp-footer-bar@layout":{component:b.G},"stp-flash-messages@layout":{component:T.A}}},{name:"educationSignuppremium",url:"/education/signuppremium",parent:"layout",views:{"stp-top-bar@layout":{component:S.f},"stp-message-bar@layout":{component:x.e},"stp-main-container@layout":{component:xt},"stp-footer-bar@layout":{component:b.G},"stp-flash-messages@layout":{component:T.A}},params:{next:{dynamic:!0},quantity:{dynamic:!0}},resolve:[{token:"getPublicPlans",deps:[q.z],resolveFn:Z.h1},{token:"garRedirect",deps:[m.i],resolveFn:Z.nB}]},{name:"educationSignupclassroom",url:"/education/signupclassroom?masterid?backToMaster",parent:"layout",views:{"stp-top-bar@layout":{component:S.f},"stp-message-bar@layout":{component:x.e},"stp-main-container@layout":{component:Pt},"stp-footer-bar@layout":{component:b.G},"stp-flash-messages@layout":{component:T.A}},params:{masterid:{dynamic:!0},backToMaster:{dynamic:!0}},resolve:[{token:"garRedirect",deps:[m.i],resolveFn:Z.nB}]},{name:"offreParentsAefe",url:"/offre-parents-aefe",parent:"layout",views:{"stp-top-bar@layout":{component:S.f},"stp-message-bar@layout":{component:x.e},"stp-main-container@layout":{component:qt.N},"stp-footer-bar@layout":{component:b.G},"stp-flash-messages@layout":{component:T.A}}},{name:"mediathequeSignup",url:"/mediatheque/signup",parent:"layout",views:{"stp-top-bar@layout":{component:S.f},"stp-message-bar@layout":{component:x.e},"stp-main-container@layout":{component:kt},"stp-footer-bar@layout":{component:b.G},"stp-flash-messages@layout":{component:T.A}},resolve:[{token:"garRedirect",deps:[m.i],resolveFn:Z.nB}]},{name:"mediathequeBiblioSignup",url:"/mediatheque/biblio-signup",parent:"layout",views:{"stp-top-bar@layout":{component:S.f},"stp-message-bar@layout":{component:x.e},"stp-main-container@layout":{component:Bt},"stp-footer-bar@layout":{component:b.G},"stp-flash-messages@layout":{component:T.A}},resolve:[{token:"garRedirect",deps:[m.i],resolveFn:Z.nB}]},{name:"mediathequeMemberSignup",url:"/mediatheque/member-signup?mediathequeid",parent:"layout",views:{"stp-top-bar@layout":{component:S.f},"stp-message-bar@layout":{component:x.e},"stp-main-container@layout":{component:ci},"stp-footer-bar@layout":{component:b.G},"stp-flash-messages@layout":{component:T.A}},params:{partenaire:null,mediathequeid:{type:"string",value:""}},resolve:[{token:"garRedirect",deps:[m.i],resolveFn:Z.nB}]},{name:"suspended",url:"/suspended",parent:"layout",views:{"stp-top-bar@layout":{component:S.f},"stp-message-bar@layout":{component:x.e},"stp-footer-bar@layout":{component:b.G},"stp-flash-messages@layout":{component:T.A}}},{name:"compte",url:"/compte",parent:"layout",views:{"stp-top-bar@layout":{component:S.f},"stp-message-bar@layout":{component:x.e},"stp-main-container@layout":{component:bo},"stp-footer-bar@layout":{component:b.G},"stp-flash-messages@layout":{component:T.A}},resolve:[{token:"refreshSession",deps:[m.i],resolveFn:Z.dx}],data:{needLogin:!0,nextPageName:"compte",displayMessageBar:!1}},{name:"histo",url:"/histo",parent:"layout",views:{"stp-top-bar@layout":{component:S.f},"stp-message-bar@layout":{component:x.e},"stp-main-container@layout":{component:Eo},"stp-flash-messages@layout":{component:T.A}},resolve:[{token:"getSubscriptions",deps:[q.z,K.j,u.uT],resolveFn:Z.tJ},{token:"refreshSession",deps:[m.i],resolveFn:Z.dx}],data:{needLogin:!0}},{name:"invoice",url:"/invoice/:id",parent:"layout",views:{"stp-top-bar@layout":{component:S.f},"stp-message-bar@layout":{component:x.e},"stp-main-container@layout":{component:Xo},"stp-footer-bar@layout":{component:b.G},"stp-flash-messages@layout":{component:T.A}},resolve:[{token:"getSubscriptions",deps:[q.z,K.j,u.uT],resolveFn:Z.tJ},{token:"refreshSession",deps:[m.i],resolveFn:Z.dx}]},{name:"giftcard",url:"/giftcard",parent:"layout",views:{"stp-top-bar@layout":{component:S.f},"stp-message-bar@layout":{component:x.e},"stp-main-container@layout":{component:hs},"stp-footer-bar@layout":{component:b.G},"stp-flash-messages@layout":{component:T.A}},resolve:[{token:"refreshSession",deps:[m.i],resolveFn:Z.dx}]},{name:"giftcardCode",url:"/giftcard/:code",parent:"layout",views:{"stp-top-bar@layout":{component:S.f},"stp-message-bar@layout":{component:x.e},"stp-main-container@layout":{component:vs},"stp-footer-bar@layout":{component:b.G},"stp-flash-messages@layout":{component:T.A}},resolve:[{token:"refreshSession",deps:[m.i],resolveFn:Z.dx}]},{name:"giftCode",url:"/gift/:code",parent:"layout",views:{"stp-top-bar@layout":{component:S.f},"stp-message-bar@layout":{component:x.e},"stp-main-container@layout":{component:Zs},"stp-footer-bar@layout":{component:b.G},"stp-flash-messages@layout":{component:T.A}},resolve:[{token:"refreshSession",deps:[m.i],resolveFn:Z.dx}]},{name:"cadeau",url:"/cadeau",parent:"layout",views:{"stp-top-bar@layout":{component:S.f},"stp-message-bar@layout":{component:x.e},"stp-main-container@layout":{component:bs},"stp-footer-bar@layout":{component:b.G},"stp-flash-messages@layout":{component:T.A}},params:{nextPageName:"cadeau"},resolve:[{token:"refreshSession",deps:[m.i],resolveFn:Z.dx}]},{name:"signupPartenaire",url:"/signup-partenaire",parent:"layout",views:{"stp-top-bar@layout":{component:S.f},"stp-message-bar@layout":{component:x.e},"stp-main-container@layout":{component:Es},"stp-footer-bar@layout":{component:b.G},"stp-flash-messages@layout":{component:T.A}},params:{nextPageName:"partenairesignup"},resolve:[{token:"refreshSession",deps:[m.i],resolveFn:Z.dx}]},{name:"subscribe",url:"/subscribe",parent:"layout",views:{"stp-top-bar@layout":{component:S.f},"stp-message-bar@layout":{component:x.e},"stp-main-container@layout":{component:ea},"stp-footer-bar@layout":{component:b.G},"stp-flash-messages@layout":{component:T.A}},resolve:[{token:"refreshSession",deps:[m.i],resolveFn:Z.dx},{token:"getPublicPlans",deps:[q.z],resolveFn:Z.h1},{token:"garRedirect",deps:[m.i],resolveFn:Z.nB}]},{name:"welcomeSubscriber",url:"/welcome-subscriber/:userTypeToWelcome",parent:"layout",views:{"stp-top-bar@layout":{component:S.f},"stp-message-bar@layout":{component:x.e},"stp-main-container@layout":{component:ra},"stp-footer-bar@layout":{component:b.G},"stp-flash-messages@layout":{component:T.A}},params:{displayMessageBar:!1}},{name:"unsubscribe",url:"/unsubscribe",parent:"layout",views:{"stp-top-bar@layout":{component:S.f},"stp-message-bar@layout":{component:x.e},"stp-main-container@layout":{component:tr},"stp-footer-bar@layout":{component:b.G},"stp-flash-messages@layout":{component:T.A}}},{name:"garEducation",url:"/gar-education",parent:"layout",views:{"stp-main-container@layout":{component:ua}},resolve:[{token:"refreshSession",deps:[m.i],resolveFn:Z.dx}]},{name:"garStudentChooseGroup",url:"/gar-choose-group",parent:"layout",views:{"stp-main-container@layout":{component:Aa}},resolve:[{token:"refreshSession",deps:[m.i],resolveFn:Z.dx}]},{name:"garNotSetup",url:"/gar-not-setup",parent:"layout",views:{"stp-main-container@layout":{component:Za}}},{name:"garLogout",url:"/gar-logout",parent:"layout",views:{"stp-main-container@layout":{component:xa}}},{name:"biblioAdherCreated",url:"/biblio/accounts-created",parent:"layout",views:{"stp-top-bar@layout":{component:S.f},"stp-message-bar@layout":{component:x.e},"stp-main-container@layout":{component:La},"stp-footer-bar@layout":{component:b.G},"stp-flash-messages@layout":{component:T.A}},resolve:[{token:"refreshSession",deps:[m.i],resolveFn:Z.dx}],data:{needLogin:!0,displayMessageBar:!1}},{name:"biblioOpenedByMonth",url:"/biblio/books-opened-by-month",parent:"layout",views:{"stp-top-bar@layout":{component:S.f},"stp-message-bar@layout":{component:x.e},"stp-main-container@layout":{component:Ja},"stp-footer-bar@layout":{component:b.G},"stp-flash-messages@layout":{component:T.A}},resolve:[{token:"refreshSession",deps:[m.i],resolveFn:Z.dx}],data:{needLogin:!0,displayMessageBar:!1}},{name:"publisherReporting",url:"/publisher/reporting",parent:"layout",views:{"stp-top-bar@layout":{component:S.f},"stp-message-bar@layout":{component:x.e},"stp-main-container@layout":{component:Ha},"stp-footer-bar@layout":{component:b.G},"stp-flash-messages@layout":{component:T.A}},resolve:[{token:"refreshSession",deps:[m.i],resolveFn:Z.dx}],data:{needLogin:!0,displayMessageBar:!1}},{name:"publisherPrices",url:"/publisher/prices",parent:"layout",views:{"stp-top-bar@layout":{component:S.f},"stp-message-bar@layout":{component:x.e},"stp-main-container@layout":{component:$a},"stp-footer-bar@layout":{component:b.G},"stp-flash-messages@layout":{component:T.A}},resolve:[{token:"refreshSession",deps:[m.i],resolveFn:Z.dx}],data:{needLogin:!0,displayMessageBar:!1}},{name:"enqueteProfil",url:"/enquete-profil?from",parent:"layout",views:{"stp-top-bar@layout":{component:S.f},"stp-message-bar@layout":{component:x.e},"stp-main-container@layout":{component:(()=>{class i{constructor(t,n,o,s,l,c,g){this.stpSession=t,this.translocoService=n,this.apiService=o,this.stpConfig=s,this.stpLangageService=l,this.stateService=c,this.eventService=g,this.children=[{firstName:"",dateOfBirth:""},{firstName:"",dateOfBirth:""},{firstName:"",dateOfBirth:""}],this.relationship="",this.relationshipOther="",this.nativeLanguage="",this.nativeLanguageOther="",this.subscriptionReasons={pleasure:!1,accessibility:!1,learning:!1,french:!1,other:!1},this.subscriptionReasonOther="",this.discoveryMethod="",this.discoveryMethodOther="",this.isLoading=!1,this.showSuccessMessage=!1,this.redirectCountdown=0,this.fromParam=null,this.fromParamThematic=null,this.fromParamAge=null}ngOnInit(){this.extractFromParameter(),this.updateLastSurveyAskedDate(),this.initializeLanguages()}extractFromParameter(){const t=this.stateService.params.from;if("subscribe"===t)this.fromParam="subscribe";else if(t){let n=t.split("_");this.fromParam=n[0],this.fromParamThematic=n[1]?n[1]:null,this.fromParamAge=n[2]?n[2]:null}else this.fromParam="bibliotheque"}updateLastSurveyAskedDate(){this.apiService.put(this.stpConfig.api+"/api/account/update-survey-asked-date",{}).subscribe(()=>{console.log("Survey date updated"),this.stpSession.fetchFromServerAndRefreshSession()},t=>{console.error("Error updating survey date:",t)})}initializeLanguages(){const t=this.stpLangageService.getCurrentLanguage(),n=new Intl.DisplayNames([t],{type:"language"}),o=["fr","en","es"],s=o.map(c=>({code:c,name:n.of(c)})),l=lr().getAllCodes().filter(c=>!o.includes(c)&&n.of(c).length>2).map(c=>({code:c,name:n.of(c)}));this.languages=[...s,...l]}isChildValid(t){return""!==t.firstName.trim()&&""!==t.dateOfBirth}getValidChildren(){return this.children.filter(t=>this.isChildValid(t))}isFormValid(){return!(0===this.getValidChildren().length||!this.relationship.trim()||"other"===this.relationship&&!this.relationshipOther.trim()||!this.nativeLanguage.trim()||"other"===this.nativeLanguage&&!this.nativeLanguageOther.trim()||!Object.values(this.subscriptionReasons).some(t=>!0===t)||this.subscriptionReasons.other&&!this.subscriptionReasonOther.trim()||!this.discoveryMethod.trim()||"other"===this.discoveryMethod&&!this.discoveryMethodOther.trim())}submitSurvey(){if(!this.isFormValid())return;this.isLoading=!0;const t={children:this.getValidChildren(),relationship:this.relationship,relationshipOther:this.relationshipOther,nativeLanguage:this.nativeLanguage,nativeLanguageOther:this.nativeLanguageOther,subscriptionReasons:this.subscriptionReasons,subscriptionReasonOther:this.subscriptionReasonOther,discoveryMethod:this.discoveryMethod,discoveryMethodOther:this.discoveryMethodOther};this.eventService.createEvent({type:this.eventService.types.ANSWER_SURVEY}),this.apiService.post(this.stpConfig.api+"/api/account/submit-survey",t).subscribe(()=>{this.resetForm(),this.isLoading=!1,this.showSuccessMessage=!0,this.startCountdown()},n=>{console.error("Error submitting survey:",n),this.isLoading=!1})}resetForm(){this.children=[{firstName:"",dateOfBirth:""},{firstName:"",dateOfBirth:""},{firstName:"",dateOfBirth:""}]}onChildFirstNameChange(t,n){this.children[t].firstName=n}onChildDateOfBirthChange(t,n){this.children[t].dateOfBirth=n}startCountdown(){this.redirectCountdown=3,window.scrollTo(0,0),this.countdownTimer=setInterval(()=>{this.redirectCountdown--,this.redirectCountdown<=0&&(clearInterval(this.countdownTimer),"subscribe"===this.fromParam?this.stateService.go(this.stpLangageService.langPrefix+"welcomeSubscriber",{userTypeToWelcome:"welcomeFamily"}):this.stateService.go(this.stpLangageService.langPrefix+"bibliotheque"))},1e3)}ngOnDestroy(){this.countdownTimer&&clearInterval(this.countdownTimer)}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(m.i),e.Y36(h.Vn),e.Y36(v.s),e.Y36(f.P),e.Y36(C.s),e.Y36(u.b2),e.Y36(Y.m))},i.\u0275cmp=e.Xpm({type:i,selectors:[["enquete-profil"]],decls:9,vars:7,consts:[[1,"stp-customer-survey-page"],[1,"stp-customer-survey-container"],["class","stp-success-message",4,"ngIf"],["class","stp-survey-header",4,"ngIf"],["class","stp-survey-form",3,"ngSubmit",4,"ngIf"],["class","stp-survey-navigation",4,"ngIf"],[1,"stp-success-message"],[1,"stp-success-text"],[4,"ngIf"],[1,"stp-survey-header"],[1,"stp-survey-title"],[1,"stp-survey-form",3,"ngSubmit"],[1,"stp-form-section"],[1,"stp-form-section-title"],[1,"stp-child-section"],[1,"stp-form-row"],[1,"stp-form-group"],["for","child1-firstName",1,"stp-form-label"],["id","child1-firstName","type","text","name","child1-firstName",1,"stp-form-input",3,"ngModel","placeholder","ngModelChange","change"],["for","child1-dob",1,"stp-form-label"],["id","child1-dob","type","date","name","child1-dob",1,"stp-form-input",3,"ngModel","ngModelChange","change"],["id","child2-firstName","type","text","name","child2-firstName",1,"stp-form-input",3,"ngModel","placeholder","ngModelChange","change"],["id","child2-dob","type","date","name","child2-dob",1,"stp-form-input",3,"ngModel","ngModelChange","change"],["id","child3-firstName","type","text","name","child3-firstName",1,"stp-form-input",3,"ngModel","placeholder","ngModelChange","change"],["id","child3-dob","type","date","name","child3-dob",1,"stp-form-input",3,"ngModel","ngModelChange","change"],[1,"stp-radio-group"],[1,"stp-radio-label"],["type","radio","name","relationship","value","parent","name","relationship",3,"ngModel","ngModelChange"],["type","radio","name","relationship","value","grandparent","name","relationship",3,"ngModel","ngModelChange"],["type","radio","name","relationship","value","other","name","relationship",3,"ngModel","ngModelChange"],["type","text","class","stp-form-input","name","relationshipOther",3,"ngModel","placeholder","ngModelChange",4,"ngIf"],["name","nativeLanguage",1,"stp-form-input",3,"ngModel","ngModelChange"],["value",""],[3,"value",4,"ngFor","ngForOf"],["value","other"],["type","text","class","stp-form-input","name","nativeLanguageOther",3,"ngModel","placeholder","ngModelChange",4,"ngIf"],[1,"stp-checkbox-group"],[1,"stp-checkbox-label"],["type","checkbox","name","pleasure",3,"ngModel","ngModelChange"],["type","checkbox","name","accessibility",3,"ngModel","ngModelChange"],["type","checkbox","name","learning",3,"ngModel","ngModelChange"],["type","checkbox","name","french",3,"ngModel","ngModelChange"],["type","checkbox","name","subscReasonOther",3,"ngModel","ngModelChange"],["type","text","class","stp-form-input","name","subscriptionReasonOther",3,"ngModel","placeholder","ngModelChange",4,"ngIf"],["type","radio","name","discovery","value","search","name","discovery",3,"ngModel","ngModelChange"],["type","radio","name","discovery","value","social","name",
1"discovery",3,"ngModel","ngModelChange"],["type","radio","name","discovery","value","wordofmouth","name","discovery",3,"ngModel","ngModelChange"],["type","radio","name","discovery","value","school","name","discovery",3,"ngModel","ngModelChange"],["type","radio","name","discovery","value","library","name","discovery",3,"ngModel","ngModelChange"],["type","radio","name","discovery","value","other","name","discovery",3,"ngModel","ngModelChange"],["type","text","class","stp-form-input","name","discoveryMethodOther",3,"ngModel","placeholder","ngModelChange",4,"ngIf"],["type","text","name","relationshipOther",1,"stp-form-input",3,"ngModel","placeholder","ngModelChange"],[3,"value"],["type","text","name","nativeLanguageOther",1,"stp-form-input",3,"ngModel","placeholder","ngModelChange"],["type","text","name","subscriptionReasonOther",1,"stp-form-input",3,"ngModel","placeholder","ngModelChange"],["type","text","name","discoveryMethodOther",1,"stp-form-input",3,"ngModel","placeholder","ngModelChange"],[1,"stp-survey-navigation"],[1,"stp-button-medium","stp-button-green",3,"disabled","click"],[1,"stp-button-medium","stp-button-gray",2,"display","flex","align-items","center",3,"uiSref","uiParams"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1),e.YNc(2,pr,6,8,"div",2),e.YNc(3,dr,4,3,"div",3),e.TgZ(4,"p"),e._uU(5),e.ALo(6,"transloco"),e.qZA(),e.YNc(7,fr,123,104,"form",4),e.YNc(8,Ar,8,15,"div",5),e.qZA()()),2&t&&(e.xp6(2),e.Q6J("ngIf",n.showSuccessMessage),e.xp6(1),e.Q6J("ngIf",!n.showSuccessMessage),e.xp6(2),e.Oqu(e.lcZ(6,5,"SURVEY-DESCRIPTION")),e.xp6(2),e.Q6J("ngIf",!n.showSuccessMessage),e.xp6(1),e.Q6J("ngIf",!n.showSuccessMessage))},dependencies:[_.bcJ,_.KeH,p.sg,p.O5,r._Y,r.YN,r.Kr,r.Fj,r.Wl,r.EJ,r._,r.JJ,r.JL,r.On,r.F,h.Ot],styles:['.stp-customer-survey-page[_ngcontent-%COMP%]{width:100%;min-height:100vh;padding:40px 20px;display:flex;flex-direction:column;align-items:center;justify-content:flex-start}.stp-customer-survey-page[_ngcontent-%COMP%] .stp-customer-survey-container[_ngcontent-%COMP%]{width:100%;max-width:700px;background-color:#fff;border-radius:16px;box-shadow:0 20px 60px #0000004d;padding:50px 40px;animation:slideInUp .4s ease-out}@keyframes slideInUp{0%{opacity:0;transform:translateY(30px)}to{opacity:1;transform:translateY(0)}}.stp-customer-survey-page[_ngcontent-%COMP%] .stp-success-message[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;min-height:300px;animation:slideInUp .4s ease-out}.stp-customer-survey-page[_ngcontent-%COMP%] .stp-success-message[_ngcontent-%COMP%] .stp-success-text[_ngcontent-%COMP%]{color:#667eea;font-size:26px;text-align:center;margin:0;font-weight:700;line-height:1.6}.stp-customer-survey-page[_ngcontent-%COMP%] .stp-survey-header[_ngcontent-%COMP%]{margin-bottom:30px;text-align:center}.stp-customer-survey-page[_ngcontent-%COMP%] .stp-survey-header[_ngcontent-%COMP%] .stp-survey-title[_ngcontent-%COMP%]{margin:0;color:#667eea;font-size:32px;font-weight:700;background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);-webkit-background-clip:text;-webkit-text-fill-color:rgba(0,0,0,0);background-clip:text}.stp-customer-survey-page[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#555;font-size:15px;margin-bottom:30px;line-height:1.6;text-align:center}.stp-customer-survey-page[_ngcontent-%COMP%] .stp-form-section[_ngcontent-%COMP%]{margin-bottom:30px}.stp-customer-survey-page[_ngcontent-%COMP%] .stp-form-section[_ngcontent-%COMP%] .stp-form-section-title[_ngcontent-%COMP%]{font-size:16px;font-weight:700;color:#333;margin:0 0 18px;display:flex;align-items:center;gap:10px}.stp-customer-survey-page[_ngcontent-%COMP%] .stp-form-section[_ngcontent-%COMP%] .stp-form-section-title[_ngcontent-%COMP%]:before{content:"";display:inline-block;width:4px;height:20px;background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);border-radius:2px}.stp-customer-survey-page[_ngcontent-%COMP%] .stp-form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:16px}.stp-customer-survey-page[_ngcontent-%COMP%] .stp-form-group[_ngcontent-%COMP%]{display:flex;flex-direction:column}.stp-customer-survey-page[_ngcontent-%COMP%] .stp-form-group[_ngcontent-%COMP%] .stp-form-label[_ngcontent-%COMP%]{margin-bottom:8px;font-size:13px;font-weight:600;color:#333;text-transform:uppercase;letter-spacing:.5px}.stp-customer-survey-page[_ngcontent-%COMP%] .stp-form-group[_ngcontent-%COMP%] .stp-form-input[_ngcontent-%COMP%], .stp-customer-survey-page[_ngcontent-%COMP%] .stp-form-group[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{padding:12px 14px;border:2px solid #e0e0e0;border-radius:8px;font-size:14px;font-family:inherit;box-sizing:border-box;transition:all .3s}.stp-customer-survey-page[_ngcontent-%COMP%] .stp-form-group[_ngcontent-%COMP%] .stp-form-input[_ngcontent-%COMP%]:focus, .stp-customer-survey-page[_ngcontent-%COMP%] .stp-form-group[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:focus{outline:none;border-color:#667eea;background-color:#f8f9ff}.stp-customer-survey-page[_ngcontent-%COMP%] .stp-radio-group[_ngcontent-%COMP%], .stp-customer-survey-page[_ngcontent-%COMP%] .stp-checkbox-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:14px}.stp-customer-survey-page[_ngcontent-%COMP%] .stp-radio-label[_ngcontent-%COMP%], .stp-customer-survey-page[_ngcontent-%COMP%] .stp-checkbox-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;cursor:pointer;font-size:14px;color:#333;padding:8px;border-radius:8px;transition:background-color .2s}.stp-customer-survey-page[_ngcontent-%COMP%] .stp-radio-label[_ngcontent-%COMP%]:hover, .stp-customer-survey-page[_ngcontent-%COMP%] .stp-checkbox-label[_ngcontent-%COMP%]:hover{background-color:#f5f5f5}.stp-customer-survey-page[_ngcontent-%COMP%] .stp-radio-label[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .stp-customer-survey-page[_ngcontent-%COMP%] .stp-checkbox-label[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{cursor:pointer;accent-color:#667eea}.stp-customer-survey-page[_ngcontent-%COMP%] .stp-survey-navigation[_ngcontent-%COMP%]{display:flex;gap:12px;justify-content:center;margin-top:40px}.stp-customer-survey-page[_ngcontent-%COMP%] .stp-survey-navigation[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:14px 32px;border:none;border-radius:8px;font-size:14px;font-weight:700;cursor:pointer;transition:all .3s ease;min-width:160px;text-transform:uppercase;letter-spacing:.5px}.stp-customer-survey-page[_ngcontent-%COMP%] .stp-survey-navigation[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.stp-customer-survey-page[_ngcontent-%COMP%] .stp-survey-navigation[_ngcontent-%COMP%] button.stp-button-green[_ngcontent-%COMP%]{background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);color:#fff}.stp-customer-survey-page[_ngcontent-%COMP%] .stp-survey-navigation[_ngcontent-%COMP%] button.stp-button-green[_ngcontent-%COMP%]:hover:not(:disabled){transform:translateY(-3px);box-shadow:0 8px 20px #667eea66}.stp-customer-survey-page[_ngcontent-%COMP%] .stp-survey-navigation[_ngcontent-%COMP%] button.stp-button-green[_ngcontent-%COMP%]:active:not(:disabled){transform:translateY(-1px)}@media (max-width: 767px){.stp-customer-survey-page.design-2[_ngcontent-%COMP%]{padding:30px 15px}.stp-customer-survey-page.design-2[_ngcontent-%COMP%] .stp-customer-survey-container[_ngcontent-%COMP%]{padding:30px 20px}.stp-customer-survey-page.design-2[_ngcontent-%COMP%] .stp-customer-survey-container[_ngcontent-%COMP%] .stp-survey-header[_ngcontent-%COMP%] .stp-survey-title[_ngcontent-%COMP%]{font-size:26px}.stp-customer-survey-page.design-2[_ngcontent-%COMP%] .stp-customer-survey-container[_ngcontent-%COMP%] .stp-form-row[_ngcontent-%COMP%]{grid-template-columns:1fr}.stp-customer-survey-page.design-2[_ngcontent-%COMP%] .stp-customer-survey-container[_ngcontent-%COMP%] .stp-survey-navigation[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}}']}),i})()},"stp-footer-bar@layout":{component:b.G},"stp-flash-messages@layout":{component:T.A}},params:{from:null},resolve:[{token:"refreshSession",deps:[m.i],resolveFn:Z.dx}]}];ie=(0,la.Vz)(ie);var nl=d(89019),ol=d(44882),sl=d(78799),al=d(14543),rl=d(32977);let ll=(()=>{class i{}return i.\u0275fac=function(t){return new(t||i)},i.\u0275mod=e.oAB({type:i}),i.\u0275inj=e.cJS({providers:[rl.t,sl.h,q.z,oe.u,ue,{provide:h.hG,useValue:(0,h.$Z)({availableLangs:["en","fr"],defaultLang:"fr",fallbackLang:"fr",reRenderOnLang
1Change:!0,prodMode:nl.N.production})},{provide:h.K0,useClass:ol.V}],imports:[_.MTm.forChild({states:ie}),h.y4,I.ED.forRoot(),p.ez,r.u5,r.UX,al.p,O.HT]}),i})()},3873:(F,R,d)=>{"use strict";d.d(R,{G:()=>I});var _=d(94650);let h=(()=>{class p{constructor(){}}return p.\u0275fac=function(e){return new(e||p)},p.\u0275cmp=_.Xpm({type:p,selectors:[["stpSpinnerRoll"]],decls:1,vars:0,consts:[["src","/assets/images/v3/loader.gif",1,"stp-loader-gif"]],template:function(e,U){1&e&&_._UZ(0,"img",0)},encapsulation:2}),p})(),I=(()=>{class p{constructor(){}}return p.\u0275fac=function(e){return new(e||p)},p.\u0275cmp=_.Xpm({type:p,selectors:[["stpCatalogSpinner"]],decls:5,vars:0,consts:[[1,"stpCatalogSpinner"],[1,"stpCatalogSpinner--container"],[1,"stpCatalogSpinner--cell"],["translate","LOADING_PROGESS",1,"stp-curve"]],template:function(e,U){1&e&&(_.TgZ(0,"div",0)(1,"div",1)(2,"div",2),_._UZ(3,"h2",3)(4,"stpSpinnerRoll"),_.qZA()()())},dependencies:[h],encapsulation:2}),p})()},78799:(F,R,d)=>{"use strict";d.d(R,{h:()=>S});var _=d(25032),h=d(94650),I=d(43627),p=d(86344);let S=(()=>{class e{constructor(u,v){this.apiService=u,this.stpConfig=v}create(u,v){this.apiService.post(this.stpConfig.api+"/api/account-publication/"+u,{}).subscribe(f=>{v(null,f)},f=>{v(f,null)})}remove(u,v){this.apiService.delete(this.stpConfig.api+"/api/account-publication/"+u).subscribe(f=>{v(null,f)},f=>{v(f.data,null)})}exists(u,v){this.apiService.get(this.stpConfig.api+"/api/account-publication/"+u).subscribe(f=>{v(null,f)},f=>{v(f,null)})}getAccountPublicationByAccountByStory(u,v){this.apiService.get(this.stpConfig.api+"/api/account-publication/story/"+u).subscribe(f=>{v(null,f)},f=>{v(f,null)})}getAccountPublicationsByAccount(u){return u=u||_.Z,this.apiService.get(this.stpConfig.api+"/api/account-publication").subscribe(v=>{u(null,v)},v=>{u(v,null)})}}return e.\u0275fac=function(u){return new(u||e)(h.LFG(I.s),h.LFG(p.P))},e.\u0275prov=h.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},50737:F=>{F.exports={aa:{name:"Afar",nativeName:"Afaraf"},ab:{name:"Abkhaz",nativeName:"\u0430\u04a7\u0441\u0443\u0430 \u0431\u044b\u0437\u0448\u04d9\u0430"},ae:{name:"Avestan",nativeName:"avesta"},af:{name:"Afrikaans",nativeName:"Afrikaans"},ak:{name:"Akan",nativeName:"Akan"},am:{name:"Amharic",nativeName:"\u12a0\u121b\u122d\u129b"},an:{name:"Aragonese",nativeName:"aragon\xe9s"},ar:{name:"Arabic",nativeName:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629"},as:{name:"Assamese",nativeName:"\u0985\u09b8\u09ae\u09c0\u09af\u09bc\u09be"},av:{name:"Avaric",nativeName:"\u0430\u0432\u0430\u0440 \u043c\u0430\u0446\u04c0"},ay:{name:"Aymara",nativeName:"aymar aru"},az:{name:"Azerbaijani",nativeName:"az\u0259rbaycan dili"},ba:{name:"Bashkir",nativeName:"\u0431\u0430\u0448\u04a1\u043e\u0440\u0442 \u0442\u0435\u043b\u0435"},be:{name:"Belarusian",nativeName:"\u0431\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f \u043c\u043e\u0432\u0430"},bg:{name:"Bulgarian",nativeName:"\u0431\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438 \u0435\u0437\u0438\u043a"},bi:{name:"Bislama",nativeName:"Bislama"},bm:{name:"Bambara",nativeName:"bamanankan"},bn:{name:"Bengali",nativeName:"\u09ac\u09be\u0982\u09b2\u09be"},bo:{name:"Tibetan",nativeName:"\u0f56\u0f7c\u0f51\u0f0b\u0f61\u0f72\u0f42"},br:{name:"Breton",nativeName:"brezhoneg"},bs:{name:"Bosnian",nativeName:"bosanski jezik"},ca:{name:"Catalan",nativeName:"Catal\xe0"},ce:{name:"Chechen",nativeName:"\u043d\u043e\u0445\u0447\u0438\u0439\u043d \u043c\u043e\u0442\u0442"},ch:{name:"Chamorro",nativeName:"Chamoru"},co:{name:"Corsican",nativeName:"corsu"},cr:{name:"Cree",nativeName:"\u14c0\u1426\u1403\u152d\u140d\u140f\u1423"},cs:{name:"Czech",nativeName:"\u010ce\u0161tina"},cu:{name:"Old Church Slavonic",nativeName:"\u0469\u0437\u044b\u043a\u044a \u0441\u043b\u043e\u0432\u0463\u043d\u044c\u0441\u043a\u044a"},cv:{name:"Chuvash",nativeName:"\u0447\u04d1\u0432\u0430\u0448 \u0447\u04d7\u043b\u0445\u0438"},cy:{name:"Welsh",nativeName:"Cymraeg"},da:{name:"Danish",nativeName:"Dansk"},de:{name:"German",nativeName:"Deutsch"},dv:{name:"Divehi",nativeName:"\u078b\u07a8\u0788\u07ac\u0780\u07a8"},dz:{name:"Dzongkha",nativeName:"\u0f62\u0fab\u0f7c\u0f44\u0f0b\u0f41"},ee:{name:"Ewe",nativeName:"E\u028begbe"},el:{name:"Greek",nativeName:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac"},en:{name:"English",nativeName:"English"}
1,eo:{name:"Esperanto",nativeName:"Esperanto"},es:{name:"Spanish",nativeName:"Espa\xf1ol"},et:{name:"Estonian",nativeName:"eesti"},eu:{name:"Basque",nativeName:"euskara"},fa:{name:"Persian",nativeName:"\u0641\u0627\u0631\u0633\u06cc"},ff:{name:"Fula",nativeName:"Fulfulde"},fi:{name:"Finnish",nativeName:"suomi"},fj:{name:"Fijian",nativeName:"vosa Vakaviti"},fo:{name:"Faroese",nativeName:"F\xf8royskt"},fr:{name:"French",nativeName:"Fran\xe7ais"},fy:{name:"Western Frisian",nativeName:"Frysk"},ga:{name:"Irish",nativeName:"Gaeilge"},gd:{name:"Scottish Gaelic",nativeName:"G\xe0idhlig"},gl:{name:"Galician",nativeName:"galego"},gn:{name:"Guaran\xed",nativeName:"Ava\xf1e'\u1ebd"},gu:{name:"Gujarati",nativeName:"\u0a97\u0ac1\u0a9c\u0ab0\u0abe\u0aa4\u0ac0"},gv:{name:"Manx",nativeName:"Gaelg"},ha:{name:"Hausa",nativeName:"\u0647\u064e\u0648\u064f\u0633\u064e"},he:{name:"Hebrew",nativeName:"\u05e2\u05d1\u05e8\u05d9\u05ea"},hi:{name:"Hindi",nativeName:"\u0939\u093f\u0928\u094d\u0926\u0940"},ho:{name:"Hiri Motu",nativeName:"Hiri Motu"},hr:{name:"Croatian",nativeName:"Hrvatski"},ht:{name:"Haitian",nativeName:"Krey\xf2l ayisyen"},hu:{name:"Hungarian",nativeName:"magyar"},hy:{name:"Armenian",nativeName:"\u0540\u0561\u0575\u0565\u0580\u0565\u0576"},hz:{name:"Herero",nativeName:"Otjiherero"},ia:{name:"Interlingua",nativeName:"Interlingua"},id:{name:"Indonesian",nativeName:"Bahasa Indonesia"},ie:{name:"Interlingue",nativeName:"Interlingue"},ig:{name:"Igbo",nativeName:"As\u1ee5s\u1ee5 Igbo"},ii:{name:"Nuosu",nativeName:"\ua188\ua320\ua4bf Nuosuhxop"},ik:{name:"Inupiaq",nativeName:"I\xf1upiaq"},io:{name:"Ido",nativeName:"Ido"},is:{name:"Icelandic",nativeName:"\xcdslenska"},it:{name:"Italian",nativeName:"Italiano"},iu:{name:"Inuktitut",nativeName:"\u1403\u14c4\u1483\u144e\u1450\u1466"},ja:{name:"Japanese",nativeName:"\u65e5\u672c\u8a9e"},jv:{name:"Javanese",nativeName:"basa Jawa"},ka:{name:"Georgian",nativeName:"\u10e5\u10d0\u10e0\u10d7\u10e3\u10da\u10d8"},kg:{name:"Kongo",nativeName:"Kikongo"},ki:{name:"Kikuyu",nativeName:"G\u0129k\u0169y\u0169"},kj:{name:"Kwanyama",nativeName:"Kuanyama"},kk:{name:"Kazakh",nativeName:"\u049b\u0430\u0437\u0430\u049b \u0442\u0456\u043b\u0456"},kl:{name:"Kalaallisut",nativeName:"kalaallisut"},km:{name:"Khmer",nativeName:"\u1781\u17c1\u1798\u179a\u1797\u17b6\u179f\u17b6"},kn:{name:"Kannada",nativeName:"\u0c95\u0ca8\u0ccd\u0ca8\u0ca1"},ko:{name:"Korean",nativeName:"\ud55c\uad6d\uc5b4"},kr:{name:"Kanuri",nativeName:"Kanuri"},ks:{name:"Kashmiri",nativeName:"\u0915\u0936\u094d\u092e\u0940\u0930\u0940"},ku:{name:"Kurdish",nativeName:"Kurd\xee"},kv:{name:"Komi",nativeName:"\u043a\u043e\u043c\u0438 \u043a\u044b\u0432"},kw:{name:"Cornish",nativeName:"Kernewek"},ky:{name:"Kyrgyz",nativeName:"\u041a\u044b\u0440\u0433\u044b\u0437\u0447\u0430"},la:{name:"Latin",nativeName:"latine"},lb:{name:"Luxembourgish",nativeName:"L\xebtzebuergesch"},lg:{name:"Ganda",nativeName:"Luganda"},li:{name:"Limburgish",nativeName:"Limburgs"},ln:{name:"Lingala",nativeName:"Ling\xe1la"},lo:{name:"Lao",nativeName:"\u0e9e\u0eb2\u0eaa\u0eb2\u0ea5\u0eb2\u0ea7"},lt:{name:"Lithuanian",nativeName:"lietuvi\u0173 kalba"},lu:{name:"Luba-Katanga",nativeName:"Kiluba"},lv:{name:"Latvian",nativeName:"latvie\u0161u valoda"},mg:{name:"Malagasy",nativeName:"fiteny malagasy"},mh:{name:"Marshallese",nativeName:"Kajin M\u0327aje\u013c"},mi:{name:"M\u0101ori",nativeName:"te reo M\u0101ori"},mk:{name:"Macedonian",nativeName:"\u043c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438 \u0458\u0430\u0437\u0438\u043a"},ml:{name:"Malayalam",nativeName:"\u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02"},mn:{name:"Mongolian",nativeName:"\u041c\u043e\u043d\u0433\u043e\u043b \u0445\u044d\u043b"},mr:{name:"Marathi",nativeName:"\u092e\u0930\u093e\u0920\u0940"},ms:{name:"Malay",nativeName:"Bahasa Melayu"},mt:{name:"Maltese",nativeName:"Malti"},my:{name:"Burmese",nativeName:"\u1017\u1019\u102c\u1005\u102c"},na:{name:"Nauru",nativeName:"Dorerin Naoero"},nb:{name:"Norwegian Bokm\xe5l",nativeName:"Norsk bokm\xe5l"},nd:{name:"Northern Ndebele",nativeName:"isiNdebele"},ne:{name:"Nepali",nativeName:"\u0928\u0947\u092a\u093e\u0932\u0940"},ng:{name:"Ndonga",nativeName:"Owambo"},nl:{name:"Dutch",nativeName:"Nederlands"},nn:{name:"Norwegian Nynorsk",nativeName:"Norsk nynorsk"},no:{name:"Norwegian",nativeName:"Norsk"},nr:{name:"Southern Ndebele",nativeName:"isiNdebele"},nv:{name:"Navajo",nativeName:"Din\xe9 bizaad"},ny:{name:"Chichewa",nativeName:"chiChe\u0175a"},oc:{name:"Occitan",nativeName:"occitan"},oj:{name:"Ojibwe",nativeName:"\u140a\u14c2\u1511\u14c8\u142f\u14a7\u140e\u14d0"},om:{name:"Oromo",nativeName:"Afaan Oromoo"},or:{name:"Oriya",nativeName:"\u0b13\u0b21\u0b3c\u0b3f\u0b06"},os:{name:"Ossetian",nativeName:"\u0438\u0440\u043e\u043d \xe6\u0432\u0437\u0430\u0433"},pa:{name:"Panjabi",nativeName:"\u0a2a\u0a70\u0a1c\u0a3e\u0a2c\u0a40"},pi:{name:"P\u0101li",nativeName:"\u092a\u093e\u0934\u093f"},pl:{name:"Polish",nativeName:"Polski"},ps:{name:"Pashto",nativeName:"\u067e\u069a\u062a\u0648"},pt:{name:"Portuguese",nativeName:"Portugu\xeas"},qu:{name:"Quechua",nativeName:"Runa Simi"},rm:{name:"Romansh",nativeName:"rumantsch grischun"},rn:{name:"Kirundi",nativeName:"Ikirundi"}
1,ro:{name:"Romanian",nativeName:"Rom\xe2n\u0103"},ru:{name:"Russian",nativeName:"\u0420\u0443\u0441\u0441\u043a\u0438\u0439"},rw:{name:"Kinyarwanda",nativeName:"Ikinyarwanda"},sa:{name:"Sanskrit",nativeName:"\u0938\u0902\u0938\u094d\u0915\u0943\u0924\u092e\u094d"},sc:{name:"Sardinian",nativeName:"sardu"},sd:{name:"Sindhi",nativeName:"\u0938\u093f\u0928\u094d\u0927\u0940"},se:{name:"Northern Sami",nativeName:"Davvis\xe1megiella"},sg:{name:"Sango",nativeName:"y\xe2ng\xe2 t\xee s\xe4ng\xf6"},si:{name:"Sinhala",nativeName:"\u0dc3\u0dd2\u0d82\u0dc4\u0dbd"},sk:{name:"Slovak",nativeName:"Sloven\u010dina"},sl:{name:"Slovenian",nativeName:"sloven\u0161\u010dina"},sm:{name:"Samoan",nativeName:"gagana fa'a Samoa"},sn:{name:"Shona",nativeName:"chiShona"},so:{name:"Somali",nativeName:"Soomaaliga"},sq:{name:"Albanian",nativeName:"Shqip"},sr:{name:"Serbian",nativeName:"\u0441\u0440\u043f\u0441\u043a\u0438 \u0458\u0435\u0437\u0438\u043a"},ss:{name:"Swati",nativeName:"SiSwati"},st:{name:"Southern Sotho",nativeName:"Sesotho"},su:{name:"Sundanese",nativeName:"Basa Sunda"},sv:{name:"Swedish",nativeName:"Svenska"},sw:{name:"Swahili",nativeName:"Kiswahili"},ta:{name:"Tamil",nativeName:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd"},te:{name:"Telugu",nativeName:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41"},tg:{name:"Tajik",nativeName:"\u0442\u043e\u04b7\u0438\u043a\u04e3"},th:{name:"Thai",nativeName:"\u0e44\u0e17\u0e22"},ti:{name:"Tigrinya",nativeName:"\u1275\u130d\u122d\u129b"},tk:{name:"Turkmen",nativeName:"T\xfcrkmen\xe7e"},tl:{name:"Tagalog",nativeName:"Wikang Tagalog"},tn:{name:"Tswana",nativeName:"Setswana"},to:{name:"Tonga",nativeName:"faka Tonga"},tr:{name:"Turkish",nativeName:"T\xfcrk\xe7e"},ts:{name:"Tsonga",nativeName:"Xitsonga"},tt:{name:"Tatar",nativeName:"\u0442\u0430\u0442\u0430\u0440 \u0442\u0435\u043b\u0435"},tw:{name:"Twi",nativeName:"Twi"},ty:{name:"Tahitian",nativeName:"Reo Tahiti"},ug:{name:"Uyghur",nativeName:"\u0626\u06c7\u064a\u063a\u06c7\u0631\u0686\u06d5\u200e"},uk:{name:"Ukrainian",nativeName:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430"},ur:{name:"Urdu",nativeName:"\u0627\u0631\u062f\u0648"},uz:{name:"Uzbek",nativeName:"\u040e\u0437\u0431\u0435\u043a"},ve:{name:"Venda",nativeName:"Tshiven\u1e13a"},vi:{name:"Vietnamese",nativeName:"Ti\u1ebfng Vi\u1ec7t"},vo:{name:"Volap\xfck",nativeName:"Volap\xfck"},wa:{name:"Walloon",nativeName:"walon"},wo:{name:"Wolof",nativeName:"Wollof"},xh:{name:"Xhosa",nativeName:"isiXhosa"},yi:{name:"Yiddish",nativeName:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9"},yo:{name:"Yoruba",nativeName:"Yor\xf9b\xe1"},za:{name:"Zhuang",nativeName:"Sa\u026f cue\u014b\u0185"},zh:{name:"Chinese",nativeName:"\u4e2d\u6587"},zu:{name:"Zulu",nativeName:"isiZulu"}}},90456:(F,R,d)=>{const _=d(50737),h={},I={},p=[],S=[],e=[];for(const U in _){const{name:u,nativeName:v}=_[U];h[U]=I[u.toLowerCase()]=I[v.toLowerCase()]={code:U,name:u,nativeName:v},p.push(U),S.push(u),e.push(v)}F.exports=class z{static getLanguages(u=[]){return u.map(v=>z.validate(v)?Object.assign({},h[v]):{code:v,name:"",nativeName:""})}static getName(u){return z.validate(u)?_[u].name:""}static getAllNames(){return S.slice()}static getNativeName(u){return z.validate(u)?_[u].nativeName:""}static getAllNativeNames(){return e.slice()}static getCode(u){return u=u.toLowerCase(),I.hasOwnProperty(u)?I[u].code:""}static getAllCodes(){return p.slice()}static validate(u){return _.hasOwnProperty(u)}}}}]);
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.