diff --git a/.gitignore b/.gitignore index 8554711..66317d6 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,6 @@ dist/icons/petrvs/icon-256.png dist/icons/petrvs/icon-32.png dist/icons/petrvs/icon-48.png dist/icons/petrvs/petrvs.png +dist/manifest_antaq_v2.json +dist/manifest_seipro_v2.json +dist/manifest_v2.json diff --git a/dist/config_hosts.json b/dist/config_hosts.json index 52e4afd..ec7c2a1 100644 --- a/dist/config_hosts.json +++ b/dist/config_hosts.json @@ -1,7 +1,6 @@ { "matches": [ ".antaq.gov.br", - ".antt.gov.br", - ".prf.gov.br" + ".antt.gov.br" ] } \ No newline at end of file diff --git a/dist/css/sei-pro.css b/dist/css/sei-pro.css index 27f5d7d..cfa0c8b 100644 --- a/dist/css/sei-pro.css +++ b/dist/css/sei-pro.css @@ -1717,6 +1717,12 @@ table.moreInfoBox td:first-child, background: #f4f5f5; border-radius: 10px; } +.kanban-container .kanban-board .kanban-item .followLinkNewtab { + visibility: hidden; +} +.kanban-container .kanban-board .kanban-item:hover .followLinkNewtab { + visibility: visible; +} .kanban-container .kanban-board { border-radius: 15px; margin-bottom: 20px; @@ -1730,6 +1736,20 @@ table.moreInfoBox td:first-child, .kanban-container .kanban-board[data-id="_niniciadas"] .kanban-board-header { background: #e2e4e6; } +.kanban-container .kanban-board .kanban-collapse { + position: absolute; + top: 18px; + right: 50px; + cursor: pointer; +} +.kanban-board[data-collapse="true"] .kanban-drag { + display: none; + transition: all 0.3s ease-in 0s; +} +.kanban-container .kanban-board .kanban-title-board { + padding: 0 60px 0 0; + display: inline-block; +} .kanban-container .kanban-board[data-id="_niniciadas"] .kanban-title-board::before { content: "\f017"; font-family: 'Font Awesome 5 Free'; @@ -1746,6 +1766,16 @@ table.moreInfoBox td:first-child, padding-right: 10px; color: #4285f4; } +.kanban-container .kanban-board[data-id="_pausadas"], +.kanban-container .kanban-board[data-id="_pausadas"] .kanban-board-header { + background: #e2e4e6; +} +.kanban-container .kanban-board[data-id="_pausadas"] .kanban-title-board::before { + content: "\f28b"; + font-family: 'Font Awesome 5 Free'; + padding-right: 10px; + color: #989898; +} .kanban-container .kanban-board[data-id="_concluidas"], .kanban-container .kanban-board[data-id="_concluidas"] .kanban-board-header { background: #e8f2e7; @@ -1776,6 +1806,50 @@ table.moreInfoBox td:first-child, padding-right: 10px; color: #989898; } +.seiSlim .kanban-container .kanban-board .kanban-title-board::before { + font-family: 'Font Awesome 5 Pro' !important; +} +#processosKanban .kanban-container .kanban-board-header { + background-color: #e2e4e6; +} +#processosKanban .kanban-container .kanban-board .kanban-title-board::before { + font-family: 'Font Awesome 5 Free'; + padding-right: 10px; + color: #747474; +} +.kanban-container .kanban-board .proc_tags .kanban-title-board::before { + content: "\f02b"; +} +.kanban-container .kanban-board .proc_types .kanban-title-board::before { + content: "\f01c"; +} +.kanban-container .kanban-board .proc_acessdate .kanban-title-board::before { + content: "\f1da"; +} +.kanban-container .kanban-board .proc_senddate .kanban-title-board::before { + content: "\f658"; +} +.kanban-container .kanban-board .proc_arrivaldate .kanban-title-board::before { + content: "\f4bd"; +} +.kanban-container .kanban-board .proc_createdate .kanban-title-board::before { + content: "\f5bf"; +} +.kanban-container .kanban-board .proc_deadline .kanban-title-board::before { + content: "\f017"; +} +.kanban-container .kanban-board .proc_checkpoints .kanban-title-board::before { + content: "\f024"; +} +.kanban-container .kanban-board .proc_senddepart .kanban-title-board::before { + content: "\f0b1"; +} +.kanban-container .kanban-board .proc_acompanhamentoesp .kanban-title-board::before { + content: "\f06e"; +} +.kanban-container .kanban-board .proc_users .kanban-title-board::before { + content: "\f007"; +} .kanban-board header .kanban-title-board:after { content: attr(data-count); right: 10px; @@ -1791,6 +1865,7 @@ table.moreInfoBox td:first-child, top: 10px; } .kanban-container .kanban-item.tagKanName_urgente, +.kanban-container .kanban-item[data-class="urgente"], .urgenteBoxDisplay { background: #f9e2e0; } @@ -1840,7 +1915,8 @@ table.moreInfoBox td:first-child, .kanban-container .kanban-item.tagKanban_notmove .item_handle.drag_handler { display: none; } -.kanban-container .kanban-item sub { +.kanban-container .kanban-item sub, +.kanban-container .kanban-item span.sub { display: inline-block; font-size: 90%; color: #717171; @@ -1867,12 +1943,24 @@ table.moreInfoBox td:first-child, .kanban-container.view_full .kanban-item .kanban-actions { display: block !important; } +.kanban-item:hover .info_dates_fav { + display: none !important; +} .kanban-item .kanban-title-card .info { font-size: 12pt; margin: -6px 0 5px 0; font-family: Calibri; font-weight: 100; } +#processosKanban .kanban-description span.sub { + display: block; + padding: 0; + margin: 5px 0; +} +#processosKanban .kanban-title-card .info a { + font-size: 11pt; + text-decoration: none; +} .filterGanttTag { text-align: right; margin-bottom: 10px; @@ -2023,9 +2111,13 @@ table.moreInfoBox td:first-child, color: #017FFF; background: rgb(255 255 255 / 75%); } +.seiSlim.seiSlim_parent.dz-drag-hover:before, .seiSlim.seiSlim_arvore.dz-drag-hover:before { font-family: 'Font Awesome 5 Pro'; } +.seiSlim.seiSlim_parent.dz-drag-hover::before { + padding: calc(25% - 40px) 0; +} .dz-size { background: #eaeaea; border-radius: 5px; @@ -2349,6 +2441,7 @@ a.newLink.filterTableProcessos.newLink_active i { } .infraTable.tablesorter.hasFilters { position: relative; + margin-top: 30px; } .atividadeWork span.ativProcessos { padding: 3px 5px; @@ -2369,6 +2462,28 @@ a.newLink.filterTableProcessos.newLink_active i { border-left: 2px solid #ccc; display: inline-block; } +#atividadesPro.minView .modulesActions { + position: absolute; + left: -170px; + top: 40px; +} +#atividadesPro #tabelaAtivPanel .filterTableAtivStatus { + right: 320px; +} +#atividadesPro.minView #tabelaAtivPanel .filterTableAtivStatus { + right: 170px !important; +} +#atividadesPro #tabelaAtivPanel .filterTablePro span.text, +#atividadesPro .atividadesBtnPanel .text { + display: inline; +} +#atividadesPro.minView #tabelaAtivPanel .filterTablePro span.text, +#atividadesPro.minView .atividadesBtnPanel .text { + display: none; +} +#atividadesPro.minView .modulesActions:has(.iconLabel) { + margin-top: 20px; +} #divInfraAreaTelaD { position: relative; } @@ -2551,9 +2666,14 @@ td.editCellLoadingError:after { .tableFollow tr.closed td:nth-child(2):before { content: "ENCERRADO" !important; } +.tableFollow tr.future:has(td div.chosen-container), .tableFollow tr.closed:has(td div.chosen-container) { opacity: 1 !important; } +.tableFollow tr.future td[data-text] div.chosen-container, +.tableFollow tr.closed td[data-text] div.chosen-container { + max-width: 60%; +} .tableFollow tr.disabled td:nth-child(2):before { content: "DESATIVADO" !important; background: #dedede; @@ -2620,7 +2740,7 @@ td.inEdit:hover:after { } .infraAreaTelaE.menuSuspenso { position: absolute; - z-index: 999; + z-index: 9999; box-shadow: 3px 3px 5px 0px #8686868a; background: #fff; } @@ -2706,6 +2826,7 @@ div#divInfraBarraSistemaE.barSuspenso:before { } .stickDadosArvore { transition: all 300ms linear; + min-width: 360px; } .stickDadosArvore .actions { position: absolute; @@ -3077,6 +3198,9 @@ div.infraTooltipTexto i.far { div[role="dialog"].ui-dialog.hidePrint { display: none !important; } + .tabelaPanelScroll { + height: fit-content !important; + } } .seiProForm .signed, .editorBoxProDiv .signed { @@ -3217,6 +3341,10 @@ div#divInfraTooltip { text-align: left; min-height: 35px; } +.inlineAlert a { + font-size: 100%; + color: #00c; +} #tabelaAtivPanel .inlineAlert { min-height: 25px; } @@ -3406,4 +3534,211 @@ input[type="currency"]{ .newSEI #iconsActions .newLink .fa-layers-counter { font-size: 1.5em; color: #fff; +} +.ui-dialog .ui-dialog-buttonset button.ui-state-active .ui-button-icon { + filter: brightness(4); +} +.newSEI #divTabelaProcesso { + overflow-y: initial !important; +} +.tableIDInfo tbody td:first-child:after { + content: "#"attr(data-id); + font-size: 9px; + font-family: monospace; + color: #888; + vertical-align: super; +} +.blinker { + opacity: 1; + margin-bottom: -2px; + height: 15px; + margin-left: -5px; + border-left: 7px solid #9e9e9e !important; + animation: blinker 0.9s steps(2, start) infinite; +} + +@keyframes blinker { + to { + visibility: hidden; + } +} +.hrTempoDir { + width: 100px; + position: absolute; + height: 2px; + background: #ccc; + transform: rotate(45deg); + margin: -6px 0px 0px -28px; +} +.hrTempoEsq { + width: 100px; + position: absolute; + height: 2px; + background: #ccc; + transform: rotate(-45deg); + margin: -6px 0px 0px -28px; +} +.ck-body-wrapper { + position: relative; + z-index: 99999; +} +.chosen-container.chosen-repair-firefox { + position: absolute; + top: 5px; +} +.contatoPanelPro .unidade { + margin: 15px 0 0; + font-size: 14pt; + font-family: Calibri; +} +.contatoPanelPro .separator { + margin-left: 50px; +} +.contatoPanelPro .unidade .count { + height: 20px; + display: inline-block; + width: 20px; + text-align: center; + font-size: 9pt; + padding: 0; + line-height: 20px; + background-color: #e1e1e1; + color: #898989; + margin: 0 10px; + border-radius: 50%; +} +.contatoPanelPro .unidade .toggle { + font-size: 12pt; + margin: 0; + cursor: pointer; +} +.contatoPanelPro .contatos.separator_1 { + margin-left: 50px; +} +.contatoPanelPro .contatos.separator_2 { + margin-left: 100px; +} +.contatoPanelPro .contatos.separator_3 { + margin-left: 150px; +} +.contatoPanelPro .contatos.separator_4 { + margin-left: 200px; +} +.contatoPanelPro .contatos.separator_5 { + margin-left: 250px; +} +.contatoPanelPro .contatos { + display: none; + background-color: #f4f5f5; + border-radius: 10px; + margin: 10px; + padding: 10px; +} +.contatoPanelPro .contato { + padding: 10px; + margin: 10px; + display: inline-grid; + font-size: 10pt; + border-radius: 5px; + box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 6px; + background-color: #fff; + min-height: 100px; +} +.contatoPanelPro .contato:hover { + box-shadow: rgba(0, 0, 0, 0.2) 0px 4px 6px 5px; + transform: scale3d(1.05, 1.05, 1.05); + transition: all 100ms linear; +} +.contatoPanelPro .contato span.nome { + padding: 5px 0; +} +.contatoPanelPro .contato span.modalidade { + font-style: italic; +} +.contatoPanelPro .contato:hover span.celular { + display: initial; +} +.contatoPanelPro .contato span.celular { + display: none; +} +.contatoPanelPro .contato span.celular, +.contatoPanelPro .contato span.email, +.contatoPanelPro .contato span.modalidade, +.contatoPanelPro .contato span.motivo_afastamento { + font-size: 8pt; +} +.contatoPanelPro .contato span.celular a, +.contatoPanelPro .contato span.email a, +.contatoPanelPro .contato span.modalidade a, +.contatoPanelPro .contato span.motivo_afastamento a { + text-decoration: none; + color: #999; + margin: 0 !important; +} +.dz-infoupload-home { + display: inline-block; + padding: 0; + position: initial; + margin: 0 0 20px 0; + height: 150px; + background: #f9f9f9; + width: calc(100% - 30px); + border-radius: 10px; + border: 3px dashed #e4e9e9; +} +.dz-infoupload-home .text { + background: transparent !important; + margin-top: 20px; +} +.dz-infoupload-home .cancel { + border-radius: 10px; + margin: 0; +} +.dot-flashing { + position: relative; + width: 7px; + height: 7px; + border-radius: 50%; + background-color: #4285F4; + color: #4285F4; + animation: dot-flashing 1s infinite linear alternate; + animation-delay: 0.5s; +} +.dot-flashing::before, .dot-flashing::after { + content: ""; + display: inline-block; + position: absolute; + top: 0; +} +.dot-flashing::before { + left: -13px; + width: 7px; + height: 7px; + border-radius: 5px; + background-color: #4285F4; + color: #4285F4; + animation: dot-flashing 1s infinite alternate; + animation-delay: 0s; +} +.dot-flashing::after { + left: 13px; + width: 7px; + height: 7px; + border-radius: 50%; + background-color: #4285F4; + color: #4285F4; + animation: dot-flashing 1s infinite alternate; + animation-delay: 1s; +} + +@keyframes dot-flashing { + 0% { + background-color: #4285F4; + } + 50%, 100% { + background-color: rgba(152, 128, 255, 0.2); + } +} +.cke_dialog_ui_labeled_content:has(select.cke_dialog_ui_input_select) { + min-height: 30px; } \ No newline at end of file diff --git a/dist/css/sei-slim.css b/dist/css/sei-slim.css index 4eaef83..9ece5a5 100644 --- a/dist/css/sei-slim.css +++ b/dist/css/sei-slim.css @@ -1237,6 +1237,7 @@ body.dark-mode, .seiSlim.dark-mode #ImageEditorPro div[class*="-option-triggerer"]:hover *, .seiSlim.dark-mode #ImageEditorPro div[class*="-tool-button"]:hover *, .seiSlim.dark-mode #capaProcessoPro .data a.newLink:hover, +.seiSlim.dark-mode .alertaErrorPro .errorReport, .seiSlim.dark-mode select option:checked { color: #202123 !important; } @@ -1251,6 +1252,7 @@ body.dark-mode, .seiSlim.dark-mode .dd-options a, .seiSlim.dark-mode .chosen-container, .seiSlim.dark-mode .chosen-container .chosen-single, +.seiSlim.dark-mode .chosen-container .search-choice, .seiSlim.dark-mode .chosen-container .chosen-drop, .seiSlim.dark-mode div.infraAjaxAutoCompletar, .seiSlim.dark-mode .ui-dialog-titlebar, @@ -1297,6 +1299,8 @@ body.dark-mode, .seiSlim.dark-mode .dd-options a, .seiSlim.dark-mode .chosen-container, .seiSlim.dark-mode .chosen-container .chosen-single, +.seiSlim.dark-mode .chosen-container .search-choice, +.seiSlim.dark-mode .chosen-container .chosen-choices, .seiSlim.dark-mode .chosen-container .chosen-drop, .seiSlim.dark-mode div.infraAjaxAutoCompletar, .seiSlim.dark-mode .ui-button, @@ -1338,7 +1342,8 @@ body.dark-mode, text-shadow: none; box-shadow: none; } -.seiSlim.dark-mode .chosen-container .chosen-single { +.seiSlim.dark-mode .chosen-container .chosen-single, +.seiSlim.dark-mode .chosen-container .search-choice { background: #2A2A2D !important; } .seiSlim.dark-mode .tool-container.tool-bottom .arrow { @@ -1361,6 +1366,7 @@ body.dark-mode, .seiSlim.dark-mode div.tituloProcessoDocumento, .seiSlim.dark-mode .ui-tabs .ui-tabs-nav li, .seiSlim.dark-mode .content_edit [contenteditable="true"], +.seiSlim.dark-mode .chosen-container .chosen-choices, .seiSlim.dark-mode .ui-tabs-nav .ui-tabs-anchor { border-color: #494c50 !important; color: #fbfbfe; @@ -1391,6 +1397,7 @@ body.dark-mode, .seiSlim.dark-mode .content_desc div, .seiSlim.dark-mode .tool-container .tool-item .info, .seiSlim.dark-mode div.chosen-container a.chosen-single span, +.seiSlim.dark-mode div.chosen-container .search-choice span, .seiSlim.dark-mode div.infraAjaxAutoCompletar li a, .seiSlim.dark-mode .newLink_active.content_btnsave i, .seiSlim.dark-mode .info_tags_pacto .tag_text i, @@ -1581,6 +1588,8 @@ body.dark-mode, } .seiSlim a.botaoSEI[href*="?acao=procedimento_enviar"], .seiSlim a.botaoSEI[onclick*="?acao=procedimento_enviar"], +.seiSlim a.botaoSEI[href*="?acao=procedimento_credencial_gerenciar"], +.seiSlim a.botaoSEI[href*="?acao=credencial_assinatura_gerenciar"], .seiSlim a.botaoSEI[href*="?acao=procedimento_atualizar_andamento"], .seiSlim a.botaoSEI[onclick*="?acao=procedimento_atualizar_andamento"], .seiSlim a.botaoSEI[href*="?acao=procedimento_atribuicao_cadastrar"], @@ -1592,6 +1601,7 @@ body.dark-mode, .seiSlim a.botaoSEI[href*="?acao=andamento_marcador_gerenciar"], .seiSlim a.botaoSEI[onclick*="?acao=andamento_marcador_gerenciar"], .seiSlim a.botaoSEI[href*="?acao=assinatura_externa_gerenciar"], +.seiSlim a.botaoSEI[href*="?acao=publicacao_agendar"], .seiSlim a.botaoSEI[onclick*="acaoBlocoProcessar("], .seiSlim a.botaoSEI[onclick*="acao=andamento_situacao_gerenciar"], .seiSlim a.botaoSEI[onclick*="listarCredenciais("], @@ -1620,10 +1630,16 @@ body.dark-mode, .seiSlim td:last-child a[href*="acao=rel_bloco_protocolo_listar"], .seiSlim a[href*="acao=texto_padrao_interno_alterar"], .seiSlim a[href*="acao=contato_consultar"], +.seiSlim a[href*="acao=grupo_unidade_consultar"], +.seiSlim a[href*="acao=grupo_contato_consultar"], +.seiSlim a[href*="acao=grupo_email_consultar"], .seiSlim a[href*="acao=usuario_externo_consultar"], .seiSlim a[href*="acao=texto_padrao_interno_consultar"], .seiSlim a[href*="acao=protocolo_modelo_alterar"], .seiSlim a[href*="acao=acompanhamento_alterar"], +.seiSlim a[href*="acao=grupo_unidade_alterar"], +.seiSlim a[href*="acao=grupo_contato_alterar"], +.seiSlim a[href*="acao=grupo_email_alterar"], .seiSlim a[href*="acao=marcador_alterar"], .seiSlim a[href*="acao=bloco_reuniao_alterar"], .seiSlim a[href*="acao=bloco_interno_alterar"], @@ -1660,6 +1676,7 @@ a[href*="andamento_marcador_gerenciar"][data-color], .seiSlim a.botaoSEI[onclick*="?acao=documento_gerar_multiplo"], .seiSlim a.botaoSEI[onclick="removerSobrestamentoProcesso();"], .seiSlim a.botaoSEI[onclick="cienciaProcesso();"], +.seiSlim a.botaoSEI[onclick="renunciarCredencial();"], .seiSlim a.botaoSEI[onclick="cienciaDocumento();"], .seiSlim a.botaoSEI[onclick="assinarDocumento();"], .seiSlim a.botaoSEI[onclick="enviarEmailProcedimento();"], @@ -1677,9 +1694,13 @@ a[href*="andamento_marcador_gerenciar"][data-color], .seiSlim a.botaoSEI[onclick*="saveAtividade("], .seiSlim a.botaoSEI[onclick*="selectAtividadeBox("], .seiSlim a.botaoSEI[onclick*="addControlePrazo("], +.seiSlim a.botaoSEI[onclick*="dialogChangeTypeProc("], +.seiSlim a.botaoSEI[onclick*="initUploadFilesInProcess("], +.seiSlim a.botaoSEI[onclick*="checkDadosAcompEspecial("], .seiSlim a.botaoSEI[onclick*="openListNewTab("], .seiSlim a.botaoSEI[onclick*="getChecksumPro("], .seiSlim a.botaoSEI[onclick*="getDosimetria("], +.seiSlim a.botaoSEI[onclick*="dialogRelatoriosSFIS("], .seiSlim a.botaoSEI[onclick*="getDocumentosActions("], .seiSlim a[id*="anchorImg"][data-img], .seiSlim span.infraImgPro[data-img], @@ -1689,6 +1710,7 @@ a[href*="andamento_marcador_gerenciar"][data-color], .seiSlim #topmenu a.clipboard[id*="anchorImg"], .seiSlim a[href*="javascript:alert('Acesso Restrito"], .seiSlim a[target="ifrVisualizacao"][href*="?acao=base_conhecimento_listar_associadas"], +.seiSlim a[target="ifrVisualizacao"][href*="?acao=acompanhamento_cadastrar"], .seiSlim a[target="ifrVisualizacao"][href*="?acao=protocolo_ciencia_listar"] { position: relative; border: none; @@ -1700,6 +1722,8 @@ a[href*="andamento_marcador_gerenciar"][data-color], .seiSlim a.botaoSEI[onclick="removerSobrestamentoProcesso();"] img:hover, .seiSlim a.botaoSEI[onclick="cienciaProcesso();"] img, .seiSlim a.botaoSEI[onclick="cienciaProcesso();"] img:hover, +.seiSlim a.botaoSEI[onclick="renunciarCredencial();"] img, +.seiSlim a.botaoSEI[onclick="renunciarCredencial();"] img:hover, .seiSlim a.botaoSEI[onclick="assinarDocumento();"] img, .seiSlim a.botaoSEI[onclick="assinarDocumento();"] img:hover, .seiSlim a.botaoSEI[onclick="enviarEmailProcedimento();"] img, @@ -1730,12 +1754,20 @@ a[href*="andamento_marcador_gerenciar"][data-color], .seiSlim a.botaoSEI[onclick*="selectAtividadeBox("] img:hover, .seiSlim a.botaoSEI[onclick*="addControlePrazo("] img, .seiSlim a.botaoSEI[onclick*="addControlePrazo("] img:hover, +.seiSlim a.botaoSEI[onclick*="dialogChangeTypeProc("] img, +.seiSlim a.botaoSEI[onclick*="dialogChangeTypeProc("] img:hover, +.seiSlim a.botaoSEI[onclick*="initUploadFilesInProcess("] img, +.seiSlim a.botaoSEI[onclick*="initUploadFilesInProcess("] img:hover, +.seiSlim a.botaoSEI[onclick*="checkDadosAcompEspecial("] img, +.seiSlim a.botaoSEI[onclick*="checkDadosAcompEspecial("] img:hover, .seiSlim a.botaoSEI[onclick*="openListNewTab("] img, .seiSlim a.botaoSEI[onclick*="openListNewTab("] img:hover, .seiSlim a.botaoSEI[onclick*="getChecksumPro("] img, .seiSlim a.botaoSEI[onclick*="getChecksumPro("] img:hover, .seiSlim a.botaoSEI[onclick*="getDosimetria("] img, .seiSlim a.botaoSEI[onclick*="getDosimetria("] img:hover, +.seiSlim a.botaoSEI[onclick*="dialogRelatoriosSFIS("] img, +.seiSlim a.botaoSEI[onclick*="dialogRelatoriosSFIS("] img:hover, .seiSlim a.botaoSEI[onclick*="getDocumentosActions("] img, .seiSlim a.botaoSEI[onclick*="getDocumentosActions("] img:hover, .seiSlim a.botaoSEI[href*="?acao=procedimento_atribuicao_cadastrar"] img, @@ -1754,12 +1786,18 @@ a[href*="andamento_marcador_gerenciar"][data-color], .seiSlim a.botaoSEI[href*="?acao=andamento_marcador_gerenciar"] img:hover, .seiSlim a.botaoSEI[onclick*="?acao=andamento_marcador_gerenciar"] img, .seiSlim a.botaoSEI[onclick*="?acao=andamento_marcador_gerenciar"] img:hover, +.seiSlim a.botaoSEI[href*="?acao=procedimento_credencial_gerenciar"] img, +.seiSlim a.botaoSEI[href*="?acao=procedimento_credencial_gerenciar"] img:hover, +.seiSlim a.botaoSEI[href*="?acao=credencial_assinatura_gerenciar"] img, +.seiSlim a.botaoSEI[href*="?acao=credencial_assinatura_gerenciar"] img:hover, .seiSlim a.botaoSEI[href*="?acao=procedimento_atualizar_andamento"] img, .seiSlim a.botaoSEI[href*="?acao=procedimento_atualizar_andamento"] img:hover, .seiSlim a.botaoSEI[onclick*="?acao=procedimento_atualizar_andamento"] img, .seiSlim a.botaoSEI[onclick*="?acao=procedimento_atualizar_andamento"] img:hover, .seiSlim a.botaoSEI[href*="?acao=assinatura_externa_gerenciar"] img, .seiSlim a.botaoSEI[href*="?acao=assinatura_externa_gerenciar"] img:hover, +.seiSlim a.botaoSEI[href*="?acao=publicacao_agendar"] img, +.seiSlim a.botaoSEI[href*="?acao=publicacao_agendar"] img:hover, .seiSlim a.botaoSEI[onclick*="acaoBlocoProcessar("] img, .seiSlim a.botaoSEI[onclick*="acaoBlocoProcessar("] img:hover, .seiSlim a.botaoSEI[onclick*="listarCredenciais("] img, @@ -1816,6 +1854,12 @@ a[href*="andamento_marcador_gerenciar"][data-color], .seiSlim a[href*="acao=texto_padrao_interno_alterar"] img:hover, .seiSlim a[href*="acao=contato_consultar"] img, .seiSlim a[href*="acao=contato_consultar"] img:hover, +.seiSlim a[href*="acao=grupo_unidade_consultar"] img, +.seiSlim a[href*="acao=grupo_unidade_consultar"] img:hover, +.seiSlim a[href*="acao=grupo_contato_consultar"] img, +.seiSlim a[href*="acao=grupo_contato_consultar"] img:hover, +.seiSlim a[href*="acao=grupo_email_consultar"] img, +.seiSlim a[href*="acao=grupo_email_consultar"] img:hover, .seiSlim a[href*="acao=usuario_externo_consultar"] img, .seiSlim a[href*="acao=usuario_externo_consultar"] img:hover, .seiSlim a[href*="acao=texto_padrao_interno_consultar"] img, @@ -1824,6 +1868,12 @@ a[href*="andamento_marcador_gerenciar"][data-color], .seiSlim a[href*="acao=protocolo_modelo_alterar"] img:hover, .seiSlim a[href*="acao=acompanhamento_alterar"] img, .seiSlim a[href*="acao=acompanhamento_alterar"] img:hover, +.seiSlim a[href*="acao=grupo_unidade_alterar"] img, +.seiSlim a[href*="acao=grupo_unidade_alterar"] img:hover, +.seiSlim a[href*="acao=grupo_contato_alterar"] img, +.seiSlim a[href*="acao=grupo_contato_alterar"] img:hover, +.seiSlim a[href*="acao=grupo_email_alterar"] img, +.seiSlim a[href*="acao=grupo_email_alterar"] img:hover, .seiSlim a[href*="acao=marcador_alterar"] img, .seiSlim a[href*="acao=marcador_alterar"] img:hover, .seiSlim a[href*="acao=bloco_reuniao_alterar"] img, @@ -1912,6 +1962,8 @@ span.tagUserColorPro[data-color] img:hover, .seiSlim a[href*="javascript:alert('Acesso Restrito"] img:hover, .seiSlim a[target="ifrVisualizacao"][href*="?acao=base_conhecimento_listar_associadas"] img, .seiSlim a[target="ifrVisualizacao"][href*="?acao=base_conhecimento_listar_associadas"] img:hover, +.seiSlim a[target="ifrVisualizacao"][href*="?acao=acompanhamento_cadastrar"] img, +.seiSlim a[target="ifrVisualizacao"][href*="?acao=acompanhamento_cadastrar"] img:hover, .seiSlim a[target="ifrVisualizacao"][href*="?acao=protocolo_ciencia_listar"] img, .seiSlim a[target="ifrVisualizacao"][href*="?acao=protocolo_ciencia_listar"] img:hover { opacity: 0 !important; @@ -1919,6 +1971,7 @@ span.tagUserColorPro[data-color] img:hover, .seiSlim a.botaoSEI[onclick="cienciaDocumento();"]:before, .seiSlim a.botaoSEI[onclick="removerSobrestamentoProcesso();"]:before, .seiSlim a.botaoSEI[onclick="cienciaProcesso();"]:before, +.seiSlim a.botaoSEI[onclick="renunciarCredencial();"]:before, .seiSlim a.botaoSEI[onclick="assinarDocumento();"]:before, .seiSlim a.botaoSEI[onclick="enviarEmailProcedimento();"]:before, .seiSlim a.botaoSEI[onclick="enviarEmailDocumento();"]:before, @@ -1934,10 +1987,16 @@ span.tagUserColorPro[data-color] img:hover, .seiSlim a.botaoSEI[onclick*="saveAtividade("]:before, .seiSlim a.botaoSEI[onclick*="selectAtividadeBox("]:before, .seiSlim a.botaoSEI[onclick*="addControlePrazo("]:before, +.seiSlim a.botaoSEI[onclick*="dialogChangeTypeProc("]:before, +.seiSlim a.botaoSEI[onclick*="initUploadFilesInProcess("]:before, +.seiSlim a.botaoSEI[onclick*="checkDadosAcompEspecial("]:before, .seiSlim a.botaoSEI[onclick*="openListNewTab("]:before, .seiSlim a.botaoSEI[onclick*="getChecksumPro("]:before, .seiSlim a.botaoSEI[onclick*="getDosimetria("]:before, +.seiSlim a.botaoSEI[onclick*="dialogRelatoriosSFIS("]:before, .seiSlim a.botaoSEI[onclick*="getDocumentosActions("]:before, +.seiSlim a.botaoSEI[href*="?acao=procedimento_credencial_gerenciar"]:before, +.seiSlim a.botaoSEI[href*="?acao=credencial_assinatura_gerenciar"]:before, .seiSlim a.botaoSEI[href*="?acao=procedimento_atualizar_andamento"]:before, .seiSlim a.botaoSEI[onclick*="?acao=procedimento_atualizar_andamento"]:before, .seiSlim a.botaoSEI[href*="?acao=procedimento_atribuicao_cadastrar"]:before, @@ -1949,6 +2008,7 @@ span.tagUserColorPro[data-color] img:hover, .seiSlim a.botaoSEI[href*="?acao=andamento_marcador_gerenciar"]:before, .seiSlim a.botaoSEI[onclick*="?acao=andamento_marcador_gerenciar"]:before, .seiSlim a.botaoSEI[href*="?acao=assinatura_externa_gerenciar"]:before, +.seiSlim a.botaoSEI[href*="?acao=publicacao_agendar"]:before, .seiSlim a.botaoSEI[onclick*="acaoBlocoProcessar("]:before, .seiSlim a.botaoSEI[onclick*="listarCredenciais("]:before, .seiSlim a.botaoSEI[onclick*="acao=andamento_situacao_gerenciar"]:before, @@ -2025,13 +2085,19 @@ span.tagUserColorPro[data-color] img:hover, .seiSlim a[href*="alert('Retorno Programado:"]:before, .seiSlim a[href*="&abrir_pastas=1"]:before, .seiSlim a[href*="&fechar_pastas=1"]:before, -.seiSlim td:last-child a[href*="acao=rel_bloco_protocolo_listar"]:before, +.seiSlim table:not(#tblHistorico) td:last-child a[href*="acao=rel_bloco_protocolo_listar"]:before, .seiSlim a[href*="acao=texto_padrao_interno_alterar"]:before, .seiSlim a[href*="acao=contato_consultar"]:before, +.seiSlim a[href*="acao=grupo_unidade_consultar"]:before, +.seiSlim a[href*="acao=grupo_contato_consultar"]:before, +.seiSlim a[href*="acao=grupo_email_consultar"]:before, .seiSlim a[href*="acao=usuario_externo_consultar"]:before, .seiSlim a[href*="acao=texto_padrao_interno_consultar"]:before, .seiSlim a[href*="acao=protocolo_modelo_alterar"]:before, .seiSlim a[href*="acao=acompanhamento_alterar"]:before, +.seiSlim a[href*="acao=grupo_unidade_alterar"]:before, +.seiSlim a[href*="acao=grupo_contato_alterar"]:before, +.seiSlim a[href*="acao=grupo_email_alterar"]:before, .seiSlim a[href*="acao=marcador_alterar"]:before, .seiSlim a[href*="acao=bloco_reuniao_alterar"]:before, .seiSlim a[href*="acao=bloco_interno_alterar"]:before, @@ -2058,6 +2124,7 @@ a[href*="andamento_marcador_gerenciar"][data-color]:before, .seiSlim a[href*="?acao=usuario_externo_alterar"]:before, .seiSlim a[onclick*="setSelectAllTr"]:before, .seiSlim a[target="ifrVisualizacao"][href*="?acao=base_conhecimento_listar_associadas"]:before, +.seiSlim a[target="ifrVisualizacao"][href*="?acao=acompanhamento_cadastrar"]:before, .seiSlim a[target="ifrVisualizacao"][href*="?acao=protocolo_ciencia_listar"]:before { position: absolute; font-family: 'Font Awesome 5 Pro'; @@ -2100,6 +2167,7 @@ a[href*="andamento_marcador_gerenciar"][data-color]:before { position: relative; } .seiSlim .tableInfo a[href*="?acao=anotacao_registrar"]:before, +.seiSlim .kanban-content a[href*="?acao=anotacao_registrar"]:before, .seiSlim .infraTable a[href*="?acao=anotacao_registrar"]:before { padding: 0 !important; top: 0 !important; @@ -2316,6 +2384,11 @@ a[href*="andamento_marcador_gerenciar"][data-color]:before { content: "\f164"; color: #34caef; } +.seiSlim a.botaoSEI[onclick="renunciarCredencial();"]:after, +.seiSlim a.botaoSEI[onclick="renunciarCredencial();"]:before { + content: "\e073"; + color: #e46e64; +} .seiSlim a.botaoSEI[onclick="assinarDocumento();"]:after, .seiSlim a.botaoSEI[onclick="assinarDocumento();"]:before { content: "\f305"; @@ -2379,6 +2452,11 @@ a[href*="andamento_marcador_gerenciar"][data-color]:before { content: "\f662"; color: #34caef; } +.seiSlim a.botaoSEI[onclick*="dialogRelatoriosSFIS("]:after, +.seiSlim a.botaoSEI[onclick*="dialogRelatoriosSFIS("]:before { + content: "\f65b"; + color: #7562d8; +} .seiSlim a.botaoSEI[onclick*="reabrirProcesso("]:after, .seiSlim a.botaoSEI[onclick*="reabrirProcesso("]:before { content: "\f07c"; @@ -2419,11 +2497,41 @@ a[href*="andamento_marcador_gerenciar"][data-color]:before { content: "\f017"; color: #4285f4; } +.seiSlim a.botaoSEI[onclick*="initUploadFilesInProcess("]:after, +.seiSlim a.botaoSEI[onclick*="initUploadFilesInProcess("]:before { + content: "\f574"; + color: #7562d8; +} +.seiSlim a.botaoSEI[onclick*="checkDadosAcompEspecial("]:after, +.seiSlim a.botaoSEI[onclick*="checkDadosAcompEspecial("]:before { + content: "\e053"; + color: #7562d8; +} +.seiSlim a.botaoSEI.iconLoading:after, +.seiSlim a.botaoSEI.iconLoading:before { + content: "\f110" !important; + animation: fa-spin 2s linear infinite; +} +.seiSlim a.botaoSEI[onclick*="dialogChangeTypeProc("]:after, +.seiSlim a.botaoSEI[onclick*="dialogChangeTypeProc("]:before { + content: "\f05a"; + color: #4285f4; +} .seiSlim a.botaoSEI[onclick*="openListNewTab("]:after, .seiSlim a.botaoSEI[onclick*="openListNewTab("]:before { content: "\f35d"; color: #4285f4; } +.seiSlim a.botaoSEI[href*="?acao=procedimento_credencial_gerenciar"]:after, +.seiSlim a.botaoSEI[href*="?acao=procedimento_credencial_gerenciar"]:before { + content: "\f509"; + color: #4285f4; +} +.seiSlim a.botaoSEI[href*="?acao=credencial_assinatura_gerenciar"]:after, +.seiSlim a.botaoSEI[href*="?acao=credencial_assinatura_gerenciar"]:before { + content: "\f4ff"; + color: #7562d8; +} .seiSlim a.botaoSEI[href*="?acao=procedimento_atualizar_andamento"]:after, .seiSlim a.botaoSEI[onclick*="?acao=procedimento_atualizar_andamento"]:after, .seiSlim a.botaoSEI[href*="?acao=procedimento_atualizar_andamento"]:before, @@ -2465,6 +2573,11 @@ a[href*="andamento_marcador_gerenciar"][data-color]:before { content: "\f573"; color: #dec20f; } +.seiSlim a.botaoSEI[href*="?acao=publicacao_agendar"]:after, +.seiSlim a.botaoSEI[href*="?acao=publicacao_agendar"]:before { + content: "\f1ea"; + color: #dec20f; +} .seiSlim a.botaoSEI[onclick*="acaoBlocoProcessar("]:after, .seiSlim a.botaoSEI[onclick*="incluirEmBloco("]:after, .seiSlim a.botaoSEI[href*="?acao=bloco_escolher"]:after { @@ -2477,6 +2590,9 @@ a[href*="andamento_marcador_gerenciar"][data-color]:before { content: "\f02d"; color: #4285f4; } +.seiSlim a.verdeColor.botaoSEI[onclick*="incluirEmBloco("]:before { + color: #9cb639 !important; +} .seiSlim a.botaoSEI[onclick*="listarCredenciais("]:after{ content: "\10f502"; color: #dec20f; @@ -2594,6 +2710,10 @@ a[href*="andamento_marcador_gerenciar"][data-color]:before { content: "\f032"; color: #4285f4; } +.seiSlim a[target="ifrVisualizacao"][href*="?acao=acompanhamento_cadastrar"]:before { + content: "\f06e"; + color: #4285f4; +} .seiSlim a[href*="&abrir_pastas=1"]:before { content: "\f055"; color: #9cb639; @@ -2611,6 +2731,9 @@ a[href*="andamento_marcador_gerenciar"][data-color]:before { color: #d8a63a; margin-left: 3px; } +.seiSlim select.infraSelect[multiple="multiple"] { + min-height: 100px; +} .seiSlim a[href*="(atrasado "]:before { color: #e46e64 !important; } @@ -2693,6 +2816,9 @@ a[data-shadow="true"]:before { .seiSlim a[href*="acao=texto_padrao_interno_alterar"]:before, .seiSlim a[onclick*="acaoAlterar("]:before, .seiSlim a[href*="acao=acompanhamento_alterar"]:before, +.seiSlim a[href*="acao=grupo_unidade_alterar"]:before, +.seiSlim a[href*="acao=grupo_contato_alterar"]:before, +.seiSlim a[href*="acao=grupo_email_alterar"]:before, .seiSlim a[href*="acao=marcador_alterar"]:before, .seiSlim a[href*="acao=bloco_reuniao_alterar"]:before, .seiSlim a[href*="acao=bloco_interno_alterar"]:before, @@ -2725,13 +2851,16 @@ a[data-shadow="true"]:before { transform: scaley(-1); } .seiSlim a[href*="acao=contato_consultar"]:before, +.seiSlim a[href*="acao=grupo_unidade_consultar"]:before, +.seiSlim a[href*="acao=grupo_contato_consultar"]:before, +.seiSlim a[href*="acao=grupo_email_consultar"]:before, .seiSlim a[href*="acao=usuario_externo_consultar"]:before, .seiSlim a[href*="acao=texto_padrao_interno_consultar"]:before { content: "\f002"; color: #4285f4; top: 0; } -.seiSlim td:last-child a[href*="acao=rel_bloco_protocolo_listar"]:before { +.seiSlim table:not(#tblHistorico) td:last-child a[href*="acao=rel_bloco_protocolo_listar"]:before { content: "\f022"; color: #4285f4; top: 0; @@ -2898,6 +3027,7 @@ a[data-shadow="true"]:before { top: 0; margin-left: 40px !important; counter-increment: seipro_counter; + line-height: initial !important; } .linhaNumerada:after { counter-increment: seipro_counter !important; @@ -2994,6 +3124,8 @@ td .linhaNumerada:after { .seiSlim.seiSlim_parent.seiSlim_view span.cke_button_icon.cke_button__linklegis_icon, .seiSlim.seiSlim_parent.seiSlim_view span.cke_button_icon.cke_button__citacaodoc_icon, .seiSlim.seiSlim_parent.seiSlim_view span.cke_button_icon.cke_button__notarodape_icon, +.seiSlim.seiSlim_parent.seiSlim_view span.cke_button_icon.cke_button__refinterna_icon, +.seiSlim.seiSlim_parent.seiSlim_view span.cke_button_icon.cke_button__openai_icon, .seiSlim.seiSlim_parent.seiSlim_view span.cke_button_icon.cke_button__sumario_icon, .seiSlim.seiSlim_parent.seiSlim_view span.cke_button_icon.cke_button__dadosprocesso_icon, .seiSlim.seiSlim_parent.seiSlim_view span.cke_button_icon.cke_button__tinyurl_icon, @@ -3004,6 +3136,8 @@ td .linhaNumerada:after { .seiSlim.seiSlim_parent.seiSlim_view span.cke_button_icon.cke_button__processopublico_icon, .seiSlim.seiSlim_parent.seiSlim_view span.cke_button_icon.cke_button__watermark_icon, .seiSlim.seiSlim_parent.seiSlim_view span.cke_button_icon.cke_button__boxsigilo_icon, +.seiSlim.seiSlim_parent.seiSlim_view span.cke_button_icon.cke_button__ctr_review_icon, +.seiSlim.seiSlim_parent.seiSlim_view span.cke_button_icon.cke_button__review_icon, .seiSlim.seiSlim_parent.seiSlim_view span.cke_button_icon.cke_button__natjus_icon, .seiSlim.seiSlim_parent.seiSlim_view span.cke_button_icon.cke_button__tablestyles_icon, .seiSlim.seiSlim_parent.seiSlim_view span.cke_button_icon.cke_button__quicktable_icon, @@ -3222,6 +3356,14 @@ td .linhaNumerada:after { content: "\f4a3"; color: #34caef; } +.seiSlim.seiSlim_parent.seiSlim_view span.cke_button_icon.cke_button__refinterna_icon:before { + content: "\f079"; + color: #E46E64; +} +.seiSlim.seiSlim_parent.seiSlim_view span.cke_button_icon.cke_button__openai_icon:before { + content: "\f544"; + color: #7562D8; +} .seiSlim.seiSlim_parent.seiSlim_view span.cke_button_icon.cke_button__sumario_icon:before { content: "\f022"; color: #7562D8; @@ -3268,6 +3410,14 @@ td .linhaNumerada:after { content: "\e058"; color: #4285f4; } +.seiSlim.seiSlim_parent.seiSlim_view span.cke_button_icon.cke_button__ctr_review_icon:before { + content: "\f086"; + color: #4285f4; +} +.seiSlim.seiSlim_parent.seiSlim_view span.cke_button_icon.cke_button__review_icon:before { + content: "\f4ff"; + color: #4285f4; +} .seiSlim.seiSlim_parent.seiSlim_view span.cke_button_icon.cke_button__natjus_icon:before { content: "\f46b"; color: #34caef; @@ -3596,4 +3746,118 @@ div#capaProcessoPro .data a.newLink.newLink_confirm:hover { a.newLink_confirm i, a.newLink_confirm:hover i { color: #fff !important; +} +.seiSlim form[id*="frmGrupo"] .infraImgPro[data-img*="/lupa.gif"] { + position: relative !important; + top: -20px; +} +.seiSlim form[id*="frmGrupo"] .infraImgPro[data-img*="/remover.gif"] { + position: relative !important; + top: 0; +} +.seiSlim form[id*="frmGrupo"] .infraSelect[multiple="multiple"] { + top: 20px !important; + position: relative !important; + margin: 0 !important; +} +.seiSlim form[id*="frmGrupo"] .infraLabelObrigatorio, +.seiSlim form[id*="frmGrupo"] .infraText, +.seiSlim form[id*="frmGrupo"] .infraLabelOpcional, +.seiSlim form[id*="frmGrupo"] .infraTextArea, +.seiSlim form[id*="frmGrupo"] .infraImgPro, +.seiSlim form[id*="frmGrupo"] .infraSelect { + position: initial !important; + display: inline-block; +} +.seiSlim select.infraText[multiple="multiple"] { + margin: 20px 0 0 0 !important; +} +#divArvoreConteudo { + overflow-y: auto !important; +} +.linkDisplayPro, +.reviewDisplayPro { + user-select: none; + position: initial; + display: block !important; + margin: 15px 10px !important; + padding: 10px !important; + border: 1px solid #ccc !important; + background: #fff; + border-radius: 8px; + text-align: left; + text-indent: initial; + font-size: 12pt; + text-transform: initial; + font-weight: initial; + letter-spacing: initial; + text-decoration: initial; + white-space: nowrap; +} +.linkDisplayPro a, +.reviewDisplayPro a { + cursor: pointer; + text-decoration: underline; + color:#1155cc; +} +.reviewDisplayPro span.action { + font-size: 100% !important; +} +html.dark-mode .linkDisplayPro, +html.dark-mode .reviewDisplayPro { + background-color:#3D3D3D !important; +} +html.dark-mode .linkDisplayPro a, +html.dark-mode .reviewDisplayPro a { + color:#fbfbfe !important; +} +.reviewDisplayPro s { + text-decoration: line-through; + font-size: 11pt; +} +.reviewDisplayPro u { + text-decoration: underline; + font-size: 11pt; +} +.reviewSeiPro.reviewHighlights { + padding: 5px; + border-radius: 5px; + box-shadow: rgba(60, 64, 67, 0.35) 0px 1px 3px 1px; + opacity: 0.8; +} +strong.title-reviewtip { + font-weight: 100; +} +.reviewDisplayPro .textReview, +.reviewDisplayPro .textReview span, +.reviewDisplayPro .textReview u, +.reviewDisplayPro .textReview s, +.reviewDisplayPro .textReview b, +.reviewDisplayPro .textReview strong, +.reviewDisplayPro .textReview em, +.reviewDisplayPro .textReview i, +.reviewDisplayPro .textReview a { + font-size: 11pt !important; +} +.reviewDisplayPro .textReview { + cursor:pointer; + display: block; + margin: 10px 0 15px 0; + white-space: normal; +} +#frmArvore span.numericDocsPro:before { + content: attr(data-count); + display: inline-block; + margin: 0 10px 0 5px; + vertical-align: initial; + opacity: 0.6; +} +.seiSlim_arvore #frmArvore span.numericDocsPro:before { + vertical-align: super !important; +} +.seiSlim #uploadListPro a[id*="anchorImg"][data-img]::before { + top: 0; +} +#uploadListPro .dz-preview.dz-file-preview { + margin: 10px; } \ No newline at end of file diff --git a/dist/html/options.html b/dist/html/options.html index 8e5efca..745e445 100644 --- a/dist/html/options.html +++ b/dist/html/options.html @@ -56,6 +56,7 @@

