1import{a as Ie}from"./chunk-PFKMWAAU.js";import{a as le,b as se,c as ce,d as pe,e as me,f as de,g as ue,h as ge,i as ve,j as fe,k as be,l as he,m as xe,n as Ce,o as Se,p as Te}from"./chunk-NZ3BWIWT.js";import{b as ye}from"./chunk-5M7RAECA.js";import{a as _e}from"./chunk-RCBEKK76.js";import"./chunk-3QAEEWMF.js";import"./chunk-VD7CP2TU.js";import{a as ke}from"./chunk-SPSMUDOJ.js";import"./chunk-ZJSFACC7.js";import"./chunk-KDJDYPVP.js";import"./chunk-HYMTJSDB.js";import"./chunk-ATCGR75L.js";import"./chunk-RZT2WZMC.js";import"./chunk-IUD3Z7EH.js";import{e as ae}from"./chunk-KCPIJL6W.js";import"./chunk-64ZEVU2M.js";import"./chunk-TRSIHZNG.js";import"./chunk-UNSAKLS7.js";import"./chunk-JS6I5FQ5.js";import"./chunk-UTO46H5S.js";import"./chunk-2ZZOJFT2.js";import{a as te}from"./chunk-JWSAKKVQ.js";import"./chunk-LT72JKOL.js";import{a as ie}from"./chunk-WGGBNP3O.js";import"./chunk-YQLRE4E3.js";import"./chunk-YWAL7HVF.js";import{b as E}from"./chunk-VBIRK3HD.js";import"./chunk-YFREARA7.js";import"./chunk-AGCAGPAP.js";import"./chunk-AHQSOXDD.js";import{a as Z}from"./chunk-XBBEU2YL.js";import{a as ne}from"./chunk-I7CB4NGY.js";import{a as re}from"./chunk-KDYAPSMV.js";import"./chunk-C7AUMABW.js";import"./chunk-JZMNR7QN.js";import{a as oe}from"./chunk-LH7AKJBU.js";import{a as ee}from"./chunk-M7VQHQXJ.js";import{b as K,d as Q}from"./chunk-BAGWPQZV.js";import"./chunk-TZ2MW36L.js";import{a as X}from"./chunk-WZBVDNS6.js";import{a as W}from"./chunk-3KOQRKYT.js";import{t as I}from"./chunk-MTKRVMUJ.js";import{c as k}from"./chunk-SHTGYNA2.js";import{k as U,n as J,u as Y}from"./chunk-4YERUHPX.js";import{Ab as $,Bb as j,Cc as q,Db as h,Ib as v,Jb as o,Tb as c,Ub as M,Vb as F,Wb as G,Xa as d,Ya as _,ac as H,bb as O,bc as z,cc as D,da as A,fa as R,ib as f,mb as p,na as u,oa as g,p as L,sb as y,tb as x,v as N,va as T,vb as C,wb as S,xb as a,ya as P,yb as r,zb as s}from"./chunk-DQGQ5ICO.js";import{f as V}from"./chunk-4IDNTCH7.js";var w=class t{constructor(i,e,n,l){this.elementRef=i;this.contentService=e;this.modalService=n;this.settingService=l}start=new T;download=new T;upload=new T;finished=new T;onInputChange(i){this.onChange()}model;reg;contentType;tagId;nativeElement;ngOnInit(){this.nativeElement=this.elementRef.nativeElement}validateFile=(i,e)=>i===null||i.test(e);setUpload(i){var e=!1;let n=i.split("|");for(let m=0;m<n.length;m++){let b=n[m].split(":")[0],B=n[m].split(":")[1];var l={key:b,value:B};b=="error"&&(e=!0),this.upload.emit(l)}this.finished.emit(i)}errorUpload=i=>{(!i||i.status!=200)&&(this.nativeElement.value="",this.modalService.showAlert(this.settingService.settings.resources["File.ErrorUploadServer"]))};onChange(){this.nativeElement.files&&this.nativeElement.files.length&&this.modalService.showConfirm("\xBFEst\xE1 seguro de subir este archivo?").subscribe({next:i=>{if(i)for(var e=0;e<this.nativeElement.files.length;e++){var n=this.reg?new RegExp(this.reg,"gi"):null;this.validateFile(n,this.nativeElement.files[e].name)?(this.start.emit(null),this.download.emit(),this.contentService.bulkLoad(this.nativeElement.files[e],this.contentType,this.tagId).subscribe({next:l=>this.setUpload(l),error:l=>this.errorUpload(l)})):(this.modalService.showAlert("Usa un archivo de Microsoft Excel para cargar la informaci\xF3n."),this.nativeElement.value="")}else this.nativeElement.value=""}})}static \u0275fac=function(e){return new(e||t)(_(P),_(E),_(I),_(k))};static \u0275dir=R({type:t,selectors:[["","appBulkContent",""]],hostBindings:function(e,n){e&1&&v("change",function(){return n.onInputChange()})},inputs:{model:"model",reg:"reg",contentType:"contentType",tagId:"tagId"},outputs:{start:"start",download:"download",upload:"upload",finished:"finished"},standalone:!0})};var De=()=>["Contents"],Be=t=>({display:t}),Ve=t=>({width:t});function Ne(t,i){if(t&1){let e=h();a(0,"a",2),v("click",function(){u(e);let l=o();return g(l.editBlock())}),s(1,"span",3),c(2,`Editar 2`),r()}}function Ae(t,i){if(t&1&&s(0,"app-seed",5),t&2){let e=o(2);p("seedValue",e.tag.name)}}function Re(t,i){if(t&1&&s(0,"app-helper",12),t&2){let e=o(2);p("key",e.getToolTipID())("classname","toolTip-btn")}}
2function Pe(t,i){if(t&1&&(a(0,"label"),c(1),r()),t&2){let e=i.$implicit;d(),G("(",e.procedureTypeID,") ",e.name,", ")}}function Oe(t,i){if(t&1){let e=h();a(0,"div",19)(1,"div",20),c(2,"Carga masiva de tr\xE1mites"),r(),a(3,"p",21),c(4," Ten en cuenta las siguientes recomendaciones "),r(),a(5,"p",21),c(6," 1. El archivo debe ser en formato Excel (xlsx) "),r(),a(7,"p",22),c(8,"2. El archivo debe tener 12 columnas"),r(),a(9,"ul",23)(10,"li"),s(11,"span"),c(12,"La primer columna representa la fecha de creacion (Puede ir vacia) "),r(),a(13,"li"),s(14,"span"),c(15,"La segunda columna representa la fecha de modificaci\xF3n (Puede ir vacia) "),r(),a(16,"li"),s(17,"span"),c(18,"La tercer columna representa el identificador del tramite (Puede ir vacio para crear un nuevo tramite) "),r(),a(19,"li"),s(20,"span"),c(21,"La cuarta columna tiene el nombre del tr\xE1mite (Obligatorio y m\xE1ximo 150 caracteres) "),r(),a(22,"li"),s(23,"span"),c(24,"La quinta columna tiene la descripci\xF3n (Obligatorio) "),r(),a(25,"li"),s(26,"span"),c(27,"La sexta columna tiene la URL del tr\xE1mite (Obligatorio) "),r(),a(28,"li"),s(29,"span"),c(30,"La septima columna tiene las categorias separadas por comas (Puede ir vacia) "),r(),a(31,"li"),s(32,"span"),c(33," La octava columna debe tener el identificador del tipo de tramite (Obligatorio). A continuaci\xF3n el listado de tipos de tr\xE1mite con su correspondiente identificador. "),C(34,Pe,2,2,"label",null,x),r(),a(36,"li"),s(37,"span"),c(38," La novena columna el identificador del tipo de costo (0) Sin costo, (1) Con costo y (2) Costo Exacto) "),r(),a(39,"li"),s(40,"span"),c(41," La decima columna debe tener el Costo exacto (Obligatorio, Valor n\xFAmerico, en caso de que el tipo de costo sea 2, de lo contrario el valor debe ser 0) "),r(),a(42,"li"),s(43,"span"),c(44," La decima primera columna debe tener el tiempo que dura el tr\xE1mite (Obligatorio y m\xE1ximo 21 caracteres) "),r(),a(45,"li"),s(46,"span"),c(47,' La decima segunda columna tiene la URL exacta del tr\xE1mite (Opcional En caso de que el tipo de tramite sea "Tr\xE1mite en l\xEDnea") '),r()(),a(48,"p",21),c(49," 3. El archivo debe ir sin encabezado "),r(),a(50,"p",24),c(51," En el caso que el excel tenga un error el sistema te informar\xE1 de las filas a corregir con sus correspondientes errores "),s(52,"br"),a(53,"b"),c(54,"Si deseas descargar los tramites actuales para actualizarlos de forma masiva puedes \xA0"),r(),a(55,"b")(56,"a",25),v("click",function(){u(e);let l=o(3);return g(l.downloadProcedures())}),c(57,"descargarlos Aqu\xED"),r()()(),a(58,"div",26)(59,"input",27),v("start",function(){u(e);let l=o(3);return g(l.start())})("download",function(l){u(e);let m=o(3);return g(m.download(l))})("upload",function(l){u(e);let m=o(3);return g(m.upload(l))})("finished",function(l){u(e);let m=o(3);return g(m.finished(l))}),r(),s(60,"i",28),a(61,"span"),c(62,"Agregar archivo"),r()()()}if(t&2){let e=o(3);p("ngStyle",D(2,Be,e.startProcess?"none":"block")),d(34),S(e.procedureTypes),d(25),p("tagId",e.tag.tagID)}}function $e(t,i){if(t&1){let e=h();a(0,"div",29)(1,"p",20),c(2,"Carga masiva de contrataci\xF3n"),r(),a(3,"p",22),c(4," Ten en cuenta las siguientes recomendaciones "),r(),a(5,"p",21),c(6," Sube el archivo con los datos de contrataci\xF3n a cargar "),r(),a(7,"p",21),c(8," 1. El archivo debe ser en formato Excel (xlsx) "),r(),a(9,"p",22),c(10,"2. Debe tener 3 columnas."),r(),a(11,"ul",30)(12,"li"),s(13,"span"),c(14,"La primera el nombre (Requerida - m\xE1ximo 200 caracteres) "),r(),a(15,"li"),s(16,"span"),c(17,"La segunda la descripci\xF3n (Requerida)"),r(),a(18,"li"),s(19,"span"),c(20,"La tercera la url (Requerida)"),r()(),a(21,"p",22),c(22,"3. Debe ir sin encabezado"),r(),a(23,"div",31)(24,"input",32),v("start",function(){u(e);let l=o(3);return g(l.start())})("download",function(l){u(e);let m=o(3);return g(m.download(l))})("upload",function(l){u(e);let m=o(3);return g(m.upload(l))})("finished",function(l){u(e);let m=o(3);return g(m.finished(l))}),r(),s(25,"i",28),a(26,"span"),c(27,"Agregar archivo"),r()()()}if(t&2){let e=o(3);d(24),p("tagId",e.tag.tagID)}}function je(t,i){if(t&1&&(a(0,"p",21),s(1,"span",35),a(2,"label"),c(3),r()()),t&2){let e=i.$implicit;d(3),M(e.value)}}function Ge(t,i){if(t&1&&(a(0,"div",21),s(1,"span",36),c(2),r()),t&2){let e=i.$implicit;d(2),F(" ",e," ")}}
2function He(t,i){if(t&1&&(a(0,"div"),C(1,Ge,3,1,"div",21,x),r()),t&2){let e=i.$implicit;d(),S(e.details)}}function ze(t,i){if(t&1&&(a(0,"div",37)(1,"div",38),s(2,"div",39),a(3,"span"),c(4),r()()()),t&2){let e=o(4);d(2),p("ngStyle",D(2,Ve,e.percentage+"%")),d(2),F("Porcentaje de progreso: ",e.percentage,"%")}}function qe(t,i){if(t&1){let e=h();a(0,"div",40)(1,"button",41),v("click",function(){u(e);let l=o(4);return g(l.finalize())}),c(2," Aceptar "),r()()}}function Ue(t,i){if(t&1&&(a(0,"div",29)(1,"div",20),c(2,"Carga masiva"),r(),C(3,je,4,1,"p",21,x),C(5,He,3,0,"div",null,x),f(7,ze,5,4,"div",33)(8,qe,3,0,"div",34),r()),t&2){let e=o(3);d(3),S(e.messages),d(2),S(e.errors),d(2),p("ngIf",e.percentage&&!e.loadFinish),d(),p("ngIf",e.loadFinish)}}function Je(t,i){if(t&1){let e=h();a(0,"div",13)(1,"div",14)(2,"div",15),v("click",function(){u(e);let l=o(2);return g(l.toggleBatch())}),s(3,"i",16),r(),f(4,Oe,63,4,"div",17)(5,$e,28,1,"div",18)(6,Ue,9,2,"div",18),r()()}if(t&2){let e=o(2);d(4),p("ngIf",e.tag.friendlyName==="tramites-y-servicios"&&e.canAdminContents),d(),p("ngIf",!e.startProcess&&e.tag.friendlyName==="contrataciones"&&e.canAdminContents),d(),p("ngIf",e.startProcess)}}function Ye(t,i){t&1&&s(0,"div")}function Ke(t,i){if(t&1&&s(0,"app-block-global-banner",42),t&2){let e=o(2).$implicit,n=o(3);p("model",e)("section",n.tag)}}function Qe(t,i){if(t&1&&s(0,"app-block-hero-banner",42),t&2){let e=o(2).$implicit,n=o(3);p("model",e)("section",n.tag)}}function We(t,i){if(t&1&&s(0,"app-block-featured",43),t&2){let e=o(2).$implicit,n=o(3);p("block",e)("section",n.tag)}}function Xe(t,i){if(t&1&&s(0,"app-block-global-middle-slider",43),t&2){let e=o(2).$implicit,n=o(3);p("block",e)("section",n.tag)}}function Ze(t,i){if(t&1&&s(0,"app-block-short-cut",42),t&2){let e=o(2).$implicit,n=o(3);p("model",e)("section",n.tag)}}function et(t,i){if(t&1&&s(0,"app-block-gallery",42),t&2){let e=o(2).$implicit,n=o(3);p("model",e)("section",n.tag)}}function tt(t,i){}function it(t,i){if(t&1&&s(0,"app-block-logo",42),t&2){let e=o(2).$implicit,n=o(3);p("model",e)("section",n.tag)}}function nt(t,i){if(t&1&&s(0,"app-block-map",42),t&2){let e=o(2).$implicit,n=o(3);p("model",e)("section",n.tag)}}function ot(t,i){if(t&1&&s(0,"app-block-person",42),t&2){let e=o(2).$implicit,n=o(3);p("model",e)("section",n.tag)}}function at(t,i){if(t&1&&s(0,"app-block-social-network",42),t&2){let e=o(2).$implicit,n=o(3);p("model",e)("section",n.tag)}}function rt(t,i){}function lt(t,i){if(t&1&&s(0,"app-block-global-shortcut",42),t&2){let e=o(2).$implicit,n=o(3);p("model",e)("section",n.tag)}}function st(t,i){if(t&1&&s(0,"app-block-newsletter",42),t&2){let e=o(2).$implicit,n=o(3);p("model",e)("section",n.tag)}}function ct(t,i){if(t&1&&s(0,"app-block-section",42),t&2){let e=o(2).$implicit,n=o(3);p("model",e)("section",n.tag)}}function pt(t,i){if(t&1&&s(0,"app-block-global-logo",42),t&2){let e=o(2).$implicit,n=o(3);p("model",e)("section",n.tag)}}function mt(t,i){if(t&1){let e=h();a(0,"app-list-content",46),v("labelFiltered",function(l){u(e);let m=o(5);return g(m.filterLabel(l))})("viewMoreCalled",function(){u(e);let l=o(5);return g(l.viewMore())})("sublabelFiltered",function(l){u(e);let m=o(5);return g(m.filterSubLabel(l))})("batchTooggled",function(){u(e);let l=o(5);return g(l.toggleBatch())}),r()}if(t&2){let e=o(2).$implicit,n=o(3);p("model",e)("tag",n.tag)("labels",n.labels)("selectedLabelID",n.selectedLabelID)("showLabels",n.showLabels)("isLoadingMore",n.isLoadingMore)("sublabels",n.sublabels)("selectedSubLabelID",n.selectedSubLabelID)("enableNew",n.enableNew)("editMassive",n.editMassive)}}function dt(t,i){if(t&1&&s(0,"app-block-viewed-sections",42),t&2){let e=o(2).$implicit,n=o(3);p("model",e)("section",n.tag)}}function _t(t,i){if(t&1&&s(0,"app-block-calendar",45),t&2){let e=o(2).$implicit,n=o(3);p("model",e)("section",n.tag)}}function ut(t,i){if(t&1&&($(0),f(1,Ke,1,2,"app-block-global-banner",42)(2,Qe,1,2,"app-block-hero-banner",42)(3,We,1,2,"app-block-featured",43)(4,Xe,1,2,"app-block-global-middle-slider",43)(5,Ze,1,2,"app-block-short-cut",42)(6,et,1,2,"app-block-gallery",42)(7,tt,0,0)(8,it,1,2,"app-block-logo",42)(9,nt,1,2,"app-block-map",42)(10,ot,1,2,"app-block-person",42)(11,at,1,2,"app-block-social-network",42)(12,rt,0,0)(13,lt,1,2,"app-block-global-shortcut",42)(14,st,1,2,"app-block-newsletter",42)(15,ct,1,2,"app-block-section",42)(16,pt,1,2,"app-block-global-logo",42)(17,mt,1,10,"app-list-content",44)(18,dt,1,2,"app-block-viewed-sections",42)(19,_t,1,2,"app-block-calendar",45),j()),t&2){let e,n=o().$implicit;d(),y((e=n.type)===1?1:e===2?2:e===12?3:e===3?4:e===6?5:e===8?6:e===15?7:e===5?8:e===9?9:e===14?10:e===11?11:e===16?12:e===7?13:e===10?14:e===13?15:e===4?16:e===17?17:e===18?18:e===19?19:-1)}}function gt(t,i){if(t&1&&f(0,ut,20,1,"ng-container"),t&2){let e=i.$implicit;y(e.status===1?0:-1)}}function vt(t,i){if(t&1&&(a(0,"section",11),C(1,gt,1,1,null,null,x),r()),t&2){let e=o(2);d(),S(e.blocks)}}function ft(t,i){if(t&1&&(a(0,"section")(1,"article")(2,"section",4),s(3,"app-seed",5),f(4,Ae,1,1,"app-seed",6),a(5,"div",7)(6,"h2",8),c(7),r(),f(8,Re,1,2,"app-helper",9),r()(),f(9,Je,7,3,"div",10)(10,Ye,1,0,"div",1)(11,vt,3,0,"section",11),r()()),t&2){let e=o();d(3),p("seedValue",e.tag.name),d(),p("ngIf",!e.showSeed),d(3),M(e.tag.name),d(),p("ngIf",e.hasPermissions(z(7,De))&&e.showToolTitle()),d(),p("ngIf",e.displayBatchModal),d(),p("ngIf",e.editMassive),d(),y(e.editMassive?-1:11)}}
2var Ee=class t{constructor(i,e,n,l,m,b,B,bt,ht,xt,Ct,St,Tt,yt,kt,It,Et){this.authService=i;this.eventEmitterService=e;this.actRoute=n;this.blocksService=l;this.helperService=m;this.modalService=b;this.contentService=B;this.renderer=bt;this.settingService=ht;this.router=xt;this.trackService=Ct;this.labelService=St;this.portalMainService=Tt;this.appService=yt;this.sharedSignalsService=kt;this.subLabelService=It;this.fileService=Et;this.tagInfo=this.actRoute.snapshot.data.tagInfo,this.tag=this.tagInfo,q(()=>{this.canAdminContents=this.sharedSignalsService.canAdminContents()})}seedValue="";showSeed=!0;MIN_ITEMS_TO_PAGE=50;isLoadingMore=!1;totalCount=null;defaultTagID=0;contentFilter=0;friendlyName="";tagInfo;tag;labels=[];sublabels=[];selectedLabel={};selectedSubLabel={};enableNew=!1;blocks=[];messages=[];errors=[];percentage=null;loadFinish=!1;startProcess=!1;displayBatchModal=!1;load=!1;showLabels=!1;procedureTypes;selectedLabelID;contentType;selectedSubLabelID;canAdminContents;user;editMassive=!1;ngOnInit(){this.user=this.authService.user,this.activate()}showToolTitle(){return this.tag.friendlyName==="retos-de-participacion"||this.tag.friendlyName==="proyectos-en-ejecucion"||this.tag.friendlyName==="normatividad"}getToolTipID(){switch(this.tag.friendlyName){case"retos-de-participacion":return 33;case"proyectos-en-ejecucion":return 36;case"normatividad":return 111;default:return null}}activate(){this.tag.isPrivate?this.authService.user.id?this.startSection():localStorage.getItem("token")?(this.eventEmitterService.startUser.subscribe(()=>this.startSection()),this.eventEmitterService.startErrorUser.subscribe(()=>this.triggerLogin())):this.triggerLogin():this.startSection()}triggerLogin(){this.authService.callCurrentUser().subscribe({next:i=>{this.startSection()},error:i=>{console.error(i),this.router.navigate(["/"])}})}startSection(){this.selectedLabel.name="Todas las categor\xEDas",this.friendlyName=this.actRoute.snapshot.params.alias,this.loadBlocks(this.tag),this.setGetTag(this.tag)}editBlock(){window.document.location.href="/administrador/bloques/"+this.tag.tagID}loadBlocks(i){this.blocksService.all({tagID:i.tagID}).subscribe({next:e=>{for(var n=0;n<e.length;n++)e[n].frame&&(e[n].frame=JSON.parse(e[n].frame)),this.blocks.push(e[n])},error:e=>this.helperService.handlerException(e)})}finalize(){this.messages=[],this.errors=[],this.percentage=null,this.loadFinish=!1,this.startProcess=!1,this.displayBatchModal=!this.displayBatchModal}downloadProcedures(){return this.fileService.downloadFile("/api/v1/contents/proceduretypes/export/",{}).subscribe({next:i=>{document.location.href=i}}),!1}toggleBatch(){this.displayBatchModal=!this.displayBatchModal}start(){this.startProcess=!0}download(i){this.messages.push({key:"message",value:"Cargando archivo"})}upload(i){i.key==="message"?this.messages.push(i):i.key==="percentage"?this.percentage=parseInt(i.value):i.key==="error"&&this.errors.length===0&&(i.details=i.value.split(","),this.errors.push(i))}finished(i){i.indexOf("percentage:100")>-1&&(this.modalService.showExit("Se ha realizado la inserci\xF3n masiva con \xE9xito"),this.finalize(),this.eventEmitterService.refresh.emit()),this.loadFinish=!0}displayLabelMenu(i){i.stopPropagation();var e=document.getElementById("menu-labels");e.classList.contains("hide-element")?this.renderer.removeClass(e,"hide-element"):this.renderer.addClass(e,"hide-element")}filterLabel(i){console.log("label filterLabal()",i),i?(sessionStorage.setItem("posscroll",(window.scrollY||document.documentElement.scrollTop||document.getElementsByTagName("html")[0].scrollTop).toString()),this.router.navigate(["/".concat(this.settingService.settings.routes.Tag,"/",this.friendlyName,"/",i.friendlyName)])):this.router.navigate(["/".concat(this.settingService.settings.routes.Tag,"/",this.friendlyName)])}filterSubLabel(i){if(i){var e=this.appService.firstOrDefault(this.labels,"labelID",i.labelID);e?(sessionStorage.setItem("posscroll",(window.scrollY||document.documentElement.scrollTop||document.getElementsByTagName("html")[0].scrollTop).toString()),this.router.navigate(["/".concat(this.settingService.settings.routes.Tag,"/",this.friendlyName,"/",e.friendlyName,"/",i.friendlyName)])):this.router.navigate(["/".concat(this.settingService.settings.routes.Tag,"/",this.friendlyName)])}else this.router.navigate(["/".concat(this.settingService.settings.routes.Tag,"/",this.friendlyName)])}setGetTag(i){this.defaultTagID=i.tagID,i.friendlyName==="tramites-y-servicios"&&this.contentService.getProcedureTypes().subscribe({next:e=>{this.procedureTypes=e},error:e=>this.helperService.handlerException(e)}),this.trackService.add({identifier:i.tagID,type:1}),this.labelService.get({pageSize:this.MIN_ITEMS_TO_PAGE,defaultTagID:this.defaultTagID,withCounter:!0}).subscribe({next:e=>this.setLabels(i,e),error:e=>this.errorLabels(e)})}setLoader(i){this.isLoadingMore=i}viewMore(){if(this.showLabels=!0,(this.totalCount||0)>this.MIN_ITEMS_TO_PAGE&&this.labels.length<this.totalCount){this.setLoader(!0),this.fethMoreLabels();return}}fethMoreLabels(){return V(this,null,function*(){let i=this.totalCount||0,{defaultTagID:e}=this,n=Math.ceil(i/this.MIN_ITEMS_TO_PAGE)-1,l=Array(n).fill(0).map((m,b)=>this.labelService.get({pageSize:this.MIN_ITEMS_TO_PAGE,page:++b,defaultTagID:e,withCounter:!0}));try{N(l).pipe(L(m=>m.map(({results:b})=>b)),L(m=>m.flat())).subscribe(m=>{this.labels=[...this.labels,...m]}
2)}finally{this.setLoader(!1),this.showLabels=!0}})}setLabels(i,e){if(this.labels=e.results,this.totalCount=e.meta.totalCount,this.actRoute.snapshot.params.id){var n=this.appService.firstOrDefault(this.labels,"friendlyName",this.actRoute.snapshot.params.id);n&&(this.selectedLabelID=n.labelID,this.selectedLabel.name=n.name,this.selectedLabel.description=n.description,i.labelID=n.labelID,this.portalMainService.seo.title=n.name.concat(" - ",this.settingService.settings.resources["Header.Title"]),this.portalMainService.seo.description=n.description,this.subLabelService.getByLabelId(this.selectedLabelID).subscribe({next:l=>this.setSublabels(i,l)})),this.load=!0}else this.selectedLabelID=null,this.portalMainService.seo.title=i.name,this.portalMainService.seo.description=i.description,this.load=!0;this.tag.validContentTypes&&this.tag.validContentTypes.length&&(this.contentType=this.tag.validContentTypes[0])}setSublabels(i,e){if(e.length>0&&(this.sublabels=e,this.actRoute.snapshot.params.subid)){var n=this.appService.firstOrDefault(this.sublabels,"friendlyName",this.actRoute.snapshot.params.subid);n&&(this.selectedSubLabelID=n.subLabelID,this.selectedSubLabel.name=n.name,this.selectedSubLabel.description=n.description,i.subLabelID=n.subLabelID)}}errorGetTag(i){this.router.navigate(["pagina-no-encontrada"])}errorLabels(i){this.load=!0}getHomeData(){return{labels:this.labels,selectedLabelID:this.selectedLabelID,showLabels:this.showLabels,isLoadingMore:this.isLoadingMore,sublabels:this.sublabels,selectedSubLabelID:this.selectedSubLabelID,enableNew:this.enableNew,editMassive:this.editMassive}}hasPermissions(i){return this.authService.hasPermissions(i)}static \u0275fac=function(e){return new(e||t)(_(te),_(W),_(K),_(oe),_(X),_(I),_(E),_(O),_(k),_(Q),_(Ie),_(re),_(ae),_(Z),_(ee),_(_e),_(ne))};static \u0275cmp=A({type:t,selectors:[["app-tag"]],standalone:!0,features:[H],decls:2,vars:2,consts:[["class","carousel-btnEdit",3,"click",4,"ngIf"],[4,"ngIf"],[1,"carousel-btnEdit",3,"click"],[1,"icon-edit"],[1,"content_all"],[3,"seedValue"],[3,"seedValue",4,"ngIf"],[1,"w-sectionTit"],[1,"section-tit"],[3,"key","classname",4,"ngIf"],["class","modal-wrap",4,"ngIf"],[2,"min-height","500px"],[3,"key","classname"],[1,"modal-wrap"],[1,"modal-inner","modal-inner--xl","modal__max-h"],[1,"modal__close",3,"click"],[1,"icon-close"],[3,"ngStyle",4,"ngIf"],["class","w100",4,"ngIf"],[3,"ngStyle"],[1,"modal__titV2"],[1,"modal__subTitV2","mt20"],[1,"modal__subTitV2"],[1,"modal-list","mt20"],[1,"modal__txt","ta-l"],["href","#",3,"click"],[1,"modal-wAdd"],["appBulkContent","","type","file","reg","\\.(xlsx)$","contentType","Procedure",3,"start","download","upload","finished","tagId"],[1,"icon-file"],[1,"w100"],[1,"modal-list"],[1,"modal-wAdd","mt20"],["type","file","appBulkContent","","reg","\\.(xlsx)$","contentType","Link",3,"start","download","upload","finished","tagId"],["class","bulk-progress-content",4,"ngIf"],["style","margin-top: 15px",4,"ngIf"],[1,"icon-check","green"],[1,"icon-close","red"],[1,"bulk-progress-content"],[1,"bulk-progress-content-bar"],[1,"bulk-progress-bar",3,"ngStyle"],[2,"margin-top","15px"],["type","button",1,"btn-save",3,"click"],[1,"section-wrapper","pos-relative",3,"model","section"],[1,"section-wrapper","pos-relative",3,"block","section"],["id","wall",1,"pos-relative","content_all","display-block",3,"model","tag","labels","selectedLabelID","showLabels","isLoadingMore","sublabels","selectedSubLabelID","enableNew","editMassive"],["id","block-cal",1,"section-wrapper","pos-relative",3,"model","section"],["id","wall",1,"pos-relative","content_all","display-block",3,"labelFiltered","viewMoreCalled","sublabelFiltered","batchTooggled","model","tag","labels","selectedLabelID","showLabels","isLoadingMore","sublabels","selectedSubLabelID","enableNew","editMassive"]],template:function(e,n){e&1&&f(0,Ne,3,0,"a",0)(1,ft,12,8,"section",1),e&2&&(p("ngIf",n.canAdminContents),d(),p("ngIf",n.load))},dependencies:[Y,U,J,w,Te,Se,Ce,he,be,fe,ve,ge,se,ye,ue,de,me,pe,ce,ke,ie,xe,le],styles:[".display-block[_ngcontent-%COMP%]{display:block}"]})};export{Ee as TagComponent};
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.