/*	Navigation
==================================================
766589
function(n, fast, displayupdate) {
		n = parseInt(n);
		if (isNaN(n)) n = 0;

		var self = this;

		this.changeBackground({color_value:"", image:false});

		// Clear Preloader Timer
		if (this.preloadTimer) {
			clearTimeout(this.preloadTimer);
		}

		// Set Slide Active State
		for (var i = 0; i < this._slides.length; i++) {
			this._slides[i].setActive(false);
		}

		if (n < this._slides.length && n >= 0) {
			this.current_id = this._slides[n].data.unique_id;

			// Stop animation
			if (this.animator) {
				this.animator.stop();
			}
			if (this._swipable) {
				this._swipable.stopMomentum();
			}

			if (fast) {
				this._el.slider_container.style.left = -(this.slide_spacing * n) + "px";
				this._onSlideChange(displayupdate);
			} else {
				this.animator = TL.Animate(this._el.slider_container, {
					left: 		-(this.slide_spacing * n) + "px",
					duration: 	this.options.duration,
					easing: 	this.options.ease,
					complete: 	this._onSlideChange(displayupdate)
				});
			}

			// Set Slide Active State
			this._slides[n].setActive(true);

			// Update Navigation and Info
			if (this._slides[n + 1]) {
				this.showNav(this._nav.next, true);
				this._nav.next.update(this._slides[n + 1]);
			} else {
				this.showNav(this._nav.next, false);
			}
			if (this._slides[n - 1]) {
				this.showNav(this._nav.previous, true);
				this._nav.previous.update(this._slides[n - 1]);
			} else {
				this.showNav(this._nav.previous, false);
			}

			// Preload Slides
			this.preloadTimer = setTimeout(function() {
				self.preloadSlides(n);
			}, this.options.duration);
		}
	}
196576
public function handle($request, Closure $next, $selectedNavigationId)
    {
        $selectedNavigation = NavigationAdmin::findOrFail($selectedNavigationId);

        // check if user role is in navigation role
        $userRoles = user()->getRolesList();
        $navValid = $selectedNavigation->roles()->whereIn('roles.id', $userRoles)->first();

        if (!$navValid) {
            return redirect(user()->roles()->first()->slug);
        }

        return $next($request);
    }
668332
private void obtainNavigationBackground() {
        try {
            setNavigationBackgroundColor(ThemeUtil.getColor(this, R.attr.navigationBackground));
        } catch (NotFoundException e) {
            int resourceId = ThemeUtil.getResId(this, R.attr.navigationBackground, -1);

            if (resourceId != -1) {
                setNavigationBackground(resourceId);
            } else {
                setNavigationBackground(null);
            }
        }
    }
1152494
function syncNavigation() {
        var attach   = false,
            carousel = this,
            cssClass = carousel.CLASSES,
            i,
            navigation,
            sentinel;

        // Don't do anything if the Carousel is not rendered
        if (!carousel._hasRendered) {
            return;
        }

        navigation = carousel.get("navigation");
        sentinel   = carousel._firstItem + carousel.get("numVisible");

        if (navigation.prev) {
            if (carousel.get("numItems") === 0 || carousel._firstItem === 0) {
                if (carousel.get("numItems") === 0 ||
                   !carousel.get("isCircular")) {
                    Event.removeListener(navigation.prev, "click",
                            scrollPageBackward);
                    Dom.addClass(navigation.prev, cssClass.FIRST_NAV_DISABLED);
                    for (i = 0; i < carousel._navBtns.prev.length; i++) {
                        carousel._navBtns.prev[i].setAttribute("disabled",
                                "true");
                    }
                    carousel._prevEnabled = false;
                } else {
                    attach = !carousel._prevEnabled;
                }
            } else {
                attach = !carousel._prevEnabled;
            }

            if (attach) {
                Event.on(navigation.prev, "click", scrollPageBackward,
                         carousel);
                Dom.removeClass(navigation.prev, cssClass.FIRST_NAV_DISABLED);
                for (i = 0; i < carousel._navBtns.prev.length; i++) {
                    carousel._navBtns.prev[i].removeAttribute("disabled");
                }
                carousel._prevEnabled = true;
            }
        }

        attach = false;
        if (navigation.next) {
            if (sentinel >= carousel.get("numItems")) {
                if (!carousel.get("isCircular")) {
                    Event.removeListener(navigation.next, "click",
                            scrollPageForward);
                    Dom.addClass(navigation.next, cssClass.DISABLED);
                    for (i = 0; i < carousel._navBtns.next.length; i++) {
                        carousel._navBtns.next[i].setAttribute("disabled",
                                "true");
                    }
                    carousel._nextEnabled = false;
                } else {
                    attach = !carousel._nextEnabled;
                }
            } else {
                attach = !carousel._nextEnabled;
            }

            if (attach) {
                Event.on(navigation.next, "click", scrollPageForward,
                         carousel);
                Dom.removeClass(navigation.next, cssClass.DISABLED);
                for (i = 0; i < carousel._navBtns.next.length; i++) {
                    carousel._navBtns.next[i].removeAttribute("disabled");
                }
                carousel._nextEnabled = true;
            }
        }

        carousel.fireEvent(navigationStateChangeEvent,
                { next: carousel._nextEnabled, prev: carousel._prevEnabled });
    }
1348945
private void checkNavigationMenuState(final HttpServletRequest req) {
		if (req == null)
			return;

		if (req.getSession().getAttribute(ATTR_IS_NAV_MENU_COLLAPSED) != null)
			return;

		// here we can specify default collapse value
		req.getSession().setAttribute(ATTR_IS_NAV_MENU_COLLAPSED, false);
	}
135031
function (navigation) {
        "use strict";
    
        var root = '';
        if (navigation.mode === 'hash') {
            root = location.pathname;
        }
        else if (beyond.params.local) {
    
            var pathname = location.pathname.split('/');
            root = [''];
    
            if (pathname[1] === 'applications') root = root.concat(pathname.splice(1, 2));
            if (pathname[1] === 'languages') root = root.concat(pathname.splice(1, 2));
    
            root = root.join('/');
    
        }
    
        Object.defineProperty(navigation, 'root', {
            'get': function () {
                return root;
            }
        });
    
        Object.defineProperty(navigation, 'pathname', {
            'get': function () {
    
                if (navigation.mode === 'hash') {
    
                    var hash = location.hash;
                    if (hash.substr(0, 1) === '#') {
                        hash = hash.substr(1);
    
                        var index = hash.indexOf('?');
                        if (index !== -1) {
                            hash = hash.substr(0, index);
                        }
                    }
                    return '/' + hash;
    
                }
    
                var pathname = location.pathname.substr(root.length);
    
                if (!pathname) pathname = '/';
                else if (pathname && pathname.substr(0, 1) !== '/') pathname = '/' + pathname;
    
                return pathname;
    
            }
        });
    
    }
578718
def navigation(self):
        """"""
        return self.on_site().filter(
            status=self.model.PUBLISHED).filter(parent__isnull=True)
1291016
function (pageRequest, cb) {
            var pageId = pageRequest.pageId;
            var forceReload = pageRequest.forceReload;
            if (!forceReload && pageId && pageId == this.currentPageId) {
                this.$callback(cb);
                if (this._navigationManager) {
                    this._navigationManager.update(pageRequest);
                    ariaUtilsJson.setValue(this._data, "pageInfo", pageRequest);
                }
            } else {
                this._previousPageCSS = this._currentPageCSS;
                this._currentPageCSS = [];
                this._pageProvider.loadPageDefinition(pageRequest, {
                    onsuccess : {
                        fn : this._getPageDependencies,
                        scope : this,
                        args : {
                            pageRequest : pageRequest,
                            cb : cb
                        }
                    },
                    onfailure : this._getErrorCallbackConfig([this.PAGE_NOT_AVAILABLE, pageId])
                });
            }
        }
645435
function () {
/*Line 183 - 'AtomNavigatorList.js' */                base.init.call(this);

