1"use strict";(self.webpackChunkabem=self.webpackChunkabem||[]).push([[72],{80072(T,C,d){var f=d(29293).default,E=this&&this.__createBinding||(Object.create?function(a,i,t,o){void 0===o&&(o=t);var n=Object.getOwnPropertyDescriptor(i,t);(!n||("get"in n?!i.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return i[t]}}),Object.defineProperty(a,o,n)}:function(a,i,t,o){void 0===o&&(o=t),a[o]=i[t]}),x=this&&this.__setModuleDefault||(Object.create?function(a,i){Object.defineProperty(a,"default",{enumerable:!0,value:i})}:function(a,i){a.default=i}),u=this&&this.__importStar||function(){var a=function(i){return(a=Object.getOwnPropertyNames||function(t){var o=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(o[o.length]=n);return o})(i)};return function(i){if(i&&i.__esModule)return i;var t={};if(null!=i)for(var o=a(i),n=0;n<o.length;n++)"default"!==o[n]&&E(t,i,o[n]);return x(t,i),t}}();Object.defineProperty(C,"__esModule",{value:!0}),C.BookComponent=void 0;const s=d(89377),S=d(41853),b=d(55624),h=d(14765),g=d(60177),p=d(84341),_=d(61122),m=d(11020),c=d(81783),M=d(25874),B=d(29997),I=d(13345),k=d(75506),e=u(d(49849)),F=u(d(37554)),z=u(d(32994)),V=u(d(7901)),A=u(d(39078)),W=u(d(70337)),j=u(d(30489)),L=u(d(70226)),O=u(d(60177)),w=u(d(84341)),N=u(d(61122)),H=u(d(5779)),R=u(d(81783)),D=u(d(25874)),q=u(d(29997)),Q=u(d(13345)),U=u(d(75506)),P=()=>({height:"280px"}),G=a=>({"btn-primary":a}),y=(a,i)=>i.id;function J(a,i){if(1&a&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275element(1,"li",24),e.\u0275\u0275elementContainerEnd()),2&a){const t=i.$implicit;e.\u0275\u0275advance(),e.\u0275\u0275property("innerHtml",t.resposta,e.\u0275\u0275sanitizeHtml)}}function K(a,i){if(1&a&&(e.\u0275\u0275elementStart(0,"section",19)(1,"div",21)(2,"h1",22),e.\u0275\u0275text(3),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(4,"div",23)(5,"br"),e.\u0275\u0275elementStart(6,"ol"),e.\u0275\u0275element(7,"li",24),e.\u0275\u0275template(8,J,2,1,"ng-container",25),e.\u0275\u0275elementEnd()()()),2&a){const t=i.$implicit,o=i.index;e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate2("Quest\xe3o ",o+1," - ",t.area),e.\u0275\u0275advance(),e.\u0275\u0275property("innerHtml",t.enunciado,e.\u0275\u0275sanitizeHtml),e.\u0275\u0275advance(3),e.\u0275\u0275property("innerHtml",t.correta.resposta,e.\u0275\u0275sanitizeHtml),e.\u0275\u0275advance(),e.\u0275\u0275property("ngForOf",t.incorretas)}}function $(a,i){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"button",26),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const n=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(n.show_dialog=!1)}),e.\u0275\u0275text(1,"Cancelar"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(2,"button",27),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const n=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(n.finish())}),e.\u0275\u0275text(3,"Encerrar sele\xe7\xe3o de quest\xf5es"),e.\u0275\u0275elementEnd()}if(2&a){const t=e.\u0275\u0275nextContext();e.\u0275\u0275advance(2),e.\u0275\u0275property("disabled",t.TOTAL_QUESTOES!=t.total_selecionadas)("ngClass",e.\u0275\u0275pureFunction1(2,G,t.TOTAL_QUESTOES==t.total_selecionadas))}}function X(a,i){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",6)(1,"label"),e.\u0275\u0275text(2),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(3,"p-editor",28),e.\u0275\u0275twoWayListener("ngModelChange",function(n){const r=e.\u0275\u0275restoreView(t).$implicit;return e.\u0275\u0275twoWayBindingSet(r.resposta,n)||(r.resposta=n),e.\u0275\u0275resetView(n)}),e.\u0275\u0275elementEnd()()}if(2&a){const t=i.$implicit,o=i.index;e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate1("Resposta incorreta ",o+1," (N\xe3o informar a letra da alternativa, ser\xe1 gerada automaticamente)"),e.\u0275\u0275advance(),e.\u0275\u0275styleMap(e.\u0275\u0275pureFunction0(6,P)),e.\u0275\u0275property("name",e.\u0275\u0275interpolate1("incorreta",o)),e.\u0275\u0275twoWayProperty("ngModel",t.resposta)}}function Y(a,i){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"button",26),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const n=e.\u0275\u0275nextContext();
1return e.\u0275\u0275resetView(n.show_edit=!1)}),e.\u0275\u0275text(1,"Cancelar"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(2,"button",26),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const n=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(n.save())}),e.\u0275\u0275text(3,"Salvar altera\xe7\xf5es"),e.\u0275\u0275elementEnd()}}function Z(a,i){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",30)(1,"label"),e.\u0275\u0275text(2),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(3,"p-multiSelect",34),e.\u0275\u0275twoWayListener("ngModelChange",function(n){e.\u0275\u0275restoreView(t);const r=e.\u0275\u0275nextContext().$implicit,l=e.\u0275\u0275nextContext(2);return e.\u0275\u0275twoWayBindingSet(l.filtros[r.id],n)||(l.filtros[r.id]=n),e.\u0275\u0275resetView(n)}),e.\u0275\u0275elementEnd()()}if(2&a){const t=e.\u0275\u0275nextContext().$implicit,o=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(t.title),e.\u0275\u0275advance(),e.\u0275\u0275property("name",e.\u0275\u0275interpolate1("campo-",t.id))("options",t.options),e.\u0275\u0275twoWayProperty("ngModel",o.filtros[t.id])}}function ee(a,i){if(1&a&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275template(1,Z,4,5,"div",33),e.\u0275\u0275elementContainerEnd()),2&a){const t=i.$implicit;e.\u0275\u0275advance(),e.\u0275\u0275property("ngIf",t.used)}}function te(a,i){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275elementStart(1,"h5"),e.\u0275\u0275text(2," Filtros "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(3,"div",29)(4,"div",30)(5,"label"),e.\u0275\u0275text(6,"Exibir quest\xf5es"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(7,"p-select",31),e.\u0275\u0275twoWayListener("ngModelChange",function(n){e.\u0275\u0275restoreView(t);const r=e.\u0275\u0275nextContext();return e.\u0275\u0275twoWayBindingSet(r.show_selected,n)||(r.show_selected=n),e.\u0275\u0275resetView(n)}),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(8,"div",30)(9,"label"),e.\u0275\u0275text(10,"Matriz"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(11,"p-select",32),e.\u0275\u0275twoWayListener("ngModelChange",function(n){e.\u0275\u0275restoreView(t);const r=e.\u0275\u0275nextContext();return e.\u0275\u0275twoWayBindingSet(r.show_metadata,n)||(r.show_metadata=n),e.\u0275\u0275resetView(n)}),e.\u0275\u0275elementEnd()(),e.\u0275\u0275template(12,ee,2,1,"ng-container",25),e.\u0275\u0275elementStart(13,"div",30)(14,"button",13),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const n=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(n.filter_questoes())}),e.\u0275\u0275text(15," Filtrar "),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementContainerEnd()}if(2&a){const t=e.\u0275\u0275nextContext();e.\u0275\u0275advance(7),e.\u0275\u0275property("options",t.show_selected_options),e.\u0275\u0275twoWayProperty("ngModel",t.show_selected),e.\u0275\u0275advance(4),e.\u0275\u0275property("options",t.show_metadata_options),e.\u0275\u0275twoWayProperty("ngModel",t.show_metadata),e.\u0275\u0275advance(),e.\u0275\u0275property("ngForOf",t.area.metadata)}}function ne(a,i){1&a&&e.\u0275\u0275element(0,"i",42)}function oe(a,i){1&a&&e.\u0275\u0275element(0,"i",43)}function ae(a,i){if(1&a&&(e.\u0275\u0275elementStart(0,"p-card")(1,"strong"),e.\u0275\u0275text(2),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(3,"br"),e.\u0275\u0275text(4),e.\u0275\u0275elementEnd()),2&a){const t=i.$implicit;e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(t.title),e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate1(" ",t.options," ")}}function ie(a,i){if(1&a&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275element(1,"div",40),e.\u0275\u0275elementContainerEnd()),2&a){const t=i.$implicit;e.\u0275\u0275advance(),e.\u0275\u0275property("innerHtml",t.resposta,e.\u0275\u0275sanitizeHtml)}}function re(a,i){if(1&a&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275elementStart(1,"h1",22),e.\u0275\u0275text(2,"Alternativa Correta:"),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(3,"div",40),e.\u0275\u0275elementStart(4,"h1",22),e.\u0275\u0275text(5,"Alternativas Incorretas:"),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(6,ie,2,1,"ng-container",25),e.\u0275\u0275element(7,"hr"),e.\u0275\u0275elementStart(8,"h1",22),e.\u0275\u0275text(9,"Gabarito Comentado:"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(10,"div",44),e.\u0275\u0275text(11),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(12,"h1",22),e.\u0275\u0275text(13,"Refer\xeancia Bibliogr\xe1fica:"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(14,"div",44),e.\u0275\u0275text(15),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(16,"h1",22),e.\u0275\u0275text(17,"Comentario Norteador:"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(18,"div",45),e.\u0275\u0275text(19),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(2
10,"hr"),e.\u0275\u0275elementStart(21,"h1",22),e.\u0275\u0275text(22,"Dados do Colaborador:"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(23,"div",35)(24,"div",39)(25,"span"),e.\u0275\u0275text(26),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(27,"span"),e.\u0275\u0275text(28),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementContainerEnd()),2&a){const t=e.\u0275\u0275nextContext().$implicit;e.\u0275\u0275advance(3),e.\u0275\u0275property("innerHtml",t.correta.resposta,e.\u0275\u0275sanitizeHtml),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngForOf",t.incorretas),e.\u0275\u0275advance(5),e.\u0275\u0275textInterpolate1(" ",t.gabarito," "),e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate1(" ",t.bibliografia," "),e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate1(" ",t.comentario," "),e.\u0275\u0275advance(7),e.\u0275\u0275textInterpolate1("Nome: ",t.usuario),e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate1("Institui\xe7\xe3o: ",t.instituicao)}}function le(a,i){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"button",13),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const n=e.\u0275\u0275nextContext(2).$implicit,r=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(r.select(n))}),e.\u0275\u0275text(1," Aprovar para essa edi\xe7\xe3o "),e.\u0275\u0275elementEnd()}}function se(a,i){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"button",48),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const n=e.\u0275\u0275nextContext(2).$implicit,r=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(r.remove(n))}),e.\u0275\u0275text(1," Remover "),e.\u0275\u0275elementEnd()}}function de(a,i){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",41)(1,"button",13),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const n=e.\u0275\u0275nextContext(),r=n.$implicit,l=n.$index,v=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(v.edit(r,l))}),e.\u0275\u0275text(2," Editar "),e.\u0275\u0275elementEnd(),e.\u0275\u0275conditionalCreate(3,le,2,0,"button",46)(4,se,2,0,"button",47),e.\u0275\u0275elementEnd()}if(2&a){const t=e.\u0275\u0275nextContext().$implicit;e.\u0275\u0275advance(3),e.\u0275\u0275conditional(t.selected?4:3)}}function ce(a,i){if(1&a){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"section",19)(1,"div",21)(2,"div",35)(3,"h1",22),e.\u0275\u0275text(4,"Informa\xe7\xf5es:"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(5,"button",36),e.\u0275\u0275listener("click",function(){const n=e.\u0275\u0275restoreView(t).$implicit;return e.\u0275\u0275resetView(n.exibir=!n.exibir)}),e.\u0275\u0275template(6,ne,1,0,"i",37)(7,oe,1,0,"i",38),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(8,"div",35)(9,"span"),e.\u0275\u0275text(10),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(11,"span"),e.\u0275\u0275text(12),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(13,"span"),e.\u0275\u0275text(14),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(15,"span"),e.\u0275\u0275text(16," Status: "),e.\u0275\u0275elementStart(17,"strong"),e.\u0275\u0275text(18,"Aprovada"),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275element(19,"hr"),e.\u0275\u0275elementStart(20,"h1",22),e.\u0275\u0275text(21,"Matriz:"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(22,"div",39),e.\u0275\u0275repeaterCreate(23,ae,5,2,"p-card",null,y),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(25,"h1",22),e.\u0275\u0275text(26,"Enunciado da Quest\xe3o:"),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(27,"div",40),e.\u0275\u0275template(28,re,29,7,"ng-container",16),e.\u0275\u0275conditionalCreate(29,de,5,1,"div",41),e.\u0275\u0275elementEnd()()}if(2&a){const t=i.$implicit,o=e.\u0275\u0275nextContext();e.\u0275\u0275advance(6),e.\u0275\u0275property("ngIf",!t.exibir),e.\u0275\u0275advance(),e.\u0275\u0275property("ngIf",t.exibir),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",t.id_sequencial," "),e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate1(" Utilizada em ",t.total," edi\xe7\xf5es do Teste de Progresso "),e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate1(" \xcdndice de Acerto: ",t.indice," "),e.\u0275\u0275advance(9),e.\u0275\u0275repeater(t.metadata),e.\u0275\u0275advance(4),e.\u0275\u0275property("innerHtml",t.enunciado,e.\u0275\u0275sanitizeHtml),e.\u0275\u0275advance(),e.\u0275\u0275property("ngIf",t.exibir),e.\u0275\u0275advance(),e.\u0275\u0275conditional(o.coordenador?29:-1)}}
1function me(a,i){if(1&a&&(e.\u0275\u0275elementStart(0,"li",52),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&a){const t=e.\u0275\u0275nextContext().$implicit,o=e.\u0275\u0275nextContext(4);e.\u0275\u0275property("ngClass",o.status(t)),e.\u0275\u0275advance(),e.\u0275\u0275textInterpolate4(" ",t.selected," de ",t.minimum," a ",t.maximum," - ",t.title," ")}}function pe(a,i){1&a&&e.\u0275\u0275conditionalCreate(0,me,2,5,"li",52),2&a&&e.\u0275\u0275conditional(i.$implicit.maximum?0:-1)}function ue(a,i){if(1&a&&(e.\u0275\u0275elementStart(0,"div")(1,"h3",50),e.\u0275\u0275text(2),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(3,"ul"),e.\u0275\u0275repeaterCreate(4,pe,1,1,null,null,y),e.\u0275\u0275elementEnd()()),2&a){const t=e.\u0275\u0275nextContext().$implicit;e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(t.title),e.\u0275\u0275advance(2),e.\u0275\u0275repeater(t.options)}}function _e(a,i){1&a&&e.\u0275\u0275conditionalCreate(0,ue,6,1,"div"),2&a&&e.\u0275\u0275conditional(i.$implicit.used?0:-1)}function ge(a,i){if(1&a&&(e.\u0275\u0275elementStart(0,"div",20)(1,"div",49)(2,"h2",50),e.\u0275\u0275text(3,"Blueprint"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(4,"h3",50),e.\u0275\u0275text(5),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(6,"hr"),e.\u0275\u0275elementStart(7,"section",51),e.\u0275\u0275repeaterCreate(8,_e,1,1,null,null,y),e.\u0275\u0275elementEnd()()()),2&a){const t=e.\u0275\u0275nextContext();e.\u0275\u0275advance(5),e.\u0275\u0275textInterpolate1(" Quest\xf5es selecionadas: ",t.total),e.\u0275\u0275advance(3),e.\u0275\u0275repeater(t.area.metadata)}}let fe=(()=>{class a{api;progresso;route;modal;service;error;loading;changes;questoes;selected_area;areas;matriz;exibir;prova;coordenador;provas;total;show_dialog;selecionadas;total_selecionadas;dialog_header;filtros;show_selected;show_selected_options;show_edit;show_metadata;show_metadata_options;model;edit_user;edit_index;LIMITE_AREA=40;TOTAL_QUESTOES=120;area;constructor(t,o,n,r,l,v,he,Ce){this.api=t,this.progresso=o,this.route=n,this.modal=r,this.service=l,this.error=v,this.loading=he,this.changes=Ce,this.show_selected_options=[new h.ModelItem(null,"Todas"),new h.ModelItem(!0,"Apenas selecionadas"),new h.ModelItem(!1,"Apenas n\xe3o selecionadas")],this.show_metadata_options=[new h.ModelItem(!1,"Ocultar quest\xf5es sem dados"),new h.ModelItem(!0,"Exibir todas as quest\xf5es")]}ngOnInit(){this.model=new b.Questao,this.selected_area=0,this.show_selected=null,this.show_metadata=!1,this.filtros={};let t=this.route.snapshot.params.id;this.areas=[],this.progresso.prova(t).then(o=>{this.prova=o,this.progresso.matrizes(this.prova.matriz).then(n=>{this.matriz=n;let r=[new h.ModelItem(0,"Selecione:")];for(let l of this.matriz.areas)r.push(new h.ModelItem(l.id,l.title));this.areas=r})}),this.total=0}load_dialog(){var t=this;return f(function*(){t.loading.start();
1try{let o=yield t.service.selected(t.prova.id);t.selecionadas=yield t.progresso.convert_api(o.results),t.total_selecionadas=o.total,t.show_dialog=!0,t.dialog_header="Quest\xf5es selecionadas: "+t.total_selecionadas}catch{}t.loading.end()})()}finish(){if(!this.check_areas())return!1;let t=this.modal.open(S.ConfirmModalComponent);t.componentInstance.destructive=!1,t.componentInstance.title="Aten\xe7\xe3o!",t.componentInstance.text="Confirma a sele\xe7\xe3o das quest\xf5es? <br/>Essa decis\xe3o \xe9 definitiva e a prova ser\xe1 gerada com as quest\xf5es presentes neste caderno.",t.componentInstance.color(),t.result.then(()=>{this.service.finish(this.prova.id).catch(o=>{this.error.open_modal(o)})})}check_areas(){let t={};for(let n=0;n<this.selecionadas.length;n++)void 0!==t[this.selecionadas[n].area]?t[this.selecionadas[n].area]++:t[this.selecionadas[n].area]=1;let o=Object.keys(t);for(let[n,r]of Object.entries(t))if(console.log(n,r),r>this.LIMITE_AREA)return this.modal.open(s.AlertModalComponent).componentInstance.error("O limite de quest\xf5es selecionadas para a \xe1rea "+n+" foi atingido"),!1;return console.log(t,o),!0}info(t){for(let o of this.area.metadata)if(o.id==t.metadata_id)for(let n of o.options)if(n.id==t.metadata_option_id)return n.title;return"N\xe3o encontrado"}prepare_matriz(){var t=this;return f(function*(){for(let o of t.area.metadata){let n=[];for(let r of o.options){r.maximum&&n.push(r),r.selected=0;for(let l of t.exibir)if(l.selected)for(let v of l.matriz)if(v.metadata_id==o.id&&v.metadata_option_id==r.id)return void r.selected++}o.options=n}})()}status(t){return t.selected>t.maximum||t.selected<t.minimum?"over":"ok"}selecionar(t){t.selected=!t.selected;let o=1;t.selected||(o=-1),this.total+=o;for(let n of this.area.metadata)for(let r of t.matriz)if(r.metadata_id==n.id)for(let l of n.options)if(l.id===r.metadata_option_id){l.selected+=o;break}}load_questoes(){var t=this;if(this.filtros={},0!=this.selected_area){for(let n of this.matriz.areas)if(n.id==this.selected_area){this.area=n;break}this.loading.start(),this.api.recover("progresso/questoes/:area/caderno/:prova",{area:this.selected_area,prova:this.prova.id}).subscribe(function(){var n=f(function*(r){let l=new b.PerfisAvaliadores;t.coordenador=r.perfil%l.COORDENADOR==0,yield t.convert_api(r.questoes),t.filter_questoes(),t.loading.end()});return function(r){return n.apply(this,arguments)}}())}else this.exibir=[]}filter_questoes(){this.exibir=this.questoes.filter(t=>{let o=!0;switch(this.show_selected){case!0:o=t.selected;break;case!1:o=!t.selected}if(0===t.matriz.length)return o=o&&this.show_metadata,o;for(let n of t.matriz){let r=!0;if(this.filtros[n.metadata_id]&&this.filtros[n.metadata_id].length>0){r=!1;for(let l of this.filtros[n.metadata_id])r=r||l==n.metadata_option_id}o=o&&r}return o}),this.changes.detectChanges()}convert_api(t){var o=this;return f(function*(){let n=yield o.progresso.convert_api(t);o.exibir=n,o.questoes=JSON.parse(JSON.stringify(n)),o.prepare_matriz(),o.total_selecionados()})()}total_selecionados(){var t=this;return f(function*(){t.total=0,yield t.exibir.forEach(o=>{o.selected&&t.total++})})()}select(t){var o=this;return f(function*(){if(o.total>=o.LIMITE_AREA)o.modal.open(s.AlertModalComponent).componentInstance.error("O limite de quest\xf5es selecionadas para essa \xe1rea foi atingido");else try{yield o.service.select(t.id,o.prova.id),o.selecionar(t)}catch(n){o.error.open_modal(n)}})()}remove(t){var o=this;return f(function*(){try{yield o.service.remove(t.id,o.prova.id),o.selecionar(t)}catch(n){o.error.open_modal(n)}})()}copy_json(){var t=this;return f(function*(){navigator.clipboard.writeText(JSON.stringify(t.selecionadas))})()}edit(t,o){this.model.id=t.id,this.model.questao=t.enunciado,this.model.alternativas={correta:{...t.correta},incorretas:[...t.incorretas]},this.model.gabarito=t.gabarito,this.model.bibliografia=t.bibliografia,this.edit_user=t.user_id,this.edit_index=o,this.show_edit=!0}save(){console.log(this.model.get_values()),this.loading.start(),this.api.update("progresso/caderno/:prova/:id/:user_id",{id:this.model.id,prova:this.prova.id,user_id:this.edit_user,questao:{questao:this.model.questao,comentario:this.model.comentario,bibliografia:this.model.bibliografia,gabarito:this.model.gabarito,alternativas:this.model.alternativas}}).subscribe(t=>{this.modal.open(s.AlertModalComponent).componentInstance.success(t.message);let n=this.exibir[this.edit_index];n.enunciado=this.model.questao,n.correta=this.model.alternativas.correta,n.incorretas=this.model.alternativas.incorretas,n.gabarito=this.model.gabarito,n.bibliografia=this.model.bibliografia,this.show_edit=!1,this.loading.end()},t=>{this.modal.open(s.AlertModalComponent).componentInstance.error(t.error.message),this.loading.end()})}static \u0275fac=function(o){return new(o||a)(e.\u0275\u0275directiveInject(F.ApiService),e.\u0275\u0275directiveInject(z.ProgressoService),e.\u0275\u0275directiveInject(V.ActivatedRoute),e.\u0275\u0275directiveInject(A.NgbModal),e.\u0275\u0275directiveInject(W.CadernoProvaService),e.\u0275\u0275directiveInject(j.CustomErrorHandler),e.\u0275\u0275directiveInject(L.LoadingService),e.\u0275\u0275directiveInject(e.ChangeDetectorRef))};static \u0275cmp=e.\u0275\u0275defineComponent({type:a,selectors:[["app-book"]],decls:39,vars:19,consts:[[3,"visibleChange","header","visible"],["class","questoes",4,"ngFor","ngForOf"],["pTemplate","footer"],["header","Editar quest\xe3o",3,"visibleChange","visible"],[1,"form-group","enunciado"],["name","enunciado",3,"ngModelChange","ngModel"],[1,"form-group","alternativa"],["name","correta","required","",3,"ngModelChange","ngModel"],["class","form-group alternativa",4,"ngFor","ngForOf"],[1,"form-group"],["name","gabarito","required","",1,"form-control",3,"ngModelChange","ngModel"],["name","bibliografia","required","",1,"form-control",3,"ngModelChange","ngModel"],[1,"header"],[1,"btn","btn-primary",3,"click"],[1,""],["styleClass","btn-group btn-group-toggle","o
1ptionValue","id","optionLabel","title",3,"ngModelChange","options","ngModel"],[4,"ngIf"],[1,"wrapper"],[1,"container-questoes"],[1,"questoes"],[1,"wrapper-matriz"],[1,"questao"],[1,"sub-title"],[3,"innerHtml"],[1,"simulated",3,"innerHtml"],[4,"ngFor","ngForOf"],[1,"btn",3,"click"],[1,"btn",3,"click","disabled","ngClass"],["required","",3,"ngModelChange","ngModel","name"],[1,"filters"],[1,"filter","p-field"],["appendTo","body","optionLabel","title","optionValue","id","styleClass","form-control","name","show_selected",3,"ngModelChange","options","ngModel"],["appendTo","body","optionLabel","title","optionValue","id","styleClass","form-control","name","show_metadata",3,"ngModelChange","options","ngModel"],["class","filter p-field",4,"ngIf"],["appendTo","body","display","chip","optionLabel","title","optionValue","id",3,"ngModelChange","options","name","ngModel"],[1,"info"],[1,"btn","btn-info",3,"click"],["class","fa fa-plus",4,"ngIf"],["class","fa fa-minus",4,"ngIf"],[1,"dados"],[1,"alternativa",3,"innerHtml"],[1,"buttons"],[1,"fa","fa-plus"],[1,"fa","fa-minus"],[1,"reference"],[1,"alternativas","reference"],[1,"btn","btn-primary"],[1,"btn","btn-danger"],[1,"btn","btn-danger",3,"click"],[1,"container-matriz"],[1,"text-center"],[1,"container-campos"],[3,"ngClass"]],template:function(o,n){1&o&&(e.\u0275\u0275elementStart(0,"p-dialog",0),e.\u0275\u0275twoWayListener("visibleChange",function(l){return e.\u0275\u0275twoWayBindingSet(n.show_dialog,l)||(n.show_dialog=l),l}),e.\u0275\u0275elementStart(1,"strong"),e.\u0275\u0275text(2,"ATEN\xc7\xc3O, AS QUEST\xd5ES E ALTERNATIVAS SER\xc3O EMBARALHADAS NAS PROVAS ENTREGUES PARA OS ALUNOS. "),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(3,K,9,5,"section",1)(4,$,4,4,"ng-template",2),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(5,"p-dialog",3),e.\u0275\u0275twoWayListener("visibleChange",function(l){return e.\u0275\u0275twoWayBindingSet(n.show_edit,l)||(n.show_edit=l),l}),e.\u0275\u0275elementStart(6,"div",4)(7,"label"),e.\u0275\u0275text(8," Enunciado (Apenas o enunciado, sem as alternativas) "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(9,"p-editor",5),e.\u0275\u0275twoWayListener("ngModelChange",function(l){return e.\u0275\u0275twoWayBindingSet(n.model.questao,l)||(n.model.questao=l),l}),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(10,"div",6)(11,"label"),e.\u0275\u0275text(12,"Resposta correta (N\xe3o informar a letra da alternativa, ser\xe1 gerada automaticamente)"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(13,"p-editor",7),e.\u0275\u0275twoWayListener("ngModelChange",function(l){return e.\u0275\u0275twoWayBindingSet(n.model.alternativas.correta.resposta,l)||(n.model.alternativas.correta.resposta=l),l}),e.\u0275\u0275elementEnd()(),e.\u0275\u0275template(14,X,4,7,"div",8),e.\u0275\u0275elementStart(15,"div",9)(16,"label"),e.\u0275\u0275text(17,"Gabarito comentado"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(18,"textarea",10),e.\u0275\u0275twoWayListener("ngModelChange",function(l){return e.\u0275\u0275twoWayBindingSet(n.model.gabarito,l)||(n.model.gabarito=l),l}),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(19,"div",9)(20,"label"),e.\u0275\u0275text(21,"Referencia bibliogr\xe1fica"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(22,"textarea",11),e.\u0275\u0275twoWayListener("ngModelChange",function(l){return e.\u0275\u0275twoWayBindingSet(n.model.bibliografia,l)||(n.model.bibliografia=l),l}),e.\u0275\u0275elementEnd()(),e.\u0275\u0275template(23,Y,4,0,"ng-template",2),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(24,"div",12)(25,"h2"),e.\u0275\u0275text(26," Caderno da Prova"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(27,"button",13),e.\u0275\u0275listener("click",function(){return n.load_dialog()}),e.\u0275\u0275text(28," Visualizar Caderno\n"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(29,"div",14)(30,"h5"),e.\u0275\u0275text(31," Selecione abaixo uma \xe1rea para ver as quest\xf5es "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(32,"p-selectButton",15),e.\u0275\u0275twoWayListener("ngModelChange",function(l){return e.\u0275\u0275twoWayBindingSet(n.selected_area,l)||(n.selected_area=l),l}),e.\u0275\u0275listener("ngModelChange",function(){return n.load_questoes()}),e.\u0275\u0275elementEnd()(),e.\u0275\u0275template(33,te,16,5,"ng-container",16),e.\u0275\u0275elementStart(34,"div",17)(35,"div",18),e.\u0275\u0275repeaterCreate(36,ce,30,8,"section",19,y),e.\u0275\u0275elementEnd(),e.\u0275\u0275conditionalCreate(38,ge,10,1,"div",20),e.\u0275\u0275elementEnd()),2&o&&(e.\u0275\u0275property("header",n.dialog_header),e.\u0275\u0275twoWayProperty("visible",n.show_dialog),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngForOf",n.selecionadas),e.\u0275\u0275advance(2),e.\u0275\u0275twoWayProperty("visible",n.show_edit),e.\u0275\u0275advance(4),e.\u0275\u0275styleMap(e.\u0275\u0275pureFunction0(17,P)),e.\u0275\u0275twoWayProperty("ngModel",n.model.questao),e.\u0275\u0275advance(4),e.\u0275\u0275styleMap(e.\u0275\u0275pureFunction0(18,P)),e.\u0275\u0275twoWayProperty("ngModel",n.model.alternativas.correta.resposta),e.\u0275\u0275advance(),e.\u0275\u0275property("ngForOf",n.model.alternativas.incorretas),e.\u0275\u0275advance(4),e.\u0275\u0275twoWayProperty("ngModel",n.model.gabarito),e.\u0275\u0275advance(4),e.\u0275\u0275twoWayProperty("ngModel",n.model.bibliografia),e.\u0275\u0275advance(10),e.\u0275\u0275property("options",n.areas),e.\u0275\u0275twoWayProperty("ngModel",n.selected_area),e.\u0275\u0275advance(),e.\u0275\u0275property("ngIf",n.area),e.\u0275\u0275advance(3),e.\u0275\u0275repeater(n.exibir),e.\u0275\u0275advance(2),e.\u0275\u0275conditional(n.area?38:-1))},dependencies:[g.CommonModule,O.NgClass,O.NgForOf,O.NgIf,p.FormsModule,w.DefaultValueAccessor,w.NgControlStatus,w.RequiredValidator,w.NgModel,_.DialogModule,N.Dialog,H.PrimeTemplate,m.ButtonModule,c.SelectButtonModule,R.SelectButton,M.MultiSelectModule,D.MultiSelect,B.EditorModule,q.Editor,I.SelectModule,Q.Select,k.CardModule,U.Card],styles:["[_nghost-%COMP%]{--width-matriz: 350px}.questao[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;row-gap:2em;border:1px solid black;padding:1em}.questao[_ngcontent-%COMP%] .dados[_ngcontent-%COMP%]{display:flex;flex-direction:row;width:100%;-moz-column-gap:1em;column-gap:1em;row-gap:1em;flex-wrap:wrap}.questao[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.questao[_ngcontent-%COMP%] .alternativa[_ngcontent-%COMP%]{border:1px dotted black}.questao[_ngcontent-%COMP%] .alternativa[_ngcontent-%COMP%] img{max-width:150px}.questao[_ngcontent-%COMP%] .reference[_ngcontent-%COMP%]{white-space:pre-line}.questao[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{width:-moz-fit-content;width:fit-content;height:-moz-fit-content;height:fit-content}label.btn-primary.btn[_ngcontent-%COMP%]{font-size:14px}.questoes[_ngcontent-%COMP%]{display:flex;row-gap:1em;flex-direction:column;width:100%;padding:1em}.filters[_ngcontent-%COMP%]{display:flex;width:calc(100% - var(--width-matriz));flex-wrap:wrap;-moz-column-gap:1em;column-gap:1em;row-gap:1em}.filters[_ngcontent-%COMP%] .p-field[_ngcontent-%COMP%]{width:100%;max-width:300px;justify-content:end}.filters[_ngcontent-%COMP%] .p-field[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{height:50px}.wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:row;width:100%}.wrapper[_ngcontent-%COMP%] .container-questoes[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:calc(100% - var(--width-matriz))}.wrapper[_ngcontent-%COMP%] .wrapper-matriz[_ngcontent-%COMP%]{display:flex;flex-direction:column;position:fixed;right:15px;top:60px;width:var(--width-matriz);padding:1em;overflow:hidden;border:1px solid}.wrapper[_ngcontent-%COMP%] .wrapper-matriz[_ngcontent-%COMP%] .container-matriz[_ngcontent-%COMP%] .container-campos[_ngcontent-%COMP%]{overflow-y:scroll;overflow-x:hidden;max-height:70vh;margin-top:1em}.wrapper[_ngcontent-%COMP%] .wrapper-matriz[_ngcontent-%COMP%] .container-matriz[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{list-style:none;padding:0}.wrapper[_ngcontent-%COMP%] .wrapper-matriz[_ngcontent-%COMP%] .container-matriz[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:large}.over[_ngcontent-%COMP%]{background-color:red}.ok[_ngcontent-%COMP%]{background-color:#adff2f}.under[_ngcontent-%COMP%]{background-color:#ff0}.header[_ngcontent-%COMP%]{display:flex;flex-direction:row;width:100%;justify-content:flex-start;-moz-column-gap:360px;column-gap:360px}table[_ngcontent-%COMP%], tr[_ngcontent-%COMP%], td[_ngcontent-%COMP%], th[_ngcontent-%COMP%]{border:1px solid}th[_ngcontent-%COMP%], td[_ngcontent-%COMP%]{padding:5px}.sub-title[_ngcontent-%COMP%]{font-size:1.5rem;font-weight:700}.simulated[_ngcontent-%COMP%] img{max-width:150px}ol[_ngcontent-%COMP%]{list-style:upper-alpha} img{max-width:500px} table{width:100%;border:1px solid black} table tr, table td, table th{border:1px solid black} table td, table th{padding:5px} table{page-break-inside:auto} tr{page-break-inside:avoid;page-break-after:auto}@media(max-width:500px){ img{max-width:100%}.alternativa[_ngcontent-%COMP%] img{max-width:150px}}hr[_ngcontent-%COMP%]{width:100%;border-color:#c7c7c7;margin:0}"]})}return a})();C.BookComponent=fe},41853(T,C,d){var f=this&&this.__createBinding||(Object.create?function(g,p,_,m){void 0===m&&(m=_);var c=Object.getOwnPropertyDescriptor(p,_);(!c||("get"in c?!p.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return p[_]}}),Object.defineProperty(g,m,c)}:function(g,p,_,m){void 0===m&&(m=_),g[m]=p[_]}),E=this&&this.__setModuleDefault||(Object.create?function(g,p){Object.defineProperty(g,"default",{enumerable:!0,value:p})}:function(g,p){g.default=p}),x=this&&this.__importStar||function(){var g=function(p){return(g=Object.getOwnPropertyNames||function(_){var m=[];for(var c in _)Object.prototype.hasOwnProperty.call(_,c)&&(m[m.length]=c);return m})(p)};return function(p){if(p&&p.__esModule)return p;var _={};if(null!=p)for(var m=g(p),c=0;c<m.length;c++)"default"!==m[c]&&f(_,p,m[c]);return E(_,p),_}}();Object.defineProperty(C,"__esModule",{value:!0}),C.ConfirmModalComponent=void 0;const u=d(60177),s=x(d(49849)),S=x(d(39078)),b=x(d(60177));C.ConfirmModalComponent=(()=>{class g{modal;title="Confirme";text;yes="SIM";no="N\xc3O";destructive=!0;closing;constructor(_){this.modal=_,this.closing=!1}ngOnInit(){}color(){return this.destructive?"btn-danger":"btn-primary"}close(){this.closing||(this.closing=!0,this.modal.close(!0))}static \u0275fac=function(m){return new(m||g)(s.\u0275\u0275directiveInject(S.NgbActiveModal))};static \u0275cmp=s.\u0275\u0275defineComponent({type:g,selectors:[["app-confirm-modal"]],decls:13,vars:5,consts:[[1,"modal-header"],["id","modal-title",1,"modal-title"],["type","button","aria-describedby","modal-title",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[3,"innerHtml"],[1,"modal-footer"],["type","button",1,"btn","btn-info",3,"click"],["type","button",1,"btn",3,"click","ngClass"]],template:function(m,c){1&m&&(s.\u0275\u0275elementStart(0,"div",0)(1,"h4",1),s.\u0275\u0275text(2),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementStart(3,"button",2),s.\u0275\u0275listener("click",function(){return c.modal.dismiss(!1)}),s.\u0275\u0275elementStart(4,"span",3),s.\u0275\u0275text(5,"\xd7"),s.\u0275\u0275elementEnd()()(),s.\u0275\u0275elementStart(6,"div",4),s.\u0275\u0275element(7,"div",5),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementStart(8,"div",6)(9,"button",7),s.\u0275\u0275listener("click",function(){return c.modal.dismiss(!1)}),s.\u0275\u0275text(10),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementStart(11,"button",8),s.\u0275\u0275listener("click",function(){return c.close()}),s.\u0275\u0275text(12),s.\u0275\u0275elementEnd()()),2&m&&(s.\u0275\u0275advance(2),s.\u0275\u0275textInterpolate(c.title),s.\u0275\u0275advance(5),s.\u0275\u0275property("innerHtml",c.text,s.\u0275\u0275sanitizeHtml),s.\u0275\u0275advance(3),s.\u0275\u0275textInterpolate(c.no),s.\u0275\u0275advance(),s.\u0275\u0275property("ngClass",c.color()),s.\u0275\u0275advance(),s.\u0275\u0275textInterpolate(c.yes))},dependencies:[u.CommonModule,b.NgClass],styles:[".modal-body[_ngcontent-%COMP%]{white-space:pre-line}"]})}return g})()}}]);
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.