1"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[680],{680:(A,C,_)=>{_.r(C),_.d(C,{SessionPage:()=>re});var x=_(6895),S=_(4006),r=_(12),T=_(5698),f=_(6686),m=_(7220),d=_(4457),e=_(4650);function u(o,a){if(1&o&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&o){const i=e.oxw();e.xp6(1),e.hij(" (",i.translateService.getParsedResult(i.translateService,"ADMIN"),") ")}}function g(o,a){if(1&o&&(e.TgZ(0,"ion-select-option",31),e._uU(1),e.qZA()),2&o){const i=a.$implicit;e.Q6J("value",i.id),e.xp6(1),e.hij(" ",i.name||i.id," ")}}function v(o,a){if(1&o){const i=e.EpF();e.TgZ(0,"ion-datetime",32),e.NdJ("ionChange",function(t){e.CHM(i);const s=e.oxw();return e.KtG(s.datePickerChanged(t,0))})("value",function(){e.CHM(i);const t=e.oxw();return e.KtG(t.convertFirebaseDateToDate(t.session.start).toLocaleTimeString("en-us",{hour:"2-digit",minute:"2-digit",timeZone:"Asia/Bangkok"}))}),e.qZA()}2&o&&e.Q6J("showDefaultButtons",!0)}function h(o,a){if(1&o){const i=e.EpF();e.TgZ(0,"ion-datetime",32),e.NdJ("ionChange",function(t){e.CHM(i);const s=e.oxw();return e.KtG(s.datePickerChanged(t,1))})("value",function(){e.CHM(i);const t=e.oxw();return e.KtG(t.convertFirebaseDateToDate(t.session.stop))}),e.qZA()}2&o&&e.Q6J("showDefaultButtons",!0)}function w(o,a){if(1&o&&(e.TgZ(0,"ion-col",20),e._uU(1),e.qZA()),2&o){const i=e.oxw().$implicit,n=e.oxw();e.xp6(1),e.Oqu(n.recordsService.getPublicCompetitionNameForSchedule(i.agegroup,i.category,i.dancetype))}}function b(o,a){if(1&o&&(e.TgZ(0,"ion-col",20),e._uU(1),e.qZA()),2&o){const i=e.oxw().$implicit,n=e.oxw();e.xp6(1),e.Oqu(n.recordsService.getAgeGroupName(i.agegroup))}}function y(o,a){if(1&o&&(e.TgZ(0,"ion-col",20),e._uU(1),e.qZA()),2&o){const i=e.oxw().$implicit,n=e.oxw();e.xp6(1),e.Oqu(n.recordsService.getSyllabusCompetitionNameForSchedule(i.category,i.competitiontype,i.dancetype))}}function P(o,a){1&o&&(e.TgZ(0,"ion-col",20),e._uU(1,"SYLLABUS"),e.qZA())}function L(o,a){if(1&o){const i=e.EpF();e.TgZ(0,"ion-row",33)(1,"ion-col",19),e._uU(2),e.qZA(),e.YNc(3,w,2,1,"ion-col",34),e.YNc(4,b,2,1,"ion-col",34),e.YNc(5,y,2,1,"ion-col",34),e.YNc(6,P,2,0,"ion-col",34),e.TgZ(7,"ion-col",19),e._uU(8),e.qZA(),e.TgZ(9,"ion-col"),e._uU(10),e.qZA(),e.TgZ(11,"ion-col"),e._uU(12),e.qZA(),e.TgZ(13,"ion-col",21)(14,"ion-button",35),e.NdJ("click",function(){const s=e.CHM(i).$implicit,c=e.oxw();return e.KtG(c.openSectionById(s.uid))}),e._uU(15),e.qZA(),e.TgZ(16,"ion-button",36),e.NdJ("click",function(){const s=e.CHM(i).$implicit,c=e.oxw();return e.KtG(c.deleteSectionById(s.uid))}),e._uU(17),e.qZA()(),e.TgZ(18,"ion-col",23),e._UZ(19,"ion-reorder"),e.qZA()()}if(2&o){const i=a.$implicit,n=e.oxw();e.xp6(2),e.hij(" ",i.order," "),e.xp6(1),e.Q6J("ngIf",i.ispublic),e.xp6(1),e.Q6J("ngIf",i.ispublic),e.xp6(1),e.Q6J("ngIf",!i.ispublic),e.xp6(1),e.Q6J("ngIf",!i.ispublic),e.xp6(2),e.Oqu(i.part),e.xp6(2),e.Oqu(i.entries.length),e.xp6(2),e.Oqu(n.getMinuteFormat(i.seconds*i.entries.length)),e.xp6(2),e.s9C("title",n.translateService.getParsedResult(n.translateService,"OPEN")),e.xp6(1),e.hij(" ",n.translateService.getParsedResult(n.translateService,"OPEN")," "),e.xp6(1),e.s9C("title",n.translateService.getParsedResult(n.translateService,"DELETE")),e.xp6(1),e.hij(" ",n.translateService.getParsedResult(n.translateService,"DELETE")," ")}}function E(o,a){if(1&o){const i=e.EpF();e.TgZ(0,"ion-button",37),e.NdJ("click",function(){e.CHM(i);const t=e.oxw();return e.KtG(t.showAddSection())}
1),e._UZ(1,"ion-icon",38),e.TgZ(2,"ion-label"),e._uU(3),e.qZA()()}if(2&o){const i=e.oxw();e.xp6(3),e.AsE("",i.translateService.getParsedResult(i.translateService,"ADD")," : ",i.translateService.getParsedResult(i.translateService,"SECTION"),"")}}function U(o,a){if(1&o&&(e.TgZ(0,"ion-button",39),e._UZ(1,"ion-icon",38),e.TgZ(2,"ion-label"),e._uU(3),e.qZA()()),2&o){const i=e.oxw();e.xp6(3),e.AsE("",i.translateService.getParsedResult(i.translateService,"ADD")," : ",i.translateService.getParsedResult(i.translateService,"SECTION"),"")}}function q(o,a){if(1&o&&(e.TgZ(0,"ion-select-option",31),e._uU(1),e.qZA()),2&o){const i=a.$implicit;e.Q6J("value",i.id),e.xp6(1),e.hij(" ",i.name||i.id," ")}}function I(o,a){if(1&o){const i=e.EpF();e.TgZ(0,"div")(1,"ion-item",27)(2,"ion-select",47),e.NdJ("ionChange",function(t){e.CHM(i);const s=e.oxw(2);return e.KtG(s.onAgeGroupChanged(t))})("ngModelChange",function(t){e.CHM(i);const s=e.oxw(2);return e.KtG(s.newSection.agegroup=t)}),e.YNc(3,q,2,2,"ion-select-option",4),e.qZA()()()}if(2&o){const i=e.oxw(2);e.xp6(2),e.s9C("label",i.translateService.getParsedResult(i.translateService,"AGEGROUP")),e.Q6J("ngModel",i.newSection.agegroup),e.xp6(1),e.Q6J("ngForOf",i.recordsService.getAgeGroupList())}}function R(o,a){if(1&o&&(e.TgZ(0,"ion-select-option",31),e._uU(1),e.qZA()),2&o){const i=a.$implicit;e.Q6J("value",i.id),e.xp6(1),e.hij(" ",i.name||i.id," ")}}function O(o,a){if(1&o&&(e.TgZ(0,"ion-select-option",31),e._uU(1),e.qZA()),2&o){const i=a.$implicit;e.Q6J("value",i.id),e.xp6(1),e.hij(" ",i.name||i.id," ")}}function M(o,a){if(1&o){const i=e.EpF();e.TgZ(0,"div")(1,"ion-item",27)(2,"ion-select",48),e.NdJ("ionChange",function(t){e.CHM(i);const s=e.oxw(2);return e.KtG(s.onCompetitionTypeChanged(t))})("ngModelChange",function(t){e.CHM(i);const s=e.oxw(2);return e.KtG(s.newSection.competitiontype=t)}),e.YNc(3,O,2,2,"ion-select-option",4),e.qZA()()()}if(2&o){const i=e.oxw(2);e.xp6(2),e.s9C("label",i.translateService.getParsedResult(i.translateService,"COMPETITIONTYPE")),e.Q6J("ngModel",i.newSection.competitiontype),e.xp6(1),e.Q6J("ngForOf",i.getCompetitionTypeList())}}function N(o,a){if(1&o&&(e.TgZ(0,"ion-select-option",31),e._uU(1),e.qZA()),2&o){const i=a.$implicit,n=e.oxw(2);e.Q6J("value",i.type),e.xp6(1),e.hij(" ",n.recordsService.getDanceTypeByDanceTypeId(i.type).name," ")}}function D(o,a){if(1&o&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&o){const i=e.oxw(2).index;e.xp6(1),e.Oqu(i+1)}}function J(o,a){if(1&o&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&o){const i=e.oxw().index;e.xp6(1),e.Oqu(i+1)}}function F(o,a){if(1&o&&(e.TgZ(0,"div"),e.YNc(1,D,2,1,"span",0),e.YNc(2,J,2,1,"span",0),e._uU(3),e._UZ(4,"br"),e.qZA()),2&o){const i=a.$implicit,n=e.oxw(5);e.xp6(1),e.Q6J("ngIf",1===n.newSection.dancetype),e.xp6(1),e.Q6J("ngIf",1!==n.newSection.dancetype),e.xp6(1),e.hij(" : ",n.getStudentNameById(i.uid)," ")}}function B(o,a){if(1&o){const i=e.EpF();e.TgZ(0,"ion-row",50)(1,"ion-col"),e._uU(2),e.qZA(),e.TgZ(3,"ion-col",51),e.YNc(4,F,5,3,"div",52),e.qZA(),e.TgZ(5,"ion-col")(6,"ion-button",53),e.NdJ("click",function(){const s=e.CHM(i).$implicit,c=e.oxw(4);return e.KtG(c.removePublicCompetitionRegistrationFromList(s))}),e._UZ(7,"ion-icon",54),e.TgZ(8,"ion-label"),e._uU(9),e.qZA()()()()}if(2&o){const i=a.$implicit,n=e.oxw(4);let t;e.xp6(2),e.Oqu(null==(t=n.getSchoolById(i.schoolid))||null==t.name?null:t.name.toUpperCase()),e.xp6(2),e.Q6J("ngForOf",i.studentidlist),e.xp6(5),e.Oqu(n.translateService.getParsedResult(n.translateService,"REMOVE"))}}function Y(o,a){if(1&o&&(e.TgZ(0,"div")(1,"ion-grid",17)(2,"ion-row",18)(3,"ion-col"),e._uU(4,"SCHOOL"),e.qZA(),e.TgZ(5,"ion-col"),e._uU(6,"STUDENT"),e.qZA(),e._UZ(7,"ion-col"),e.qZA(),e.YNc(8,B,10,3,"ion-row",49),e.qZA()()),2&o){const i=e.oxw(3);e.xp6(8),e.Q6J("ngForOf",i.publicCompetitionEntryAddedList)}}function Q(o,a){if(1&o&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&o){const i=e.oxw(2).index;e.xp6(1),e.Oqu(i+1)}}function k(o,a){if(1&o&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&o){const i=e.oxw().index;e.xp6(1),e.Oqu(i+1)}}function G(o,a){if(1&o&&(e.TgZ(0,"div"),e.YNc(1,Q,2,1,"span",0),e.YNc(2,k,2,1,"span",0),e._uU(3),e._UZ(4,"br"),e.qZA()),2&o){const i=a.$implicit,n=e.oxw(5);e.xp6(1),e.Q6J("ngIf",1===n.newSection.dancetype),e.xp6(1),e.Q6J("ngIf",1!==n.newSection.dancetype),e.xp6(1),e.hij(" : ",n.getStudentNameById(i.uid)," ")}}function K(o,a){if(1&o){const i=e.EpF();e.TgZ(0,"ion-row",50)(1,"ion-col"),e._uU(2),e.qZA(),e.TgZ(3,"ion-col",51),e.YNc(4,G,5,3,"div",52),e.qZA(),e.TgZ(5,"ion-col")(6,"ion-button",53),e.NdJ("click",function(){const s=e.CHM(i).$implicit,c=e.oxw(4);
1return e.KtG(c.removeSyllabusCompetitionRegistrationFromList(s))}),e._UZ(7,"ion-icon",54),e.TgZ(8,"ion-label"),e._uU(9),e.qZA()()()()}if(2&o){const i=a.$implicit,n=e.oxw(4);let t;e.xp6(2),e.Oqu(null==(t=n.getSchoolById(i.schoolid))||null==t.name?null:t.name.toUpperCase()),e.xp6(2),e.Q6J("ngForOf",i.studentidlist),e.xp6(5),e.Oqu(n.translateService.getParsedResult(n.translateService,"REMOVE"))}}function H(o,a){if(1&o&&(e.TgZ(0,"div")(1,"ion-grid",17)(2,"ion-row",18)(3,"ion-col"),e._uU(4,"SCHOOL"),e.qZA(),e.TgZ(5,"ion-col"),e._uU(6,"STUDENT"),e.qZA(),e._UZ(7,"ion-col"),e.qZA(),e.YNc(8,K,10,3,"ion-row",49),e.qZA()()),2&o){const i=e.oxw(3);e.xp6(8),e.Q6J("ngForOf",i.syllabusCompetitionEntryAddedList)}}function j(o,a){if(1&o&&(e.TgZ(0,"div")(1,"div",7)(2,"ion-item",8),e._UZ(3,"ion-icon",9),e.TgZ(4,"ion-label",10)(5,"span"),e._uU(6),e.qZA()()()(),e.TgZ(7,"div",13),e.YNc(8,Y,9,1,"div",0),e.YNc(9,H,9,1,"div",0),e.qZA()()),2&o){const i=e.oxw(2);e.xp6(6),e.AsE(" ",i.translateService.getParsedResult(i.translateService,"REGISTERED")," ",i.translateService.getParsedResult(i.translateService,"ENTRY"),""),e.xp6(2),e.Q6J("ngIf",i.newSection.ispublic),e.xp6(1),e.Q6J("ngIf",!i.newSection.ispublic)}}function $(o,a){if(1&o){const i=e.EpF();e.TgZ(0,"div",6)(1,"div",7)(2,"ion-item",8),e._UZ(3,"ion-icon",9),e.TgZ(4,"ion-label",10)(5,"span"),e._uU(6),e.qZA(),e._uU(7," : "),e.TgZ(8,"span"),e._uU(9),e.qZA()()()(),e.TgZ(10,"div",13),e._UZ(11,"ion-item",27),e.TgZ(12,"ion-item",27)(13,"ion-checkbox",40),e.NdJ("ngModelChange",function(t){e.CHM(i);const s=e.oxw();return e.KtG(s.newSection.ispublic=t)})("ionChange",function(t){e.CHM(i);const s=e.oxw();return e.KtG(s.onPublicChanged(t))}),e._uU(14," Public ***(Unchecked for SYLLABUS) "),e.qZA()(),e.YNc(15,I,4,3,"div",0),e.TgZ(16,"div")(17,"ion-item",27)(18,"ion-select",41),e.NdJ("ionChange",function(t){e.CHM(i);const s=e.oxw();return e.KtG(s.onCategoryChanged(t))})("ngModelChange",function(t){e.CHM(i);const s=e.oxw();return e.KtG(s.newSection.category=t)}),e.YNc(19,R,2,2,"ion-select-option",4),e.qZA()()(),e.YNc(20,M,4,3,"div",0),e.TgZ(21,"div")(22,"ion-item",27)(23,"ion-select",42),e.NdJ("ionChange",function(t){e.CHM(i);const s=e.oxw();return e.KtG(s.onDanceTypeChanged(t))})("ngModelChange",function(t){e.CHM(i);const s=e.oxw();return e.KtG(s.newSection.dancetype=t)}),e.YNc(24,N,2,2,"ion-select-option",4),e.qZA()(),e.TgZ(25,"ion-item",27)(26,"ion-input",43),e.NdJ("ngModelChange",function(t){e.CHM(i);const s=e.oxw();return e.KtG(s.newSection.seconds=t)}),e.qZA()(),e.TgZ(27,"ion-item",27)(28,"ion-input",44),e.NdJ("ngModelChange",function(t){e.CHM(i);const s=e.oxw();return e.KtG(s.newSection.part=t)}),e.qZA()(),e._UZ(29,"ion-item",27),e.qZA(),e.YNc(30,j,10,4,"div",0),e.TgZ(31,"ion-item",27)(32,"ion-button",11),e.NdJ("click",function(){e.CHM(i);const t=e.oxw();return e.KtG(t.cancelAddSection())}),e._UZ(33,"ion-icon",45),e.TgZ(34,"ion-label"),e._uU(35),e.qZA()(),e.TgZ(36,"ion-button",37),e.NdJ("click",function(){e.CHM(i);const t=e.oxw();return e.KtG(t.addNewSection())}),e._UZ(37,"ion-icon",46),e.TgZ(38,"ion-label"),e._uU(39),e.qZA()()(),e._UZ(40,"ion-item",27),e.qZA()()}if(2&o){const i=e.oxw();e.xp6(6),e.hij(" ",i.translateService.getParsedResult(i.translateService,"ADD"),""),e.xp6(3),e.hij(" ",i.translateService.getParsedResult(i.translateService,"SECTION"),""),e.xp6(4),e.Q6J("ngModel",i.newSection.ispublic),e.xp6(2),e.Q6J("ngIf",i.newSection.ispublic),e.xp6(3),e.s9C("label",i.translateService.getParsedResult(i.translateService,"CATEGORY")),e.Q6J("ngModel",i.newSection.category),e.xp6(1),e.Q6J("ngForOf",i.getCategoryList()),e.xp6(1),e.Q6J("ngIf",!i.newSection.ispublic),e.xp6(3),e.s9C("label",i.translateService.getParsedResult(i.translateService,"DANCETYPE")),e.Q6J("ngModel",i.newSection.dancetype),e.xp6(1),e.Q6J("ngForOf",i.getDanceTypeList()),e.xp6(2),e.Q6J("ngModel",i.newSection.seconds),e.xp6(2),e.Q6J("ngModel",i.newSection.part),e.xp6(2),e.Q6J("ngIf",i.publicCompetitionEntryAddedList.length>0||i.syllabusCompetitionEntryAddedList.length>0),e.xp6(5),e.Oqu(i.translateService.getParsedResult(i.translateService,"CANCEL")),e.xp6(4),e.Oqu(i.translateService.getParsedResult(i.translateService,"SUBMIT"))}}function W(o,a){if(1&o&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&o){const i=e.oxw(2).index;e.xp6(1),e.Oqu(i+1)}}function z(o,a){if(1&o&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&o){const i=e.oxw().index;e.xp6(1),e.Oqu(i+1)}}function V(o,a){if(1&o&&(e.TgZ(0,"div"),e.YNc(1,W,2,1,"span",0),e.YNc(2,z,2,1,"span",0),e._uU(3),e._UZ(4,"br"),e.qZA()),2&o){const i=a.$implicit,n=e.oxw(4);e.xp6(1),e.Q6J("ngIf",1===n.newSection.dancetype),e.xp6(1),e.Q6J("ngIf",1!==n.newSection.dancetype),e.xp6(1),e.hij(" : ",n.getStudentNameById(i.uid)," ")}}function X(o,a){if(1&o){const i=e.EpF();e.TgZ(0,"ion-row",50)(1,"ion-col"),e._uU(2),e.qZA(),e.TgZ(3,"ion-col",51),e.YNc(4,V,5,3,"div",52),e.qZA(),e.TgZ(5,"ion-col")(6,"ion-button",55),e.NdJ("click",function(){const s=e.CHM(i).$implicit,c=e.oxw(3);return e.KtG(c.addPublicCompetitionRegistrationToList(s))}),e._UZ(7,"ion-icon",38),e.TgZ(8,"ion-label"),e._uU(9),e.qZA()()()()}if(2&o){const i=a.$implicit,n=e.oxw(3);let t;e.xp6(2),e.Oqu(null==(t=n.getSchoolById(i.schoolid))||null==t.name?null:t.name.toUpperCase()),e.xp6(2),e.Q6J("ngForOf",i.studentidlist),e.xp6(5),e.Oqu(n.translateService.getParsedResult(n.translateService,"ADD"))}}function ee(o,a){if(1&o&&(e.TgZ(0,"div")(1,"ion-grid",17)(2,"ion-row",18)(3,"ion-col"),e._uU(4,"SCHOOL"),e.qZA(),e.TgZ(5,"ion-col"),e._uU(6,"STUDENT"),e.qZA(),e._UZ(7,"ion-col"),e.qZA(),e.YNc(8,X,10,3,"ion-row",49),e.qZA()()),2&o){const i=e.oxw(2);e.xp6(8),e.Q6J("ngForOf",i.getPublicCompetitionRegistrationListFilter())}}function te(o,a){if(1&o&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&o){const i=e.oxw(2).index;e.xp6(1),e.Oqu(i+1)}}function ie(o,a){if(1&o&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&o){const i=e.oxw().index;e.xp6(1),e.Oqu(i+1)}}function ne(o,a){if(1&o&&(e.TgZ(0,"div"),e.YNc(1,te,2,1,"span",0),e.YNc(2,ie,2,1,"span",0),e._uU(3),e._UZ(4,"br"),e.qZA()),2&o){const i=a.$implicit,n=e.oxw(4);e.xp6(1),e.Q6J("ngIf",1===n.newSection.dancetype),e.xp6(1),e.Q6J("ngIf",1!==n.newSection.dancetype),e.xp6(1),e.hij(" : ",n.getStudentNameById(i.uid)," ")}}function oe(o,a){if(1&o){const i=e.EpF();e.TgZ(0,"ion-row",50)(1,"ion-col"),e._uU(2),e.qZA(),e.TgZ(3,"ion-col",51),e.YNc(4,ne,5,3,"div",52),e.qZA(),e.TgZ(5,"ion-col")(6,"ion-button",55),e.NdJ("click",function(){const s=e.CHM(i).$implicit,c=e.oxw(3);
1return e.KtG(c.addSyllabusCompetitionRegistrationToList(s))}),e._UZ(7,"ion-icon",38),e.TgZ(8,"ion-label"),e._uU(9),e.qZA()()()()}if(2&o){const i=a.$implicit,n=e.oxw(3);let t;e.xp6(2),e.Oqu(null==(t=n.getSchoolById(i.schoolid))||null==t.name?null:t.name.toUpperCase()),e.xp6(2),e.Q6J("ngForOf",i.studentidlist),e.xp6(5),e.Oqu(n.translateService.getParsedResult(n.translateService,"ADD"))}}function se(o,a){if(1&o&&(e.TgZ(0,"div")(1,"ion-grid",17)(2,"ion-row",18)(3,"ion-col"),e._uU(4,"SCHOOL"),e.qZA(),e.TgZ(5,"ion-col"),e._uU(6,"STUDENT"),e.qZA(),e._UZ(7,"ion-col"),e.qZA(),e.YNc(8,oe,10,3,"ion-row",49),e.qZA()()),2&o){const i=e.oxw(2);e.xp6(8),e.Q6J("ngForOf",i.getSyllabusCompetitionRegistrationListFilter())}}function ae(o,a){if(1&o&&(e.TgZ(0,"div",6)(1,"div",7)(2,"ion-item",8),e._UZ(3,"ion-icon",9),e.TgZ(4,"ion-label",10)(5,"span"),e._uU(6),e.qZA()()()(),e.TgZ(7,"div",13),e.YNc(8,ee,9,1,"div",0),e.YNc(9,se,9,1,"div",0),e.qZA()()),2&o){const i=e.oxw();e.xp6(6),e.hij(" ",i.translateService.getParsedResult(i.translateService,"AVAILABLEENTRY"),""),e.xp6(2),e.Q6J("ngIf",i.newSection.ispublic),e.xp6(1),e.Q6J("ngIf",!i.newSection.ispublic)}}const ce=function(){return{weekday:"long",year:"numeric",month:"long",day:"numeric",timeZone:"Asia/Bangkok"}},Z=function(){return{hour:"2-digit",minute:"2-digit",timeZone:"Asia/Bangkok"}};let re=(()=>{var o;class a extends f._{constructor(){super(...arguments),this.competitionscheduleId="",this.competitionSchedule=new d.Jc,this.competitionScheduleList=[],this.sessionId="",this.session=new d.gY,this.sectionList=[],this.isShowAddSection=!1,this.newSection=new d.o_,this.categoryList=[],this.danceTypeList=[],this.competitionTypeList=[],this.studentList=new Array,this.publicCompetitionRegistrationList=[],this.publicCompetitionEntryAddedList=[],this.syllabusCompetitionRegistrationList=[],this.syllabusCompetitionEntryAddedList=[],this.allSectionList=[],this.registeredUID=[]}ionViewWillEnter(){super.ionViewWillEnter(),this.appglobalService.currentPage=m.uZ.admincompetitionschedule,this.competitionscheduleId=this.activatedRoute.snapshot.params.competitionscheduleId,this.sessionId=this.activatedRoute.snapshot.params.sessionId,this.fetchCompetitionSchedule(),this.fetchCompetitionScheduleList(),this.fetchSession(),this.fetchSectionList(),this.fetchStudentList(),this.fetchAllSectionList()}fetchCompetitionScheduleList(){this.databaseService.getCompetitionSchedule().snapshotChanges().subscribe(n=>{let t=new Array;n.forEach(s=>{let c=new d.Jc;c={...s.payload.doc.data(),uid:s.payload.doc.id},t.push(c)}),this.competitionScheduleList=t.sort((s,c)=>s.date<c.date?-1:1)})}fetchCompetitionSchedule(){this.databaseService.getCompetitionScheduleById(this.competitionscheduleId).snapshotChanges().subscribe(n=>{let t=new d.Jc;t={...n.payload.data(),uid:n.payload.id},this.competitionSchedule=t})}fetchSession(){this.databaseService.getSessionById(this.sessionId).snapshotChanges().subscribe(n=>{let t=new d.gY;t={...n.payload.data(),uid:n.payload.id},this.session=t})}fetchSectionList(){this.databaseService.getSectionListBySessionId(this.sessionId).snapshotChanges().subscribe(n=>{let t=new Array;n.forEach(s=>{let c=new d.o_;c={...s.payload.doc.data(),uid:s.payload.doc.id},t.push(c)}),this.sectionList=t})}fetchStudentList(){this.databaseService.getRegisteredStudentList().snapshotChanges().subscribe(n=>{let t=new Array;n.forEach(s=>{let c=new d.Z1;c={...s.payload.doc.data(),uid:s.payload.doc.id},c.school!==f.X&&t.push(c)}),this.studentList=t})}fetchAllSectionList(){this.databaseService.getSectionList().snapshotChanges().subscribe(n=>{let t=new Array;n.forEach(s=>{let c=new d.o_;c={...s.payload.doc.data(),uid:s.payload.doc.id},t.push(c)}),this.allSectionList=t,this.fetchRegisteringUID()})}getSortedSection(){return this.sectionList.sort((n,t)=>n.order>t.order?1:-1)}openCompetitionScheduleById(n){this.router.navigate(["/admin/competitionschedule/"+n])}handleReorder(n){console.log("Before complete",this.sectionList),this.sectionList=n.detail.complete(this.sectionList),console.log("After complete",this.sectionList),this.reApplyOrder()}trackItems(n,t){return t}reApplyOrder(){let n=this.sectionList,t=0;
1n.forEach(c=>{t++,c.order=t});let s=new Array;this.sectionList=n,this.sectionList.forEach(c=>{s.push(c.uid),this.databaseService.updateSection(c)}),this.session.sections=s,this.databaseService.updateSession(this.session)}datePickerChanged(n,t){let s=new Date(n.target.value),c=s.getHours(),l=s.getMinutes();if(0==t){let p=this.convertFirebaseDateToDate(this.session.start);p.setHours(c),p.setMinutes(l),this.session.start=p}else{let p=this.convertFirebaseDateToDate(this.session.stop);p.setHours(c),p.setMinutes(l),this.session.stop=p}this.databaseService.updateSession(this.session)}showAddSection(){this.isShowAddSection=!0,this.newSection=new d.o_,this.newSection.competitionScheduleId=this.competitionscheduleId,this.newSection.sessionId=this.sessionId}cancelAddSection(){this.isShowAddSection=!1,this.clearSectionData()}addNewSection(){let n=this.session.sections;this.newSection.order=this.session.sections.length+1,this.newSection.uid=this.databaseService.angularFirestore.collection("sections").doc(this.databaseService.getCurrentYear()).collection("sectionsdata").doc().ref.id,this.newSection.competitionScheduleId=this.competitionscheduleId,this.newSection.sessionId=this.sessionId,this.newSection.ispublic?this.publicCompetitionEntryAddedList.forEach(t=>{this.newSection.entries.push(t.uid)}):this.syllabusCompetitionEntryAddedList.forEach(t=>{this.newSection.entries.push(t.uid)}),this.databaseService.createNewSection(this.newSection),n.push(this.newSection.uid),this.session.sections=n,this.databaseService.updateSession(this.session),this.isShowAddSection=!1,this.clearSectionData()}openSectionById(n){this.router.navigate(["/admin/competitionschedule/"+this.competitionscheduleId+"/"+this.sessionId+"/"+n])}deleteSectionById(n){let t=this.translateService.getParsedResult(this.translateService,"DELETE"),s=this.translateService.getParsedResult(this.translateService,"DOYOUWANTTODELETE");this.alertController.create({header:t,message:s,buttons:[{text:this.translateService.getParsedResult(this.translateService,"CANCEL")},{text:this.translateService.getParsedResult(this.translateService,"OK"),handler:()=>{this.databaseService.deleteSectionById(n),this.session.sections=this.session.sections.filter(c=>c==n),this.databaseService.updateSession(this.session)}}]}).then(c=>c.present())}onPublicChanged(n){this.clearSectionData(),this.categoryList=this.newSection.ispublic?[]:this.recordsService.getSyllabusCategoryList()}onAgeGroupChanged(n){this.clearRegistationList(),this.newSection.agegroup=n.target.value,this.categoryList=this.recordsService.getPublicCategoryListByAgeGroup(this.newSection.agegroup),this.danceTypeList=[]}getCategoryList(){return this.categoryList}onCategoryChanged(n){this.clearRegistationList(),this.newSection.category=n.target.value,this.danceTypeList=[],this.newSection.ispublic?this.danceTypeList=this.recordsService.getPublicDanceTypeByAgeGroupCategory(this.newSection.agegroup,this.newSection.category):this.competitionTypeList=this.recordsService.getSyllabusCompetitionTypeByCategory(this.newSection.category)}getDanceTypeList(){return this.danceTypeList}onDanceTypeChanged(n){this.clearRegistationList(),this.newSection.dancetype=n.target.value;let t=this.danceTypeList.find(s=>s.type==n.target.value);t&&(this.newSection.performid=t.id,this.newSection.seconds=t.maxseconds,this.newSection.ispublic?this.fetchPublicCompetitionRegistration(this.newSection.performid):this.fetchSyllabusCompetitionRegistration(this.newSection.performid))}getCompetitionTypeList(){return this.competitionTypeList}onCompetitionTypeChanged(n){this.clearRegistationList(),this.danceTypeList=this.recordsService.getSyllabusDanceTypeByCategoryCompetitionType(this.newSection.category,this.newSection.competitiontype)}clearSectionData(){this.newSection.agegroup=0,this.newSection.category=0,this.newSection.dancetype=0,this.newSection.performid=0,this.newSection.competitiontype=0,this.newSection.order=0,this.newSection.entries=[],this.newSection.sessionId="",this.newSection.competitionScheduleId="",this.newSection.part="",this.clearRegistationList()}clearRegistationList(){this.publicCompetitionRegistrationList=[],this.publicCompetitionEntryAddedList=[],this.syllabusCompet
1itionRegistrationList=[],this.syllabusCompetitionEntryAddedList=[]}calculateTotalEntry(){let n=0;return this.sectionList.forEach(t=>{n+=t.entries.length}),n}calculateTotalMinutes(){let n=0;return this.sectionList.forEach(t=>{n+=t.seconds*t.entries.length}),n}getMaxMinutes(){return Math.round((this.convertFirebaseDateToDate(this.session.stop).getTime()-this.convertFirebaseDateToDate(this.session.start).getTime())/6e4)}fetchPublicCompetitionRegistration(n){this.databaseService.getPublicCompetitionRegistrationByPerformId(n).snapshotChanges().pipe((0,T.q)(1)).subscribe(t=>{let s=new Array;t.forEach(c=>{let l=new d.ix;l={...c.payload.doc.data(),uid:c.payload.doc.id},l.schoolid!==f.X&&0==l.location&&(this.registeredUID.find(p=>p==l.uid)||s.push(l))}),this.publicCompetitionRegistrationList=s})}fetchSyllabusCompetitionRegistration(n){this.databaseService.getSyllabusCompetitionRegistrationByPerformId(n).snapshotChanges().pipe((0,T.q)(1)).subscribe(t=>{let s=new Array;t.forEach(c=>{let l=new d.I2;l={...c.payload.doc.data(),uid:c.payload.doc.id},l.schoolid!==f.X&&0==l.location&&(this.registeredUID.find(p=>p==l.uid)||s.push(l))}),this.syllabusCompetitionRegistrationList=s})}getStudentNameById(n){let t=this.studentList.find(c=>c.uid==n),s="";return s=t?t.name.toUpperCase()+" "+(t.midname?t.midname.toUpperCase()+" ":"")+t.lastname.toUpperCase():"ERROR:"+n,s}getPublicCompetitionRegistrationListFilter(){let n=this.publicCompetitionRegistrationList;return this.publicCompetitionEntryAddedList.length>0&&this.publicCompetitionEntryAddedList.forEach(t=>{n=n.filter(s=>s.uid!=t.uid)}),n.sort((t,s)=>t.schoolid>s.schoolid?1:-1)}addPublicCompetitionRegistrationToList(n){this.publicCompetitionEntryAddedList.find(t=>t.uid==n.uid)||this.publicCompetitionEntryAddedList.push(n)}removePublicCompetitionRegistrationFromList(n){this.publicCompetitionEntryAddedList=this.publicCompetitionEntryAddedList.filter(t=>t.uid!=n.uid)}getSyllabusCompetitionRegistrationListFilter(){let n=this.syllabusCompetitionRegistrationList;return this.syllabusCompetitionEntryAddedList.length>0&&this.syllabusCompetitionEntryAddedList.forEach(t=>{n=n.filter(s=>s.uid!=t.uid)}),n.sort((t,s)=>t.schoolid>s.schoolid?1:-1)}addSyllabusCompetitionRegistrationToList(n){this.syllabusCompetitionEntryAddedList.find(t=>t.uid==n.uid)||this.syllabusCompetitionEntryAddedList.push(n)}removeSyllabusCompetitionRegistrationFromList(n){this.syllabusCompetitionEntryAddedList=this.syllabusCompetitionEntryAddedList.filter(t=>t.uid!=n.uid)}fetchRegisteringUID(){this.allSectionList.forEach(n=>{n.entries.forEach(t=>{n.agegroup!=d.E3.CHAMPIONSHIP&&this.registeredUID.push(t)})})}getSessionNumberByCompetitionIdAndOrder(n,t){let s=0,c=0;return this.competitionScheduleList.forEach(l=>{let p=0;l.sessions.forEach(()=>{p++,c++,l.uid!=n||p!=t||(s=c)})}),s}}return(o=a).\u0275fac=function(){let i;return function(t){return(i||(i=e.n5z(o)))(t||o)}}(),o.\u0275cmp=e.Xpm({type:o,selectors:[["ng-component"]],standalone:!0,features:[e.qOj,e.jDz],decls:75,vars:32,consts:[[4,"ngIf"],["lines","none",1,"toolbar-language"],["name","globe-outline","slot","start",2,"margin","0","padding-left","20px"],["slot","start","placeholder","Select Language","label","",3,"ngModel","ionChange","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[2,"clear","both"],[1,"content-wrapper"],[1,"content-header"],[1,"content-header-item"],["name","school-outline",1,"content-header-icon"],[1,"content-header-text"],["slot","end","color","danger",3,"click"],["name","arrow-back-outline"],[1,"content-detail"],["labelPlacement","fixed","label","Start Time",1,"datetime-input",3,"id","value"],[3,"trigger"],["labelPlacement","fixed","label","End Time",1,"datetime-input",3,"id","value"],[1,"content-detail-grid"],["color","light",1,"content-detail-grid-row-header"],["size","1"],["size","3"],["size","2"],["name","hammer-outline",1,"content-tools-icon"],["size","0.5"],[3,"disabled","ionItemReorder"],["class","content-detail-grid-row",4,"ngFor","ngForOf"],[1,"content-detail-grid-row-header"],["lines","none"],["slot","end","color","success",3,"click",4,"ngIf"],["slot","end","color","success","disabled","true",4,"ngIf"],["class","content-wrapper",4,"ngIf"],[3,"value"],["presentation","time",3,"showDefaultButtons","ionChange","value"],[1,"content-detail-grid-row"],["size","3",4,"ngIf"],["shape","round",1,"content-detail-grid-button",3,"title","click"],["shape","round","color","danger",1,"content-detail-grid-button",3,"title","click"],["slot","end","color","success",3,"click"],["name","add-outline"],["slot","end","color","success","disabled","true"],["slot","start","labelPlacement","start",3,"ngModel","ngModelChange","ionChange"],["placeholder","Select Category",3,"ngModel","label","ionChange","ngModelChange"],["placeholder","Select Type",3,"ngModel","label","ionChange","ngModelChange"],["label","Seconds per entry","type","number","placeholder","000","disabled","true",2,"text-align","right",3,"ngModel","ngModelChange"],["label","Part","placeholder","**Not required** example: 'PART 1'",2,"text-align","right",3,"ngModel","ngModelChange"],["name","close-outline"],["name","checkmark-outline"],["placeholder","Select Age Group",3,"ngModel","label","ionChange","ngModelChange"],["placeholder","Select Competition",3,"ngModel","label","ionChange","ngModelChange"],["class","content-detail-grid-row-multiline ion-align-items-start",4,"ngFor","ngForOf"],[1,"content-detail-grid-row-multiline","ion-align-items-start"],[2,"text-align","left"],[4,"ngFor","ngForOf"],["color","danger",3,"click"],["name","remove-outline"],["color","success",3,"click"]],template:function(n,t){1&n&&(e.TgZ(0,"ion-header")(1,"ion-toolbar")(2,"ion-title"),e.YNc(3,u,2,1,"span",0),e.TgZ(4,"span"),e._uU(5),e.qZA(),e.TgZ(6,"ion-item",1),e._UZ(7,"ion-icon",2),e.TgZ(8,"ion-select",3),e.NdJ("ionChange",function(c){return t.onLanguageChanged(c)})("ngModelChange",function(c){return t.currentLangauge=c}),e.YNc(9,g,2,2,"ion-select-option",4),e.qZA()(),e._UZ(10,"div",5),e.qZA()()(),e.TgZ(11,"ion-content")(12,"div",6)(13,"div",7)(14,"ion-item",8),e._UZ(15,"ion-icon",9),e.TgZ(16,"ion-label",10)(17,"span"),e._uU(18),e.qZA(),e._uU(19),e.qZA(),e.TgZ(20,"ion-button",11),e.NdJ("click",function(){return t.openCompetitionScheduleById(t.competitionscheduleId)}),e._UZ(21,"ion-icon",12),e.TgZ(22,"ion-label"),e._uU(23),e.qZA()()()(),e.TgZ(24,"div",13)(25,"ion-grid")(26,"ion-row")(27,"ion-col")(28,"ion-item"),e._UZ(29,"ion-input",14),e.TgZ(30,"ion-popover",15),e.YNc(31,v,1,1,"ng-template"),e.qZA()()(),e.TgZ(32,"ion-col")(33,"ion-item"),e._UZ(34,"ion-input",16),e.TgZ(35,"i
1on-popover",15),e.YNc(36,h,1,1,"ng-template"),e.qZA()()()()(),e.TgZ(37,"ion-grid",17)(38,"ion-row",18)(39,"ion-col",19),e._uU(40),e.qZA(),e.TgZ(41,"ion-col",20),e._uU(42),e.qZA(),e.TgZ(43,"ion-col",20),e._uU(44),e.qZA(),e.TgZ(45,"ion-col",19),e._uU(46),e.qZA(),e.TgZ(47,"ion-col"),e._uU(48),e.qZA(),e.TgZ(49,"ion-col"),e._uU(50),e.qZA(),e.TgZ(51,"ion-col",21),e._UZ(52,"ion-icon",22),e.qZA(),e._UZ(53,"ion-col",23),e.qZA(),e.TgZ(54,"ion-reorder-group",24),e.NdJ("ionItemReorder",function(c){return t.handleReorder(c)}),e.YNc(55,L,20,12,"ion-row",25),e.qZA(),e.TgZ(56,"ion-row",26),e._UZ(57,"ion-col",19)(58,"ion-col",20)(59,"ion-col",20),e.TgZ(60,"ion-col",19),e._uU(61),e.qZA(),e.TgZ(62,"ion-col"),e._uU(63),e.qZA(),e.TgZ(64,"ion-col"),e._uU(65),e.qZA(),e.TgZ(66,"ion-col",21),e._uU(67),e.qZA(),e._UZ(68,"ion-col",23),e.qZA()(),e.TgZ(69,"ion-item",27),e.YNc(70,E,4,2,"ion-button",28),e.YNc(71,U,4,2,"ion-button",29),e.qZA(),e._UZ(72,"ion-item",27),e.qZA()(),e.YNc(73,$,41,16,"div",30),e.YNc(74,ae,10,3,"div",30),e.qZA()),2&n&&(e.xp6(3),e.Q6J("ngIf",t.isAdmin()),e.xp6(2),e.hij(" ",t.translateService.getParsedResult(t.translateService,"COMPETITIONS"),""),e.xp6(3),e.Q6J("ngModel",t.currentLangauge),e.xp6(1),e.Q6J("ngForOf",t.appglobalService.getLanguageSupportList()),e.xp6(9),e.Oqu(t.convertFirebaseDateToDate(t.competitionSchedule.date).toLocaleDateString("en-us",e.DdM(29,ce))),e.xp6(1),e.hij(" : Session ",t.getSessionNumberByCompetitionIdAndOrder(t.competitionSchedule.uid,t.session.order)," "),e.xp6(4),e.Oqu(t.translateService.getParsedResult(t.translateService,"BACK")),e.xp6(6),e.s9C("id",t.sessionId+"_starttime"),e.s9C("value",t.convertFirebaseDateToDate(t.session.start).toLocaleTimeString("en-us",e.DdM(30,Z))),e.xp6(1),e.s9C("trigger",t.sessionId+"_starttime"),e.xp6(4),e.s9C("id",t.sessionId+"_endtime"),e.s9C("value",t.convertFirebaseDateToDate(t.session.stop).toLocaleTimeString("en-us",e.DdM(31,Z))),e.xp6(1),e.s9C("trigger",t.sessionId+"_endtime"),e.xp6(5),e.hij("",t.translateService.getParsedResult(t.translateService,"Section")," No#"),e.xp6(2),e.Oqu(t.translateService.getParsedResult(t.translateService,"CATEGORY")),e.xp6(2),e.Oqu(t.translateService.getParsedResult(t.translateService,"AGEGROUP/SYLLABUS")),e.xp6(2),e.Oqu(t.translateService.getParsedResult(t.translateService,"PART")),e.xp6(2),e.Oqu(t.translateService.getParsedResult(t.translateService,"ENTRY")),e.xp6(2),e.Oqu(t.translateService.getParsedResult(t.translateService,"MINUTES")),e.xp6(4),e.Q6J("disabled",!1),e.xp6(1),e.Q6J("ngForOf",t.getSortedSection()),e.xp6(6),e.Oqu(t.translateService.getParsedResult(t.translateService,"TOTAL")),e.xp6(2),e.Oqu(t.calculateTotalEntry()),e.xp6(2),e.hij("",t.getMinuteFormat(t.calculateTotalMinutes())," "),e.xp6(2),e.hij(" from ",t.getMaxMinutes()," minute(s)"),e.xp6(3),e.Q6J("ngIf",!t.isShowAddSection),e.xp6(1),e.Q6J("ngIf",t.isShowAddSection),e.xp6(2),e.Q6J("ngIf",t.isShowAddSection),e.xp6(1),e.Q6J("ngIf",t.isShowAddSection&&(t.getPublicCompetitionRegistrationListFilter().length>0||t.getSyllabusCompetitionRegistrationListFilter().length>0)))},dependencies:[r.Pc,r.YG,r.nz,r.wI,r.W2,r.x4,r.jY,r.Gu,r.gu,r.pK,r.Ie,r.Q$,r.Nh,r.oz,r.Nd,r.t9,r.n0,r.wd,r.sr,r.d8,r.w,r.as,r.QI,r.j9,x.ez,x.sg,x.O5,S.u5,S.JJ,S.On]}),a})()},6686:(A,C,_)=>{_.d(C,{X:()=>T,_:()=>f});var x=_(1253),S=_(4457),r=_(4650);const T="uBaz7ieEwAgtktSYw3Sb";let f=(()=>{var m;class d extends x.A{constructor(){super(...arguments),this.schoolList=[],this.schoolRegistrationList=[]}ionViewWillEnter(){super.ionViewWillEnter(),this.databaseService.getSchoolList().snapshotChanges().subscribe(u=>{let g=new Array;u.forEach(v=>{let h=new S.W2;h={...v.payload.doc.data(),uid:v.payload.doc.id},h.uid!==T&&g.push(h)}),this.schoolList=g}),this.databaseService.getSchoolRegistrationList().snapshotChanges().subscribe(u=>{let g=new Array;u.forEach(v=>{let h=new S.Fx;h={...v.payload.doc.data(),uid:v.payload.doc.id},h.uid!==T&&g.push(h)}),this.schoolRegistrationList=g})}getSchoolById(u){return this.schoolList.find(g=>g.uid==u)}getSchoolRegistrationById(u){return this.schoolRegistrationList.find(g=>g.uid==u)||new S.Fx}openAdminRecords(){this.router.navigate(["/admin/records"])}openUsermanagement(){this.router.navigate(["/admin/usermanagement"])}openSchoolById(u){this.router.navigate(["/admin/school/"+u])}openAdminAllStudent(u){this.router.navigate(["/admin/allstudent/"+(u?"1":"0")])}openAdminAllStudentIdf(){this.router.navigate(["/admin/allstudent/2"])}openAdminAllStudentList(){this.router.navigate(["/admin/allstudent/3"])}openPhotographerAllStudent(){this.router.navigate(["/photographer/allstudent"])}openAdminAllTeacher(){this.router.navigate(["/admin/allteacher"])}openAdminAllHelper(){this.router.navigate(["/admin/allhelper"])}openAdminDownload(){this.router.navigate(["/admin/download"])}openAdminCompetitionSchedule(){this.router.navigate(["/admin/competitionschedule"])}openAdminCompetitionScheduleTable(){this.router.navigate(["/admin/competitionscheduletable"])}openAdminFilmingCompetition(){this.router.navigate(["/admin/competitionfilming"])}openAdminPublicSoloRanking(){this.router.navigate(["/admin/publicsoloranking"])}openAdminPublicDuoRanking(){this.router.navigate(["/admin/publicduoranking"])}openAdminSyllabusRanking(){this.router.navigate(["/admin/syllabusranking"])}openAdminPublicSchoolRanking(){this.router.navigate(["/admin/publicschoolranking"])}openAdminPublicGroupRanking(){this.router.navigate(["/admin/publicgroupranking"])}openAdminSyllabusSchoolRanking(){this.router.navigate(["/admin/syllabusschoolranking"])}}return(m=d).\u0275fac=function(){let e;return function(g){return(e||(e=r.n5z(m)))(g||m)}}(),m.\u0275cmp=r.Xpm({type:m,selectors:[["app-admin"]],features:[r.qOj],decls:0,vars:0,template:function(u,g){},encapsulation:2}),d})()}}]);
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.