/*Line 185 - 'AtomNavigatorList.js' */                var _this = this;

/*Line 187 - 'AtomNavigatorList.js' */                this.backCommand = function () {
/*Line 188 - 'AtomNavigatorList.js' */                    _this.onBackCommand.apply(_this, arguments);
/*Line 189 - 'AtomNavigatorList.js' */                };

/*Line 191 - 'AtomNavigatorList.js' */                this.addCommand = function () {
/*Line 192 - 'AtomNavigatorList.js' */                    _this.onAddCommand.apply(_this, arguments);
/*Line 193 - 'AtomNavigatorList.js' */                };

/*Line 195 - 'AtomNavigatorList.js' */                this.cancelAddCommand = function () {
/*Line 196 - 'AtomNavigatorList.js' */                    _this.onCancelAddNewCommand.apply(_this, arguments);
/*Line 197 - 'AtomNavigatorList.js' */                };

/*Line 199 - 'AtomNavigatorList.js' */                this.showDetailCommand = function () {
/*Line 200 - 'AtomNavigatorList.js' */                    var s = _this.get_selectedItem();
/*Line 201 - 'AtomNavigatorList.js' */                    if (s) {
/*Line 202 - 'AtomNavigatorList.js' */                        AtomBinder.setValue(_this, "displayMode", 1);
/*Line 203 - 'AtomNavigatorList.js' */                        _this.updateDisplayMode();
/*Line 204 - 'AtomNavigatorList.js' */                    }
/*Line 205 - 'AtomNavigatorList.js' */                };
/*Line 206 - 'AtomNavigatorList.js' */            }
689617
function renderNavbar() {
    var navbar = $('#navbar ul')[0];
    if (typeof (navbar) === 'undefined') {
      loadNavbar();
    } else {
      $('#navbar ul a.active').parents('li').addClass(active);
      renderBreadcrumb();
    }

    function loadNavbar() {
      var navbarPath = $("meta[property='docfx\\:navrel']").attr("content");
      if (!navbarPath) {
        return;
      }
      navbarPath = navbarPath.replace(/\\/g, '/');
      var tocPath = $("meta[property='docfx\\:tocrel']").attr("content") || '';
      if (tocPath) tocPath = tocPath.replace(/\\/g, '/');
      $.get(navbarPath, function (data) {
        $(data).find("#toc>ul").appendTo("#navbar");
        if ($('#search-results').length !== 0) {
          $('#search').show();
          $('body').trigger("searchEvent");
        }
        var index = navbarPath.lastIndexOf('/');
        var navrel = '';
        if (index > -1) {
          navrel = navbarPath.substr(0, index + 1);
        }
        $('#navbar>ul').addClass('navbar-nav');
        var currentAbsPath = util.getAbsolutePath(window.location.pathname);
        // set active item
        $('#navbar').find('a[href]').each(function (i, e) {
          var href = $(e).attr("href");
          if (util.isRelativePath(href)) {
            href = navrel + href;
            $(e).attr("href", href);

            // TODO: currently only support one level navbar
            var isActive = false;
            var originalHref = e.name;
            if (originalHref) {
              originalHref = navrel + originalHref;
              if (util.getDirectory(util.getAbsolutePath(originalHref)) === util.getDirectory(util.getAbsolutePath(tocPath))) {
                isActive = true;
              }
            } else {
              if (util.getAbsolutePath(href) === currentAbsPath) {
                var dropdown = $(e).attr('data-toggle') == "dropdown"
                if (!dropdown) {
                  isActive = true;
                }
              }
            }
            if (isActive) {
              $(e).addClass(active);
            }
          }
        });
        renderNavbar();
      });
    }
  }