Base de Dados

+ @@ -192,7 +193,7 @@

Base de Dados

- +

Sincronizar Base de Processos @@ -206,6 +207,20 @@

Base de Dados

+ + +

+ Ferramentas de Inteligência Artificial + +

+ + +
+ + +
+ +

@@ -248,6 +263,51 @@

Base de Dados

+ + +

+ Revisão de texto no editor de documentos + +

+ + +
+ + +
+ + + + +

+ Reabertura programada de processos + +

+ + +
+ + +
+ + + + + + + + + +
+ + Peridiocidade de verificação de procesos (em horas) + + + + +
+ +

@@ -430,6 +490,20 @@

Base de Dados

+ + +

+ Numerar documentos na árvore do processo + +

+ + +
+ + +
+ +

@@ -569,11 +643,11 @@

Base de Dados

- +

Adicionar teclas de atalhos no editor de documentos - +

diff --git a/dist/html/options.js b/dist/html/options.js index 41effcb..039437b 100755 --- a/dist/html/options.js +++ b/dist/html/options.js @@ -175,6 +175,11 @@ function restore_options() { } else { $('#uploadDoc_sortBefore').hide(); } + if(jmespath.search(dataValuesConfig, "[?name=='reaberturaprogramada'].value | [0]") || jmespath.search(dataValuesConfig, "[?name=='reaberturaprogramada'].value | [0]") === null) { + $('#reaberturaProgram_periodo').show(); + } else { + $('#reaberturaProgram_periodo').hide(); + } if(jmespath.search(dataValuesConfig, "[?name=='certidaosigilo'].value | [0]") || jmespath.search(dataValuesConfig, "[?name=='certidaosigilo'].value | [0]") === null) { $('#getDocCertidao_docName').show(); } else { @@ -212,6 +217,9 @@ function restore_options() { if (jmespath.search(dataValuesConfig, "[?name=='qualidadeimagens'].value | [0]") !== null) { $('#itemConfigGeral_qualidadeimagens').val(jmespath.search(dataValuesConfig, "[?name=='qualidadeimagens'].value | [0]")); } + if (jmespath.search(dataValuesConfig, "[?name=='reaberturaprogramada_periodo'].value | [0]") !== null) { + $('#itemConfigGeral_reaberturaprogramada_periodo').val(jmespath.search(dataValuesConfig, "[?name=='reaberturaprogramada_periodo'].value | [0]")); + } if (jmespath.search(dataValuesConfig, "[?name=='newdocsigilo'].value | [0]") !== null) { var valueNewDocSigilo = jmespath.search(dataValuesConfig, "[?name=='newdocsigilo'].value | [0]"); valueNewDocSigilo = (valueNewDocSigilo != '' && valueNewDocSigilo.indexOf('|') !== -1) ? valueNewDocSigilo.split('|') : false; @@ -317,13 +325,18 @@ function changeConfigGeral() { arrayShowItensMenu.push({name: $(this).attr('data-name'), value: $(this).val()}); } }); - if ($('#itemConfigGeral_newdocdefault').is(':checked')) { $('#newdocDefault_table').show(); } else { $('#newdocDefault_table').hide(); } + if ($('#itemConfigGeral_newdocdefault').is(':checked')) { $('#newdocDefault_table').show(); } else { $('#newdocDefault_table').hide(); } if ($('#itemConfigGeral_uploaddocsexternos').is(':checked')) { $('#uploadDoc_sortBefore').show(); } else { $('#uploadDoc_sortBefore').hide(); $('#itemConfigGeral_sortbeforeupload').prop('checked',false); } + if ($('#itemConfigGeral_reaberturaprogramada').is(':checked')) { + $('#reaberturaProgram_periodo').show(); + } else { + $('#reaberturaProgram_periodo').hide(); + } if ($('#itemConfigGeral_certidaosigilo').is(':checked')) { $('#getDocCertidao_docName').show(); } else { @@ -384,6 +397,10 @@ function setNamePage() { }); if (NAMESPACE_SPRO == 'SEI Pro Lab') { $('body').addClass('SEIPro_lab'); + } else if (NAMESPACE_SPRO == 'ANTAQ Pro') { + $('body').addClass('ANTAQ_Pro'); + } else if (NAMESPACE_SPRO == 'ANTT Pro') { + $('body').addClass('ANTAQ_Pro'); } } $('#options-functions').find('input[type="text"]').on("keyup", function () { diff --git a/dist/html/page.css b/dist/html/page.css index 7ba8062..b2eef61 100755 --- a/dist/html/page.css +++ b/dist/html/page.css @@ -215,6 +215,12 @@ i.laranjaColor { .SEIPro_lab tr.lab { display: table-row; } +.ANTAQ_Pro tr.lab { + display: none; +} +.ANTAQ_Pro tr.notatq { + display: none; +} @media only screen and (max-width: 1115px) { .button-flat .btn_text { display: none; diff --git a/dist/icons/blockedition.png b/dist/icons/blockedition.png new file mode 100644 index 0000000..116aa5b Binary files /dev/null and b/dist/icons/blockedition.png differ diff --git a/dist/icons/ferramentasia.png b/dist/icons/ferramentasia.png new file mode 100644 index 0000000..d22fde8 Binary files /dev/null and b/dist/icons/ferramentasia.png differ diff --git a/dist/js/init.js b/dist/js/init.js index aa38284..844c22a 100644 --- a/dist/js/init.js +++ b/dist/js/init.js @@ -5,12 +5,6 @@ $.getScript(getUrlExtension("js/lib/moment-duration-format.min.js")); $.getScript(getUrlExtension("js/lib/crypto-js.min.js")); $.getScript(getUrlExtension("js/sei-functions-pro.js")); -function loadAPIGooglePro() { - if ( $('head').find('script[data-config="config-apigoogle-seipro"]').length == 0 ) { - var htmlScript = ""; - $(htmlScript).appendTo('head'); - } -} /* function loadAPIGooglePro(client_id) { $('[data-script-name="googleapi"]').remove(); @@ -91,6 +85,7 @@ function loadScriptDataBasePro(dataValues) { var dataValues_ProjetosSheets = jmespath.search(dataValues, "[?baseTipo=='projetos'] | [?conexaoTipo=='sheets'] | [?API_KEY!='']"); var dataValues_FormulariosSheets = jmespath.search(dataValues, "[?baseTipo=='formularios'] | [?conexaoTipo=='sheets'] | [?API_KEY!='']"); var dataValues_ProcessosSheets = jmespath.search(dataValues, "[?baseTipo=='processos'] | [?conexaoTipo=='sheets'] | [?API_KEY!='']"); + var dataValues_OpenAI = jmespath.search(dataValues, "[?baseTipo=='openai'] | [?conexaoTipo=='api'] | [?KEY_USER!='']"); var dataValues_AtividadesAPI = jmespath.search(dataValues, "[?baseTipo=='atividades'] | [?conexaoTipo=='api'||conexaoTipo=='googleapi']"); // console.log(dataValues, dataValues_ProjetosSheets); if (dataValues_ProjetosSheets.length > 0 && checkConfigValue('gerenciarprojetos')) { @@ -113,6 +108,25 @@ function loadScriptDataBasePro(dataValues) { } else { removeLocalStorageAtividades(); } + if (dataValues_OpenAI.length > 0 && checkConfigValue('ferramentasia')) { + loadDataBaseApiOpenAIPro(dataValues_OpenAI); + } else { + removeLocalStorageOpenAI(); + } +} +function removeLocalStorageOpenAI() { + localStorageRemovePro('configBasePro_openai'); +} +function loadDataBaseApiOpenAIPro(dataValues) { + var perfilSelected = (getOptionsPro('configBaseSelectedPro_openai') && getOptionsPro('configBaseSelectedPro_openai') <= dataValues.length) ? getOptionsPro('configBaseSelectedPro_openai') : 0; + var perfil = (dataValues && dataValues !== null && dataValues.length > 0 && typeof dataValues[perfilSelected] !== 'undefined' && typeof dataValues[perfilSelected].hasOwnProperty('KEY_USER')) + ? dataValues[perfilSelected] + : false; + if (perfil && checkConfigValue('ferramentasia')) { + localStorage.setItem('configBasePro_openai', JSON.stringify({URL_API: perfil.URL_API, KEY_USER: perfil.KEY_USER})); + } else { + removeLocalStorageOpenAI(); + } } function removeLocalStorageAtividades() { localStorageRemovePro('configBasePro_atividades'); @@ -134,85 +148,61 @@ function loadDataBaseApiAtividadesPro(dataValues) { } function loadDataBaseSheetsProjetosPro(dataValues) { // dataValues = ( jmespath.search(dataValues, "[?baseTipo=='projetos'] | length(@)") > 0 ) ? jmespath.search(dataValues, "[?baseTipo=='projetos']") : dataValues; - var dataPerfil = []; - var perfilSelected = (getOptionsPro('configBaseSelectedPro')) ? getOptionsPro('configBaseSelectedPro') : 0; - for (var i = 0; i < dataValues.length; i++) { - if ( dataValues[i].baseName == perfilSelected || ( perfilSelected == 0 && i == 0 ) ) { dataPerfil = dataValues[i]; } - } - - var spreadsheetIdProjetos_Pro = ( typeof dataPerfil.spreadsheetId !== 'undefined' ) ? "'"+dataPerfil.spreadsheetId+"'" : 'false'; - var CLIENT_ID_PRO = ( typeof dataPerfil.CLIENT_ID !== 'undefined' ) ? "'"+dataPerfil.CLIENT_ID+"'" : 'false'; - var API_KEY_PRO = ( typeof dataPerfil.API_KEY !== 'undefined' ) ? "'"+dataPerfil.API_KEY+"'" : 'false'; - - var scriptText = ""; - $(scriptText).appendTo('head'); + var dataPerfil = []; + var perfilSelected = (getOptionsPro('configBaseSelectedPro')) ? getOptionsPro('configBaseSelectedPro') : 0; + for (var i = 0; i < dataValues.length; i++) { + if ( dataValues[i].baseName == perfilSelected || ( perfilSelected == 0 && i == 0 ) ) { dataPerfil = dataValues[i]; } + } - if ( typeof dataPerfil.spreadsheetId !== 'undefined' ) { - loadAPIGooglePro(CLIENT_ID_PRO); + if ( typeof dataPerfil.spreadsheetId !== 'undefined' && + typeof dataPerfil.CLIENT_ID !== 'undefined' && + typeof dataPerfil.API_KEY !== 'undefined' ) { + setSessionGoogle(dataPerfil.baseTipo, {CLIENT_ID_PRO: dataPerfil.CLIENT_ID, API_KEY_PRO: dataPerfil.API_KEY, spreadsheetIdProjetos_Pro: dataPerfil.spreadsheetId}); $.getScript(getUrlExtension("js/sei-gantt.js")); - } else { - console.log('loadDataBaseSheetsProjetosPro','ERROR!!!'); - localStorage.removeItem('loadEtapasSheet'); - removeOptionsPro('configBaseSelectedPro'); - } + } else { + console.log('loadDataBaseSheetsProjetosPro','ERROR!!!'); + localStorage.removeItem('loadEtapasSheet'); + removeOptionsPro('configBaseSelectedPro'); + } } function loadDataBaseSheetsFormulariosPro(dataValues) { - var dataPerfil = []; - var perfilSelected = (getOptionsPro('configBaseSelectedFormPro')) ? getOptionsPro('configBaseSelectedFormPro') : 0; - for (var i = 0; i < dataValues.length; i++) { - if ( dataValues[i].baseName == perfilSelected || ( perfilSelected == 0 && i == 0 ) ) { dataPerfil = dataValues[i]; } - } - - var spreadsheetIdFormularios_Pro = ( typeof dataPerfil.spreadsheetId !== 'undefined' ) ? "'"+dataPerfil.spreadsheetId+"'" : 'false'; - var CLIENT_ID_PRO = ( typeof dataPerfil.CLIENT_ID !== 'undefined' ) ? "'"+dataPerfil.CLIENT_ID+"'" : 'false'; - var API_KEY_PRO = ( typeof dataPerfil.API_KEY !== 'undefined' ) ? "'"+dataPerfil.API_KEY+"'" : 'false'; - - var scriptText = ""; - $(scriptText).appendTo('head'); + var dataPerfil = []; + var perfilSelected = (getOptionsPro('configBaseSelectedFormPro')) ? getOptionsPro('configBaseSelectedFormPro') : 0; + for (var i = 0; i < dataValues.length; i++) { + if ( dataValues[i].baseName == perfilSelected || ( perfilSelected == 0 && i == 0 ) ) { dataPerfil = dataValues[i]; } + } - if ( typeof dataPerfil.spreadsheetId !== 'undefined' ) { - loadAPIGooglePro(CLIENT_ID_PRO); + if ( typeof dataPerfil.spreadsheetId !== 'undefined' && + typeof dataPerfil.CLIENT_ID !== 'undefined' && + typeof dataPerfil.API_KEY !== 'undefined' ) { + setSessionGoogle(dataPerfil.baseTipo, {CLIENT_ID_PRO: dataPerfil.CLIENT_ID, API_KEY_PRO: dataPerfil.API_KEY, spreadsheetIdFormularios_Pro: dataPerfil.spreadsheetId}); $.getScript(getUrlExtension("js/sei-forms.js")); - } else { - console.log('loadDataBaseSheetsFormulariosPro','ERROR!!!'); - localStorage.removeItem('loadFormulariosSheet'); - removeOptionsPro('configBaseSelectedFormPro'); - } + } else { + console.log('loadDataBaseSheetsFormulariosPro','ERROR!!!'); + localStorage.removeItem('loadFormulariosSheet'); + removeOptionsPro('configBaseSelectedFormPro'); + } } function loadDataBaseSheetsProcessosPro(dataValues) { - var dataPerfil = []; - var perfilSelected = (getOptionsPro('configBaseSelectedProcessosPro')) ? getOptionsPro('configBaseSelectedProcessosPro') : 0; - for (var i = 0; i < dataValues.length; i++) { - if ( dataValues[i].baseName == perfilSelected || ( perfilSelected == 0 && i == 0 ) ) { dataPerfil = dataValues[i]; } - } - - var spreadsheetIdSyncProcessos_Pro = ( typeof dataPerfil.spreadsheetId !== 'undefined' ) ? "'"+dataPerfil.spreadsheetId+"'" : 'false'; - var CLIENT_ID_PRO = ( typeof dataPerfil.CLIENT_ID !== 'undefined' ) ? "'"+dataPerfil.CLIENT_ID+"'" : 'false'; - var API_KEY_PRO = ( typeof dataPerfil.API_KEY !== 'undefined' ) ? "'"+dataPerfil.API_KEY+"'" : 'false'; - - var scriptText = ""; - $(scriptText).appendTo('head'); + var dataPerfil = []; + var perfilSelected = (getOptionsPro('configBaseSelectedProcessosPro')) ? getOptionsPro('configBaseSelectedProcessosPro') : 0; + for (var i = 0; i < dataValues.length; i++) { + if ( dataValues[i].baseName == perfilSelected || ( perfilSelected == 0 && i == 0 ) ) { dataPerfil = dataValues[i]; } + } - if ( typeof dataPerfil.spreadsheetId !== 'undefined' ) { - loadAPIGooglePro(CLIENT_ID_PRO); + if ( typeof dataPerfil.spreadsheetId !== 'undefined' && + typeof dataPerfil.CLIENT_ID !== 'undefined' && + typeof dataPerfil.API_KEY !== 'undefined' ) { + setSessionGoogle(dataPerfil.baseTipo, {CLIENT_ID_PRO: dataPerfil.CLIENT_ID, API_KEY_PRO: dataPerfil.API_KEY, spreadsheetIdSyncProcessos_Pro: dataPerfil.spreadsheetId}); $.getScript(getUrlExtension("js/sei-sync-processos.js")); - } else { - console.log('loadDataBaseSheetsProcessosPro','ERROR!!!'); - localStorage.removeItem('loadSyncProcessosSheet'); - removeOptionsPro('configBaseSelectedFormPro'); - } + } else { + console.log('loadDataBaseSheetsProcessosPro','ERROR!!!'); + localStorage.removeItem('loadSyncProcessosSheet'); + removeOptionsPro('configBaseSelectedFormPro'); + } +} +function setSessionGoogle(type, param) { + localStorage.setItem('SEIPro_google_'+type, JSON.stringify(param)); } function loadDataBaseProStorage(items) { if ( typeof items.dataValues !== 'undefined' && items.dataValues != '' && typeof getParamsUrlPro(window.location.href).acao_pro === 'undefined') { @@ -289,32 +279,6 @@ function loadFilesUI() { $.getScript(getUrlExtension('js/lib/jquery-ui.min.js')); loadStylePro(getUrlExtension('css/jquery-ui.css'), 'head'); } -function loadScriptArvorePro() { - if ( $('#ifrArvore').length ) { - $('#ifrArvore').on("load", function() { - var iframeObjArvore = $('#ifrArvore').contents().find('head'); - var scriptArvore = ""; - $(scriptArvore).prependTo(iframeObjArvore); - }); - } -} - function loadStyleDesign(body = $('body'), secondClass = false) { if (localStorage.getItem('seiSlim')) { body.addClass("seiSlim"); @@ -325,21 +289,6 @@ function loadStyleDesign(body = $('body'), secondClass = false) { } } loadStyleDesign(); -function loadScriptVisualizacaoPro() { - if ( $('#ifrVisualizacao').length ) { - $('#ifrVisualizacao').on("load", function() { - var iframeObjVisualizacao = $('#ifrVisualizacao').contents().find('head'); - var scriptVisualizacao = ""; - $(scriptVisualizacao).prependTo(iframeObjVisualizacao); - loadStyleDesign($('#ifrVisualizacao').contents().find('body'), 'view'); - loadFontIcons('head', $('#ifrVisualizacao').contents()); - }); - } -} function pathExtensionSEIPro() { var URL_SPRO = getUrlExtension("js/sei-pro.js"); URL_SPRO = URL_SPRO.toString().replace('js/sei-pro.js', ''); @@ -352,13 +301,6 @@ function getPathExtensionPro() { var VERSION_SPRO = manifest.version; var NAMESPACE_SPRO = manifest.short_name; var URLPAGES_SPRO = manifest.homepage_url; - var scriptText = ""; - $(scriptText).appendTo('head'); setSessionNameSpace({URL_SPRO: URL_SPRO, NAMESPACE_SPRO: NAMESPACE_SPRO, URLPAGES_SPRO: URLPAGES_SPRO, VERSION_SPRO: VERSION_SPRO, ICON_SPRO: manifest.icons}); } } @@ -385,8 +327,6 @@ function loadScriptPro() { $.getScript(getUrlExtension("js/sei-pro.js")); $(document).ready(function () { loadConfigPro(); - loadScriptArvorePro(); - loadScriptVisualizacaoPro(); $.getScript(getUrlExtension("js/lib/moment-weekday-calc.js")); // $.getScript(getUrlExtension("js/lib/moment-duration-format.min.js")); $.getScript(getUrlExtension("js/sei-pro-favoritos.js")); diff --git a/dist/js/init_all.js b/dist/js/init_all.js index 3eaee4e..44e927a 100644 --- a/dist/js/init_all.js +++ b/dist/js/init_all.js @@ -92,19 +92,15 @@ function getPathExtensionPro() { var VERSION_SPRO = manifest.version; var NAMESPACE_SPRO = manifest.short_name; var URLPAGES_SPRO = manifest.homepage_url; - var scriptText = ""; - $(scriptText).appendTo('head'); setSessionNameSpace({URL_SPRO: URL_SPRO, NAMESPACE_SPRO: NAMESPACE_SPRO, URLPAGES_SPRO: URLPAGES_SPRO, VERSION_SPRO: VERSION_SPRO, ICON_SPRO: manifest.icons}); } } function setSessionNameSpace(param) { sessionStorage.setItem((param.NAMESPACE_SPRO != 'SPro' ? 'new_extension' : 'old_extension'), JSON.stringify(param)); } +function _P() { // get Session Name Space + return JSON.parse(sessionStorage.getItem('new_extension')); +} function loadStyleDesign() { var body = document.body; if (localStorage.getItem('seiSlim')) { @@ -145,9 +141,7 @@ if (getManifestExtension().short_name == 'SPro') { setTimeout(function(){ if (sessionStorage.getItem('new_extension') === null){ loadScriptProAll(); - console.log('@@@ LOADING SPRO ALL'); } else { - console.log('&&&&&&& RECUSE SPRO ALL'); var URL_SPRO = pathExtensionSEIPro(); var manifest = getManifestExtension(); var VERSION_SPRO = manifest.version; diff --git a/dist/js/init_db.js b/dist/js/init_db.js index e845b34..303d378 100755 --- a/dist/js/init_db.js +++ b/dist/js/init_db.js @@ -174,6 +174,25 @@ function observeAcaoPro() { }; // console.log(data); getOptionsSEIPro(data); + } else if (param.base == 'openai') { + var data = { + type: "NEW_BASE", + mode: param.mode, + base: param.base, + alert: true, + newItem: { + "baseName": "Open AI (Chat GPT)", + "baseTipo": "openai", + "conexaoTipo": "api", + "CLIENT_ID": "", + "API_KEY": "", + "spreadsheetId": "", + "URL_API": param.url, + "KEY_USER": param.token + } + }; + // console.log(data); + getOptionsSEIPro(data); } } else if (typeof param.acao_pro !== 'undefined' && param.acao_pro == 'set_database' && typeof param.client_id !== 'undefined') { if (param.base == 'projetos') { @@ -200,6 +219,24 @@ function observeAcaoPro() { setOptionsSEIPro(param.option_key, param.option_value); } } +function pathExtensionSEIPro() { + var URL_SPRO = getUrlExtension("js/sei-pro.js"); + URL_SPRO = URL_SPRO.toString().replace('js/sei-pro.js', ''); + return URL_SPRO; +} +function getPathExtensionPro() { + if ($('script[data-config="config-seipro"]').length == 0) { + var URL_SPRO = pathExtensionSEIPro(); + var manifest = getManifestExtension(); + var VERSION_SPRO = manifest.version; + var NAMESPACE_SPRO = manifest.short_name; + var URLPAGES_SPRO = manifest.homepage_url; + setSessionNameSpace({URL_SPRO: URL_SPRO, NAMESPACE_SPRO: NAMESPACE_SPRO, URLPAGES_SPRO: URLPAGES_SPRO, VERSION_SPRO: VERSION_SPRO, ICON_SPRO: manifest.icons}); + } +} +function setSessionNameSpace(param) { + sessionStorage.setItem((param.NAMESPACE_SPRO != 'SPro' ? 'new_extension' : 'old_extension'), JSON.stringify(param)); +} function getManifestExtension() { if (typeof browser === "undefined") { return chrome.runtime.getManifest(); @@ -211,48 +248,19 @@ function loadScriptProDB() { observeAcaoPro(); changeBasePro(); getConfigHost(appendIconEntidadeLogin); + getPathExtensionPro(); } if (getManifestExtension().short_name == 'SPro') { setTimeout(function(){ if (sessionStorage.getItem('new_extension') === null){ loadScriptProDB(); } else { - console.log('######### new_extension'); chrome.storage.sync.get({ dataValues: '' }, function(items) { var dataValues = ( items.dataValues != '' ) ? JSON.parse(items.dataValues) : []; console.log(dataValues); sessionStorage.setItem('config_transition', JSON.stringify(dataValues)); - // $.getScript(getUrlExtension("js/sei-pro-db-transition.js")); - /* - if (data.mode == 'insert') { - for (i = 0; i < dataValues.length; i++) { - if ( dataValues[i]['baseTipo'] == data.base) { - dataValues.splice(i,1); - i--; - } - } - } - dataValues.push(newItem); - console.log(dataValues); - chrome.storage.sync.set({ - dataValues: JSON.stringify(dataValues) - }, function() { - if (data.alert) { alert('Configura\u00e7\u00f5es carregadas com sucesso!'); } - if (typeof window.jQuery !== 'undefined') { - var urlHome = $('#main-menu').find('a[href*="controlador.php?acao=procedimento_controlar"]').attr('href'); - if (typeof urlHome !== 'undefined') { - // localStorage.setItem('configBasePro_atividades', JSON.stringify({URL_API: newItem.url, KEY_USER: newItem.token})); - console.log({URL_API: newItem.url, KEY_USER: newItem.token}); - setTimeout(function(){ - console.log('saved OptionsSEIPro'); - window.location.href = urlHome; - }, 1500); - } - } - }); - */ }); } }, 1000); diff --git a/dist/js/lib/_jkanban.min.js b/dist/js/lib/_jkanban.min.js deleted file mode 100755 index 60909b5..0000000 --- a/dist/js/lib/_jkanban.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(){return function e(t,n,o){function i(a,c){if(!n[a]){if(!t[a]){var d="function"==typeof require&&require;if(!c&&d)return d(a,!0);if(r)return r(a,!0);var s=new Error("Cannot find module '"+a+"'");throw s.code="MODULE_NOT_FOUND",s}var l=n[a]={exports:{}};t[a][0].call(l.exports,function(e){return i(t[a][1][e]||e)},l,l.exports,e,t,n,o)}return n[a].exports}for(var r="function"==typeof require&&require,a=0;a-1||t.setAttribute("data-"+o,n[o])}function s(t){var n=t;if(e.options.itemHandleOptions.enabled)if(void 0===(e.options.itemHandleOptions.customHandler||void 0)){var o=e.options.itemHandleOptions.customCssHandler,i=e.options.itemHandleOptions.customCssIconHandler;void 0===(o||void 0)&&(o="drag_handler"),void 0===(i||void 0)&&(i=o+"_icon"),n="
"+n+"
"}else n=e.options.itemHandleOptions.customHandler.replace("%s",n);return n}arguments[0]&&"object"==typeof arguments[0]&&(this.options=function(e,t){var n;for(n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}(i,arguments[0])),this.__getCanMove=function(t){return e.options.itemHandleOptions.enabled?e.options.itemHandleOptions.handleClass?t.classList.contains(e.options.itemHandleOptions.handleClass):t.classList.contains("item_handle"):!!e.options.dragItems},this.init=function(){!function(){e.element=document.querySelector(e.options.element);var t=document.createElement("div");t.classList.add("kanban-container"),e.container=t,document.querySelector(e.options.element).dataset.hasOwnProperty("board")?(url=document.querySelector(e.options.element).dataset.board,window.fetch(url,{method:"GET",headers:{"Content-Type":"application/json"}}).then(t=>{t.json().then(function(t){e.options.boards=t,e.addBoards(e.options.boards,!0)})}).catch(e=>{console.log("Error: ",e)})):e.addBoards(e.options.boards,!0);e.element.appendChild(e.container)}(),window.innerWidth>e.options.responsive&&(e.drakeBoard=e.dragula([e.container],{moves:function(t,n,o,i){return!!e.options.dragBoards&&(o.classList.contains("kanban-board-header")||o.classList.contains("kanban-title-board"))},accepts:function(e,t,n,o){return t.classList.contains("kanban-container")},revertOnSpill:!0,direction:"horizontal"}).on("drag",function(t,n){t.classList.add("is-moving"),e.options.dragBoard(t,n),"function"==typeof t.dragfn&&t.dragfn(t,n)}).on("dragend",function(t){!function(){for(var t=1,n=0;n-1)e.drake.cancel(!0);else{t.classList.add("is-moving"),e.options.dragEl(t,n);var i=c(n.parentNode.dataset.id);void 0!==i.dragTo&&e.options.boards.map(function(t){-1===i.dragTo.indexOf(t.id)&&t.id!==n.parentNode.dataset.id&&e.findBoard(t.id).classList.add("disabled-board")}),null!==t&&"function"==typeof t.dragfn&&t.dragfn(t,n)}}).on("dragend",function(t){e.options.dragendEl(t),null!==t&&"function"==typeof t.dragendfn&&t.dragendfn(t)}).on("drop",function(t,n,o,i){e.enableAllBoards();var r=c(o.parentNode.dataset.id);(void 0!==r.dragTo&&-1===r.dragTo.indexOf(n.parentNode.dataset.id)&&n.parentNode.dataset.id!==o.parentNode.dataset.id&&e.drake.cancel(!0),null!==t)&&(!1===e.options.dropEl(t,n,o,i)&&e.drake.cancel(!0),t.classList.remove("is-moving"),"function"==typeof t.dropfn&&t.dropfn(t,n,o,i))}))},this.enableAllBoards=function(){var e=document.querySelectorAll(".kanban-board");if(e.length>0&&void 0!==e)for(var t=0;te.options.responsive)var o=(100-2*t.length)/t.length;else o=100-2*t.length;else o=e.options.widthBoard;var i=e.options.itemAddOptions.enabled,c=e.options.itemAddOptions.content,l=e.options.itemAddOptions.class,u=e.options.itemAddOptions.footer;for(var f in t){var p=t[f];n||e.options.boards.push(p),e.options.responsivePercentage||(""===e.container.style.width?e.container.style.width=parseInt(o)+2*parseInt(e.options.gutter)+"px":e.container.style.width=parseInt(e.container.style.width)+parseInt(o)+2*parseInt(e.options.gutter)+"px");var m=document.createElement("div");m.dataset.id=p.id,m.dataset.order=e.container.childNodes.length+1,m.classList.add("kanban-board"),e.options.responsivePercentage?m.style.width=o+"%":m.style.width=o,m.style.marginLeft=e.options.gutter,m.style.marginRight=e.options.gutter;var v=document.createElement("header");if(""!==p.class&&void 0!==p.class)var h=p.class.split(",");else h=[];v.classList.add("kanban-board-header"),h.map(function(e){e=e.replace(/^[ ]+/g,""),v.classList.add(e)}),v.innerHTML='
'+p.title+"
";var g=document.createElement("main");if(g.classList.add("kanban-drag"),""!==p.bodyClass&&void 0!==p.bodyClass)var b=p.bodyClass.split(",");else b=[];for(var y in b.map(function(e){g.classList.add(e)}),e.boardContainer.push(g),p.item){var w=p.item[y],E=document.createElement("div");E.classList.add("kanban-item"),w.id&&(E.dataset.eid=w.id),w.class&&Array.isArray(w.class)&&w.class.forEach(function(e){E.classList.add(e)}),E.innerHTML=s(w.title),E.clickfn=w.click,E.dragfn=w.drag,E.dragendfn=w.dragend,E.dropfn=w.drop,d(E,w),r(E),e.options.itemHandleOptions.enabled&&(E.style.cursor="default"),g.appendChild(E)}var T=document.createElement("footer");if(i){var C=document.createElement("BUTTON"),O=document.createTextNode(c||"+");C.setAttribute("class",l||"kanban-title-button btn btn-default btn-xs"),C.appendChild(O),u?T.appendChild(C):v.appendChild(C),a(C,p.id)}m.appendChild(v),m.appendChild(g),m.appendChild(T),e.container.appendChild(m)}return e},this.findBoard=function(t){return e.element.querySelector('[data-id="'+t+'"]')},this.getParentBoardID=function(t){return"string"==typeof t&&(t=e.element.querySelector('[data-eid="'+t+'"]')),null===t?null:t.parentNode.parentNode.dataset.id},this.moveElement=function(e,t,n){if(e!==this.getParentBoardID(t))return this.removeElement(t),this.addElement(e,n)},this.replaceElement=function(t,n){var o=t;return"string"==typeof o&&(o=e.element.querySelector('[data-eid="'+t+'"]')),o.innerHTML=n.title,o.clickfn=n.click,o.dragfn=n.drag,o.dragendfn=n.dragend,o.dropfn=n.drop,d(o,n),e},this.findElement=function(t){return e.element.querySelector('[data-eid="'+t+'"]')},this.getBoardElements=function(t){return e.element.querySelector('[data-id="'+t+'"] .kanban-drag').childNodes},this.removeElement=function(t){return"string"==typeof t&&(t=e.element.querySelector('[data-eid="'+t+'"]')),null!==t&&("function"==typeof t.remove?t.remove():t.parentNode.removeChild(t)),e},this.removeBoard=function(t){var n=null;"string"==typeof t&&(n=e.element.querySelector('[data-id="'+t+'"]')),null!==n&&("function"==typeof n.remove?n.remove():n.parentNode.removeChild(n));for(var o=0;o0?e:A.revertOnSpill,n=L||E,o=h(n),i=$(o);!1===i&&t&&(L?o&&o.removeChild(L):w.insertBefore(n,S)),i||t?_.emit("cancel",n,w,w):_.emit("drop",n,o,w,x),V()}}function V(){var e=L||E;U(),n&&(r.rm(A.mirrorContainer,"gu-unselectable"),d(c,"remove","mousemove",Q),h(n).removeChild(n),n=null),e&&r.rm(e,"gu-transit"),B&&clearTimeout(B),_.dragging=!1,I&&_.emit("out",e,I,w),_.emit("dragend",e),w=E=L=S=x=B=I=null}function $(e,t){var o;return o=void 0!==t?t:n?x:b(L||E),e===w&&o===S}function J(e,t,n){for(var o=e;o&&!i();)o=h(o);return o;function i(){if(!1===H(o))return!1;var i=Z(o,e),r=ee(o,i,t,n);return!!$(o,r)||A.accepts(E,o,w,r)}}function Q(e){if(n){e.preventDefault();var t=y("clientX",e)||0,o=y("clientY",e)||0,i=t-T,r=o-C;n.style.left=i+"px",n.style.top=r+"px";var a=L||E,c=u(n,t,o),d=J(c,t,o),s=null!==d&&d!==I;(s||null===d)&&(I&&m("out"),I=d,s&&m("over"));var l=h(a);if(d!==w||!L||A.copySortSource){var f,p=Z(d,c);if(null!==p)f=ee(d,p,t,o);else{if(!0!==A.revertOnSpill||L)return void(L&&l&&l.removeChild(a));f=S,d=w}(null===f&&s||f!==a&&f!==b(a))&&(x=f,d.insertBefore(a,f),_.emit("shadow",a,d,w))}else l&&l.removeChild(a)}function m(e){_.emit(e,a,I,w)}}function Z(e,t){for(var n=t;n!==e&&h(n)!==e;)n=h(n);return n===c?null:n}function ee(e,t,n,o){var i,r="horizontal"===A.direction;return t!==e?(i=t.getBoundingClientRect(),a(r?n>i.left+m(i)/2:o>i.top+v(i)/2)):function(){var t,i,a,c=e.children.length;for(t=0;tn)return i;if(!r&&a.top+a.height/2>o)return i}return null}();function a(e){return e?b(t):t}}}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./classes":8,"contra/emitter":4,crossvent:5}],10:[function(e,t,n){var o,i,r=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function c(){throw new Error("clearTimeout has not been defined")}function d(e){if(o===setTimeout)return setTimeout(e,0);if((o===a||!o)&&setTimeout)return o=setTimeout,setTimeout(e,0);try{return o(e,0)}catch(t){try{return o.call(null,e,0)}catch(t){return o.call(this,e,0)}}}!function(){try{o="function"==typeof setTimeout?setTimeout:a}catch(e){o=a}try{i="function"==typeof clearTimeout?clearTimeout:c}catch(e){i=c}}();var s,l=[],u=!1,f=-1;function p(){u&&s&&(u=!1,s.length?l=s.concat(l):f=-1,l.length&&m())}function m(){if(!u){var e=d(p);u=!0;for(var t=l.length;t;){for(s=l,l=[];++f1)for(var n=1;n=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n.setImmediate="function"==typeof t?t:function(e){var t=d++,o=!(arguments.length<2)&&a.call(arguments,1);return c[t]=!0,i(function(){c[t]&&(o?e.apply(null,o):e.call(null),n.clearImmediate(t))}),t},n.clearImmediate="function"==typeof o?o:function(e){delete c[e]}}).call(this)}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":10,timers:12}]},{},[1]); \ No newline at end of file diff --git a/dist/js/lib/crypto-js.min.js b/dist/js/lib/crypto-js.min.js index 1deebee..477235f 100755 --- a/dist/js/lib/crypto-js.min.js +++ b/dist/js/lib/crypto-js.min.js @@ -1 +1,4 @@ +// JavaScript library of crypto standards. +// https://github.com/brix/crypto-js/tree/develop + !function(t,e){"object"==typeof exports?module.exports=exports=e():"function"==typeof define&&define.amd?define([],e):t.CryptoJS=e()}(this,function(){var h,t,e,r,i,n,f,o,s,c,a,l,d,m,x,b,H,z,A,u,p,_,v,y,g,B,w,k,S,C,D,E,R,M,F,P,W,O,I,U,K,X,L,j,N,T,q,Z,V,G,J,$,Q,Y,tt,et,rt,it,nt,ot,st,ct,at,ht,lt,ft,dt,ut,pt,_t,vt,yt,gt,Bt,wt,kt,St,bt=bt||function(l){var t;if("undefined"!=typeof window&&window.crypto&&(t=window.crypto),!t&&"undefined"!=typeof window&&window.msCrypto&&(t=window.msCrypto),!t&&"undefined"!=typeof global&&global.crypto&&(t=global.crypto),!t&&"function"==typeof require)try{t=require("crypto")}catch(t){}function i(){if(t){if("function"==typeof t.getRandomValues)try{return t.getRandomValues(new Uint32Array(1))[0]}catch(t){}if("function"==typeof t.randomBytes)try{return t.randomBytes(4).readInt32LE()}catch(t){}}throw new Error("Native crypto module could not be used to get secure random number.")}var r=Object.create||function(t){var e;return n.prototype=t,e=new n,n.prototype=null,e};function n(){}var e={},o=e.lib={},s=o.Base={extend:function(t){var e=r(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),(e.init.prototype=e).$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},f=o.WordArray=s.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=null!=e?e:4*t.length},toString:function(t){return(t||a).stringify(this)},concat:function(t){var e=this.words,r=t.words,i=this.sigBytes,n=t.sigBytes;if(this.clamp(),i%4)for(var o=0;o>>2]>>>24-o%4*8&255;e[i+o>>>2]|=s<<24-(i+o)%4*8}else for(o=0;o>>2]=r[o>>>2];return this.sigBytes+=n,this},clamp:function(){var t=this.words,e=this.sigBytes;t[e>>>2]&=4294967295<<32-e%4*8,t.length=l.ceil(e/4)},clone:function(){var t=s.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],r=0;r>>2]>>>24-n%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(t){for(var e=t.length,r=[],i=0;i>>3]|=parseInt(t.substr(i,2),16)<<24-i%8*4;return new f.init(r,e/2)}},h=c.Latin1={stringify:function(t){for(var e=t.words,r=t.sigBytes,i=[],n=0;n>>2]>>>24-n%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(t){for(var e=t.length,r=[],i=0;i>>2]|=(255&t.charCodeAt(i))<<24-i%4*8;return new f.init(r,e)}},d=c.Utf8={stringify:function(t){try{return decodeURIComponent(escape(h.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return h.parse(unescape(encodeURIComponent(t)))}},u=o.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=d.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(t){var e,r=this._data,i=r.words,n=r.sigBytes,o=this.blockSize,s=n/(4*o),c=(s=t?l.ceil(s):l.max((0|s)-this._minBufferSize,0))*o,a=l.min(4*c,n);if(c){for(var h=0;h>>32-e}function Dt(t,e,r,i){var n,o=this._iv;o?(n=o.slice(0),this._iv=void 0):n=this._prevBlock,i.encryptBlock(n,0);for(var s=0;s>24&255)){var e=t>>16&255,r=t>>8&255,i=255&t;255===e?(e=0,255===r?(r=0,255===i?i=0:++i):++r):++e,t=0,t+=e<<16,t+=r<<8,t+=i}else t+=1<<24;return t}function Rt(){for(var t=this._X,e=this._C,r=0;r<8;r++)ft[r]=e[r];e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0>>0?1:0)|0,this._b=e[7]>>>0>>0?1:0;for(r=0;r<8;r++){var i=t[r]+e[r],n=65535&i,o=i>>>16,s=((n*n>>>17)+n*o>>>15)+o*o,c=((4294901760&i)*i|0)+((65535&i)*i|0);dt[r]=s^c}t[0]=dt[0]+(dt[7]<<16|dt[7]>>>16)+(dt[6]<<16|dt[6]>>>16)|0,t[1]=dt[1]+(dt[0]<<8|dt[0]>>>24)+dt[7]|0,t[2]=dt[2]+(dt[1]<<16|dt[1]>>>16)+(dt[0]<<16|dt[0]>>>16)|0,t[3]=dt[3]+(dt[2]<<8|dt[2]>>>24)+dt[1]|0,t[4]=dt[4]+(dt[3]<<16|dt[3]>>>16)+(dt[2]<<16|dt[2]>>>16)|0,t[5]=dt[5]+(dt[4]<<8|dt[4]>>>24)+dt[3]|0,t[6]=dt[6]+(dt[5]<<16|dt[5]>>>16)+(dt[4]<<16|dt[4]>>>16)|0,t[7]=dt[7]+(dt[6]<<8|dt[6]>>>24)+dt[5]|0}function Mt(){for(var t=this._X,e=this._C,r=0;r<8;r++)wt[r]=e[r];e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0>>0?1:0)|0,this._b=e[7]>>>0>>0?1:0;for(r=0;r<8;r++){var i=t[r]+e[r],n=65535&i,o=i>>>16,s=((n*n>>>17)+n*o>>>15)+o*o,c=((4294901760&i)*i|0)+((65535&i)*i|0);kt[r]=s^c}t[0]=kt[0]+(kt[7]<<16|kt[7]>>>16)+(kt[6]<<16|kt[6]>>>16)|0,t[1]=kt[1]+(kt[0]<<8|kt[0]>>>24)+kt[7]|0,t[2]=kt[2]+(kt[1]<<16|kt[1]>>>16)+(kt[0]<<16|kt[0]>>>16)|0,t[3]=kt[3]+(kt[2]<<8|kt[2]>>>24)+kt[1]|0,t[4]=kt[4]+(kt[3]<<16|kt[3]>>>16)+(kt[2]<<16|kt[2]>>>16)|0,t[5]=kt[5]+(kt[4]<<8|kt[4]>>>24)+kt[3]|0,t[6]=kt[6]+(kt[5]<<16|kt[5]>>>16)+(kt[4]<<16|kt[4]>>>16)|0,t[7]=kt[7]+(kt[6]<<8|kt[6]>>>24)+kt[5]|0}return h=bt.lib.WordArray,bt.enc.Base64={stringify:function(t){var e=t.words,r=t.sigBytes,i=this._map;t.clamp();for(var n=[],o=0;o>>2]>>>24-o%4*8&255)<<16|(e[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|e[o+2>>>2]>>>24-(o+2)%4*8&255,c=0;c<4&&o+.75*c>>6*(3-c)&63));var a=i.charAt(64);if(a)for(;n.length%4;)n.push(a);return n.join("")},parse:function(t){var e=t.length,r=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var n=0;n>>6-o%4*2,a=s|c;i[n>>>2]|=a<<24-n%4*8,n++}return h.create(i,n)}(t,e,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},function(l){var t=bt,e=t.lib,r=e.WordArray,i=e.Hasher,n=t.algo,H=[];!function(){for(var t=0;t<64;t++)H[t]=4294967296*l.abs(l.sin(t+1))|0}();var o=n.MD5=i.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var r=0;r<16;r++){var i=e+r,n=t[i];t[i]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8)}var o=this._hash.words,s=t[e+0],c=t[e+1],a=t[e+2],h=t[e+3],l=t[e+4],f=t[e+5],d=t[e+6],u=t[e+7],p=t[e+8],_=t[e+9],v=t[e+10],y=t[e+11],g=t[e+12],B=t[e+13],w=t[e+14],k=t[e+15],S=o[0],m=o[1],x=o[2],b=o[3];S=z(S,m,x,b,s,7,H[0]),b=z(b,S,m,x,c,12,H[1]),x=z(x,b,S,m,a,17,H[2]),m=z(m,x,b,S,h,22,H[3]),S=z(S,m,x,b,l,7,H[4]),b=z(b,S,m,x,f,12,H[5]),x=z(x,b,S,m,d,17,H[6]),m=z(m,x,b,S,u,22,H[7]),S=z(S,m,x,b,p,7,H[8]),b=z(b,S,m,x,_,12,H[9]),x=z(x,b,S,m,v,17,H[10]),m=z(m,x,b,S,y,22,H[11]),S=z(S,m,x,b,g,7,H[12]),b=z(b,S,m,x,B,12,H[13]),x=z(x,b,S,m,w,17,H[14]),S=A(S,m=z(m,x,b,S,k,22,H[15]),x,b,c,5,H[16]),b=A(b,S,m,x,d,9,H[17]),x=A(x,b,S,m,y,14,H[18]),m=A(m,x,b,S,s,20,H[19]),S=A(S,m,x,b,f,5,H[20]),b=A(b,S,m,x,v,9,H[21]),x=A(x,b,S,m,k,14,H[22]),m=A(m,x,b,S,l,20,H[23]),S=A(S,m,x,b,_,5,H[24]),b=A(b,S,m,x,w,9,H[25]),x=A(x,b,S,m,h,14,H[26]),m=A(m,x,b,S,p,20,H[27]),S=A(S,m,x,b,B,5,H[28]),b=A(b,S,m,x,a,9,H[29]),x=A(x,b,S,m,u,14,H[30]),S=C(S,m=A(m,x,b,S,g,20,H[31]),x,b,f,4,H[32]),b=C(b,S,m,x,p,11,H[33]),x=C(x,b,S,m,y,16,H[34]),m=C(m,x,b,S,w,23,H[35]),S=C(S,m,x,b,c,4,H[36]),b=C(b,S,m,x,l,11,H[37]),x=C(x,b,S,m,u,16,H[38]),m=C(m,x,b,S,v,23,H[39]),S=C(S,m,x,b,B,4,H[40]),b=C(b,S,m,x,s,11,H[41]),x=C(x,b,S,m,h,16,H[42]),m=C(m,x,b,S,d,23,H[43]),S=C(S,m,x,b,_,4,H[44]),b=C(b,S,m,x,g,11,H[45]),x=C(x,b,S,m,k,16,H[46]),S=D(S,m=C(m,x,b,S,a,23,H[47]),x,b,s,6,H[48]),b=D(b,S,m,x,u,10,H[49]),x=D(x,b,S,m,w,15,H[50]),m=D(m,x,b,S,f,21,H[51]),S=D(S,m,x,b,g,6,H[52]),b=D(b,S,m,x,h,10,H[53]),x=D(x,b,S,m,v,15,H[54]),m=D(m,x,b,S,c,21,H[55]),S=D(S,m,x,b,p,6,H[56]),b=D(b,S,m,x,k,10,H[57]),x=D(x,b,S,m,d,15,H[58]),m=D(m,x,b,S,B,21,H[59]),S=D(S,m,x,b,l,6,H[60]),b=D(b,S,m,x,y,10,H[61]),x=D(x,b,S,m,a,15,H[62]),m=D(m,x,b,S,_,21,H[63]),o[0]=o[0]+S|0,o[1]=o[1]+m|0,o[2]=o[2]+x|0,o[3]=o[3]+b|0},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;e[i>>>5]|=128<<24-i%32;var n=l.floor(r/4294967296),o=r;e[15+(64+i>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),e[14+(64+i>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),t.sigBytes=4*(e.length+1),this._process();for(var s=this._hash,c=s.words,a=0;a<4;a++){var h=c[a];c[a]=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8)}return s},clone:function(){var t=i.clone.call(this);return t._hash=this._hash.clone(),t}});function z(t,e,r,i,n,o,s){var c=t+(e&r|~e&i)+n+s;return(c<>>32-o)+e}function A(t,e,r,i,n,o,s){var c=t+(e&i|r&~i)+n+s;return(c<>>32-o)+e}function C(t,e,r,i,n,o,s){var c=t+(e^r^i)+n+s;return(c<>>32-o)+e}function D(t,e,r,i,n,o,s){var c=t+(r^(e|~i))+n+s;return(c<>>32-o)+e}t.MD5=i._createHelper(o),t.HmacMD5=i._createHmacHelper(o)}(Math),e=(t=bt).lib,r=e.WordArray,i=e.Hasher,n=t.algo,f=[],o=n.SHA1=i.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var r=this._hash.words,i=r[0],n=r[1],o=r[2],s=r[3],c=r[4],a=0;a<80;a++){if(a<16)f[a]=0|t[e+a];else{var h=f[a-3]^f[a-8]^f[a-14]^f[a-16];f[a]=h<<1|h>>>31}var l=(i<<5|i>>>27)+c+f[a];l+=a<20?1518500249+(n&o|~n&s):a<40?1859775393+(n^o^s):a<60?(n&o|n&s|o&s)-1894007588:(n^o^s)-899497514,c=s,s=o,o=n<<30|n>>>2,n=i,i=l}r[0]=r[0]+i|0,r[1]=r[1]+n|0,r[2]=r[2]+o|0,r[3]=r[3]+s|0,r[4]=r[4]+c|0},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return e[i>>>5]|=128<<24-i%32,e[14+(64+i>>>9<<4)]=Math.floor(r/4294967296),e[15+(64+i>>>9<<4)]=r,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=i.clone.call(this);return t._hash=this._hash.clone(),t}}),t.SHA1=i._createHelper(o),t.HmacSHA1=i._createHmacHelper(o),function(n){var t=bt,e=t.lib,r=e.WordArray,i=e.Hasher,o=t.algo,s=[],B=[];!function(){function t(t){for(var e=n.sqrt(t),r=2;r<=e;r++)if(!(t%r))return;return 1}function e(t){return 4294967296*(t-(0|t))|0}for(var r=2,i=0;i<64;)t(r)&&(i<8&&(s[i]=e(n.pow(r,.5))),B[i]=e(n.pow(r,1/3)),i++),r++}();var w=[],c=o.SHA256=i.extend({_doReset:function(){this._hash=new r.init(s.slice(0))},_doProcessBlock:function(t,e){for(var r=this._hash.words,i=r[0],n=r[1],o=r[2],s=r[3],c=r[4],a=r[5],h=r[6],l=r[7],f=0;f<64;f++){if(f<16)w[f]=0|t[e+f];else{var d=w[f-15],u=(d<<25|d>>>7)^(d<<14|d>>>18)^d>>>3,p=w[f-2],_=(p<<15|p>>>17)^(p<<13|p>>>19)^p>>>10;w[f]=u+w[f-7]+_+w[f-16]}var v=i&n^i&o^n&o,y=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),g=l+((c<<26|c>>>6)^(c<<21|c>>>11)^(c<<7|c>>>25))+(c&a^~c&h)+B[f]+w[f];l=h,h=a,a=c,c=s+g|0,s=o,o=n,n=i,i=g+(y+v)|0}r[0]=r[0]+i|0,r[1]=r[1]+n|0,r[2]=r[2]+o|0,r[3]=r[3]+s|0,r[4]=r[4]+c|0,r[5]=r[5]+a|0,r[6]=r[6]+h|0,r[7]=r[7]+l|0},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return e[i>>>5]|=128<<24-i%32,e[14+(64+i>>>9<<4)]=n.floor(r/4294967296),e[15+(64+i>>>9<<4)]=r,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=i.clone.call(this);return t._hash=this._hash.clone(),t}});t.SHA256=i._createHelper(c),t.HmacSHA256=i._createHmacHelper(c)}(Math),function(){var n=bt.lib.WordArray,t=bt.enc;t.Utf16=t.Utf16BE={stringify:function(t){for(var e=t.words,r=t.sigBytes,i=[],n=0;n>>2]>>>16-n%4*8&65535;i.push(String.fromCharCode(o))}return i.join("")},parse:function(t){for(var e=t.length,r=[],i=0;i>>1]|=t.charCodeAt(i)<<16-i%2*16;return n.create(r,2*e)}};function s(t){return t<<8&4278255360|t>>>8&16711935}t.Utf16LE={stringify:function(t){for(var e=t.words,r=t.sigBytes,i=[],n=0;n>>2]>>>16-n%4*8&65535);i.push(String.fromCharCode(o))}return i.join("")},parse:function(t){for(var e=t.length,r=[],i=0;i>>1]|=s(t.charCodeAt(i)<<16-i%2*16);return n.create(r,2*e)}}}(),function(){if("function"==typeof ArrayBuffer){var t=bt.lib.WordArray,n=t.init;(t.init=function(t){if(t instanceof ArrayBuffer&&(t=new Uint8Array(t)),(t instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)),t instanceof Uint8Array){for(var e=t.byteLength,r=[],i=0;i>>2]|=t[i]<<24-i%4*8;n.call(this,r,e)}else n.apply(this,arguments)}).prototype=t}}(),Math,c=(s=bt).lib,a=c.WordArray,l=c.Hasher,d=s.algo,m=a.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),x=a.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),b=a.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),H=a.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),z=a.create([0,1518500249,1859775393,2400959708,2840853838]),A=a.create([1352829926,1548603684,1836072691,2053994217,0]),u=d.RIPEMD160=l.extend({_doReset:function(){this._hash=a.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var r=0;r<16;r++){var i=e+r,n=t[i];t[i]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8)}var o,s,c,a,h,l,f,d,u,p,_,v=this._hash.words,y=z.words,g=A.words,B=m.words,w=x.words,k=b.words,S=H.words;l=o=v[0],f=s=v[1],d=c=v[2],u=a=v[3],p=h=v[4];for(r=0;r<80;r+=1)_=o+t[e+B[r]]|0,_+=r<16?mt(s,c,a)+y[0]:r<32?xt(s,c,a)+y[1]:r<48?Ht(s,c,a)+y[2]:r<64?zt(s,c,a)+y[3]:At(s,c,a)+y[4],_=(_=Ct(_|=0,k[r]))+h|0,o=h,h=a,a=Ct(c,10),c=s,s=_,_=l+t[e+w[r]]|0,_+=r<16?At(f,d,u)+g[0]:r<32?zt(f,d,u)+g[1]:r<48?Ht(f,d,u)+g[2]:r<64?xt(f,d,u)+g[3]:mt(f,d,u)+g[4],_=(_=Ct(_|=0,S[r]))+p|0,l=p,p=u,u=Ct(d,10),d=f,f=_;_=v[1]+c+u|0,v[1]=v[2]+a+p|0,v[2]=v[3]+h+l|0,v[3]=v[4]+o+f|0,v[4]=v[0]+s+d|0,v[0]=_},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;e[i>>>5]|=128<<24-i%32,e[14+(64+i>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),t.sigBytes=4*(e.length+1),this._process();for(var n=this._hash,o=n.words,s=0;s<5;s++){var c=o[s];o[s]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8)}return n},clone:function(){var t=l.clone.call(this);return t._hash=this._hash.clone(),t}}),s.RIPEMD160=l._createHelper(u),s.HmacRIPEMD160=l._createHmacHelper(u),p=bt.lib.Base,_=bt.enc.Utf8,bt.algo.HMAC=p.extend({init:function(t,e){t=this._hasher=new t.init,"string"==typeof e&&(e=_.parse(e));var r=t.blockSize,i=4*r;e.sigBytes>i&&(e=t.finalize(e)),e.clamp();for(var n=this._oKey=e.clone(),o=this._iKey=e.clone(),s=n.words,c=o.words,a=0;a>>24)|4278255360&(o<<24|o>>>8),s=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),(x=r[n]).high^=s,x.low^=o}for(var c=0;c<24;c++){for(var a=0;a<5;a++){for(var h=0,l=0,f=0;f<5;f++){h^=(x=r[a+5*f]).high,l^=x.low}var d=R[a];d.high=h,d.low=l}for(a=0;a<5;a++){var u=R[(a+4)%5],p=R[(a+1)%5],_=p.high,v=p.low;for(h=u.high^(_<<1|v>>>31),l=u.low^(v<<1|_>>>31),f=0;f<5;f++){(x=r[a+5*f]).high^=h,x.low^=l}}for(var y=1;y<25;y++){var g=(x=r[y]).high,B=x.low,w=C[y];l=w<32?(h=g<>>32-w,B<>>32-w):(h=B<>>64-w,g<>>64-w);var k=R[D[y]];k.high=h,k.low=l}var S=R[0],m=r[0];S.high=m.high,S.low=m.low;for(a=0;a<5;a++)for(f=0;f<5;f++){var x=r[y=a+5*f],b=R[y],H=R[(a+1)%5+5*f],z=R[(a+2)%5+5*f];x.high=b.high^~H.high&z.high,x.low=b.low^~H.low&z.low}x=r[0];var A=E[c];x.high^=A.high,x.low^=A.low}},_doFinalize:function(){var t=this._data,e=t.words,r=(this._nDataBytes,8*t.sigBytes),i=32*this.blockSize;e[r>>>5]|=1<<24-r%32,e[(d.ceil((1+r)/i)*i>>>5)-1]|=128,t.sigBytes=4*e.length,this._process();for(var n=this._state,o=this.cfg.outputLength/8,s=o/8,c=[],a=0;a>>24)|4278255360&(l<<24|l>>>8),f=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),c.push(f),c.push(l)}return new u.init(c,o)},clone:function(){for(var t=i.clone.call(this),e=t._state=this._state.slice(0),r=0;r<25;r++)e[r]=e[r].clone();return t}});t.SHA3=i._createHelper(n),t.HmacSHA3=i._createHmacHelper(n)}(Math),function(){var t=bt,e=t.lib.Hasher,r=t.x64,i=r.Word,n=r.WordArray,o=t.algo;function s(){return i.create.apply(i,arguments)}var mt=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],xt=[];!function(){for(var t=0;t<80;t++)xt[t]=s()}();var c=o.SHA512=e.extend({_doReset:function(){this._hash=new n.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(t,e){for(var r=this._hash.words,i=r[0],n=r[1],o=r[2],s=r[3],c=r[4],a=r[5],h=r[6],l=r[7],f=i.high,d=i.low,u=n.high,p=n.low,_=o.high,v=o.low,y=s.high,g=s.low,B=c.high,w=c.low,k=a.high,S=a.low,m=h.high,x=h.low,b=l.high,H=l.low,z=f,A=d,C=u,D=p,E=_,R=v,M=y,F=g,P=B,W=w,O=k,I=S,U=m,K=x,X=b,L=H,j=0;j<80;j++){var N,T,q=xt[j];if(j<16)T=q.high=0|t[e+2*j],N=q.low=0|t[e+2*j+1];else{var Z=xt[j-15],V=Z.high,G=Z.low,J=(V>>>1|G<<31)^(V>>>8|G<<24)^V>>>7,$=(G>>>1|V<<31)^(G>>>8|V<<24)^(G>>>7|V<<25),Q=xt[j-2],Y=Q.high,tt=Q.low,et=(Y>>>19|tt<<13)^(Y<<3|tt>>>29)^Y>>>6,rt=(tt>>>19|Y<<13)^(tt<<3|Y>>>29)^(tt>>>6|Y<<26),it=xt[j-7],nt=it.high,ot=it.low,st=xt[j-16],ct=st.high,at=st.low;T=(T=(T=J+nt+((N=$+ot)>>>0<$>>>0?1:0))+et+((N+=rt)>>>0>>0?1:0))+ct+((N+=at)>>>0>>0?1:0),q.high=T,q.low=N}var ht,lt=P&O^~P&U,ft=W&I^~W&K,dt=z&C^z&E^C&E,ut=A&D^A&R^D&R,pt=(z>>>28|A<<4)^(z<<30|A>>>2)^(z<<25|A>>>7),_t=(A>>>28|z<<4)^(A<<30|z>>>2)^(A<<25|z>>>7),vt=(P>>>14|W<<18)^(P>>>18|W<<14)^(P<<23|W>>>9),yt=(W>>>14|P<<18)^(W>>>18|P<<14)^(W<<23|P>>>9),gt=mt[j],Bt=gt.high,wt=gt.low,kt=X+vt+((ht=L+yt)>>>0>>0?1:0),St=_t+ut;X=U,L=K,U=O,K=I,O=P,I=W,P=M+(kt=(kt=(kt=kt+lt+((ht=ht+ft)>>>0>>0?1:0))+Bt+((ht=ht+wt)>>>0>>0?1:0))+T+((ht=ht+N)>>>0>>0?1:0))+((W=F+ht|0)>>>0>>0?1:0)|0,M=E,F=R,E=C,R=D,C=z,D=A,z=kt+(pt+dt+(St>>>0<_t>>>0?1:0))+((A=ht+St|0)>>>0>>0?1:0)|0}d=i.low=d+A,i.high=f+z+(d>>>0>>0?1:0),p=n.low=p+D,n.high=u+C+(p>>>0>>0?1:0),v=o.low=v+R,o.high=_+E+(v>>>0>>0?1:0),g=s.low=g+F,s.high=y+M+(g>>>0>>0?1:0),w=c.low=w+W,c.high=B+P+(w>>>0>>0?1:0),S=a.low=S+I,a.high=k+O+(S>>>0>>0?1:0),x=h.low=x+K,h.high=m+U+(x>>>0>>0?1:0),H=l.low=H+L,l.high=b+X+(H>>>0>>0?1:0)},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return e[i>>>5]|=128<<24-i%32,e[30+(128+i>>>10<<5)]=Math.floor(r/4294967296),e[31+(128+i>>>10<<5)]=r,t.sigBytes=4*e.length,this._process(),this._hash.toX32()},clone:function(){var t=e.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:32});t.SHA512=e._createHelper(c),t.HmacSHA512=e._createHmacHelper(c)}(),Z=(q=bt).x64,V=Z.Word,G=Z.WordArray,J=q.algo,$=J.SHA512,Q=J.SHA384=$.extend({_doReset:function(){this._hash=new G.init([new V.init(3418070365,3238371032),new V.init(1654270250,914150663),new V.init(2438529370,812702999),new V.init(355462360,4144912697),new V.init(1731405415,4290775857),new V.init(2394180231,1750603025),new V.init(3675008525,1694076839),new V.init(1203062813,3204075428)])},_doFinalize:function(){var t=$._doFinalize.call(this);return t.sigBytes-=16,t}}),q.SHA384=$._createHelper(Q),q.HmacSHA384=$._createHmacHelper(Q),bt.lib.Cipher||function(){var t=bt,e=t.lib,r=e.Base,a=e.WordArray,i=e.BufferedBlockAlgorithm,n=t.enc,o=(n.Utf8,n.Base64),s=t.algo.EvpKDF,c=e.Cipher=i.extend({cfg:r.extend(),createEncryptor:function(t,e){return this.create(this._ENC_XFORM_MODE,t,e)},createDecryptor:function(t,e){return this.create(this._DEC_XFORM_MODE,t,e)},init:function(t,e,r){this.cfg=this.cfg.extend(r),this._xformMode=t,this._key=e,this.reset()},reset:function(){i.reset.call(this),this._doReset()},process:function(t){return this._append(t),this._process()},finalize:function(t){return t&&this._append(t),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(i){return{encrypt:function(t,e,r){return h(e).encrypt(i,t,e,r)},decrypt:function(t,e,r){return h(e).decrypt(i,t,e,r)}}}});function h(t){return"string"==typeof t?w:g}e.StreamCipher=c.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var l,f=t.mode={},d=e.BlockCipherMode=r.extend({createEncryptor:function(t,e){return this.Encryptor.create(t,e)},createDecryptor:function(t,e){return this.Decryptor.create(t,e)},init:function(t,e){this._cipher=t,this._iv=e}}),u=f.CBC=((l=d.extend()).Encryptor=l.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize;p.call(this,t,e,i),r.encryptBlock(t,e),this._prevBlock=t.slice(e,e+i)}}),l.Decryptor=l.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize,n=t.slice(e,e+i);r.decryptBlock(t,e),p.call(this,t,e,i),this._prevBlock=n}}),l);function p(t,e,r){var i,n=this._iv;n?(i=n,this._iv=void 0):i=this._prevBlock;for(var o=0;o>>2];t.sigBytes-=e}},v=(e.BlockCipher=c.extend({cfg:c.cfg.extend({mode:u,padding:_}),reset:function(){var t;c.reset.call(this);var e=this.cfg,r=e.iv,i=e.mode;this._xformMode==this._ENC_XFORM_MODE?t=i.createEncryptor:(t=i.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==t?this._mode.init(this,r&&r.words):(this._mode=t.call(i,this,r&&r.words),this._mode.__creator=t)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t,e=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(e.pad(this._data,this.blockSize),t=this._process(!0)):(t=this._process(!0),e.unpad(t)),t},blockSize:4}),e.CipherParams=r.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}})),y=(t.format={}).OpenSSL={stringify:function(t){var e=t.ciphertext,r=t.salt;return(r?a.create([1398893684,1701076831]).concat(r).concat(e):e).toString(o)},parse:function(t){var e,r=o.parse(t),i=r.words;return 1398893684==i[0]&&1701076831==i[1]&&(e=a.create(i.slice(2,4)),i.splice(0,4),r.sigBytes-=16),v.create({ciphertext:r,salt:e})}},g=e.SerializableCipher=r.extend({cfg:r.extend({format:y}),encrypt:function(t,e,r,i){i=this.cfg.extend(i);var n=t.createEncryptor(r,i),o=n.finalize(e),s=n.cfg;return v.create({ciphertext:o,key:r,iv:s.iv,algorithm:t,mode:s.mode,padding:s.padding,blockSize:t.blockSize,formatter:i.format})},decrypt:function(t,e,r,i){return i=this.cfg.extend(i),e=this._parse(e,i.format),t.createDecryptor(r,i).finalize(e.ciphertext)},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),B=(t.kdf={}).OpenSSL={execute:function(t,e,r,i){i=i||a.random(8);var n=s.create({keySize:e+r}).compute(t,i),o=a.create(n.words.slice(e),4*r);return n.sigBytes=4*e,v.create({key:n,iv:o,salt:i})}},w=e.PasswordBasedCipher=g.extend({cfg:g.cfg.extend({kdf:B}),encrypt:function(t,e,r,i){var n=(i=this.cfg.extend(i)).kdf.execute(r,t.keySize,t.ivSize);i.iv=n.iv;var o=g.encrypt.call(this,t,e,n.key,i);return o.mixIn(n),o},decrypt:function(t,e,r,i){i=this.cfg.extend(i),e=this._parse(e,i.format);var n=i.kdf.execute(r,t.keySize,t.ivSize,e.salt);return i.iv=n.iv,g.decrypt.call(this,t,e,n.key,i)}})}(),bt.mode.CFB=((Y=bt.lib.BlockCipherMode.extend()).Encryptor=Y.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize;Dt.call(this,t,e,i,r),this._prevBlock=t.slice(e,e+i)}}),Y.Decryptor=Y.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize,n=t.slice(e,e+i);Dt.call(this,t,e,i,r),this._prevBlock=n}}),Y),bt.mode.ECB=((tt=bt.lib.BlockCipherMode.extend()).Encryptor=tt.extend({processBlock:function(t,e){this._cipher.encryptBlock(t,e)}}),tt.Decryptor=tt.extend({processBlock:function(t,e){this._cipher.decryptBlock(t,e)}}),tt),bt.pad.AnsiX923={pad:function(t,e){var r=t.sigBytes,i=4*e,n=i-r%i,o=r+n-1;t.clamp(),t.words[o>>>2]|=n<<24-o%4*8,t.sigBytes+=n},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},bt.pad.Iso10126={pad:function(t,e){var r=4*e,i=r-t.sigBytes%r;t.concat(bt.lib.WordArray.random(i-1)).concat(bt.lib.WordArray.create([i<<24],1))},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},bt.pad.Iso97971={pad:function(t,e){t.concat(bt.lib.WordArray.create([2147483648],1)),bt.pad.ZeroPadding.pad(t,e)},unpad:function(t){bt.pad.ZeroPadding.unpad(t),t.sigBytes--}},bt.mode.OFB=(et=bt.lib.BlockCipherMode.extend(),rt=et.Encryptor=et.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize,n=this._iv,o=this._keystream;n&&(o=this._keystream=n.slice(0),this._iv=void 0),r.encryptBlock(o,0);for(var s=0;s>>8^255&n^99,h[r]=n;var o=t[l[n]=r],s=t[o],c=t[s],a=257*t[n]^16843008*n;f[r]=a<<24|a>>>8,d[r]=a<<16|a>>>16,u[r]=a<<8|a>>>24,p[r]=a;a=16843009*c^65537*s^257*o^16843008*r;_[n]=a<<24|a>>>8,v[n]=a<<16|a>>>16,y[n]=a<<8|a>>>24,g[n]=a,r?(r=o^t[t[t[c^o]]],i^=t[t[i]]):r=i=1}}();var B=[0,1,2,4,8,16,32,64,128,27,54],i=r.AES=e.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var t=this._keyPriorReset=this._key,e=t.words,r=t.sigBytes/4,i=4*(1+(this._nRounds=6+r)),n=this._keySchedule=[],o=0;o>>24]<<24|h[a>>>16&255]<<16|h[a>>>8&255]<<8|h[255&a]):(a=h[(a=a<<8|a>>>24)>>>24]<<24|h[a>>>16&255]<<16|h[a>>>8&255]<<8|h[255&a],a^=B[o/r|0]<<24),n[o]=n[o-r]^a);for(var s=this._invKeySchedule=[],c=0;c>>24]]^v[h[a>>>16&255]]^y[h[a>>>8&255]]^g[h[255&a]]}}},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,f,d,u,p,h)},decryptBlock:function(t,e){var r=t[e+1];t[e+1]=t[e+3],t[e+3]=r,this._doCryptBlock(t,e,this._invKeySchedule,_,v,y,g,l);r=t[e+1];t[e+1]=t[e+3],t[e+3]=r},_doCryptBlock:function(t,e,r,i,n,o,s,c){for(var a=this._nRounds,h=t[e]^r[0],l=t[e+1]^r[1],f=t[e+2]^r[2],d=t[e+3]^r[3],u=4,p=1;p>>24]^n[l>>>16&255]^o[f>>>8&255]^s[255&d]^r[u++],v=i[l>>>24]^n[f>>>16&255]^o[d>>>8&255]^s[255&h]^r[u++],y=i[f>>>24]^n[d>>>16&255]^o[h>>>8&255]^s[255&l]^r[u++],g=i[d>>>24]^n[h>>>16&255]^o[l>>>8&255]^s[255&f]^r[u++];h=_,l=v,f=y,d=g}_=(c[h>>>24]<<24|c[l>>>16&255]<<16|c[f>>>8&255]<<8|c[255&d])^r[u++],v=(c[l>>>24]<<24|c[f>>>16&255]<<16|c[d>>>8&255]<<8|c[255&h])^r[u++],y=(c[f>>>24]<<24|c[d>>>16&255]<<16|c[h>>>8&255]<<8|c[255&l])^r[u++],g=(c[d>>>24]<<24|c[h>>>16&255]<<16|c[l>>>8&255]<<8|c[255&f])^r[u++];t[e]=_,t[e+1]=v,t[e+2]=y,t[e+3]=g},keySize:8});t.AES=e._createHelper(i)}(),function(){var t=bt,e=t.lib,n=e.WordArray,r=e.BlockCipher,i=t.algo,h=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],l=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],f=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],d=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],u=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],o=i.DES=r.extend({_doReset:function(){for(var t=this._key.words,e=[],r=0;r<56;r++){var i=h[r]-1;e[r]=t[i>>>5]>>>31-i%32&1}for(var n=this._subKeys=[],o=0;o<16;o++){var s=n[o]=[],c=f[o];for(r=0;r<24;r++)s[r/6|0]|=e[(l[r]-1+c)%28]<<31-r%6,s[4+(r/6|0)]|=e[28+(l[r+24]-1+c)%28]<<31-r%6;s[0]=s[0]<<1|s[0]>>>31;for(r=1;r<7;r++)s[r]=s[r]>>>4*(r-1)+3;s[7]=s[7]<<5|s[7]>>>27}var a=this._invSubKeys=[];for(r=0;r<16;r++)a[r]=n[15-r]},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._subKeys)},decryptBlock:function(t,e){this._doCryptBlock(t,e,this._invSubKeys)},_doCryptBlock:function(t,e,r){this._lBlock=t[e],this._rBlock=t[e+1],p.call(this,4,252645135),p.call(this,16,65535),_.call(this,2,858993459),_.call(this,8,16711935),p.call(this,1,1431655765);for(var i=0;i<16;i++){for(var n=r[i],o=this._lBlock,s=this._rBlock,c=0,a=0;a<8;a++)c|=d[a][((s^n[a])&u[a])>>>0];this._lBlock=s,this._rBlock=o^c}var h=this._lBlock;this._lBlock=this._rBlock,this._rBlock=h,p.call(this,1,1431655765),_.call(this,8,16711935),_.call(this,2,858993459),p.call(this,16,65535),p.call(this,4,252645135),t[e]=this._lBlock,t[e+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function p(t,e){var r=(this._lBlock>>>t^this._rBlock)&e;this._rBlock^=r,this._lBlock^=r<>>t^this._lBlock)&e;this._lBlock^=r,this._rBlock^=r<192.");var e=t.slice(0,2),r=t.length<4?t.slice(0,2):t.slice(2,4),i=t.length<6?t.slice(0,2):t.slice(4,6);this._des1=o.createEncryptor(n.create(e)),this._des2=o.createEncryptor(n.create(r)),this._des3=o.createEncryptor(n.create(i))},encryptBlock:function(t,e){this._des1.encryptBlock(t,e),this._des2.decryptBlock(t,e),this._des3.encryptBlock(t,e)},decryptBlock:function(t,e){this._des3.decryptBlock(t,e),this._des2.encryptBlock(t,e),this._des1.decryptBlock(t,e)},keySize:6,ivSize:2,blockSize:2});t.TripleDES=r._createHelper(s)}(),function(){var t=bt,e=t.lib.StreamCipher,r=t.algo,i=r.RC4=e.extend({_doReset:function(){for(var t=this._key,e=t.words,r=t.sigBytes,i=this._S=[],n=0;n<256;n++)i[n]=n;n=0;for(var o=0;n<256;n++){var s=n%r,c=e[s>>>2]>>>24-s%4*8&255;o=(o+i[n]+c)%256;var a=i[n];i[n]=i[o],i[o]=a}this._i=this._j=0},_doProcessBlock:function(t,e){t[e]^=n.call(this)},keySize:8,ivSize:0});function n(){for(var t=this._S,e=this._i,r=this._j,i=0,n=0;n<4;n++){r=(r+t[e=(e+1)%256])%256;var o=t[e];t[e]=t[r],t[r]=o,i|=t[(t[e]+t[r])%256]<<24-8*n}return this._i=e,this._j=r,i}t.RC4=e._createHelper(i);var o=r.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var t=this.cfg.drop;0>>24)|4278255360&(t[r]<<24|t[r]>>>8);var i=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],n=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];for(r=this._b=0;r<4;r++)Rt.call(this);for(r=0;r<8;r++)n[r]^=i[r+4&7];if(e){var o=e.words,s=o[0],c=o[1],a=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),h=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),l=a>>>16|4294901760&h,f=h<<16|65535&a;n[0]^=a,n[1]^=l,n[2]^=h,n[3]^=f,n[4]^=a,n[5]^=l,n[6]^=h,n[7]^=f;for(r=0;r<4;r++)Rt.call(this)}},_doProcessBlock:function(t,e){var r=this._X;Rt.call(this),lt[0]=r[0]^r[5]>>>16^r[3]<<16,lt[1]=r[2]^r[7]>>>16^r[5]<<16,lt[2]=r[4]^r[1]>>>16^r[7]<<16,lt[3]=r[6]^r[3]>>>16^r[1]<<16;for(var i=0;i<4;i++)lt[i]=16711935&(lt[i]<<8|lt[i]>>>24)|4278255360&(lt[i]<<24|lt[i]>>>8),t[e+i]^=lt[i]},blockSize:4,ivSize:2}),ct.Rabbit=at._createHelper(ut),bt.mode.CTR=(pt=bt.lib.BlockCipherMode.extend(),_t=pt.Encryptor=pt.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize,n=this._iv,o=this._counter;n&&(o=this._counter=n.slice(0),this._iv=void 0);var s=o.slice(0);r.encryptBlock(s,0),o[i-1]=o[i-1]+1|0;for(var c=0;c>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],i=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]],n=this._b=0;n<4;n++)Mt.call(this);for(n=0;n<8;n++)i[n]^=r[n+4&7];if(e){var o=e.words,s=o[0],c=o[1],a=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),h=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),l=a>>>16|4294901760&h,f=h<<16|65535&a;i[0]^=a,i[1]^=l,i[2]^=h,i[3]^=f,i[4]^=a,i[5]^=l,i[6]^=h,i[7]^=f;for(n=0;n<4;n++)Mt.call(this)}},_doProcessBlock:function(t,e){var r=this._X;Mt.call(this),Bt[0]=r[0]^r[5]>>>16^r[3]<<16,Bt[1]=r[2]^r[7]>>>16^r[5]<<16,Bt[2]=r[4]^r[1]>>>16^r[7]<<16,Bt[3]=r[6]^r[3]>>>16^r[1]<<16;for(var i=0;i<4;i++)Bt[i]=16711935&(Bt[i]<<8|Bt[i]>>>24)|4278255360&(Bt[i]<<24|Bt[i]>>>8),t[e+i]^=Bt[i]},blockSize:4,ivSize:2}),vt.RabbitLegacy=yt._createHelper(St),bt.pad.ZeroPadding={pad:function(t,e){var r=4*e;t.clamp(),t.sigBytes+=r-(t.sigBytes%r||r)},unpad:function(t){var e=t.words,r=t.sigBytes-1;for(r=t.sigBytes-1;0<=r;r--)if(e[r>>>2]>>>24-r%4*8&255){t.sigBytes=r+1;break}}},bt}); \ No newline at end of file diff --git a/dist/js/lib/dropzone.min.js b/dist/js/lib/dropzone.min.js index 99c9564..72c1557 100755 --- a/dist/js/lib/dropzone.min.js +++ b/dist/js/lib/dropzone.min.js @@ -1 +1,4 @@ +// Dropzone is a JavaScript library that turns any HTML element into a dropzone. This means that a user can drag and drop a file onto it, and Dropzone will display file previews and upload progress, and handle the upload for you via XHR. +// https://github.com/dropzone/dropzone/tree/main + !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(self,(function(){return function(){var e={3099:function(e){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},6077:function(e,t,n){var r=n(111);e.exports=function(e){if(!r(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},1223:function(e,t,n){var r=n(5112),i=n(30),o=n(3070),a=r("unscopables"),u=Array.prototype;null==u[a]&&o.f(u,a,{configurable:!0,value:i(null)}),e.exports=function(e){u[a][e]=!0}},1530:function(e,t,n){"use strict";var r=n(8710).charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},5787:function(e){e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},9670:function(e,t,n){var r=n(111);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},4019:function(e){e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},260:function(e,t,n){"use strict";var r,i=n(4019),o=n(9781),a=n(7854),u=n(111),s=n(6656),l=n(648),c=n(8880),f=n(1320),p=n(3070).f,h=n(9518),d=n(7674),v=n(5112),y=n(9711),g=a.Int8Array,m=g&&g.prototype,b=a.Uint8ClampedArray,x=b&&b.prototype,w=g&&h(g),E=m&&h(m),k=Object.prototype,A=k.isPrototypeOf,S=v("toStringTag"),F=y("TYPED_ARRAY_TAG"),T=i&&!!d&&"Opera"!==l(a.opera),C=!1,L={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},R={BigInt64Array:8,BigUint64Array:8},I=function(e){if(!u(e))return!1;var t=l(e);return s(L,t)||s(R,t)};for(r in L)a[r]||(T=!1);if((!T||"function"!=typeof w||w===Function.prototype)&&(w=function(){throw TypeError("Incorrect invocation")},T))for(r in L)a[r]&&d(a[r],w);if((!T||!E||E===k)&&(E=w.prototype,T))for(r in L)a[r]&&d(a[r].prototype,E);if(T&&h(x)!==E&&d(x,E),o&&!s(E,S))for(r in C=!0,p(E,S,{get:function(){return u(this)?this[F]:void 0}}),L)a[r]&&c(a[r],F,r);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:T,TYPED_ARRAY_TAG:C&&F,aTypedArray:function(e){if(I(e))return e;throw TypeError("Target is not a typed array")},aTypedArrayConstructor:function(e){if(d){if(A.call(w,e))return e}else for(var t in L)if(s(L,r)){var n=a[t];if(n&&(e===n||A.call(n,e)))return e}throw TypeError("Target is not a typed array constructor")},exportTypedArrayMethod:function(e,t,n){if(o){if(n)for(var r in L){var i=a[r];i&&s(i.prototype,e)&&delete i.prototype[e]}E[e]&&!n||f(E,e,n?t:T&&m[e]||t)}},exportTypedArrayStaticMethod:function(e,t,n){var r,i;if(o){if(d){if(n)for(r in L)(i=a[r])&&s(i,e)&&delete i[e];if(w[e]&&!n)return;try{return f(w,e,n?t:T&&g[e]||t)}catch(e){}}for(r in L)!(i=a[r])||i[e]&&!n||f(i,e,t)}},isView:function(e){if(!u(e))return!1;var t=l(e);return"DataView"===t||s(L,t)||s(R,t)},isTypedArray:I,TypedArray:w,TypedArrayPrototype:E}},3331:function(e,t,n){"use strict";var r=n(7854),i=n(9781),o=n(4019),a=n(8880),u=n(2248),s=n(7293),l=n(5787),c=n(9958),f=n(7466),p=n(7067),h=n(1179),d=n(9518),v=n(7674),y=n(8006).f,g=n(3070).f,m=n(1285),b=n(8003),x=n(9909),w=x.get,E=x.set,k="ArrayBuffer",A="DataView",S="Wrong index",F=r.ArrayBuffer,T=F,C=r.DataView,L=C&&C.prototype,R=Object.prototype,I=r.RangeError,U=h.pack,O=h.unpack,_=function(e){return[255&e]},M=function(e){return[255&e,e>>8&255]},z=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},P=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},j=function(e){return U(e,23,4)},D=function(e){return U(e,52,8)},N=function(e,t){g(e.prototype,t,{get:function(){return w(this)[t]}})},B=function(e,t,n,r){var i=p(n),o=w(e);if(i+t>o.byteLength)throw I(S);var a=w(o.buffer).bytes,u=i+o.byteOffset,s=a.slice(u,u+t);return r?s:s.reverse()},q=function(e,t,n,r,i,o){var a=p(n),u=w(e);if(a+t>u.byteLength)throw I(S);for(var s=w(u.buffer).bytes,l=a+u.byteOffset,c=r(+i),f=0;fG;)(W=Y[G++])in T||a(T,W,F[W]);H.constructor=T}v&&d(L)!==R&&v(L,R);var Q=new C(new T(2)),$=L.setInt8;Q.setInt8(0,2147483648),Q.setInt8(1,2147483649),!Q.getInt8(0)&&Q.getInt8(1)||u(L,{setInt8:function(e,t){$.call(this,e,t<<24>>24)},setUint8:function(e,t){$.call(this,e,t<<24>>24)}},{unsafe:!0})}else T=function(e){l(this,T,k);var t=p(e);E(this,{bytes:m.call(new Array(t),0),byteLength:t}),i||(this.byteLength=t)},C=function(e,t,n){l(this,C,A),l(e,T,A);var r=w(e).byteLength,o=c(t);if(o<0||o>r)throw I("Wrong offset");if(o+(n=void 0===n?r-o:f(n))>r)throw I("Wrong length");E(this,{buffer:e,byteLength:n,byteOffset:o}),i||(this.buffer=e,this.byteLength=n,this.byteOffset=o)},i&&(N(T,"byteLength"),N(C,"buffer"),N(C,"byteLength"),N(C,"byteOffset")),u(C.prototype,{getInt8:function(e){return B(this,1,e)[0]<<24>>24},getUint8:function(e){return B(this,1,e)[0]},getInt16:function(e){var t=B(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=B(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return P(B(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return P(B(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return O(B(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return O(B(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){q(this,1,e,_,t)},setUint8:function(e,t){q(this,1,e,_,t)},setInt16:function(e,t){q(this,2,e,M,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){q(this,2,e,M,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){q(this,4,e,z,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){q(this,4,e,z,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){q(this,4,e,j,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){q(this,8,e,D,t,arguments.length>2?arguments[2]:void 0)}});b(T,k),b(C,A),e.exports={ArrayBuffer:T,DataView:C}},1048:function(e,t,n){"use strict";var r=n(7908),i=n(1400),o=n(7466),a=Math.min;e.exports=[].copyWithin||function(e,t){var n=r(this),u=o(n.length),s=i(e,u),l=i(t,u),c=arguments.length>2?arguments[2]:void 0,f=a((void 0===c?u:i(c,u))-l,u-s),p=1;for(l0;)l in n?n[s]=n[l]:delete n[s],s+=p,l+=p;return n}},1285:function(e,t,n){"use strict";var r=n(7908),i=n(1400),o=n(7466);e.exports=function(e){for(var t=r(this),n=o(t.length),a=arguments.length,u=i(a>1?arguments[1]:void 0,n),s=a>2?arguments[2]:void 0,l=void 0===s?n:i(s,n);l>u;)t[u++]=e;return t}},8533:function(e,t,n){"use strict";var r=n(2092).forEach,i=n(9341)("forEach");e.exports=i?[].forEach:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}},8457:function(e,t,n){"use strict";var r=n(9974),i=n(7908),o=n(3411),a=n(7659),u=n(7466),s=n(6135),l=n(1246);e.exports=function(e){var t,n,c,f,p,h,d=i(e),v="function"==typeof this?this:Array,y=arguments.length,g=y>1?arguments[1]:void 0,m=void 0!==g,b=l(d),x=0;if(m&&(g=r(g,y>2?arguments[2]:void 0,2)),null==b||v==Array&&a(b))for(n=new v(t=u(d.length));t>x;x++)h=m?g(d[x],x):d[x],s(n,x,h);else for(p=(f=b.call(d)).next,n=new v;!(c=p.call(f)).done;x++)h=m?o(f,g,[c.value,x],!0):c.value,s(n,x,h);return n.length=x,n}},1318:function(e,t,n){var r=n(5656),i=n(7466),o=n(1400),a=function(e){return function(t,n,a){var u,s=r(t),l=i(s.length),c=o(a,l);if(e&&n!=n){for(;l>c;)if((u=s[c++])!=u)return!0}else for(;l>c;c++)if((e||c in s)&&s[c]===n)return e||c||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},2092:function(e,t,n){var r=n(9974),i=n(8361),o=n(7908),a=n(7466),u=n(5417),s=[].push,l=function(e){var t=1==e,n=2==e,l=3==e,c=4==e,f=6==e,p=7==e,h=5==e||f;return function(d,v,y,g){for(var m,b,x=o(d),w=i(x),E=r(v,y,3),k=a(w.length),A=0,S=g||u,F=t?S(d,k):n||p?S(d,0):void 0;k>A;A++)if((h||A in w)&&(b=E(m=w[A],A,x),e))if(t)F[A]=b;else if(b)switch(e){case 3:return!0;case 5:return m;case 6:return A;case 2:s.call(F,m)}else switch(e){case 4:return!1;case 7:s.call(F,m)}return f?-1:l||c?c:F}};e.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterOut:l(7)}},6583:function(e,t,n){"use strict";var r=n(5656),i=n(9958),o=n(7466),a=n(9341),u=Math.min,s=[].lastIndexOf,l=!!s&&1/[1].lastIndexOf(1,-0)<0,c=a("lastIndexOf"),f=l||!c;e.exports=f?function(e){if(l)return s.apply(this,arguments)||0;var t=r(this),n=o(t.length),a=n-1;for(arguments.length>1&&(a=u(a,i(arguments[1]))),a<0&&(a=n+a);a>=0;a--)if(a in t&&t[a]===e)return a||0;return-1}:s},1194:function(e,t,n){var r=n(7293),i=n(5112),o=n(7392),a=i("species");e.exports=function(e){return o>=51||!r((function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},9341:function(e,t,n){"use strict";var r=n(7293);e.exports=function(e,t){var n=[][e];return!!n&&r((function(){n.call(null,t||function(){throw 1},1)}))}},3671:function(e,t,n){var r=n(3099),i=n(7908),o=n(8361),a=n(7466),u=function(e){return function(t,n,u,s){r(n);var l=i(t),c=o(l),f=a(l.length),p=e?f-1:0,h=e?-1:1;if(u<2)for(;;){if(p in c){s=c[p],p+=h;break}if(p+=h,e?p<0:f<=p)throw TypeError("Reduce of empty array with no initial value")}for(;e?p>=0:f>p;p+=h)p in c&&(s=n(s,c[p],p,l));return s}};e.exports={left:u(!1),right:u(!0)}},5417:function(e,t,n){var r=n(111),i=n(3157),o=n(5112)("species");e.exports=function(e,t){var n;return i(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!i(n.prototype)?r(n)&&null===(n=n[o])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)}},3411:function(e,t,n){var r=n(9670),i=n(9212);e.exports=function(e,t,n,o){try{return o?t(r(n)[0],n[1]):t(n)}catch(t){throw i(e),t}}},7072:function(e,t,n){var r=n(5112)("iterator"),i=!1;try{var o=0,a={next:function(){return{done:!!o++}},return:function(){i=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o={};o[r]=function(){return{next:function(){return{done:n=!0}}}},e(o)}catch(e){}return n}},4326:function(e){var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},648:function(e,t,n){var r=n(1694),i=n(4326),o=n(5112)("toStringTag"),a="Arguments"==i(function(){return arguments}());e.exports=r?i:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?n:a?i(t):"Object"==(r=i(t))&&"function"==typeof t.callee?"Arguments":r}},9920:function(e,t,n){var r=n(6656),i=n(3887),o=n(1236),a=n(3070);e.exports=function(e,t){for(var n=i(t),u=a.f,s=o.f,l=0;l=74)&&(r=a.match(/Chrome\/(\d+)/))&&(i=r[1]),e.exports=i&&+i},748:function(e){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:function(e,t,n){var r=n(7854),i=n(1236).f,o=n(8880),a=n(1320),u=n(3505),s=n(9920),l=n(4705);e.exports=function(e,t){var n,c,f,p,h,d=e.target,v=e.global,y=e.stat;if(n=v?r:y?r[d]||u(d,{}):(r[d]||{}).prototype)for(c in t){if(p=t[c],f=e.noTargetGet?(h=i(n,c))&&h.value:n[c],!l(v?c:d+(y?".":"#")+c,e.forced)&&void 0!==f){if(typeof p==typeof f)continue;s(p,f)}(e.sham||f&&f.sham)&&o(p,"sham",!0),a(n,c,p,e)}}},7293:function(e){e.exports=function(e){try{return!!e()}catch(e){return!0}}},7007:function(e,t,n){"use strict";n(4916);var r=n(1320),i=n(7293),o=n(5112),a=n(2261),u=n(8880),s=o("species"),l=!i((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$")})),c="$0"==="a".replace(/./,"$0"),f=o("replace"),p=!!/./[f]&&""===/./[f]("a","$0"),h=!i((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));e.exports=function(e,t,n,f){var d=o(e),v=!i((function(){var t={};return t[d]=function(){return 7},7!=""[e](t)})),y=v&&!i((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[s]=function(){return n},n.flags="",n[d]=/./[d]),n.exec=function(){return t=!0,null},n[d](""),!t}));if(!v||!y||"replace"===e&&(!l||!c||p)||"split"===e&&!h){var g=/./[d],m=n(d,""[e],(function(e,t,n,r,i){return t.exec===a?v&&!i?{done:!0,value:g.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),{REPLACE_KEEPS_$0:c,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:p}),b=m[0],x=m[1];r(String.prototype,e,b),r(RegExp.prototype,d,2==t?function(e,t){return x.call(e,this,t)}:function(e){return x.call(e,this)})}f&&u(RegExp.prototype[d],"sham",!0)}},9974:function(e,t,n){var r=n(3099);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},5005:function(e,t,n){var r=n(857),i=n(7854),o=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?o(r[e])||o(i[e]):r[e]&&r[e][t]||i[e]&&i[e][t]}},1246:function(e,t,n){var r=n(648),i=n(7497),o=n(5112)("iterator");e.exports=function(e){if(null!=e)return e[o]||e["@@iterator"]||i[r(e)]}},8554:function(e,t,n){var r=n(9670),i=n(1246);e.exports=function(e){var t=i(e);if("function"!=typeof t)throw TypeError(String(e)+" is not iterable");return r(t.call(e))}},647:function(e,t,n){var r=n(7908),i=Math.floor,o="".replace,a=/\$([$&'`]|\d\d?|<[^>]*>)/g,u=/\$([$&'`]|\d\d?)/g;e.exports=function(e,t,n,s,l,c){var f=n+e.length,p=s.length,h=u;return void 0!==l&&(l=r(l),h=a),o.call(c,h,(function(r,o){var a;switch(o.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(f);case"<":a=l[o.slice(1,-1)];break;default:var u=+o;if(0===u)return r;if(u>p){var c=i(u/10);return 0===c?r:c<=p?void 0===s[c-1]?o.charAt(1):s[c-1]+o.charAt(1):r}a=s[u-1]}return void 0===a?"":a}))}},7854:function(e,t,n){var r=function(e){return e&&e.Math==Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},6656:function(e){var t={}.hasOwnProperty;e.exports=function(e,n){return t.call(e,n)}},3501:function(e){e.exports={}},490:function(e,t,n){var r=n(5005);e.exports=r("document","documentElement")},4664:function(e,t,n){var r=n(9781),i=n(7293),o=n(317);e.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},1179:function(e){var t=Math.abs,n=Math.pow,r=Math.floor,i=Math.log,o=Math.LN2;e.exports={pack:function(e,a,u){var s,l,c,f=new Array(u),p=8*u-a-1,h=(1<>1,v=23===a?n(2,-24)-n(2,-77):0,y=e<0||0===e&&1/e<0?1:0,g=0;for((e=t(e))!=e||e===1/0?(l=e!=e?1:0,s=h):(s=r(i(e)/o),e*(c=n(2,-s))<1&&(s--,c*=2),(e+=s+d>=1?v/c:v*n(2,1-d))*c>=2&&(s++,c/=2),s+d>=h?(l=0,s=h):s+d>=1?(l=(e*c-1)*n(2,a),s+=d):(l=e*n(2,d-1)*n(2,a),s=0));a>=8;f[g++]=255&l,l/=256,a-=8);for(s=s<0;f[g++]=255&s,s/=256,p-=8);return f[--g]|=128*y,f},unpack:function(e,t){var r,i=e.length,o=8*i-t-1,a=(1<>1,s=o-7,l=i-1,c=e[l--],f=127&c;for(c>>=7;s>0;f=256*f+e[l],l--,s-=8);for(r=f&(1<<-s)-1,f>>=-s,s+=t;s>0;r=256*r+e[l],l--,s-=8);if(0===f)f=1-u;else{if(f===a)return r?NaN:c?-1/0:1/0;r+=n(2,t),f-=u}return(c?-1:1)*r*n(2,f-t)}}},8361:function(e,t,n){var r=n(7293),i=n(4326),o="".split;e.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?o.call(e,""):Object(e)}:Object},9587:function(e,t,n){var r=n(111),i=n(7674);e.exports=function(e,t,n){var o,a;return i&&"function"==typeof(o=t.constructor)&&o!==n&&r(a=o.prototype)&&a!==n.prototype&&i(e,a),e}},2788:function(e,t,n){var r=n(5465),i=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(e){return i.call(e)}),e.exports=r.inspectSource},9909:function(e,t,n){var r,i,o,a=n(8536),u=n(7854),s=n(111),l=n(8880),c=n(6656),f=n(5465),p=n(6200),h=n(3501),d=u.WeakMap;if(a){var v=f.state||(f.state=new d),y=v.get,g=v.has,m=v.set;r=function(e,t){return t.facade=e,m.call(v,e,t),t},i=function(e){return y.call(v,e)||{}},o=function(e){return g.call(v,e)}}else{var b=p("state");h[b]=!0,r=function(e,t){return t.facade=e,l(e,b,t),t},i=function(e){return c(e,b)?e[b]:{}},o=function(e){return c(e,b)}}e.exports={set:r,get:i,has:o,enforce:function(e){return o(e)?i(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!s(t)||(n=i(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},7659:function(e,t,n){var r=n(5112),i=n(7497),o=r("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||a[o]===e)}},3157:function(e,t,n){var r=n(4326);e.exports=Array.isArray||function(e){return"Array"==r(e)}},4705:function(e,t,n){var r=n(7293),i=/#|\.prototype\./,o=function(e,t){var n=u[a(e)];return n==l||n!=s&&("function"==typeof t?r(t):!!t)},a=o.normalize=function(e){return String(e).replace(i,".").toLowerCase()},u=o.data={},s=o.NATIVE="N",l=o.POLYFILL="P";e.exports=o},111:function(e){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},1913:function(e){e.exports=!1},7850:function(e,t,n){var r=n(111),i=n(4326),o=n(5112)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==i(e))}},9212:function(e,t,n){var r=n(9670);e.exports=function(e){var t=e.return;if(void 0!==t)return r(t.call(e)).value}},3383:function(e,t,n){"use strict";var r,i,o,a=n(7293),u=n(9518),s=n(8880),l=n(6656),c=n(5112),f=n(1913),p=c("iterator"),h=!1;[].keys&&("next"in(o=[].keys())?(i=u(u(o)))!==Object.prototype&&(r=i):h=!0);var d=null==r||a((function(){var e={};return r[p].call(e)!==e}));d&&(r={}),f&&!d||l(r,p)||s(r,p,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:h}},7497:function(e){e.exports={}},133:function(e,t,n){var r=n(7293);e.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},590:function(e,t,n){var r=n(7293),i=n(5112),o=n(1913),a=i("iterator");e.exports=!r((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),o&&!e.toJSON||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[a]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host}))},8536:function(e,t,n){var r=n(7854),i=n(2788),o=r.WeakMap;e.exports="function"==typeof o&&/native code/.test(i(o))},1574:function(e,t,n){"use strict";var r=n(9781),i=n(7293),o=n(1956),a=n(5181),u=n(5296),s=n(7908),l=n(8361),c=Object.assign,f=Object.defineProperty;e.exports=!c||i((function(){if(r&&1!==c({b:1},c(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),i="abcdefghijklmnopqrst";return e[n]=7,i.split("").forEach((function(e){t[e]=e})),7!=c({},e)[n]||o(c({},t)).join("")!=i}))?function(e,t){for(var n=s(e),i=arguments.length,c=1,f=a.f,p=u.f;i>c;)for(var h,d=l(arguments[c++]),v=f?o(d).concat(f(d)):o(d),y=v.length,g=0;y>g;)h=v[g++],r&&!p.call(d,h)||(n[h]=d[h]);return n}:c},30:function(e,t,n){var r,i=n(9670),o=n(6048),a=n(748),u=n(3501),s=n(490),l=n(317),c=n(6200)("IE_PROTO"),f=function(){},p=function(e){return""; + $(htmlScript).appendTo('head'); + console.log('****loadAPIGooglePro'); + } + */ +} +function setCaretPosition(elem, caretPos) { + if (elem != null) { + if (elem.createTextRange) { + var range = elem.createTextRange(); + range.move('character', caretPos); + range.select(); + } else { + if(elem.selectionStart) { + elem.focus(); + elem.setSelectionRange(caretPos, caretPos); + } else { + elem.focus(); + } + } + } +} +function getIsProcUrgente() { + isProcUrgente = typeof dadosProcessoPro !== 'undefined' && typeof dadosProcessoPro.propProcesso !== 'undefined' && typeof dadosProcessoPro.propProcesso.txtDescricao !== 'undefined' ? dadosProcessoPro.propProcesso.txtDescricao : false; + isProcUrgente = typeof isProcUrgente !== 'undefined' && isProcUrgente && isProcUrgente.toLowerCase().indexOf('(urgente)') !== -1 ? true : false; + return isProcUrgente; +} +function dropzoneCancelInfo(e) { + if (typeof e !== 'undefined'){ + e.stopImmediatePropagation(); + } + $(containerUpload).removeClass('dz-drag-hover'); + return false; +} +function encodeUrlUploadArvore(response, params) { + var id = response[0]; + var nome = response[1]; + var dthora = response[4]; + var tamanho = response[3]; + var tamanho_formatado = infraFormatarTamanhoBytes(parseInt(tamanho)); + var plus = '\u00B1'; + var hdnAnexos = id+plus+nome+plus+dthora+plus+tamanho+plus+tamanho_formatado+plus+params.userUnidade.user+plus+params.userUnidade.unidade; + hdnAnexos = (hdnAnexos.indexOf(' ') !== -1) ? hdnAnexos.replace(/ /g,'+') : hdnAnexos; + hdnAnexos = encodeURIComponent(hdnAnexos); + hdnAnexos = (hdnAnexos.indexOf('%C2') !== -1) ? hdnAnexos.replace(/%C2/g,'') : hdnAnexos; + hdnAnexos = (hdnAnexos.indexOf('%2B') !== -1) ? hdnAnexos.replace(/%2B/g,'+') : hdnAnexos; + + console.log(hdnAnexos); + + return hdnAnexos; +} function getConfigHost(callback = false, callback_else = false) { var hosts = URL_SPRO+"config_hosts.json"; fetch(hosts) @@ -167,10 +265,13 @@ function calcFilterResume(table) { $(this).html(result); }) } -function checkProcessoSigiloso() { - var check = $('script').map(function(v){ if(typeof $(this).attr('src') == 'undefined' && $(this).html().indexOf('usuario_validar_acesso') !== -1) { return true; } }).get(); +function checkProcessoSigiloso(content = $('html')) { + var id_protocolo = getParamsUrlPro(window.location.href).id_procedimento; + var check = content.find('script').map(function(v){ if(typeof $(this).attr('src') == 'undefined' && $(this).html().indexOf('usuario_validar_acesso') !== -1) { return true; } }).get(); check = check.length ? check[0] : false; - return check; + var checkSession = (typeof id_protocolo !== 'undefined' && sessionStorageRestorePro('processo_sigiloso_'+id_protocolo) !== null) ? true : false; + var _return = (checkSession || check) ? true : false; + return _return; } function getStylesOnEditor() { var styles = false; @@ -336,6 +437,9 @@ function extractCPFs(text) { function extractHexColor(text) { return text.match(/#[0-9a-f]{6}|#[0-9a-f]{3}/gi); } +function arrayMax(arr) { + return arr.reduce(function (p, v) { return ( p > v ? p : v ) }); +} function getChartLabelItemStore(idElem, chartObj){ if (getOptionsPro(idElem+'_canvas')){ var arrayLabels = getOptionsPro(idElem+'_canvas'); @@ -355,6 +459,25 @@ function getChartLabelItemStore(idElem, chartObj){ chartObj.update(); } } +function replaceTextToProcessoSEI(text) { + var Rexp = /(\d{5}\.?\d{6}\/?\d{4}\-?\d{2})/igm; + var urlSEI = url_host.replace('controlador.php',''); + return text.replace(Rexp, "$1"); +} +function replaceTextToUrl(text) { + // Put the URL to variable $1 and Domain name + // to $3 after visiting the URL + var Rexp = /(\b(https?|ftp|file):\/\/([-A-Z0-9+&@#%?=~_|!:,.;]*)([-A-Z0-9+&@#%?\/=~_|!:,.;]*)[-A-Z0-9+&@#\/%=~_|])/ig; + + // Replacing the RegExp content by HTML element + return text.replace(Rexp, "$3"); +} +function maskCNPJ(text) { + return text.replace(/^(\d{2})(\d{3})(\d{3})(\d{4})(\d{2})/, "$1.$2.$3/$4-$5"); +} +function maskPEN(text) { + return text.replace(/^(\d{5})(\d{6})(\d{4})(\d{2})/, "$1.$2/$3-$4"); +} function setChartLabelItemStore(e, legendItem){ var ci = this.chart; var is_line = (typeof legendItem.datasetIndex !== 'undefined') ? true : false; @@ -852,6 +975,17 @@ function addAlpha(color, opacity) { var _opacity = Math.round(Math.min(Math.max(opacity || 1, 0), 1) * 255); return color + _opacity.toString(16).toUpperCase(); } +function arrayMin(arr) { + return arr.reduce(function (p, v) { + return ( p < v ? p : v ); + }); +} + +function arrayMax(arr) { + return arr.reduce(function (p, v) { + return ( p > v ? p : v ); + }); +} function getHashTagsPro(inputText) { var regex = /(?:^|\s)(?:#)([a-zA-Z+-§\d]+)/gm; var matches = []; @@ -874,6 +1008,13 @@ function getBrightnessColor(value) { var rgb = hexToRgb(value); return Math.round(((parseInt(rgb.r) * 299) + (parseInt(rgb.g) * 587) + (parseInt(rgb.b) * 114)) / 1000); } +function setIconLoadinBtnSEI(elem, display = true) { + if (display) { + elem.find('img').css('opacity','0').end().append(''); + } else { + elem.find('img').css('opacity','1').end().find('.botaoSEI_loading').remove(); + } +} function removeDuplicatesArray(list, ref) { var result = []; $.each(list, function (i, e) { @@ -1057,6 +1198,15 @@ function initChosenReplace(mode, this_ = false, force = false, TimeOut = 9000) { placeholder_text_single: ' ', no_results_text: 'Nenhum resultado encontrado' }); + } else if (mode == 'box_multiple') { + _parent.find('select') + .filter(function() { + return !($(this).css('visibility') == 'hidden' || $(this).css('display') == 'none') || force + }) + .chosen({ + placeholder_text_single: ' ', + no_results_text: 'Nenhum resultado encontrado' + }); } else if (mode == 'box_refresh') { _parent.find('select') .not('[multiple]') @@ -1080,7 +1230,6 @@ function initChosenReplace(mode, this_ = false, force = false, TimeOut = 9000) { } else { if (typeof $().chosen === 'undefined' && typeof URL_SPRO !== 'undefined') { $.getScript(URL_SPRO+"js/lib/chosen.jquery.min.js"); - console.log('@load chosen'); } setTimeout(function(){ initChosenReplace(mode, this_, force, TimeOut - 100); @@ -1205,10 +1354,11 @@ function scrollToElement(container, scrollToElem, stick = 0) { } function scrollToElementArvore(id_documento) { var ifrArvore = $('#ifrArvore').contents(); + if (ifrArvore.length) { ifrArvore.find('html').animate({ scrollTop: ifrArvore.find('#anchor'+id_documento).offset().top }); - + } } function resetDialogBoxPro(elementBox) { if (elementBox == 'alertBoxPro' && alertBoxPro) { @@ -1233,6 +1383,14 @@ function resetDialogBoxPro(elementBox) { $('.editorBoxProDiv').remove(); } infraTooltipOcultar(); + dialogIsDraggable = false; +} +function isDialogDraggable() { + $('.ui-dialog:visible').draggable({ + stop: function() { + dialogIsDraggable = true; + } + }); } function updateDadosProcesso(idElement, value, callback = false) { if ( $('#frmCheckerProcessoPro').length == 0 ) { getCheckerProcessoPro(); } @@ -1344,21 +1502,24 @@ function openCamposDinamicosForm() { }); } -function editDadosArvorePro(this_, TimeOut = 9000) { +function editDadosArvorePro(this_, parse = false, TimeOut = 9000) { if (TimeOut <= 0) { return; } if (typeof $().chosen !== 'undefined' && typeof URL_SPRO !== 'undefined') { - editDadosArvorePro_(this_); + editDadosArvorePro_(this_, parse); } else { if (TimeOut == 9000) $.getScript(URL_SPRO+"js/lib/chosen.jquery.min.js"); setTimeout(function(){ - editDadosArvorePro(this_, TimeOut - 100); + editDadosArvorePro(this_, parse, TimeOut - 100); console.log('Reload editDadosArvorePro'); }, 500); } } -function editDadosArvorePro_(this_) { - var _this = $(this_); - var data = _this.data(); +function editDadosArvorePro_AcompEsp() { + editDadosArvorePro(false, {mode: 'acompanhamento_especial', force: true}); +} +function editDadosArvorePro_(this_ = false, parse = false) { + var _this = this_ ? $(this_) : false; + var data = _this ? _this.data() : parse; var prop = dadosProcessoPro.propProcesso; var id_procedimento = getParamsUrlPro(window.location.href).id_procedimento; id_procedimento = (typeof id_procedimento === 'undefined') ? getParamsUrlPro(window.location.href).id_protocolo : id_procedimento; @@ -1400,6 +1561,62 @@ function editDadosArvorePro_(this_) { ' '+ ' '+ ''; + } else if (data.mode == 'acompanhamento_especial') { + var textTitle = 'Editar acompanhamento especial'; + var storeAcompEsp = localStorageRestorePro('dadosAcompanhamentoEspProcessoPro'); + var dataAcompEsp = (storeAcompEsp !== null) ? jmespath.search(storeAcompEsp, "[?id_protocolo=='"+id_procedimento+"'] | [0]") : null; + dataAcompEsp = dataAcompEsp ? dataAcompEsp : false; + var force = (typeof data.force !== 'undefined' && data.force) ? true : false; + + var configAcomp = (dataAcompEsp && dataAcompEsp.config) ? dataAcompEsp.config : false; + var dataReabertura = (configAcomp && configAcomp.hasOwnProperty('Reabertura')) ? moment(configAcomp.Reabertura, 'DD/MM/YYYY HH:mm').format('YYYY-MM-DD HH:mm:ss') : false; + var txtAcompEsp = (dataAcompEsp) ? dataAcompEsp.observacoes : prop.txtDescricao; + var txtGroup = (dataAcompEsp) ? dataAcompEsp.grupo : false; + + var textBox = '
'+ + ' '+ + (verifyConfigValue('reaberturaprogramada') ? + ' '+ + ' '+ + ' '+ + ' '+ + ' '+ + ' '+ + ' '+ + ' '+ + '': '')+ + ' '+ + ' '+ + ' '+ + ' '+ + ' '+ + ' '+ + ' '+ + ' '+ + '
'+ + ' '+ + ' Reabertura programada?'+ + ' '+ + '
'+ + ' '+ + ' '+ + '
'+ + '
'+ + ' Data de Reabertura'+ + ' '+ + ' '+ + '
'+ + ' Grupo'+ + ' '+ + ' '+ + '
'+ + ' Texto'+ + ' '+ + ' '+ + '
'+ + '
'; + } else if (data.mode == 'marcador') { var textTitle = 'Editar marcador'; var listMarcadores = sessionStorageRestorePro('dadosMarcadoresProcessoPro'); @@ -1494,11 +1711,162 @@ function editDadosArvorePro_(this_) { ''; } + var btnDialogBoxPro = [{ + text: "Editar", + class: 'confirm ui-state-active', + click: function() { + loadingButtonConfirm(true); + var dadosProcessoPro = pullDadosProcessoSession(); + var id_procedimento = getParamsUrlPro(window.location.href).id_procedimento; + id_procedimento = (typeof id_procedimento === 'undefined') ? getParamsUrlPro(window.location.href).id_protocolo : id_procedimento; + id_procedimento = (typeof id_procedimento === 'undefined') ? getParamsUrlPro($('#ifrArvore').attr('src')).id_procedimento : id_procedimento; + + if (data.mode == 'descricao') { + var new_text = $('#dialogBoxProcesso').val().trim(); + updateDadosArvore('Consultar/Alterar Processo', 'txtDescricao', new_text, id_procedimento, function(){ + dadosProcessoPro.propProcesso.txtDescricao = new_text; + // console.log('->seetSessionProcessosPro', dadosProcessoPro.listAndamento); + setSessionProcessosPro(dadosProcessoPro); + resetDialogBoxPro('dialogBoxPro'); + alertaBoxPro('Sucess', 'check-circle', 'Especifica\u00E7\u00E3o do processo alterada com sucesso!'); + }); + } else if (data.mode == 'tipo_procedimento') { + var new_id = $('#dialogBoxProcesso').val().trim(); + var new_text = $('#dialogBoxProcesso').find('option:selected').text().trim(); + updateDadosArvore('Consultar/Alterar Processo', 'selTipoProcedimento', new_id, id_procedimento, function(){ + dadosProcessoPro.propProcesso.selTipoProcedimento = new_id; + dadosProcessoPro.propProcesso.hdnIdTipoProcedimento = new_id; + dadosProcessoPro.propProcesso.hdnNomeTipoProcedimento = new_text; + // console.log('->seetSessionProcessosPro', dadosProcessoPro.listAndamento); + setSessionProcessosPro(dadosProcessoPro); + resetDialogBoxPro('dialogBoxPro'); + alertaBoxPro('Sucess', 'check-circle', 'Tipo de procedimento alterado com sucesso!'); + }); + } else if (data.mode == 'nivel_acesso') { + var new_id = $('#dialogBoxProcesso').val().trim(); + var new_id_hipoteses = $('#dialogBoxProcesso_hipoteses').val() !== null ? $('#dialogBoxProcesso_hipoteses').val().trim() : false; + var elementOption = (new_id == '0') ? 'optPublico' : false; + elementOption = (new_id == '2') ? 'optSigiloso' : elementOption; + elementOption = (new_id == '1') ? 'optRestrito' : elementOption; + updateDadosArvore('Consultar/Alterar Processo', elementOption, new_id_hipoteses, id_procedimento, function(){ + dadosProcessoPro.propProcesso.rdoNivelAcesso = new_id; + dadosProcessoPro.propProcesso.selHipoteseLegal = new_id_hipoteses; + // console.log('->seetSessionProcessosPro', dadosProcessoPro.listAndamento); + setSessionProcessosPro(dadosProcessoPro); + resetDialogBoxPro('dialogBoxPro'); + alertaBoxPro('Sucess', 'check-circle', 'N\u00EDvel de sigilo alterado com sucesso!'); + }); + } else if (data.mode == 'responsaveis') { + var new_id = $('#dialogBoxProcesso').val().trim(); + new_id = (new_id == '') ? 'null' : new_id; + console.log('Atribuir Processo', 'selAtribuicao', new_id, id_procedimento); + updateDadosArvore('Atribuir Processo', 'selAtribuicao', new_id, id_procedimento, function(){ + resetDialogBoxPro('dialogBoxPro'); + alertaBoxPro('Sucess', 'check-circle', 'Atribui\u00E7\u00E3o de processo alterada com sucesso!'); + }); + } else if (data.mode == 'acompanhamento_especial') { + var dataReabertura = ($('#configDatesBox_setreopen').is(':checked')) ? moment($('#configDatesBox_date').val(), 'YYYY-MM-DD HH:mm').format('DD/MM/YYYY HH:mm') : false; + var groupAcompEsp = $('#configDatesBox_acompesp').val(); + var textObservacao = $('#configDatesBox_text').val(); + var observacao = textObservacao+(dataReabertura ? ' ["Reabertura": "'+dataReabertura+'"]' : ''); + var configAcomp = (dataReabertura) ? {"Reabertura": dataReabertura} : false; + + var valuesIframe = [ + {element: 'selGrupoAcompanhamento', value: groupAcompEsp}, + {element: 'txaObservacao', value: observacao} + ]; + + updateDadosArvoreMult('Acompanhamento Especial', valuesIframe, id_procedimento, function(){ + var listAcompEsp = localStorageRestorePro('dadosAcompanhamentoEspProcessoPro'); + var objIndexDoc = (!listAcompEsp) ? -1 : listAcompEsp.findIndex((obj => obj.id_protocolo == String(id_procedimento))); + if (objIndexDoc !== -1) { + listAcompEsp[objIndexDoc]['grupo'] = $('#configDatesBox_acompesp').find('option:selected').text(); + listAcompEsp[objIndexDoc]['observacoes'] = textObservacao; + listAcompEsp[objIndexDoc]['config'] = configAcomp; + localStorageStorePro('dadosAcompanhamentoEspProcessoPro',listAcompEsp); + } + console.log(listAcompEsp, objIndexDoc, String(id_procedimento)); + resetDialogBoxPro('dialogBoxPro'); + alertaBoxPro('Sucess', 'check-circle', 'Acompanhamento especial alterado com sucesso!'); + }); + } else if (data.mode == 'marcador') { + var _dateRef = $('#configDatesBox_date').val(); + var _timeRef = $('#configDatesBox_time').val(); + var _tagSelected = $('#configDatesBox_tag').val(); + var _textTag = $('#configDatesBox_text').val(); + _textTag = (_textTag != '') ? '\n'+_textTag : ''; + _dateRef = _dateRef+' '+(_timeRef != '' ? _timeRef : '23:59'); + var _dateTo = ($('#configDatesBox_duesetdate').is(':checked')) ? _dateRef : false; + var dateSubmit = (_dateTo) ? 'Ate '+moment(_dateTo, 'YYYY-MM-DD HH:mm').format('DD/MM/YYYY HH:mm') : moment(_dateRef, 'YYYY-MM-DD HH:mm').format('DD/MM/YYYY HH:mm'); + dateSubmit = ($('#configDatesBox_setdate').is(':checked')) ? dateSubmit+_textTag : _textTag; + if (_dateRef == '') { + alertaBoxPro('Error', 'exclamation-triangle', 'Selecione uma data!'); + } else { + var valuesIframe = [ + {element: 'txaTexto', value: dateSubmit}, + {element: 'hdnIdMarcador', value: _tagSelected} + ]; + updateDadosArvoreMult('Gerenciar Marcador', valuesIframe, id_procedimento, function(){ + var listMarcadores = sessionStorageRestorePro('dadosMarcadoresProcessoPro'); + var objIndexDoc = (!listMarcadores) ? -1 : listMarcadores.findIndex((obj => obj.id_procedimento == String(id_procedimento))); + if (objIndexDoc !== -1) { + listMarcadores[objIndexDoc] = { + id_procedimento: listMarcadores[objIndexDoc].id_procedimento, + icon: $('#configDatesBox_tag').find('option:selected').data('img-src'), + tag: $('#configDatesBox_tag').find('option:selected').text(), + name: dateSubmit + } + sessionStorageStorePro('dadosMarcadoresProcessoPro',listMarcadores); + } + // console.log(listMarcadores[objIndexDoc]); + resetDialogBoxPro('dialogBoxPro'); + alertaBoxPro('Sucess', 'check-circle', 'Marcador alterado com sucesso!'); + }); + } + } + } + }]; + + if (data.mode == 'marcador') { + btnDialogBoxPro.unshift({ + text: 'Remover Marcador', + icon: 'ui-icon-closethick', + click: function(event) { + loadingButtonConfirm(true); + var id_procedimento = getParamsUrlPro(window.location.href).id_procedimento; + id_procedimento = (typeof id_procedimento === 'undefined') ? getParamsUrlPro(window.location.href).id_protocolo : id_procedimento; + id_procedimento = (typeof id_procedimento === 'undefined') ? getParamsUrlPro($('#ifrArvore').attr('src')).id_procedimento : id_procedimento; + var valuesIframe = [ + {element: 'txaTexto', value: ''}, + {element: 'hdnIdMarcador', value: ''} + ]; + updateDadosArvoreMult('Gerenciar Marcador', valuesIframe, id_procedimento, function(){ + var listMarcadores = sessionStorageRestorePro('dadosMarcadoresProcessoPro'); + var objIndexDoc = (!listMarcadores) ? -1 : listMarcadores.findIndex((obj => obj.id_procedimento == String(id_procedimento))); + if (objIndexDoc !== -1) { + listMarcadores.splice(objIndexDoc,1); + sessionStorageStorePro('dadosMarcadoresProcessoPro',listMarcadores); + resetDialogBoxPro('dialogBoxPro'); + alertaBoxPro('Sucess', 'check-circle', 'Marcador removido com sucesso!'); + } + }); + } + }); + } else if (data.mode == 'descricao') { + btnDialogBoxPro.unshift({ + text: (getIsProcUrgente() ? 'Remover' : 'Adicionar')+' Urg\u00EAncia', + icon: 'ui-icon-notice', + click: function(event) { + addUrgenteProcessoPro(); + } + }); + } + resetDialogBoxPro('dialogBoxPro'); dialogBoxPro = $('#dialogBoxPro') .html('
'+textBox+'') .dialog({ - width: (data.mode == 'marcador' ? 570 : 450), + width: (data.mode == 'marcador' || data.mode == 'acompanhamento_especial' ? 570 : 450), title: textTitle, open: function(){ if ($('#dialogBoxProcesso').is('select') && typeof $().chosen !== 'undefined') { @@ -1526,6 +1894,40 @@ function editDadosArvorePro_(this_) { no_results_text: 'Nenhum resultado encontrado' }).trigger('chosen:updated'); }); + } else if (data.mode == 'acompanhamento_especial') { + var listaGruposAcompEsp = getOptionsPro('listaGruposAcompEsp'); + var listaGruposAcompEsp_unidade = getOptionsPro('listaGruposAcompEsp_unidade'); + if (listaGruposAcompEsp && listaGruposAcompEsp_unidade == $('#selInfraUnidades').val()) { + var htmlOptions = $.map(listaGruposAcompEsp, function(v){ + var selected = (txtGroup && txtGroup == v.name) ? 'selected' : ''; + return ''; + }).join(''); + $('#configDatesBox_acompesp').html(''+htmlOptions).chosen('destroy').chosen({ + placeholder_text_single: ' ', + no_results_text: 'Nenhum resultado encontrado' + }).trigger('chosen:updated'); + } else { + var ifrArvore = $('#ifrArvore'); + var arrayLinksArvore = ifrArvore[0].contentWindow.arrayLinksArvore; + arrayLinksArvore = (typeof arrayLinksArvore === 'undefined') ? parent.linksArvore : arrayLinksArvore; + var href = jmespath.search(arrayLinksArvore, "[?name=='Acompanhamento Especial'].url"); + if (href !== null) { + $.ajax({ + url: href + }).done(function (html) { + var $html = $(html); + listaGruposAcompEsp = getListaGruposAcompEsp($html).array; + var htmlOptions = $.map(listaGruposAcompEsp, function(v){ + var selected = (tagName && tagName == v.name) ? 'selected' : ''; + return ''; + }).join(''); + $('#configDatesBox_acompesp').html(''+htmlOptions).chosen('destroy').chosen({ + placeholder_text_single: ' ', + no_results_text: 'Nenhum resultado encontrado' + }).trigger('chosen:updated'); + }); + } + } } else if (data.mode == 'marcador') { var listaMarcadores = getOptionsPro('listaMarcadores'); var listaMarcadores_unidade = getOptionsPro('listaMarcadores_unidade'); @@ -1556,95 +1958,82 @@ function editDadosArvorePro_(this_) { } } }, - buttons: [{ - text: "Editar", - class: 'confirm ui-state-active', - click: function() { - loadingButtonConfirm(true); - var id_procedimento = getParamsUrlPro(window.location.href).id_procedimento; - id_procedimento = (typeof id_procedimento === 'undefined') ? getParamsUrlPro(window.location.href).id_protocolo : id_procedimento; - id_procedimento = (typeof id_procedimento === 'undefined') ? getParamsUrlPro($('#ifrArvore').attr('src')).id_procedimento : id_procedimento; - - if (data.mode == 'descricao') { - var new_text = $('#dialogBoxProcesso').val().trim(); - updateDadosArvore('Consultar/Alterar Processo', 'txtDescricao', new_text, id_procedimento, function(){ - dadosProcessoPro.propProcesso.txtDescricao = new_text; - setSessionProcessosPro(dadosProcessoPro); - resetDialogBoxPro('dialogBoxPro'); - alertaBoxPro('Sucess', 'check-circle', 'Especifica\u00E7\u00E3o do processo alterada com sucesso!'); - }); - } else if (data.mode == 'tipo_procedimento') { - var new_id = $('#dialogBoxProcesso').val().trim(); - var new_text = $('#dialogBoxProcesso').find('option:selected').text().trim(); - updateDadosArvore('Consultar/Alterar Processo', 'selTipoProcedimento', new_id, id_procedimento, function(){ - dadosProcessoPro.propProcesso.selTipoProcedimento = new_id; - dadosProcessoPro.propProcesso.hdnIdTipoProcedimento = new_id; - dadosProcessoPro.propProcesso.hdnNomeTipoProcedimento = new_text; - setSessionProcessosPro(dadosProcessoPro); - resetDialogBoxPro('dialogBoxPro'); - alertaBoxPro('Sucess', 'check-circle', 'Tipo de procedimento alterado com sucesso!'); - }); - } else if (data.mode == 'nivel_acesso') { - var new_id = $('#dialogBoxProcesso').val().trim(); - var new_id_hipoteses = $('#dialogBoxProcesso_hipoteses').val() !== null ? $('#dialogBoxProcesso_hipoteses').val().trim() : false; - var elementOption = (new_id == '0') ? 'optPublico' : false; - elementOption = (new_id == '2') ? 'optSigiloso' : elementOption; - elementOption = (new_id == '1') ? 'optRestrito' : elementOption; - updateDadosArvore('Consultar/Alterar Processo', elementOption, new_id_hipoteses, id_procedimento, function(){ - dadosProcessoPro.propProcesso.rdoNivelAcesso = new_id; - dadosProcessoPro.propProcesso.selHipoteseLegal = new_id_hipoteses; - setSessionProcessosPro(dadosProcessoPro); - resetDialogBoxPro('dialogBoxPro'); - alertaBoxPro('Sucess', 'check-circle', 'N\u00EDvel de sigilo alterado com sucesso!'); - }); - } else if (data.mode == 'responsaveis') { - var new_id = $('#dialogBoxProcesso').val().trim(); - console.log('Atribuir Processo', 'selAtribuicao', new_id, id_procedimento); - updateDadosArvore('Atribuir Processo', 'selAtribuicao', new_id, id_procedimento, function(){ - resetDialogBoxPro('dialogBoxPro'); - alertaBoxPro('Sucess', 'check-circle', 'Atribui\u00E7\u00E3o de processo alterada com sucesso!'); - }); - } else if (data.mode == 'marcador') { - var _dateRef = $('#configDatesBox_date').val(); - var _timeRef = $('#configDatesBox_time').val(); - var _tagSelected = $('#configDatesBox_tag').val(); - var _textTag = $('#configDatesBox_text').val(); - _textTag = (_textTag != '') ? '\n'+_textTag : ''; - _dateRef = _dateRef+' '+(_timeRef != '' ? _timeRef : '23:59'); - var _dateTo = ($('#configDatesBox_duesetdate').is(':checked')) ? _dateRef : false; - var dateSubmit = (_dateTo) ? 'Ate '+moment(_dateTo, 'YYYY-MM-DD HH:mm').format('DD/MM/YYYY HH:mm') : moment(_dateRef, 'YYYY-MM-DD HH:mm').format('DD/MM/YYYY HH:mm'); - dateSubmit = ($('#configDatesBox_setdate').is(':checked')) ? dateSubmit+_textTag : _textTag; - if (_dateRef == '') { - alertaBoxPro('Error', 'exclamation-triangle', 'Selecione uma data!'); - } else { - var valuesIframe = [ - {element: 'txaTexto', value: dateSubmit}, - {element: 'hdnIdMarcador', value: _tagSelected} - ]; - updateDadosArvoreMult('Gerenciar Marcador', valuesIframe, id_procedimento, function(){ - var listMarcadores = sessionStorageRestorePro('dadosMarcadoresProcessoPro'); - var objIndexDoc = (!listMarcadores) ? -1 : listMarcadores.findIndex((obj => obj.id_procedimento == String(id_procedimento))); - if (objIndexDoc !== -1) { - listMarcadores[objIndexDoc] = { - id_procedimento: listMarcadores[objIndexDoc].id_procedimento, - icon: $('#configDatesBox_tag').find('option:selected').data('img-src'), - tag: $('#configDatesBox_tag').find('option:selected').text(), - name: dateSubmit - } - sessionStorageStorePro('dadosMarcadoresProcessoPro',listMarcadores); - } - // console.log(listMarcadores[objIndexDoc]); - resetDialogBoxPro('dialogBoxPro'); - alertaBoxPro('Sucess', 'check-circle', 'Marcador alterado com sucesso!'); - }); - } - } - } - }] + buttons: btnDialogBoxPro }); } -function getSelectAtribuicaoProcesso(callback = false) { - var ifrArvore = $('#ifrArvore'); +function getAjaxListaAtribuicao() { + if ( $('#frmCheckerProcessoPro').length == 0 ) { getCheckerProcessoPro(); } + var url = $('a.processoVisualizado[href*="acao=procedimento_trabalhar"]').eq(0).attr('href'); + if (!!url) { + $('#frmCheckerProcessoPro').attr('src', url).unbind().on('load', function(){ + var ifrArvore = $('#frmCheckerProcessoPro').contents().find('#ifrArvore'); + + getSelectAtribuicaoProcesso(false, ifrArvore); + }); + } +} +function getAjaxListaMarcador() { + var href = isNewSEI + ? $('#divComandos a[onclick*="andamento_marcador_cadastrar"]').attr('onclick') + : $('#divComandos a[onclick*="andamento_marcador_gerenciar"]').attr('onclick'); + href = (typeof href !== 'undefined') ? href.match(RegExp(/(?<=(["']))(?:(?=(\\?))\2.)*?(?=\1)/, 'g')) : false; + href = (href && href !== null && href.length > 0 && href[0] != '') ? href[0] : false; + if (href) { + var param = {}; + $('#frmProcedimentoControlar').find("input[type=hidden]").map(function () { + if ( $(this).attr('name') && $(this).attr('id').indexOf('hdn') !== -1) { + param[$(this).attr('name')] = $(this).val(); + } + }); + param.hdnRecebidosItensSelecionados = $('input[name*="chkRecebidosItem"]').eq(0).val(); + param[$('input[name*="chkRecebidosItem"]').eq(0).attr('name')] = $('input[name*="chkRecebidosItem"]').eq(0).val(); + $.ajax({ + method: 'POST', + data: param, + url: href + }).done(function (html) { + getListaMarcadores($(html)); + }); + } +} +function editFieldProc(this_) { + var _this = $(this_); + var _content_desc = _this.closest('.tagintable'); + var _info = _content_desc.find('span.info'); + var data = _content_desc.data(); + var value = _info.text(); + + if (_info.is("[contentEditable='true']")) { + _content_desc.removeClass('info_noclick'); + _content_desc.find('.content_btnsave').toggleClass('newLink_active newLink_confirm').find('i').toggleClass('fa-thumbs-up fa-edit'); + _info.prop('contenteditable',false).unbind(); + if (data.old != value) { + var id_protocolo = _this.closest('tr').attr('id'); + id_protocolo = (typeof id_protocolo !== 'undefined') ? parseInt(id_protocolo.replace('P','')) : false; + if (id_protocolo) { + _info.after(''); + updateDadosArvore('Consultar/Alterar Processo', 'txtDescricao', value, id_protocolo, function(){ + _content_desc.find('.sucessEdit').remove(); + _info.after(''); + setTimeout(function(){ _content_desc.find('.sucessEdit').remove(); }, 2000); + + }); + } + } + } else { + _content_desc.addClass('info_noclick').data('old', value); + _info.prop('contenteditable',true).focus().on('keypress',function(e) { + if(e.which == 13) { + _content_desc.find('.content_btnsave').trigger('click'); + _info.text(_info.text()); + } + }); + _content_desc.find('.content_btnsave').toggleClass('newLink_active newLink_confirm').find('i').toggleClass('fa-thumbs-up fa-edit'); + } + +} +function getSelectAtribuicaoProcesso(callback = false, iframe = false) { + var ifrArvore = iframe ? iframe : $('#ifrArvore'); var arrayLinksArvore = ifrArvore[0].contentWindow.arrayLinksArvore; arrayLinksArvore = (typeof arrayLinksArvore === 'undefined') ? parent.linksArvore : arrayLinksArvore; var href = jmespath.search(arrayLinksArvore, "[?name=='Atribuir Processo'].url"); @@ -1652,12 +2041,28 @@ function getSelectAtribuicaoProcesso(callback = false) { $.ajax({ url: href }).done(function (html) { var $html = $(html); var selectAtribuicao = $html.find('#selAtribuicao option').map(function(){ if($(this).text().trim() != '') { return {name: $(this).text().trim(), value: $(this).val()} } }).get(); + setOptionsPro('arrayListUsersSEI',selectAtribuicao); if (selectAtribuicao.length && typeof callback === 'function') { callback(selectAtribuicao); } }); } } +function getListaAtribuicaoProcesso(iframe, mode) { + if (mode == 'processo' || mode == 'editor') { + getSelectAtribuicaoProcesso(function(html_result){ + var select_result = $.map(html_result, function(v, i){ + var username = (v.name.indexOf('-') !== -1) ? v.name.split('-')[0].trim() : false; + var name = (v.name.indexOf('-') !== -1) ? v.name.split('-')[1].trim() : false; + return {value: v.name, username: username, name: name}; + }); + var dadosProcessoPro = pullDadosProcessoSession(); + dadosProcessoPro.listAtribuicaoProcesso = select_result; + // console.log('->seetSessionProcessosPro', dadosProcessoPro.listAndamento); + setSessionProcessosPro(dadosProcessoPro); + }, iframe); + } +} function getLinhaNumerada() { var _ifrArvoreHtml = $('#ifrVisualizacao').contents().find('#ifrArvoreHtml'); if (_ifrArvoreHtml.length && verifyConfigValue('linhanumerada')) { @@ -1757,8 +2162,8 @@ function updateDadosArvore(nameLink, idElement, value, idProcedimento, callback } } function updateDadosArvoreIframe(nameLink, idElement, value, ifrArvore, callback) { - var arrayLinksArvore = ifrArvore[0].contentWindow.arrayLinksArvore; - arrayLinksArvore = (typeof arrayLinksArvore === 'undefined') ? parent.linksArvore : arrayLinksArvore; + var arrayLinksArvore = (typeof ifrArvore[0] !== 'undefined') ? ifrArvore[0].contentWindow.arrayLinksArvore : false; + arrayLinksArvore = (typeof arrayLinksArvore === 'undefined' || !arrayLinksArvore) ? parent.linksArvore : arrayLinksArvore; if ( $('#frmCheckerProcessoPro').length == 0 ) { getCheckerProcessoPro(); } var url = jmespath.search(arrayLinksArvore, "[?name=='"+nameLink+"'].url"); if (typeof url !== 'undefined' && url != '') { @@ -1898,7 +2303,13 @@ function getActionsOnSendProcess() { ' '+ ' '+ ' '+ - ' ' + ' '+ + (verifyConfigValue('reaberturaprogramada') ? + ' '+ + ' '+ + ' '+ + ' '+ + '': '')+ ''; ifrVisualizacao.find('#divSinRemoveAttributes').remove(); ifrVisualizacao.find('#divSinRemoverAnotacoes').append(htmlBoxActions); @@ -1927,6 +2338,240 @@ function getAutomaticActions() { } } } +function getListAcompanhamentoEspecial(force = false) { + var href = $(mainMenu).find('li a').map(function () { if (typeof $(this).attr('href') !== 'undefined' && $(this).attr('href').indexOf('acao=acompanhamento_listar') !== -1) { return $(this).attr('href') } }).get().join(); + if (href !== null) { + $.ajax({ url: href }).done(function (html) { + var $html = $(html); + var arrayAcompanhamento = $html.find('#frmAcompanhamentoLista #divInfraAreaTabela table tbody tr').map(function(){ + var _this = $(this); + var _td = _this.find('td'); + var link = _td.eq(2).find('a[href*="procedimento_trabalhar"]'); + var id_protocolo = getParamsUrlPro(link.attr('href')).id_procedimento; + var observacoes = _td.eq(6).text().trim(); + var config = (observacoes.indexOf('[') !== -1 && observacoes.indexOf(']') !== -1) ? observacoes.match(RegExp(/([^[]+(?=]))/, 'g')) : false; + config = (config) ? JSON.parse('{'+config+'}') : false; + observacoes = (observacoes.indexOf('[') !== -1 && observacoes.indexOf(']') !== -1) ? observacoes.split('[')[0].trim() : observacoes; + if (typeof id_protocolo !== 'undefined') { + return { + id_protocolo: getParamsUrlPro(link.attr('href')).id_procedimento, + url: link.attr('href'), + processo: link.text().trim(), + usuario: {name: _td.eq(3).find('a').attr('title'), user: _td.eq(3).find('a').text().trim() }, + data_hora: _td.eq(4).text().trim(), + grupo: _td.eq(5).text().trim(), + observacoes: observacoes, + acoes: _td.eq(7).find('a').map(function(){ return $(this).attr('href') }).get(), + icones: _td.eq(1).html(), + config: config + } + } + }).get(); + localStorageStorePro('dadosAcompanhamentoEspProcessoPro',arrayAcompanhamento); + setOptionsPro('lastcheck_AcompEsp',moment().format('YYYY-MM-DD HH:mm:ss')); + if (force) initNewBtnHome(); + + var listReabertura = checkReaberturaProcesso(); + if (listReabertura && listReabertura.length) { + dialogReaberturaProcesso(listReabertura); + } + }); + } +} +function checkDadosAcompEspecial(force = false) { + if (verifyConfigValue('reaberturaprogramada')) { + var lastCheck = getOptionsPro('lastcheck_AcompEsp'); + if ( force || + ( + verifyConfigValue('reaberturaprogramada_periodo') && + ( + (lastCheck && moment().add(-Math.abs(parseInt(getConfigValue('reaberturaprogramada_periodo'))), 'h') > moment(lastCheck, 'YYYY-MM-DD HH:mm:ss')) || + !lastCheck + ) + ) + ) { + getListAcompanhamentoEspecial(force); + if (force) { + removeOptionsPro('hideDialogReaberturaProcesso'); + if ($('body').hasClass('seiSlim')) { + $('#divComandos .iconReaberturaPro').addClass('iconLoading'); + } else { + setIconLoadinBtnSEI($('.iconReaberturaPro'),true); + } + } + } + } +} +function goReaberturaProcesso(index = 0) { + var listReabertura = checkReaberturaProcesso(); + var selectReabertura = $('#listReaberturaProcessos input[type="checkbox"]:checked').map(function(){ return $(this).val() }).get(); + var id_protocolo = (listReabertura && typeof listReabertura[index] !== 'undefined') ? listReabertura[index].id_protocolo : false; + if (id_protocolo && $.inArray(id_protocolo, selectReabertura) !== -1){ + var td = $('#listReaberturaProcessos tr[data-id="'+id_protocolo+'"] td').eq(2); + td.append(''); + + reopenProcessAjax(id_protocolo, function(){ + var next = index+1; + goReaberturaProcesso(next); + + td.find('.sucessEdit').remove(); + td.append(''); + setTimeout(function(){ td.find('.sucessEdit').remove(); }, 2000); + + if (next == listReabertura.length) { + alertaBoxPro('Sucess', 'check-circle', (listReabertura.length > 1 ? 'Processos reabertos': 'Processo reaberto')+' com sucesso!', function(){ window.location.reload() }); + loadingButtonConfirm(false); + } + console.log(listReabertura[index], next, listReabertura.length); + }); + } else if (index == 0) { + alertaBoxPro('Error', 'exclamation-triangle', 'Nenhum processo dispon\u00EDvel para abertura.'); + loadingButtonConfirm(false); + } +} +function dialogReaberturaProcesso(listReabertura) { + var hideDialog = getOptionsPro('hideDialogReaberturaProcesso'); + if (!hideDialog || (hideDialog && moment() > moment(hideDialog, 'YYYY-MM-DD HH:mm:ss').add(1, 'd')) ) { + var listaProcessoUnidade = getOptionsPro('listaProcessoUnidade'); + var htmlBox = '
'+ + ' '+ + ' '+ + ' '+ + ' '+ + ' '+ + ' '+ + ' '+ + ' '+ + ' '+ + ' '; + + if (listReabertura){ + $.each(listReabertura, function(i, v){ + if (listaProcessoUnidade && $.inArray(v.processo, listaProcessoUnidade) == -1 && moment() >= moment(v.reabertura, 'DD/MM/YYYY HH:mm')) { + htmlBox += ' '+ + ' '+ + ' '+ + ' '+ + ' '; + } + }); + } + htmlBox += '
Selecionar TudoProcessoObserva\u00E7\u00F5esReabertura
'+ + ' '+ + ' '+ + ' '+ + ' '+ + ' '+v.processo+ + ' '+ + ' '+ + ' '+ + ' '+v.observacoes+''+v.reabertura+''+ + '
'+ + '
'; + + resetDialogBoxPro('alertBoxPro'); + alertBoxPro = $('#alertaBoxPro') + .html('
'+htmlBox+'
') + .dialog({ + title: "Reabertura Programada de Processos", + width: 980, + open: function(){ + $('#reaberturaTablePro a#lnkInfraCheck').trigger('click'); + }, + buttons: [{ + text: "Ocultar hoje", + click: function() { + setOptionsPro('hideDialogReaberturaProcesso', moment().format('YYYY-MM-DD HH:mm:ss')); + resetDialogBoxPro('alertBoxPro'); + } + },{ + text: "Reabrir", + class: 'confirm ui-state-active', + click: function() { + goReaberturaProcesso(); + loadingButtonConfirm(true); + } + }] + }); + } +} +function checkReaberturaProcesso() { + var listaProcessoUnidade = getOptionsPro('listaProcessoUnidade'); + var arrayAcompanhamento = localStorageRestorePro('dadosAcompanhamentoEspProcessoPro'); + var configAcompEsp = (arrayAcompanhamento !== null) ? jmespath.search(arrayAcompanhamento, "[?config]") : false; + if (configAcompEsp && configAcompEsp !== null && configAcompEsp.length > 0) { + var reabertura = $.map(configAcompEsp,function(v){ + if (v.config.hasOwnProperty('Reabertura') && listaProcessoUnidade && $.inArray(v.processo, listaProcessoUnidade) == -1 && moment() >= moment(v.config.Reabertura, 'DD/MM/YYYY HH:mm')) { + return { + id_protocolo: v.id_protocolo, + processo: v.processo, + observacoes: v.observacoes, + reabertura: v.config.Reabertura + }; + } + }); + return (reabertura.length) ? reabertura : false; + } + return false; +} +function reopenProcessAjax(id_procedimento, callback = false) { + var href = url_host.replace('controlador.php','')+'controlador.php?acao=procedimento_trabalhar&id_procedimento='+String(id_procedimento); + if (href !== null) { + $.ajax({ url: href }).done(function (html) { + var $html = $(html); + var urlArvore = $html.find("#ifrArvore").attr('src'); + $.ajax({ url: urlArvore }).done(function (htmlArvore) { + var urlVisualizacao = $.map(htmlArvore.split('\n'), function(substr, i) { + return (substr.indexOf('?acao=arvore_visualizar&acao_origem=procedimento_visualizar&id_procedimento='+id_procedimento+'&infra_sistema=') !== -1) ? substr : null; + }).join(''); + urlVisualizacao = (urlVisualizacao.indexOf('new infraArvoreNo("PROCESSO"') !== -1) ? urlVisualizacao.split('"')[5] : false; + if(urlVisualizacao) { + $.ajax({ url: urlVisualizacao }).done(function (htmlVisualizacao) { + var urlReabertura = $.map(htmlVisualizacao.split('\n'), function(substr, i) { + return (substr.indexOf('?acao=procedimento_reabrir') !== -1) ? substr : null; + }).join(''); + urlReabertura = (urlReabertura != '') ? urlReabertura.split("'")[1] : false; + console.log(urlReabertura); + if (urlReabertura) { + $.ajax({ url: urlReabertura }).done(function (htmlReabertura) { + if (typeof callback === 'function') { + callback(); + } else { + alertaBoxPro('Sucess', 'check-circle', 'Processo reaberto com sucesso!'); + } + }); + } else { alertaBoxPro('Error', 'exclamation-triangle', 'Erro ao reabrir o processo.') } + }); + } else { alertaBoxPro('Error', 'exclamation-triangle', 'Erro ao reabrir o processo.') } + }); + }); + } else { alertaBoxPro('Error', 'exclamation-triangle', 'Erro ao reabrir o processo.') } +} +function configDatesSwitchChangeReabertura(this_) { + var _this = $(this_); + var _parent = _this.closest('.ui-dialog'); + if (_this.is(':checked')) { + _parent.find('.configDates_setreopen').show(); + _this.closest('tr').find('.iconSwitch').addClass('azulColor'); + } else { + _parent.find('.configDates_setreopen').hide(); + _this.closest('tr').find('.iconSwitch').removeClass('azulColor'); + } +} +function getListaGruposAcompEsp(html) { + var indexSelected = 0; + var selectGroup = html.find('#selGrupoAcompanhamento').find('option').map(function(i, v){ + if ($(this).is(':selected')) indexSelected = i-1; + if ($(this).text().trim() != '') { + return {name: $(this).text().trim(), value: $(this).val() } + } + }).get(); + if (selectGroup.length > 0) { + setOptionsPro('listaGruposAcompEsp',selectGroup); + setOptionsPro('listaGruposAcompEsp_unidade',$('#selInfraUnidades').val()); + } + return {array: selectGroup, indexSelected: indexSelected}; +} // INICIA O REDIMENSIONAMENTO AUTOMATICO DE IMAGENS NO VISUALIZADOR DE DOCUMENTOS function initDocImagemPro() { var ifrVisualizacao = $('#ifrVisualizacao').contents(); // seleciona o conteudo do iframe de visualizacao de documentos @@ -2185,7 +2830,7 @@ function initDocVideoPro() { function insertIconNewTab() { var ifrVisualizacao = $('#ifrVisualizacao').contents(); var ifrArvore = $('#ifrArvore'); - var arrayLinksArvoreAll = ifrArvore[0].contentWindow.arrayLinksArvoreAll; + var arrayLinksArvoreAll = (typeof ifrArvore[0] !== 'undefined') ? ifrArvore[0].contentWindow.arrayLinksArvoreAll : []; var docSelected = ifrArvore.contents().find('.infraArvoreNoSelecionado'); var id_documento = getParamsUrlPro(docSelected.closest('a').attr('href')).id_documento; @@ -2276,19 +2921,25 @@ function formControlerAlterarProcesso(ifrVisualizacao) { var _this = $(this); var _parent = _this.closest('body'); var oldText = _parent.find('#txtDescricao').attr('data-oldtext'); + var newTipoProc = _parent.find('#selTipoProcedimento').val(); + var newNameTipoProc = _parent.find('#selTipoProcedimento option:selected').text(); var newText = _parent.find('#txtDescricao').val(); var checkAddUrgencia = (typeof oldText !== 'undefined' && oldText.toLowerCase().indexOf('(urgente)') === -1 && typeof newText !== 'undefined' && newText.toLowerCase().indexOf('(urgente)') !== -1 ) ? true : false; var checkRemoveUrgencia = (typeof oldText !== 'undefined' && oldText.toLowerCase().indexOf('(urgente)') !== -1 && typeof newText !== 'undefined' && newText.toLowerCase().indexOf('(urgente)') === -1 ) ? true : false; var methodSend = checkAddUrgencia ? 'add' : false; methodSend = checkRemoveUrgencia ? 'remove' : methodSend; var checkSend = (checkAddUrgencia || checkRemoveUrgencia) ? true : false; - if ($('#ifrVisualizacao')[0].contentWindow.OnSubmitForm()) { + if (typeof $('#ifrVisualizacao')[0].contentWindow.OnSubmitForm !== 'undefined' && $('#ifrVisualizacao')[0].contentWindow.OnSubmitForm()) { if (typeof dadosProcessoPro !== 'undefined' && typeof dadosProcessoPro.propProcesso === 'undefined' && typeof getDadosProcessoSession() !== 'undefined' && getDadosProcessoSession().propProcesso !== 'undefined' ) { dadosProcessoPro.propProcesso = getDadosProcessoSession().propProcesso; } if (typeof dadosProcessoPro !== 'undefined' && typeof dadosProcessoPro.propProcesso !== 'undefined' && typeof dadosProcessoPro.propProcesso.txtDescricao !== 'undefined') { dadosProcessoPro.propProcesso.txtDescricao = newText; + dadosProcessoPro.propProcesso.selTipoProcedimento = newTipoProc; + dadosProcessoPro.propProcesso.hdnIdTipoProcedimento = newTipoProc; + dadosProcessoPro.propProcesso.hdnNomeTipoProcedimento = newNameTipoProc; + // console.log('->seetSessionProcessosPro', dadosProcessoPro.listAndamento); setSessionProcessosPro(dadosProcessoPro); } @@ -2378,15 +3029,15 @@ function followSelecionarItens(this_) { } function waitLoadPro(Obj, ElemRaiz, Elem, func, TimeOut = 6000) { if (TimeOut <= 0) { - //console.log("Script não executado: TIMEOUT"); + // console.log("Script não executado: TIMEOUT"); return; } setTimeout(function () { if (Obj.find(ElemRaiz).find(Elem).length == 0) { - //console.log(ElemRaiz + ": find -> " + Elem + " : carregando..."); + // console.log(ElemRaiz + ": find -> " + Elem + " : carregando..."); waitLoadPro(Obj, ElemRaiz, Elem, func, TimeOut - 100); } else { - //console.log(ElemRaiz + " : Script executado."); + // console.log(ElemRaiz + " : Script executado."); func(); } }, 100); @@ -2412,7 +3063,7 @@ function execArvorePro(func) { // console.log(idPasta + " -> evento click adicionado."); Obj.find("#ancjoin" + idPasta).on('click', function () { waitLoadPro(Obj, "#div" + idPasta, "a[target='ifrVisualizacao']", func); - // console.log(idPasta + " -> evento click adicionado2."); + // console.log(idPasta + " -> evento click adicionado2."); $('#ifrArvore')[0].contentWindow.getLinksArvorePasta(idPasta); $(this).off("click"); }); @@ -2429,7 +3080,7 @@ function arrayIDProcedimentos() { } function setArrayIDProcedimentos(newArray) { localStorageStorePro('arrayIDProcedimentos', newArray); - if(typeof newArray !== 'undefined' && newArray.length > 0) { console.log('setArrayIDProcedimentos', 'count->'+newArray.length, 'time->'+totalSecondsTestText) } + if(typeof newArray !== 'undefined' && newArray.length > 0) { console.log('setArrayIDProcedimentos', '->', window.name, '->', 'count->'+newArray.length, 'time->'+totalSecondsTestText) } parent.updateCountnewFiltro(newArray); } function updateCountnewFiltro(newArray) { @@ -2489,12 +3140,18 @@ function initCheckDadosProcesso() { } function initCheckDadosProcedimentos() { var acao_pro = getParamsUrlPro(window.location.href).acao_pro; - + if (typeof acao_pro === 'undefined' && arrayIDProcedimentos().length > 0) { if (!getOptionsPro('newTabSearchProcedimentos')) { if ( $('#frmCheckerProcessoPro').length == 0 ) { getCheckerProcessoPro(); } var href = window.location.href+'#&acao_pro=pesquisa_agrupamento'; - $('#frmCheckerProcessoPro').attr('src', href).unbind(); + $('#frmCheckerProcessoPro').attr('src', href).unbind().on('load', function(){ + if (isNewSEI) { + this.contentWindow.statusPesquisaDadosProcedimentos = true; + this.contentWindow.initCheckDadosProcedimentos(); + $(this).unbind(); + } + }); } else { observeNewTabDados(); } @@ -2544,7 +3201,7 @@ function updateProcessGroupTable() { } } function setProcessGroupTable() { - var progressoBar = '
'+ + var progressoBar = '
'+ ' '+ ' '+ ' '+ @@ -2628,34 +3285,64 @@ function getDadosHistoricoPro(listProc, fullHistory = false, callback = false) { var urlArvore = $html.find("#ifrArvore").attr('src'); //loopIDProcedimentos(); $.ajax({ url: urlArvore }).done(function (htmlArvore) { + var acompanhamentoEsp = getLinksAcompanhamento(htmlArvore); var urlHistorico = $.map(htmlArvore.split('\n'), function(substr, i) { return (substr.indexOf('?acao=procedimento_consultar_historico') !== -1) ? substr : null; }).join(''); urlHistorico = urlHistorico.split("'")[3]; - getDadosHistoricoUrlPro(urlHistorico, listProc, fullHistory, callback); + getDadosHistoricoUrlPro(urlHistorico, listProc, fullHistory, callback, acompanhamentoEsp); }); }); } } -function getDadosHistoricoUrlPro(urlHistorico, listProc, fullHistory = false, callback = false) { +function getLinksArvoreAjax(htmlArvore) { + var links = []; + if (htmlArvore.indexOf('Nos[0].acoes = ') !== -1) { + $.each(htmlArvore.split('\n'), function(ind, val){ + if (val.indexOf('Nos[0].acoes = ') !== -1) { + var barraControle = val.trim().replace("Nos[0].acoes = '",'').slice(0,-2); + $('
'+barraControle+'
').find('a.botaoSEI').each(function(){ + if (typeof $(this).attr('href') !== 'undefined' && $(this).attr('href') != '#') { + links.push({name: $(this).find('img').attr('title'), url: $(this).attr('href')}); + } + }); + } + }); + } + return links; +} +function getLinksAcompanhamento(htmlArvore) { + var _return = ''; + if (htmlArvore.indexOf('NosAcoes[0] = new infraArvoreAcao("ACOMPANHAMENTO"') !== -1) { + $.each(htmlArvore.split('\n'), function(ind, val){ + if (val.indexOf('NosAcoes[0] = new infraArvoreAcao("ACOMPANHAMENTO"') !== -1) { + var param = val.trim().replace("NosAcoes[0] = new infraArvoreAcao(",'').slice(0,-2); + param = param.split('"'); + _return = param[11].split('\\n')[1]; + } + }); + } + return _return; +} +function getDadosHistoricoUrlPro(urlHistorico, listProc, fullHistory = false, callback = false, acompanhamentoEsp = '') { $.ajax({ url: urlHistorico }).done(function (htmlHistorico) { if($(htmlHistorico).find('.infraAreaPaginacao').html().trim() != '') { var pg = ($(htmlHistorico).find('#selInfraPaginacaoSuperior').length > 0) ? $(htmlHistorico).find('#selInfraPaginacaoSuperior option').length-1 : 1; if (fullHistory) { - getDadosHistoricoPaginacao($(htmlHistorico), listProc, 0, pg, fullHistory, callback); + getDadosHistoricoPaginacao($(htmlHistorico), listProc, 0, pg, fullHistory, callback, acompanhamentoEsp); } else { andamentoPaginacaoTemp = getArrayHistorico($(htmlHistorico)); - getDadosHistoricoPaginacao($(htmlHistorico), listProc, 1, pg, fullHistory, callback); + getDadosHistoricoPaginacao($(htmlHistorico), listProc, 1, pg, fullHistory, callback, acompanhamentoEsp); } } else { if (fullHistory) { - getDadosHistoricoPaginacao($(htmlHistorico), listProc, 0, 1, fullHistory, callback); + getDadosHistoricoPaginacao($(htmlHistorico), listProc, 0, 1, fullHistory, callback, acompanhamentoEsp); } else { var andamento = getArrayHistorico($(htmlHistorico)); var listAndamento = {historico_completo: false, processo: listProc.processo, id_procedimento: listProc.id_procedimento, andamento: andamento}; if (!callback) { loopIDProcedimentos(); - getDataRecebimentoPro(listAndamento); + getDataRecebimentoPro(listAndamento, listProc, acompanhamentoEsp); } else if (typeof callback === 'function') { callback(listAndamento); } @@ -2682,12 +3369,12 @@ function getArrayHistorico(htmlHistorico) { }); return andamento; } -function getDadosHistoricoPaginacao(html, listProc, index, max, fullHistory = false, callback = false) { +function getDadosHistoricoPaginacao(html, listProc, index, max, fullHistory = false, callback = false, acompanhamentoEsp = '') { if (index > max) { var listAndamento = {historico_completo: false, processo: listProc.processo, id_procedimento: listProc.id_procedimento, andamento: andamentoPaginacaoTemp}; if (!callback) { loopIDProcedimentos(); - getDataRecebimentoPro(listAndamento); + getDataRecebimentoPro(listAndamento, false, acompanhamentoEsp); } else if (typeof callback === 'function') { callback(listAndamento); } @@ -2711,7 +3398,7 @@ function getDadosHistoricoPaginacao(html, listProc, index, max, fullHistory = fa }).done(function (htmlHistorico) { var andamento = getArrayHistorico($(htmlHistorico)); $.merge(andamentoPaginacaoTemp, andamento); - getDadosHistoricoPaginacao($(htmlHistorico), listProc, index+1, max, fullHistory, callback); + getDadosHistoricoPaginacao($(htmlHistorico), listProc, index+1, max, fullHistory, callback, acompanhamentoEsp); }); } } @@ -2767,6 +3454,50 @@ function getTablePaginacao(ifrView, formID, tableID, index) { } } } +function initBlocoProcessoHistorico() { + var listHistoryProc = getDadosProcessoSession(); + listHistoryProc = listHistoryProc && typeof listHistoryProc.listAndamento !== 'undefined' ? listHistoryProc.listAndamento : dadosProcessoPro.listAndamento; + + if (typeof listHistoryProc !== 'undefined' && typeof listHistoryProc.historico_completo !== 'undefined' && listHistoryProc.historico_completo) { + return getBlocoProcessoHistorico(); + } else if (!delayCrash) { + delayCrash = true; + setTimeout(function(){ delayCrash = false }, 6000); + mergeAllAndamentosProcesso(function() { + getBlocoProcessoHistorico(); + if ($('#ifrArvore').contents().find('.panelDadosArvorePro[data-type="bloco_interno"]').length == 0) { + $('#ifrArvore')[0].contentWindow.setDadosProcessoArvore(); + } + }); + return false; + } +} +function getBlocoProcessoHistorico() { + var listHistoryProc = getDadosProcessoSession(); + listHistoryProc = listHistoryProc && typeof listHistoryProc.listAndamento !== 'undefined' ? listHistoryProc.listAndamento : dadosProcessoPro.listAndamento; + var retiradoBlocoProcesso = (typeof listHistoryProc !== 'undefined' && typeof listHistoryProc.andamento !== 'undefined' && listHistoryProc.andamento.length) ? jmespath.search(listHistoryProc.andamento, "[?unidade=='"+unidade+"'] | [?contains(descricao, 'Processo retirado do bloco')]") : null; + retiradoBlocoProcesso = retiradoBlocoProcesso !== null && retiradoBlocoProcesso.length ? retiradoBlocoProcesso : false; + var blocoProcesso = (typeof listHistoryProc !== 'undefined' && typeof listHistoryProc.andamento !== 'undefined' && listHistoryProc.andamento.length) ? jmespath.search(listHistoryProc.andamento, "[?unidade=='"+unidade+"'] | [?contains(descricao, 'Processo inserido no bloco')]") : null; + blocoProcesso = blocoProcesso === null ? false : blocoProcesso; + blocoProcesso = !retiradoBlocoProcesso + ? blocoProcesso + : blocoProcesso && blocoProcesso.length > 0 && moment(blocoProcesso[0].datahora,'YYYY-MM-DD HH:mm') >= moment(retiradoBlocoProcesso[0].datahora,'YYYY-MM-DD HH:mm') ? blocoProcesso : false; + + // console.log('getBlocoProcessoHistorico',blocoProcesso, retiradoBlocoProcesso); + + if (typeof blocoProcesso !== 'undefined' && blocoProcesso !== null && blocoProcesso.length > 0) { + setTimeout(function(){ + var ifrVisualizacao = $('#ifrVisualizacao').contents(); + ifrVisualizacao.find('a[onclick*="incluirEmBloco"]').addClass('verdeColor').attr('onmouseover', 'return infraTooltipMostrar(\''+blocoProcesso[0].descricao+'\')'); + $('#ifrArvore').contents().find('.panelDadosArvorePro[data-type*="bloco_interno"] .infoDadosArvore_bloco_interno').text(blocoProcesso[0].descricao); + }, 1500); + } else if (typeof blocoProcesso !== 'undefined' && blocoProcesso !== null && blocoProcesso.length == 0) { + setTimeout(function(){ + $('#ifrArvore').contents().find('.panelDadosArvorePro[data-type="bloco_interno_loading"] .infoDadosArvore_bloco_interno').text('Nenhum bloco localizado'); + }, 1500); + } + return blocoProcesso; +} function initGanttHistoryProc() { alertaBoxPro('Sucess', 'sync fa-spin', 'Aguarde... Pesquisando hist\u00F3rico do processo'); var listHistoryProc = getDadosProcessoSession(); @@ -2780,6 +3511,7 @@ function initGanttHistoryProc() { } function getGanttHistoryProc(listHistoryProc = false) { if (!listHistoryProc) { + // console.log('->seetSessionProcessosPro', dadosProcessoPro.listAndamento); setSessionProcessosPro(dadosProcessoPro); } var proc = listHistoryProc ? listHistoryProc.andamento : dadosProcessoPro.listAndamento.andamento; @@ -3090,6 +3822,9 @@ function setPanelResize(element, name) { if (getOptionsPro('panelHeight_'+name) != '') { $(element).css('height',getOptionsPro('panelHeight_'+name)+'px'); } + if (isNewSEI && $('#divRecebidosAreaPaginacaoInferior').is(':visible')) { + $(element).find('.ui-resizable-handle.ui-resizable-s').css('bottom','-30px'); + } $(element) .find('.ui-resizable-handle.ui-resizable-s') .dblclick(function() { @@ -3261,25 +3996,27 @@ function selectIconEtiqueta(this_, tagName, mode) { : $('.kanbanAtividade, .atividadeInfo') : $('.tableFavoritos tbody'); table = ($('#ifrVisualizacao').contents().find('.favoritosLabelOptions').length > 0) ? $('#ifrVisualizacao').contents().find('.favoritosLabelOptions table') : table; + table = (mode == 'options') ? $('#dialogBoxPro') : table; var icon = $(this_).find('.iconListTxt').text(); var value = table.find('.tag_text.tagTableText_'+tagName).data('colortag'); - table.find('.tag_text.tagTableText_'+tagName).data('icontag', icon).find('i.tagicon').attr('class', 'fas fa-'+icon); - table.find('.tag.tagTableText_'+tagName).data('icontag', icon).find('i.tagFavEditIcon').data('icontag', icon).attr('class', 'tagFavEditIcon fas fa-'+icon); + table.find('.tag_text.tagTableText_'+tagName).attr('data-icontag', icon).data('icontag', icon).find('i.tagicon').attr('class', 'fas fa-'+icon); + table.find('.tag.tagTableText_'+tagName).attr('data-icontag', icon).data('icontag', icon).find('i.tagFavEditIcon').attr('data-icontag', icon).data('icontag', icon).attr('class', 'tagFavEditIcon fas fa-'+icon); resetDialogBoxPro('alertBoxPro'); $('#listIconsFontAwesome').remove(); - saveConfigEtiqueta(tagName, value, icon, mode); + if (mode != 'options') saveConfigEtiqueta(tagName, value, icon, mode); } function changeColorEtiqueta(this_, mode) { var value = $(this_).val(); var textColour = (getBrightnessColor(value) > 125) ? 'black' : 'white'; - var tagNamed = removeAcentos($(this_).closest('.tag').find('.tag-text').text()).replace(/\ /g, '').toLowerCase(); + var tagNamed = (mode == 'options') ? 'afastamento' : removeAcentos($(this_).closest('.tag').find('.tag-text').text()).replace(/\ /g, '').toLowerCase(); var tagName = 'tagTableText_'+tagNamed; var index = parseInt($(this_).closest('tr').data('index')); var icon = $(this_).closest('.tag').find('.tagFavEditIcon').data('icontag'); - $(this_).closest('tbody').find('.'+tagName).data('colortag',value).css({'background-color': value, 'color': textColour}).find('.tag-text').css('color', textColour).find('.tagicon').css('color', textColour); - $(this_).closest('tbody').find('.'+tagName).find('.tagicon').css('color', textColour); - $(this_).closest('tbody').find('.'+tagName+' .tagFavAddColorInput').val(value); - saveConfigEtiqueta(tagNamed, value, icon, mode); + var table = (mode == 'options') ? $(this_).closest('.seiProForm') : $(this_).closest('tbody'); + table.find('.'+tagName).attr('data-colortag',value).attr('data-textcolor',textColour).data('colortag',value).data('textcolor',textColour).css({'background-color': value, 'color': textColour}).find('.tag-text').css('color', textColour).find('.tagicon').css('color', textColour); + table.find('.'+tagName).find('.tagicon').css('color', textColour); + table.find('.'+tagName+' .tagFavAddColorInput').val(value); + if (mode != 'options') saveConfigEtiqueta(tagNamed, value, icon, mode); } function saveConfigEtiqueta(name, value, icon, mode) { var storeEtiqueta = (mode == 'ativ') @@ -3611,10 +4348,10 @@ function configFlashMenuTrPro(value, color, state, mode) { ' '; } function configFlashMenuPro(arrayLinksArvore) { - var selectedItensMenu = ( typeof localStorageRestorePro('configViewFlashMenuPro') !== 'undefined' && !$.isEmptyObject(localStorageRestorePro('configViewFlashMenuPro')) ) ? localStorageRestorePro('configViewFlashMenuPro') : [['Incluir Documento'],['Consultar/Alterar Processo'],['Enviar Documento Externo'],['Atribuir Processo']]; + var selectedItensMenu = ( typeof localStorageRestorePro('configViewFlashMenuPro') !== 'undefined' && !$.isEmptyObject(localStorageRestorePro('configViewFlashMenuPro')) ) ? localStorageRestorePro('configViewFlashMenuPro') : [['Incluir Documento'],['Consultar/Alterar Processo'],['Enviar Documento Externo'],['Atribuir Processo'],['Add/Remover Urg\u00EAncia']]; var selectedItensDocMenu = ( typeof localStorageRestorePro('configViewFlashDocMenuPro') !== 'undefined' && !$.isEmptyObject(localStorageRestorePro('configViewFlashDocMenuPro')) ) ? localStorageRestorePro('configViewFlashDocMenuPro') : [['Copiar n\u00FAmero SEI'],['Copiar nome do documento'],['Copiar link do documento']]; var selectedItensDocArvore = ( typeof localStorageRestorePro('configViewFlashDocArvorePro') !== 'undefined' && !$.isEmptyObject(localStorageRestorePro('configViewFlashDocArvorePro')) ) ? localStorageRestorePro('configViewFlashDocArvorePro') : [["Copiar n\u00FAmero SEI"],["Copiar link do documento"],["Duplicar documento"]]; - var selectedItensPanelArvore = ( typeof localStorageRestorePro('configViewFlashPanelArvorePro') !== 'undefined' && !$.isEmptyObject(localStorageRestorePro('configViewFlashPanelArvorePro')) ) ? localStorageRestorePro('configViewFlashPanelArvorePro') : [["Anota\u00E7\u00F5es"],["Marcador"],["Tipo de Procedimento"],["Assuntos"],["Interessados"],["Atribui\u00E7\u00E3o"],["N\u00EDvel de Acesso"],["Observa\u00E7\u00F5es"]]; + var selectedItensPanelArvore = ( typeof localStorageRestorePro('configViewFlashPanelArvorePro') !== 'undefined' && !$.isEmptyObject(localStorageRestorePro('configViewFlashPanelArvorePro')) ) ? localStorageRestorePro('configViewFlashPanelArvorePro') : [["Anota\u00E7\u00F5es"],["Marcador"],["Acompanhamento Especial"],["Tipo de Procedimento"],["Assuntos"],["Interessados"],["Atribui\u00E7\u00E3o"],["N\u00EDvel de Acesso"],["Observa\u00E7\u00F5es"]]; var textBox = '
'+ '
    '+ @@ -3828,6 +4565,24 @@ function changeFlashMenuPro(this_, mode) { console.log(configView, arrayShowItensMenu); localStorageStorePro(configView, arrayShowItensMenu); } +function addUrgenteProcessoPro() { + var id_procedimento = dadosProcessoPro.propProcesso.hdnIdProcedimento; + var new_text = dadosProcessoPro.propProcesso.txtDescricao; + new_text = typeof new_text !== 'undefined' && new_text.toLowerCase().indexOf('(urgente)') === -1 + ? new_text+' (URGENTE)' + : (typeof new_text !== 'undefined' && new_text.toLowerCase().indexOf('(urgente)') !== -1) ? new_text.replace(/\(urgente\)/ig,'').trim() : false; + var checkUrgencia = typeof new_text !== 'undefined' && new_text && new_text.toLowerCase().indexOf('(urgente)') !== -1 ? true : false; + var modeUrgencia = checkUrgencia ? 'Adicionada' : 'Removida'; + var txtUrgencia = modeUrgencia+' marca de urg\u00EAncia no processo'; + + updateDadosArvore('Consultar/Alterar Processo', 'txtDescricao', new_text, id_procedimento, function(){ + dadosProcessoPro.propProcesso.txtDescricao = new_text; + // console.log('->seetSessionProcessosPro', dadosProcessoPro.listAndamento); + setSessionProcessosPro(dadosProcessoPro); + resetDialogBoxPro('dialogBoxPro'); + alertaBoxPro('Sucess', 'check-circle', txtUrgencia); + }); +} function dialogCopyNewDoc(doc) { var textBox = '
    Digite o n\u00FAmero do processo que deseja copiar o documento '+doc.text().trim()+'
    '+ '
    '+ @@ -3882,6 +4637,13 @@ function verifyConfigValue(name) { return false; } } +function restrictConfigValue(name) { + if (NAMESPACE_SPRO == 'ANTAQ Pro' || NAMESPACE_SPRO == 'ANTT Pro' || NAMESPACE_SPRO == 'SEI Pro') { + return false; + } else { + return checkConfigValue(name); + } +} function checkConfigValue(name) { var configBasePro = ( typeof localStorage.getItem('configBasePro') !== 'undefined' && localStorage.getItem('configBasePro') != '' ) ? JSON.parse(localStorage.getItem('configBasePro')) : []; var dataValuesConfig = (typeof jmespath !== 'undefined') ? jmespath.search(configBasePro, "[*].configGeral | [0]") : false; @@ -4188,7 +4950,7 @@ function confirmaBoxPro(text, func, titBtn = 'OK', cancel) { }] }); } -function alertaBoxPro(status, icon, text) { +function alertaBoxPro(status, icon, text, func_ok = false) { resetDialogBoxPro('alertBoxPro'); alertBoxPro = $('#alertaBoxPro') .html(' '+text+'') @@ -4204,6 +4966,7 @@ function alertaBoxPro(status, icon, text) { class: "confirm", click: function() { $(this).dialog('close'); + if (typeof func_ok === 'function') func_ok(); } }] }); @@ -4271,6 +5034,17 @@ function toggleTablePro(idTable, mode) { setOptionsPro(elemTable, 'show'); } } +function toogleByID(this_) { + var _this = $(this_); + var _ref = _this.data('ref'); + var elem = $('#'+_ref); + if (elem.is(':visible')) { + elem.hide(); + } else { + elem.show(); + } + +} function getColorID() { var colorID = { color1: { @@ -4683,7 +5457,7 @@ function encodeJSON_toHex(str){ return result } function unicodeToChar(text) { - if (text != '') { + if (typeof text !== 'undefined' && text !== null && text != '') { return text.replace(/\\u[\dA-F]{4}/gi, function (match) { return String.fromCharCode(parseInt(match.replace(/\\u/g, ''), 16)); @@ -4693,7 +5467,16 @@ function unicodeToChar(text) { } } function capitalizeFirstLetter(string) { - return string.charAt(0).toUpperCase() + string.slice(1); + // return string.charAt(0).toUpperCase() + string.slice(1); string = string.toLowerCase(); + var excetWords = ['a', 'à', 'algo', 'alguém', 'algum', 'alguma', 'algumas', 'alguns', 'ao', 'aos', 'aquela', 'aquelas', 'aquele', 'aqueles', 'aquilo', 'as', 'às', 'cada', 'certa', 'certas', 'certo', 'certos', 'com', 'comigo', 'como', 'conosco', 'consigo', 'contigo', 'convosco', 'cuja', 'cujas', 'cujo', 'cujos', 'da', 'das', 'de', 'dessa', 'dessas', 'desse', 'desses', 'desta', 'destas', 'do', 'dos', 'dum', 'duma', 'dumas', 'duns', 'e', 'é', 'ela', 'elas', 'ele', 'eles', 'em', 'entre', 'essa', 'essas', 'esse', 'esses', 'esta', 'estas', 'este', 'estes', 'eu', 'isso', 'isto', 'la', 'las', 'lhe', 'lhes', 'lo', 'los', 'me', 'mesma', 'mesmas', 'mesmo', 'mesmos', 'meu', 'meus', 'mim', 'minha', 'minhas', 'muita', 'muitas', 'muito', 'muitos', 'na', 'nada', 'não', 'nas', 'nenhum', 'nenhuma', 'nenhumas', 'nenhuns', 'ninguém', 'no', 'nos', 'nós', 'nossa', 'nossas', 'nosso', 'nossos', 'num', 'numa', 'numas', 'nuns', 'o', 'onde', 'os', 'ou', 'outra', 'outras', 'outrem', 'outro', 'outros', 'para', 'pela', 'pelas', 'pelo', 'por', 'pouca', 'poucas', 'pouco', 'poucos', 'quais', 'quaisquer', 'qual', 'qualquer', 'quando', 'quanta', 'quantas', 'quanto', 'quantos', 'que', 'quem', 'são', 'se', 'seja', 'sem', 'seu', 'seus', 'si', 'sob', 'sobre', 'sua', 'suas', 'tanta', 'tantas', 'tanto', 'tantos', 'te', 'teu', 'teus', 'ti', 'toda', 'todas', 'todo', 'todos', 'tu', 'tua', 'tuas', 'tudo', 'um', 'uma', 'umas', 'uns', 'vária', 'várias', 'vário', 'vários', 'você', 'vocês', 'vos', 'vós', 'vossa', 'vossas', 'vosso', 'vossos'] + var _return = ( string.indexOf(' ') === -1 ) ? string[0].toUpperCase() + string.substring(1).toLowerCase() : string.split(' ').map((s, index) => { + if (excetWords.includes(s.toLowerCase()) && index != 0 ) { + return s.toLowerCase() + } else { + return s[0].toUpperCase() + s.substring(1).toLowerCase() + } + }).join(' '); + return _return; } function randomString(length) { var result = ''; @@ -4742,6 +5525,18 @@ function getProcessoUnidadePro(selected = false, obj = false) { return getOptionsPro('listaProcessoUnidade'); } } +function initListTypesSEI(callback = false, TimeOut = 9000) { + if (TimeOut <= 0) { return; } + if (typeof arrayListTypesSEI.selectTipoProc !== 'undefined' ) { + if (typeof callback === 'function') callback(); + } else { + setTimeout(function(){ + if (TimeOut == 9000) getListTypesSEI(); + initListTypesSEI(callback, TimeOut - 100); + console.log('Reload initListTypesSEI'); + }, 500); + } +} function getListTypesSEI() { var hrefConsulta = $(mainMenu).find('a[href*="protocolo_pesquisa"]').attr('href'); if (typeof hrefConsulta !== 'undefined' && hrefConsulta != '') { @@ -4762,18 +5557,19 @@ function getCheckerProcessoPro() { frameborder: 0, style: (checkBrowser() == 'Firefox') ? 'width: 1px; height: 1px; position: absolute; top: -100px;' + // : 'width: 100%; height: 500px;', : 'width: 1px; height: 1px; position: absolute; top: -100px; display: none;', tableindex: '-1', scrolling: 'no' }).appendTo('body'); } function getDadosIframeProcessoPro(idProcedimento, mode) { - if (typeof idProcedimento !== 'undefined' && idProcedimento != '' ) { + if (typeof idProcedimento !== 'undefined' && idProcedimento != '' && !checkProcessoSigiloso() ) { if ( $('#frmCheckerProcessoPro').length == 0 ) { getCheckerProcessoPro(); } var url = url_host.replace('controlador.php','')+'controlador.php?acao=procedimento_trabalhar&id_procedimento='+idProcedimento; if (!checkProcessoSigiloso()) { $('#frmCheckerProcessoPro').attr('src', url).unbind().on('load', function(){ - checkDadosIframeProcessoPro(mode); + checkDadosIframeProcessoPro(mode); }); } } @@ -4782,20 +5578,26 @@ function checkDadosIframeProcessoPro(mode) { var iframe = $('#frmCheckerProcessoPro').contents(); var ifrVisualizacao = iframe.find('#ifrVisualizacao').contents(); var ifrArvore = iframe.find('#ifrArvore').contents(); - setTimeout(function () { - if ( ifrVisualizacao.find('#divArvoreAcoes').length > 0) { - getDadosProcessoPro(ifrVisualizacao, mode); - getLinksProcessoPro(ifrVisualizacao); - getLinksArvorePro(ifrArvore); - getDadosPesquisaPro(iframe, mode); - unidade = iframe.find('#selInfraUnidades').find('option:selected').text().trim(); - } else { - checkDadosIframeProcessoPro(mode); - } - }, 500); + var ifrArvoreElem = iframe.find('#ifrArvore'); + if (!checkProcessoSigiloso(iframe)) { + setTimeout(function () { + if ( ifrVisualizacao.find('#divArvoreAcoes').length > 0) { + getDadosProcessoPro(ifrVisualizacao, ifrArvore, mode); + getLinksProcessoPro(ifrVisualizacao); + getLinksArvorePro(ifrArvore); + getDadosPesquisaPro(iframe, mode); + getListaAtribuicaoProcesso(ifrArvoreElem, mode); + unidade = iframe.find('#selInfraUnidades').find('option:selected').text().trim(); + } else { + checkDadosIframeProcessoPro(mode); + } + }, 500); + } else { + $('#frmCheckerProcessoPro, .sparkling-modal-container, #divInfraModalFundo').remove(); + } } function getDadosPesquisaPro(iframe, mode) { - var href = iframe.find(mainMenu).find('li a').map(function () { if ($(this).attr('href').indexOf('acao=protocolo_pesquisar') !== -1) { return $(this).attr('href') } }).get().join(); + var href = iframe.find(mainMenu).find('li a').map(function () { if (typeof $(this).attr('href') !== 'undefined' && $(this).attr('href').indexOf('acao=protocolo_pesquisar') !== -1) { return $(this).attr('href') } }).get().join(); if (href != '') { var tiposDocumentos = []; $.ajax({ url: href }).done(function (html) { @@ -4809,12 +5611,16 @@ function getDadosPesquisaPro(iframe, mode) { }); } } -function getDadosProcessoPro(ifrVisualizacao, mode) { +function getDadosProcessoPro(ifrVisualizacao, ifrArvore, mode) { var processo = {}; + + var acompEsp = ifrArvore.find('a[target="ifrVisualizacao"][href*="controlador.php?acao=acompanhamento_cadastrar"]'); + var arrayAcompEsp = (acompEsp.length > 0) ? {url: acompEsp.attr('href'), title: acompEsp.find('img').attr('title').split(/\r?\n|\r|\n/g)[1]} : ''; + ifrVisualizacao.find('#divArvoreAcoes a').each(function(index){ var href = $(this).attr('href'); if ((href.indexOf('acao=procedimento_alterar') !== -1) || (href.indexOf('acao=procedimento_consultar') !== -1)) { - ajaxDadosProcessoPro(href, mode); + ajaxDadosProcessoPro(href, mode, arrayAcompEsp); } else if (href.indexOf('acao=procedimento_gerar_pdf') !== -1) { ajaxDadosDocumentosPro(href, mode); } @@ -4849,29 +5655,33 @@ function getLinksArvorePro(ifrArvore) { } function getDadosAndamentoPro(href) { //var andamento = []; - $.ajax({ url: href }).done(function (html) { - let $html = $(html); - /* - $html.find("#tblHistorico").find('tr').each(function(){ - var datahora = $(this).find('td').eq(0).text().trim(); - datahora = moment(datahora,'DD/MM/YYYY HH:mm').format('YYYY-MM-DD HH:mm:ss'); - var unidade = $(this).find('td').eq(1).text(); - var usuario = $(this).find('td').eq(2).text(); - var descricao = $(this).find('td').eq(3).text(); - var descricao_alt = $(this).find('td').eq(3).find('a').attr('alt'); - if ( unidade != '' ) { andamento.push({datahora: datahora, unidade: unidade, usuario: usuario, descricao: descricao, descricao_alt: descricao_alt}) } - }); - */ - var andamento = getArrayHistorico($html); - var processo = $html.find('#divInfraBarraLocalizacao').text().trim().split(' '); - processo = processo[processo.length-1]; - var id_procedimento = $html.find('#frmProcedimentoHistorico').attr('action'); - id_procedimento = (typeof id_procedimento !== 'undefined' && id_procedimento != '') ? getParamsUrlPro(id_procedimento).id_procedimento : ''; - - var listAndamento = {historico_completo: false, processo: processo, id_procedimento: id_procedimento, andamento: andamento}; - dadosProcessoPro.listAndamento = listAndamento; - getDataRecebimentoPro(listAndamento); - }); + $.ajax({ url: href }).done(function (html) { + let $html = $(html); + /* + $html.find("#tblHistorico").find('tr').each(function(){ + var datahora = $(this).find('td').eq(0).text().trim(); + datahora = moment(datahora,'DD/MM/YYYY HH:mm').format('YYYY-MM-DD HH:mm:ss'); + var unidade = $(this).find('td').eq(1).text(); + var usuario = $(this).find('td').eq(2).text(); + var descricao = $(this).find('td').eq(3).text(); + var descricao_alt = $(this).find('td').eq(3).find('a').attr('alt'); + if ( unidade != '' ) { andamento.push({datahora: datahora, unidade: unidade, usuario: usuario, descricao: descricao, descricao_alt: descricao_alt}) } + }); + */ + var andamento = getArrayHistorico($html); + var processo = $html.find('#divInfraBarraLocalizacao').text().trim().split(' '); + processo = processo[processo.length-1]; + var id_procedimento = $html.find('#frmProcedimentoHistorico').attr('action'); + id_procedimento = (typeof id_procedimento !== 'undefined' && id_procedimento != '') ? getParamsUrlPro(id_procedimento).id_procedimento : ''; + + var listAndamento = {historico_completo: false, processo: processo, id_procedimento: id_procedimento, andamento: andamento}; + if (typeof dadosProcessoPro.listAndamento !== 'undefined' && typeof dadosProcessoPro.listAndamento.historico_completo !== 'undefined' && dadosProcessoPro.listAndamento.historico_completo) { + console.log('Ignore getDataRecebimentoPro'); + } else { + dadosProcessoPro.listAndamento = listAndamento; + getDataRecebimentoPro(listAndamento); + } + }); } function randomDate(start, end, startHour, endHour) { var date = new Date(+start + Math.random() * (end - start)); @@ -4879,17 +5689,20 @@ function randomDate(start, end, startHour, endHour) { date.setHours(hour); return moment(date).format('YYYY-MM-DD HH:mm:ss'); } -function getDataRecebimentoPro(listAndamento) { +function getDataRecebimentoPro(listAndamento, listProc = false, acompanhamentoEsp = '') { var dataRecebimento = []; var unidade = isNewSEI ? $('#lnkInfraUnidade').text() : $('#selInfraUnidades').find('option:selected').text().trim(); var datesend = '', descricaosend = '', + acompanhamentoesp = acompanhamentoEsp, unidadesend = '', unidadesendfull = '', datageracao = '', observacoes = typeof dadosProcessoPro !== 'undefined' &&typeof dadosProcessoPro.propProcesso !== 'undefined' &&typeof dadosProcessoPro.propProcesso.txaObservacoes !== 'undefined' ? dadosProcessoPro.propProcesso.txaObservacoes : '', descricaodatageracao = ''; + // console.log('##',dadosProcessoPro.propProcesso.acompanhamentoEsp); + $.each(listAndamento.andamento,function(k, g){ if (g.descricao.indexOf('Processo p\u00FAblico gerado') !== -1 || g.descricao.indexOf('Processo restrito gerado') !== -1 ) { datageracao = g.datahora; @@ -4910,10 +5723,10 @@ function getDataRecebimentoPro(listAndamento) { //var datevisit = randomDate(new Date(2020, 0, 1), new Date(), 0, 24); var datevisit = moment().format('YYYY-MM-DD HH:mm:ss'); if (unidade == v.unidade && (v.descricao == 'Processo recebido na unidade' || v.descricao == 'Reabertura do processo na unidade')) { - dataRecebimento.push({id_procedimento: listAndamento.id_procedimento, processo: listAndamento.processo, datahora: v.datahora, unidade: v.unidade, descricao: v.descricao, datetime: datevisit, datesend: datesend, descricaosend: descricaosend, unidadesend: unidadesend, unidadesendfull: unidadesendfull, datageracao: datageracao, descricaodatageracao: descricaodatageracao, observacoes: observacoes}); + dataRecebimento.push({id_procedimento: listAndamento.id_procedimento, processo: listAndamento.processo, datahora: v.datahora, unidade: v.unidade, descricao: v.descricao, datetime: datevisit, datesend: datesend, descricaosend: descricaosend, unidadesend: unidadesend, unidadesendfull: unidadesendfull, datageracao: datageracao, descricaodatageracao: descricaodatageracao, observacoes: observacoes, acompanhamentoesp: acompanhamentoesp}); return false; } else if (unidade == v.unidade && (v.descricao == 'Processo p\u00FAblico gerado' || v.descricao.indexOf('Processo restrito gerado') !== -1 )) { - dataRecebimento.push({id_procedimento: listAndamento.id_procedimento, processo: listAndamento.processo, datahora: v.datahora, unidade: v.unidade, descricao: v.descricao, datetime: datevisit, datesend: datesend, descricaosend: descricaosend, unidadesend: unidadesend, unidadesendfull: unidadesendfull, datageracao: datageracao, descricaodatageracao: descricaodatageracao, observacoes: observacoes}); + dataRecebimento.push({id_procedimento: listAndamento.id_procedimento, processo: listAndamento.processo, datahora: v.datahora, unidade: v.unidade, descricao: v.descricao, datetime: datevisit, datesend: datesend, descricaosend: descricaosend, unidadesend: unidadesend, unidadesendfull: unidadesendfull, datageracao: datageracao, descricaodatageracao: descricaodatageracao, observacoes: observacoes, acompanhamentoesp: acompanhamentoesp}); return false; } }); @@ -4991,12 +5804,13 @@ function ajaxDadosDocumentosPro(href, mode, callback = false) { if (typeof callback === 'function') callback(documentos); }); } -function ajaxDadosProcessoPro(href, mode) { +function ajaxDadosProcessoPro(href, mode, arrayAcompEsp) { var processo = {}; var unidade = isNewSEI ? $('#lnkInfraUnidade').text() : $('#selInfraUnidades').find('option:selected').text().trim(); $.ajax({ url: href }).done(function (html) { let $html = $(html); processo.action = $html.find("#frmProcedimentoCadastro").attr('action'); + processo.acompanhamentoEsp = arrayAcompEsp; processo.selAssuntos_select = $html.find("#selAssuntos option").map(function () { return $(this).text(); }).get(); processo.selTipoProcedimento_select = $html.find("#selTipoProcedimento option").map(function () { return {id: $(this).val(), name: $(this).text() }; }).get(); processo.selHipoteseLegal_select = $html.find("#selHipoteseLegal option").map(function () { return {id: $(this).val(), name: $(this).text() }; }).get(); @@ -5146,7 +5960,9 @@ function arrayDadosIframeDocumentosPro(ifrArvore, mode) { getListDocumentosArvore(ifrArvore); if (mode == 'editor') { getDialogCitacaoDocumento(); - getDialogDadosEditor(); + setTimeout(function(){ + getDialogDadosEditor(); + }, 1000); insertAutomaticMinutaWatermark(); } else if (mode == 'gantt') { updateSelectConcluirEtapa(); @@ -5157,6 +5973,8 @@ function arrayDadosIframeDocumentosPro(ifrArvore, mode) { } else if (mode == 'dados') { //loopIDProcedimentos(); } + var dadosProcessoPro = pullDadosProcessoSession(); + // console.log('->seetSessionProcessosPro', dadosProcessoPro.listAndamento); setSessionProcessosPro(dadosProcessoPro); if ($('#actionsTablePro').length) { getDocumentosActions(); @@ -5164,6 +5982,7 @@ function arrayDadosIframeDocumentosPro(ifrArvore, mode) { } function getListDocumentosArvore(ifrArvore) { var processo = []; + var dadosProcessoPro = pullDadosProcessoSession(); ifrArvore.find('#divArvore a[target=ifrVisualizacao]').each(function(index){ var txt = $(this).text().trim(); var text = txt.split(' '); @@ -5173,7 +5992,7 @@ function getListDocumentosArvore(ifrArvore) { nr_sei = (nr_sei.indexOf('(') !== -1) ? nr_sei.replace(')','').replace('(','') : nr_sei; var assinatura = (ifrArvore.find('#anchorA'+id_protocolo).length) ? ifrArvore.find('#anchorA'+id_protocolo+' img').attr('title').replace('Assinado por:','').trim() : ''; var sigilo = (ifrArvore.find('#iconNA'+id_protocolo).length) ? ifrArvore.find('#iconNA'+id_protocolo+'').attr('title').trim() : ''; - var data_assinatura = (!$.isEmptyObject(dadosProcessoPro.listDocumentosAssinados) && jmespath.search(dadosProcessoPro.listDocumentosAssinados, "[?id_documento=='"+id_protocolo+"'].data_assinatura | length(@)") > 0) + var data_assinatura = (typeof dadosProcessoPro.listDocumentosAssinados !== 'undefined' && !$.isEmptyObject(dadosProcessoPro.listDocumentosAssinados) && jmespath.search(dadosProcessoPro.listDocumentosAssinados, "[?id_documento=='"+id_protocolo+"'].data_assinatura | length(@)") > 0) ? jmespath.search(dadosProcessoPro.listDocumentosAssinados, "[?id_documento=='"+id_protocolo+"'].data_assinatura | [0]") : ''; var nativo = (ifrArvore.find('#anchorImg'+id_protocolo+' img[src*="'+nameDocInterno+'"]').length) ? true : false; @@ -5181,8 +6000,9 @@ function getListDocumentosArvore(ifrArvore) { processo.push({ id_protocolo: id_protocolo, nr_sei: nr_sei, documento: documento, assinatura: assinatura, data_documento: (data_assinatura && data_assinatura != '' ? moment(data_assinatura, 'DD/MM/YYYY').format('YYYY-MM-DD HH:mm:ss') : false), data_assinatura: data_assinatura, sigilo: sigilo, nativo: nativo }); } }); - dadosProcessoPro.listDocumentos = processo; - setSessionProcessosPro(dadosProcessoPro); + dadosProcessoPro.listDocumentos = processo; + // console.log('->seetSessionProcessosPro', dadosProcessoPro.listAndamento); + setSessionProcessosPro(dadosProcessoPro); } function getHistoryProcessosPro() { $('#divInfraBarraSistemaE.barSuspenso').trigger('click'); @@ -5237,6 +6057,7 @@ function getHistoryProcessosPro() { setTimeout(function(){ var historyTable = $('#historyTablePro'); historyTable.tablesorter({ + sortLocaleCompare : true, sortList: [[2,1]], textExtraction: { 2: function (elem, table, cellIndex) { @@ -5321,6 +6142,17 @@ function getAllLinksFolder() { }); _ifrArvore[0].contentWindow.getLinksArvore(); } +function initMergeAllAndamentosProcesso(callback, TimeOut = 9000) { + if (TimeOut <= 0 || parent.window.name != '') { return; } + if (typeof dadosProcessoPro !== 'undefined') { + mergeAllAndamentosProcesso(callback); + } else { + setTimeout(function(){ + initMergeAllAndamentosProcesso(callback, TimeOut - 100); + console.log('Reload initMergeAllAndamentosProcesso', TimeOut); + }, 500); + } +} function mergeAllAndamentosProcesso(callback = false) { // if (typeof dadosProcessoPro.listAndamento !== 'undefined' && typeof dadosProcessoPro.listAndamento.historico_completo !== 'undefined' && dadosProcessoPro.listAndamento.historico_completo) { // if (typeof callback === 'function') callback(); @@ -5334,31 +6166,35 @@ function mergeAllAndamentosProcesso(callback = false) { if (linkHistorico.length > 0) { var listProc = {processo: processo, id_procedimento: id_procedimento}; getDadosHistoricoUrlPro(linkHistorico[0], listProc, true, function(andamento){ - dadosProcessoPro.listAndamento = andamento; - $.each(dadosProcessoPro.listDocumentos, function(index, value){ - var data_documento = jmespath.search(dadosProcessoPro.listAndamento.andamento, "[?id_documento=='"+value.id_protocolo+"'] | [?contains(descricao, 'Gerado documento')] | [0].datahora"); - data_documento = (data_documento !== null) ? data_documento : false; - var assinatura = jmespath.search(dadosProcessoPro.listAndamento.andamento, "[?id_documento=='"+value.id_protocolo+"'] | [?contains(descricao, 'Assinado')||contains(descricao, 'assinatura')]"); - var data_assinatura = (assinatura !== null) ? assinatura : false; - data_assinatura = (data_assinatura && data_assinatura.length > 0 && typeof data_assinatura[0].descricao !== 'undefined' && data_assinatura[0].descricao.indexOf('Assinado Documento') !== -1) - ? data_assinatura[0].datahora - : dadosProcessoPro.listDocumentos[index]['data_assinatura']; - data_assinatura = (data_assinatura && data_assinatura.length > 0 && typeof data_assinatura[0].descricao !== 'undefined' && data_assinatura[0].descricao.indexOf('Cancelamento de assinatura') !== -1) - ? false - : data_assinatura; - var assinado = (assinatura && assinatura !== null && assinatura.length > 0 && typeof assinatura[0].descricao !== 'undefined' && assinatura[0].descricao.indexOf('Assinado Documento') !== -1) ? true : false; - var unidade = jmespath.search(dadosProcessoPro.listAndamento.andamento, "[?id_documento=='"+value.id_protocolo+"'] | [?contains(descricao, 'Gerado documento')] | [0].unidade"); - unidade = (unidade !== null) ? unidade : false; - - dadosProcessoPro.listDocumentos[index]['unidade'] = unidade; - dadosProcessoPro.listDocumentos[index]['data_assinatura'] = data_assinatura; - dadosProcessoPro.listDocumentos[index]['data_documento'] = data_documento; - dadosProcessoPro.listDocumentos[index]['assinado'] = assinado; - // console.log(index, value.id_protocolo, unidade, dadosProcessoPro.listDocumentos); - }); - dadosProcessoPro.listAndamento.historico_completo = true; - setSessionProcessosPro(dadosProcessoPro); - if (typeof callback === 'function') callback(); + var dadosProcessoPro = (typeof getDadosProcessoSession().listAndamento !== 'undefined') ? getDadosProcessoSession() : dadosProcessoPro; + dadosProcessoPro = (typeof dadosProcessoPro !== 'undefined') ? dadosProcessoPro : {}; + dadosProcessoPro.listAndamento = andamento; + + $.each(dadosProcessoPro.listDocumentos, function(index, value){ + var data_documento = jmespath.search(dadosProcessoPro.listAndamento.andamento, "[?id_documento=='"+value.id_protocolo+"'] | [?contains(descricao, 'Gerado documento')] | [0].datahora"); + data_documento = (data_documento !== null) ? data_documento : false; + var assinatura = jmespath.search(dadosProcessoPro.listAndamento.andamento, "[?id_documento=='"+value.id_protocolo+"'] | [?contains(descricao, 'Assinado')||contains(descricao, 'assinatura')]"); + var data_assinatura = (assinatura !== null) ? assinatura : false; + data_assinatura = (data_assinatura && data_assinatura.length > 0 && typeof data_assinatura[0].descricao !== 'undefined' && data_assinatura[0].descricao.indexOf('Assinado Documento') !== -1) + ? data_assinatura[0].datahora + : dadosProcessoPro.listDocumentos[index]['data_assinatura']; + data_assinatura = (data_assinatura && data_assinatura.length > 0 && typeof data_assinatura[0].descricao !== 'undefined' && data_assinatura[0].descricao.indexOf('Cancelamento de assinatura') !== -1) + ? false + : data_assinatura; + var assinado = (assinatura && assinatura !== null && assinatura.length > 0 && typeof assinatura[0].descricao !== 'undefined' && assinatura[0].descricao.indexOf('Assinado Documento') !== -1) ? true : false; + var unidade = jmespath.search(dadosProcessoPro.listAndamento.andamento, "[?id_documento=='"+value.id_protocolo+"'] | [?contains(descricao, 'Gerado documento')] | [0].unidade"); + unidade = (unidade !== null) ? unidade : false; + + dadosProcessoPro.listDocumentos[index]['unidade'] = unidade; + dadosProcessoPro.listDocumentos[index]['data_assinatura'] = data_assinatura; + dadosProcessoPro.listDocumentos[index]['data_documento'] = data_documento; + dadosProcessoPro.listDocumentos[index]['assinado'] = assinado; + // console.log(index, value.id_protocolo, unidade, dadosProcessoPro.listDocumentos); + }); + dadosProcessoPro.listAndamento.historico_completo = true; + // console.log('->seetSessionProcessosPro', dadosProcessoPro.listAndamento); + setSessionProcessosPro(dadosProcessoPro); + if (typeof callback === 'function') callback(); }); } // } @@ -5530,6 +6366,7 @@ function getBatchActionsPro(this_) { var arrayLinksArvoreAll = _ifrArvore[0].contentWindow.arrayLinksArvoreAll; var arrayIconsView = _ifrArvore[0].contentWindow.arrayIconsView; var doc = arrayLinksArvoreAll.filter(function(v){ return (v.indexOf('acao=arvore_visualizar') !== -1 && v.indexOf('id_documento='+id_documento) !== -1) }); + if (doc.length > 0) { var tr = _table.find('tr[data-index="'+id_documento+'"]'); td_doc = tr.find('td.documento'); @@ -5546,14 +6383,27 @@ function getBatchActionsPro(this_) { listIconsView = (listIconsView === null) ? [] : listIconsView; var checkIconView = listIconsView.filter(function(v){ return v.indexOf(btnData.icon) !== -1 }); - if (btnData.action !== 'documento_alterar' && btnData.action !== 'documento_assinar' && btnData.action !== 'documento_duplicar' && linkAction.length > 0 && checkIconView.length > 0) { + /* + console.log({ + id_documento: id_documento, + select_id_documento: arrayLinksArvoreAll.filter(function(v){ return (v.indexOf('id_documento='+id_documento) !== -1) }), + action: arrayLinksArvoreAll.filter(function(v){ return (v.indexOf(btnData.action) !== -1) }), + btnData:btnData, + linkAction:linkAction, + arrayLinksArvoreAll:arrayLinksArvoreAll, + checkIconView:checkIconView + }); + */ + + if (btnData.action != 'documento_visualizar' && btnData.action != 'documento_alterar' && btnData.action != 'documento_assinar' && btnData.action != 'documento_duplicar' && linkAction.length > 0 && checkIconView.length > 0) { $.ajax({ url: linkAction }).done(function (htmlArvore) { + var dadosProcessoPro = pullDadosProcessoSession(); var id_documento = loopActionsPro.list[loopActionsPro.index]; tr.removeClass('infraTrMarcada').find('i.batchLoading').remove(); tr.find('td.documento').prepend(' '); tr.find('input').prop('checked',false); if (btnData.action == 'documento_excluir') { - dadosProcessoPro.listDocumentos + dadosProcessoPro.listDocumentos; tr.removeClass('documento_excluir').find('input').prop('disabled', true); tr.find('td.icons').html(''); ifrArvore.find('#anchorImg'+id_documento).prev().remove().end().prev().remove(); @@ -5573,6 +6423,7 @@ function getBatchActionsPro(this_) { dadosProcessoPro.listDocumentos[objIndexDoc].data_assinatura = ''; } } + // console.log('->seetSessionProcessosPro', dadosProcessoPro.listAndamento); setSessionProcessosPro(dadosProcessoPro); loopActionsPro.index = loopActionsPro.index+1; @@ -5585,7 +6436,7 @@ function getBatchActionsPro(this_) { initAppendIconsDocumentosActions(); } }); - } else if (btnData.action === 'documento_duplicar' && checkIconView.length > 0) { + } else if (btnData.action == 'documento_duplicar' && checkIconView.length > 0) { var id_documento = loopActionsPro.list[loopActionsPro.index]; function resetDocsActions(){ @@ -5623,7 +6474,7 @@ function getBatchActionsPro(this_) { } else if (typeof id_documento === 'undefined' || typeof loopActionsPro.list[loopActionsPro.index+1] === 'undefined') { resetDocsActions(); } - } else if (btnData.action === 'documento_assinar' && linkAction.length > 0 && checkIconView.length > 0) { + } else if (btnData.action == 'documento_assinar' && linkAction.length > 0 && checkIconView.length > 0) { var orgao = loopActionsPro.assinatura.orgao; var contexto = loopActionsPro.assinatura.contexto; var cargo = loopActionsPro.assinatura.cargo; @@ -5672,11 +6523,13 @@ function getBatchActionsPro(this_) { tr.find('td.data_assinatura').html(data_assinatura); tr.find('input').prop('checked',false); + var dadosProcessoPro = pullDadosProcessoSession(); var objIndexDoc = (typeof dadosProcessoPro.listDocumentos === 'undefined' || dadosProcessoPro.listDocumentos.length == 0) ? -1 : dadosProcessoPro.listDocumentos.findIndex((obj => obj.id_protocolo == id_documento)); if (objIndexDoc !== -1) { dadosProcessoPro.listDocumentos[objIndexDoc].assinatura = assinatura; dadosProcessoPro.listDocumentos[objIndexDoc].data_assinatura = data_assinatura; } + // console.log('->seetSessionProcessosPro', dadosProcessoPro.listAndamento); setSessionProcessosPro(dadosProcessoPro); loopActionsPro.index = loopActionsPro.index+1; @@ -5693,7 +6546,42 @@ function getBatchActionsPro(this_) { } }); }); - } else if (btnData.action === 'documento_alterar' && linkAction.length > 0 && checkIconView.length > 0) { + } else if (btnData.action == 'documento_visualizar' && linkAction.length > 0 && checkIconView.length > 0) { + + var id_documento = loopActionsPro.list[loopActionsPro.index]; + if (typeof id_documento !== 'undefined') { + console.log('*****', loopActionsPro); + var urlLink = linkAction[0]; + var link = document.createElement('a'); + link.href = urlLink; + + if (urlLink.indexOf('documento_download_anexo') === -1) { + link.download = ifrArvore.find('#anchor'+id_documento).text().trim()+'.html'; + } else { + link.download = ifrArvore.find('#anchor'+id_documento).text().trim(); + } + document.body.appendChild(link); + link.click(); + document.body.removeChild(link); + + + tr.removeClass('infraTrMarcada').find('i.batchLoading').remove(); + tr.find('td.documento').prepend(' '); + tr.find('input').prop('checked',false); + + loopActionsPro.index = loopActionsPro.index+1; + if (typeof loopActionsPro.list[loopActionsPro.index] !== 'undefined') { + getBatchActionsPro(this_); + } else { + window.loopActionsPro = {list: [], index: 0, sigilo: {}, assinatura: {}}; + $(this_).find('i').attr('class', $(this_).data('lastclass')); + } + + } else if (typeof id_documento === 'undefined' || typeof loopActionsPro.list[loopActionsPro.index+1] === 'undefined') { + resetDocsActions(); + } + + } else if (btnData.action == 'documento_alterar' && linkAction.length > 0 && checkIconView.length > 0) { var idElement = loopActionsPro.sigilo.element; var hipotese = loopActionsPro.sigilo.hipotese; var text_hipotese = loopActionsPro.sigilo.text; @@ -5718,10 +6606,12 @@ function getBatchActionsPro(this_) { tr.find('td.sigilo').html(text_hipotese); tr.find('input').prop('checked',false); + var dadosProcessoPro = pullDadosProcessoSession(); var objIndexDoc = (typeof dadosProcessoPro.listDocumentos === 'undefined' || dadosProcessoPro.listDocumentos.length == 0) ? -1 : dadosProcessoPro.listDocumentos.findIndex((obj => obj.id_protocolo == id_documento)); if (objIndexDoc !== -1) { dadosProcessoPro.listDocumentos[objIndexDoc].sigilo = text_hipotese; } + // console.log('->seetSessionProcessosPro', dadosProcessoPro.listAndamento); setSessionProcessosPro(dadosProcessoPro); loopActionsPro.index = loopActionsPro.index+1; @@ -5760,6 +6650,12 @@ function getDocumentosActions() { ' '+ ' '+ ' '+ + ' '+ + ' '+ + ' '+ + ' '+ + ' '+ + ' '+ ' '+ ' '+ ' '+ @@ -5833,7 +6729,7 @@ function getDocumentosActions() { .html('
    '+htmlBox+'
    ') .dialog({ title: 'A\u00E7\u00F5es em lote', - width: 1100, + width: $('body').width()-300, height: 650, open: function() { if (typeof $().chosen === 'undefined' && typeof URL_SPRO !== 'undefined') $.getScript(URL_SPRO+"js/lib/chosen.jquery.min.js"); @@ -5877,6 +6773,7 @@ function getDocumentosActions() { setTimeout(function(){ var actionsTable = $('#actionsTablePro'); actionsTable.tablesorter({ + sortLocaleCompare : true, textExtraction: { 4: function (elem, table, cellIndex) { var text_date = $(elem).text() != '' ? moment($(elem).text(), 'DD/MM/YYYY').format('YYYY-MM-DD') : false; @@ -5944,6 +6841,7 @@ function getDocumentosActions() { $('#iconsActions').find('.'+class_icon).find('.fa-layers-counter').hide(); } } + updateCountIcon(_parent, 'documento_visualizar'); updateCountIcon(_parent, 'documento_ciencia'); updateCountIcon(_parent, 'documento_excluir'); updateCountIcon(_parent, 'documento_alterar'); @@ -6023,6 +6921,10 @@ function setAppendIconsDocumentosActions() { htmlIcon += '
    '; classIcon += 'documento_ciencia '; } + if (iconList.filter(function(v){ return v.indexOf('consultar') !== -1 }).length > 0) { + htmlIcon += ' '; + classIcon += 'documento_visualizar '; + } if (iconList.filter(function(v){ return (v.indexOf('sei_consultar_alterar_protocolo') !== -1 || v.indexOf('documento_alterar') !== -1) }).length > 0) { htmlIcon += ' '; classIcon += 'documento_alterar '; @@ -6078,6 +6980,14 @@ function setCapaProcesso(loop = true) { dataNivelAcesso = (typeof prop !== 'undefined' && typeof prop.rdoNivelAcesso !== 'undefined' && prop.rdoNivelAcesso == '2') ? {name: 'Sigiloso', icon: 'fas fa-user-slash'} : dataNivelAcesso; var htmlInfoProc = ifrVisualizacao.find(divInformacao).html(); + var checkBlocoInterno = (typeof $('#ifrArvore')[0] !== 'undefined' && typeof $('#ifrArvore')[0].contentWindow.selectedItensPanelArvore !== 'undefined' && $.inArray("Bloco Interno",jmespath.search($('#ifrArvore')[0].contentWindow.selectedItensPanelArvore,"[]")) !== -1) ? true : false; + var blocoProcesso = checkBlocoInterno ? initBlocoProcessoHistorico() : false; + var dadosProcessoP = typeof getDadosProcessoSession() !== 'undefined' ? getDadosProcessoSession() : false; + var descBlocoInterno = (typeof blocoProcesso !== 'undefined' && blocoProcesso !== null) + ? (typeof blocoProcesso !== 'undefined' && blocoProcesso.length > 0 && typeof blocoProcesso[0].descricao !== 'undefined') ? blocoProcesso[0].descricao : false + : false; + descBlocoInterno = (typeof blocoProcesso !== 'undefined' && blocoProcesso !== null && blocoProcesso.length == 0 && typeof dadosProcessoP.listAndamento !== 'undefined' && dadosProcessoP.listAndamento.historico_completo) ? 'Nenhum bloco localizado' : descBlocoInterno; + var htmlMarcador = getHtmlMarcador(id_procedimento, false); var iconMarcador = htmlMarcador.icon; var linkPrazo = htmlMarcador.prazo; @@ -6160,6 +7070,14 @@ function setCapaProcesso(loop = true) { '')+ '
    '+ '
