PageSourceSearch

https://www.conexaoambiental.pr.gov.br/sites/conexao-ambiental/arq…-V802l4JRlnX7wpaEeCoPN217wcqW7wXr5HNGbro.js

js conexaoambiental.pr.gov.br collected 2026-10-02 13:43:37 UTC 27,867 bytes, 730 lines download raw bytes

1/**
2 * @file
3 * Bootstrap Popovers.
4 */
5
6var Drupal = Drupal || {};
7
8(function ($, Drupal, Bootstrap) {
9  "use strict";
10
11  var $document = $(document);
12
13  /**
14   * Extend the Bootstrap Popover plugin constructor class.
15   */
16  Bootstrap.extendPlugin('popover', function (settings) {
17    return {
18      DEFAULTS: {
19        animation: !!settings.popover_animation,
20        autoClose: !!settings.popover_auto_close,
21        enabled: settings.popover_enabled,
22        html: !!settings.popover_html,
23        placement: settings.popover_placement,
24        selector: settings.popover_selector,
25        trigger: settings.popover_trigger,
26        title: settings.popover_title,
27        content: settings.popover_content,
28        delay: parseInt(settings.popover_delay, 10),
29        container: settings.popover_container
30      }
31    };
32  });
33
34  /**
35   * Bootstrap Popovers.
36   *
37   * @todo This should really be properly delegated if selector option is set.
38   */
39  Drupal.behaviors.bootstrapPopovers = {
40    $activePopover: null,
41    attach: function (context) {
42      // Immediately return if popovers are not available.
43      if (!$.fn.popover || !$.fn.popover.Constructor.DEFAULTS.enabled) {
44        return;
45      }
46
47      var _this = this;
48
49      $document
50        .on('show.bs.popover', '[data-toggle=popover]', function () {
51          var $trigger = $(this);
52          var popover = $trigger.data('bs.popover');
53
54          // Only keep track of clicked triggers that we're manually handling.
55          if (popover.options.originalTrigger === 'click') {
56            if (_this.$activePopover && _this.getOption('autoClose') && !_this.$activePopover.is($trigger)) {
57              _this.$activePopover.popover('hide');
58            }
59            _this.$activePopover = $trigger;
60          }
61        })
62        // Unfortunately, :focusable is only made available when using jQuery
63        // UI. While this would be the most semantic pseudo selector to use
64        // here, jQuery UI may not always be loaded. Instead, just use :visible
65        // here as this just needs some sort of selector here. This activates
66        // delegate binding to elements in jQuery so it can work it's bubbling
67        // focus magic since elements don't really propagate their focus events.
68        // @see https://www.drupal.org/project/bootstrap/issues/3013236
69        .on('focus.bs.popover', ':visible', function (e) {
70          var $target = $(e.target);
71          if (_this.$activePopover && _this.getOption('autoClose') && !_this.$activePopover.is($target) && !$target.closest('.popover.in')[0]) {
72            _this.$activePopover.popover('hide');
73            _this.$activePopover = null;
74          }
75        })
76        .on('click.bs.popover', function (e) {
77          var $target = $(e.target);
78          if (_this.$activePopover && _this.getOption('autoClose') && !$target.is('[data-toggle=popover]') && !$target.closest('.popover.in')[0]) {
79            _this.$activePopover.popover('hide');
80            _this.$activePopover = null;
81          }
82        })
83        .on('keyup.bs.popover', function (e) {
84          if (_this.$activePopover && _this.getOption('autoClose') && e.which === 27) {
85            _this.$activePopover.popover('hide');
86            _this.$activePopover = null;
87          }
88        })
89      ;
90
91      var elements = $(context).find('[data-toggle=popover]').toArray();
92      for (var i = 0; i < elements.length; i++) {
93        var $element = $(elements[i]);
94        var options = $.extend({}, $.fn.popover.Constructor.DEFAULTS, $element.data());
95
96        // Store the original trigger.
97        options.originalTrigger = options.trigger;
98
99        // If the trigger is "click", then we'll handle it manually here.
100        if (options.trigger === 'click') {
101          options.trigger = 'manual';
102        }
103
104        // Retrieve content from a target element.
105        var target = options.target || $element.is('a[href^="#"]') && $element.attr('href');
106        var $target = $document.find(target).clone();
107        if (!options.content && $target[0]) {
108          $target.removeClass('visually-hidden hidden').removeAttr('aria-hidden');
109          options.content = $target.wrap('<div/>').parent()[options.html ? 'html' : 'text']() || '';
110        }
111
112        // Initialize the popover.
113        $element.popover(options);
114
115        // Handle clicks manually.
116        if (options.originalTrigger === 'click') {
117          // To ensure the element is bound multiple times, remove any
118          // previously set event handler before adding another one.
119          $element
120            .off('click.drupal.bootstrap.popover')
121            .on('click.drupal.bootstrap.popover', function (e) {
122              $(this).popover('toggle');
123              e.preventDefault();
124              e.stopPropagation();
125            })
126          ;
127        }
128      }
129    },
130    detach: function (context) {
131      // Immediately return if popovers are not available.
132      if (!$.fn.popover || !$.fn.popover.Constructor.DEFAULTS.enabled) {
133        return;
134      }
135
136      // Destroy all popovers.
137      $(context).find('[data-toggle="popover"]')
138        .off('click.drupal.bootstrap.popover')
139        .popover('destroy')
140      ;
141    },
142    getOption: function(name, defaultValue, element) {
143      var $element = element ? $(element) : this.$activePopover;
144      var options = $.extend(true, {}, $.fn.popover.Constructor.DEFAULTS, ($element && $element.data('bs.popover') || {}).options);
145      if (options[name] !== void 0) {
146        return options[name];
147      }
148      return defaultValue !== void 0 ? defaultValue : void 0;
149    }
150  };
151
152})(window.jQuery, window.Drupal, window.Drupal.bootstrap);
153;
154/**
155 * @file
156 * Bootstrap Tooltips.
157 */
158
159var Drupal = Drupal || {};
160
161(function ($, Drupal, Bootstrap) {
162  "use strict";
163
164  /**
165   * Extend the Bootstrap Tooltip plugin constructor class.
166   */
167  Bootstrap.extendPlugin('tooltip', function (settings) {
168    return {
169      DEFAULTS: {
170        animation: !!settings.tooltip_animation,
171        html: !!settings.tooltip_html,
172        placement: settings.tooltip_placement,
173        selector: settings.tooltip_selector,
174        trigger: settings.tooltip_trigger,
175        delay: parseInt(settings.tooltip_delay, 10),
176        container: settings.tooltip_container
177      }
178    };
179  });
180
181  /**
182   * Bootstrap Tooltips.
183   *
184   * @todo This should really be properly delegated if selector option is set.
185   */
186  Drupal.behaviors.bootstrapTooltips = {
187    attach: function (context) {
188      var elements = $(context).find('[data-toggle="tooltip"]').toArray();
189      for (var i = 0; i < elements.length; i++) {
190        var $element = $(elements[i]);
191        var options = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, $element.data());
192        $element.tooltip(options);
193      }
194    },
195    detach: function (context) {
196      // Destroy all tooltips.
197      $(context).find('[data-toggle="tooltip"]').tooltip('destroy');
198    }
199  };
200
201})(window.jQuery, window.Drupal, window.Drupal.bootstrap);
202;
203(function ($) {
204  // Helpers
205  /**
206   * Fecha o menu mobile e restaura o estado visual e de foco.
207   * @param {jQuery} $btn  - Botão de toggle mobile
208   */
209  function fecharMenuMobile($btn) {
210    if (!$btn.hasClass('active')) return;
211
212    $btn.removeClass('active')
213        .attr('aria-expanded', 'false')
214        .find('i.fas').removeClass('fa-arrow-left').addClass('fa-bars');
215
216    $('#wrapper').width($(window).width());
217    $('#top-navigation').animate({ left: -300 }, 200, function () {
218      $('#wrapper').animate({ marginLeft: 0 }, 500);
219      $('.mobile-menu-overlay').animate({ marginLeft: 0 }, 500);
220    });
221
222    $('.mobile-menu-overlay').hide();
223    $('.bg-menu-mobile').hide();
224    $('#top-navigation').css('box-shadow', 'none');
225  }
226  /**
227   * Abre o menu mobile.
228   * @param {jQuery} $btn  - Botão de toggle mobile
229   */
230  function abrirMenuMobile($btn) {
231    $btn.addClass('active')
232        .attr('aria-expanded', 'true')
233        .find('i.fas').removeClass('fa-bars').addClass('fa-arrow-left');
234
235    $('#wrapper').width($(window).width());
236    $('#top-navigation').animate({ left: 0 }, 200, function () {
237      $('#wrapper').animate({ marginLeft: 300 }, 500);
238      $('.mobile-menu-overlay').animate({ marginLeft: 300 }, 500);
239    });
240
241    $('.mobile-menu-overlay').show().height($(document).height());
242    $('.bg-menu-mobile').show();
243    $('#top-navigation').css('box-shadow', '0px 0px 10px 0px rgba(0,0,0,0.75)');
244  }
245  /**
246   * Fecha todos os itens de menu do nível indicado.
247   * @param {string|jQuery} selector - Seletor CSS ou objeto jQuery dos <li> a fechar
248   */
249  function fecharItensMenu(selector) {
250    $(selector).each(function () {
251      var $li = $(this);
252      $li.removeClass('active');
253      $li.children('a').attr('aria-expanded', 'false');
254      $li.children('.sub-mn-navegacao')
255         .attr('aria-hidden', 'true')
256         .css({ visibility: 'hidden', overflow: 'hidden' });
257      $li.children('a').find('.fa-caret-up')
258         .removeClass('fa-caret-up').addClass('fa-caret-down');
259    });
260  }
261  //  Behavior principal
262  Drupal.behaviors.CeleparMenuColuna = {
263    attach: function (context, settings) {
264      //  Botão de menu mobile
265      var $btnMobile = $('#btn-mobile-menu', context);
266
267      $btnMobile
268        .attr({
269          'aria-controls': 'top-navigation',
270          'aria-expanded': 'false',
271          'aria-label': 'Abrir menu de navegação'
272        })
273        .once('celepar-menu-mobile')
274        .on('click', function () {
275          if ($(this).hasClass('active')) {
276            fecharMenuMobile($(this));
277          } else {
278            abrirMenuMobile($(this));
279          }
280        });
281      //  Ícones de submenu
282      $('ul.mn-navegacao li', context).each(function () {
283        var $li = $(this);
284
285        // Não adiciona seta no 1º nível do rodapé
286        if ($li.parent().parent().attr('id') === 'block-footer-menu') return;
287
288        if ($li.find('ul').length > 0) {
289          var icone = $li.parent('.mn-navegacao').length === 0 ?
290            '<i class="fas fa-angle-right" aria-hidden="true"></i>' :
291            '<i class="fas fa-caret-down" aria-hidden="true"></i>';
292
293          $li.children('a').find('span').first().append(icone);
294        }
295      });
296      //  Fechar menu ao clicar fora
297      $('html', context).on('click.celepar-menu', function () {
298        fecharItensMenu('#top-navigation ul.mn-navegacao li');
299      });
300
301      // Impede que o clique dentro do menu propague e feche tudo
302      $('.mn-navegacao', context).on('click', function (e) {
303        e.stopPropagation();
304      });
305      //  Clique nos itens de menu
306      $('ul.mn-navegacao li a', context).on('click', function (e) {
307        var $link  = $(this);
308        var $li    = $link.parent('li');
309        var $sub   = $li.children('.sub-mn-navegacao');
310        // Só previne o padrão se houver submenu
311        if ($li.children('ul').length > 0) {
312          e.preventDefault();
313          $sub.css('overflow-y', 'hidden');
314        }
315
316        if ($li.hasClass('active')) {
317          //  Fechar este item
318          $('ul.mn-navegacao li .sub-mn-navegacao').css('overflow', 'hidden');
319          $li.removeClass('active');
320          $link.attr('aria-expanded', 'false');
321          $sub.attr('aria-hidden', 'true').css('visibility', 'hidden');
322          $link.find('.fa-caret-up').removeClass('fa-caret-up').addClass('fa-caret-down');
323
324        } else {
325          //  Abrir este item
326          // 1. Primeiro fecha os irmãos — ANTES de abrir o atual
327          $('ul.mn-navegacao li .fa-caret-up')
328            .removeClass('fa-caret-up').addClass('fa-caret-down');
329
330          if ($li.parent('.mn-navegacao').length > 0) {
331            // Primeiro nível: fecha todos os itens do mesmo nível
332            fecharItensMenu('ul.mn-navegacao > li');
333            $('ul.mn-navegacao li .sub-mn-navegacao').css('overflow', 'hidden');
334          } else {
335            // Demais níveis: fecha apenas irmãos do mesmo nível
336            fecharItensMenu($li.siblings('li'));
337          }
338
339          // 2. Agora abre o item clicado
340          $li.addClass('active');
341          $link.attr('aria-expanded', 'true');
342          $link.find('.fa-caret-down').removeClass('fa-caret-down').addClass('fa-caret-up');
343          $sub.attr('aria-hidden', 'false').css('visibility', 'visible');
344
345          // Scroll automático quando há muitos itens
346          if ($sub.length > 0) {
347            $li.parents('.sub-mn-navegacao').css('overflow-y', 'hidden');
348            if ($sub.prop('scrollHeight') > 350) {
349              $sub.css({ 'max-height': '350px', 'overflow-y': 'auto' });
350            }
351          }
352
353          // Ativa scroll ao exceder altura máxima após transição
354        $sub.on('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend',
355          function () {
356            var $thisSub = $(this);
357            if ($thisSub.prop('scrollHeight') > 350) {
358              $thisSub.css({ 'max-height': '350px', 'overflow-y': 'auto' });
359            } else {
360              $thisSub.css({ 'max-height': '', 'overflow-y': '' });
361            }
362          }
363        );
364        }
365
366        $link.focus();
367      });
368
369      //  Navegação por teclado
370      $('ul.mn-navegacao li a', context).on('keydown', function (e) {
371        var $link = $(this);
372        var $li   = $link.parent('li');
373        var $sub  = $li.children('.sub-mn-navegacao');
374
375        switch (e.key) {
376          case 'Escape':
377            // Fecha o submenu atual e devolve foco ao pai
378            if ($li.hasClass('active')) {
379              $li.removeClass('active');
380              $link.attr('aria-expanded', 'false');
381              $sub.attr('aria-hidden', 'true').css('visibility', 'hidden');
382              $link.find('.fa-caret-up').removeClass('fa-caret-up').addClass('fa-caret-down');
383              $link.focus();
384            } else {
385              // Sobe um nível
386              var $parentLink = $li.closest('.sub-mn-navegacao').siblings('a').first();
387              if ($parentLink.length) {
388                $parentLink.trigger('click');
389                $parentLink.focus();
390              }
391            }
392            e.preventDefault();
393            break;
394
395          case 'ArrowDown':
396            // Move para o próximo item visível
397            var $next = $li.next('li').children('a').first();
398            if ($next.length) { $next.focus(); e.preventDefault(); }
399            break;
400
401          case 'ArrowUp':
402            // Move para o item anterior visível
403            var $prev = $li.prev('li').children('a').first();
404            if ($prev.length) { $prev.focus(); e.preventDefault(); }
405            break;
406
407          case 'ArrowRight':
408            // Abre submenu se existir
409            if ($sub.length && !$li.hasClass('active')) {
410              $link.trigger('click');
411              $sub.find('a').first().focus();
412              e.preventDefault();
413            }
414            break;
415
416          case 'ArrowLeft':
417            // Volta ao item pai
418            var $parentA = $li.closest('.sub-mn-navegacao').siblings('a').first();
419            if ($parentA.length) {
420              $parentA.trigger('click');
421              $parentA.focus();
422              e.preventDefault();
423            }
424            break;
425        }
426      });
427
428      //  Mapa do site
429      $('#opt-site-map', context).on('click', function (e) {
430        e.preventDefault();
431        var $footer = $('#block-footer-menu');
432        var visivel = $footer.is(':visible');
433        $footer.toggle();
434        $(this).attr('aria-expanded', visivel ? 'false' : 'true');
435      });
436
437      //  Fechar menu mobile ao clicar em âncora (menu separado)
438      $('#main-navigation > a', context).on('click', function () {
439        if (!$(this).hasClass('item-pai')) {
440          fecharMenuMobile($btnMobile);
441        }
442      });
443
444      //  Fechar menu mobile ao clicar no overlay
445      $('.mobile-menu-overlay', context).on('click', function () {
446        if ($(window).width() <= 767) {
447          fecharMenuMobile($btnMobile);
448        }
449      });
450
451      //  Fechar menu mobile ao clicar em link de âncora para a própria página
452      // Considera âncora qualquer link cujo href comece com "#" e não seja apenas
453      // um item pai com submenu (item-pai abre/fecha submenu, não navega)
454      $('ul.mn-navegacao li a', context).on('click', function () {
455        if ($(window).width() > 767) return;
456
457        var href = $(this).attr('href') || '';
458        // Aceita tanto "#secao-2" quanto "/#secao-2"
459        var ehAncoraPropria = /^\/?#.+/.test(href);
460
461        if (ehAncoraPropria && !$(this).hasClass('item-pai')) {
462          fecharMenuMobile($btnMobile);
463        }
464      });
465
466      //  Redimensionamento de janela
467      var lastWidth = $(window).width();
468
469      $(window).on('resize.celepar-menu', function () {
470        if ($(window).width() !== lastWidth) {
471          $('#wrapper').width('auto').css('margin-left', '0');
472          fecharMenuMobile($btnMobile);
473          lastWidth = $(window).width();
474        }
475      });
476
477//  Lógica desktop (>767px)
478      if ($(window).width() > 767) {
479        // REMOVIDO: A linha genérica que forçava largura total foi removida daqui!
480        // Distribuição em colunas e configuração ARIA dos submenus
481        $('#block-main-menu ul.mn-navegacao li ul', context).each(function () {
482          var $ul = $(this);
483          $ul.addClass('sub-mn-navegacao');
484
485          var $linkPai = $ul.parent().children('a');
486          var subId    = 'submenu-' + Math.random().toString(36).substr(2, 6);
487
488          $ul.attr({ id: subId, role: 'menu', 'aria-hidden': 'true' })
489             .css('visibility', 'hidden');
490
491          $linkPai.addClass('item-pai')
492                  .attr({
493                    role: 'menuitem',
494                    'aria-haspopup': 'true',
495                    'aria-expanded': 'false',
496                    'aria-controls': subId
497                  });
498
499          // Calcula número de colunas
500          var items    = $ul.children('li');
501          var numItems = items.length;
502          var numCols, widthCols;
503
504          if (numItems <= 10)       { numCols = 1; widthCols = 250; }
505          else if (numItems <= 20)  { numCols = 2; }
506          else if (numItems <= 30)  { numCols = 3; }
507          else if (numItems <= 40)  { numCols = 4; }
508          else                      { numCols = 5; }
509          // MODIFICAÇãO: Aplica a largura total APENAS se for um menu grande (3 colunas ou mais)
510          // ou se não entrar na regra de nível simples.
511          var isSegundoNivelSimples =
512            $ul.parent('li').parent('.mn-navegacao').length === 1 &&
513            $ul.find('ul').length === 0;
514
515          if (isSegundoNivelSimples) {
516            if (numCols === 1) {
517              $ul.css('width', widthCols + 'px');
518              $ul.parent().css('position', 'relative');
519            } else if (numCols === 2) {
520              var parentLeft  = Math.ceil($ul.parent('li').offset().left);
521              var containerLeft = $ul.parents('.container').offset().left;
522              var margem = (parentLeft - 100) <= containerLeft ? '0' : '-100px';
523              $ul.css({ width: '500px', 'margin-left': margem });
524              $ul.parent().css('position', 'relative');
525            } else {
526              // Se tiver 3 ou mais colunas, usa o tamanho do container
527              $ul.css('width', $('.container').width() + 'px');
528            }
529          } else {
530            // Submenus complexos ou de níveis mais profundos também usam a largura do container
531            $ul.css('width', $('.container').width() + 'px');
532          }
533
534          // Distribui itens entre colunas
535          var minPorCol = Math.floor(numItems / numCols);
536          var excesso   = numItems - (minPorCol * numCols);
537          var itensPorCol = [];
538          for (var i = 0; i < numCols; i++) {
539            itensPorCol[i] = i < excesso ? minPorCol + 1 : minPorCol;
540          }
541
542          // Botão "voltar" inserido no topo do wrapper de colunas (profundidade > 1)
543          var $colsLi = $('<li></li>').attr('role', 'presentation')
544                                      .addClass('menu-columns-wrapper');
545
546          if ($ul.parent('li').parent('.mn-navegacao').length === 0) {
547            var labelPai = $ul.parent('li').children('a').text().trim();
548            $colsLi.append(
549              '<div class="menu-back-bar">' +
550              '<a class="btn-menu-back" role="button" href="#" ' +
551              'aria-label="Fechar submenu ' + labelPai + '">' +
552              '<i class="fas fa-angle-left" aria-hidden="true"></i> ' + labelPai +
553              '</a></div>'
554            );
555          }
556
557          // Um único <li> envolve todas as colunas, mantendo ul > li válido
558          var pointer = 0;
559          for (var col = 0; col < numCols; col++) {
560            var $colUl = $('<ul></ul>').addClass('menu-column num-cols-' + numCols)
561                                       .attr('role', 'presentation');
562            for (var j = 0; j < itensPorCol[col]; j++) {
563              $colUl.append(items[pointer]);
564              pointer++;
565            }
566            $colsLi.append($colUl);
567          }
568          $ul.append($colsLi);
569        });
570
571        // Ação do botão voltar
572        $('.btn-menu-back', context).on('click', function (e) {
573          e.preventDefault();
574          var $li = $(this).closest('.sub-mn-navegacao').parent('li');
575          $li.removeClass('active');
576          $li.children('a').attr('aria-expanded', 'false').focus();
577          var $parentSub = $li.parent('.menu-column').parent('.sub-mn-navegacao');
578          if ($parentSub.prop('scrollHeight') > 350) {
579            $parentSub.css({ 'max-height': '350px', 'overflow-y': 'auto' });
580          }
581        });
582
583        //  Scroll horizontal quando o menu não cabe
584        var stepAnim    = 200;
585        var totalWidth  = 0;
586        var marginScroll = 0;
587
588        $('#block-main-menu > .mn-navegacao > li').each(function () {
589          totalWidth += $(this).width();
590        });
591
592        if (totalWidth > $('#block-main-menu > .mn-navegacao').width()) {
593          $('body').css({ width: '100%', 'overflow-x': 'hidden' });
594
595          var $scrollArea = $('#top-navigation .region-top-navigation');
596          $scrollArea.append(
597            '<button class="menu-left-scroll" type="button" ' +
598            'aria-label="Rolar menu para esquerda">' +
599            '<span><i class="fas fa-angle-left" aria-hidden="true"></i></span></button>' +
600            '<button class="menu-right-scroll" type="button" ' +
601            'aria-label="Rolar menu para direita">' +
602            '<span><i class="fas fa-angle-right" aria-hidden="true"></i></span></button>'
603          );
604
605          $('.menu-left-scroll').hide();
606
607          $('.menu-right-scroll').on('click', function (e) {
608            e.preventDefault();
609            $('.menu-left-scroll').show().attr('aria-hidden', 'false');
610            $('#block-main-menu').addClass('menu-scrolled-left');
611
612            var $last = $('#block-main-menu > .mn-navegacao > li:last-child');
613            var menuRight  = $last.position().left + $last.find('a').width() + stepAnim;
614            var blockRight = $('#block-main-menu').position().left + $('#block-main-menu').width();
615
616            if (menuRight > blockRight) {
617              marginScroll -= stepAnim;
618              $(this).prop('disabled', true);
619              $('#block-main-menu .mn-navegacao').css('margin-left', marginScroll)
620                .one('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend', function () {
621                  $('.menu-right-scroll').prop('disabled', false);
622                });
623              if ((menuRight - stepAnim) < blockRight) {
624                $('.menu-right-scroll').hide().attr('aria-hidden', 'true');
625              }
626            }
627          });
628
629          $('.menu-left-scroll').on('click', function (e) {
630            e.preventDefault();
631            $('.menu-right-scroll').show().attr('aria-hidden', 'false');
632
633            var currentMargin = parseFloat($('#block-main-menu > .mn-navegacao').css('margin-left'));
634
635            if (currentMargin <= 0) {
636              marginScroll += stepAnim;
637              $(this).prop('disabled', true);
638              $('#block-main-menu .mn-navegacao').css('margin-left', marginScroll)
639                .one('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend', function () {
640                  $('.menu-left-scroll').prop('disabled', false);
641                });
642              if (currentMargin >= -stepAnim) {
643                $('.menu-left-scroll').hide().attr('aria-hidden', 'true');
644                $('#block-main-menu').removeClass('menu-scrolled-left');
645              }
646            }
647          });
648        }
649
650      } // fim desktop
651
652    } // fim attach
653  };
654
655})(jQuery);
656;
657(function ($, Drupal) {
658  $(document).ready(function () {
659
660    $('.header-bloco-governo-digital > a.btn-default').click(function (event) { //primeiro nível
661      event.preventDefault();
662
663      temaId = $(this).attr('id');
664      listaId = 'servicos-' + temaId.substring(4, temaId.length);
665
666      $('.box-servicos').removeClass('active');
667      $('.btn-pia i.fas').removeClass('fa-caret-up').addClass('fa-caret-down');
668      if ($(this).hasClass('active')) {
669        $(this).removeClass('active');
670      } else {
671        $('.header-bloco-governo-digital a.btn-default').removeClass('active');
672        $(this).addClass('active');
673        $('#' + listaId).addClass('active');
674        $(this).find('i.fas').removeClass('fa-caret-down').addClass('fa-caret-up');
675      }
676
677      //corrigir a posição dos itens do mobile
678      categoriasMobile($(this), listaId);
679
680    });
681
682    $('.lista-categorias li a').click(function (event) {
683      if ($(this).parent().find('ul').length != 0) {
684        event.preventDefault();
685        $(this).parent().children('ul').slideToggle('fast');
686      }
687    });
688
689    listaColunasQtde();
690  });
691
692  //exibir a lista mobile
693  var categoriasMobile = function (item, listaId) {
694    if ($(window).width() < 576) {
695      $('.box-servicos').removeClass('active');
696      $('.box-servicos.mobile').remove();
697      if (item.hasClass('active')) {
698        item.after('<div id="' + listaId + '-mobile" class="active box-servicos mobile"></div>');
699        $('#' + listaId + '-mobile').html($('#' + listaId).html());
700      }
701      $('#' + listaId + '-mobile a').click(function (event) {
702        if ($(this).parent().find('ul').length != 0) {
703          event.preventDefault();
704          $(this).parent().children('ul').slideToggle('fast');
705        }
706      });
707
708    }
709  };
710
711  //acertar a quantidade de colunas de acordo com a quantidade de itens
712  var listaColunasQtde = function () {
713    if ($(window).width() > 575) {
714      $('#bloco-governo-digital .box-servicos ul.lista-categorias').each(function (index, el) {
715        if ($(this).children('li').length == 2) {
716          $(this).css('columnCount', 2);
717        } else if ($(this).children('li').length == 1) {
718          $(this).css('columnCount', 1);
719        }
720      });
721    }
722  };
723
724  $(window).resize(function (event) {
725    listaColunasQtde();
726  });
727
728})(jQuery, Drupal);
729;
730!function(o){o(document).ready(function(){o(".celeparheader .ativa-mobile").click(function(e){e.preventDefault(),"none"!=o(this).css("display")&&(o(this).css("display","none"),o(".celeparheader h1.logo").css("display","none"),o(".celeparheader .bloco-busca-pia").css("display","none"),o(".celeparheader .bloco-busca-pia").animate({width:"toggle"}))}),o(document).mouseup(function(e){if(o(".celeparheader .bloco-busca-pia").is(":visible")&&o(window).width()<768){e.preventDefault();var a=o(".celeparheader .bloco-busca-pia .campo-busca");a.is(e.target)||0!==a.has(e.target).length||(o(".celeparheader .bloco-busca-pia").animate({width:"toggle"}),o(".celeparheader .ativa-mobile").toggle("slow/400/fast"),o(".celeparheader h1.logo").toggle("slow/400/fast"))}})})}(jQuery);;

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.