1138461
function GlobalNav() {
        var _this = this;
        this.options.modulesOptions.globalNav = $.extend(true, defaults,
            this.options.modulesOptions.globalNav,
            JSON.parse(localStorage.getItem("source_enabledFilter")) || {}
        );
        this.initTemplates();
        $(function() {
            _this.init();
        });
    }
441762
public function __async_addnav($materialId = null, $navigation = null)
    {
        // Save record
//        $sm = new CMSNavMaterial(false);
        $sm = new NavigationMaterial();
        $sm->MaterialID = $materialId;
        $sm->StructureID = $navigation;
        $sm->Active = '1';
        $sm->save();
    }
489652
private function getNavigationHtml($parent = null)
    {
        $html = '<ol class="dd-list">';

        if (!(isset($parent) && $parent)) {
            $items = NavigationAdmin::whereParentIdORM(0, true);
        }
        else {
            $items = NavigationAdmin::whereParentIdORM($parent->id, true);
        }

        foreach ($items as $key => $nav) {
            $html .= '<li class="dd-item" data-id="' . $nav->id . '">';
            $html .= '<div class="dd-handle">' . (strlen($nav->icon) > 1 ? '<i class="fa-fw fa fa-' . $nav->icon . '"></i> ' : '');
            $html .= $nav->title . ' ' . ($nav->is_hidden == 1? '(HIDDEN)':'') . ' <span style="float:right"> ' . $nav->url . ' </span></div>';
            $html .= $this->getNavigationHtml($nav);
            $html .= '</li>';
        }

        $html .= '</ol>';

        return (count($items) >= 1 ? $html : '');
    }
