<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">(function ($) { // Mobile Menu
  var buildMenu = true;

  // todo: when more regression time is available, consider changing this initializer to use asi_getSmallestViewportWidth()
  window.asi_screenWidth = !window.jQuery ? (window.screen.width || window.innerWidth) : $(window).width();
  window.asi_resizeHandlerLock = false;
  
  function consolidateMenus() {
    if ($('#mobile-menu').length) {
      return false;
    }

    function mobileToggle(toggleText) {
      return $('&lt;a class="toggle-nav" href="#"&gt;&lt;div class="mobile-menu-icon"&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt; ' + (toggleText ? toggleText : 'Menu') + '&lt;/a&gt;');
    }

    var $nav = $('&lt;nav id="mobile-menu" class="mobile-menu"&gt;&lt;/nav&gt;');
    var $ul = $('&lt;ul /&gt;');
    var $endUserList = $('.EndUserStatus .tabs li').clone(),
      $headerMenuList = $('header .Menu .tabs&gt;li').clone(),
      $sectionMenuList = $('section .Menu .tabs');

    $ul.append($headerMenuList);
    $ul.append($endUserList);
    $nav.append(mobileToggle());
    $nav.append($ul);

    $sectionMenuList.wrapAll('&lt;nav class="mobile-menu"&gt;&lt;/nav&gt;').parent().prepend(mobileToggle('Side Menu'));

    $('body').append($nav);
    $('.mobile-menu a.toggle-nav').on('click', function(e) {
      e.preventDefault();
      e.stopPropagation();
      $(this).parent().toggleClass('active');
    });

    $('.mobile-menu').on('click touchstart', 'li&gt;a', function() {
      var $this = $(this);
      if ($this.next('ul.dropdown').length) {
        $('.mobile-menu li.active').not($(this).parents('li')).removeClass('active');
        $(this).parent('li').toggleClass('active');
        return false;
      }
      return true;
    });

    return true;
  }

  function asi_getSmallestViewportWidth() {
    // for the purpose of logic using this function, we want to know size of currently-viewable viewport
    // different browsers report "viewable viewport" size inconsistently, sometimes reporting the entire (larger) document's size
    // so we will look for the smallest number out of all relevant methods 
    // except that iPhone safari aways reports width of phone in portrait mode, regardless of orientation, so smallest is always "width in portrait"
    var jqW = $(window).width();
    
    var orientation = window.orientation !== undefined ? window.orientation : window.screen &amp;&amp; window.screen.orientation ? window.screen.orientation.angle : undefined;

    var wsW = window.screen.width;
    var wsAw = window.screen.availWidth;
    var wsH = window.screen.height;
    var wsAh = window.screen.availHeight;
    var wIw = window.innerWidth;
    var ret = 9999;
    if (jqW &amp;&amp; jqW &lt; ret) ret = jqW;
    if (wsW &amp;&amp; wsW &lt; ret) ret = wsW;
    if (wsAw &amp;&amp; wsAw &lt; ret) ret = wsAw;
    if (wIw &amp;&amp; wIw &lt; ret) ret = wIw;

    // this is a "heuristic" determination assuming that 1) entire documents fits in the viewport, 2) wsW was chosen as "smallest", but 3) phone is in landscape orientation and 4) (implicitely) that wsW &lt; wsH 
    // i.e. if this is a phone that always reports "width in portait mode as wsW", but phone is in landscape, overwrite the width to be wsH
    if (Math.abs(orientation) === 90 &amp;&amp; wsW &lt; wsH &amp;&amp; ret === wsW) {
      ret = wsH;
    }
    return ret;
  }

  function setScreenWidth() {
    var viewport = document.querySelector("meta[name=viewport]");
    // at time of writing this correct report of asi_getSmallestViewportWidth() depends on width=device-width being present (chicken-and-egg problem)
    // downside of unneccessarily changing viewport's content is unneccessary firing of "resize" event
    // todo: consider finding a way to limit this condition further, body only executes when asi_getSmallestViewportWidth() is (or about to become) under mobile menu threshold
    if (viewport) {
      viewport.setAttribute('content', 'width=device-width, initial-scale=1.0');
    }

    window.asi_screenWidth = asi_getSmallestViewportWidth();
  }

  function addClass(e, className) {
    if (!e) return;

    if (typeof e.classList === "object") {
      if (!e.classList.contains(className)) {
        e.classList.add(className);
      }
    } else {
      $(e).addClass(className);
    }
  }

  function removeClass(e, className) {
    if (!e) return;

    if (typeof e.classList === "object") {
      e.classList.remove(className);
    } else {
      $(e).removeClass(className);
    }
  }

  function changeWindowClass() {
    var viewport = document.querySelector('meta[name=viewport]');
    if (!viewport) {
      var metaTag = document.createElement('meta');
      metaTag.name = 'viewport';
      metaTag.content = '';
      document.getElementsByTagName('head')[0].appendChild(metaTag);
      viewport = document.querySelector('meta[name=viewport]');
    }
    var el = document.getElementsByTagName('body')[0];
    if (window.asi_screenWidth &lt;= 480) { // todo: consider evaluating actual media query
      viewport.setAttribute('content', 'width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0');
      if (buildMenu) {
        consolidateMenus();
        buildMenu = false;
      }
      removeClass(el, 'tablet');
      addClass(el, 'mobile');
    } else if (window.asi_screenWidth &lt; 768) { // todo: consider evaluating actual media query
      viewport.setAttribute('content', 'width=device-width, initial-scale=.45, user-scalable=yes');
      removeClass(el, 'mobile');
      addClass(el, 'tablet');
    } else {
      viewport.setAttribute('content', '');
      removeClass(el, 'mobile');
      removeClass(el, 'tablet');
    }
  }

  changeWindowClass();

  $(document).ready(function() {
    $.ui.dialog.prototype.options.autoReposition = true;

    // todo: consider evaluating actual media query
    if (window.asi_screenWidth &lt;= (parseInt(window.mobileMenuWidth) || 480)) {
      consolidateMenus();
    }

    $(window).on('resize orientationchange', function(event) {
      // idea is to a) handle only one of possibly many events during orientation change, and 
      // b) give the browser a little time before we query for viewport size
      if (window.asi_resizeHandlerLock) {
        // don't do anything - already handled 
        return;
      }

      //window.console.trace(event.type);
      window.asi_resizeHandlerLock = true;
      window.asi_resizeHandler = setTimeout(function() {
        try {
          var vpw = asi_getSmallestViewportWidth();
          if (vpw === window.asi_screenWidth) {
            return;
          }
          setScreenWidth();
          changeWindowClass();
          $('.ui-tooltip').remove(); // remove tooltips
          $('.ui-dialog-content:visible').each(function() { // reposition modal
            if ($(this).dialog) {
              $(this).dialog('option', 'position', $(this).dialog('option', 'position'));
            }
          });
        } finally {
          window.asi_resizeHandlerLock = false;
        }
      }, 100);
    });

    $(document).on('click touchstart', function(event) {
      if (!$(event.target).closest('#mobile-menu').length &amp;&amp; !$(event.target).is('#mobile-menu')) {
        if ($('#mobile-menu').hasClass('active')) {
          $('#mobile-menu').removeClass('active');
        }
      }
    });
  });
})(jQuery);</pre></body></html>