PageSourceSearch

https://class-room-c5809.web.app/5092-es2021.e1299c4ccde29fe86900.js

js class-room-c5809.web.app collected 2026-10-03 12:21:16 UTC 7,618 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkclass_room=self.webpackChunkclass_room||[]).push([[5092],{15092:function(e,o,n){n.r(o),n.d(o,{CheckoutPageModule:function(){return P}});var t=n(38583),i=n(3679),r=n(92859),a=n(8307),s=n(8239),c=n(88720),l=n(88429);function d(e,o){1&e&&(c.TgZ(0,"small"),c._uU(1,"Email \xe9 obrigat\xf3rio."),c.qZA())}function u(e,o){1&e&&(c.TgZ(0,"small"),c._uU(1,"Por favor, insira um email v\xe1lido."),c.qZA())}function p(e,o){if(1&e&&(c.TgZ(0,"div",7),c.YNc(1,d,2,0,"small",8),c.YNc(2,u,2,0,"small",8),c.qZA()),2&e){const e=c.oxw();c.xp6(1),c.Q6J("ngIf",null==e.emailControl.errors?null:e.emailControl.errors.required),c.xp6(1),c.Q6J("ngIf",null==e.emailControl.errors?null:e.emailControl.errors.email)}}let m=(()=>{class e{constructor(e){this.modalCtrl=e,this.emailControl=new i.NI("",[i.kI.required,i.kI.email])}cancel(){return this.modalCtrl.dismiss(null,"cancel")}confirm(){return this.emailControl.valid?this.modalCtrl.dismiss(this.emailControl.value,"confirm"):(this.emailControl.markAsTouched(),this.emailControl.markAsDirty(),Promise.resolve())}}return e.\u0275fac=function(o){return new(o||e)(c.Y36(r.IN))},e.\u0275cmp=c.Xpm({type:e,selectors:[["app-email-prompt-modal"]],decls:17,vars:3,consts:[["slot","end"],[3,"click"],[1,"ion-padding"],["position","floating"],["placeholder","[email protected]","type","email",3,"formControl"],["class","ion-padding-start error-message",4,"ngIf"],["expand","block",1,"ion-margin-top",3,"disabled","click"],[1,"ion-padding-start","error-message"],[4,"ngIf"]],template:function(e,o){1&e&&(c.TgZ(0,"ion-header"),c.TgZ(1,"ion-toolbar"),c.TgZ(2,"ion-title"),c._uU(3,"Continue sua Compra"),c.qZA(),c.TgZ(4,"ion-buttons",0),c.TgZ(5,"ion-button",1),c.NdJ("click",function(){return o.cancel()}),c._uU(6,"Fechar"),c.qZA(),c.qZA(),c.qZA(),c.qZA(),c.TgZ(7,"ion-content",2),c.TgZ(8,"p"),c._uU(9,"Para continuar, por favor, informe seu melhor email. Usaremos ele para enviar o recibo e os detalhes de acesso."),c.qZA(),c.TgZ(10,"ion-item"),c.TgZ(11,"ion-label",3),c._uU(12,"Email"),c.qZA(),c._UZ(13,"ion-input",4),c.qZA(),c.YNc(14,p,3,2,"div",5),c.TgZ(15,"ion-button",6),c.NdJ("click",function(){return o.confirm()}),c._uU(16," Continuar "),c.qZA(),c.qZA()),2&e&&(c.xp6(13),c.Q6J("formControl",o.emailControl),c.xp6(1),c.Q6J("ngIf",o.emailControl.invalid&&(o.emailControl.dirty||o.emailControl.touched)),c.xp6(1),c.Q6J("disabled",o.emailControl.invalid))},directives:[r.Gu,r.sr,r.wd,r.Sm,r.YG,r.W2,r.Ie,r.Q$,r.pK,r.j9,l.O,i.JJ,i.oH,t.O5],styles:[""]}),e})();var g=n(37556),Z=n(38106),h=n(84465);function f(e,o){if(1&e&&(c.TgZ(0,"ion-card"),c.TgZ(1,"ion-card-header"),c.TgZ(2,"ion-card-title"),c._uU(3,"Detalhes do Pedido"),c.qZA(),c.qZA(),c.TgZ(4,"ion-card-content"),c.TgZ(5,"p"),c.TgZ(6,"strong"),c._uU(7,"Aula:"),c.qZA(),c._uU(8),c.qZA(),c.TgZ(9,"p"),c.TgZ(10,"strong"),c._uU(11,"Pre\xe7o:"),c.qZA(),c._uU(12," R$ 100,00"),c.qZA(),c.TgZ(13,"p"),c.TgZ(14,"strong"),c._uU(15,"Quantidade:"),c.qZA(),c._uU(16," 1"),c.qZA(),c.TgZ(17,"p"),c.TgZ(18,"strong"),c._uU(19,"Total:"),c.qZA(),c._uU(20," R$ 100,00"),c.qZA(),c.qZA(),c.qZA()),2&e){const e=c.oxw();c.xp6(8),c.hij(" Nome da Aula Exemplo (ID: ",e.lessonId,")")}}function T(e,o){1&e&&c._UZ(0,"ion-spinner",12)}function C(e,o){1&e&&(c.TgZ(0,"span"),c._uU(1,"Pagar com Mercado Pago"),c.qZA())}function A(e,o){1&e&&(c.TgZ(0,"span"),c._uU(1,"Processando..."),c.qZA())}const v=[{path:"",component:(()=>{class e{constructor(e,o,n,t,i,r){this.authService=e,this.modalCtrl=o,this.checkoutService=n,this.toastService=t,this.activatedRoute=i,this.router=r,this.isProcessing=!1,this.lessonId=null,this.couponCode=null}ngOnInit(){this.lessonId=this.activatedRoute.snapshot.paramMap.get("id"),this.lessonId||(this.toastService.presentSimpleToast("ID da aula n\xe3o encontrado. N\xe3o \xe9 poss\xedvel prosseguir com o checkout.","danger"),this.router.navigate(["/home"]))}startPayment(){var e=this;return(0,s.Z)(function*(){if(e.lessonId)if(e.isProcessing=!0,e.authService.isLoggedIn())e.proceedToPayment();else{const o=yield e.modalCtrl.create({component:m});yield o.present();const{data:n,role:t}=yield o.onWillDismiss();"confirm"===t&&"string"==typeof n&&n?e.proceedToPayment(n):(e.isProcessing=!1,e.toastService.presentSimpleToast("Pagamento cancelado ou email n\xe3o fornecido.","warning"))}else e.toastService.presentSimpleToast("N\xe3o foi poss\xedvel iniciar o pagamento: ID da aula ausente.","danger")})()}proceedToPayment(e){const o=this.lessonId,n=this.authService.currentUserValue,t=e||n?.email;if(!o||!t)return this.isProcessing=!1,void this.toastService.presentSimpleToast("N\xe3o foi poss\xedvel identificar o aluno para o pagamento.","danger");this.checkoutService.createPaymentPreference({items:[{id:o,title:"Nome da Aula Exemplo",unit_price:100,quantity:1}],orderId:`lesson_${o}_${Date.now()}`,studentEmail:t,userId:e?void 0:n?._id||this.authService.getUserIdFromToken()||void 0,couponCode:this.couponCode||void 0,buyerEmail:t}).subscribe({next:e=>{e&&e.preferenceUrl?window.location.href=e.preferenceUrl:(this.toastService.presentSimpleToast("URL de pagamento n\xe3o recebida.","danger"),this.isProcessing=!1)},error:e=>{this.toastService.presentSimpleToast(e.message||"Erro ao processar o checkout.","danger"),this.isProcessing=!1}})}setCouponCode(e){this.couponCode=e}}return e.\u0275fac=function(o){return new(o||e)(c.Y36(g.e),c.Y36(r.IN),c.Y36(Z.Z),c.Y36(h.k),c.Y36(a.gz),c.Y36(a.F0))},e.\u0275cmp=c.Xpm({type:e,selectors:[["app-checkout"]],decls:21,vars:6,consts:[["slot","start"],["defaultHref","/shop"],[1,"ion-padding"],[1,"checkout-container"],[1,"ion-text-center"],[4,"ngIf"],[1,"ion-margin-top"],["position","floating"],["type","text",3,"ngModel","ionChange","ngModelChange"],["expand","block",1,"ion-margin-top",3,"disabled","click"],["name","crescent",4,"ngIf"],[1,"ion-text-center","ion-padding-top"],["name","crescent"]],template:function(e,o){1&e&&(c.TgZ(0,"ion-header"),c.TgZ(1,"ion-toolbar"),c.TgZ(2,"ion-buttons",0),c._UZ(3,"ion-back-button",1),c.qZA(),c.TgZ(4,"ion-title"),c._uU(5,"Checkout da Aula"),c.qZA(),c.qZA(),c.qZA(),c.TgZ(6,"ion-content",2),c.TgZ(7,"div",3),c.TgZ(8,"h2",4),c._uU(9,"Confirmar Compra"),c.qZA(),c.YNc(10,f,21,1,"ion-card",5),c.TgZ(11,"ion-item",6),c.TgZ(12,"ion-label",7),c._uU(13,"C\xf3digo do Cupom (Opcional)"),c.qZA(),c.TgZ(14,"ion-input",8),c.NdJ("ionChange",function(){return o.setCouponCode(o.couponCode||"")})("ngModelChange",function(e){return o.couponCode=e}),c.qZA(),c.qZA(),c.TgZ(15,"ion-button",9),c.NdJ("click",function(){return o.startPayment()}),c.YNc(16,T,1,0,"ion-spinner",10),c.YNc(17,C,2,0,"span",5),c.YNc(18,A,2,0,"span",5),c.qZA(),c.TgZ(19,"p",11),c._uU(20,' Ao clicar em "Pagar com Mercado Pago", voc\xea ser\xe1 redirecionado para a plataforma do Mercado Pago para finalizar a compra. '),c.qZA(),c.qZA(),c.qZA()),2&e&&(c.xp6(10),c.Q6J("ngIf",o.lessonId),c.xp6(4),c.Q6J("ngModel",o.couponCode),c.xp6(1),c.Q6J("disabled",o.isProcessing||!o.lessonId),c.xp6(1),c.Q6J("ngIf",o.isProcessing),c.xp6(1),c.Q6J("ngIf",!o.isProcessing),c.xp6(1),c.Q6J("ngIf",o.isProcessing))},directives:[r.Gu,r.sr,r.Sm,r.oU,r.cs,r.wd,r.W2,t.O5,r.Ie,r.Q$,r.pK,r.j9,i.JJ,i.On,r.YG,r.PM,r.Zi,r.gZ,r.FN,r.PQ],styles:[""]}),e})()},{path:"success-handler",loadChildren:()=>Promise.all([n.e(8592),n.e(8657)]).then(n.bind(n,58657)).then(e=>e.SuccessHandlerPageModule)}];let q=(()=>{class e{}return e.\u0275fac=function(o){return new(o||e)},e.\u0275mod=c.oAB({type:e}),e.\u0275inj=c.cJS({imports:[[a.Bz.forChild(v)],a.Bz]}),e})(),P=(()=>{class e{}return e.\u0275fac=function(o){return new(o||e)},e.\u0275mod=c.oAB({type:e}),e.\u0275inj=c.cJS({imports:[[t.ez,i.u5,r.Pc,q]]}),e})()}}]);

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.