800630
function navigation(summary, files) {
    // Support single files as well as list
    files = _.isArray(files) ? files : (_.isString(files) ? [files] : null);

    // List of all navNodes
    // Flatten chapters
    var navNodes = flattenChapters(summary.chapters);

    // Mapping of prev/next for a give path
    var mapping = _.chain(navNodes)
    .map(function(current, i) {
        var prev = null, next = null;

        // Skip if no path
        if(!current.exists) return null;

        // Find prev
        prev = _.chain(navNodes.slice(0, i))
            .reverse()
            .find(function(node) {
                return node.exists && !node.external;
            })
            .value();

        // Find next
        next = _.chain(navNodes.slice(i+1))
            .find(function(node) {
                return node.exists && !node.external;
            })
            .value();

        return [current.path, {
            index: i,
            title: current.title,
            introduction: current.introduction,
            prev: prev,
            next: next,
            level: current.level,
        }];
    })
    .compact()
    .object()
    .value();

    // Filter for only files we want
    if(files) {
        return _.pick(mapping, files);
    }

    return mapping;
}
521228
function (navigationInstruction, callbackName, next, ignoreResult) {
        var plan = navigationInstruction.plan;
        var infos = findDeactivatable(plan, callbackName);
        var i = infos.length; // query from inside out
        function inspect(val) {
            if (ignoreResult || shouldContinue(val)) {
                return iterate();
            }
            return next.cancel(val);
        }
        function iterate() {
            if (i--) {
                try {
                    var viewModel = infos[i];
                    var result = viewModel[callbackName](navigationInstruction);
                    return processPotential(result, inspect, next.cancel);
                }
                catch (error) {
                    return next.cancel(error);
                }
            }
            navigationInstruction.router.couldDeactivate = true;
            return next();
        }
        return iterate();
    }