'+ + (descBlocoInterno ? + '
'+ + '
Bloco Interno:
'+ + '
'+ + ' '+descBlocoInterno+''+ + '
'+ + '
'+ + '' : '')+ '
'+ '
Observa\u00E7\u00F5es:
'+ '
'+ @@ -6167,7 +7085,7 @@ function setCapaProcesso(loop = true) { $.map(prop.txaObservacoes, function(v){ return '' }).join('') : // ' '+prop.txtDescricao+'' : '')+ - '
'+ + '
'+ '
'+ '
'; @@ -6378,15 +7296,21 @@ function setResizeIfrArvore() { console.log(ifrArvore.width(), ifrVisualizacao.width()); } } +function _infraTooltipMostrar(_this, text) { + if (!$(_this).find('.text').is(':visible')) { + infraTooltipMostrar(text); + } +} function setResizeAreaTelaD() { if ($('.panelHomePro').is(':visible')) { var width = $('.panelHomePro:visible').width() - ( $('.panelHomePro:visible').width()*0.02 ); $('.resizeObserve:visible').css('width', width); } if ($('#atividadesProActions').length > 0 && $('#atividadesProActions').is(':visible')) { - $('.atividadesBtnPanel .text').show(); + $('#atividadesPro').removeClass('minView'); + if ($('#atividadesProActions').height() > 40) { - $('.atividadesBtnPanel .text').hide(); + $('#atividadesPro').addClass('minView'); } } } @@ -6530,7 +7454,9 @@ function filterTablePro(this_) { filter.removeClass('hideme'); _this.addClass('active'); setTimeout(function(){ - filter.find('input:visible').eq(0).focus(); + filter.find('input:visible').map(function(){ + if ($(this).visible(false, true)) { return this } + }).eq(0).focus(); },500); } } @@ -6575,6 +7501,9 @@ function setHistoryProcessosPro(dadosProcessoPro) { localStorageStorePro('dadosHistoricoProcessoPro', dadosHistoricoProcessoPro); } +function pullDadosProcessoSession() { + return getDadosProcessoSession() ? getDadosProcessoSession() : dadosProcessoPro; +} function getDadosProcessoSession() { var id_procedimento = getParamsUrlPro($('#ifrArvore').attr('src')).id_procedimento; var dadosSessionProcessoPro = sessionStorageRestorePro('dadosSessionProcessoPro'); @@ -6585,7 +7514,7 @@ function setSessionProcessosPro(dadosProcessoPro) { var dadosProcessoPro_push = dadosProcessoPro; var dadosSessionProcessoPro = sessionStorageRestorePro('dadosSessionProcessoPro'); - var id_procedimento = (typeof dadosProcessoPro_push.propProcesso !== 'undefined' && typeof dadosProcessoPro_push.propProcesso.hdnIdProcedimento !== 'undefined') ? dadosProcessoPro_push.propProcesso.hdnIdProcedimento : getParamsUrlPro(window.location.href).id_procedimento; + var id_procedimento = (typeof dadosProcessoPro_push.propProcesso !== 'undefined' && typeof dadosProcessoPro_push.propProcesso.hdnIdProcedimento !== 'undefined') ? dadosProcessoPro_push.propProcesso.hdnIdProcedimento : (getParamsUrlPro(window.location.href).id_procedimento ? getParamsUrlPro(window.location.href).id_procedimento : undefined); id_procedimento = (typeof id_procedimento === 'undefined') ? getParamsUrlPro(window.location.href).id_protocolo : id_procedimento; id_procedimento = (typeof id_procedimento === 'undefined') ? getParamsUrlPro($('#ifrArvore').attr('src')).id_procedimento : id_procedimento; /* @@ -6603,9 +7532,9 @@ function setSessionProcessosPro(dadosProcessoPro) { for (i = 0; i < dadosSessionProcessoPro.length; i++) { if( i > 500 || ( - typeof dadosSessionProcessoPro[i].propProcesso !== 'undefined' && - typeof dadosSessionProcessoPro[i].propProcesso.hdnIdProcedimento !== 'undefined' && - dadosSessionProcessoPro[i].propProcesso.hdnIdProcedimento == id_procedimento + (typeof dadosSessionProcessoPro[i].propProcesso !== 'undefined' && typeof dadosSessionProcessoPro[i].propProcesso.hdnIdProcedimento !== 'undefined' && dadosSessionProcessoPro[i].propProcesso.hdnIdProcedimento == id_procedimento) + || + (typeof dadosSessionProcessoPro[i].listAndamento !== 'undefined' && dadosSessionProcessoPro[i].listAndamento.id_procedimento == id_procedimento) ) ) { dadosSessionProcessoPro.splice(i,1); @@ -6619,7 +7548,6 @@ function setSessionProcessosPro(dadosProcessoPro) { } else { dadosSessionProcessoPro = [dadosProcessoPro_push]; } - sessionStorageStorePro('dadosSessionProcessoPro', dadosSessionProcessoPro); } function updateTitlePage(mode, dadosProcesso = false) { @@ -7663,8 +8591,9 @@ function openEditorViewDoc(paramData, paramTarget, dataResult) { updateButtonConfirm(this, true); var textEncode = (is_html(paramData.text)) ? paramData.text : $("
").html(paramData.text).text(); if (paramData.reference == 'modelo' && paramTarget.return_sign) { - var user = (typeof paramTarget.return_user !== 'undefined' && paramTarget.return_user) ? paramTarget.return_user : false - textEncode = setParamEditorAtiv(paramData.mode, textEncode, user); + var user = (typeof paramTarget.return_user !== 'undefined' && paramTarget.return_user) ? paramTarget.return_user : false; + var id_reference = (typeof paramTarget.id_reference !== 'undefined' && paramTarget.id_reference) ? paramTarget.id_reference : false; + textEncode = setParamEditorAtiv(paramData.mode, textEncode, user, id_reference); } $('#view_doc').html(textEncode); if (paramTarget.return_sign) { @@ -7678,7 +8607,7 @@ function openEditorViewDoc(paramData, paramTarget, dataResult) { } } function printDocumento() { - var htmlPrint = $('#view_doc').html()+$('.signed')[0].outerHTML; + var htmlPrint = ($('.signed').length) ? $('#view_doc').html()+$('.signed')[0].outerHTML : $('#view_doc').html(); $('#printBoxPro').addClass('hidePrint').html(htmlPrint); $('.infraAreaGlobal').addClass('hidePrint'); @@ -7768,9 +8697,16 @@ function loadFunctionEditorView(this_) { }); if (typeof $.mask !== 'undefined') { if (_parent.find("input[data-key='tel_celular']").length > 0) { - _parent.find("input[data-key='tel_celular']").mask("(99) 99999-999?9", {completed: function () { + _parent.find("input[data-key='tel_celular']").mask("+99 (99) 99999-999?9", {placeholder: '+55 (__) _____-____', completed: function () { this.removeClass('requiredNull'); - }}); + }}).on('focus', function(){ + setTimeout(() => { + console.log($(this).val(),'focus'); + if ($(this).val() == '+55 (__) _____-____') { + setCaretPosition(this, 5); + } + }, 1000); + }); } if (_parent.find("input[data-key='tel_residencial']").length > 0) { _parent.find("input[data-key='tel_residencial']").mask("(99) 9999-9999"); @@ -8083,11 +9019,13 @@ function updateDialogDefinitionPro() { }); } function centralizeDialogBox(el) { - $(document).ready(function() { - if (el) { - el.dialog({ position: { my: "center", at: "center", of: window } }); - } - }); + if (!dialogIsDraggable) { + $(document).ready(function() { + if (el) { + el.dialog({ position: { my: "center", at: "center", of: window } }); + } + }); + } } function selectTextPro(el) { var sel, range; @@ -8302,7 +9240,6 @@ function getHolidayBetweenDates(date, dateTo, addHolidays = false){ } return datesHoliday; } - function noNotifyPro(this_) { var _this = $(this_); var _parent = _this.closest('.no_notifyPro'); @@ -8384,8 +9321,14 @@ function setNewDocDefault() { } } function formControlerAlterarDocumento(ifrVisualizacao) { - ifrVisualizacao.find('button[name="btnSalvar"]').unbind().removeAttr('onclick').on('click', function() { - var _this = $(this); + ifrVisualizacao.find('#frmDocumentoCadastro').attr('onsubmit', 'return OnSubmitForm();parent.confirmaDadosUrgencia(this);'); +} +function confirmaDadosUrgencia(_this) { + if (delayCrash) return false; + delayCrash = true; + setTimeout(function(){ delayCrash = false }, 300); + + var _this = $(_this); var contentW = $('#ifrVisualizacao')[0].contentWindow; var _parent = _this.closest('body'); var oldText = _parent.find('#txtNumero').attr('data-oldtext'); @@ -8398,8 +9341,8 @@ function formControlerAlterarDocumento(ifrVisualizacao) { var nrSEI = $('#ifrArvore').contents().find('.infraArvoreNoSelecionado').eq(0); nrSEI = (typeof nrSEI !== 'undefined' && nrSEI !== null) ? getNrSei(nrSEI.text().trim()) : ''; - if (contentW.OnSubmitForm()) { - contentW.submeter(); + if (typeof contentW !== 'undefined' && typeof contentW.OnSubmitForm === 'function' && contentW.OnSubmitForm()) { + // contentW.submeter(); var sendAutomaticActions = []; sendAutomaticActions[0] = {name: 'urgencia_documento', method: methodSend, send: checkSend, value: nrSEI, run: false, index: 0}; parent.window.sendAutomaticActions = sendAutomaticActions; @@ -8416,7 +9359,7 @@ function formControlerAlterarDocumento(ifrVisualizacao) { } */ } - }); + } function insertIconBatchActions() { waitLoadPro($('#ifrVisualizacao').contents(), '#divArvoreAcoes', 'a[href*="controlador.php?acao="]', appendIconBatchActions); @@ -8564,12 +9507,12 @@ function setReplaceSelectAllVisualizacao() { var target = $('#ifrVisualizacao').contents(); if (typeof $().chosen !== 'undefined') { target.find('select').chosen('destroy'); - target.find('select').not('[multiple]').not('[size]').filter(function() { + target.find('select').not('[multiple]').not('#selSerie').not('[size]').filter(function() { return !($(this).css('visibility') == 'hidden' || $(this).css('display') == 'none') }).chosen({ placeholder_text_single: ' ', no_results_text: 'Nenhum resultado encontrado' - }); + }) chosenReparePosition(target); target.find('.infraAreaDados').css('overflow','initial'); target.find('select').not('[multiple]').eq(0).trigger('chosen:activate'); @@ -8577,18 +9520,14 @@ function setReplaceSelectAllVisualizacao() { } } function replaceSelectAllVisualizacao(TimeOut = 9000) { - if (TimeOut <= 0) { return; } - if (typeof $().chosen !== 'undefined') { - setReplaceSelectAllVisualizacao(); - } else { - if (typeof $().chosen === 'undefined' && typeof URL_SPRO !== 'undefined') { - $.getScript(URL_SPRO+"js/lib/chosen.jquery.min.js"); - console.log('@load chosen'); - } - setTimeout(function(){ - replaceSelectAllVisualizacao(TimeOut - 100); - console.log('Reload replaceSelectAllVisualizacao'); - }, 500); + var ifrVisualizacao = $('#ifrVisualizacao')[0]; + var ifrVisualizacaoWindow = ifrVisualizacao.contentWindow; + if (typeof ifrVisualizacaoWindow !== 'undefined' && typeof ifrVisualizacaoWindow.$().chosen === 'undefined' ) { + getScriptIframe(ifrVisualizacao, URL_SPRO+"js/lib/chosen.jquery.min.js", function(){ + getScriptIframe(ifrVisualizacao, URL_SPRO+"js/sei-pro-visualizacao-chosen.js", function(){ + if (typeof ifrVisualizacaoWindow.replaceSelectOnVisualizacao !== 'undefined') ifrVisualizacaoWindow.replaceSelectOnVisualizacao(); + }); + }); } } function insertActionHipoteseLegal() { @@ -9338,47 +10277,48 @@ if (verifyConfigValue('menususpenso')) { infraTooltipOcultar(); if (bolInicializar){ - //le do cookie - if (infraLerCookie(prefixoCookie+'_menu_mostrar')!='N'){ - tamanhoDados = document.getElementById("divInfraAreaTelaD").offsetWidth/document.getElementById("divInfraAreaTela").offsetWidth; - tamanhoDados = Math.floor(tamanhoDados*Math.pow(10,2)); - infraCriarCookie(prefixoCookie+'_menu_tamanho_dados',tamanhoDados,1); - title = 'Ocultar'; - } else { - title = 'Exibir'; - } - } else { - if (tipo == undefined || tipo == null) { - if (document.getElementById('divInfraAreaTelaE').style.display == ''){ - tipo = 'Ocultar'; + //le do cookie + if (infraLerCookie(prefixoCookie+'_menu_mostrar')!='N'){ + tamanhoDados = document.getElementById("divInfraAreaTelaD").offsetWidth/document.getElementById("divInfraAreaTela").offsetWidth; + tamanhoDados = Math.floor(tamanhoDados*Math.pow(10,2)); + infraCriarCookie(prefixoCookie+'_menu_tamanho_dados',tamanhoDados,1); + title = 'Ocultar'; } else { - tipo = 'Exibir'; + title = 'Exibir'; } - } - if (tipo == 'Ocultar' || (getOptionsPro('panelMenuSistemaView') !== false && !$('#divInfraBarraSistemaE').hasClass('barSuspenso'))) { - document.getElementById('divInfraAreaTelaE').style.display='none'; - document.getElementById('divInfraAreaTelaD').style.width = '99%'; - infraCriarCookie(prefixoCookie+'_menu_mostrar','N',1); - title = 'Exibir'; - if ($('#divInfraBarraSistemaE').hasClass('barSuspenso')) removeOptionsPro('panelMenuSistemaView'); - if (getOptionsPro('panelMenuSistemaView')) setMenuSistemaView(); } else { - setMenuSistemaView(true); - removeOptionsPro('panelMenuSistemaView'); + if (tipo == undefined || tipo == null) { + if (document.getElementById('divInfraAreaTelaE').style.display == ''){ + tipo = 'Ocultar'; + } else { + tipo = 'Exibir'; + } + } + if (tipo == 'Ocultar' || (getOptionsPro('panelMenuSistemaView') !== false && !$('#divInfraBarraSistemaE').hasClass('barSuspenso'))) { + document.getElementById('divInfraAreaTelaE').style.display='none'; + document.getElementById('divInfraAreaTelaD').style.width = '99%'; + infraCriarCookie(prefixoCookie+'_menu_mostrar','N',1); + title = 'Exibir'; + if ($('#divInfraBarraSistemaE').hasClass('barSuspenso')) removeOptionsPro('panelMenuSistemaView'); + if (getOptionsPro('panelMenuSistemaView')) setMenuSistemaView(); + } else { + setMenuSistemaView(true); + removeOptionsPro('panelMenuSistemaView'); - tamanhoDados = infraLerCookie(prefixoCookie+'_menu_tamanho_dados'); - document.getElementById('divInfraAreaTelaE').style.display=''; + tamanhoDados = infraLerCookie(prefixoCookie+'_menu_tamanho_dados'); + document.getElementById('divInfraAreaTelaE').style.display=''; - if (tamanhoDados == null) tamanhoDados = infraClientWidth() * 0.80; + if (tamanhoDados == null) tamanhoDados = infraClientWidth() * 0.80; - document.getElementById('divInfraAreaTelaD').style.width = tamanhoDados+'%'; - infraCriarCookie(prefixoCookie+'_menu_mostrar','S',1); - title = 'Ocultar'; - } - if (tipo == 'Ocultar') setOptionsPro('panelMenuSistemaView', 'active'); - infraResize(); - checkMenuSistemaView(); + document.getElementById('divInfraAreaTelaD').style.width = tamanhoDados+'%'; + infraCriarCookie(prefixoCookie+'_menu_mostrar','S',1); + title = 'Ocultar'; + } + if (tipo == 'Ocultar') setOptionsPro('panelMenuSistemaView', 'active'); + infraResize(); + checkMenuSistemaView(); } + // console.log('***** infraMenuSistemaEsquema',bolInicializar, tipo, prefixoCookie, tamanhoDados, window.name); } } function setInfraImg(target = $('html')) { @@ -9398,6 +10338,24 @@ function initModalNewSEISigiloso(TimeOut = 1000) { } } function fnJqueryPro() { + if (typeof $.tablesorter !== 'undefined') { + $.tablesorter.characterEquivalents = { + 'a' : '\u00e1\u00e0\u00e2\u00e3\u00e4\u0105\u00e5', // áàâãäąå + 'A' : '\u00c1\u00c0\u00c2\u00c3\u00c4\u0104\u00c5', // ÁÀÂÃÄĄÅ + 'c' : '\u00e7\u0107\u010d', // çćč + 'C' : '\u00c7\u0106\u010c', // ÇĆČ + 'e' : '\u00e9\u00e8\u00ea\u00eb\u011b\u0119', // éèêëěę + 'E' : '\u00c9\u00c8\u00ca\u00cb\u011a\u0118', // ÉÈÊËĚĘ + 'i' : '\u00ed\u00ec\u0130\u00ee\u00ef\u0131', // íìİîïı + 'I' : '\u00cd\u00cc\u0130\u00ce\u00cf', // ÍÌİÎÏ + 'o' : '\u00f3\u00f2\u00f4\u00f5\u00f6\u014d', // óòôõöō + 'O' : '\u00d3\u00d2\u00d4\u00d5\u00d6\u014c', // ÓÒÔÕÖŌ + 'ss': '\u00df', // ß (s sharp) + 'SS': '\u1e9e', // ẞ (Capital sharp s) + 'u' : '\u00fa\u00f9\u00fb\u00fc\u016f', // úùûüů + 'U' : '\u00da\u00d9\u00db\u00dc\u016e' // ÚÙÛÜŮ + }; + } $.fn.wrapInTag = function (opts) { function getText(obj) { return obj.textContent ? obj.textContent : obj.innerText; @@ -9473,4 +10431,71 @@ function fnJqueryPro() { if (isNewSEI) $('body').addClass('newSEI'); initModalNewSEISigiloso(); } -$(document).ready(function () { fnJqueryPro() }); \ No newline at end of file +$(document).ready(function () { fnJqueryPro() }); + + +function loadStyleDesign(body = $('body'), secondClass = false) { + if (localStorage.getItem('seiSlim')) { + body.addClass("seiSlim"); + if (secondClass) body.addClass("seiSlim_"+secondClass); + if (localStorage.getItem('darkModePro')) { + body.addClass("dark-mode"); + } + } +} +function loadScriptVisualizacaoPro() { + if ( $('#ifrVisualizacao').length ) { + $('#ifrVisualizacao').on("load", function() { + var ifrVisualizacao = $('#ifrVisualizacao').contents(); + /* + if (ifrVisualizacao.find('script[data-config="config-seipro-visualizacao"]').length == 0) { + var iframeObjVisualizacao = ifrVisualizacao.find('head'); + var scriptVisualizacao = ""; + $(scriptVisualizacao).prependTo(iframeObjVisualizacao); + } + */ + if (typeof loadStyleDesign === 'function') loadStyleDesign(ifrVisualizacao.find('body'), 'view'); + if (typeof loadFontIcons === 'function') loadFontIcons('head', ifrVisualizacao); + if (typeof checkPageVisualizacao === 'function') checkPageVisualizacao(); + if (typeof checkPageAtividadesVisualizacao === 'function') checkPageAtividadesVisualizacao(); + if (typeof checkPageFavoritosVisualizacao === 'function') checkPageFavoritosVisualizacao(); + }); + } +} + +function loadScriptArvorePro() { + if ( $('#ifrArvore').length ) { + $('#ifrArvore').on("load", function() { + initLoadSeiProArvore(); + }); + } +} +function initLoadSeiProArvore(TimeOut = 1000) { + if (TimeOut <= 0) { return; } + if (typeof $('#ifrArvore')[0].contentWindow.initSeiProArvore !== 'undefined' ) { + execArvorePro($('#ifrArvore')[0].contentWindow.initSeiProArvore); + } else { + setTimeout(function(){ + initLoadSeiProArvore(TimeOut - 100); + console.log('Reload initLoadSeiProArvore'); + }, 500); + } +} +function loadScriptPro() { + if ( $('#frmEditor').length || $('#divEditores').length ) { + } else { + $(document).ready(function () { + loadScriptVisualizacaoPro(); + loadScriptArvorePro(); + + setTimeout(function(){ + if (CLIENT_ID_PRO) loadAPIGooglePro(); + }, 1000); + }); + } +} +loadScriptPro(); \ No newline at end of file diff --git a/dist/js/sei-legis.js b/dist/js/sei-legis.js index da9bc43..0644790 100755 --- a/dist/js/sei-legis.js +++ b/dist/js/sei-legis.js @@ -28,9 +28,11 @@ var romanToInt = function(s) { function removeAcentos(str) { return str.normalize("NFD").replace(/[\u0300-\u036f]/g, ""); } +/* function capitalizeFirstLetter(string) { return string.charAt(0).toUpperCase() + string.slice(1); } +*/ function uniq(a) { return a.sort().filter(function(item, pos, ary) { return !pos || item != ary[pos - 1]; diff --git a/dist/js/sei-pro-all.js b/dist/js/sei-pro-all.js index 4d5d076..4ca75e0 100644 --- a/dist/js/sei-pro-all.js +++ b/dist/js/sei-pro-all.js @@ -90,7 +90,7 @@ function initHideMenuSistemaView(TimeOut = 9000) { function initSetMomentPtBr(TimeOut = 9000) { if (TimeOut <= 0) { return; } else if (TimeOut < 7000) { - $.getScript(URL_SPRO+"js/lib/moment.min.js"); + if (typeof URL_SPRO !== 'undefined') $.getScript(URL_SPRO+"js/lib/moment.min.js"); } if (typeof moment !== 'undefined' && typeof setMomentPtBr !== 'undefined') { setMomentPtBr(); @@ -110,7 +110,7 @@ function initTableSorter(TimeOut = 9000) { } } else { setTimeout(function(){ - if (typeof $().tablesorter === 'undefined' && TimeOut == 9000) { $.getScript((URL_SPRO+"js/lib/jquery.tablesorter.combined.min.js")) } + if (typeof $().tablesorter === 'undefined' && TimeOut == 9000 && typeof URL_SPRO !== 'undefined') { $.getScript((URL_SPRO+"js/lib/jquery.tablesorter.combined.min.js")) } initTableSorter(TimeOut - 100); console.log('Reload initTableSorter'); }, 500); @@ -222,6 +222,7 @@ function setTableSorter() { }; $(this).tablesorter({ + sortLocaleCompare : true, widgets: ["saveSort", "filter"], widgetOptions: { saveSort: true, @@ -382,7 +383,7 @@ function setTablePesquisaDownload() { var tablePesquisa = $(frmPesquisaProtocolo).find('#conteudo'); tablePesquisa.css('position','relative').find('.filterIfraTable').remove(); tablePesquisa.prepend(htmlFilter); - $.getScript(URL_SPRO+"js/lib/moment.min.js"); + if (typeof URL_SPRO !== 'undefined') $.getScript(URL_SPRO+"js/lib/moment.min.js"); } function initTablePesquisaDownload() { var resultado = $(frmPesquisaProtocolo).find('#conteudo table.resultado'); @@ -430,6 +431,20 @@ function setAppendIconFavorites() { }); } } +function setOnClickExcluirProcBloco() { + var table = $('#frmRelBlocoProtocoloLista .infraTable'); + if (table.length > 0) { + table.find('a[onclick*="acaoExcluir("]').on('click', function(event){ + var id_procedimento = $(event.currentTarget).attr('href').split('-')[1]; + var listProcessos = sessionStorageRestorePro('dadosSessionProcessoPro'); + var objIndexDoc = (!listProcessos) ? -1 : listProcessos.findIndex((obj => obj.listAndamento.id_procedimento == String(id_procedimento))); + if (objIndexDoc !== -1) { + listProcessos[objIndexDoc].listAndamento.historico_completo = false; + sessionStorageStorePro('dadosSessionProcessoPro', listProcessos); + } + }); + } +} function loadScriptEntidade() { // $.getScript(URL_SPRO+"js/sei-pro-icons.js"); /* @@ -478,12 +493,10 @@ function initReplaceSelectAll(TimeOut = 12000) { no_results_text: 'Nenhum resultado encontrado' }); chosenReparePosition(); - console.log('@@@@ initReplaceSelectAll'); } } else { if (typeof $().chosen === 'undefined') { - $.getScript(URL_SPRO+"js/lib/chosen.jquery.min.js"); - console.log('@load chosen'); + if (typeof URL_SPRO !== 'undefined') $.getScript(URL_SPRO+"js/lib/chosen.jquery.min.js"); } setTimeout(function(){ initReplaceSelectAll(TimeOut - 100); @@ -493,7 +506,7 @@ function initReplaceSelectAll(TimeOut = 12000) { } function appendVersionSEIPro() { var logoSEI = $('#divInfraBarraSistemaE img[src*="sei_logo"]'); - if (!logoSEI.hasClass('versionSEIPro')) { + if (typeof NAMESPACE_SPRO !== 'undefined' && !logoSEI.hasClass('versionSEIPro')) { logoSEI.attr('title', logoSEI.attr('title', )+' ('+NAMESPACE_SPRO+': Vers\u00E3o '+VERSION_SPRO+')').addClass('versionSEIPro'); } } @@ -802,7 +815,7 @@ function initInfraImg(TimeOut = 9000) { } } function initQRCodeLib() { - if ($('#ifrArvore').length > 0 && typeof $().qrcode !== 'function' ) { + if ($('#ifrArvore').length > 0 && typeof $().qrcode !== 'function' && typeof URL_SPRO !== 'undefined') { $.getScript(URL_SPRO+"js/lib/jquery-qrcode-0.18.0.min.js"); } } @@ -831,6 +844,7 @@ function initSeiProAll() { //checkBlankPageSEI(); initCheckLoadJqueryUI(); initQRCodeLib(); + setOnClickExcluirProcBloco(); console.log('initSeiProAll'); } $(document).ready(function () { initSeiProAll() }); \ No newline at end of file diff --git a/dist/js/sei-pro-arvore.js b/dist/js/sei-pro-arvore.js index a7c403f..72c1ab9 100644 --- a/dist/js/sei-pro-arvore.js +++ b/dist/js/sei-pro-arvore.js @@ -22,10 +22,33 @@ function initCSSArvore() { +""); } } +function dropzoneCancelInfo(e) { + if (typeof e !== 'undefined'){ + e.stopImmediatePropagation(); + } + $(containerUpload).removeClass('dz-drag-hover'); + return false; +} +function encodeUrlUploadArvore(response, params) { + var id = response[0]; + var nome = response[1]; + var dthora = response[4]; + var tamanho = response[3]; + var tamanho_formatado = infraFormatarTamanhoBytes(parseInt(tamanho)); + var plus = '\u00B1'; + var hdnAnexos = id+plus+nome+plus+dthora+plus+tamanho+plus+tamanho_formatado+plus+params.userUnidade.user+plus+params.userUnidade.unidade; + hdnAnexos = (hdnAnexos.indexOf(' ') !== -1) ? hdnAnexos.replace(/ /g,'+') : hdnAnexos; + hdnAnexos = encodeURIComponent(hdnAnexos); + hdnAnexos = (hdnAnexos.indexOf('%C2') !== -1) ? hdnAnexos.replace(/%C2/g,'') : hdnAnexos; + hdnAnexos = (hdnAnexos.indexOf('%2B') !== -1) ? hdnAnexos.replace(/%2B/g,'+') : hdnAnexos; + + console.log(hdnAnexos); + return hdnAnexos; +} function initToolbarDocs(TimeOut = 9000) { if (TimeOut <= 0) { return; } - if (typeof jmespath !== 'undefined') { + if (typeof jmespath !== 'undefined' && typeof typeof $().toolbar !== 'undefined') { setToolbarDocs(); } else { setTimeout(function(){ @@ -36,10 +59,10 @@ function initToolbarDocs(TimeOut = 9000) { } } function setToolbarDocs() { - var selectedItensMenu = ( typeof localStorageRestorePro('configViewFlashMenuPro') !== 'undefined' && !$.isEmptyObject(localStorageRestorePro('configViewFlashMenuPro')) ) ? localStorageRestorePro('configViewFlashMenuPro') : [['Copiar n\u00FAmero do processo'],['Copiar link do processo'],['Enviar Documento Externo'],['A\u00E7\u00F5es em lote'],['Atribuir Processo']]; + var selectedItensMenu = ( typeof localStorageRestorePro('configViewFlashMenuPro') !== 'undefined' && !$.isEmptyObject(localStorageRestorePro('configViewFlashMenuPro')) ) ? localStorageRestorePro('configViewFlashMenuPro') : [['Copiar n\u00FAmero do processo'],['Copiar link do processo'],['Enviar Documento Externo'],['A\u00E7\u00F5es em lote'],['Atribuir Processo'],['Add/Remover Urg\u00EAncia']]; var selectedItensDocMenu = ( typeof localStorageRestorePro('configViewFlashDocMenuPro') !== 'undefined' && !$.isEmptyObject(localStorageRestorePro('configViewFlashDocMenuPro')) ) ? localStorageRestorePro('configViewFlashDocMenuPro') : [['Copiar n\u00FAmero SEI'],['Copiar nome do documento'],['Copiar link do documento'],['Duplicar documento'],['Copiar para...']]; var selectedItensDocArvore = ( typeof localStorageRestorePro('configViewFlashDocArvorePro') !== 'undefined' && !$.isEmptyObject(localStorageRestorePro('configViewFlashDocArvorePro')) ) ? localStorageRestorePro('configViewFlashDocArvorePro') : [["Copiar n\u00FAmero SEI"],["Copiar link do documento"],["Duplicar documento"]]; - selectedItensPanelArvore = ( typeof localStorageRestorePro('configViewFlashPanelArvorePro') !== 'undefined' && !$.isEmptyObject(localStorageRestorePro('configViewFlashPanelArvorePro')) ) ? localStorageRestorePro('configViewFlashPanelArvorePro') : [["Anota\u00E7\u00F5es"],["Marcador"],["Tipo de Procedimento"],["Assuntos"],["Interessados"],["Atribui\u00E7\u00E3o"],["N\u00EDvel de Acesso"],["Observa\u00E7\u00F5es"]]; + selectedItensPanelArvore = ( typeof localStorageRestorePro('configViewFlashPanelArvorePro') !== 'undefined' && !$.isEmptyObject(localStorageRestorePro('configViewFlashPanelArvorePro')) ) ? localStorageRestorePro('configViewFlashPanelArvorePro') : [["Anota\u00E7\u00F5es"],["Marcador"],["Acompanhamento Especial"],["Tipo de Procedimento"],["Assuntos"],["Interessados"],["Atribui\u00E7\u00E3o"],["N\u00EDvel de Acesso"],["Observa\u00E7\u00F5es"]]; var htmlToolbarProc = '