PageSourceSearch

https://oer.hoou.de/edu-sharing/727.1bb29ab41ed10267.js

js hoou.de collected 2026-09-24 17:34:41 UTC 5,804 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkangular_edusharing=self.webpackChunkangular_edusharing||[]).push([[727],{68727:(J,f,a)=>{a.r(f),a.d(f,{NodeReportDialogComponent:()=>E,NodeReportDialogModule:()=>y});var A=a(47093),c=a(41777),i=a(93075),u=a(87224),v=a(92198),C=a(72986),d=a(45065),g=a(16900),h=a(31199),T=a(30567),o=a(5e3),D=a(7025),p=a(34549),R=a(51062),L=a(58742);const P=["formElement"];function Z(n,s){if(1&n&&(o.TgZ(0,"mat-radio-button",9),o._uU(1),o.ALo(2,"translate"),o.qZA()),2&n){const t=s.$implicit,e=o.oxw();o.Q6J("value",t)("aria-describedby",e.shouldShowError("reason")?"node-report-reason-error":null),o.xp6(1),o.Oqu(o.lcZ(2,3,"NODE_REPORT.REASONS."+t))}}function I(n,s){1&n&&(o.TgZ(0,"mat-error",10),o._uU(1),o.ALo(2,"translate"),o.qZA()),2&n&&(o.xp6(1),o.hij(" ",o.lcZ(2,1,"NODE_REPORT.REASON_REQUIRED")," "))}const M=function(n){return{name:n}};let E=(()=>{class n{constructor(t,e,r,l,U,Y,Q,F){this.data=t,this.dialogRef=e,this.authenticationService=r,this.userService=l,this.translate=U,this.toast=Y,this.nodeApi=Q,this.cdr=F,this.reasons=["UNAVAILABLE","INAPPROPRIATE_CONTENT","INVALID_METADATA","OTHER"],this.form=new i.cw({reason:new i.NI("",i.kI.required),comment:new i.NI(""),email:new i.NI("",[i.kI.email,i.kI.required])})}ngOnInit(){this.dialogRef.patchConfig({buttons:[new d.Qd("CANCEL",{color:"standard"},()=>this.cancel()),new d.Qd("NODE_REPORT.REPORT",{color:"primary"},()=>this.report())]}),(0,T.D)(this.authenticationService.observeLoginInfo().pipe((0,u.P)()),this.userService.observeCurrentUser().pipe((0,u.P)())).subscribe(([t,e])=>{var r,l;!t.isGuest&&(null===(l=null===(r=null==e?void 0:e.person)||void 0===r?void 0:r.profile)||void 0===l?void 0:l.email)&&(this.form.get("email").disable(),this.form.patchValue({email:e.person.profile.email}))}),this.form.valueChanges.pipe((0,v.h)(t=>Object.values(t).some(e=>!!e)),(0,C.q)(1)).subscribe(()=>this.dialogRef.patchConfig({closable:h.IA.Standard}))}cancel(){this.dialogRef.close()}shouldShowError(t){const e=this.form.get(t);return!e.disabled&&e.touched&&!e.valid}report(){if(this.form.valid){const t=this.form.getRawValue();this.setLoading(!0),this.nodeApi.reportNode(this.data.node.ref.id,this.getReasonAsString(t.reason),t.email,t.comment,this.data.node.ref.repo).subscribe(()=>{this.toast.toast("NODE_REPORT.DONE"),this.dialogRef.close()},e=>{this.setLoading(!1),this.toast.error(e)})}else for(const t of["reason","email"]){const e=this.form.get(t);if(!e.valid){e.markAsTouched(),this.focusField(t),this.cdr.detectChanges();break}}}setLoading(t){this.dialogRef.patchState({isLoading:t}),t?this.form.disable():this.form.enable()}getReasonAsString(t){return`${this.translate.instant("NODE_REPORT.REASONS."+t)} (${t})`}focusField(t){const r=this.formRef.nativeElement.elements.namedItem(t);r instanceof HTMLElement?r.focus():r instanceof RadioNodeList&&r[0].focus()}}return n.\u0275fac=function(t){return new(t||n)(o.Y36(h.W9),o.Y36(D.Y),o.Y36(p.$h),o.Y36(p.KD),o.Y36(R.sK),o.Y36(L.FN),o.Y36(d.xE),o.Y36(o.sBO))},n.\u0275cmp=o.Xpm({type:n,selectors:[["es-node-report-dialog"]],viewQuery:function(t,e){if(1&t&&o.Gf(P,5),2&t){let r;o.iGM(r=o.CRH())&&(e.formRef=r.first)}},decls:26,vars:29,consts:[[3,"formGroup","ngSubmit"],["formElement",""],[1,"report"],["formControlName","reason","name","reason"],[3,"value","aria-describedby",4,"ngFor","ngForOf"],["id","node-report-reason-error",4,"ngIf"],["floatLabel","always"],["matInput","","cdkTextareaAutosize","","cdkAutosizeMinRows","2","cdkAutosizeMaxRows","5","name","comment","formControlName","comment","autofocus","",3,"placeholder"],["matInput","","type","email","name","reportMail","name","email","formControlName","email",3,"placeholder"],[3,"value","aria-describedby"],["id","node-report-reason-error"]],template:function(t,e){1&t&&(o.TgZ(0,"form",0,1),o.NdJ("ngSubmit",function(){return e.report()}),o.TgZ(2,"h2"),o._uU(3),o.ALo(4,"translate"),o.ALo(5,"nodeTitle"),o.qZA(),o.TgZ(6,"div",2)(7,"mat-radio-group",3),o.ALo(8,"translate"),o.YNc(9,Z,3,5,"mat-radio-button",4),o.qZA(),o.YNc(10,I,3,3,"mat-error",5),o.qZA(),o.TgZ(11,"mat-form-field",6)(12,"mat-label"),o._uU(13),o.ALo(14,"translate"),o.qZA(),o._UZ(15,"textarea",7),o.ALo(16,"translate"),o.qZA(),o.TgZ(17,"mat-form-field",6)(18,"mat-label"),o._uU(19),o.ALo(20,"translate"),o.qZA(),o._UZ(21,"input",8),o.ALo(22,"translate"),o.TgZ(23,"mat-error"),o._uU(24),o.ALo(25,"translate"),o.qZA()()()),2&t&&(o.Q6J("formGroup",e.form),o.xp6(3),o.Oqu(o.xi3(4,10,"NODE_REPORT.REPORT_INFO",o.VKq(27,M,o.lcZ(5,13,e.data.node)))),o.xp6(4),o.uIk("aria-label",o.lcZ(8,15,"NODE_REPORT.REASON")),o.xp6(2),o.Q6J("ngForOf",e.reasons),o.xp6(1),o.Q6J("ngIf",e.shouldShowError("reason")),o.xp6(3),o.Oqu(o.lcZ(14,17,"NODE_REPORT.COMMENT")),o.xp6(2),o.s9C("placeholder",o.lcZ(16,19,"NODE_REPORT.COMMENT_PLACEHOLDER")),o.xp6(4),o.Oqu(o.lcZ(20,21,"NODE_REPORT.EMAIL")),o.xp6(2),o.s9C("placeholder",o.lcZ(22,23,"NODE_REPORT.EMAIL_PLACEHOLDER")),o.xp6(3),o.hij(" ",o.lcZ(25,25,"NODE_REPORT.EMAIL_REQUIRED")," "))},styles:[".report[_ngcontent-%COMP%]{margin-bottom:20px}.report[_ngcontent-%COMP%]   mat-radio-group[_ngcontent-%COMP%]{display:flex;flex-direction:column}.report[_ngcontent-%COMP%]   mat-radio-group[_ngcontent-%COMP%] > mat-radio-button[_ngcontent-%COMP%]{margin:3px 0}mat-form-field[_ngcontent-%COMP%]{width:100%}h2[_ngcontent-%COMP%]{margin:0 0 20px;font-size:110%;font-weight:700;color:#585858}"],data:{animation:[(0,c.X$)("fade",g.L.fade()),(0,c.X$)("cardAnimation",g.L.cardAnimation())]},changeDetection:0}),n})();var O=a(79814),N=a(69808),m=a(67322),x=a(98833),S=a(74533),b=a(83074);let y=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=o.oAB({type:n}),n.\u0275inj=o.cJS({imports:[[A.m]]}),n})();o.B6R(E,[i._Y,i.JL,i.sg,O.VQ,i.JJ,i.u,N.sg,O.U0,N.O5,m.TO,m.KE,m.hX,x.Nt,S.IC,i.Fj],[R.X$,b.b])}}]);

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.