523051
function updateNavButtonsState() {
            // Item navigation
            if (itemNav) {
                var isFirst = rel.activeItem === 0,
                    isLast  = rel.activeItem >= items.length - 1,
                    itemsButtonState = isFirst ? 'first' : isLast ? 'last' : 'middle';

                if (last.itemsButtonState !== itemsButtonState) {
                    last.itemsButtonState = itemsButtonState;

                    if ($prevButton.is('button,input')) {
                        $prevButton.prop('disabled', isFirst);
                    }

                    if ($nextButton.is('button,input')) {
                        $nextButton.prop('disabled', isLast);
                    }

                    $prevButton[isFirst ? 'removeClass' : 'addClass'](o.disabledClass);
                    $nextButton[isLast ? 'removeClass' : 'addClass'](o.disabledClass);
                }
            }

            // Page navigation
            if ($pages[0]) {
                var isStart = pos.dest <= pos.start,
                    isEnd = pos.dest >= pos.end,
                    pagesButtonState = isStart ? 'first' : isEnd ? 'last' : 'middle';

                // Update paging buttons only if there has been a change in their state
                if (last.pagesButtonState !== pagesButtonState) {
                    last.pagesButtonState = pagesButtonState;

                    if ($prevPageButton.is('button,input')) {
                        $prevPageButton.prop('disabled', isStart);
                    }

                    if ($nextPageButton.is('button,input')) {
                        $nextPageButton.prop('disabled', isEnd);
                    }

                    $prevPageButton[isStart ? 'removeClass' : 'addClass'](o.disabledClass);
                    $nextPageButton[isEnd ? 'removeClass' : 'addClass'](o.disabledClass);
                }
            }
        }
