1import{a as Fe}from"./chunk-FOOXJ2PT.js";import{a as Ee,b as Ae,c as De}from"./chunk-Y4BZVWJW.js";import{a as we}from"./chunk-WVHJRFZQ.js";import{a as Te}from"./chunk-U7KZ5FLT.js";import{a as Me}from"./chunk-ABBLCVFN.js";import{b as Se}from"./chunk-QGCJIOZD.js";import"./chunk-3TA2FBI6.js";import"./chunk-F43LYABC.js";import{a as Ie,b as Ne}from"./chunk-72X35XQF.js";import"./chunk-XK6PXV72.js";import"./chunk-HIVOBJK4.js";import"./chunk-A6LOASI4.js";import"./chunk-4PVASJIY.js";import{a as ye}from"./chunk-ARG7JIWF.js";import"./chunk-OUW322UI.js";import"./chunk-ELRWA3VR.js";import{Aa as K,Ba as $,Ca as H,_a as g}from"./chunk-JYUUV7P3.js";import"./chunk-EKKX7FZG.js";import{b as xe}from"./chunk-UV2HMRY7.js";import"./chunk-FP2Z63JU.js";import"./chunk-4EHF5SVS.js";import"./chunk-W4JQBRT3.js";import{a as fe,b as _e,c as de,d as he,f as ve}from"./chunk-DMYNVVUF.js";import{a as ce,b as se,c as ue}from"./chunk-CUJJKEYU.js";import{f as Ce,g as be,h as ge,k as ze}from"./chunk-BQ4OX3RW.js";import"./chunk-BMSQHE5Q.js";import"./chunk-ADDJAMVC.js";import"./chunk-PFM7XEN3.js";import"./chunk-CNDOLJM6.js";import"./chunk-U6IDB2NR.js";import"./chunk-Q2T7O7RU.js";import"./chunk-XRXCDL5O.js";import{G as pe,K as me,d as te,f as ie,i as ne,j as re,s as oe,w as ae,z as le}from"./chunk-AGHEJXYL.js";import"./chunk-XWF3DHWI.js";import"./chunk-QX4APFOF.js";import"./chunk-XXMUO7AW.js";import"./chunk-CSCXDYTM.js";import"./chunk-SZMNBCXC.js";import"./chunk-4OQEIZII.js";import"./chunk-7RWCIHFI.js";import"./chunk-XTLQYN4R.js";import{h as Z,l as ee}from"./chunk-675YVCCY.js";import"./chunk-ZL3B2HKZ.js";import"./chunk-YOHJCOJF.js";import"./chunk-4X4H2OZV.js";import{c as X,e as j,f as W}from"./chunk-OJCKUG3E.js";import{a as q}from"./chunk-US4M2QEO.js";import"./chunk-WWEZAWLD.js";import"./chunk-SD3PYMCA.js";import{u as J,v as Q}from"./chunk-QRBUYQQU.js";import"./chunk-6HJ4YLPB.js";import"./chunk-JHJUUIIS.js";import"./chunk-VH5NMJG4.js";import{b as Y}from"./chunk-MBMRSFWC.js";import"./chunk-SNE5QZGM.js";import{$c as V,Aa as A,Db as L,Dc as M,Ea as D,Ic as d,Jb as C,Kc as h,Sc as T,Tc as R,Uc as w,Yb as y,_b as S,_c as b,ac as U,bc as G,cc as k,dc as n,ec as l,ed as m,ee as O,fc as p,fd as c,gb as F,gc as f,gd as B,jd as v,lb as i,nc as I,ne as P,pa as u,qc as N,tc as _,va as z,wa as x}from"./chunk-UB5JTVWS.js";import{l as E}from"./chunk-D4ZM5DW5.js";var Ue=()=>[8,8],Ge=()=>[16,16],ke=()=>[0,1,2,3,4,5,6],Re=e=>({value:e});function Ve(e,a){if(e&1&&(f(0,"math-title",4),m(1,"translate")),e&2){let t=_();n("title",c(1,1,t.i18n.teacher_profile.about_me_title))}}function Be(e,a){if(e&1&&(l(0,"li"),d(1),m(2,"translate"),p()),e&2){let t=a.$implicit;i(),h(" ",c(2,1,"teacher_profile.about_me_requirements."+t)," ")}}function Oe(e,a){e&1&&f(0,"span",15)}function Pe(e,a){if(e&1){let t=I();l(0,"nz-row",5)(1,"nz-col",6),f(2,"nz-alert",7),m(3,"translate"),p()(),l(4,"nz-row",5)(5,"nz-col",6)(6,"div")(7,"p",8),d(8),m(9,"translate"),p(),l(10,"ul"),G(11,Be,3,3,"li",null,U),p(),l(13,"a",9),d(14),m(15,"translate"),p()()()(),l(16,"form",10),N("ngSubmit",function(o){return z(t),x(o.preventDefault())}),l(17,"nz-row",5)(18,"nz-col",6)(19,"nz-form-item")(20,"nz-form-label"),d(21),m(22,"translate"),p(),l(23,"nz-form-control",11)(24,"nz-input-group",12),f(25,"input",13),m(26,"translate"),p(),C(27,Oe,1,0,"ng-template",null,2,v),p()()()(),l(29,"nz-row",5)(30,"nz-col",6),f(31,"math-youtube-video-player",14),p()()()}if(e&2){let t=M(28),r=_(),o=M(11),s=w(2);n("nzGutter",s),i(),n("nzSpan",24),i(),n("nzMessage",c(3,18,r.i18n.teacher_profile.about_me_description)),i(2),n("nzGutter",s),i(),n("nzSpan",24),i(3),h(" ",c(9,20,r.i18n.teacher_profile.about_me_requirements_title)," "),i(3),k(b(28,ke)),i(2),n("href",r.getInstructionLink(),F),i(),h(" ",c(15,22,r.i18n.teacher_profile.about_me_instruction_link)," "),i(2),n("formGroup",r.form),i(),n("nzGutter",s),i(),n("nzSpan",24),i(3),h(" ",c(22,24,r.i18n.teacher_profile.about_me_input_label)," "),i(2),n("nzErrorTip",o),i(),n("nzPrefix",t),i(),n("placeholder",c(26,26,r.i18n.teacher_profile.about_me_input_placeholder)),i(4),n("nzGutter",s),i(),n("nzSpan",24),i(),n("url",r.rawInput())}}function qe(e,a){if(e&1){let t=I();l(0,"math-footer-buttons",16),N("save",function(){z(t);let o=_();return x(o.onSave())}),p()}if(e&2){let t=_(),r=w(2);
1n("disabledSave",t.form==null?null:t.form.invalid)("rowGutter",r)}}function Ke(e,a){if(e&1&&(d(0),m(1,"translate"),f(2,"br")),e&2){let t=_(2);h(" ",B(1,1,"main.form.errors.max-length",V(4,Re,t.MAX_LENGTH)))}}function $e(e,a){if(e&1&&(d(0),m(1,"translate"),f(2,"br")),e&2){let t=_(2);h(" ",c(1,1,t.i18n.teacher_profile.about_me_invalid_url))}}function He(e,a){if(e&1&&(y(0,Ke,3,6),y(1,$e,3,3)),e&2){let t=a.$implicit;S(!(t==null||t.errors==null)&&t.errors.maxlength?0:-1),i(),S(!(t==null||t.errors==null)&&t.errors.youtubeUrl?1:-1)}}var wt=(()=>{let a=class a{constructor(){this.i18n=q,this.MAX_LENGTH=500,this.rawInput=D(""),this.fb=u(pe),this.formCheck=u(Fe),this.teacherState=u(Se),this.teacherService=u(Ae),this.destroyRef=u(A),this.translate=u(X),this.responsive=u(ye)}getInstructionLink(){switch(this.translate.currentLang){case g.PL:return $;case g.EN:return H;case g.UA:return K;default:throw new Error(`Unknown language: ${this.translate.currentLang}`)}}ngOnInit(){this.initForm()}initForm(){let r=this.teacherState.teacher(),o=r?.videoAboutMeUrl??null;this.form=this.fb.group({videoAboutMeUrl:this.fb.control(o,{validators:[ie.maxLength(this.MAX_LENGTH),xe.youtubeUrl()]})}),this.rawInput.set(o??""),this.form.controls.videoAboutMeUrl.valueChanges.pipe(Y(this.destroyRef)).subscribe(s=>{this.rawInput.set(s??"")}),this.formCheck.registerForm(this.form,r)}onSave(){return E(this,null,function*(){if(this.form.invalid){this.form.markAllAsTouched();return}let o={videoAboutMeUrl:(this.form.value.videoAboutMeUrl??"").trim()||null};(yield this.teacherService.updateProfileSection(Ee.ABOUT_ME,o))&&(this.form.patchValue(o,{emitEvent:!1}),this.rawInput.set(o.videoAboutMeUrl??""),this.formCheck.resetForm(this.form,o))})}hasUnsavedChanges(){return this.formCheck.isFormDirty(this.form)}};a.\u0275fac=function(o){return new(o||a)},a.\u0275cmp=L({type:a,selectors:[["math-about-me"]],decls:12,vars:6,consts:[["section",""],["videoErrorTemplate",""],["linkIcon",""],[3,"isCollapsable"],[3,"title"],[3,"nzGutter"],[3,"nzSpan"],["nzType","info","nzShowIcon","",3,"nzMessage"],[1,"requirements-title"],["target","_blank","rel","noopener noreferrer",3,"href"],["nz-form","","nzLayout","vertical",3,"ngSubmit","formGroup"],[3,"nzErrorTip"],[3,"nzPrefix"],["nz-input","","type","text","formControlName","videoAboutMeUrl",3,"placeholder"],[3,"url"],["nz-icon","","nzType","link","nzTheme","outline"],[3,"save","disabledSave","rowGutter"]],template:function(o,s){if(o&1&&(T(0),m(1,"async"),T(2),l(3,"math-sectioned-card",3),C(4,Ve,2,3,"ng-template",null,0,v)(6,Pe,32,29,"ng-template",null,0,v)(8,qe,1,2,"ng-template",null,0,v),p(),C(10,He,2,2,"ng-template",null,1,v)),o&2){let Le=c(1,1,s.responsive.isMobile$);i(2),R(Le?b(4,Ue):b(5,Ge)),i(),n("isCollapsable",!1)}},dependencies:[P,me,oe,te,ne,re,ae,le,W,Ne,Ie,ee,Z,ve,se,ce,_e,fe,he,de,ue,Q,J,ze,Ce,ge,be,De,Me,we,Te,O,j],styles:[".requirements-title[_ngcontent-%COMP%]{font-weight:500;margin-bottom:8px}math-youtube-video-player[_ngcontent-%COMP%]{max-width:560px;display:block}"],changeDetection:0});let e=a;return e})();export{wt as AboutMeComponent};
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.