825214
function linkManager() {
    var options = {
      preserveView: false,
      nodeParams: {},
      errorSkipNavigation: false,
      fromContext: null,
      fromClosestContext: false,
      relative: false,
      link: ''
    };

    return {
      /** @lends linkManager */
      /**
       * Navigates to the given path in the application hosted by Luigi. It contains either a full absolute path or a relative path without a leading slash that uses the active route as a base. This is the standard navigation.
       * @param {string} path path to be navigated to
       * @param {string} [sessionId] current Luigi **sessionId**
       * @param {boolean} [preserveView] preserve a view by setting it to `true`. It keeps the current view opened in the background and opens the new route in a new frame. Use the {@link #goBack goBack()} function to navigate back. You can use this feature across different levels. Preserved views are discarded as soon as the standard {@link #navigate navigate()} function is used instead of {@link #goBack goBack()}
       * @param {Object} [modalSettings] opens a view in a modal. Use these settings to configure the modal's title and size
       * @param {string} modalSettings.title modal title. By default, it is the node label. If there is no label, it is left empty
       * @param {('l'|'m'|'s')} [modalSettings.size="l"] size of the modal
       * @example
       * LuigiClient.linkManager().navigate('/overview')
       * LuigiClient.linkManager().navigate('users/groups/stakeholders')
       * LuigiClient.linkManager().navigate('/settings', null, true) // preserve view
       */
      navigate: function navigate(
        path,
        sessionId,
        preserveView,
        modalSettings
      ) {
        if (options.errorSkipNavigation) {
          options.errorSkipNavigation = false;
          return;
        }
        options.preserveView = preserveView;
        var relativePath = path[0] !== '/';
        var navigationOpenMsg = {
          msg: 'luigi.navigation.open',
          sessionId: sessionId,
          params: Object.assign(options, {
            link: path,
            relative: relativePath,
            modal: modalSettings
          })
        };
        window.parent.postMessage(navigationOpenMsg, '*');
      },
      /**
       * Opens a view in a modal. You can specify the modal's title and size. If you don't specify the title, it is the node label. If there is no node label, the title remains empty.  The default size of the modal is `l`, which means 80%. You can also use `m` (60%) and `s` (40%) to set the modal size. Optionally, use it in combination with any of the navigation functions.
       * @param {string} path navigation path
       * @param {Object} [modalSettings] opens a view in a modal. Use these settings to configure the modal's title and size
       * @param {string} modalSettings.title modal title. By default, it is the node label. If there is no label, it is left empty
       * @param {('l'|'m'|'s')} [modalSettings.size="l"] size of the modal
       * @example
       * LuigiClient.linkManager().openAsModal('projects/pr1/users', {title:'Users', size:'m'});
       */
      openAsModal: function(path, modalSettings) {
        this.navigate(path, 0, true, modalSettings || {});
      },
      /**
       * Sets the current navigation context to that of a specific parent node which has the {@link navigation-configuration.md navigationContext} field declared in the navigation configuration. This navigation context is then used by the `navigate` function.
       * @param {string} navigationContext
       * @returns {linkManager} link manager instance
       * @example
       * LuigiClient.linkManager().fromContext('project').navigate('/settings')
       */
      fromContext: function fromContext(navigationContext) {
        var navigationContextInParent =
          currentContext.context.parentNavigationContexts.indexOf(
            navigationContext
          ) !== -1;
        if (navigationContextInParent) {
          options.fromContext = navigationContext;
        } else {
          options.errorSkipNavigation = true;
          console.error(
            'Navigation not possible, navigationContext ' +
              navigationContext +
              ' not found.'
          );
        }
        return this;
      },

      /**
       * Sets the current navigation context which is then used by the `navigate` function. This has to be a parent navigation context, it is not possible to use the child navigation contexts.
       * @returns {linkManager} link manager instance
       * @example
       * LuigiClient.linkManager().fromClosestContext().navigate('/users/groups/stakeholders')
       */
      fromClosestContext: function fromClosestContext() {
        var hasParentNavigationContext =
          currentContext.context.parentNavigationContexts.length > 0;
        if (hasParentNavigationContext) {
          options.fromContext = null;
          options.fromClosestContext = true;
        } else {
          console.error(
            'Navigation not possible, no parent navigationContext found.'
          );
        }
        return this;
      },

      /**
       * Sends node parameters to the route. The parameters are used by the `navigate` function. Use it optionally in combination with any of the navigation functions and receive it as part of the context object in Luigi Client.
       * @param {Object} nodeParams
       * @returns {linkManager} link manager instance
       * @example
       * LuigiClient.linkManager.withParams({foo: "bar"}).navigate("path")
       *
       * // Can be chained with context setting functions such as:
       * LuigiClient.linkManager.fromContext("currentTeam").withParams({foo: "bar"}).navigate("path")
       */
      withParams: function withParams(nodeParams) {
        if (nodeParams) {
          Object.assign(options.nodeParams, nodeParams);
        }
        return this;
      },

      /** @lends linkManager */
      /**
       * Checks if the path you can navigate to exists in the main application. For example, you can use this helper method conditionally to display a DOM element like a button.
       * @param {string} path path which existence you want to check
       * @returns {promise} a promise which resolves to a Boolean variable specifying whether the path exists or not
       * @example
       *  let pathExists;
       *  this.luigiClient
       *  .linkManager()
       *  .pathExists('projects/pr2')
       *  .then(
       *    (pathExists) => {  }
       *  );
       */
      pathExists: function pathExists(path) {
        var currentId = Date.now();
        pathExistsPromises[currentId] = {
          resolveFn: function() {},
          then: function(resolveFn) {
            this.resolveFn = resolveFn;
          }
        };
        var pathExistsMsg = {
          msg: 'luigi.navigation.pathExists',
          data: {
            id: currentId,
            link: path,
            relative: path[0] !== '/'
          }
        };
        window.parent.postMessage(pathExistsMsg, '*');
        return pathExistsPromises[currentId];
      },

      /**
       * Checks if there is one or more preserved views. You can use it to show a **back** button.
       * @returns {boolean} indicating if there is a preserved view you can return to
       */
      hasBack: function hasBack() {
        return (
          !!currentContext.internal.modal ||
          currentContext.internal.viewStackSize !== 0
        );
      },

      /**
       * Discards the active view and navigates back to the last visited view (preserved view), if a preserved view was set before.
       * @param {any} goBackValue data that is passed in the `goBackContext` field to the last visited view
       * @example
       * LuigiClient.linkManager().goBack({ foo: 'bar' });
       * LuigiClient.linkManager().goBack(true);
       */
      goBack: function goBack(goBackValue) {
        if (this.hasBack()) {
          window.parent.postMessage(
            {
              msg: 'luigi.navigation.back',
              goBackContext: goBackValue && JSON.stringify(goBackValue)
            },
            '*'
          );
        }
      }
    };
  }