##// END OF EJS Templates
search pages: got rid of $scope
ergo -
Show More
@@ -1768,13 +1768,14 b' return{compile:function(a,b){var c=f(t);return function(a,b,d,f){function j(){N.'
1768 1768 }]),angular.module("uib/template/carousel/slide.html",[]).run(["$templateCache",function(a){a.put("uib/template/carousel/slide.html",'<div ng-class="{\n \'active\': active\n }" class="item text-center" ng-transclude></div>\n')}]),angular.module("uib/template/datepicker/datepicker.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/datepicker.html",'<div class="uib-datepicker" ng-switch="datepickerMode" role="application" ng-keydown="keydown($event)">\n <uib-daypicker ng-switch-when="day" tabindex="0"></uib-daypicker>\n <uib-monthpicker ng-switch-when="month" tabindex="0"></uib-monthpicker>\n <uib-yearpicker ng-switch-when="year" tabindex="0"></uib-yearpicker>\n</div>\n')}]),angular.module("uib/template/datepicker/day.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/day.html",'<table class="uib-daypicker" role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left uib-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n <th colspan="{{::5 + showWeeks}}"><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm uib-title" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right uib-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n </tr>\n <tr>\n <th ng-if="showWeeks" class="text-center"></th>\n <th ng-repeat="label in ::labels track by $index" class="text-center"><small aria-label="{{::label.full}}">{{::label.abbr}}</small></th>\n </tr>\n </thead>\n <tbody>\n <tr class="uib-weeks" ng-repeat="row in rows track by $index">\n <td ng-if="showWeeks" class="text-center h6"><em>{{ weekNumbers[$index] }}</em></td>\n <td ng-repeat="dt in row" class="uib-day text-center" role="gridcell"\n id="{{::dt.uid}}"\n ng-class="::dt.customClass">\n <button type="button" class="btn btn-default btn-sm"\n uib-is-class="\n \'btn-info\' for selectedDt,\n \'active\' for activeDt\n on dt"\n ng-click="select(dt.date)"\n ng-disabled="::dt.disabled"\n tabindex="-1"><span ng-class="::{\'text-muted\': dt.secondary, \'text-info\': dt.current}">{{::dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("uib/template/datepicker/month.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/month.html",'<table class="uib-monthpicker" role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left uib-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n <th><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm uib-title" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right uib-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n </tr>\n </thead>\n <tbody>\n <tr class="uib-months" ng-repeat="row in rows track by $index">\n <td ng-repeat="dt in row" class="uib-month text-center" role="gridcell"\n id="{{::dt.uid}}"\n ng-class="::dt.customClass">\n <button type="button" class="btn btn-default"\n uib-is-class="\n \'btn-info\' for selectedDt,\n \'active\' for activeDt\n on dt"\n ng-click="select(dt.date)"\n ng-disabled="::dt.disabled"\n tabindex="-1"><span ng-class="::{\'text-info\': dt.current}">{{::dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("uib/template/datepicker/year.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/year.html",'<table class="uib-yearpicker" role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left uib-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n <th colspan="{{::columns - 2}}"><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm uib-title" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right uib-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n </tr>\n </thead>\n <tbody>\n <tr class="uib-years" ng-repeat="row in rows track by $index">\n <td ng-repeat="dt in row" class="uib-year text-center" role="gridcell"\n id="{{::dt.uid}}"\n ng-class="::dt.customClass">\n <button type="button" class="btn btn-default"\n uib-is-class="\n \'btn-info\' for selectedDt,\n \'active\' for activeDt\n on dt"\n ng-click="select(dt.date)"\n ng-disabled="::dt.disabled"\n tabindex="-1"><span ng-class="::{\'text-info\': dt.current}">{{::dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("uib/template/datepickerPopup/popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepickerPopup/popup.html",'<div>\n <ul class="uib-datepicker-popup dropdown-menu uib-position-measure" dropdown-nested ng-if="isOpen" ng-keydown="keydown($event)" ng-click="$event.stopPropagation()">\n <li ng-transclude></li>\n <li ng-if="showButtonBar" class="uib-button-bar">\n <span class="btn-group pull-left">\n <button type="button" class="btn btn-sm btn-info uib-datepicker-current" ng-click="select(\'today\', $event)" ng-disabled="isDisabled(\'today\')">{{ getText(\'current\') }}</button>\n <button type="button" class="btn btn-sm btn-danger uib-clear" ng-click="select(null, $event)">{{ getText(\'clear\') }}</button>\n </span>\n <button type="button" class="btn btn-sm btn-success pull-right uib-close" ng-click="close($event)">{{ getText(\'close\') }}</button>\n </li>\n </ul>\n</div>\n')}]),angular.module("uib/template/modal/backdrop.html",[]).run(["$templateCache",function(a){a.put("uib/template/modal/backdrop.html",'<div class="modal-backdrop"\n uib-modal-animation-class="fade"\n modal-in-class="in"\n ng-style="{\'z-index\': 1040 + (index && 1 || 0) + index*10}"\n></div>\n')}]),angular.module("uib/template/modal/window.html",[]).run(["$templateCache",function(a){a.put("uib/template/modal/window.html",'<div modal-render="{{$isRendered}}" tabindex="-1" role="dialog" class="modal"\n uib-modal-animation-class="fade"\n modal-in-class="in"\n ng-style="{\'z-index\': 1050 + index*10, display: \'block\'}">\n <div class="modal-dialog {{size ? \'modal-\' + size : \'\'}}"><div class="modal-content" uib-modal-transclude></div></div>\n</div>\n')}]),angular.module("uib/template/pager/pager.html",[]).run(["$templateCache",function(a){a.put("uib/template/pager/pager.html",'<ul class="pager">\n <li ng-class="{disabled: noPrevious()||ngDisabled, previous: align}"><a href ng-click="selectPage(page - 1, $event)">{{::getText(\'previous\')}}</a></li>\n <li ng-class="{disabled: noNext()||ngDisabled, next: align}"><a href ng-click="selectPage(page + 1, $event)">{{::getText(\'next\')}}</a></li>\n</ul>\n')}]),angular.module("uib/template/pagination/pagination.html",[]).run(["$templateCache",function(a){a.put("uib/template/pagination/pagination.html",'<ul class="pagination">\n <li ng-if="::boundaryLinks" ng-class="{disabled: noPrevious()||ngDisabled}" class="pagination-first"><a href ng-click="selectPage(1, $event)">{{::getText(\'first\')}}</a></li>\n <li ng-if="::directionLinks" ng-class="{disabled: noPrevious()||ngDisabled}" class="pagination-prev"><a href ng-click="selectPage(page - 1, $event)">{{::getText(\'previous\')}}</a></li>\n <li ng-repeat="page in pages track by $index" ng-class="{active: page.active,disabled: ngDisabled&&!page.active}" class="pagination-page"><a href ng-click="selectPage(page.number, $event)">{{page.text}}</a></li>\n <li ng-if="::directionLinks" ng-class="{disabled: noNext()||ngDisabled}" class="pagination-next"><a href ng-click="selectPage(page + 1, $event)">{{::getText(\'next\')}}</a></li>\n <li ng-if="::boundaryLinks" ng-class="{disabled: noNext()||ngDisabled}" class="pagination-last"><a href ng-click="selectPage(totalPages, $event)">{{::getText(\'last\')}}</a></li>\n</ul>\n')}]),angular.module("uib/template/tooltip/tooltip-html-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-html-popup.html",'<div class="tooltip"\n tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="tooltip-arrow"></div>\n <div class="tooltip-inner" ng-bind-html="contentExp()"></div>\n</div>\n')}]),angular.module("uib/template/tooltip/tooltip-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-popup.html",'<div class="tooltip"\n tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="tooltip-arrow"></div>\n <div class="tooltip-inner" ng-bind="content"></div>\n</div>\n')}]),angular.module("uib/template/tooltip/tooltip-template-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-template-popup.html",'<div class="tooltip"\n tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="tooltip-arrow"></div>\n <div class="tooltip-inner"\n uib-tooltip-template-transclude="contentExp()"\n tooltip-template-transclude-scope="originScope()"></div>\n</div>\n')}]),angular.module("uib/template/popover/popover-html.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover-html.html",'<div class="popover"\n tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="arrow"></div>\n\n <div class="popover-inner">\n <h3 class="popover-title" ng-bind="uibTitle" ng-if="uibTitle"></h3>\n <div class="popover-content" ng-bind-html="contentExp()"></div>\n </div>\n</div>\n')}]),angular.module("uib/template/popover/popover-template.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover-template.html",'<div class="popover"\n tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="arrow"></div>\n\n <div class="popover-inner">\n <h3 class="popover-title" ng-bind="uibTitle" ng-if="uibTitle"></h3>\n <div class="popover-content"\n uib-tooltip-template-transclude="contentExp()"\n tooltip-template-transclude-scope="originScope()"></div>\n </div>\n</div>\n')}]),angular.module("uib/template/popover/popover.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover.html",'<div class="popover"\n tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="arrow"></div>\n\n <div class="popover-inner">\n <h3 class="popover-title" ng-bind="uibTitle" ng-if="uibTitle"></h3>\n <div class="popover-content" ng-bind="content"></div>\n </div>\n</div>\n')}]),angular.module("uib/template/progressbar/bar.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/bar.html",'<div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: (percent < 100 ? percent : 100) + \'%\'}" aria-valuetext="{{percent | number:0}}%" aria-labelledby="{{::title}}" ng-transclude></div>\n')}]),angular.module("uib/template/progressbar/progress.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/progress.html",'<div class="progress" ng-transclude aria-labelledby="{{::title}}"></div>')}]),angular.module("uib/template/progressbar/progressbar.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/progressbar.html",'<div class="progress">\n <div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: (percent < 100 ? percent : 100) + \'%\'}" aria-valuetext="{{percent | number:0}}%" aria-labelledby="{{::title}}" ng-transclude></div>\n</div>\n')}]),angular.module("uib/template/rating/rating.html",[]).run(["$templateCache",function(a){a.put("uib/template/rating/rating.html",'<span ng-mouseleave="reset()" ng-keydown="onKeydown($event)" tabindex="0" role="slider" aria-valuemin="0" aria-valuemax="{{range.length}}" aria-valuenow="{{value}}" aria-valuetext="{{title}}">\n <span ng-repeat-start="r in range track by $index" class="sr-only">({{ $index < value ? \'*\' : \' \' }})</span>\n <i ng-repeat-end ng-mouseenter="enter($index + 1)" ng-click="rate($index + 1)" class="glyphicon" ng-class="$index < value && (r.stateOn || \'glyphicon-star\') || (r.stateOff || \'glyphicon-star-empty\')" ng-attr-title="{{r.title}}"></i>\n</span>\n')}]),angular.module("uib/template/tabs/tab.html",[]).run(["$templateCache",function(a){a.put("uib/template/tabs/tab.html",'<li ng-class="[{active: active, disabled: disabled}, classes]" class="uib-tab nav-item">\n <a href ng-click="select($event)" class="nav-link" uib-tab-heading-transclude>{{heading}}</a>\n</li>\n')}]),angular.module("uib/template/tabs/tabset.html",[]).run(["$templateCache",function(a){a.put("uib/template/tabs/tabset.html",'<div>\n <ul class="nav nav-{{tabset.type || \'tabs\'}}" ng-class="{\'nav-stacked\': vertical, \'nav-justified\': justified}" ng-transclude></ul>\n <div class="tab-content">\n <div class="tab-pane"\n ng-repeat="tab in tabset.tabs"\n ng-class="{active: tabset.active === tab.index}"\n uib-tab-content-transclude="tab">\n </div>\n </div>\n</div>\n')}]),angular.module("uib/template/timepicker/timepicker.html",[]).run(["$templateCache",function(a){a.put("uib/template/timepicker/timepicker.html",'<table class="uib-timepicker">\n <tbody>\n <tr class="text-center" ng-show="::showSpinners">\n <td class="uib-increment hours"><a ng-click="incrementHours()" ng-class="{disabled: noIncrementHours()}" class="btn btn-link" ng-disabled="noIncrementHours()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n <td>&nbsp;</td>\n <td class="uib-increment minutes"><a ng-click="incrementMinutes()" ng-class="{disabled: noIncrementMinutes()}" class="btn btn-link" ng-disabled="noIncrementMinutes()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n <td ng-show="showSeconds">&nbsp;</td>\n <td ng-show="showSeconds" class="uib-increment seconds"><a ng-click="incrementSeconds()" ng-class="{disabled: noIncrementSeconds()}" class="btn btn-link" ng-disabled="noIncrementSeconds()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n <td ng-show="showMeridian"></td>\n </tr>\n <tr>\n <td class="form-group uib-time hours" ng-class="{\'has-error\': invalidHours}">\n <input type="text" placeholder="HH" ng-model="hours" ng-change="updateHours()" class="form-control text-center" ng-readonly="::readonlyInput" maxlength="2" tabindex="{{::tabindex}}" ng-disabled="noIncrementHours()" ng-blur="blur()">\n </td>\n <td class="uib-separator">:</td>\n <td class="form-group uib-time minutes" ng-class="{\'has-error\': invalidMinutes}">\n <input type="text" placeholder="MM" ng-model="minutes" ng-change="updateMinutes()" class="form-control text-center" ng-readonly="::readonlyInput" maxlength="2" tabindex="{{::tabindex}}" ng-disabled="noIncrementMinutes()" ng-blur="blur()">\n </td>\n <td ng-show="showSeconds" class="uib-separator">:</td>\n <td class="form-group uib-time seconds" ng-class="{\'has-error\': invalidSeconds}" ng-show="showSeconds">\n <input type="text" placeholder="SS" ng-model="seconds" ng-change="updateSeconds()" class="form-control text-center" ng-readonly="readonlyInput" maxlength="2" tabindex="{{::tabindex}}" ng-disabled="noIncrementSeconds()" ng-blur="blur()">\n </td>\n <td ng-show="showMeridian" class="uib-time am-pm"><button type="button" ng-class="{disabled: noToggleMeridian()}" class="btn btn-default text-center" ng-click="toggleMeridian()" ng-disabled="noToggleMeridian()" tabindex="{{::tabindex}}">{{meridian}}</button></td>\n </tr>\n <tr class="text-center" ng-show="::showSpinners">\n <td class="uib-decrement hours"><a ng-click="decrementHours()" ng-class="{disabled: noDecrementHours()}" class="btn btn-link" ng-disabled="noDecrementHours()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n <td>&nbsp;</td>\n <td class="uib-decrement minutes"><a ng-click="decrementMinutes()" ng-class="{disabled: noDecrementMinutes()}" class="btn btn-link" ng-disabled="noDecrementMinutes()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n <td ng-show="showSeconds">&nbsp;</td>\n <td ng-show="showSeconds" class="uib-decrement seconds"><a ng-click="decrementSeconds()" ng-class="{disabled: noDecrementSeconds()}" class="btn btn-link" ng-disabled="noDecrementSeconds()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n <td ng-show="showMeridian"></td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("uib/template/typeahead/typeahead-match.html",[]).run(["$templateCache",function(a){a.put("uib/template/typeahead/typeahead-match.html",'<a href\n tabindex="-1"\n ng-bind-html="match.label | uibTypeaheadHighlight:query"\n ng-attr-title="{{match.label}}"></a>\n')}]),angular.module("uib/template/typeahead/typeahead-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/typeahead/typeahead-popup.html",'<ul class="dropdown-menu" ng-show="isOpen() && !moveInProgress" ng-style="{top: position().top+\'px\', left: position().left+\'px\'}" role="listbox" aria-hidden="{{!isOpen()}}">\n <li ng-repeat="match in matches track by $index" ng-class="{active: isActive($index) }" ng-mouseenter="selectActive($index)" ng-click="selectMatch($index, $event)" role="option" id="{{::match.id}}">\n <div uib-typeahead-match index="$index" match="match" query="query" template-url="templateUrl"></div>\n </li>\n</ul>\n')}]),angular.module("ui.bootstrap.carousel").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibCarouselCss&&angular.element(document).find("head").prepend('<style type="text/css">.ng-animate.item:not(.left):not(.right){-webkit-transition:0s ease-in-out left;transition:0s ease-in-out left}</style>'),angular.$$uibCarouselCss=!0}),angular.module("ui.bootstrap.datepicker").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibDatepickerCss&&angular.element(document).find("head").prepend('<style type="text/css">.uib-datepicker .uib-title{width:100%;}.uib-day button,.uib-month button,.uib-year button{min-width:100%;}.uib-left,.uib-right{width:100%}</style>'),angular.$$uibDatepickerCss=!0}),angular.module("ui.bootstrap.position").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibPositionCss&&angular.element(document).find("head").prepend('<style type="text/css">.uib-position-measure{display:block !important;visibility:hidden !important;position:absolute !important;top:-9999px !important;left:-9999px !important;}.uib-position-scrollbar-measure{position:absolute !important;top:-9999px !important;width:50px !important;height:50px !important;overflow:scroll !important;}.uib-position-body-scrollbar-measure{overflow:scroll !important;}</style>'),angular.$$uibPositionCss=!0}),angular.module("ui.bootstrap.datepickerPopup").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibDatepickerpopupCss&&angular.element(document).find("head").prepend('<style type="text/css">.uib-datepicker-popup.dropdown-menu{display:block;float:none;margin:0;}.uib-button-bar{padding:10px 9px 2px;}</style>'),angular.$$uibDatepickerpopupCss=!0}),angular.module("ui.bootstrap.tooltip").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTooltipCss&&angular.element(document).find("head").prepend('<style type="text/css">[uib-tooltip-popup].tooltip.top-left > .tooltip-arrow,[uib-tooltip-popup].tooltip.top-right > .tooltip-arrow,[uib-tooltip-popup].tooltip.bottom-left > .tooltip-arrow,[uib-tooltip-popup].tooltip.bottom-right > .tooltip-arrow,[uib-tooltip-popup].tooltip.left-top > .tooltip-arrow,[uib-tooltip-popup].tooltip.left-bottom > .tooltip-arrow,[uib-tooltip-popup].tooltip.right-top > .tooltip-arrow,[uib-tooltip-popup].tooltip.right-bottom > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.top-left > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.top-right > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.bottom-left > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.bottom-right > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.left-top > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.left-bottom > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.right-top > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.right-bottom > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.top-left > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.top-right > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.bottom-left > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.bottom-right > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.left-top > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.left-bottom > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.right-top > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.right-bottom > .tooltip-arrow,[uib-popover-popup].popover.top-left > .arrow,[uib-popover-popup].popover.top-right > .arrow,[uib-popover-popup].popover.bottom-left > .arrow,[uib-popover-popup].popover.bottom-right > .arrow,[uib-popover-popup].popover.left-top > .arrow,[uib-popover-popup].popover.left-bottom > .arrow,[uib-popover-popup].popover.right-top > .arrow,[uib-popover-popup].popover.right-bottom > .arrow,[uib-popover-html-popup].popover.top-left > .arrow,[uib-popover-html-popup].popover.top-right > .arrow,[uib-popover-html-popup].popover.bottom-left > .arrow,[uib-popover-html-popup].popover.bottom-right > .arrow,[uib-popover-html-popup].popover.left-top > .arrow,[uib-popover-html-popup].popover.left-bottom > .arrow,[uib-popover-html-popup].popover.right-top > .arrow,[uib-popover-html-popup].popover.right-bottom > .arrow,[uib-popover-template-popup].popover.top-left > .arrow,[uib-popover-template-popup].popover.top-right > .arrow,[uib-popover-template-popup].popover.bottom-left > .arrow,[uib-popover-template-popup].popover.bottom-right > .arrow,[uib-popover-template-popup].popover.left-top > .arrow,[uib-popover-template-popup].popover.left-bottom > .arrow,[uib-popover-template-popup].popover.right-top > .arrow,[uib-popover-template-popup].popover.right-bottom > .arrow{top:auto;bottom:auto;left:auto;right:auto;margin:0;}[uib-popover-popup].popover,[uib-popover-html-popup].popover,[uib-popover-template-popup].popover{display:block !important;}</style>'),angular.$$uibTooltipCss=!0}),angular.module("ui.bootstrap.timepicker").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTimepickerCss&&angular.element(document).find("head").prepend('<style type="text/css">.uib-time input{width:50px;}</style>'),angular.$$uibTimepickerCss=!0}),angular.module("ui.bootstrap.typeahead").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTypeaheadCss&&angular.element(document).find("head").prepend('<style type="text/css">[uib-typeahead-popup].dropdown-menu{display:block;}</style>'),angular.$$uibTypeaheadCss=!0});
1769 1769 ;/*!
1770 1770 * State-based routing for AngularJS
1771 * @version v1.0.0-alpha.5
1772 * @link http://angular-ui.github.com/ui-router
1771 * @version v1.0.0-beta.3
1772 * @link https://ui-router.github.io
1773 1773 * @license MIT License, http://www.opensource.org/licenses/MIT
1774 1774 */
1775 !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("angular-ui-router",[],e):"object"==typeof exports?exports["angular-ui-router"]=e():t["angular-ui-router"]=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function r(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}r(n(1)),r(n(53)),r(n(54)),r(n(56)),n(57),n(58),n(59),n(60),Object.defineProperty(e,"__esModule",{value:!0}),e["default"]="ui.router"},function(t,e,n){"use strict";function r(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}r(n(2)),r(n(20)),r(n(44)),r(n(40)),r(n(17)),r(n(13)),r(n(45)),r(n(49)),r(n(51));var i=n(52);e.UIRouter=i.UIRouter},function(t,e,n){"use strict";function r(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}r(n(3)),r(n(6)),r(n(7)),r(n(5)),r(n(4)),r(n(8)),r(n(9)),r(n(12))},function(t,e,n){"use strict";function r(t,e,n,r){return void 0===r&&(r=Object.keys(t)),r.filter(function(e){return"function"==typeof t[e]}).forEach(function(r){return e[r]=t[r].bind(n)})}function i(t){void 0===t&&(t={});for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=o.apply(null,[{}].concat(n));return e.extend({},i,c(t||{},Object.keys(i)))}function o(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return e.forEach(n,function(n){e.forEach(n,function(e,n){t.hasOwnProperty(n)||(t[n]=e)})}),t}function a(t,e){var n=[];for(var r in t.path){if(t.path[r]!==e.path[r])break;n.push(t.path[r])}return n}function s(t,e,n){void 0===n&&(n=Object.keys(t));for(var r=0;r<n.length;r++){var i=n[r];if(t[i]!=e[i])return!1}return!0}function u(t,e){var n={},r=_(arguments,2);for(var i in e)t(r,i)&&(n[i]=e[i]);return n}function c(t){return u.apply(null,[T].concat(_(arguments)))}function l(t){return u.apply(null,[k.not(T)].concat(_(arguments)))}function f(t,e){return v(t,k.prop(e))}function p(t,n){var r=P.isArray(t),i=r?[]:{},o=r?function(t){return i.push(t)}:function(t,e){return i[e]=t};return e.forEach(t,function(t,e){n(t,e)&&o(t,e)}),i}function h(t,n){var r;return e.forEach(t,function(t,e){r||n(t,e)&&(r=t)}),r}function v(t,n){var r=P.isArray(t)?[]:{};return e.forEach(t,function(t,e){return r[e]=n(t,e)}),r}function d(t,e){return t.push(e),t}function m(t,e){return void 0===e&&(e="assert failure"),function(n){if(!t(n))throw new Error(P.isFunction(e)?e(n):e);return!0}}function g(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];if(0===t.length)return[];var n=t.reduce(function(t,e){return Math.min(e.length,t)},9007199254740991);return Array.apply(null,Array(n)).map(function(e,n){return t.map(function(t){return t[n]})})}function y(t,e){var n,r;if(P.isArray(e)&&(n=e[0],r=e[1]),!P.isString(n))throw new Error("invalid parameters to applyPairs");return t[n]=r,t}function w(t){return t.length&&t[t.length-1]||void 0}function $(t,n){return n&&Object.keys(n).forEach(function(t){return delete n[t]}),n||(n={}),e.extend(n,t)}function b(t,e,n){return P.isArray(t)?t.forEach(e,n):void Object.keys(t).forEach(function(n){return e(t[n],n)})}function R(t,e){return Object.keys(e).forEach(function(n){return t[n]=e[n]}),t}function S(t,n){return _(arguments,1).filter(e.identity).reduce(R,t)}function x(t,e){if(t===e)return!0;if(null===t||null===e)return!1;if(t!==t&&e!==e)return!0;var n=typeof t,r=typeof e;if(n!==r||"object"!==n)return!1;var i=[t,e];if(k.all(P.isArray)(i))return E(t,e);if(k.all(P.isDate)(i))return t.getTime()===e.getTime();if(k.all(P.isRegExp)(i))return t.toString()===e.toString();if(k.all(P.isFunction)(i))return!0;var o=[P.isFunction,P.isArray,P.isDate,P.isRegExp];if(o.map(k.any).reduce(function(t,e){return t||!!e(i)},!1))return!1;var a,s={};for(a in t){if(!x(t[a],e[a]))return!1;s[a]=!0}for(a in e)if(!s[a])return!1;return!0}function E(t,e){return t.length!==e.length?!1:g(t,e).reduce(function(t,e){return t&&x(e[0],e[1])},!0)}var P=n(4),k=n(5),O="undefined"==typeof window?{}:window,C=O.angular||{};e.fromJson=C.fromJson||JSON.parse.bind(JSON),e.toJson=C.toJson||JSON.stringify.bind(JSON),e.copy=C.copy||$,e.forEach=C.forEach||b,e.extend=C.extend||S,e.equals=C.equals||x,e.identity=function(t){return t},e.noop=function(){},e.abstractKey="abstract",e.bindFunctions=r,e.inherit=function(t,n){return e.extend(new(e.extend(function(){},{prototype:t})),n)};var _=function(t,e){return void 0===e&&(e=0),Array.prototype.concat.apply(Array.prototype,Array.prototype.slice.call(t,e))},T=function(t,e){return-1!==t.indexOf(e)};e.removeFrom=k.curry(function(t,e){var n=t.indexOf(e);return n>=0&&t.splice(n,1),t}),e.defaults=i,e.merge=o,e.mergeR=function(t,n){return e.extend(t,n)},e.ancestors=a,e.equalForKeys=s,e.pick=c,e.omit=l,e.pluck=f,e.filter=p,e.find=h,e.mapObj=v,e.map=v,e.values=function(t){return Object.keys(t).map(function(e){return t[e]})},e.allTrueR=function(t,e){return t&&e},e.anyTrueR=function(t,e){return t||e},e.unnestR=function(t,e){return t.concat(e)},e.flattenR=function(t,n){return P.isArray(n)?t.concat(n.reduce(e.flattenR,[])):d(t,n)},e.unnest=function(t){return t.reduce(e.unnestR,[])},e.flatten=function(t){return t.reduce(e.flattenR,[])},e.assertPredicate=m,e.pairs=function(t){return Object.keys(t).map(function(e){return[e,t[e]]})},e.arrayTuples=g,e.applyPairs=y,e.tail=w},function(t,e,n){"use strict";function r(t){if(e.isArray(t)&&t.length){var n=t.slice(0,-1),r=t.slice(-1);return!(n.filter(i.not(e.isString)).length||r.filter(i.not(e.isFunction)).length)}return e.isFunction(t)}var i=n(5),o=Object.prototype.toString,a=function(t){return function(e){return typeof e===t}};e.isUndefined=a("undefined"),e.isDefined=i.not(e.isUndefined),e.isNull=function(t){return null===t},e.isFunction=a("function"),e.isNumber=a("number"),e.isString=a("string"),e.isObject=function(t){return null!==t&&"object"==typeof t},e.isArray=Array.isArray,e.isDate=function(t){return"[object Date]"===o.call(t)},e.isRegExp=function(t){return"[object RegExp]"===o.call(t)},e.isInjectable=r,e.isPromise=i.and(e.isObject,i.pipe(i.prop("then"),e.isFunction))},function(t,e){"use strict";function n(t){function e(n){return n.length>=r?t.apply(null,n):function(){return e(n.concat([].slice.apply(arguments)))}}var n=[].slice.apply(arguments,[1]),r=t.length;return e(n)}function r(){var t=arguments,e=t.length-1;return function(){for(var n=e,r=t[e].apply(this,arguments);n--;)r=t[n].call(this,r);return r}}function i(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return r.apply(null,[].slice.call(arguments).reverse())}function o(t,e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r-0]=arguments[r];return t.apply(null,n)&&e.apply(null,n)}}function a(t,e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r-0]=arguments[r];return t.apply(null,n)||e.apply(null,n)}}function s(t,e){return function(n){return n[t].apply(n,e)}}function u(t){return function(e){for(var n=0;n<t.length;n++)if(t[n][0](e))return t[n][1](e)}}e.curry=n,e.compose=r,e.pipe=i,e.prop=function(t){return function(e){return e&&e[t]}},e.propEq=n(function(t,e,n){return n&&n[t]===e}),e.parse=function(t){return i.apply(null,t.split(".").map(e.prop))},e.not=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n-0]=arguments[n];return!t.apply(null,e)}},e.and=o,e.or=a,e.all=function(t){return function(e){return e.reduce(function(e,n){return e&&!!t(n)},!0)}},e.any=function(t){return function(e){return e.reduce(function(e,n){return e||!!t(n)},!1)}},e.none=e.not(e.any),e.is=function(t){return function(e){return null!=e&&e.constructor===t||e instanceof t}},e.eq=function(t){return function(e){return t===e}},e.val=function(t){return function(){return t}},e.invoke=s,e.pattern=u},function(t,e){"use strict";var n=function(t){return function(){throw new Error(t+"(): No coreservices implementation for UI-Router is loaded. You should include one of: ['angular1.js']")}},r={$q:void 0,$injector:void 0,location:{},locationConfig:{},template:{}};e.services=r,["replace","url","path","search","hash","onChange"].forEach(function(t){return r.location[t]=n(t)}),["port","protocol","host","baseHref","html5Mode","hashPrefix"].forEach(function(t){return r.locationConfig[t]=n(t)})},function(t,e){"use strict";var n=function(){function t(t){this.text=t,this.glob=t.split(".")}return t.prototype.matches=function(t){for(var e=t.split("."),n=0,r=this.glob.length;r>n;n++)"*"===this.glob[n]&&(e[n]="*");return"**"===this.glob[0]&&(e=e.slice(e.indexOf(this.glob[1])),e.unshift("**")),"**"===this.glob[this.glob.length-1]&&(e.splice(e.indexOf(this.glob[this.glob.length-2])+1,Number.MAX_VALUE),e.push("**")),this.glob.length!=e.length?!1:e.join("")===this.glob.join("")},t.is=function(t){return t.indexOf("*")>-1},t.fromString=function(e){return this.is(e)?new t(e):null},t}();e.Glob=n},function(t,e){"use strict";var n=function(){function t(t,e){void 0===t&&(t=[]),void 0===e&&(e=null),this._items=t,this._limit=e}return t.prototype.enqueue=function(t){var e=this._items;return e.push(t),this._limit&&e.length>this._limit&&e.shift(),t},t.prototype.dequeue=function(){return this.size()?this._items.splice(0,1)[0]:void 0},t.prototype.clear=function(){var t=this._items;return this._items=[],t},t.prototype.size=function(){return this._items.length},t.prototype.remove=function(t){var e=this._items.indexOf(t);return e>-1&&this._items.splice(e,1)[0]},t.prototype.peekTail=function(){return this._items[this._items.length-1]},t.prototype.peekHead=function(){return this.size()?this._items[0]:void 0},t}();e.Queue=n},function(t,e,n){"use strict";function r(t,e){return e.length<=t?e:e.substr(0,t-3)+"..."}function i(t,e){for(;e.length<t;)e+=" ";return e}function o(t){return t.replace(/^([A-Z])/,function(t){return t.toLowerCase()}).replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}function a(t){return"Promise("+JSON.stringify(t)+")"}function s(t){var e=u(t),n=e.match(/^(function [^ ]+\([^)]*\))/);return n?n[1]:e}function u(t){var e=l.isArray(t)?t.slice(-1)[0]:t;return e&&e.toString()||"undefined"}function c(t){function e(t){if(l.isObject(t)){if(-1!==n.indexOf(t))return"[circular ref]";n.push(t)}return g(t)}var n=[];return JSON.stringify(t,function(t,n){return e(n)}).replace(/\\"/g,'"')}var l=n(4),f=n(10),p=n(3),h=n(5),v=n(11),d=n(32);e.maxLength=r,e.padString=i,e.kebobString=o,e.functionToString=s,e.fnToString=u;var m=f.Rejection.isTransitionRejectionPromise,g=h.pattern([[h.not(l.isDefined),h.val("undefined")],[l.isNull,h.val("null")],[l.isPromise,a],[m,function(t){return t._transitionRejection.toString()}],[h.is(f.Rejection),h.invoke("toString")],[h.is(v.Transition),h.invoke("toString")],[h.is(d.Resolvable),h.invoke("toString")],[l.isInjectable,s],[h.val(!0),p.identity]]);e.stringify=c,e.beforeAfterSubstr=function(t){return function(e){if(!e)return["",""];var n=e.indexOf(t);return-1===n?[e,""]:[e.substr(0,n),e.substr(n+1)]}}},function(t,e,n){"use strict";var r=n(3),i=n(6),o=n(9);!function(t){t[t.SUPERSEDED=2]="SUPERSEDED",t[t.ABORTED=3]="ABORTED",t[t.INVALID=4]="INVALID",t[t.IGNORED=5]="IGNORED"}(e.RejectType||(e.RejectType={}));var a=e.RejectType,s=function(){function t(t,e,n){this.type=t,this.message=e,this.detail=n}return t.prototype.toString=function(){var t=function(t){return t&&t.toString!==Object.prototype.toString?t.toString():o.stringify(t)},e=this.type,n=this.message,r=t(this.detail);return"TransitionRejection(type: "+e+", message: "+n+", detail: "+r+")"},t.prototype.toPromise=function(){return r.extend(i.services.$q.reject(this),{_transitionRejection:this})},t.isTransitionRejectionPromise=function(e){return e&&"function"==typeof e.then&&e._transitionRejection instanceof t},t.superseded=function(e,n){var r="The transition has been superseded by a different transition (see detail).",i=new t(a.SUPERSEDED,r,e);return n&&n.redirected&&(i.redirected=!0),i},t.redirected=function(e){return t.superseded(e,{redirected:!0})},t.invalid=function(e){var n="This transition is invalid (see detail)";return new t(a.INVALID,n,e)},t.ignored=function(e){var n="The transition was ignored.";return new t(a.IGNORED,n,e)},t.aborted=function(e){var n="The transition has been aborted.";return new t(a.ABORTED,n,e)},t}();e.Rejection=s},function(t,e,n){"use strict";var r=n(12),i=n(6),o=n(3),a=n(4),s=n(5),u=n(13),c=n(39),l=n(38),f=n(17),p=n(20),h=n(40),v=n(10),d=0,m=s.prop("self"),g=function(){function t(t,e,n){var r=this;if(this._transitionService=n,this._deferred=i.services.$q.defer(),this.promise=this._deferred.promise,this.treeChanges=function(){return r._treeChanges},this.isActive=function(){return r===r._options.current()},!e.valid())throw new Error(e.error());u.HookRegistry.mixin(new u.HookRegistry,this),this._options=o.extend({current:s.val(this)},e.options()),this.$id=d++;var a=l.PathFactory.buildToPath(t,e);a=l.PathFactory.applyViewConfigs(n.$view,a),this._treeChanges=l.PathFactory.treeChanges(t,a,this._options.reloadState),l.PathFactory.bindTransitionResolve(this._treeChanges,this)}return t.prototype.$from=function(){return o.tail(this._treeChanges.from).state},t.prototype.$to=function(){return o.tail(this._treeChanges.to).state},t.prototype.from=function(){return this.$from().self},t.prototype.to=function(){return this.$to().self},t.prototype.is=function(e){return e instanceof t?this.is({to:e.$to().name,from:e.$from().name}):!(e.to&&!u.matchState(this.$to(),e.to)||e.from&&!u.matchState(this.$from(),e.from))},t.prototype.params=function(t){return void 0===t&&(t="to"),this._treeChanges[t].map(s.prop("paramValues")).reduce(o.mergeR,{})},t.prototype.resolves=function(){return o.map(o.tail(this._treeChanges.to).resolveContext.getResolvables(),function(t){return t.data})},t.prototype.addResolves=function(t,e){void 0===e&&(e="");var n="string"==typeof e?e:e.name,r=this._treeChanges.to,i=o.find(r,function(t){return t.state.name===n});o.tail(r).resolveContext.addResolvables(h.Resolvable.makeResolvables(t),i.state)},t.prototype.previous=function(){return this._options.previous||null},t.prototype.options=function(){return this._options},t.prototype.entering=function(){return o.map(this._treeChanges.entering,s.prop("state")).map(m)},t.prototype.exiting=function(){return o.map(this._treeChanges.exiting,s.prop("state")).map(m).reverse()},t.prototype.retained=function(){return o.map(this._treeChanges.retained,s.prop("state")).map(m)},t.prototype.views=function(t,e){void 0===t&&(t="entering");var n=this._treeChanges[t];return n=e?n.filter(s.propEq("state",e)):n,n.map(s.prop("views")).filter(o.identity).reduce(o.unnestR,[])},t.prototype.redirect=function(e){var n=o.extend({},this.options(),e.options(),{previous:this});e=new f.TargetState(e.identifier(),e.$state(),e.params(),n);var r=new t(this._treeChanges.from,e,this._transitionService),i=e.options().reloadState,a=this.treeChanges().to,s=c.Node.matching(r.treeChanges().to,a).filter(function(t){return!i||!i.includes[t.state.name]}),u=function(t,e){return-1===["$stateParams","$transition$"].indexOf(e)};return s.forEach(function(t,e){return o.extend(t.resolves,o.filter(a[e].resolves,u))}),r},t.prototype._changedParams=function(){var t=this._treeChanges,e=t.to,n=t.from;if(!this._options.reload&&o.tail(e).state===o.tail(n).state){var r=e.map(function(t){return t.paramSchema}),i=[e,n].map(function(t){return t.map(function(t){return t.paramValues})}),a=i[0],s=i[1],u=o.arrayTuples(r,a,s);return u.map(function(t){var e=t[0],n=t[1],r=t[2];return p.Param.changed(e,n,r)}).reduce(o.unnestR,[])}},t.prototype.dynamic=function(){var t=this._changedParams();return t?t.map(function(t){return t.dynamic}).reduce(o.anyTrueR,!1):!1},t.prototype.ignored=function(){var t=this._changedParams();return t?0===t.length:!1},t.prototype.hookBuilder=function(){return new u.HookBuilder(this._transitionService,this,{transition:this,current:this._options.current})},t.prototype.run=function(){var t=this,e=this.hookBuilder(),n=u.TransitionHook.runSynchronousHooks,o=function(){return n(e.getOnSuccessHooks(),{},!0)},a=function(t){return n(e.getOnErrorHooks(),{$error$:t},!0)};this.promise.then(o,a);var s=n(e.getOnBeforeHooks());if(v.Rejection.isTransitionRejectionPromise(s)){s["catch"](function(){return 0});var c=s._transitionRejection;return this._deferred.reject(c),this.promise}if(!this.valid()){var l=new Error(this.error());return this._deferred.reject(l),this.promise}if(this.ignored())return r.trace.traceTransitionIgnored(this),this._deferred.reject(v.Rejection.ignored()),this.promise;var f=function(){t.success=!0,t._deferred.resolve(t),r.trace.traceSuccess(t.$to(),t)},p=function(e){return t.success=!1,t._deferred.reject(e),r.trace.traceError(e,t),i.services.$q.reject(e)};r.trace.traceTransitionStart(this);var h=e.asyncHooks().reduce(function(t,e){return t.then(e.invokeHook.bind(e))},s);return h.then(f,p),this.promise},t.prototype.valid=function(){return!this.error()},t.prototype.error=function(){var t=this.$to();return t.self[o.abstractKey]?"Cannot transition to abstract state '"+t.name+"'":p.Param.validates(t.parameters(),this.params())?void 0:"Param values not valid for state '"+t.name+"'"},t.prototype.toString=function(){var t=this.from(),e=this.to(),n=function(t){return null!==t["#"]&&void 0!==t["#"]?t:o.omit(t,"#")},r=this.$id,i=a.isObject(t)?t.name:t,u=o.toJson(n(this._treeChanges.from.map(s.prop("paramValues")).reduce(o.mergeR,{}))),c=this.valid()?"":"(X) ",l=a.isObject(e)?e.name:e,f=o.toJson(n(this.params()));return"Transition#"+r+"( '"+i+"'"+u+" -> "+c+"'"+l+"'"+f+" )"},t}();e.Transition=g},function(t,e,n){"use strict";function r(t){return t?"[ui-view#"+t.id+" tag in template from '"+(t.creationContext.name||"(root)")+"' state]: fqn: '"+t.fqn+"', name: '"+t.name+"@"+t.creationContext+"')":"ui-view (defunct)"}function i(t){return a.isNumber(t)?c[t]:c[c[t]]}var o=n(5),a=n(4),s=n(9),u=function(t){return"[ViewConfig from '"+(t.viewDecl.$context.name||"(root)")+"' state]: target ui-view: '"+t.viewDecl.$uiViewName+"@"+t.viewDecl.$uiViewContextAnchor+"'"};!function(t){t[t.RESOLVE=0]="RESOLVE",t[t.TRANSITION=1]="TRANSITION",t[t.HOOK=2]="HOOK",t[t.INVOKE=3]="INVOKE",t[t.UIVIEW=4]="UIVIEW",t[t.VIEWCONFIG=5]="VIEWCONFIG"}(e.Category||(e.Category={}));var c=e.Category,l=function(){function t(){this._enabled={},this.approximateDigests=0}return t.prototype._set=function(t,e){var n=this;e.length||(e=Object.keys(c).filter(function(t){return isNaN(parseInt(t,10))}).map(function(t){return c[t]})),e.map(i).forEach(function(e){return n._enabled[e]=t})},t.prototype.enable=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];this._set(!0,t)},t.prototype.disable=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];this._set(!1,t)},t.prototype.enabled=function(t){return!!this._enabled[i(t)]},t.prototype.traceTransitionStart=function(t){if(this.enabled(c.TRANSITION)){var e=t.$id,n=this.approximateDigests,r=s.stringify(t);console.log("Transition #"+e+" Digest #"+n+": Started -> "+r)}},t.prototype.traceTransitionIgnored=function(t){if(this.enabled(c.TRANSITION)){var e=t.$id,n=this.approximateDigests,r=s.stringify(t);console.log("Transition #"+e+" Digest #"+n+": Ignored <> "+r)}},t.prototype.traceHookInvocation=function(t,e){if(this.enabled(c.HOOK)){var n=o.parse("transition.$id")(e),r=this.approximateDigests,i=o.parse("traceData.hookType")(e)||"internal",a=o.parse("traceData.context.state.name")(e)||o.parse("traceData.context")(e)||"unknown",u=s.functionToString(t.fn);console.log("Transition #"+n+" Digest #"+r+": Hook -> "+i+" context: "+a+", "+s.maxLength(200,u))}},t.prototype.traceHookResult=function(t,e,n){if(this.enabled(c.HOOK)){var r=o.parse("transition.$id")(n),i=this.approximateDigests,a=s.stringify(t),u=s.stringify(e);console.log("Transition #"+r+" Digest #"+i+": <- Hook returned: "+s.maxLength(200,a)+", transition result: "+s.maxLength(200,u))}},t.prototype.traceResolvePath=function(t,e){if(this.enabled(c.RESOLVE)){var n=o.parse("transition.$id")(e),r=this.approximateDigests,i=t&&t.toString(),a=e&&e.resolvePolicy;console.log("Transition #"+n+" Digest #"+r+": Resolving "+i+" ("+a+")")}},t.prototype.traceResolvePathElement=function(t,e,n){if(this.enabled(c.RESOLVE)&&e.length){var r=o.parse("transition.$id")(n),i=this.approximateDigests,a=Object.keys(e).join(", "),s=t&&t.toString(),u=n&&n.resolvePolicy;console.log("Transition #"+r+" Digest #"+i+": Resolve "+s+" resolvables: ["+a+"] ("+u+")")}},t.prototype.traceResolveResolvable=function(t,e){if(this.enabled(c.RESOLVE)){var n=o.parse("transition.$id")(e),r=this.approximateDigests,i=t&&t.toString();console.log("Transition #"+n+" Digest #"+r+": Resolving -> "+i)}},t.prototype.traceResolvableResolved=function(t,e){if(this.enabled(c.RESOLVE)){var n=o.parse("transition.$id")(e),r=this.approximateDigests,i=t&&t.toString(),a=s.stringify(t.data);console.log("Transition #"+n+" Digest #"+r+": <- Resolved "+i+" to: "+s.maxLength(200,a))}},t.prototype.tracePathElementInvoke=function(t,e,n,r){if(this.enabled(c.INVOKE)){var i=o.parse("transition.$id")(r),a=this.approximateDigests,u=t&&t.state&&t.state.toString(),l=s.functionToString(e);console.log("Transition #"+i+" Digest #"+a+": Invoke "+r.when+": context: "+u+" "+s.maxLength(200,l))}},t.prototype.traceError=function(t,e){if(this.enabled(c.TRANSITION)){var n=e.$id,r=this.approximateDigests,i=s.stringify(e);console.log("Transition #"+n+" Digest #"+r+": <- Rejected "+i+", reason: "+t)}},t.prototype.traceSuccess=function(t,e){if(this.enabled(c.TRANSITION)){var n=e.$id,r=this.approximateDigests,i=t.name,o=s.stringify(e);console.log("Transition #"+n+" Digest #"+r+": <- Success "+o+", final state: "+i)}},t.prototype.traceUiViewEvent=function(t,e,n){void 0===n&&(n=""),this.enabled(c.UIVIEW)&&console.log("ui-view: "+s.padString(30,t)+" "+r(e)+n)},t.prototype.traceUiViewConfigUpdated=function(t,e){this.enabled(c.UIVIEW)&&this.traceUiViewEvent("Updating",t," with ViewConfig from context='"+e+"'")},t.prototype.traceUiViewScopeCreated=function(t,e){this.enabled(c.UIVIEW)&&this.traceUiViewEvent("Created scope for",t,", scope #"+e.$id)},t.prototype.traceUiViewFill=function(t,e){this.enabled(c.UIVIEW)&&this.traceUiViewEvent("Fill",t," with: "+s.maxLength(200,e))},t.prototype.traceViewServiceEvent=function(t,e){this.enabled(c.VIEWCONFIG)&&console.log("VIEWCONFIG: "+t+" "+u(e))},t.prototype.traceViewServiceUiViewEvent=function(t,e){this.enabled(c.VIEWCONFIG)&&console.log("VIEWCONFIG: "+t+" "+r(e))},t}();e.Trace=l;var f=new l;e.trace=f},function(t,e,n){"use strict";function r(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}r(n(14)),r(n(15)),r(n(10)),r(n(11)),r(n(16)),r(n(43))},function(t,e,n){"use strict";function r(t){return void 0===t&&(t=!1),function(e,n){var r=t?-1:1,i=(e.node.state.path.length-n.node.state.path.length)*r;return 0!==i?i:n.hook.priority-e.hook.priority}}var i=n(3),o=n(4),a=n(13),s=function(){function t(t,e,n){var o=this;this.$transitions=t,this.transition=e,this.baseHookOptions=n,this.getOnBeforeHooks=function(){return o._buildNodeHooks("onBefore","to",r(),void 0,{async:!1})},this.getOnStartHooks=function(){return o._buildNodeHooks("onStart","to",r())},this.getOnExitHooks=function(){return o._buildNodeHooks("onExit","exiting",r(!0),function(t){return{$state$:t.state}})},this.getOnRetainHooks=function(){return o._buildNodeHooks("onRetain","retained",r(),function(t){return{$state$:t.state}})},this.getOnEnterHooks=function(){return o._buildNodeHooks("onEnter","entering",r(),function(t){return{$state$:t.state}})},this.getOnFinishHooks=function(){return o._buildNodeHooks("onFinish","to",r(),function(t){return{$treeChanges$:o.treeChanges}})},this.getOnSuccessHooks=function(){return o._buildNodeHooks("onSuccess","to",r(),void 0,{async:!1,rejectIfSuperseded:!1})},this.getOnErrorHooks=function(){return o._buildNodeHooks("onError","to",r(),void 0,{async:!1,rejectIfSuperseded:!1})},this.treeChanges=e.treeChanges(),this.toState=i.tail(this.treeChanges.to).state,this.fromState=i.tail(this.treeChanges.from).state,this.transitionOptions=e.options()}return t.prototype.asyncHooks=function(){var t=this.getOnStartHooks(),e=this.getOnExitHooks(),n=this.getOnRetainHooks(),r=this.getOnEnterHooks(),o=this.getOnFinishHooks(),a=[t,e,n,r,o];return a.reduce(i.unnestR,[]).filter(i.identity)},t.prototype._buildNodeHooks=function(t,e,n,r,o){var s=this;void 0===r&&(r=function(t){return{}});var u=this._matchingHooks(t,this.treeChanges);if(!u)return[];var c=function(n){var u=n.matches(s.treeChanges),c=u[e];return c.map(function(e){var u=i.extend({bind:n.bind,traceData:{hookType:t,context:e}},s.baseHookOptions,o),c=new a.TransitionHook(n.callback,r(e),e.resolveContext,u);return{hook:n,node:e,transitionHook:c}})};return u.map(c).reduce(i.unnestR,[]).sort(n).map(function(t){return t.transitionHook})},t.prototype._matchingHooks=function(t,e){return[this.transition,this.$transitions].map(function(e){return e.getHooks(t)}).filter(i.assertPredicate(o.isArray,"broken event named: "+t)).reduce(i.unnestR,[]).filter(function(t){return t.matches(e)})},t}();e.HookBuilder=s},function(t,e,n){"use strict";function r(t,e){function n(t){for(var e=r,n=0;n<e.length;n++){var i=s.Glob.fromString(e[n]);if(i&&i.matches(t.name)||!i&&e[n]===t.name)return!0}return!1}var r=a.isString(e)?[e]:e,i=a.isFunction(r)?r:n;return!!i(t)}function i(t,e){return function(n,r,i){void 0===i&&(i={});var a=new u(n,r,i);return t[e].push(a),function(){o.removeFrom(t[e])(a)}}}var o=n(3),a=n(4),s=n(7);e.matchState=r;var u=function(){function t(t,e,n){void 0===n&&(n={}),this.callback=e,this.matchCriteria=o.extend({to:!0,from:!0,exiting:!0,retained:!0,entering:!0},t),this.priority=n.priority||0,this.bind=n.bind||null}return t._matchingNodes=function(t,e){if(e===!0)return t;var n=t.filter(function(t){return r(t.state,e)});return n.length?n:null},t.prototype.matches=function(e){var n=this.matchCriteria,r=t._matchingNodes,i={to:r([o.tail(e.to)],n.to),from:r([o.tail(e.from)],n.from),exiting:r(e.exiting,n.exiting),retained:r(e.retained,n.retained),entering:r(e.entering,n.entering)},a=["to","from","exiting","retained","entering"].map(function(t){return i[t]}).reduce(o.allTrueR,!0);return a?i:null},t}();e.EventHook=u;var c=function(){function t(){var t=this;this._transitionEvents={onBefore:[],onStart:[],onEnter:[],onRetain:[],onExit:[],onFinish:[],onSuccess:[],onError:[]},this.getHooks=function(e){return t._transitionEvents[e]},this.onBefore=i(this._transitionEvents,"onBefore"),this.onStart=i(this._transitionEvents,"onStart"),this.onEnter=i(this._transitionEvents,"onEnter"),this.onRetain=i(this._transitionEvents,"onRetain"),this.onExit=i(this._transitionEvents,"onExit"),this.onFinish=i(this._transitionEvents,"onFinish"),this.onSuccess=i(this._transitionEvents,"onSuccess"),this.onError=i(this._transitionEvents,"onError")}return t.mixin=function(t,e){Object.keys(t._transitionEvents).concat(["getHooks"]).forEach(function(n){return e[n]=t[n]})},t}();e.HookRegistry=c},function(t,e,n){"use strict";var r=n(3),i=n(9),o=n(4),a=n(5),s=n(12),u=n(6),c=n(10),l=n(17),f={async:!0,rejectIfSuperseded:!0,current:r.noop,transition:null,traceData:{},bind:null},p=function(){function t(t,e,n,i){var o=this;this.fn=t,this.locals=e,this.resolveContext=n,this.options=i,this.isSuperseded=function(){return o.options.current()!==o.options.transition},this.options=r.defaults(i,f)}return t.prototype.invokeHook=function(t){var e=this,n=this,i=n.options,o=n.fn,a=n.resolveContext,u=r.extend({},this.locals,t);if(s.trace.traceHookInvocation(this,i),i.rejectIfSuperseded&&this.isSuperseded())return c.Rejection.superseded(i.current()).toPromise();if(!i.async){var l=a.invokeNow(o,u,i);return this.handleHookResult(l)}return a.invokeLater(o,u,i).then(function(t){return e.handleHookResult(t)})},t.prototype.handleHookResult=function(t){var e=this;if(o.isDefined(t)){var n=a.pattern([[this.isSuperseded,function(){return c.Rejection.superseded(e.options.current()).toPromise()}],[a.eq(!1),function(){return c.Rejection.aborted("Hook aborted transition").toPromise()}],[a.is(l.TargetState),function(t){return c.Rejection.redirected(t).toPromise()}],[o.isPromise,function(t){return t.then(e.handleHookResult.bind(e))}]]),r=n(t);return r&&s.trace.traceHookResult(t,r,this.options),r}},t.prototype.toString=function(){var t=this,e=t.options,n=t.fn,r=a.parse("traceData.hookType")(e)||"internal",o=a.parse("traceData.context.state.name")(e)||a.parse("traceData.context")(e)||"unknown",s=i.fnToString(n);return r+" context: "+o+", "+i.maxLength(200,s)},t.runSynchronousHooks=function(t,e,n){void 0===e&&(e={}),void 0===n&&(n=!1);for(var r=[],i=0;i<t.length;i++)try{r.push(t[i].invokeHook(e))}catch(s){if(!n)return c.Rejection.aborted(s).toPromise();console.error("Swallowed exception during synchronous hook handler: "+s)}var l=r.filter(c.Rejection.isTransitionRejectionPromise);return l.length?l[0]:r.filter(o.isPromise).reduce(function(t,e){return t.then(a.val(e))},u.services.$q.when())},t}();e.TransitionHook=p},function(t,e,n){"use strict";function r(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}r(n(18)),r(n(19)),r(n(26)),r(n(33)),r(n(34)),r(n(35)),r(n(36)),r(n(37)),r(n(27))},function(t,e,n){"use strict";var r=n(4),i=n(3),o=function(){function t(e){this.stateRegistry=e,this.invalidCallbacks=[],i.bindFunctions(t.prototype,this,this)}return t.prototype.decorator=function(t,e){return this.stateRegistry.decorator(t,e)||this},t.prototype.state=function(t,e){return r.isObject(t)?e=t:e.name=t,this.stateRegistry.register(e),this},t.prototype.onInvalid=function(t){this.invalidCallbacks.push(t)},t}();e.StateProvider=o},function(t,e,n){"use strict";var r=n(3),i=n(4),o=n(5),a=n(20),s=function(t){if(!i.isString(t))return!1;var e="^"===t.charAt(0);return{val:e?t.substring(1):t,root:e}},u=function(){function t(t,e){this.matcher=t;var n=this,i=function(t){return""===t.name},u=function(){return t.find("")};this.builders={self:[function(t){return t.self.$$state=function(){return t},t.self}],parent:[function(e){return i(e)?null:t.find(n.parentName(e))||u()}],data:[function(t){return t.parent&&t.parent.data&&(t.data=t.self.data=r.inherit(t.parent.data,t.data)),t.data}],url:[function(t){var n=t,i=s(n.url),o=t.parent,a=i?e.compile(i.val,{params:t.params||{},paramMap:function(t,e){return n.reloadOnSearch===!1&&e&&(t=r.extend(t||{},{dynamic:!0})),t}}):n.url;if(!a)return null;if(!e.isMatcher(a))throw new Error("Invalid url '"+a+"' in state '"+t+"'");return i&&i.root?a:(o&&o.navigable||u()).url.append(a)}],navigable:[function(t){return!i(t)&&t.url?t:t.parent?t.parent.navigable:null}],params:[function(t){var e=function(t,e){return a.Param.fromConfig(e,null,t)},n=t.url&&t.url.parameters({inherit:!1})||[],i=r.values(r.map(r.omit(t.params||{},n.map(o.prop("id"))),e));return n.concat(i).map(function(t){return[t.id,t]}).reduce(r.applyPairs,{})}],views:[],path:[function(t){return t.parent?t.parent.path.concat(t):[t]}],includes:[function(t){var e=t.parent?r.extend({},t.parent.includes):{};return e[t.name]=!0,e}]}}return t.prototype.builder=function(t,e){var n=this.builders,r=n[t]||[];return i.isString(t)&&!i.isDefined(e)?r.length>1?r:r[0]:i.isString(t)&&i.isFunction(e)?(n[t]=r,n[t].push(e),function(){return n[t].splice(n[t].indexOf(e,1))&&null}):void 0},t.prototype.build=function(t){var e=this,n=e.matcher,i=e.builders,o=this.parentName(t);if(o&&!n.find(o))return null;for(var a in i)if(i.hasOwnProperty(a)){var s=i[a].reduce(function(t,e){return function(n){return e(n,t)}},r.noop);t[a]=s(t)}return t},t.prototype.parentName=function(t){var e=t.name||"";return-1!==e.indexOf(".")?e.substring(0,e.lastIndexOf(".")):t.parent?i.isString(t.parent)?t.parent:t.parent.name:""},t.prototype.name=function(t){var e=t.name;if(-1!==e.indexOf(".")||!t.parent)return e;var n=i.isString(t.parent)?t.parent:t.parent.name;return n?n+"."+e:e},t}();e.StateBuilder=u},function(t,e,n){"use strict";function r(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}r(n(21)),r(n(24)),r(n(25)),r(n(23))},function(t,e,n){
1776 "use strict";function r(t){return t=d(t)&&{value:t}||t,s.extend(t,{$$fn:c.isInjectable(t.value)?t.value:function(){return t.value}})}function i(t,e,n,r){if(t.type&&e&&"string"!==e.name)throw new Error("Param '"+r+"' has two type configurations.");return t.type&&e&&"string"===e.name&&h.paramTypes.type(t.type)?h.paramTypes.type(t.type):e?e:t.type?t.type instanceof p.Type?t.type:h.paramTypes.type(t.type):n===m.CONFIG?h.paramTypes.type("any"):h.paramTypes.type("string")}function o(t,e){var n=t.squash;if(!e||n===!1)return!1;if(!c.isDefined(n)||null==n)return f.matcherConfig.defaultSquashPolicy();if(n===!0||c.isString(n))return n;throw new Error("Invalid squash policy: '"+n+"'. Valid policies: false, true, or arbitrary string")}function a(t,e,n,r){var i,o,a=[{from:"",to:n||e?void 0:""},{from:null,to:n||e?void 0:""}];return i=c.isArray(t.replace)?t.replace:[],c.isString(r)&&i.push({from:r,to:void 0}),o=s.map(i,u.prop("from")),s.filter(a,function(t){return-1===o.indexOf(t.from)}).concat(i)}var s=n(3),u=n(5),c=n(4),l=n(6),f=n(22),p=n(23),h=n(24),v=Object.prototype.hasOwnProperty,d=function(t){return 0===["value","type","squash","array","dynamic"].filter(v.bind(t||{})).length};!function(t){t[t.PATH=0]="PATH",t[t.SEARCH=1]="SEARCH",t[t.CONFIG=2]="CONFIG"}(e.DefType||(e.DefType={}));var m=e.DefType,g=function(){function t(t,e,n,u){function c(){var e={array:u===m.SEARCH?"auto":!1},r=t.match(/\[\]$/)?{array:!0}:{};return s.extend(e,r,n).array}n=r(n),e=i(n,e,u,t);var l=c();e=l?e.$asArray(l,u===m.SEARCH):e;var f=void 0!==n.value,p=n.dynamic===!0,h=o(n,f),v=a(n,l,f,h);s.extend(this,{id:t,type:e,location:u,squash:h,replace:v,isOptional:f,dynamic:p,config:n,array:l})}return t.prototype.isDefaultValue=function(t){return this.isOptional&&this.type.equals(this.value(),t)},t.prototype.value=function(t){var e=this,n=function(){if(!l.services.$injector)throw new Error("Injectable functions cannot be called at configuration time");var t=l.services.$injector.invoke(e.config.$$fn);if(null!==t&&void 0!==t&&!e.type.is(t))throw new Error("Default value ("+t+") for parameter '"+e.id+"' is not an instance of Type ("+e.type.name+")");return t},r=function(t){var n=s.map(s.filter(e.replace,u.propEq("from",t)),u.prop("to"));return n.length?n[0]:t};return t=r(t),c.isDefined(t)?this.type.$normalize(t):n()},t.prototype.isSearch=function(){return this.location===m.SEARCH},t.prototype.validates=function(t){if((!c.isDefined(t)||null===t)&&this.isOptional)return!0;var e=this.type.$normalize(t);if(!this.type.is(e))return!1;var n=this.type.encode(e);return!(c.isString(n)&&!this.type.pattern.exec(n))},t.prototype.toString=function(){return"{Param:"+this.id+" "+this.type+" squash: '"+this.squash+"' optional: "+this.isOptional+"}"},t.fromConfig=function(e,n,r){return new t(e,n,r,m.CONFIG)},t.fromPath=function(e,n,r){return new t(e,n,r,m.PATH)},t.fromSearch=function(e,n,r){return new t(e,n,r,m.SEARCH)},t.values=function(t,e){return void 0===e&&(e={}),t.map(function(t){return[t.id,t.value(e[t.id])]}).reduce(s.applyPairs,{})},t.changed=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),t.filter(function(t){return!t.type.equals(e[t.id],n[t.id])})},t.equals=function(e,n,r){return void 0===n&&(n={}),void 0===r&&(r={}),0===t.changed(e,n,r).length},t.validates=function(t,e){return void 0===e&&(e={}),t.map(function(t){return t.validates(e[t.id])}).reduce(s.allTrueR,!0)},t}();e.Param=g},function(t,e,n){"use strict";var r=n(4),i=function(){function t(){this._isCaseInsensitive=!1,this._isStrictMode=!0,this._defaultSquashPolicy=!1}return t.prototype.caseInsensitive=function(t){return this._isCaseInsensitive=r.isDefined(t)?t:this._isCaseInsensitive},t.prototype.strictMode=function(t){return this._isStrictMode=r.isDefined(t)?t:this._isStrictMode},t.prototype.defaultSquashPolicy=function(t){if(r.isDefined(t)&&t!==!0&&t!==!1&&!r.isString(t))throw new Error("Invalid squash policy: "+t+". Valid policies: false, true, arbitrary-string");return this._defaultSquashPolicy=r.isDefined(t)?t:this._defaultSquashPolicy},t}();e.MatcherConfig=i,e.matcherConfig=new i},function(t,e,n){"use strict";function r(t,e){function n(t){return o.isArray(t)?t:o.isDefined(t)?[t]:[]}function r(t){switch(t.length){case 0:return;case 1:return"auto"===e?t[0]:t;default:return t}}function a(t,e){return function(a){if(o.isArray(a)&&0===a.length)return a;var s=n(a),u=i.map(s,t);return e===!0?0===i.filter(u,function(t){return!t}).length:r(u)}}function s(t){return function(e,r){var i=n(e),o=n(r);if(i.length!==o.length)return!1;for(var a=0;a<i.length;a++)if(!t(i[a],o[a]))return!1;return!0}}var u=this;["encode","decode","equals","$normalize"].map(function(e){u[e]=("equals"===e?s:a)(t[e].bind(t))}),i.extend(this,{name:t.name,pattern:t.pattern,is:a(t.is.bind(t),!0),$arrayMode:e})}var i=n(3),o=n(4),a=function(){function t(t){this.pattern=/.*/,i.extend(this,t)}return t.prototype.is=function(t,e){return!0},t.prototype.encode=function(t,e){return t},t.prototype.decode=function(t,e){return t},t.prototype.equals=function(t,e){return t==e},t.prototype.$subPattern=function(){var t=this.pattern.toString();return t.substr(1,t.length-2)},t.prototype.toString=function(){return"{Type:"+this.name+"}"},t.prototype.$normalize=function(t){return this.is(t)?t:this.decode(t)},t.prototype.$asArray=function(t,e){if(!t)return this;if("auto"===t&&!e)throw new Error("'auto' array mode is for query parameters only");return new r(this,t)},t}();e.Type=a},function(t,e,n){"use strict";function r(t){return null!=t?t.toString().replace(/~/g,"~~").replace(/\//g,"~2F"):t}function i(t){return null!=t?t.toString().replace(/~2F/g,"/").replace(/~~/g,"~"):t}var o=n(3),a=n(4),s=n(5),u=n(6),c=n(23),l=function(){function t(){this.enqueue=!0,this.typeQueue=[],this.defaultTypes={hash:{encode:r,decode:i,is:s.is(String),pattern:/.*/,equals:function(t,e){return t==e}},string:{encode:r,decode:i,is:s.is(String),pattern:/[^\/]*/},"int":{encode:r,decode:function(t){return parseInt(t,10)},is:function(t){return a.isDefined(t)&&this.decode(t.toString())===t},pattern:/-?\d+/},bool:{encode:function(t){return t&&1||0},decode:function(t){return 0!==parseInt(t,10)},is:s.is(Boolean),pattern:/0|1/},date:{encode:function(t){return this.is(t)?[t.getFullYear(),("0"+(t.getMonth()+1)).slice(-2),("0"+t.getDate()).slice(-2)].join("-"):void 0},decode:function(t){if(this.is(t))return t;var e=this.capture.exec(t);return e?new Date(e[1],e[2]-1,e[3]):void 0},is:function(t){return t instanceof Date&&!isNaN(t.valueOf())},equals:function(t,e){return["getFullYear","getMonth","getDate"].reduce(function(n,r){return n&&t[r]()===e[r]()},!0)},pattern:/[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,capture:/([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/},json:{encode:o.toJson,decode:o.fromJson,is:s.is(Object),equals:o.equals,pattern:/[^\/]*/},any:{encode:o.identity,decode:o.identity,equals:o.equals,pattern:/.*/}};var t=function(t,e){return new c.Type(o.extend({name:e},t))};this.types=o.inherit(o.map(this.defaultTypes,t),{})}return t.prototype.type=function(t,e,n){if(!a.isDefined(e))return this.types[t];if(this.types.hasOwnProperty(t))throw new Error("A type named '"+t+"' has already been defined.");return this.types[t]=new c.Type(o.extend({name:t},e)),n&&(this.typeQueue.push({name:t,def:n}),this.enqueue||this._flushTypeQueue()),this},t.prototype._flushTypeQueue=function(){for(;this.typeQueue.length;){var t=this.typeQueue.shift();if(t.pattern)throw new Error("You cannot override a type's .pattern at runtime.");o.extend(this.types[t.name],u.services.$injector.invoke(t.def))}},t}();e.ParamTypes=l,e.paramTypes=new l},function(t,e,n){"use strict";var r=n(3),i=function(){function t(t){void 0===t&&(t={}),r.extend(this,t)}return t.prototype.$inherit=function(t,e,n){var i,o=r.ancestors(e,n),a={},s=[];for(var u in o)if(o[u]&&o[u].params&&(i=Object.keys(o[u].params),i.length))for(var c in i)s.indexOf(i[c])>=0||(s.push(i[c]),a[i[c]]=this[i[c]]);return r.extend({},a,t)},t}();e.StateParams=i},function(t,e,n){"use strict";var r=n(10),i=n(27),o=n(28),a=n(29),s=n(30),u=n(6),c=function(){function t(t,e,n,r,i,c){this.transition=t,this.$transitions=e,this.$urlRouter=n,this.$view=r,this.$state=i,this.globals=c,this.$q=u.services.$q,this.viewHooks=new o.ViewHooks(t,r),this.enterExitHooks=new a.EnterExitHooks(t),this.resolveHooks=new s.ResolveHooks(t),this.treeChanges=t.treeChanges(),this.registerUpdateGlobalState(),this.viewHooks.registerHooks(),this.enterExitHooks.registerHooks(),this.resolveHooks.registerHooks()}return t.prototype.runTransition=function(){var t=this;return this.globals.transitionHistory.enqueue(this.transition),this.transition.run().then(function(t){return t.to()})["catch"](function(e){return t.transRejected(e)})},t.prototype.registerUpdateGlobalState=function(){this.transition.onSuccess({},this.updateUrl.bind(this),{priority:9999})},t.prototype.transRejected=function(t){var e=this,n=e.transition,o=e.$state,a=e.$q;if(t instanceof r.Rejection){if(t.type===r.RejectType.IGNORED)return this.$urlRouter.update(),o.current;if(t.type===r.RejectType.SUPERSEDED&&t.redirected&&t.detail instanceof i.TargetState)return this._redirectMgr(n.redirect(t.detail)).runTransition();t.type===r.RejectType.ABORTED&&this.$urlRouter.update()}return this.$transitions.defaultErrorHandler()(t),a.reject(t)},t.prototype.updateUrl=function(){var t=this.transition,e=this,n=e.$urlRouter,r=e.$state,i=t.options();i.location&&r.$current.navigable&&n.push(r.$current.navigable.url,r.params,{replace:"replace"===i.location}),n.update(!0)},t.prototype._redirectMgr=function(e){var n=this,r=n.$transitions,i=n.$urlRouter,o=n.$view,a=n.$state,s=n.globals;return new t(e,r,i,o,a,s)},t}();e.TransitionManager=c},function(t,e){"use strict";var n=function(){function t(t,e,n,r){void 0===n&&(n={}),void 0===r&&(r={}),this._identifier=t,this._definition=e,this._options=r,this._params=n||{}}return t.prototype.name=function(){return this._definition&&this._definition.name||this._identifier},t.prototype.identifier=function(){return this._identifier},t.prototype.params=function(){return this._params},t.prototype.$state=function(){return this._definition},t.prototype.state=function(){return this._definition&&this._definition.self},t.prototype.options=function(){return this._options},t.prototype.exists=function(){return!(!this._definition||!this._definition.self)},t.prototype.valid=function(){return!this.error()},t.prototype.error=function(){var t=this.options().relative;if(!this._definition&&t){var e=t.name?t.name:t;return"Could not resolve '"+this.name()+"' from state '"+e+"'"}return this._definition?this._definition.self?void 0:"State '"+this.name()+"' has an invalid definition":"No such state '"+this.name()+"'"},t}();e.TargetState=n},function(t,e,n){"use strict";var r=n(3),i=n(6),o=function(){function t(t,e){this.transition=t,this.$view=e,this.treeChanges=t.treeChanges(),this.enteringViews=t.views("entering"),this.exitingViews=t.views("exiting")}return t.prototype.loadAllEnteringViews=function(){return i.services.$q.all(this.enteringViews.map(function(t){return t.load()})).then(r.noop)},t.prototype.updateViews=function(){var t=this.$view;this.exitingViews.forEach(function(e){return t.deactivateViewConfig(e)}),this.enteringViews.forEach(function(e){return t.activateViewConfig(e)}),t.sync()},t.prototype.registerHooks=function(){this.enteringViews.length&&this.transition.onStart({},this.loadAllEnteringViews.bind(this)),(this.exitingViews.length||this.enteringViews.length)&&this.transition.onSuccess({},this.updateViews.bind(this))},t}();e.ViewHooks=o},function(t,e){"use strict";var n=function(){function t(t){this.transition=t}return t.prototype.registerHooks=function(){this.registerOnEnterHooks(),this.registerOnRetainHooks(),this.registerOnExitHooks()},t.prototype.registerOnEnterHooks=function(){var t=this;this.transition.entering().filter(function(t){return!!t.onEnter}).forEach(function(e){return t.transition.onEnter({entering:e.name},e.onEnter)})},t.prototype.registerOnRetainHooks=function(){var t=this;this.transition.retained().filter(function(t){return!!t.onRetain}).forEach(function(e){return t.transition.onRetain({retained:e.name},e.onRetain)})},t.prototype.registerOnExitHooks=function(){var t=this;this.transition.exiting().filter(function(t){return!!t.onExit}).forEach(function(e){return t.transition.onExit({exiting:e.name},e.onExit)})},t}();e.EnterExitHooks=n},function(t,e,n){"use strict";var r=n(3),i=n(5),o=n(31),a=n(5),s=n(32),u=o.ResolvePolicy[o.ResolvePolicy.LAZY],c=o.ResolvePolicy[o.ResolvePolicy.EAGER],l=function(){function t(t){this.transition=t}return t.prototype.registerHooks=function(){function t(t){return r.tail(n.to).resolveContext.resolvePath(r.extend({transition:t},{resolvePolicy:c}))}function e(t,e){var o=r.find(n.entering,i.propEq("state",t)),a=o.resolveContext,c=new s.Resolvable("$resolve$",function(){return r.map(a.getResolvables(),function(t){return t.data})}),l=r.extend({transition:e},{resolvePolicy:u});return a.resolvePathElement(o.state,l).then(function(){return c.resolveResolvable(a)}).then(function(){return a.addResolvables({$resolve$:c},o.state)})}var n=this.transition.treeChanges();t.$inject=["$transition$"],e.$inject=["$state$","$transition$"],this.transition.onStart({},t,{priority:1e3}),this.transition.onEnter({entering:a.val(!0)},e,{priority:1e3})},t}();e.ResolveHooks=l},function(t,e){"use strict";!function(t){t[t.JIT=0]="JIT",t[t.LAZY=1]="LAZY",t[t.EAGER=2]="EAGER"}(e.ResolvePolicy||(e.ResolvePolicy={}));e.ResolvePolicy},function(t,e,n){"use strict";var r=n(3),i=n(5),o=n(4),a=n(6),s=n(12),u=function(){function t(t,e,n){this.promise=void 0,r.extend(this,{name:t,resolveFn:e,deps:a.services.$injector.annotate(e,a.services.$injector.strictDi),data:n})}return t.prototype.resolveResolvable=function(t,e){var n=this;void 0===e&&(e={});var i=this,o=i.name,u=i.deps,c=i.resolveFn;s.trace.traceResolveResolvable(this,e);var l=a.services.$q.defer();this.promise=l.promise;var f=t.getResolvables(null,{omitOwnLocals:[o]}),p=r.pick(f,u),h=r.map(p,function(n){return n.get(t,e)});return a.services.$q.all(h).then(function(t){try{var e=a.services.$injector.invoke(c,null,t);l.resolve(e)}catch(r){l.reject(r)}return n.promise}).then(function(t){return n.data=t,s.trace.traceResolvableResolved(n,e),n.promise})},t.prototype.get=function(t,e){return this.promise||this.resolveResolvable(t,e)},t.prototype.toString=function(){return"Resolvable(name: "+this.name+", requires: ["+this.deps+"])"},t.makeResolvables=function(e){var n=r.filter(e,i.not(o.isInjectable)),a=Object.keys(n);if(a.length)throw new Error("Invalid resolve key/value: "+a[0]+"/"+n[a[0]]);return r.map(e,function(e,n){return new t(n,e)})},t}();e.Resolvable=u},function(t,e,n){"use strict";var r=n(3),i=n(5),o=function(){function t(t){r.extend(this,t)}return t.prototype.is=function(t){return this===t||this.self===t||this.fqn()===t},t.prototype.fqn=function(){if(!(this.parent&&this.parent instanceof this.constructor))return this.name;var t=this.parent.fqn();return t?t+"."+this.name:this.name},t.prototype.root=function(){return this.parent&&this.parent.root()||this},t.prototype.parameters=function(t){t=r.defaults(t,{inherit:!0});var e=t.inherit&&this.parent&&this.parent.parameters()||[];return e.concat(r.values(this.params))},t.prototype.parameter=function(t,e){return void 0===e&&(e={}),this.url&&this.url.parameter(t,e)||r.find(r.values(this.params),i.propEq("id",t))||e.inherit&&this.parent&&this.parent.parameter(t)},t.prototype.toString=function(){return this.fqn()},t}();e.State=o},function(t,e,n){"use strict";var r=n(4),i=function(){function t(t){this._states=t}return t.prototype.isRelative=function(t){return t=t||"",0===t.indexOf(".")||0===t.indexOf("^")},t.prototype.find=function(t,e){if(t||""===t){var n=r.isString(t),i=n?t:t.name;this.isRelative(i)&&(i=this.resolvePath(i,e));var o=this._states[i];return!o||!n&&(n||o!==t&&o.self!==t)?void 0:o}},t.prototype.resolvePath=function(t,e){if(!e)throw new Error("No reference point given for path '"+t+"'");for(var n=this.find(e),r=t.split("."),i=0,o=r.length,a=n;o>i;i++)if(""!==r[i]||0!==i){if("^"!==r[i])break;if(!a.parent)throw new Error("Path '"+t+"' not valid for state '"+n.name+"'");a=a.parent}else a=n;var s=r.slice(i).join(".");return a.name+(a.name&&s?".":"")+s},t}();e.StateMatcher=i},function(t,e,n){"use strict";var r=n(3),i=n(4),o=n(17),a=function(){function t(t,e,n){this.states=t,this.builder=e,this.$urlRouterProvider=n,this.queue=[]}return t.prototype.register=function(t){var e=this,n=e.states,a=e.queue,s=e.$state,u=r.inherit(new o.State,r.extend({},t,{self:t,resolve:t.resolve||{},toString:function(){return t.name}}));if(!i.isString(u.name))throw new Error("State must have a valid name");if(n.hasOwnProperty(u.name)||-1!==r.pluck(a,"name").indexOf(u.name))throw new Error("State '"+u.name+"' is already defined");return a.push(u),this.$state&&this.flush(s),u},t.prototype.flush=function(t){for(var e,n,r,i=this,o=i.queue,a=i.states,s=i.builder,u=[],c={};o.length>0;)if(n=o.shift(),e=s.build(n),r=u.indexOf(n),e){if(a.hasOwnProperty(n.name))throw new Error("State '"+name+"' is already defined");a[n.name]=n,this.attachRoute(t,n),r>=0&&u.splice(r,1)}else{var l=c[n.name];if(c[n.name]=o.length,r>=0&&l===o.length)return a;0>r&&u.push(n),o.push(n)}return a},t.prototype.autoFlush=function(t){this.$state=t,this.flush(t)},t.prototype.attachRoute=function(t,e){var n=this.$urlRouterProvider;!e[r.abstractKey]&&e.url&&n.when(e.url,["$match","$stateParams",function(n,i){t.$current.navigable===e&&r.equalForKeys(n,i)||t.transitionTo(e,n,{inherit:!0,location:!1})}])},t}();e.StateQueueManager=a},function(t,e,n){"use strict";var r=n(34),i=n(19),o=n(35),a=function(){function t(t,e){this.states={},this.matcher=new r.StateMatcher(this.states),this.builder=new i.StateBuilder(this.matcher,t),this.stateQueue=new o.StateQueueManager(this.states,this.builder,e);var n={name:"",url:"^",views:null,params:{"#":{value:null,type:"hash",dynamic:!0}},"abstract":!0},a=this._root=this.stateQueue.register(n);a.navigable=null}return t.prototype.root=function(){return this._root},t.prototype.register=function(t){return this.stateQueue.register(t)},t.prototype.get=function(t,e){var n=this;if(0===arguments.length)return Object.keys(this.states).map(function(t){return n.states[t].self});var r=this.matcher.find(t,e);return r&&r.self||null},t.prototype.decorator=function(t,e){return this.builder.builder(t,e)},t}();e.StateRegistry=a},function(t,e,n){"use strict";var r=n(3),i=n(4),o=n(8),a=n(6),s=n(38),u=n(39),c=n(43),l=n(10),f=n(27),p=n(26),h=n(21),v=n(7),d=n(3),m=n(3),g=function(){function t(e,n,r,i,o,a){this.$view=e,this.$urlRouter=n,this.$transitions=r,this.stateRegistry=i,this.stateProvider=o,this.globals=a;var s=["current","$current","params","transition"],u=Object.keys(t.prototype).filter(function(t){return-1===s.indexOf(t)});m.bindFunctions(t.prototype,this,this,u)}return Object.defineProperty(t.prototype,"transition",{get:function(){return this.globals.transition},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"params",{get:function(){return this.globals.params},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"current",{get:function(){return this.globals.current},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"$current",{get:function(){return this.globals.$current},enumerable:!0,configurable:!0}),t.prototype._handleInvalidTargetState=function(t,e){function n(){var t=p.dequeue();return void 0===t?l.Rejection.invalid(e.error()).toPromise():d(t).then(m).then(function(t){return t||n()})}var r=this,i=function(){return r.globals.transitionHistory.peekTail()},u=i(),c=s.PathFactory.makeTargetState(t),p=new o.Queue([].concat(this.stateProvider.invalidCallbacks)),h=a.services.$q,v=a.services.$injector,d=function(t){return h.when(v.invoke(t,null,{$to$:e,$from$:c}))},m=function(t){if(t instanceof f.TargetState){var e=t;return e=r.target(e.identifier(),e.params(),e.options()),e.valid()?i()!==u?l.Rejection.superseded().toPromise():r.transitionTo(e.identifier(),e.params(),e.options()):l.Rejection.invalid(e.error()).toPromise()}};return n()},t.prototype.reload=function(t){return this.transitionTo(this.current,this.params,{reload:i.isDefined(t)?t:!0,inherit:!1,notify:!1})},t.prototype.go=function(t,e,n){var i={relative:this.$current,inherit:!0},o=r.defaults(n,i,c.defaultTransOpts);return this.transitionTo(t,e,o)},t.prototype.target=function(t,e,n){if(void 0===n&&(n={}),i.isObject(n.reload)&&!n.reload.name)throw new Error("Invalid reload state object");if(n.reloadState=n.reload===!0?this.stateRegistry.root():this.stateRegistry.matcher.find(n.reload,n.relative),n.reload&&!n.reloadState)throw new Error("No such reload state '"+(i.isString(n.reload)?n.reload:n.reload.name)+"'");var r=this.stateRegistry.matcher.find(t,n.relative);return new f.TargetState(t,r,e,n)},t.prototype.transitionTo=function(t,e,n){var i=this;void 0===e&&(e={}),void 0===n&&(n={});var o=this.globals.transitionHistory;n=r.defaults(n,c.defaultTransOpts),n=r.extend(n,{current:o.peekTail.bind(o)});var l=this.target(t,e,n),f=this.globals.successfulTransitions.peekTail(),h=function(){return s.PathFactory.bindTransNodesToPath([new u.Node(i.stateRegistry.root())])},v=f?f.treeChanges().to:h();if(!l.exists())return this._handleInvalidTargetState(v,l);if(!l.valid())return a.services.$q.reject(l.error());var d=this.$transitions.create(v,l),m=new p.TransitionManager(d,this.$transitions,this.$urlRouter,this.$view,this,this.globals),g=m.runTransition();return r.extend(g,{transition:d})},t.prototype.is=function(t,e,n){n=r.defaults(n,{relative:this.$current});var o=this.stateRegistry.matcher.find(t,n.relative);if(i.isDefined(o))return this.$current!==o?!1:i.isDefined(e)&&null!==e?h.Param.equals(o.parameters(),this.params,e):!0},t.prototype.includes=function(t,e,n){n=r.defaults(n,{relative:this.$current});var o=i.isString(t)&&v.Glob.fromString(t);if(o){if(!o.matches(this.$current.name))return!1;t=this.$current.name}var a=this.stateRegistry.matcher.find(t,n.relative),s=this.$current.includes;if(i.isDefined(a))return i.isDefined(s[a.name])?e?d.equalForKeys(h.Param.values(a.parameters(),e),this.params,Object.keys(e)):!0:!1},t.prototype.href=function(t,e,n){var o={lossy:!0,inherit:!0,absolute:!1,relative:this.$current};n=r.defaults(n,o);var a=this.stateRegistry.matcher.find(t,n.relative);if(!i.isDefined(a))return null;n.inherit&&(e=this.params.$inherit(e||{},this.$current,a));var s=a&&n.lossy?a.navigable:a;return s&&void 0!==s.url&&null!==s.url?this.$urlRouter.href(s.url,h.Param.values(a.parameters(),e),{absolute:n.absolute}):null},t.prototype.get=function(t,e){return 0===arguments.length?this.stateRegistry.get():this.stateRegistry.get(t,e||this.$current)},t}();e.StateService=g},function(t,e,n){"use strict";var r=n(3),i=n(5),o=n(17),a=n(39),s=n(40),u=function(){function t(){}return t.makeTargetState=function(t){var e=r.tail(t).state;return new o.TargetState(e,e,t.map(i.prop("paramValues")).reduce(r.mergeR,{}))},t.buildPath=function(t){var e=t.params();return t.$state().path.map(function(t){return new a.Node(t).applyRawParams(e)})},t.buildToPath=function(e,n){var r=t.buildPath(n);return n.options().inherit?t.inheritParams(e,r,Object.keys(n.params())):r},t.applyViewConfigs=function(t,e){return e.map(function(e){var n=r.values(e.state.views||{}),i=n.map(function(n){return t.createViewConfig(e,n)}).reduce(r.unnestR,[]);return r.extend(e,{views:i})})},t.inheritParams=function(t,e,n){function o(t,e){var n=r.find(t,i.propEq("state",e));return r.extend({},n&&n.paramValues)}void 0===n&&(n=[]);var s=i.curry(function(t,e,n){var i=r.extend({},n&&n.paramValues),s=r.pick(i,e);i=r.omit(i,e);var u=o(t,n.state)||{},c=r.extend(i,u,s);return new a.Node(n.state).applyRawParams(c)});return e.map(s(t,n))},t.bindTransNodesToPath=function(t){var e=new s.ResolveContext(t);return t.forEach(function(t){t.resolveContext=e.isolateRootTo(t.state),t.resolveInjector=new s.ResolveInjector(t.resolveContext,t.state),t.resolves.$stateParams=new s.Resolvable("$stateParams",function(){return t.paramValues},t.paramValues)}),t},t.treeChanges=function(e,n,r){function o(t,e){var r=a.Node.clone(t);return r.paramValues=n[e].paramValues,r}for(var s=0,u=Math.min(e.length,n.length),c=function(t){return t.parameters({inherit:!1}).filter(i.not(i.prop("dynamic"))).map(i.prop("id"))},l=function(t,e){return t.equals(e,c(t.state))};u>s&&e[s].state!==r&&l(e[s],n[s]);)s++;var f,p,h,v,d,m,g,y;return f=e,p=f.slice(0,s),h=f.slice(s),m=p.map(o),g=n.slice(s),y=m.concat(g),d=t.bindTransNodesToPath(y),v=d.slice(s),{from:f,to:d,retained:p,exiting:h,entering:v}},t.bindTransitionResolve=function(t,e){var n=t.to[0];n.resolves.$transition$=new s.Resolvable("$transition$",function(){return e},e)},t.subPath=function(t,e){var n=r.find(t,function(t){return t.state===e}),i=t.indexOf(n);if(-1===i)throw new Error("The path does not contain the state: "+e);return t.slice(0,i+1)},t.paramValues=function(t){return t.reduce(function(t,e){return r.extend(t,e.paramValues)},{})},t}();e.PathFactory=u},function(t,e,n){"use strict";var r=n(3),i=n(5),o=n(40),a=function(){function t(e){if(e instanceof t){var n=e;this.state=n.state,this.paramSchema=n.paramSchema.slice(),this.paramValues=r.extend({},n.paramValues),this.resolves=r.extend({},n.resolves),this.views=n.views&&n.views.slice(),this.resolveContext=n.resolveContext,this.resolveInjector=n.resolveInjector}else this.state=e,this.paramSchema=e.parameters({inherit:!1}),this.paramValues={},this.resolves=r.mapObj(e.resolve,function(t,e){return new o.Resolvable(e,t)})}return t.prototype.applyRawParams=function(t){var e=function(e){return[e.id,e.value(t[e.id])]};return this.paramValues=this.paramSchema.reduce(function(t,n){return r.applyPairs(t,e(n))},{}),this},t.prototype.parameter=function(t){return r.find(this.paramSchema,i.propEq("id",t))},t.prototype.equals=function(t,e){var n=this;void 0===e&&(e=this.paramSchema.map(i.prop("id")));var o=function(e){return n.parameter(e).type.equals(n.paramValues[e],t.paramValues[e])};return this.state===t.state&&e.map(o).reduce(r.allTrueR,!0)},t.clone=function(e){return new t(e)},t.matching=function(t,e){var n=t.reduce(function(t,n,r){return t===r&&r<e.length&&n.state===e[r].state?r+1:t},0);return t.slice(0,n)},t}();e.Node=a},function(t,e,n){"use strict";function r(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}r(n(31)),r(n(32)),r(n(41)),r(n(42))},function(t,e,n){"use strict";function r(t,e){var n=a.isString(t)?t:null,r=a.isObject(t)?t:{},i=r[e.name]||n||p;return c.ResolvePolicy[i]}var i=n(3),o=n(5),a=n(4),s=n(12),u=n(6),c=n(31),l=n(3),f=n(38),p=c.ResolvePolicy[c.ResolvePolicy.LAZY],h=function(){function t(t){this._path=t,i.extend(this,{_nodeFor:function(t){return i.find(this._path,o.propEq("state",t))},_pathTo:function(t){return f.PathFactory.subPath(this._path,t)}})}return t.prototype.getResolvables=function(t,e){e=i.defaults(e,{omitOwnLocals:[]});var n=t?this._pathTo(t):this._path,r=i.tail(n);return n.reduce(function(t,n){var o=n===r?e.omitOwnLocals:[],a=i.omit(n.resolves,o);return i.extend(t,a)},{})},t.prototype.getResolvablesForFn=function(t){var e=u.services.$injector.annotate(t,u.services.$injector.strictDi);return i.pick(this.getResolvables(),e)},t.prototype.isolateRootTo=function(e){return new t(this._pathTo(e))},t.prototype.addResolvables=function(t,e){i.extend(this._nodeFor(e).resolves,t)},t.prototype.getOwnResolvables=function(t){return i.extend({},this._nodeFor(t).resolves)},t.prototype.resolvePath=function(t){var e=this;void 0===t&&(t={}),s.trace.traceResolvePath(this._path,t);var n=function(n){return e.resolvePathElement(n.state,t)};return u.services.$q.all(i.map(this._path,n)).then(function(t){return t.reduce(l.mergeR,{})})},t.prototype.resolvePathElement=function(t,e){var n=this;void 0===e&&(e={});var o=e&&e.resolvePolicy,a=c.ResolvePolicy[o||p],l=this.getOwnResolvables(t),f=function(e){return r(t.resolvePolicy,e)>=a},h=i.filter(l,f),v=function(r){return r.get(n.isolateRootTo(t),e)},d=i.map(h,v);return s.trace.traceResolvePathElement(this,h,e),u.services.$q.all(d)},t.prototype.invokeLater=function(t,e,n){var r=this;void 0===e&&(e={}),void 0===n&&(n={});var o=this.getResolvablesForFn(t);s.trace.tracePathElementInvoke(i.tail(this._path),t,Object.keys(o),i.extend({when:"Later"},n));var a=function(t){return t.get(r,n)},c=i.map(o,a);return u.services.$q.all(c).then(function(){try{return r.invokeNow(t,e,n)}catch(i){return u.services.$q.reject(i)}})},t.prototype.invokeNow=function(t,e,n){void 0===n&&(n={});var r=this.getResolvablesForFn(t);s.trace.tracePathElementInvoke(i.tail(this._path),t,Object.keys(r),i.extend({when:"Now "},n));var a=i.map(r,o.prop("data"));return u.services.$injector.invoke(t,n.bind||null,i.extend({},e,a))},t}();e.ResolveContext=h},function(t,e,n){"use strict";var r=n(3),i=function(){function t(t,e){this._resolveContext=t,this._state=e}return t.prototype.invokeLater=function(t,e){return this._resolveContext.invokeLater(t,e)},t.prototype.invokeNow=function(t,e){return this._resolveContext.invokeNow(null,t,e)},t.prototype.getLocals=function(t){var e=this,n=function(t){return t.get(e._resolveContext)};return r.map(this._resolveContext.getResolvablesForFn(t),n)},t}();e.ResolveInjector=i},function(t,e,n){"use strict";var r=n(11),i=n(15);e.defaultTransOpts={location:!0,relative:null,inherit:!1,notify:!0,reload:!1,custom:{},current:function(){return null}};var o=function(){function t(t){this.$view=t,this._defaultErrorHandler=function(t){t instanceof Error&&console.error(t)},i.HookRegistry.mixin(new i.HookRegistry,this)}return t.prototype.defaultErrorHandler=function(t){return this._defaultErrorHandler=t||this._defaultErrorHandler},t.prototype.create=function(t,e){return new r.Transition(t,e,this)},t}();e.TransitionService=o},function(t,e,n){"use strict";function r(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}r(n(39)),r(n(38))},function(t,e,n){"use strict";function r(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}r(n(46)),r(n(22)),r(n(47)),r(n(48))},function(t,e,n){"use strict";function r(t,e){var n=["",""],r=t.replace(/[\\\[\]\^$*+?.()|{}]/g,"\\$&");if(!e)return r;switch(e.squash){case!1:n=["(",")"+(e.isOptional?"?":"")];break;case!0:r=r.replace(/\/$/,""),n=["(?:/(",")|/)?"];break;default:n=["("+e.squash+"|",")?"]}return r+n[0]+e.type.pattern.source+n[1]}var i=n(3),o=n(5),a=n(4),s=n(20),u=n(4),c=n(21),l=n(3),f=n(3),p=function(t,e,n){return t[e]=t[e]||n()},h=function(){function t(e,n){var a=this;this.pattern=e,this.config=n,this._cache={path:[],pattern:null},this._children=[],this._params=[],this._segments=[],this._compiled=[],this.config=i.defaults(this.config,{params:{},strict:!0,caseInsensitive:!1,paramMap:i.identity});for(var u,c,l,f=/([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,p=/([:]?)([\w\[\].-]+)|\{([\w\[\].-]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,h=0,v=[],d=function(n){if(!t.nameValidator.test(n))throw new Error("Invalid parameter name '"+n+"' in pattern '"+e+"'");if(i.find(a._params,o.propEq("id",n)))throw new Error("Duplicate parameter name '"+n+"' in pattern '"+e+"'")},m=function(t,n){var r=t[2]||t[3],o=n?t[4]:t[4]||("*"===t[1]?".*":null);return{id:r,regexp:o,cfg:a.config.params[r],segment:e.substring(h,t.index),type:o?s.paramTypes.type(o||"string")||i.inherit(s.paramTypes.type("string"),{pattern:new RegExp(o,a.config.caseInsensitive?"i":void 0)}):null}};(u=f.exec(e))&&(c=m(u,!1),!(c.segment.indexOf("?")>=0));)d(c.id),this._params.push(s.Param.fromPath(c.id,c.type,this.config.paramMap(c.cfg,!1))),this._segments.push(c.segment),v.push([c.segment,i.tail(this._params)]),h=f.lastIndex;l=e.substring(h);var g=l.indexOf("?");if(g>=0){var y=l.substring(g);if(l=l.substring(0,g),y.length>0)for(h=0;u=p.exec(y);)c=m(u,!0),d(c.id),this._params.push(s.Param.fromSearch(c.id,c.type,this.config.paramMap(c.cfg,!0))),h=f.lastIndex}this._segments.push(l),i.extend(this,{_compiled:v.map(function(t){return r.apply(null,t)}).concat(r(l)),prefix:this._segments[0]
1777 }),Object.freeze(this)}return t.prototype.append=function(t){return this._children.push(t),i.forEach(t._cache,function(e,n){return t._cache[n]=a.isArray(e)?[]:null}),t._cache.path=this._cache.path.concat(this),t},t.prototype.isRoot=function(){return 0===this._cache.path.length},t.prototype.toString=function(){return this.pattern},t.prototype.exec=function(t,e,n,r){function a(t){var e=function(t){return t.split("").reverse().join("")},n=function(t){return t.replace(/\\-/g,"-")},r=e(t).split(/-(?!\\)/),o=i.map(r,e);return i.map(o,n).reverse()}var s=this;void 0===e&&(e={}),void 0===r&&(r={});var c=p(this._cache,"pattern",function(){return new RegExp(["^",i.unnest(s._cache.path.concat(s).map(o.prop("_compiled"))).join(""),s.config.strict===!1?"/?":"","$"].join(""),s.config.caseInsensitive?"i":void 0)}).exec(t);if(!c)return null;var l=this.parameters(),f=l.filter(function(t){return!t.isSearch()}),h=l.filter(function(t){return t.isSearch()}),v=this._cache.path.concat(this).map(function(t){return t._segments.length-1}).reduce(function(t,e){return t+e}),d={};if(v!==c.length-1)throw new Error("Unbalanced capture group in route '"+this.pattern+"'");for(var m=0;v>m;m++){for(var g=f[m],y=c[m+1],w=0;w<g.replace.length;w++)g.replace[w].from===y&&(y=g.replace[w].to);y&&g.array===!0&&(y=a(y)),u.isDefined(y)&&(y=g.type.decode(y)),d[g.id]=g.value(y)}return i.forEach(h,function(t){for(var n=e[t.id],r=0;r<t.replace.length;r++)t.replace[r].from===n&&(n=t.replace[r].to);u.isDefined(n)&&(n=t.type.decode(n)),d[t.id]=t.value(n)}),n&&(d["#"]=n),d},t.prototype.parameters=function(t){return void 0===t&&(t={}),t.inherit===!1?this._params:i.unnest(this._cache.path.concat(this).map(o.prop("_params")))},t.prototype.parameter=function(t,e){void 0===e&&(e={});var n=i.tail(this._cache.path);return i.find(this._params,o.propEq("id",t))||e.inherit!==!1&&n&&n.parameter(t)||null},t.prototype.validates=function(t){var e=this,n=function(t,e){return!t||t.validates(e)};return i.pairs(t||{}).map(function(t){var r=t[0],i=t[1];return n(e.parameter(r),i)}).reduce(i.allTrueR,!0)},t.prototype.format=function(e){function n(t){var n=t.value(e[t.id]),r=t.isDefaultValue(n),i=r?t.squash:!1,o=t.type.encode(n);return{param:t,value:n,isDefaultValue:r,squash:i,encoded:o}}if(void 0===e&&(e={}),!this.validates(e))return null;var r=this._cache.path.slice().concat(this),o=r.map(t.pathSegmentsAndParams).reduce(l.unnestR,[]),s=r.map(t.queryParams).reduce(l.unnestR,[]),u=o.reduce(function(e,r){if(a.isString(r))return e+r;var o=n(r),s=o.squash,u=o.encoded,c=o.param;return s===!0?e.match(/\/$/)?e.slice(0,-1):e:a.isString(s)?e+s:s!==!1?e:null==u?e:a.isArray(u)?e+i.map(u,t.encodeDashes).join("-"):c.type.raw?e+u:e+encodeURIComponent(u)},""),c=s.map(function(t){var e=n(t),r=e.squash,o=e.encoded,s=e.isDefaultValue;if(!(null==o||s&&r!==!1)&&(a.isArray(o)||(o=[o]),0!==o.length))return t.type.raw||(o=i.map(o,encodeURIComponent)),o.map(function(e){return t.id+"="+e})}).filter(i.identity).reduce(l.unnestR,[]).join("&");return u+(c?"?"+c:"")+(e["#"]?"#"+e["#"]:"")},t.encodeDashes=function(t){return encodeURIComponent(t).replace(/-/g,function(t){return"%5C%"+t.charCodeAt(0).toString(16).toUpperCase()})},t.pathSegmentsAndParams=function(t){var e=t._segments,n=t._params.filter(function(t){return t.location===c.DefType.PATH});return f.arrayTuples(e,n.concat(void 0)).reduce(l.unnestR,[]).filter(function(t){return""!==t&&u.isDefined(t)})},t.queryParams=function(t){return t._params.filter(function(t){return t.location===c.DefType.SEARCH})},t.nameValidator=/^\w+([-.]+\w+)*(?:\[\])?$/,t}();e.UrlMatcher=h},function(t,e,n){"use strict";function r(){return{strict:a.matcherConfig.strictMode(),caseInsensitive:a.matcherConfig.caseInsensitive()}}var i=n(3),o=n(4),a=n(45),s=n(20),u=function(){function t(){i.extend(this,{UrlMatcher:a.UrlMatcher,Param:s.Param})}return t.prototype.caseInsensitive=function(t){return a.matcherConfig.caseInsensitive(t)},t.prototype.strictMode=function(t){return a.matcherConfig.strictMode(t)},t.prototype.defaultSquashPolicy=function(t){return a.matcherConfig.defaultSquashPolicy(t)},t.prototype.compile=function(t,e){return new a.UrlMatcher(t,i.extend(r(),e))},t.prototype.isMatcher=function(t){if(!o.isObject(t))return!1;var e=!0;return i.forEach(a.UrlMatcher.prototype,function(n,r){o.isFunction(n)&&(e=e&&o.isDefined(t[r])&&o.isFunction(t[r]))}),e},t.prototype.type=function(t,e,n){var r=s.paramTypes.type(t,e,n);return o.isDefined(e)?this:r},t.prototype.$get=function(){return s.paramTypes.enqueue=!1,s.paramTypes._flushTypeQueue(),this},t}();e.UrlMatcherFactory=u},function(t,e,n){"use strict";function r(t){var e=/^\^((?:\\[^a-zA-Z0-9]|[^\\\[\]\^$*+?.()|{}]+)*)/.exec(t.source);return null!=e?e[1].replace(/\\(.)/g,"$1"):""}function i(t,e){return t.replace(/\$(\$|\d{1,2})/,function(t,n){return e["$"===n?0:Number(n)]})}function o(t,e,n,r){if(!r)return!1;var i=t.invoke(n,n,{$match:r,$stateParams:e});return c.isDefined(i)?i:!0}function a(t,e,n){var r=l.services.locationConfig.baseHref();return"/"===r?t:e?r.slice(0,-1)+t:n?r.slice(1)+t:t}function s(t,e,n){function r(t){var e=t(l.services.$injector,f);return e?(c.isString(e)&&(f.replace(),f.url(e)),!0):!1}if(!n||!n.defaultPrevented){var i,o=t.length;for(i=0;o>i;i++)if(r(t[i]))return;e&&r(e)}}var u=n(3),c=n(4),l=n(6),f=l.services.location,p=function(){function t(t,e){this.$urlMatcherFactory=t,this.$stateParams=e,this.rules=[],this.otherwiseFn=null,this.interceptDeferred=!1}return t.prototype.rule=function(t){if(!c.isFunction(t))throw new Error("'rule' must be a function");return this.rules.push(t),this},t.prototype.otherwise=function(t){if(!c.isFunction(t)&&!c.isString(t))throw new Error("'rule' must be a string or function");return this.otherwiseFn=c.isString(t)?function(){return t}:t,this},t.prototype.when=function(t,e){var n,a=this,s=a.$urlMatcherFactory,p=a.$stateParams,h=c.isString(e);if(c.isString(t)&&(t=s.compile(t)),!h&&!c.isFunction(e)&&!c.isArray(e))throw new Error("invalid 'handler' in when()");var v={matcher:function(t,e){return h&&(n=s.compile(e),e=["$match",n.format.bind(n)]),u.extend(function(){return o(l.services.$injector,p,e,t.exec(f.path(),f.search(),f.hash()))},{prefix:c.isString(t.prefix)?t.prefix:""})},regex:function(t,e){if(t.global||t.sticky)throw new Error("when() RegExp must not be global or sticky");return h&&(n=e,e=["$match",function(t){return i(n,t)}]),u.extend(function(){return o(l.services.$injector,p,e,t.exec(f.path()))},{prefix:r(t)})}},d={matcher:s.isMatcher(t),regex:t instanceof RegExp};for(var m in d)if(d[m])return this.rule(v[m](t,e));throw new Error("invalid 'what' in when()")},t.prototype.deferIntercept=function(t){void 0===t&&(t=!0),this.interceptDeferred=t},t}();e.UrlRouterProvider=p;var h=function(){function t(e){this.urlRouterProvider=e,u.bindFunctions(t.prototype,this,this)}return t.prototype.sync=function(){s(this.urlRouterProvider.rules,this.urlRouterProvider.otherwiseFn)},t.prototype.listen=function(){var t=this;return this.listener=this.listener||f.onChange(function(e){return s(t.urlRouterProvider.rules,t.urlRouterProvider.otherwiseFn,e)})},t.prototype.update=function(t){return t?void(this.location=f.url()):void(f.url()!==this.location&&(f.url(this.location),f.replace()))},t.prototype.push=function(t,e,n){f.url(t.format(e||{})),n&&n.replace&&f.replace()},t.prototype.href=function(t,e,n){if(!t.validates(e))return null;var r=t.format(e);n=n||{};var i=l.services.locationConfig,o=i.html5Mode();if(o||null===r||(r="#"+i.hashPrefix()+r),r=a(r,o,n.absolute),!n.absolute||!r)return r;var s=!o&&r?"/":"",u=i.port();return u=80===u||443===u?"":":"+u,[i.protocol(),"://",i.host(),u,s,r].join("")},t}();e.UrlRouter=h},function(t,e,n){"use strict";function r(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}r(n(50))},function(t,e,n){"use strict";var r=n(3),i=n(5),o=n(4),a=n(2),s=function(){function t(){var t=this;this.uiViews=[],this.viewConfigs=[],this._viewConfigFactories={},this.sync=function(){function e(t){return t.fqn.split(".").length}function n(t){for(var e=t.viewDecl.$context,n=0;++n&&e.parent;)e=e.parent;return n}var o=t.uiViews.map(function(t){return[t.fqn,t]}).reduce(r.applyPairs,{}),a=function(t){return function(e){if(t.$type!==e.viewDecl.$type)return!1;var n=e.viewDecl,i=n.$uiViewName.split("."),a=t.fqn.split(".");if(!r.equals(i,a.slice(0-i.length)))return!1;var s=1-i.length||void 0,u=a.slice(0,s).join("."),c=o[u].creationContext;return n.$uiViewContextAnchor===(c&&c.name)}},s=i.curry(function(t,e,n,r){return e*(t(n)-t(r))}),u=function(e){var r=t.viewConfigs.filter(a(e));return r.length>1&&r.sort(s(n,-1)),[e,r[0]]},c=function(e){var n=e[0],r=e[1];-1!==t.uiViews.indexOf(n)&&n.configUpdated(r)};t.uiViews.sort(s(e,1)).map(u).forEach(c)}}return t.prototype.rootContext=function(t){return this._rootContext=t||this._rootContext},t.prototype.viewConfigFactory=function(t,e){this._viewConfigFactories[t]=e},t.prototype.createViewConfig=function(t,e){var n=this._viewConfigFactories[e.$type];if(!n)throw new Error("ViewService: No view config factory registered for type "+e.$type);var r=n(t,e);return o.isArray(r)?r:[r]},t.prototype.deactivateViewConfig=function(t){a.trace.traceViewServiceEvent("<- Removing",t),r.removeFrom(this.viewConfigs,t)},t.prototype.activateViewConfig=function(t){a.trace.traceViewServiceEvent("-> Registering",t),this.viewConfigs.push(t)},t.prototype.registerUiView=function(t){a.trace.traceViewServiceUiViewEvent("-> Registering",t);var e=this.uiViews,n=function(e){return e.fqn===t.fqn};return e.filter(n).length&&a.trace.traceViewServiceUiViewEvent("!!!! duplicate uiView named:",t),e.push(t),this.sync(),function(){var n=e.indexOf(t);return 0>=n?void a.trace.traceViewServiceUiViewEvent("Tried removing non-registered uiView",t):(a.trace.traceViewServiceUiViewEvent("<- Deregistering",t),void r.removeFrom(e)(t))}},t.prototype.available=function(){return this.uiViews.map(i.prop("fqn"))},t.prototype.active=function(){return this.uiViews.filter(i.prop("$config")).map(i.prop("name"))},t.normalizeUiViewTarget=function(t,e){void 0===e&&(e="");var n=e.split("@"),r=n[0]||"$default",i=o.isString(n[1])?n[1]:"^",a=/^(\^(?:\.\^)*)\.(.*$)/.exec(r);a&&(i=a[1],r=a[2]),"!"===r.charAt(0)&&(r=r.substr(1),i="");var s=/^(\^(?:\.\^)*)$/;if(s.exec(i)){var u=i.split(".").reduce(function(t,e){return t.parent},t);i=u.name}return{uiViewName:r,uiViewContextAnchor:i}},t}();e.ViewService=s},function(t,e,n){"use strict";var r=n(25),i=n(8),o=n(3),a=function(){function t(t){var e=this;this.params=new r.StateParams,this.transitionHistory=new i.Queue([],1),this.successfulTransitions=new i.Queue([],1);var n=function(t){e.transition=t,e.transitionHistory.enqueue(t);var n=function(){e.successfulTransitions.enqueue(t),e.$current=t.$to(),e.current=e.$current.self,o.copy(t.params(),e.params)};t.onSuccess({},n,{priority:1e4});var r=function(){e.transition===t&&(e.transition=null)};t.promise.then(r,r)};t.onBefore({},["$transition$",n])}return t}();e.UIRouterGlobals=a},function(t,e,n){"use strict";var r=n(47),i=n(48),o=n(18),a=n(48),s=n(43),u=n(50),c=n(36),l=n(37),f=n(51),p=function(){function t(){this.viewService=new u.ViewService,this.transitionService=new s.TransitionService(this.viewService),this.globals=new f.UIRouterGlobals(this.transitionService),this.urlMatcherFactory=new r.UrlMatcherFactory,this.urlRouterProvider=new i.UrlRouterProvider(this.urlMatcherFactory,this.globals.params),this.urlRouter=new a.UrlRouter(this.urlRouterProvider),this.stateRegistry=new c.StateRegistry(this.urlMatcherFactory,this.urlRouterProvider),this.stateProvider=new o.StateProvider(this.stateRegistry),this.stateService=new l.StateService(this.viewService,this.urlRouter,this.transitionService,this.stateRegistry,this.stateProvider,this.globals),this.viewService.rootContext(this.stateRegistry.root()),this.globals.$current=this.stateRegistry.root(),this.globals.current=this.globals.$current.self}return t}();e.UIRouter=p},function(t,e,n){"use strict";function r(t){var e=f.services.$injector,n=e.get("$controller"),r=e.instantiate;try{var i;return e.instantiate=function(t){e.instantiate=r,i=e.annotate(t)},n(t,{$scope:{}}),i}finally{e.instantiate=r}}function i(t,e){f.services.$injector=t,f.services.$q=e}function o(t){function e(e,r,i,o,a,s){return o.$on("$locationChangeSuccess",function(t){return n.forEach(function(e){return e(t)})}),f.services.locationConfig.html5Mode=function(){var e=t.html5Mode();return e=v.isObject(e)?e.enabled:e,e&&i.history},f.services.template.get=function(t){return a.get(t,{cache:s,headers:{Accept:"text/html"}}).then(h.prop("data"))},p.bindFunctions(e,f.services.location,e,["replace","url","path","search","hash"]),p.bindFunctions(e,f.services.locationConfig,e,["port","protocol","host"]),p.bindFunctions(r,f.services.locationConfig,r,["baseHref"]),S}S=new l.UIRouter,S.stateRegistry.decorator("views",w.ng1ViewsBuilder),S.stateRegistry.decorator("resolve",b.ng1ResolveBuilder),S.viewService.viewConfigFactory("ng1",w.ng1ViewConfigFactory),p.bindFunctions(t,f.services.locationConfig,t,["hashPrefix"]);var n=[];f.services.location.onChange=function(t){return n.push(t),function(){return p.removeFrom(n)(t)}},this.$get=e,e.$inject=["$location","$browser","$sniffer","$rootScope","$http","$templateCache"]}function a(){return S.urlRouterProvider.$get=function(){return S.urlRouter.update(!0),this.interceptDeferred||S.urlRouter.listen(),S.urlRouter},S.urlRouterProvider}function s(){return S.stateProvider.$get=function(){return S.stateRegistry.stateQueue.autoFlush(S.stateService),S.stateService},S.stateProvider}function u(){function t(t){var e=function(e){function n(){}var i=p.find(t.treeChanges().to,h.propEq("state",e.viewDecl.$context));if(!i)return f.services.$q.when();var o=i.resolveContext,a=r(e.controller),s=o.getResolvables();return n.$inject=a.filter(function(t){return s.hasOwnProperty(t)}),o.invokeLater(n).then(function(){return e.locals=p.map(s,function(t){return t.data})})},n=t.views("entering").filter(function(t){return!!t.controller}).map(e);return f.services.$q.all(n).then(p.noop)}return t.$inject=["$transition$"],S.transitionService.onFinish({},t),S.transitionService.$get=function(){return S.transitionService},S.transitionService}function c(t){t.$watch(function(){y.trace.approximateDigests++})}var l=n(52),f=n(6),p=n(3),h=n(5),v=n(4),d=n(44),m=n(40),g=n(17),y=n(12),w=n(54),$=n(55),b=n(56),R=angular.module("ui.router.angular1",[]);angular.module("ui.router.util",["ng","ui.router.init"]),angular.module("ui.router.router",["ui.router.util"]),angular.module("ui.router.state",["ui.router.router","ui.router.util","ui.router.angular1"]),angular.module("ui.router",["ui.router.init","ui.router.state","ui.router.angular1"]),angular.module("ui.router.compat",["ui.router"]),e.annotateController=r,i.$inject=["$injector","$q"],R.run(i);var S=null;o.$inject=["$locationProvider"];var x=function(){return{resolve:function(t,e,n){void 0===e&&(e={});var r=new d.Node(new g.State({params:{}})),i=new d.Node(new g.State({params:{}})),o=new m.ResolveContext([r,i]);o.addResolvables(m.Resolvable.makeResolvables(t),i.state);var a=function(t){var n=function(t){return m.Resolvable.makeResolvables(p.map(t,function(t){return function(){return t}}))};return o.addResolvables(n(t),r.state),o.addResolvables(n(e),i.state),o.resolvePath()};return n?n.then(a):a({})}}};angular.module("ui.router.init",[]).provider("ng1UIRouter",o),angular.module("ui.router.init").run(["ng1UIRouter",function(t){}]),angular.module("ui.router.util").provider("$urlMatcherFactory",["ng1UIRouterProvider",function(){return S.urlMatcherFactory}]),angular.module("ui.router.util").run(["$urlMatcherFactory",function(t){}]),angular.module("ui.router.router").provider("$urlRouter",["ng1UIRouterProvider",a]),angular.module("ui.router.router").run(["$urlRouter",function(t){}]),angular.module("ui.router.state").provider("$state",["ng1UIRouterProvider",s]),angular.module("ui.router.state").run(["$state",function(t){}]),angular.module("ui.router.state").factory("$stateParams",["ng1UIRouter",function(t){return t.globals.params}]),angular.module("ui.router.state").provider("$transitions",["ng1UIRouterProvider",u]),angular.module("ui.router.util").factory("$templateFactory",["ng1UIRouter",function(){return new $.TemplateFactory}]),angular.module("ui.router").factory("$view",function(){return S.viewService}),angular.module("ui.router").factory("$resolve",x),angular.module("ui.router").service("$trace",function(){return y.trace}),c.$inject=["$rootScope"],e.watchDigests=c,angular.module("ui.router").run(c)},function(t,e,n){"use strict";function r(t){var e=["templateProvider","templateUrl","template","notify","async"],n=["controller","controllerProvider","controllerAs","resolveAs"],r=["component","bindings"],c=e.concat(n),l=r.concat(c),f={},p=t.views||{$default:o.pick(t,l)};return o.forEach(p,function(e,n){if(n=n||"$default",u.isString(e)&&(e={component:e}),Object.keys(e).length){if(e.component){if(c.map(function(t){return u.isDefined(e[t])}).reduce(o.anyTrueR,!1))throw new Error("Cannot combine: "+r.join("|")+" with: "+c.join("|")+" in stateview: 'name@"+t.name+"'");e.templateProvider=["$injector",function(t){var n=function(t){return e.bindings&&e.bindings[t]||t},r=angular.version.minor>=3?"::":"",o=function(t){var e=a.kebobString(t.name),i=n(t.name);return"@"===t.type?e+"='{{"+r+"$resolve."+i+"}}'":e+"='"+r+"$resolve."+i+"'"},s=i(t,e.component).map(o).join(" "),u=a.kebobString(e.component);return"<"+u+" "+s+"></"+u+">"}]}e.resolveAs=e.resolveAs||"$resolve",e.$type="ng1",e.$context=t,e.$name=n;var l=s.ViewService.normalizeUiViewTarget(e.$context,e.$name);e.$uiViewName=l.uiViewName,e.$uiViewContextAnchor=l.uiViewContextAnchor,f[n]=e}}),f}function i(t,e){var n=t.get(e+"Directive");if(!n||!n.length)throw new Error("Unable to find component named '"+e+"'");return n.map(h).reduce(o.unnestR,[])}var o=n(3),a=n(9),s=n(50),u=n(4),c=n(6),l=n(12),f=n(55);e.ng1ViewConfigFactory=function(t,e){return new v(t,e)},e.ng1ViewsBuilder=r;var p=function(t){return Object.keys(t||{}).map(function(e){return[e,/^([=<@])[?]?(.*)/.exec(t[e])]}).filter(function(t){return u.isDefined(t)&&u.isDefined(t[1])}).map(function(t){return{name:t[1][2]||t[0],type:t[1][1]}})},h=function(t){return p(u.isObject(t.bindToController)?t.bindToController:t.scope)},v=function(){function t(t,e){this.node=t,this.viewDecl=e,this.loaded=!1}return t.prototype.load=function(){var t=this,e=c.services.$q;if(!this.hasTemplate())throw new Error("No template configuration specified for '"+this.viewDecl.$uiViewName+"@"+this.viewDecl.$uiViewContextAnchor+"'");var n=this.node.resolveContext,r=this.node.paramValues,i={template:e.when(this.getTemplate(r,new f.TemplateFactory,n)),controller:e.when(this.getController(n))};return e.all(i).then(function(e){l.trace.traceViewServiceEvent("Loaded",t),t.controller=e.controller,t.template=e.template})},t.prototype.hasTemplate=function(){return!!(this.viewDecl.template||this.viewDecl.templateUrl||this.viewDecl.templateProvider)},t.prototype.getTemplate=function(t,e,n){return e.fromConfig(this.viewDecl,t,n.invokeLater.bind(n))},t.prototype.getController=function(t){var e=this.viewDecl.controllerProvider;return u.isInjectable(e)?t.invokeLater(e,{}):this.viewDecl.controller},t}();e.Ng1ViewConfig=v},function(t,e,n){"use strict";var r=n(4),i=n(6),o=function(){function t(){}return t.prototype.fromConfig=function(t,e,n){return r.isDefined(t.template)?this.fromString(t.template,e):r.isDefined(t.templateUrl)?this.fromUrl(t.templateUrl,e):r.isDefined(t.templateProvider)?this.fromProvider(t.templateProvider,e,n):null},t.prototype.fromString=function(t,e){return r.isFunction(t)?t(e):t},t.prototype.fromUrl=function(t,e){return r.isFunction(t)&&(t=t(e)),null==t?null:i.services.template.get(t)},t.prototype.fromProvider=function(t,e,n){return n(t)},t}();e.TemplateFactory=o},function(t,e,n){"use strict";function r(t){var e={};return i.forEach(t.resolve||{},function(t,n){e[n]=o.isString(t)?[t,function(t){return t}]:t}),e}var i=n(3),o=n(4);e.ng1ResolveBuilder=r},function(t,e,n){"use strict";function r(t,e){var n,r=t.match(/^\s*({[^}]*})\s*$/);if(r&&(t=e+"("+r[1]+")"),n=t.replace(/\n/g," ").match(/^([^(]+?)\s*(\((.*)\))?$/),!n||4!==n.length)throw new Error("Invalid state ref '"+t+"'");return{state:n[1],paramExpr:n[3]||null}}function i(t){var e=t.parent().inheritedData("$uiView"),n=l.parse("$cfg.node.state")(e);return n&&n.name?n:void 0}function o(t){var e="[object SVGAnimatedString]"===Object.prototype.toString.call(t.prop("href")),n="FORM"===t[0].nodeName;return{attr:n?"action":e?"xlink:href":"href",isAnchor:"A"===t.prop("tagName").toUpperCase(),clickable:!n}}function a(t,e,n,r,i){return function(o){var a=o.which||o.button,s=i();if(!(a>1||o.ctrlKey||o.metaKey||o.shiftKey||t.attr("target"))){var u=n(function(){e.go(s.state,s.params,s.options)});o.preventDefault();var c=r.isAnchor&&!s.href?1:0;o.preventDefault=function(){c--<=0&&n.cancel(u)}}}}function s(t,e){return{relative:i(t)||e.$current,inherit:!0}}var u=n(3),c=n(4),l=n(5),f=["$state","$timeout",function(t,e){return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(n,i,c,l){var f=r(c.uiSref,t.current.name),p={state:f.state,href:null,params:null,options:null},h=o(i),v=l[1]||l[0],d=null;p.options=u.extend(s(i,t),c.uiSrefOpts?n.$eval(c.uiSrefOpts):{});var m=function(e){e&&(p.params=angular.copy(e)),p.href=t.href(f.state,p.params,p.options),d&&d(),v&&(d=v.$$addStateInfo(f.state,p.params)),null!==p.href&&c.$set(h.attr,p.href)};f.paramExpr&&(n.$watch(f.paramExpr,function(t){t!==p.params&&m(t)},!0),p.params=angular.copy(n.$eval(f.paramExpr))),m(),h.clickable&&i.bind("click",a(i,t,e,h,function(){return p}))}}}],p=["$state","$timeout",function(t,e){return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(n,r,i,s){function u(e){h.state=e[0],h.params=e[1],h.options=e[2],h.href=t.href(h.state,h.params,h.options),v&&v(),l&&(v=l.$$addStateInfo(h.state,h.params)),h.href&&i.$set(c.attr,h.href)}var c=o(r),l=s[1]||s[0],f=[i.uiState,i.uiStateParams||null,i.uiStateOpts||null],p="["+f.map(function(t){return t||"null"}).join(", ")+"]",h={state:null,params:null,options:null,href:null},v=null;n.$watch(p,u,!0),u(n.$eval(p)),c.clickable&&r.bind("click",a(r,t,e,c,function(){return h}))}}}],h=["$state","$stateParams","$interpolate","$transitions",function(t,e,n,o){return{restrict:"A",controller:["$scope","$element","$attrs","$timeout",function(e,a,s,l){function f(e,n,r){var o=t.get(e,i(a)),s=p(e,n),u={state:o||{name:e},params:n,hash:s};return $.push(u),b[s]=r,function(){var t=$.indexOf(u);-1!==t&&$.splice(t,1)}}function p(t,n){if(!c.isString(t))throw new Error("state should be a string");return c.isObject(n)?t+u.toJson(n):(n=e.$eval(n),c.isObject(n)?t+u.toJson(n):t)}function h(){for(var t=0;t<$.length;t++)m($[t].state,$[t].params)?v(a,b[$[t].hash]):d(a,b[$[t].hash]),g($[t].state,$[t].params)?v(a,y):d(a,y)}function v(t,e){l(function(){t.addClass(e)})}function d(t,e){t.removeClass(e)}function m(e,n){return t.includes(e.name,n)}function g(e,n){return t.is(e.name,n)}var y,w,$=[],b={};y=n(s.uiSrefActiveEq||"",!1)(e);try{w=e.$eval(s.uiSrefActive)}catch(R){}w=w||n(s.uiSrefActive||"",!1)(e),c.isObject(w)&&u.forEach(w,function(n,i){if(c.isString(n)){var o=r(n,t.current.name);f(o.state,e.$eval(o.paramExpr),i)}}),this.$$addStateInfo=function(t,e){if(!(c.isObject(w)&&$.length>0)){var n=f(t,e,w);return h(),n}},e.$on("$stateChangeSuccess",h);var S=["$transition$",function(t){t.promise.then(h)}],x=o.onStart({},S);e.$on("$destroy",x),h()}]}}];angular.module("ui.router.state").directive("uiSref",f).directive("uiSrefActive",h).directive("uiSrefActiveEq",h).directive("uiState",p)},function(t,e){"use strict";function n(t){var e=function(e,n,r){return t.is(e,n,r)};return e.$stateful=!0,e}function r(t){var e=function(e,n,r){return t.includes(e,n,r)};return e.$stateful=!0,e}n.$inject=["$state"],e.$IsStateFilter=n,r.$inject=["$state"],e.$IncludedByStateFilter=r,angular.module("ui.router.state").filter("isState",n).filter("includedByState",r)},function(t,e,n){"use strict";function r(t,e,n,r,u){var c=l.parse("viewDecl.controllerAs"),p=l.parse("viewDecl.resolveAs"),h=l.parse("node.resolveContext");return{restrict:"ECA",priority:-400,compile:function(r){var u=r.html();return function(r,l){var v=l.data("$uiView");if(v){var d=v.$cfg||{viewDecl:{}};l.html(d.template||u),s.trace.traceUiViewFill(v.$uiView,l.html());var m=t(l.contents()),g=d.controller,y=c(d),w=p(d),$=h(d),b=$&&o.map($.getResolvables(),function(t){return t.data});if(r[w]=b,g){var R=e(g,o.extend({},b,{$scope:r,$element:l}));y&&(r[y]=R,r[y][w]=b),l.data("$ngControllerController",R),l.children().data("$ngControllerController",R),i(n,R,r,d)}if(a.isString(d.viewDecl.component))var S=d.viewDecl.component,x=f.kebobString(S),E=function(){var t=[].slice.call(l[0].children).filter(function(t){return t&&t.tagName&&t.tagName.toLowerCase()===x});return t&&angular.element(t).data("$"+S+"Controller")},P=r.$watch(E,function(t){t&&(i(n,t,r,d),P())});m(r)}}}}}function i(t,e,n,r){!a.isFunction(e.$onInit)||r.viewDecl.component&&h||e.$onInit();var i={bind:e};if(a.isFunction(e.uiOnParamsChanged)){var s=function(t){var n=r.node.resolveContext,i=n.getResolvables().$transition$.data;if(t!==i&&-1===t.exiting().indexOf(r.node.state.self)){var a=t.params("to"),s=t.params("from"),u=t.treeChanges().to.map(function(t){return t.paramSchema}).reduce(o.unnestR,[]),c=t.treeChanges().from.map(function(t){return t.paramSchema}).reduce(o.unnestR,[]),l=u.filter(function(t){var e=c.indexOf(t);return-1===e||!c[e].type.equals(a[t.id],s[t.id])});if(l.length){var f=l.map(function(t){return t.id});e.uiOnParamsChanged(o.filter(a,function(t,e){return-1!==f.indexOf(e)}),t)}}};n.$on("$destroy",t.onSuccess({},["$transition$",s]),i);var u=function(t,e){t.type===c.RejectType.IGNORED&&s(e)};n.$on("$destroy",t.onError({},["$error$","$transition$",u]),i)}if(a.isFunction(e.uiCanExit)){var l={exiting:r.node.state.name};n.$on("$destroy",t.onBefore(l,e.uiCanExit,i))}}var o=n(3),a=n(4),s=n(12),u=n(54),c=n(10),l=n(5),f=n(9),p=["$view","$animate","$uiViewScroll","$interpolate","$q",function(t,e,n,r,i){function o(t,n){return{enter:function(t,n,r){angular.version.minor>2?e.enter(t,null,n).then(r):e.enter(t,null,n,r)},leave:function(t,n){angular.version.minor>2?e.leave(t).then(n):e.leave(t,n)}}}function c(t,e){return t===e}var f={$cfg:{viewDecl:{$context:t.rootContext()}},$uiView:{}},p={count:0,restrict:"ECA",terminal:!0,priority:400,transclude:"element",compile:function(e,h,v){return function(e,h,d){function m(t){(!t||t instanceof u.Ng1ViewConfig)&&(c(P,t)||(s.trace.traceUiViewConfigUpdated(C,t&&t.viewDecl&&t.viewDecl.$context),P=t,y(t)))}function g(){if(w&&(s.trace.traceUiViewEvent("Removing (previous) el",w.data("$uiView")),w.remove(),w=null),b&&(s.trace.traceUiViewEvent("Destroying scope",C),b.$destroy(),b=null),$){var t=$.data("$uiView");s.trace.traceUiViewEvent("Animate out",t),E.leave($,function(){t.$$animLeave.resolve(),w=null}),w=$,$=null}}function y(t){var r=e.$new();s.trace.traceUiViewScopeCreated(C,r);var o=i.defer(),u=i.defer(),c={$cfg:t,$uiView:C,$animEnter:o.promise,$animLeave:u.promise,$$animLeave:u},l=v(r,function(t){E.enter(t.data("$uiView",c),h,function(){o.resolve(),b&&b.$emit("$viewContentAnimationEnded"),(a.isDefined(x)&&!x||e.$eval(x))&&n(t)}),g()});$=l,b=r,b.$emit("$viewContentLoaded",t||P),b.$eval(S)}var w,$,b,R,S=d.onload||"",x=d.autoscroll,E=o(d,e),P=void 0,k=h.inheritedData("$uiView")||f,O=r(d.uiView||d.name||"")(e)||"$default",C={$type:"ng1",id:p.count++,name:O,fqn:k.$uiView.fqn?k.$uiView.fqn+"."+O:O,config:null,configUpdated:m,get creationContext(){return l.parse("$cfg.viewDecl.$context")(k)}};s.trace.traceUiViewEvent("Linking",C),h.data("$uiView",{$uiView:C}),y(),R=t.registerUiView(C),e.$on("$destroy",function(){s.trace.traceUiViewEvent("Destroying/Unregistering",C),R()})}}};return p}];r.$inject=["$compile","$controller","$transitions","$view","$timeout"];var h="function"==typeof angular.module("ui.router").component;angular.module("ui.router.state").directive("uiView",p),angular.module("ui.router.state").directive("uiView",r)},function(t,e){"use strict";function n(){var t=!1;this.useAnchorScroll=function(){t=!0},this.$get=["$anchorScroll","$timeout",function(e,n){return t?e:function(t){return n(function(){t[0].scrollIntoView()},0,!1)}}]}angular.module("ui.router.state").provider("$uiViewScroll",n)}])});
1775 !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("angular")):"function"==typeof define&&define.amd?define("angular-ui-router",["angular"],e):"object"==typeof exports?exports["angular-ui-router"]=e(require("angular")):t["angular-ui-router"]=e(t.angular)}(this,function(t){return function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}n(r(1)),n(r(53)),n(r(55)),n(r(58)),r(60),r(61),r(62),r(63),Object.defineProperty(e,"__esModule",{value:!0}),e["default"]="ui.router"},function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}n(r(2)),n(r(46)),n(r(47)),n(r(48)),n(r(49)),n(r(50)),n(r(51)),n(r(52)),n(r(44));var i=r(25);e.UIRouter=i.UIRouter},function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}n(r(3)),n(r(6)),n(r(7)),n(r(5)),n(r(4)),n(r(8)),n(r(9)),n(r(12))},function(t,e,r){"use strict";function n(t,e,r,n){return void 0===n&&(n=Object.keys(t)),n.filter(function(e){return"function"==typeof t[e]}).forEach(function(n){return e[n]=t[n].bind(r)})}function i(t){void 0===t&&(t={});for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var i=o.apply(null,[{}].concat(r));return e.extend({},i,c(t||{},Object.keys(i)))}function o(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];return e.forEach(r,function(r){e.forEach(r,function(e,r){t.hasOwnProperty(r)||(t[r]=e)})}),t}function a(t,e){var r=[];for(var n in t.path){if(t.path[n]!==e.path[n])break;r.push(t.path[n])}return r}function s(t,e,r){void 0===r&&(r=Object.keys(t));for(var n=0;n<r.length;n++){var i=r[n];if(t[i]!=e[i])return!1}return!0}function u(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i={};for(var o in e)t(r,o)&&(i[o]=e[o]);return i}function c(t){return u.apply(null,[e.inArray].concat(T(arguments)))}function f(t){var r=function(t,r){return!e.inArray(t,r)};return u.apply(null,[r].concat(T(arguments)))}function l(t,e){return v(t,P.prop(e))}function p(t,r){var n=k.isArray(t),i=n?[]:{},o=n?function(t){return i.push(t)}:function(t,e){return i[e]=t};return e.forEach(t,function(t,e){r(t,e)&&o(t,e)}),i}function h(t,r){var n;return e.forEach(t,function(t,e){n||r(t,e)&&(n=t)}),n}function v(t,r){var n=k.isArray(t)?[]:{};return e.forEach(t,function(t,e){return n[e]=r(t,e)}),n}function d(t,e){return t.push(e),t}function m(t,e){return void 0===e&&(e="assert failure"),function(r){if(!t(r))throw new Error(k.isFunction(e)?e(r):e);return!0}}function g(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];if(0===t.length)return[];var r=t.reduce(function(t,e){return Math.min(e.length,t)},9007199254740991);return Array.apply(null,Array(r)).map(function(e,r){return t.map(function(t){return t[r]})})}function y(t,e){var r,n;if(k.isArray(e)&&(r=e[0],n=e[1]),!k.isString(r))throw new Error("invalid parameters to applyPairs");return t[r]=n,t}function w(t){return t.length&&t[t.length-1]||void 0}function b(t,r){return r&&Object.keys(r).forEach(function(t){return delete r[t]}),r||(r={}),e.extend(r,t)}function $(t,e,r){return k.isArray(t)?t.forEach(e,r):void Object.keys(t).forEach(function(r){return e(t[r],r)})}function R(t,e){return Object.keys(e).forEach(function(r){return t[r]=e[r]}),t}function S(t){return T(arguments,1).filter(e.identity).reduce(R,t)}function E(t,e){if(t===e)return!0;if(null===t||null===e)return!1;if(t!==t&&e!==e)return!0;var r=typeof t,n=typeof e;if(r!==n||"object"!==r)return!1;var i=[t,e];if(P.all(k.isArray)(i))return x(t,e);if(P.all(k.isDate)(i))return t.getTime()===e.getTime();if(P.all(k.isRegExp)(i))return t.toString()===e.toString();if(P.all(k.isFunction)(i))return!0;var o=[k.isFunction,k.isArray,k.isDate,k.isRegExp];if(o.map(P.any).reduce(function(t,e){return t||!!e(i)},!1))return!1;var a,s={};for(a in t){if(!E(t[a],e[a]))return!1;s[a]=!0}for(a in e)if(!s[a])return!1;return!0}function x(t,e){return t.length===e.length&&g(t,e).reduce(function(t,e){return t&&E(e[0],e[1])},!0)}var k=r(4),P=r(5),_=r(6),C="undefined"==typeof window?{}:window,O=C.angular||{};e.fromJson=O.fromJson||JSON.parse.bind(JSON),e.toJson=O.toJson||JSON.stringify.bind(JSON),e.copy=O.copy||b,e.forEach=O.forEach||$,e.extend=O.extend||S,e.equals=O.equals||E,e.identity=function(t){return t},e.noop=function(){},e.bindFunctions=n,e.inherit=function(t,r){return e.extend(new(e.extend(function(){},{prototype:t})),r)};var T=function(t,e){return void 0===e&&(e=0),Array.prototype.concat.apply(Array.prototype,Array.prototype.slice.call(t,e))};e.inArray=function(t,e){return t.indexOf(e)!==-1},e.removeFrom=P.curry(function(t,e){var r=t.indexOf(e);return r>=0&&t.splice(r,1),t}),e.defaults=i,e.merge=o,e.mergeR=function(t,r){return e.extend(t,r)},e.ancestors=a,e.equalForKeys=s,e.pick=c,e.omit=f,e.pluck=l,e.filter=p,e.find=h,e.mapObj=v,e.map=v,e.values=function(t){return Object.keys(t).map(function(e){return t[e]})},e.allTrueR=function(t,e){return t&&e},e.anyTrueR=function(t,e){return t||e},e.unnestR=function(t,e){return t.concat(e)},e.flattenR=function(t,r){return k.isArray(r)?t.concat(r.reduce(e.flattenR,[])):d(t,r)},e.pushR=d,e.uniqR=function(t,r){return e.inArray(t,r)?t:d(t,r)},e.unnest=function(t){return t.reduce(e.unnestR,[])},e.flatten=function(t){return t.reduce(e.flattenR,[])},e.assertPredicate=m,e.pairs=function(t){return Object.keys(t).map(function(e){return[e,t[e]]})},e.arrayTuples=g,e.applyPairs=y,e.tail=w,e.silenceUncaughtInPromise=function(t){return t["catch"](function(t){return 0})&&t},e.silentRejection=function(t){return e.silenceUncaughtInPromise(_.services.$q.reject(t))}},function(t,e,r){"use strict";function n(t){if(e.isArray(t)&&t.length){var r=t.slice(0,-1),n=t.slice(-1);return!(r.filter(i.not(e.isString)).length||n.filter(i.not(e.isFunction)).length)}return e.isFunction(t)}var i=r(5),o=Object.prototype.toString,a=function(t){return function(e){return typeof e===t}};e.isUndefined=a("undefined"),e.isDefined=i.not(e.isUndefined),e.isNull=function(t){return null===t},e.isFunction=a("function"),e.isNumber=a("number"),e.isString=a("string"),e.isObject=function(t){return null!==t&&"object"==typeof t},e.isArray=Array.isArray,e.isDate=function(t){return"[object Date]"===o.call(t)},e.isRegExp=function(t){return"[object RegExp]"===o.call(t)},e.isInjectable=n,e.isPromise=i.and(e.isObject,i.pipe(i.prop("then"),e.isFunction))},function(t,e){"use strict";function r(t){function e(r){return r.length>=n?t.apply(null,r):function(){return e(r.concat([].slice.apply(arguments)))}}var r=[].slice.apply(arguments,[1]),n=t.length;return e(r)}function n(){var t=arguments,e=t.length-1;return function(){for(var r=e,n=t[e].apply(this,arguments);r--;)n=t[r].call(this,n);return n}}function i(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return n.apply(null,[].slice.call(arguments).reverse())}function o(t,e){return function(){for(var r=[],n=0;n<arguments.length;n++)r[n-0]=arguments[n];return t.apply(null,r)&&e.apply(null,r)}}function a(t,e){return function(){for(var r=[],n=0;n<arguments.length;n++)r[n-0]=arguments[n];return t.apply(null,r)||e.apply(null,r)}}function s(t,e){return function(r){return r[t].apply(r,e)}}function u(t){return function(e){for(var r=0;r<t.length;r++)if(t[r][0](e))return t[r][1](e)}}e.curry=r,e.compose=n,e.pipe=i,e.prop=function(t){return function(e){return e&&e[t]}},e.propEq=r(function(t,e,r){return r&&r[t]===e}),e.parse=function(t){return i.apply(null,t.split(".").map(e.prop))},e.not=function(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r-0]=arguments[r];return!t.apply(null,e)}},e.and=o,e.or=a,e.all=function(t){return function(e){return e.reduce(function(e,r){return e&&!!t(r)},!0)}},e.any=function(t){return function(e){return e.reduce(function(e,r){return e||!!t(r)},!1)}},e.is=function(t){return function(e){return null!=e&&e.constructor===t||e instanceof t}},e.eq=function(t){return function(e){return t===e}},e.val=function(t){return function(){return t}},e.invoke=s,e.pattern=u},function(t,e){"use strict";var r=function(t){return function(){throw new Error(t+"(): No coreservices implementation for UI-Router is loaded. You should include one of: ['angular1.js']")}},n={$q:void 0,$injector:void 0,location:{},locationConfig:{},template:{}};e.services=n,["setUrl","path","search","hash","onChange"].forEach(function(t){return n.location[t]=r(t)}),["port","protocol","host","baseHref","html5Mode","hashPrefix"].forEach(function(t){return n.locationConfig[t]=r(t)})},function(t,e){"use strict";var r=function(){function t(t){this.text=t,this.glob=t.split(".");var e=this.text.split(".").map(function(t){return"**"===t?"(?:|(?:\\.[^.]*)*)":"*"===t?"\\.[^.]*":"\\."+t}).join("");this.regexp=new RegExp("^"+e+"$")}return t.prototype.matches=function(t){return this.regexp.test("."+t)},t.is=function(t){return t.indexOf("*")>-1},t.fromString=function(e){return this.is(e)?new t(e):null},t}();e.Glob=r},function(t,e){"use strict";var r=function(){function t(t,e){void 0===t&&(t=[]),void 0===e&&(e=null),this._items=t,this._limit=e}return t.prototype.enqueue=function(t){var e=this._items;return e.push(t),this._limit&&e.length>this._limit&&e.shift(),t},t.prototype.dequeue=function(){if(this.size())return this._items.splice(0,1)[0]},t.prototype.clear=function(){var t=this._items;return this._items=[],t},t.prototype.size=function(){return this._items.length},t.prototype.remove=function(t){var e=this._items.indexOf(t);return e>-1&&this._items.splice(e,1)[0]},t.prototype.peekTail=function(){return this._items[this._items.length-1]},t.prototype.peekHead=function(){if(this.size())return this._items[0]},t}();e.Queue=r},function(t,e,r){"use strict";function n(t,e){return e.length<=t?e:e.substr(0,t-3)+"..."}function i(t,e){for(;e.length<t;)e+=" ";return e}function o(t){return t.replace(/^([A-Z])/,function(t){return t.toLowerCase()}).replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}function a(t){var e=s(t),r=e.match(/^(function [^ ]+\([^)]*\))/),n=r?r[1]:e,i=t.name||"";return i&&n.match(/function \(/)?"function "+i+n.substr(9):n}function s(t){var e=c.isArray(t)?t.slice(-1)[0]:t;return e&&e.toString()||"undefined"}function u(t){function e(t){if(c.isObject(t)){if(r.indexOf(t)!==-1)return"[circular ref]";r.push(t)}return m(t)}var r=[];return JSON.stringify(t,function(t,r){return e(r)}).replace(/\\"/g,'"')}var c=r(4),f=r(10),l=r(3),p=r(5),h=r(11),v=r(19);e.maxLength=n,e.padString=i,e.kebobString=o,e.functionToString=a,e.fnToString=s;var d=null,m=function(t){var e=f.Rejection.isTransitionRejectionPromise;return(d=d||p.pattern([[p.not(c.isDefined),p.val("undefined")],[c.isNull,p.val("null")],[c.isPromise,p.val("[Promise]")],[e,function(t){return t._transitionRejection.toString()}],[p.is(f.Rejection),p.invoke("toString")],[p.is(h.Transition),p.invoke("toString")],[p.is(v.Resolvable),p.invoke("toString")],[c.isInjectable,a],[p.val(!0),l.identity]]))(t)};e.stringify=u,e.beforeAfterSubstr=function(t){return function(e){if(!e)return["",""];var r=e.indexOf(t);return r===-1?[e,""]:[e.substr(0,r),e.substr(r+1)]}}},function(t,e,r){"use strict";var n=r(3),i=r(9);!function(t){t[t.SUPERSEDED=2]="SUPERSEDED",t[t.ABORTED=3]="ABORTED",t[t.INVALID=4]="INVALID",t[t.IGNORED=5]="IGNORED",t[t.ERROR=6]="ERROR"}(e.RejectType||(e.RejectType={}));var o=e.RejectType,a=function(){function t(t,e,r){this.type=t,this.message=e,this.detail=r}return t.prototype.toString=function(){var t=function(t){return t&&t.toString!==Object.prototype.toString?t.toString():i.stringify(t)},e=this.type,r=this.message,n=t(this.detail);return"TransitionRejection(type: "+e+", message: "+r+", detail: "+n+")"},t.prototype.toPromise=function(){return n.extend(n.silentRejection(this),{_transitionRejection:this})},t.isTransitionRejectionPromise=function(e){return e&&"function"==typeof e.then&&e._transitionRejection instanceof t},t.superseded=function(e,r){var n="The transition has been superseded by a different transition",i=new t(o.SUPERSEDED,n,e);return r&&r.redirected&&(i.redirected=!0),i},t.redirected=function(e){return t.superseded(e,{redirected:!0})},t.invalid=function(e){var r="This transition is invalid";return new t(o.INVALID,r,e)},t.ignored=function(e){var r="The transition was ignored";return new t(o.IGNORED,r,e)},t.aborted=function(e){var r="The transition has been aborted";return new t(o.ABORTED,r,e)},t.errored=function(e){var r="The transition errored";return new t(o.ERROR,r,e)},t}();e.Rejection=a},function(t,e,r){"use strict";var n=r(9),i=r(12),o=r(6),a=r(3),s=r(4),u=r(5),c=r(13),f=r(15),l=r(16),p=r(21),h=r(20),v=r(14),d=r(22),m=r(19),g=r(10),y=r(17),w=r(25),b=0,$=u.prop("self"),R=function(){function t(e,r,n){var i=this;if(this._deferred=o.services.$q.defer(),this.promise=this._deferred.promise,this.treeChanges=function(){return i._treeChanges},this.isActive=function(){return i===i._options.current()},this.router=n,this._targetState=r,!r.valid())throw new Error(r.error());f.HookRegistry.mixin(new f.HookRegistry,this),this._options=a.extend({current:u.val(this)},r.options()),this.$id=b++;var s=h.PathFactory.buildToPath(e,r);this._treeChanges=h.PathFactory.treeChanges(e,s,this._options.reloadState);var c=this._treeChanges.entering.map(function(t){return t.state});h.PathFactory.applyViewConfigs(n.transitionService.$view,this._treeChanges.to,c);var l=[new m.Resolvable(w.UIRouter,function(){return n},[],(void 0),n),new m.Resolvable(t,function(){return i},[],(void 0),this),new m.Resolvable("$transition$",function(){return i},[],(void 0),this),new m.Resolvable("$stateParams",function(){return i.params()},[],(void 0),this.params())],p=this._treeChanges.to[0],v=new y.ResolveContext(this._treeChanges.to);v.addResolvables(l,p.state)}return t.prototype.onBefore=function(t,e,r){throw""},t.prototype.onStart=function(t,e,r){throw""},t.prototype.onExit=function(t,e,r){throw""},t.prototype.onRetain=function(t,e,r){throw""},t.prototype.onEnter=function(t,e,r){throw""},t.prototype.onFinish=function(t,e,r){throw""},t.prototype.onSuccess=function(t,e,r){throw""},t.prototype.onError=function(t,e,r){throw""},t.prototype.$from=function(){return a.tail(this._treeChanges.from).state},t.prototype.$to=function(){return a.tail(this._treeChanges.to).state},t.prototype.from=function(){return this.$from().self},t.prototype.to=function(){return this.$to().self},t.prototype.targetState=function(){return this._targetState},t.prototype.is=function(e){return e instanceof t?this.is({to:e.$to().name,from:e.$from().name}):!(e.to&&!f.matchState(this.$to(),e.to)||e.from&&!f.matchState(this.$from(),e.from))},t.prototype.params=function(t){return void 0===t&&(t="to"),this._treeChanges[t].map(u.prop("paramValues")).reduce(a.mergeR,{})},t.prototype.injector=function(t){var e=this.treeChanges().to;return t&&(e=h.PathFactory.subPath(e,function(e){return e.state===t||e.state.name===t})),new y.ResolveContext(e).injector()},t.prototype.getResolveTokens=function(){return new y.ResolveContext(this._treeChanges.to).getTokens()},t.prototype.getResolveValue=function(t){var e=new y.ResolveContext(this._treeChanges.to),r=function(t){var r=e.getResolvable(t);if(void 0===r)throw new Error("Dependency Injection token not found: "+n.stringify(t));return r.data};return s.isArray(t)?t.map(r):r(t)},t.prototype.getResolvable=function(t){return new y.ResolveContext(this._treeChanges.to).getResolvable(t)},t.prototype.addResolvable=function(t,e){void 0===e&&(e="");var r="string"==typeof e?e:e.name,n=this._treeChanges.to,i=a.find(n,function(t){return t.state.name===r}),o=new y.ResolveContext(n);o.addResolvables([t],i.state)},t.prototype.redirectedFrom=function(){return this._options.redirectedFrom||null},t.prototype.options=function(){return this._options},t.prototype.entering=function(){return a.map(this._treeChanges.entering,u.prop("state")).map($)},t.prototype.exiting=function(){return a.map(this._treeChanges.exiting,u.prop("state")).map($).reverse()},t.prototype.retained=function(){return a.map(this._treeChanges.retained,u.prop("state")).map($)},t.prototype.views=function(t,e){void 0===t&&(t="entering");var r=this._treeChanges[t];return r=e?r.filter(u.propEq("state",e)):r,r.map(u.prop("views")).filter(a.identity).reduce(a.unnestR,[])},t.prototype.redirect=function(t){var e=a.extend({},this.options(),t.options(),{redirectedFrom:this,source:"redirect"});t=new v.TargetState(t.identifier(),t.$state(),t.params(),e);var r=this.router.transitionService.create(this._treeChanges.from,t),n=this.treeChanges().entering,i=r.treeChanges().entering,o=function(t){return function(e){return t&&e.state.includes[t.name]}},s=p.PathNode.matching(i,n).filter(u.not(o(t.options().reloadState)));return s.forEach(function(t,e){t.resolvables=n[e].resolvables}),r},t.prototype._changedParams=function(){var t=this._treeChanges,e=t.to,r=t.from;if(!this._options.reload&&a.tail(e).state===a.tail(r).state){var n=e.map(function(t){return t.paramSchema}),i=[e,r].map(function(t){return t.map(function(t){return t.paramValues})}),o=i[0],s=i[1],u=a.arrayTuples(n,o,s);return u.map(function(t){var e=t[0],r=t[1],n=t[2];return d.Param.changed(e,r,n)}).reduce(a.unnestR,[])}},t.prototype.dynamic=function(){var t=this._changedParams();return!!t&&t.map(function(t){return t.dynamic}).reduce(a.anyTrueR,!1)},t.prototype.ignored=function(){var t=this._changedParams();return!!t&&0===t.length},t.prototype.hookBuilder=function(){return new l.HookBuilder(this.router.transitionService,this,{transition:this,current:this._options.current})},t.prototype.run=function(){var t=this,e=c.TransitionHook.runSynchronousHooks,r=this.hookBuilder(),n=this.router.globals;n.transitionHistory.enqueue(this);var o=e(r.getOnBeforeHooks());if(g.Rejection.isTransitionRejectionPromise(o)){o["catch"](function(){return 0});var a=o._transitionRejection;return this._deferred.reject(a),this.promise}if(!this.valid()){var s=new Error(this.error());return this._deferred.reject(s),this.promise}if(this.ignored())return i.trace.traceTransitionIgnored(this),this._deferred.reject(g.Rejection.ignored()),this.promise;var u=function(){i.trace.traceSuccess(t.$to(),t),t.success=!0,t._deferred.resolve(t.to()),e(r.getOnSuccessHooks(),!0)},f=function(n){i.trace.traceError(n,t),t.success=!1,t._deferred.reject(n),t._error=n,e(r.getOnErrorHooks(),!0)};i.trace.traceTransitionStart(this);var l=function(t,e){return t.then(function(){return e.invokeHook()})};return r.asyncHooks().reduce(l,o).then(u,f),this.promise},t.prototype.valid=function(){return!this.error()||void 0!==this.success},t.prototype.error=function(){for(var t=this.$to(),e=0,r=this;null!=(r=r.redirectedFrom());)if(++e>20)return"Too many Transition redirects (20+)";return t.self["abstract"]?"Cannot transition to abstract state '"+t.name+"'":d.Param.validates(t.parameters(),this.params())?this.success===!1?this._error:void 0:"Param values not valid for state '"+t.name+"'"},t.prototype.toString=function(){var t=this.from(),e=this.to(),r=function(t){return null!==t["#"]&&void 0!==t["#"]?t:a.omit(t,"#")},n=this.$id,i=s.isObject(t)?t.name:t,o=a.toJson(r(this._treeChanges.from.map(u.prop("paramValues")).reduce(a.mergeR,{}))),c=this.valid()?"":"(X) ",f=s.isObject(e)?e.name:e,l=a.toJson(r(this.params()));return"Transition#"+n+"( '"+i+"'"+o+" -> "+c+"'"+f+"'"+l+" )"},t.diToken=t,t}();e.Transition=R},function(t,e,r){"use strict";function n(t){return t?"[ui-view#"+t.id+" tag "+("in template from '"+(t.creationContext&&t.creationContext.name||"(root)")+"' state]: ")+("fqn: '"+t.fqn+"', ")+("name: '"+t.name+"@"+t.creationContext+"')"):"ui-view (defunct)"}function i(t){return a.isNumber(t)?c[t]:c[c[t]]}var o=r(5),a=r(4),s=r(9),u=function(t){return"[ViewConfig#"+t.$id+" from '"+(t.viewDecl.$context.name||"(root)")+"' state]: target ui-view: '"+t.viewDecl.$uiViewName+"@"+t.viewDecl.$uiViewContextAnchor+"'"};!function(t){t[t.RESOLVE=0]="RESOLVE",t[t.TRANSITION=1]="TRANSITION",t[t.HOOK=2]="HOOK",t[t.UIVIEW=3]="UIVIEW",t[t.VIEWCONFIG=4]="VIEWCONFIG"}(e.Category||(e.Category={}));var c=e.Category,f=function(){function t(){this._enabled={},this.approximateDigests=0}return t.prototype._set=function(t,e){var r=this;e.length||(e=Object.keys(c).map(function(t){return parseInt(t,10)}).filter(function(t){return!isNaN(t)}).map(function(t){return c[t]})),e.map(i).forEach(function(e){return r._enabled[e]=t})},t.prototype.enable=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];this._set(!0,t)},t.prototype.disable=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];this._set(!1,t)},t.prototype.enabled=function(t){return!!this._enabled[i(t)]},t.prototype.traceTransitionStart=function(t){if(this.enabled(c.TRANSITION)){var e=t.$id,r=this.approximateDigests,n=s.stringify(t);console.log("Transition #"+e+" Digest #"+r+": Started -> "+n)}},t.prototype.traceTransitionIgnored=function(t){if(this.enabled(c.TRANSITION)){var e=t&&t.$id,r=this.approximateDigests,n=s.stringify(t);console.log("Transition #"+e+" Digest #"+r+": Ignored <> "+n)}},t.prototype.traceHookInvocation=function(t,e){if(this.enabled(c.HOOK)){var r=o.parse("transition.$id")(e),n=this.approximateDigests,i=o.parse("traceData.hookType")(e)||"internal",a=o.parse("traceData.context.state.name")(e)||o.parse("traceData.context")(e)||"unknown",u=s.functionToString(t.eventHook.callback);console.log("Transition #"+r+" Digest #"+n+": Hook -> "+i+" context: "+a+", "+s.maxLength(200,u))}},t.prototype.traceHookResult=function(t,e){if(this.enabled(c.HOOK)){var r=o.parse("transition.$id")(e),n=this.approximateDigests,i=s.stringify(t);console.log("Transition #"+r+" Digest #"+n+": <- Hook returned: "+s.maxLength(200,i))}},t.prototype.traceResolvePath=function(t,e,r){if(this.enabled(c.RESOLVE)){var n=r&&r.$id,i=this.approximateDigests,o=t&&t.toString();console.log("Transition #"+n+" Digest #"+i+": Resolving "+o+" ("+e+")")}},t.prototype.traceResolvableResolved=function(t,e){if(this.enabled(c.RESOLVE)){var r=e&&e.$id,n=this.approximateDigests,i=t&&t.toString(),o=s.stringify(t.data);console.log("Transition #"+r+" Digest #"+n+": <- Resolved "+i+" to: "+s.maxLength(200,o))}},t.prototype.traceError=function(t,e){if(this.enabled(c.TRANSITION)){var r=e&&e.$id,n=this.approximateDigests,i=s.stringify(e);console.log("Transition #"+r+" Digest #"+n+": <- Rejected "+i+", reason: "+t)}},t.prototype.traceSuccess=function(t,e){if(this.enabled(c.TRANSITION)){var r=e&&e.$id,n=this.approximateDigests,i=t.name,o=s.stringify(e);console.log("Transition #"+r+" Digest #"+n+": <- Success "+o+", final state: "+i)}},t.prototype.traceUIViewEvent=function(t,e,r){void 0===r&&(r=""),this.enabled(c.UIVIEW)&&console.log("ui-view: "+s.padString(30,t)+" "+n(e)+r)},t.prototype.traceUIViewConfigUpdated=function(t,e){this.enabled(c.UIVIEW)&&this.traceUIViewEvent("Updating",t," with ViewConfig from context='"+e+"'")},t.prototype.traceUIViewFill=function(t,e){this.enabled(c.UIVIEW)&&this.traceUIViewEvent("Fill",t," with: "+s.maxLength(200,e))},t.prototype.traceViewServiceEvent=function(t,e){this.enabled(c.VIEWCONFIG)&&console.log("VIEWCONFIG: "+t+" "+u(e))},t.prototype.traceViewServiceUIViewEvent=function(t,e){this.enabled(c.VIEWCONFIG)&&console.log("VIEWCONFIG: "+t+" "+n(e))},t}();e.Trace=f;var l=new f;e.trace=l},function(t,e,r){"use strict";var n=r(3),i=r(9),o=r(4),a=r(5),s=r(12),u=r(6),c=r(10),f=r(14),l={async:!0,rejectIfSuperseded:!0,current:n.noop,transition:null,traceData:{},bind:null},p=function(){function t(t,e,r,i){var o=this;this.transition=t,this.stateContext=e,this.eventHook=r,this.options=i,this.isSuperseded=function(){return o.options.current()!==o.options.transition},this.options=n.defaults(i,l)}return t.prototype.invokeHook=function(){var t=this,e=t.options,r=t.eventHook;if(s.trace.traceHookInvocation(this,e),e.rejectIfSuperseded&&this.isSuperseded())return c.Rejection.superseded(e.current()).toPromise();var n=r._deregistered?void 0:r.callback.call(e.bind,this.transition,this.stateContext);return this.handleHookResult(n)},t.prototype.handleHookResult=function(t){if(this.isSuperseded())return c.Rejection.superseded(this.options.current()).toPromise();if(o.isPromise(t))return t.then(this.handleHookResult.bind(this));if(s.trace.traceHookResult(t,this.options),t===!1)return c.Rejection.aborted("Hook aborted transition").toPromise();var e=a.is(f.TargetState);return e(t)?c.Rejection.redirected(t).toPromise():void 0},t.prototype.toString=function(){var t=this,e=t.options,r=t.eventHook,n=a.parse("traceData.hookType")(e)||"internal",o=a.parse("traceData.context.state.name")(e)||a.parse("traceData.context")(e)||"unknown",s=i.fnToString(r.callback);return n+" context: "+o+", "+i.maxLength(200,s)},t.runSynchronousHooks=function(t,e){void 0===e&&(e=!1);for(var r=[],n=0;n<t.length;n++){var i=t[n];try{r.push(i.invokeHook())}catch(s){if(!e)return c.Rejection.errored(s).toPromise();var f=i.transition.router.stateService.defaultErrorHandler();f(s)}}var l=r.filter(c.Rejection.isTransitionRejectionPromise);return l.length?l[0]:r.filter(o.isPromise).reduce(function(t,e){return t.then(a.val(e))},u.services.$q.when())},t}();e.TransitionHook=p},function(t,e,r){"use strict";var n=r(3),i=function(){function t(t,e,r,n){void 0===r&&(r={}),void 0===n&&(n={}),this._identifier=t,this._definition=e,this._options=n,this._params=r||{}}return t.prototype.name=function(){return this._definition&&this._definition.name||this._identifier},t.prototype.identifier=function(){return this._identifier},t.prototype.params=function(){return this._params},t.prototype.$state=function(){return this._definition},t.prototype.state=function(){return this._definition&&this._definition.self},t.prototype.options=function(){return this._options},t.prototype.exists=function(){return!(!this._definition||!this._definition.self)},t.prototype.valid=function(){return!this.error()},t.prototype.error=function(){var t=this.options().relative;if(!this._definition&&t){var e=t.name?t.name:t;return"Could not resolve '"+this.name()+"' from state '"+e+"'"}return this._definition?this._definition.self?void 0:"State '"+this.name()+"' has an invalid definition":"No such state '"+this.name()+"'"},t.prototype.toString=function(){return"'"+this.name()+"'"+n.toJson(this.params())},t}();e.TargetState=i},function(t,e,r){"use strict";function n(t,e){function r(t){for(var e=n,r=0;r<e.length;r++){var i=s.Glob.fromString(e[r]);if(i&&i.matches(t.name)||!i&&e[r]===t.name)return!0}return!1}var n=a.isString(e)?[e]:e,i=a.isFunction(n)?n:r;return!!i(t)}function i(t,e){return function(r,n,i){void 0===i&&(i={});var a=new u(r,n,i);return t[e].push(a),function(){a._deregistered=!0,o.removeFrom(t[e])(a)}}}var o=r(3),a=r(4),s=r(7);e.matchState=n;var u=function(){function t(t,e,r){void 0===r&&(r={}),this.callback=e,this.matchCriteria=o.extend({to:!0,from:!0,exiting:!0,retained:!0,entering:!0},t),this.priority=r.priority||0,this.bind=r.bind||null,this._deregistered=!1}return t._matchingNodes=function(t,e){if(e===!0)return t;var r=t.filter(function(t){return n(t.state,e)});return r.length?r:null},t.prototype.matches=function(e){var r=this.matchCriteria,n=t._matchingNodes,i={to:n([o.tail(e.to)],r.to),from:n([o.tail(e.from)],r.from),exiting:n(e.exiting,r.exiting),retained:n(e.retained,r.retained),entering:n(e.entering,r.entering)},a=["to","from","exiting","retained","entering"].map(function(t){return i[t]}).reduce(o.allTrueR,!0);return a?i:null},t}();e.EventHook=u;var c=function(){function t(){var t=this;this._transitionEvents={onBefore:[],onStart:[],onEnter:[],onRetain:[],onExit:[],onFinish:[],onSuccess:[],onError:[]},this.getHooks=function(e){return t._transitionEvents[e]},this.onBefore=i(this._transitionEvents,"onBefore"),this.onStart=i(this._transitionEvents,"onStart"),this.onEnter=i(this._transitionEvents,"onEnter"),this.onRetain=i(this._transitionEvents,"onRetain"),this.onExit=i(this._transitionEvents,"onExit"),this.onFinish=i(this._transitionEvents,"onFinish"),this.onSuccess=i(this._transitionEvents,"onSuccess"),this.onError=i(this._transitionEvents,"onError")}return t.mixin=function(t,e){Object.keys(t._transitionEvents).concat(["getHooks"]).forEach(function(r){return e[r]=t[r]})},t}();e.HookRegistry=c},function(t,e,r){"use strict";function n(t){return void 0===t&&(t=!1),function(e,r){var n=t?-1:1,i=(e.node.state.path.length-r.node.state.path.length)*n;return 0!==i?i:r.hook.priority-e.hook.priority}}var i=r(3),o=r(4),a=r(13),s=r(17),u=function(){function t(t,e,r){var o=this;this.$transitions=t,this.transition=e,this.baseHookOptions=r,this.getOnBeforeHooks=function(){return o._buildNodeHooks("onBefore","to",n(),{async:!1})},this.getOnStartHooks=function(){return o._buildNodeHooks("onStart","to",n())},this.getOnExitHooks=function(){return o._buildNodeHooks("onExit","exiting",n(!0),{stateHook:!0})},this.getOnRetainHooks=function(){return o._buildNodeHooks("onRetain","retained",n(!1),{stateHook:!0})},this.getOnEnterHooks=function(){return o._buildNodeHooks("onEnter","entering",n(!1),{stateHook:!0})},this.getOnFinishHooks=function(){return o._buildNodeHooks("onFinish","to",n())},this.getOnSuccessHooks=function(){return o._buildNodeHooks("onSuccess","to",n(),{async:!1,rejectIfSuperseded:!1})},this.getOnErrorHooks=function(){return o._buildNodeHooks("onError","to",n(),{async:!1,rejectIfSuperseded:!1})},this.treeChanges=e.treeChanges(),this.toState=i.tail(this.treeChanges.to).state,this.fromState=i.tail(this.treeChanges.from).state,this.transitionOptions=e.options()}return t.prototype.asyncHooks=function(){var t=this.getOnStartHooks(),e=this.getOnExitHooks(),r=this.getOnRetainHooks(),n=this.getOnEnterHooks(),o=this.getOnFinishHooks(),a=[t,e,r,n,o];return a.reduce(i.unnestR,[]).filter(i.identity)},t.prototype._buildNodeHooks=function(t,e,r,n){var o=this,u=this._matchingHooks(t,this.treeChanges);if(!u)return[];var c=function(r){var u=r.matches(o.treeChanges),c=u[e],f="exiting"===e?o.treeChanges.from:o.treeChanges.to;new s.ResolveContext(f);return c.map(function(e){var s=i.extend({bind:r.bind,traceData:{hookType:t,context:e}},o.baseHookOptions,n),u=s.stateHook?e.state:null,c=new a.TransitionHook(o.transition,u,r,s);return{hook:r,node:e,transitionHook:c}})};return u.map(c).reduce(i.unnestR,[]).sort(r).map(function(t){return t.transitionHook})},t.prototype._matchingHooks=function(t,e){return[this.transition,this.$transitions].map(function(e){return e.getHooks(t)}).filter(i.assertPredicate(o.isArray,"broken event named: "+t)).reduce(i.unnestR,[]).filter(function(t){return t.matches(e)})},t}();e.HookBuilder=u},function(t,e,r){"use strict";var n=r(3),i=r(5),o=r(12),a=r(6),s=r(18),u=r(19),c=r(20),f=r(9),l=s.resolvePolicies.when,p=[l.EAGER,l.LAZY],h=[l.EAGER];e.NATIVE_INJECTOR_TOKEN="Native Injector";var v=function(){function t(t){this._path=t}return t.prototype.getTokens=function(){return this._path.reduce(function(t,e){return t.concat(e.resolvables.map(function(t){return t.token}))},[]).reduce(n.uniqR,[])},t.prototype.getResolvable=function(t){var e=this._path.map(function(t){return t.resolvables}).reduce(n.unnestR,[]).filter(function(e){return e.token===t});return n.tail(e)},t.prototype.subContext=function(e){return new t(c.PathFactory.subPath(this._path,function(t){return t.state===e}))},t.prototype.addResolvables=function(t,e){var r=n.find(this._path,i.propEq("state",e)),o=t.map(function(t){return t.token});r.resolvables=r.resolvables.filter(function(t){return o.indexOf(t.token)===-1}).concat(t)},t.prototype.resolvePath=function(t,e){var r=this;void 0===t&&(t="LAZY");var i=n.inArray(p,t)?t:"LAZY",u=i===s.resolvePolicies.when.EAGER?h:p;o.trace.traceResolvePath(this._path,t,e);var c=this._path.reduce(function(t,i){var o=function(t){return n.inArray(u,t.getPolicy(i.state).when)},a=i.resolvables.filter(o),s=r.subContext(i.state),c=function(t){return t.get(s,e).then(function(e){return{token:t.token,value:e}})};return t.concat(a.map(c))},[]);return a.services.$q.all(c)},t.prototype.injector=function(){
1776 return this._injector||(this._injector=new d(this))},t.prototype.findNode=function(t){return n.find(this._path,function(e){return n.inArray(e.resolvables,t)})},t.prototype.getDependencies=function(t){var e=this,r=this.findNode(t),i=c.PathFactory.subPath(this._path,function(t){return t===r})||this._path,o=i.reduce(function(t,e){return t.concat(e.resolvables)},[]).filter(function(e){return e!==t}),a=function(t){var r=o.filter(function(e){return e.token===t});if(r.length)return n.tail(r);var i=e.injector().getNative(t);if(!i)throw new Error("Could not find Dependency Injection token: "+f.stringify(t));return new u.Resolvable(t,function(){return i},[],i)};return t.deps.map(a)},t}();e.ResolveContext=v;var d=function(){function t(t){this.context=t,this["native"]=this.get(e.NATIVE_INJECTOR_TOKEN)||a.services.$injector}return t.prototype.get=function(t){var e=this.context.getResolvable(t);if(e){if(!e.resolved)throw new Error("Resolvable async .get() not complete:"+f.stringify(e.token));return e.data}return this["native"]&&this["native"].get(t)},t.prototype.getAsync=function(t){var e=this.context.getResolvable(t);return e?e.get(this.context):a.services.$q.when(this["native"].get(t))},t.prototype.getNative=function(t){return this["native"].get(t)},t}()},function(t,e){"use strict";e.resolvePolicies={when:{LAZY:"LAZY",EAGER:"EAGER"},async:{WAIT:"WAIT",NOWAIT:"NOWAIT",RXWAIT:"RXWAIT"}}},function(t,e,r){"use strict";var n=r(3),i=r(6),o=r(12),a=r(9),s=r(4);e.defaultResolvePolicy={when:"LAZY",async:"WAIT"};var u=function(){function t(e,r,o,a,u){if(this.resolved=!1,this.promise=void 0,e instanceof t)n.extend(this,e);else if(s.isFunction(r)){if(null==e||void 0==e)throw new Error("new Resolvable(): token argument is required");if(!s.isFunction(r))throw new Error("new Resolvable(): resolveFn argument must be a function");this.token=e,this.policy=a,this.resolveFn=r,this.deps=o||[],this.data=u,this.resolved=void 0!==u,this.promise=this.resolved?i.services.$q.when(this.data):void 0}else if(s.isObject(e)&&e.token&&s.isFunction(e.resolveFn)){var c=e;return new t(c.token,c.resolveFn,c.deps,c.policy,c.data)}}return t.prototype.getPolicy=function(t){var r=this.policy||{},n=t&&t.resolvePolicy||{};return{when:r.when||n.when||e.defaultResolvePolicy.when,async:r.async||n.async||e.defaultResolvePolicy.async}},t.prototype.resolve=function(t,e){var r=this,a=i.services.$q,s=function(){return a.all(t.getDependencies(r).map(function(r){return r.get(t,e)}))},u=function(t){return r.resolveFn.apply(null,t)},c=function(t){var e=t.cache(1);return e.take(1).toPromise().then(function(){return e})},f=t.findNode(this),l=f&&f.state,p="RXWAIT"===this.getPolicy(l).async?c:n.identity,h=function(t){return r.data=t,r.resolved=!0,o.trace.traceResolvableResolved(r,e),r.data};return this.promise=a.when().then(s).then(u).then(p).then(h)},t.prototype.get=function(t,e){return this.promise||this.resolve(t,e)},t.prototype.toString=function(){return"Resolvable(token: "+a.stringify(this.token)+", requires: ["+this.deps.map(a.stringify)+"])"},t.prototype.clone=function(){return new t(this)},t.fromData=function(e,r){return new t(e,function(){return r},null,null,r)},t}();e.Resolvable=u},function(t,e,r){"use strict";var n=r(3),i=r(5),o=r(14),a=r(21),s=function(){function t(){}return t.makeTargetState=function(t){var e=n.tail(t).state;return new o.TargetState(e,e,t.map(i.prop("paramValues")).reduce(n.mergeR,{}))},t.buildPath=function(t){var e=t.params();return t.$state().path.map(function(t){return new a.PathNode(t).applyRawParams(e)})},t.buildToPath=function(e,r){var n=t.buildPath(r);return r.options().inherit?t.inheritParams(e,n,Object.keys(r.params())):n},t.applyViewConfigs=function(e,r,i){r.filter(function(t){return n.inArray(i,t.state)}).forEach(function(i){var o=n.values(i.state.views||{}),a=t.subPath(r,function(t){return t===i}),s=o.map(function(t){return e.createViewConfig(a,t)});i.views=s.reduce(n.unnestR,[])})},t.inheritParams=function(t,e,r){function o(t,e){var r=n.find(t,i.propEq("state",e));return n.extend({},r&&r.paramValues)}function s(e){var i=n.extend({},e&&e.paramValues),s=n.pick(i,r);i=n.omit(i,r);var u=o(t,e.state)||{},c=n.extend(i,u,s);return new a.PathNode(e.state).applyRawParams(c)}return void 0===r&&(r=[]),e.map(s)},t.treeChanges=function(t,e,r){function n(t,r){var n=a.PathNode.clone(t);return n.paramValues=e[r].paramValues,n}for(var o=0,s=Math.min(t.length,e.length),u=function(t){return t.parameters({inherit:!1}).filter(i.not(i.prop("dynamic"))).map(i.prop("id"))},c=function(t,e){return t.equals(e,u(t.state))};o<s&&t[o].state!==r&&c(t[o],e[o]);)o++;var f,l,p,h,v;f=t,l=f.slice(0,o),p=f.slice(o);var d=l.map(n);return h=e.slice(o),v=d.concat(h),{from:f,to:v,retained:l,exiting:p,entering:h}},t.subPath=function(t,e){var r=n.find(t,e),i=t.indexOf(r);return i===-1?void 0:t.slice(0,i+1)},t.paramValues=function(t){return t.reduce(function(t,e){return n.extend(t,e.paramValues)},{})},t}();e.PathFactory=s},function(t,e,r){"use strict";var n=r(3),i=r(5),o=r(22),a=function(){function t(e){if(e instanceof t){var r=e;this.state=r.state,this.paramSchema=r.paramSchema.slice(),this.paramValues=n.extend({},r.paramValues),this.resolvables=r.resolvables.slice(),this.views=r.views&&r.views.slice()}else{var i=e;this.state=i,this.paramSchema=i.parameters({inherit:!1}),this.paramValues={},this.resolvables=i.resolvables.map(function(t){return t.clone()})}}return t.prototype.applyRawParams=function(t){var e=function(e){return[e.id,e.value(t[e.id])]};return this.paramValues=this.paramSchema.reduce(function(t,r){return n.applyPairs(t,e(r))},{}),this},t.prototype.parameter=function(t){return n.find(this.paramSchema,i.propEq("id",t))},t.prototype.equals=function(t,e){var r=this;void 0===e&&(e=this.paramSchema.map(function(t){return t.id}));var i=function(e){return r.parameter(e).type.equals(r.paramValues[e],t.paramValues[e])};return this.state===t.state&&e.map(i).reduce(n.allTrueR,!0)},t.clone=function(e){return new t(e)},t.matching=function(t,e,r){void 0===r&&(r=!0);for(var n=[],i=0;i<t.length&&i<e.length;i++){var a=t[i],s=e[i];if(a.state!==s.state)break;var u=o.Param.changed(a.paramSchema,a.paramValues,s.paramValues).filter(function(t){return!(r&&t.dynamic)});if(u.length)break;n.push(a)}return n},t}();e.PathNode=a},function(t,e,r){"use strict";function n(t){return t=v(t)&&{value:t}||t,s.extend(t,{$$fn:c.isInjectable(t.value)?t.value:function(){return t.value}})}function i(t,e,r,n,i){if(t.type&&e&&"string"!==e.name)throw new Error("Param '"+n+"' has two type configurations.");return t.type&&e&&"string"===e.name&&i.type(t.type)?i.type(t.type):e?e:t.type?t.type instanceof p.ParamType?t.type:i.type(t.type):r===d.CONFIG?i.type("any"):i.type("string")}function o(t,e){var r=t.squash;if(!e||r===!1)return!1;if(!c.isDefined(r)||null==r)return l.matcherConfig.defaultSquashPolicy();if(r===!0||c.isString(r))return r;throw new Error("Invalid squash policy: '"+r+"'. Valid policies: false, true, or arbitrary string")}function a(t,e,r,n){var i,o,a=[{from:"",to:r||e?void 0:""},{from:null,to:r||e?void 0:""}];return i=c.isArray(t.replace)?t.replace:[],c.isString(n)&&i.push({from:n,to:void 0}),o=s.map(i,u.prop("from")),s.filter(a,function(t){return o.indexOf(t.from)===-1}).concat(i)}var s=r(3),u=r(5),c=r(4),f=r(6),l=r(23),p=r(24),h=Object.prototype.hasOwnProperty,v=function(t){return 0===["value","type","squash","array","dynamic"].filter(h.bind(t||{})).length};!function(t){t[t.PATH=0]="PATH",t[t.SEARCH=1]="SEARCH",t[t.CONFIG=2]="CONFIG"}(e.DefType||(e.DefType={}));var d=e.DefType,m=function(){function t(t,e,r,u,f){function l(){var e={array:u===d.SEARCH&&"auto"},n=t.match(/\[\]$/)?{array:!0}:{};return s.extend(e,n,r).array}r=n(r),e=i(r,e,u,t,f);var p=l();e=p?e.$asArray(p,u===d.SEARCH):e;var h=void 0!==r.value,v=c.isDefined(r.dynamic)?!!r.dynamic:!!e.dynamic,m=o(r,h),g=a(r,p,h,m);s.extend(this,{id:t,type:e,location:u,squash:m,replace:g,isOptional:h,dynamic:v,config:r,array:p})}return t.prototype.isDefaultValue=function(t){return this.isOptional&&this.type.equals(this.value(),t)},t.prototype.value=function(t){var e=this,r=function(){if(!f.services.$injector)throw new Error("Injectable functions cannot be called at configuration time");var t=f.services.$injector.invoke(e.config.$$fn);if(null!==t&&void 0!==t&&!e.type.is(t))throw new Error("Default value ("+t+") for parameter '"+e.id+"' is not an instance of ParamType ("+e.type.name+")");return t},n=function(t){var r=s.map(s.filter(e.replace,u.propEq("from",t)),u.prop("to"));return r.length?r[0]:t};return t=n(t),c.isDefined(t)?this.type.$normalize(t):r()},t.prototype.isSearch=function(){return this.location===d.SEARCH},t.prototype.validates=function(t){if((!c.isDefined(t)||null===t)&&this.isOptional)return!0;var e=this.type.$normalize(t);if(!this.type.is(e))return!1;var r=this.type.encode(e);return!(c.isString(r)&&!this.type.pattern.exec(r))},t.prototype.toString=function(){return"{Param:"+this.id+" "+this.type+" squash: '"+this.squash+"' optional: "+this.isOptional+"}"},t.fromConfig=function(e,r,n,i){return new t(e,r,n,d.CONFIG,i)},t.fromPath=function(e,r,n,i){return new t(e,r,n,d.PATH,i)},t.fromSearch=function(e,r,n,i){return new t(e,r,n,d.SEARCH,i)},t.values=function(t,e){return void 0===e&&(e={}),t.map(function(t){return[t.id,t.value(e[t.id])]}).reduce(s.applyPairs,{})},t.changed=function(t,e,r){return void 0===e&&(e={}),void 0===r&&(r={}),t.filter(function(t){return!t.type.equals(e[t.id],r[t.id])})},t.equals=function(e,r,n){return void 0===r&&(r={}),void 0===n&&(n={}),0===t.changed(e,r,n).length},t.validates=function(t,e){return void 0===e&&(e={}),t.map(function(t){return t.validates(e[t.id])}).reduce(s.allTrueR,!0)},t}();e.Param=m},function(t,e,r){"use strict";var n=r(4),i=function(){function t(){this._isCaseInsensitive=!1,this._isStrictMode=!0,this._defaultSquashPolicy=!1}return t.prototype.caseInsensitive=function(t){return this._isCaseInsensitive=n.isDefined(t)?t:this._isCaseInsensitive},t.prototype.strictMode=function(t){return this._isStrictMode=n.isDefined(t)?t:this._isStrictMode},t.prototype.defaultSquashPolicy=function(t){if(n.isDefined(t)&&t!==!0&&t!==!1&&!n.isString(t))throw new Error("Invalid squash policy: "+t+". Valid policies: false, true, arbitrary-string");return this._defaultSquashPolicy=n.isDefined(t)?t:this._defaultSquashPolicy},t}();e.MatcherConfig=i,e.matcherConfig=new i},function(t,e,r){"use strict";function n(t,e){function r(t){return o.isArray(t)?t:o.isDefined(t)?[t]:[]}function n(t){switch(t.length){case 0:return;case 1:return"auto"===e?t[0]:t;default:return t}}function a(t,e){return function(a){if(o.isArray(a)&&0===a.length)return a;var s=r(a),u=i.map(s,t);return e===!0?0===i.filter(u,function(t){return!t}).length:n(u)}}function s(t){return function(e,n){var i=r(e),o=r(n);if(i.length!==o.length)return!1;for(var a=0;a<i.length;a++)if(!t(i[a],o[a]))return!1;return!0}}var u=this;["encode","decode","equals","$normalize"].forEach(function(e){var r=t[e].bind(t),n="equals"===e?s:a;u[e]=n(r)}),i.extend(this,{dynamic:t.dynamic,name:t.name,pattern:t.pattern,is:a(t.is.bind(t),!0),$arrayMode:e})}var i=r(3),o=r(4),a=function(){function t(t){this.pattern=/.*/,i.extend(this,t)}return t.prototype.is=function(t,e){return!0},t.prototype.encode=function(t,e){return t},t.prototype.decode=function(t,e){return t},t.prototype.equals=function(t,e){return t==e},t.prototype.$subPattern=function(){var t=this.pattern.toString();return t.substr(1,t.length-2)},t.prototype.toString=function(){return"{ParamType:"+this.name+"}"},t.prototype.$normalize=function(t){return this.is(t)?t:this.decode(t)},t.prototype.$asArray=function(t,e){if(!t)return this;if("auto"===t&&!e)throw new Error("'auto' array mode is for query parameters only");return new n(this,t)},t}();e.ParamType=a},function(t,e,r){"use strict";var n=r(26),i=r(29),o=r(29),a=r(30),s=r(37),u=r(38),c=r(43),f=r(44),l=function(){function t(){this.viewService=new s.ViewService,this.transitionService=new a.TransitionService(this),this.globals=new f.Globals(this.transitionService),this.urlMatcherFactory=new n.UrlMatcherFactory,this.urlRouterProvider=new i.UrlRouterProvider(this.urlMatcherFactory,this.globals.params),this.urlRouter=new o.UrlRouter(this.urlRouterProvider),this.stateRegistry=new u.StateRegistry(this.urlMatcherFactory,this.urlRouterProvider),this.stateService=new c.StateService(this),this.viewService.rootContext(this.stateRegistry.root()),this.globals.$current=this.stateRegistry.root(),this.globals.current=this.globals.$current.self}return t}();e.UIRouter=l},function(t,e,r){"use strict";function n(){return{strict:s.matcherConfig.strictMode(),caseInsensitive:s.matcherConfig.caseInsensitive()}}var i=r(3),o=r(4),a=r(27),s=r(23),u=r(22),c=r(28),f=function(){function t(){this.paramTypes=new c.ParamTypes,i.extend(this,{UrlMatcher:a.UrlMatcher,Param:u.Param})}return t.prototype.caseInsensitive=function(t){return s.matcherConfig.caseInsensitive(t)},t.prototype.strictMode=function(t){return s.matcherConfig.strictMode(t)},t.prototype.defaultSquashPolicy=function(t){return s.matcherConfig.defaultSquashPolicy(t)},t.prototype.compile=function(t,e){return new a.UrlMatcher(t,this.paramTypes,i.extend(n(),e))},t.prototype.isMatcher=function(t){if(!o.isObject(t))return!1;var e=!0;return i.forEach(a.UrlMatcher.prototype,function(r,n){o.isFunction(r)&&(e=e&&o.isDefined(t[n])&&o.isFunction(t[n]))}),e},t.prototype.type=function(t,e,r){var n=this.paramTypes.type(t,e,r);return o.isDefined(e)?this:n},t.prototype.$get=function(){return this.paramTypes.enqueue=!1,this.paramTypes._flushTypeQueue(),this},t}();e.UrlMatcherFactory=f},function(t,e,r){"use strict";function n(t,e){var r=["",""],n=t.replace(/[\\\[\]\^$*+?.()|{}]/g,"\\$&");if(!e)return n;switch(e.squash){case!1:r=["(",")"+(e.isOptional?"?":"")];break;case!0:n=n.replace(/\/$/,""),r=["(?:/(",")|/)?"];break;default:r=["("+e.squash+"|",")?"]}return n+r[0]+e.type.pattern.source+r[1]}var i=r(3),o=r(5),a=r(4),s=r(22),u=r(4),c=r(22),f=r(3),l=r(3),p=function(t,e,r){return t[e]=t[e]||r()},h=function(){function t(e,r,a){var u=this;this.config=a,this._cache={path:[],pattern:null},this._children=[],this._params=[],this._segments=[],this._compiled=[],this.pattern=e,this.config=i.defaults(this.config,{params:{},strict:!0,caseInsensitive:!1,paramMap:i.identity});for(var c,f,l,p=/([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,h=/([:]?)([\w\[\].-]+)|\{([\w\[\].-]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,v=0,d=[],m=function(r){if(!t.nameValidator.test(r))throw new Error("Invalid parameter name '"+r+"' in pattern '"+e+"'");if(i.find(u._params,o.propEq("id",r)))throw new Error("Duplicate parameter name '"+r+"' in pattern '"+e+"'")},g=function(t,n){var o=t[2]||t[3],a=n?t[4]:t[4]||("*"===t[1]?".*":null);return{id:o,regexp:a,cfg:u.config.params[o],segment:e.substring(v,t.index),type:a?r.type(a||"string")||i.inherit(r.type("string"),{pattern:new RegExp(a,u.config.caseInsensitive?"i":void 0)}):null}};(c=p.exec(e))&&(f=g(c,!1),!(f.segment.indexOf("?")>=0));)m(f.id),this._params.push(s.Param.fromPath(f.id,f.type,this.config.paramMap(f.cfg,!1),r)),this._segments.push(f.segment),d.push([f.segment,i.tail(this._params)]),v=p.lastIndex;l=e.substring(v);var y=l.indexOf("?");if(y>=0){var w=l.substring(y);if(l=l.substring(0,y),w.length>0)for(v=0;c=h.exec(w);)f=g(c,!0),m(f.id),this._params.push(s.Param.fromSearch(f.id,f.type,this.config.paramMap(f.cfg,!0),r)),v=p.lastIndex}this._segments.push(l),i.extend(this,{_compiled:d.map(function(t){return n.apply(null,t)}).concat(n(l)),prefix:this._segments[0]}),Object.freeze(this)}return t.prototype.append=function(t){return this._children.push(t),i.forEach(t._cache,function(e,r){return t._cache[r]=a.isArray(e)?[]:null}),t._cache.path=this._cache.path.concat(this),t},t.prototype.isRoot=function(){return 0===this._cache.path.length},t.prototype.toString=function(){return this.pattern},t.prototype.exec=function(t,e,r,n){function a(t){var e=function(t){return t.split("").reverse().join("")},r=function(t){return t.replace(/\\-/g,"-")},n=e(t).split(/-(?!\\)/),o=i.map(n,e);return i.map(o,r).reverse()}var s=this;void 0===e&&(e={}),void 0===n&&(n={});var c=p(this._cache,"pattern",function(){return new RegExp(["^",i.unnest(s._cache.path.concat(s).map(o.prop("_compiled"))).join(""),s.config.strict===!1?"/?":"","$"].join(""),s.config.caseInsensitive?"i":void 0)}).exec(t);if(!c)return null;var f=this.parameters(),l=f.filter(function(t){return!t.isSearch()}),h=f.filter(function(t){return t.isSearch()}),v=this._cache.path.concat(this).map(function(t){return t._segments.length-1}).reduce(function(t,e){return t+e}),d={};if(v!==c.length-1)throw new Error("Unbalanced capture group in route '"+this.pattern+"'");for(var m=0;m<v;m++){for(var g=l[m],y=c[m+1],w=0;w<g.replace.length;w++)g.replace[w].from===y&&(y=g.replace[w].to);y&&g.array===!0&&(y=a(y)),u.isDefined(y)&&(y=g.type.decode(y)),d[g.id]=g.value(y)}return h.forEach(function(t){for(var r=e[t.id],n=0;n<t.replace.length;n++)t.replace[n].from===r&&(r=t.replace[n].to);u.isDefined(r)&&(r=t.type.decode(r)),d[t.id]=t.value(r)}),r&&(d["#"]=r),d},t.prototype.parameters=function(t){return void 0===t&&(t={}),t.inherit===!1?this._params:i.unnest(this._cache.path.concat(this).map(o.prop("_params")))},t.prototype.parameter=function(t,e){void 0===e&&(e={});var r=i.tail(this._cache.path);return i.find(this._params,o.propEq("id",t))||e.inherit!==!1&&r&&r.parameter(t)||null},t.prototype.validates=function(t){var e=this,r=function(t,e){return!t||t.validates(e)};return i.pairs(t||{}).map(function(t){var n=t[0],i=t[1];return r(e.parameter(n),i)}).reduce(i.allTrueR,!0)},t.prototype.format=function(e){function r(t){var r=t.value(e[t.id]),n=t.isDefaultValue(r),i=!!n&&t.squash,o=t.type.encode(r);return{param:t,value:r,isDefaultValue:n,squash:i,encoded:o}}if(void 0===e&&(e={}),!this.validates(e))return null;var n=this._cache.path.slice().concat(this),o=n.map(t.pathSegmentsAndParams).reduce(f.unnestR,[]),s=n.map(t.queryParams).reduce(f.unnestR,[]),u=o.reduce(function(e,n){if(a.isString(n))return e+n;var o=r(n),s=o.squash,u=o.encoded,c=o.param;return s===!0?e.match(/\/$/)?e.slice(0,-1):e:a.isString(s)?e+s:s!==!1?e:null==u?e:a.isArray(u)?e+i.map(u,t.encodeDashes).join("-"):c.type.raw?e+u:e+encodeURIComponent(u)},""),c=s.map(function(t){var e=r(t),n=e.squash,o=e.encoded,s=e.isDefaultValue;if(!(null==o||s&&n!==!1)&&(a.isArray(o)||(o=[o]),0!==o.length))return t.type.raw||(o=i.map(o,encodeURIComponent)),o.map(function(e){return t.id+"="+e})}).filter(i.identity).reduce(f.unnestR,[]).join("&");return u+(c?"?"+c:"")+(e["#"]?"#"+e["#"]:"")},t.encodeDashes=function(t){return encodeURIComponent(t).replace(/-/g,function(t){return"%5C%"+t.charCodeAt(0).toString(16).toUpperCase()})},t.pathSegmentsAndParams=function(t){var e=t._segments,r=t._params.filter(function(t){return t.location===c.DefType.PATH});return l.arrayTuples(e,r.concat(void 0)).reduce(f.unnestR,[]).filter(function(t){return""!==t&&u.isDefined(t)})},t.queryParams=function(t){return t._params.filter(function(t){return t.location===c.DefType.SEARCH})},t.nameValidator=/^\w+([-.]+\w+)*(?:\[\])?$/,t}();e.UrlMatcher=h},function(t,e,r){"use strict";function n(t){return null!=t?t.toString().replace(/(~|\/)/g,function(t){return{"~":"~~","/":"~2F"}[t]}):t}function i(t){return null!=t?t.toString().replace(/(~~|~2F)/g,function(t){return{"~~":"~","~2F":"/"}[t]}):t}var o=r(3),a=r(4),s=r(5),u=r(6),c=r(24),f=function(){function t(){this.enqueue=!0,this.typeQueue=[],this.defaultTypes={hash:{encode:n,decode:i,is:s.is(String),pattern:/.*/,equals:function(t,e){return t==e}},string:{encode:n,decode:i,is:s.is(String),pattern:/[^\/]*/},"int":{encode:n,decode:function(t){return parseInt(t,10)},is:function(t){return a.isDefined(t)&&this.decode(t.toString())===t},pattern:/-?\d+/},bool:{encode:function(t){return t&&1||0},decode:function(t){return 0!==parseInt(t,10)},is:s.is(Boolean),pattern:/0|1/},date:{encode:function(t){return this.is(t)?[t.getFullYear(),("0"+(t.getMonth()+1)).slice(-2),("0"+t.getDate()).slice(-2)].join("-"):void 0},decode:function(t){if(this.is(t))return t;var e=this.capture.exec(t);return e?new Date(e[1],e[2]-1,e[3]):void 0},is:function(t){return t instanceof Date&&!isNaN(t.valueOf())},equals:function(t,e){return["getFullYear","getMonth","getDate"].reduce(function(r,n){return r&&t[n]()===e[n]()},!0)},pattern:/[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,capture:/([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/},json:{encode:o.toJson,decode:o.fromJson,is:s.is(Object),equals:o.equals,pattern:/[^\/]*/},any:{encode:o.identity,decode:o.identity,equals:o.equals,pattern:/.*/}};var t=function(t,e){return new c.ParamType(o.extend({name:e},t))};this.types=o.inherit(o.map(this.defaultTypes,t),{})}return t.prototype.type=function(t,e,r){if(!a.isDefined(e))return this.types[t];if(this.types.hasOwnProperty(t))throw new Error("A type named '"+t+"' has already been defined.");return this.types[t]=new c.ParamType(o.extend({name:t},e)),r&&(this.typeQueue.push({name:t,def:r}),this.enqueue||this._flushTypeQueue()),this},t.prototype._flushTypeQueue=function(){for(;this.typeQueue.length;){var t=this.typeQueue.shift();if(t.pattern)throw new Error("You cannot override a type's .pattern at runtime.");o.extend(this.types[t.name],u.services.$injector.invoke(t.def))}},t}();e.ParamTypes=f},function(t,e,r){"use strict";function n(t){var e=/^\^((?:\\[^a-zA-Z0-9]|[^\\\[\]\^$*+?.()|{}]+)*)/.exec(t.source);return null!=e?e[1].replace(/\\(.)/g,"$1"):""}function i(t,e){return t.replace(/\$(\$|\d{1,2})/,function(t,r){return e["$"===r?0:Number(r)]})}function o(t,e,r,n){if(!n)return!1;var i=t.invoke(r,r,{$match:n,$stateParams:e});return!c.isDefined(i)||i}function a(t,e,r){var n=f.services.locationConfig.baseHref();return"/"===n?t:e?n.slice(0,-1)+t:r?n.slice(1)+t:t}function s(t,e,r){function n(t){var e=t(f.services.$injector,l);return!!e&&(c.isString(e)&&l.setUrl(e,!0),!0)}if(!r||!r.defaultPrevented){for(var i=t.length,o=0;o<i;o++)if(n(t[o]))return;e&&n(e)}}var u=r(3),c=r(4),f=r(6),l=f.services.location,p=function(){function t(t,e){this.rules=[],this.interceptDeferred=!1,this.$urlMatcherFactory=t,this.$stateParams=e}return t.prototype.rule=function(t){if(!c.isFunction(t))throw new Error("'rule' must be a function");return this.rules.push(t),this},t.prototype.removeRule=function(t){return this.rules.length!==u.removeFrom(this.rules,t).length},t.prototype.otherwise=function(t){if(!c.isFunction(t)&&!c.isString(t))throw new Error("'rule' must be a string or function");return this.otherwiseFn=c.isString(t)?function(){return t}:t,this},t.prototype.when=function(t,e,r){void 0===r&&(r=function(t){});var a,s=this,p=s.$urlMatcherFactory,h=s.$stateParams,v=c.isString(e);if(c.isString(t)&&(t=p.compile(t)),!v&&!c.isFunction(e)&&!c.isArray(e))throw new Error("invalid 'handler' in when()");var d={matcher:function(t,e){return v&&(a=p.compile(e),e=["$match",a.format.bind(a)]),u.extend(function(){return o(f.services.$injector,h,e,t.exec(l.path(),l.search(),l.hash()))},{prefix:c.isString(t.prefix)?t.prefix:""})},regex:function(t,e){if(t.global||t.sticky)throw new Error("when() RegExp must not be global or sticky");return v&&(a=e,e=["$match",function(t){return i(a,t)}]),u.extend(function(){return o(f.services.$injector,h,e,t.exec(l.path()))},{prefix:n(t)})}},m={matcher:p.isMatcher(t),regex:t instanceof RegExp};for(var g in m)if(m[g]){var y=d[g](t,e);return r(y),this.rule(y)}throw new Error("invalid 'what' in when()")},t.prototype.deferIntercept=function(t){void 0===t&&(t=!0),this.interceptDeferred=t},t}();e.UrlRouterProvider=p;var h=function(){function t(e){this.urlRouterProvider=e,u.bindFunctions(t.prototype,this,this)}return t.prototype.sync=function(){s(this.urlRouterProvider.rules,this.urlRouterProvider.otherwiseFn)},t.prototype.listen=function(){var t=this;return this.listener=this.listener||l.onChange(function(e){return s(t.urlRouterProvider.rules,t.urlRouterProvider.otherwiseFn,e)})},t.prototype.update=function(t){return t?void(this.location=l.path()):void(l.path()!==this.location&&l.setUrl(this.location,!0))},t.prototype.push=function(t,e,r){var n=r&&!!r.replace;l.setUrl(t.format(e||{}),n)},t.prototype.href=function(t,e,r){if(!t.validates(e))return null;var n=t.format(e);r=r||{absolute:!1};var i=f.services.locationConfig,o=i.html5Mode();if(o||null===n||(n="#"+i.hashPrefix()+n),n=a(n,o,r.absolute),!r.absolute||!n)return n;var s=!o&&n?"/":"",u=i.port();return u=80===u||443===u?"":":"+u,[i.protocol(),"://",i.host(),u,s,n].join("")},t}();e.UrlRouter=h},function(t,e,r){"use strict";var n=r(11),i=r(15),o=r(31),a=r(32),s=r(33),u=r(34),c=r(35),f=r(36);e.defaultTransOpts={location:!0,relative:null,inherit:!1,notify:!0,reload:!1,custom:{},current:function(){return null},source:"unknown"};var l=function(){function t(t){this._router=t,this.$view=t.viewService,i.HookRegistry.mixin(new i.HookRegistry,this),this._deregisterHookFns={},this.registerTransitionHooks()}return t.prototype.registerTransitionHooks=function(){var t=this._deregisterHookFns;t.redirectTo=u.registerRedirectToHook(this),t.onExit=c.registerOnExitHook(this),t.onRetain=c.registerOnRetainHook(this),t.onEnter=c.registerOnEnterHook(this),t.eagerResolve=o.registerEagerResolvePath(this),t.lazyResolve=o.registerLazyResolveState(this),t.loadViews=a.registerLoadEnteringViews(this),t.activateViews=a.registerActivateViews(this),t.updateUrl=s.registerUpdateUrl(this),t.lazyLoad=f.registerLazyLoadHook(this)},t.prototype.onBefore=function(t,e,r){throw""},t.prototype.onStart=function(t,e,r){throw""},t.prototype.onExit=function(t,e,r){throw""},t.prototype.onRetain=function(t,e,r){throw""},t.prototype.onEnter=function(t,e,r){throw""},t.prototype.onFinish=function(t,e,r){throw""},t.prototype.onSuccess=function(t,e,r){throw""},t.prototype.onError=function(t,e,r){throw""},t.prototype.create=function(t,e){return new n.Transition(t,e,this._router)},t}();e.TransitionService=l},function(t,e,r){"use strict";var n=r(3),i=r(17),o=r(5),a=function(t){return new i.ResolveContext(t.treeChanges().to).resolvePath("EAGER",t).then(n.noop)};e.registerEagerResolvePath=function(t){return t.onStart({},a,{priority:1e3})};var s=function(t,e){return new i.ResolveContext(t.treeChanges().to).subContext(e).resolvePath("LAZY",t).then(n.noop)};e.registerLazyResolveState=function(t){return t.onEnter({entering:o.val(!0)},s,{priority:1e3})}},function(t,e,r){"use strict";var n=r(3),i=r(6),o=function(t){var e=t.views("entering");if(e.length)return i.services.$q.all(e.map(function(t){return t.load()})).then(n.noop)};e.registerLoadEnteringViews=function(t){return t.onStart({},o)};var a=function(t){var e=t.views("entering"),r=t.views("exiting");if(e.length||r.length){var n=t.router.viewService;r.forEach(function(t){return n.deactivateViewConfig(t)}),e.forEach(function(t){return n.activateViewConfig(t)}),n.sync()}};e.registerActivateViews=function(t){return t.onSuccess({},a)}},function(t,e){"use strict";var r=function(t){var e=t.options(),r=t.router.stateService,n=t.router.urlRouter;if("url"!==e.source&&e.location&&r.$current.navigable){var i={replace:"replace"===e.location};n.push(r.$current.navigable.url,r.params,i)}n.update(!0)};e.registerUpdateUrl=function(t){return t.onSuccess({},r,{priority:9999})}},function(t,e,r){"use strict";var n=r(4),i=r(6),o=r(14),a=function(t){function e(e){var r=t.router.stateService;return e instanceof o.TargetState?e:n.isString(e)?r.target(e,t.params(),t.options()):e.state||e.params?r.target(e.state||t.to(),e.params||t.params(),t.options()):void 0}var r=t.to().redirectTo;if(r)return n.isFunction(r)?i.services.$q.when(r(t)).then(e):e(r)};e.registerRedirectToHook=function(t){return t.onStart({to:function(t){return!!t.redirectTo}},a)}},function(t,e){"use strict";function r(t){return function(e,r){var n=r[t];return n(e,r)}}var n=r("onExit");e.registerOnExitHook=function(t){return t.onExit({exiting:function(t){return!!t.onExit}},n)};var i=r("onRetain");e.registerOnRetainHook=function(t){return t.onRetain({retained:function(t){return!!t.onRetain}},i)};var o=r("onEnter");e.registerOnEnterHook=function(t){return t.onEnter({entering:function(t){return!!t.onEnter}},o)}},function(t,e,r){"use strict";var n=r(6),i=function(t){function e(){if("url"===t.options().source){var e=n.services.location,r=e.path(),i=e.search(),a=e.hash(),s=function(t){return[t,t.url&&t.url.exec(r,i,a)]},u=o.get().map(function(t){return t.$$state()}).map(s).filter(function(t){var e=(t[0],t[1]);return!!e});if(u.length){var c=u[0],f=c[0],l=c[1];return t.router.stateService.target(f,l,t.options())}t.router.urlRouter.sync()}var p=t.targetState();return t.router.stateService.target(p.identifier(),p.params(),p.options())}function r(e){o.deregister(t.$to()),e&&Array.isArray(e.states)&&e.states.forEach(function(t){return o.register(t)})}var i=t.to(),o=t.router.stateRegistry,a=i.lazyLoad,s=a._promise;if(!s){s=a._promise=a(t).then(r);var u=function(){return delete a._promise};s.then(u,u)}return s.then(e)};e.registerLazyLoadHook=function(t){return t.onBefore({to:function(t){return!!t.lazyLoad}},i)}},function(t,e,r){"use strict";var n=r(3),i=r(5),o=r(4),a=r(12),s=function(){function t(){var t=this;this.uiViews=[],this.viewConfigs=[],this._viewConfigFactories={},this.sync=function(){function e(t){return t.fqn.split(".").length}function r(t){for(var e=t.viewDecl.$context,r=0;++r&&e.parent;)e=e.parent;return r}var o=t.uiViews.map(function(t){return[t.fqn,t]}).reduce(n.applyPairs,{}),a=function(t){return function(e){if(t.$type!==e.viewDecl.$type)return!1;var r=e.viewDecl,i=r.$uiViewName.split("."),a=t.fqn.split(".");if(!n.equals(i,a.slice(0-i.length)))return!1;var s=1-i.length||void 0,u=a.slice(0,s).join("."),c=o[u].creationContext;return r.$uiViewContextAnchor===(c&&c.name)}},s=i.curry(function(t,e,r,n){return e*(t(r)-t(n))}),u=function(e){var n=t.viewConfigs.filter(a(e));return n.length>1&&n.sort(s(r,-1)),[e,n[0]]},c=function(e){var r=e[0],n=e[1];t.uiViews.indexOf(r)!==-1&&r.configUpdated(n)};t.uiViews.sort(s(e,1)).map(u).forEach(c)}}return t.prototype.rootContext=function(t){return this._rootContext=t||this._rootContext},t.prototype.viewConfigFactory=function(t,e){this._viewConfigFactories[t]=e},t.prototype.createViewConfig=function(t,e){var r=this._viewConfigFactories[e.$type];if(!r)throw new Error("ViewService: No view config factory registered for type "+e.$type);var n=r(t,e);return o.isArray(n)?n:[n]},t.prototype.deactivateViewConfig=function(t){a.trace.traceViewServiceEvent("<- Removing",t),n.removeFrom(this.viewConfigs,t)},t.prototype.activateViewConfig=function(t){a.trace.traceViewServiceEvent("-> Registering",t),this.viewConfigs.push(t)},t.prototype.registerUIView=function(t){a.trace.traceViewServiceUIViewEvent("-> Registering",t);var e=this.uiViews,r=function(e){return e.fqn===t.fqn};return e.filter(r).length&&a.trace.traceViewServiceUIViewEvent("!!!! duplicate uiView named:",t),e.push(t),this.sync(),function(){var r=e.indexOf(t);return r===-1?void a.trace.traceViewServiceUIViewEvent("Tried removing non-registered uiView",t):(a.trace.traceViewServiceUIViewEvent("<- Deregistering",t),void n.removeFrom(e)(t))}},t.prototype.available=function(){return this.uiViews.map(i.prop("fqn"))},t.prototype.active=function(){return this.uiViews.filter(i.prop("$config")).map(i.prop("name"))},t.normalizeUIViewTarget=function(t,e){void 0===e&&(e="");var r=e.split("@"),n=r[0]||"$default",i=o.isString(r[1])?r[1]:"^",a=/^(\^(?:\.\^)*)\.(.*$)/.exec(n);a&&(i=a[1],n=a[2]),"!"===n.charAt(0)&&(n=n.substr(1),i="");var s=/^(\^(?:\.\^)*)$/;if(s.exec(i)){var u=i.split(".").reduce(function(t,e){return t.parent},t);i=u.name}return{uiViewName:n,uiViewContextAnchor:i}},t}();e.ViewService=s},function(t,e,r){"use strict";var n=r(39),i=r(40),o=r(41),a=r(3),s=function(){function t(t,e){this.urlRouterProvider=e,this.states={},this.listeners=[],this.matcher=new n.StateMatcher(this.states),this.builder=new i.StateBuilder(this.matcher,t),this.stateQueue=new o.StateQueueManager(this.states,this.builder,e,this.listeners);
1777 var r={name:"",url:"^",views:null,params:{"#":{value:null,type:"hash",dynamic:!0}},"abstract":!0},a=this._root=this.stateQueue.register(r);a.navigable=null}return t.prototype.onStatesChanged=function(t){return this.listeners.push(t),function(){a.removeFrom(this.listeners)(t)}.bind(this)},t.prototype.root=function(){return this._root},t.prototype.register=function(t){return this.stateQueue.register(t)},t.prototype._deregisterTree=function(t){var e=this,r=this.get().map(function(t){return t.$$state()}),n=function(t){var e=r.filter(function(e){return t.indexOf(e.parent)!==-1});return 0===e.length?e:e.concat(n(e))},i=n([t]),o=[t].concat(i).reverse();return o.forEach(function(t){e.urlRouterProvider.removeRule(t._urlRule),delete e.states[t.name]}),o},t.prototype.deregister=function(t){var e=this.get(t);if(!e)throw new Error("Can't deregister state; not found: "+t);var r=this._deregisterTree(e.$$state());return this.listeners.forEach(function(t){return t("deregistered",r.map(function(t){return t.self}))}),r},t.prototype.get=function(t,e){var r=this;if(0===arguments.length)return Object.keys(this.states).map(function(t){return r.states[t].self});var n=this.matcher.find(t,e);return n&&n.self||null},t.prototype.decorator=function(t,e){return this.builder.builder(t,e)},t}();e.StateRegistry=s},function(t,e,r){"use strict";var n=r(4),i=r(7),o=r(3),a=function(){function t(t){this._states=t}return t.prototype.isRelative=function(t){return t=t||"",0===t.indexOf(".")||0===t.indexOf("^")},t.prototype.find=function(t,e){if(t||""===t){var r=n.isString(t),a=r?t:t.name;this.isRelative(a)&&(a=this.resolvePath(a,e));var s=this._states[a];if(s&&(r||!(r||s!==t&&s.self!==t)))return s;if(r){var u=o.values(this._states).filter(function(t){return new i.Glob(t.name).matches(a)});return u.length>1&&console.log("stateMatcher.find: Found multiple matches for "+a+" using glob: ",u.map(function(t){return t.name})),u[0]}}},t.prototype.resolvePath=function(t,e){if(!e)throw new Error("No reference point given for path '"+t+"'");for(var r=this.find(e),n=t.split("."),i=0,o=n.length,a=r;i<o;i++)if(""!==n[i]||0!==i){if("^"!==n[i])break;if(!a.parent)throw new Error("Path '"+t+"' not valid for state '"+r.name+"'");a=a.parent}else a=r;var s=n.slice(i).join(".");return a.name+(a.name&&s?".":"")+s},t}();e.StateMatcher=a},function(t,e,r){"use strict";function n(t){return t.lazyLoad&&(t.name=t.self.name+".**"),t.name}function i(t){return t.self.$$state=function(){return t},t.self}function o(t){return t.parent&&t.parent.data&&(t.data=t.self.data=c.inherit(t.parent.data,t.data)),t.data}function a(t){return t.parent?t.parent.path.concat(t):[t]}function s(t){var e=t.parent?c.extend({},t.parent.includes):{};return e[t.name]=!0,e}function u(t){var e=function(t,e){return Object.keys(t||{}).map(function(r){return{token:r,val:t[r],deps:void 0,policy:e[r]}})},r=function(t){return t.$inject||d.services.$injector.annotate(t,d.services.$injector.strictDi)},n=function(t){return!(!t.token||!t.resolveFn)},i=function(t){return!(!t.provide&&!t.token||!(t.useValue||t.useFactory||t.useExisting||t.useClass))},o=function(t){return!!(t&&t.val&&(f.isString(t.val)||f.isArray(t.val)||f.isFunction(t.val)))},a=function(t){return t.provide||t.token},s=p.pattern([[p.prop("resolveFn"),function(t){return new v.Resolvable(a(t),t.resolveFn,t.deps,t.policy)}],[p.prop("useFactory"),function(t){return new v.Resolvable(a(t),t.useFactory,t.deps||t.dependencies,t.policy)}],[p.prop("useClass"),function(t){return new v.Resolvable(a(t),function(){return new t.useClass},[],t.policy)}],[p.prop("useValue"),function(t){return new v.Resolvable(a(t),function(){return t.useValue},[],t.policy,t.useValue)}],[p.prop("useExisting"),function(t){return new v.Resolvable(a(t),c.identity,[t.useExisting],t.policy)}]]),u=p.pattern([[p.pipe(p.prop("val"),f.isString),function(t){return new v.Resolvable(t.token,c.identity,[t.val],t.policy)}],[p.pipe(p.prop("val"),f.isArray),function(t){return new v.Resolvable(t.token,c.tail(t.val),t.val.slice(0,-1),t.policy)}],[p.pipe(p.prop("val"),f.isFunction),function(t){return new v.Resolvable(t.token,t.val,r(t.val),t.policy)}]]),h=p.pattern([[p.is(v.Resolvable),function(t){return t}],[n,s],[i,s],[o,u],[p.val(!0),function(t){throw new Error("Invalid resolve value: "+l.stringify(t))}]]),m=t.resolve,g=f.isArray(m)?m:e(m,t.resolvePolicy||{});return g.map(h)}var c=r(3),f=r(4),l=r(9),p=r(5),h=r(22),v=r(19),d=r(6),m=function(t){if(!f.isString(t))return!1;var e="^"===t.charAt(0);return{val:e?t.substring(1):t,root:e}},g=function(t,e){return function(r){var n=r;n&&n.url&&n.lazyLoad&&(n.url+="{remainder:any}");var i=m(n.url),o=r.parent,a=i?t.compile(i.val,{params:r.params||{},paramMap:function(t,e){return n.reloadOnSearch===!1&&e&&(t=c.extend(t||{},{dynamic:!0})),t}}):n.url;if(!a)return null;if(!t.isMatcher(a))throw new Error("Invalid url '"+a+"' in state '"+r+"'");return i&&i.root?a:(o&&o.navigable||e()).url.append(a)}},y=function(t){return function(e){return!t(e)&&e.url?e:e.parent?e.parent.navigable:null}},w=function(t){return function(e){var r=function(e,r){return h.Param.fromConfig(r,null,e,t)},n=e.url&&e.url.parameters({inherit:!1})||[],i=c.values(c.mapObj(c.omit(e.params||{},n.map(p.prop("id"))),r));return n.concat(i).map(function(t){return[t.id,t]}).reduce(c.applyPairs,{})}};e.resolvablesBuilder=u;var b=function(){function t(t,e){function r(e){return l(e)?null:t.find(c.parentName(e))||f()}this.matcher=t;var c=this,f=function(){return t.find("")},l=function(t){return""===t.name};this.builders={name:[n],self:[i],parent:[r],data:[o],url:[g(e,f)],navigable:[y(l)],params:[w(e.paramTypes)],views:[],path:[a],includes:[s],resolvables:[u]}}return t.prototype.builder=function(t,e){var r=this.builders,n=r[t]||[];return f.isString(t)&&!f.isDefined(e)?n.length>1?n:n[0]:f.isString(t)&&f.isFunction(e)?(r[t]=n,r[t].push(e),function(){return r[t].splice(r[t].indexOf(e,1))&&null}):void 0},t.prototype.build=function(t){var e=this,r=e.matcher,n=e.builders,i=this.parentName(t);if(i&&!r.find(i))return null;for(var o in n)if(n.hasOwnProperty(o)){var a=n[o].reduce(function(t,e){return function(r){return e(r,t)}},c.noop);t[o]=a(t)}return t},t.prototype.parentName=function(t){var e=t.name||"",r=e.split(".");if(r.length>1){if(t.parent)throw new Error("States that specify the 'parent:' property should not have a '.' in their name ("+e+")");var n=r.pop();return"**"===n&&r.pop(),r.join(".")}return t.parent?f.isString(t.parent)?t.parent:t.parent.name:""},t.prototype.name=function(t){var e=t.name;if(e.indexOf(".")!==-1||!t.parent)return e;var r=f.isString(t.parent)?t.parent:t.parent.name;return r?r+"."+e:e},t}();e.StateBuilder=b},function(t,e,r){"use strict";var n=r(3),i=r(4),o=r(42),a=function(){function t(t,e,r,n){this.states=t,this.builder=e,this.$urlRouterProvider=r,this.listeners=n,this.queue=[]}return t.prototype.register=function(t){var e=this,r=e.states,a=e.queue,s=e.$state,u=n.inherit(new o.State,n.extend({},t,{self:t,resolve:t.resolve||[],toString:function(){return t.name}}));if(!i.isString(u.name))throw new Error("State must have a valid name");if(r.hasOwnProperty(u.name)||n.pluck(a,"name").indexOf(u.name)!==-1)throw new Error("State '"+u.name+"' is already defined");return a.push(u),this.$state&&this.flush(s),u},t.prototype.flush=function(t){for(var e=this,r=e.queue,n=e.states,i=e.builder,o=[],a=[],s={};r.length>0;){var u=r.shift(),c=i.build(u),f=a.indexOf(u);if(c){if(n.hasOwnProperty(u.name))throw new Error("State '"+name+"' is already defined");n[u.name]=u,this.attachRoute(t,u),f>=0&&a.splice(f,1),o.push(u)}else{var l=s[u.name];if(s[u.name]=r.length,f>=0&&l===r.length)return r.push(u),n;f<0&&a.push(u),r.push(u)}}return o.length&&this.listeners.forEach(function(t){return t("registered",o.map(function(t){return t.self}))}),n},t.prototype.autoFlush=function(t){this.$state=t,this.flush(t)},t.prototype.attachRoute=function(t,e){var r=this.$urlRouterProvider;!e["abstract"]&&e.url&&r.when(e.url,["$match","$stateParams",function(r,i){t.$current.navigable===e&&n.equalForKeys(r,i)||t.transitionTo(e,r,{inherit:!0,source:"url"})}],function(t){return e._urlRule=t})},t}();e.StateQueueManager=a},function(t,e,r){"use strict";var n=r(3),i=r(5),o=function(){function t(t){n.extend(this,t)}return t.prototype.is=function(t){return this===t||this.self===t||this.fqn()===t},t.prototype.fqn=function(){if(!(this.parent&&this.parent instanceof this.constructor))return this.name;var t=this.parent.fqn();return t?t+"."+this.name:this.name},t.prototype.root=function(){return this.parent&&this.parent.root()||this},t.prototype.parameters=function(t){t=n.defaults(t,{inherit:!0});var e=t.inherit&&this.parent&&this.parent.parameters()||[];return e.concat(n.values(this.params))},t.prototype.parameter=function(t,e){return void 0===e&&(e={}),this.url&&this.url.parameter(t,e)||n.find(n.values(this.params),i.propEq("id",t))||e.inherit&&this.parent&&this.parent.parameter(t)},t.prototype.toString=function(){return this.fqn()},t}();e.State=o},function(t,e,r){"use strict";var n=r(3),i=r(4),o=r(8),a=r(6),s=r(20),u=r(21),c=r(30),f=r(10),l=r(14),p=r(22),h=r(7),v=r(3),d=r(3),m=r(17),g=function(){function t(e){this.router=e,this.invalidCallbacks=[],this._defaultErrorHandler=function(t){t instanceof Error&&t.stack?(console.error(t),console.error(t.stack)):t instanceof f.Rejection?(console.error(t.toString()),t.detail&&t.detail.stack&&console.error(t.detail.stack)):console.error(t)};var r=["current","$current","params","transition"],n=Object.keys(t.prototype).filter(function(t){return r.indexOf(t)===-1});d.bindFunctions(t.prototype,this,this,n)}return Object.defineProperty(t.prototype,"transition",{get:function(){return this.router.globals.transition},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"params",{get:function(){return this.router.globals.params},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"current",{get:function(){return this.router.globals.current},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"$current",{get:function(){return this.router.globals.$current},enumerable:!0,configurable:!0}),t.prototype._handleInvalidTargetState=function(t,e){function r(){var t=h.dequeue();if(void 0===t)return f.Rejection.invalid(e.error()).toPromise();var n=a.services.$q.when(t(e,i,v));return n.then(d).then(function(t){return t||r()})}var n=this,i=s.PathFactory.makeTargetState(t),u=this.router.globals,c=function(){return u.transitionHistory.peekTail()},p=c(),h=new o.Queue(this.invalidCallbacks.slice()),v=new m.ResolveContext(t).injector(),d=function(t){if(t instanceof l.TargetState){var e=t;return e=n.target(e.identifier(),e.params(),e.options()),e.valid()?c()!==p?f.Rejection.superseded().toPromise():n.transitionTo(e.identifier(),e.params(),e.options()):f.Rejection.invalid(e.error()).toPromise()}};return r()},t.prototype.onInvalid=function(t){return this.invalidCallbacks.push(t),function(){n.removeFrom(this.invalidCallbacks)(t)}.bind(this)},t.prototype.reload=function(t){return this.transitionTo(this.current,this.params,{reload:!i.isDefined(t)||t,inherit:!1,notify:!1})},t.prototype.go=function(t,e,r){var i={relative:this.$current,inherit:!0},o=n.defaults(r,i,c.defaultTransOpts);return this.transitionTo(t,e,o)},t.prototype.target=function(t,e,r){if(void 0===r&&(r={}),i.isObject(r.reload)&&!r.reload.name)throw new Error("Invalid reload state object");var n=this.router.stateRegistry;if(r.reloadState=r.reload===!0?n.root():n.matcher.find(r.reload,r.relative),r.reload&&!r.reloadState)throw new Error("No such reload state '"+(i.isString(r.reload)?r.reload:r.reload.name)+"'");var o=n.matcher.find(t,r.relative);return new l.TargetState(t,o,e,r)},t.prototype.transitionTo=function(t,e,r){var i=this;void 0===e&&(e={}),void 0===r&&(r={});var o=this.router,s=o.globals,p=s.transitionHistory;r=n.defaults(r,c.defaultTransOpts),r=n.extend(r,{current:p.peekTail.bind(p)});var h=this.target(t,e,r),v=s.successfulTransitions.peekTail(),d=function(){return[new u.PathNode(i.router.stateRegistry.root())]},m=v?v.treeChanges().to:d();if(!h.exists())return this._handleInvalidTargetState(m,h);if(!h.valid())return n.silentRejection(h.error());var g=function(t){return function(e){if(e instanceof f.Rejection){if(e.type===f.RejectType.IGNORED)return o.urlRouter.update(),a.services.$q.when(s.current);var r=e.detail;if(e.type===f.RejectType.SUPERSEDED&&e.redirected&&r instanceof l.TargetState){var n=t.redirect(r);return n.run()["catch"](g(n))}e.type===f.RejectType.ABORTED&&o.urlRouter.update()}var u=i.defaultErrorHandler();return u(e),a.services.$q.reject(e)}},y=this.router.transitionService.create(m,h),w=y.run()["catch"](g(y));return n.silenceUncaughtInPromise(w),n.extend(w,{transition:y})},t.prototype.is=function(t,e,r){r=n.defaults(r,{relative:this.$current});var o=this.router.stateRegistry.matcher.find(t,r.relative);if(i.isDefined(o))return this.$current===o&&(!i.isDefined(e)||null===e||p.Param.equals(o.parameters(),this.params,e))},t.prototype.includes=function(t,e,r){r=n.defaults(r,{relative:this.$current});var o=i.isString(t)&&h.Glob.fromString(t);if(o){if(!o.matches(this.$current.name))return!1;t=this.$current.name}var a=this.router.stateRegistry.matcher.find(t,r.relative),s=this.$current.includes;if(i.isDefined(a))return!!i.isDefined(s[a.name])&&(!e||v.equalForKeys(p.Param.values(a.parameters(),e),this.params,Object.keys(e)))},t.prototype.href=function(t,e,r){var o={lossy:!0,inherit:!0,absolute:!1,relative:this.$current};r=n.defaults(r,o),e=e||{};var a=this.router.stateRegistry.matcher.find(t,r.relative);if(!i.isDefined(a))return null;r.inherit&&(e=this.params.$inherit(e,this.$current,a));var s=a&&r.lossy?a.navigable:a;return s&&void 0!==s.url&&null!==s.url?this.router.urlRouter.href(s.url,p.Param.values(a.parameters(),e),{absolute:r.absolute}):null},t.prototype.defaultErrorHandler=function(t){return this._defaultErrorHandler=t||this._defaultErrorHandler},t.prototype.get=function(t,e){var r=this.router.stateRegistry;return 0===arguments.length?r.get():r.get(t,e||this.$current)},t}();e.StateService=g},function(t,e,r){"use strict";var n=r(45),i=r(8),o=r(3),a=function(){function t(t){var e=this;this.params=new n.StateParams,this.transitionHistory=new i.Queue([],1),this.successfulTransitions=new i.Queue([],1);var r=function(t){e.transition=t,e.transitionHistory.enqueue(t);var r=function(){e.successfulTransitions.enqueue(t),e.$current=t.$to(),e.current=e.$current.self,o.copy(t.params(),e.params)};t.onSuccess({},r,{priority:1e4});var n=function(){e.transition===t&&(e.transition=null)};t.promise.then(n,n)};t.onBefore({},r)}return t}();e.Globals=a},function(t,e,r){"use strict";var n=r(3),i=function(){function t(t){void 0===t&&(t={}),n.extend(this,t)}return t.prototype.$inherit=function(t,e,r){var i,o=n.ancestors(e,r),a={},s=[];for(var u in o)if(o[u]&&o[u].params&&(i=Object.keys(o[u].params),i.length))for(var c in i)s.indexOf(i[c])>=0||(s.push(i[c]),a[i[c]]=this[i[c]]);return n.extend({},a,t)},t}();e.StateParams=i},function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}n(r(22)),n(r(28)),n(r(45)),n(r(24))},function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}n(r(21)),n(r(20))},function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}n(r(18)),n(r(19)),n(r(17))},function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}n(r(40)),n(r(42)),n(r(39)),n(r(41)),n(r(38)),n(r(43)),n(r(14))},function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}n(r(16)),n(r(15)),n(r(10)),n(r(11)),n(r(13)),n(r(30))},function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}n(r(27)),n(r(23)),n(r(26)),n(r(29))},function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}n(r(37))},function(t,e,r){"use strict";function n(t){var e=l.services.$injector,r=e.get("$controller"),n=e.instantiate;try{var i;return e.instantiate=function(t){e.instantiate=n,i=e.annotate(t)},r(t,{$scope:{}}),i}finally{e.instantiate=n}}function i(t){function e(e,n,i,o,a,s){return o.$on("$locationChangeSuccess",function(t){return r.forEach(function(e){return e(t)})}),l.services.locationConfig.html5Mode=function(){var e=t.html5Mode();return e=v.isObject(e)?e.enabled:e,e&&i.history},l.services.location.setUrl=function(t,r){void 0===r&&(r=!1),e.url(t),r&&e.replace()},l.services.template.get=function(t){return a.get(t,{cache:s,headers:{Accept:"text/html"}}).then(h.prop("data"))},p.bindFunctions(e,l.services.location,e,["replace","url","path","search","hash"]),p.bindFunctions(e,l.services.locationConfig,e,["port","protocol","host"]),p.bindFunctions(n,l.services.locationConfig,n,["baseHref"]),R}R=new f.UIRouter,R.stateProvider=new w.StateProvider(R.stateRegistry,R.stateService),R.stateRegistry.decorator("views",g.ng1ViewsBuilder),R.stateRegistry.decorator("onExit",b.getStateHookBuilder("onExit")),R.stateRegistry.decorator("onRetain",b.getStateHookBuilder("onRetain")),R.stateRegistry.decorator("onEnter",b.getStateHookBuilder("onEnter")),R.viewService.viewConfigFactory("ng1",g.ng1ViewConfigFactory),p.bindFunctions(t,l.services.locationConfig,t,["hashPrefix"]);var r=[];l.services.location.onChange=function(t){return r.push(t),function(){return p.removeFrom(r)(t)}},this.$get=e,e.$inject=["$location","$browser","$sniffer","$rootScope","$http","$templateCache"]}function o(t,e){l.services.$injector=t,l.services.$q=e}function a(){return R.urlRouterProvider.$get=function(){return R.urlRouter.update(!0),this.interceptDeferred||R.urlRouter.listen(),R.urlRouter},R.urlRouterProvider}function s(){return R.stateProvider.$get=function(){return R.stateRegistry.stateQueue.autoFlush(R.stateService),R.stateService},R.stateProvider}function u(){return R.transitionService.$get=function(){return R.transitionService},R.transitionService}function c(t){t.$watch(function(){m.trace.approximateDigests++})}var f=r(25),l=r(6),p=r(3),h=r(5),v=r(4),d=r(54),m=r(12),g=r(55),y=r(56),w=r(58),b=r(59),$=r(57);$.module("ui.router.angular1",[]);$.module("ui.router.util",["ng","ui.router.init"]),$.module("ui.router.router",["ui.router.util"]),$.module("ui.router.state",["ui.router.router","ui.router.util","ui.router.angular1"]),$.module("ui.router",["ui.router.init","ui.router.state","ui.router.angular1"]),$.module("ui.router.compat",["ui.router"]),e.annotateController=n;var R=null;i.$inject=["$locationProvider"],$.module("ui.router.init",[]).provider("$uiRouter",i),o.$inject=["$injector","$q"],$.module("ui.router.init").run(o),$.module("ui.router.init").run(["$uiRouter",function(t){}]),$.module("ui.router.util").provider("$urlMatcherFactory",["$uiRouterProvider",function(){return R.urlMatcherFactory}]),$.module("ui.router.util").run(["$urlMatcherFactory",function(t){}]),$.module("ui.router.router").provider("$urlRouter",["$uiRouterProvider",a]),$.module("ui.router.router").run(["$urlRouter",function(t){}]),$.module("ui.router.state").provider("$state",["$uiRouterProvider",s]),$.module("ui.router.state").run(["$state",function(t){}]),$.module("ui.router.state").factory("$stateParams",["$uiRouter",function(t){return t.globals.params}]),$.module("ui.router.state").provider("$transitions",["$uiRouterProvider",u]),$.module("ui.router.util").factory("$templateFactory",["$uiRouter",function(){return new y.TemplateFactory}]),$.module("ui.router").factory("$view",function(){return R.viewService}),$.module("ui.router").factory("$resolve",d.resolveFactory),$.module("ui.router").service("$trace",function(){return m.trace}),c.$inject=["$rootScope"],e.watchDigests=c,$.module("ui.router").run(c),e.getLocals=function(t){var e=t.getTokens().filter(v.isString),r=e.map(function(e){return[e,t.getResolvable(e).data]});return r.reduce(p.applyPairs,{})}},function(t,e,r){"use strict";var n=r(42),i=r(21),o=r(17),a=r(3),s=r(40),u={resolve:function(t,e,r){void 0===e&&(e={});var u=new i.PathNode(new n.State({params:{},resolvables:[]})),c=new i.PathNode(new n.State({params:{},resolvables:[]})),f=new o.ResolveContext([u,c]);f.addResolvables(s.resolvablesBuilder({resolve:t}),c.state);var l=function(t){var r=function(t){return s.resolvablesBuilder({resolve:a.mapObj(t,function(t){return function(){return t}})})};f.addResolvables(r(t),u.state),f.addResolvables(r(e),c.state);var n=function(t,e){return t[e.token]=e.value,t};return f.resolvePath().then(function(t){return t.reduce(n,{})})};return r?r.then(l):l({})}};e.resolveFactory=function(){return u}},function(t,e,r){"use strict";function n(t){var e=["templateProvider","templateUrl","template","notify","async"],r=["controller","controllerProvider","controllerAs","resolveAs"],n=["component","bindings"],c=e.concat(r),f=n.concat(c),l={},p=t.views||{$default:o.pick(t,f)};return o.forEach(p,function(e,r){if(r=r||"$default",u.isString(e)&&(e={component:e}),Object.keys(e).length){if(e.component){if(c.map(function(t){return u.isDefined(e[t])}).reduce(o.anyTrueR,!1))throw new Error("Cannot combine: "+n.join("|")+" with: "+c.join("|")+" in stateview: 'name@"+t.name+"'");e.templateProvider=["$injector",function(t){var r=function(t){return e.bindings&&e.bindings[t]||t},n=v.version.minor>=3?"::":"",o=function(t){var e=a.kebobString(t.name),i=r(t.name);return"@"===t.type?e+"='{{"+n+"$resolve."+i+"}}'":e+"='"+n+"$resolve."+i+"'"},s=i(t,e.component).map(o).join(" "),u=a.kebobString(e.component);return"<"+u+" "+s+"></"+u+">"}]}e.resolveAs=e.resolveAs||"$resolve",e.$type="ng1",e.$context=t,e.$name=r;var f=s.ViewService.normalizeUIViewTarget(e.$context,e.$name);e.$uiViewName=f.uiViewName,e.$uiViewContextAnchor=f.uiViewContextAnchor,l[r]=e}}),l}function i(t,e){var r=t.get(e+"Directive");if(!r||!r.length)throw new Error("Unable to find component named '"+e+"'");return r.map(m).reduce(o.unnestR,[])}var o=r(3),a=r(9),s=r(37),u=r(4),c=r(6),f=r(12),l=r(56),p=r(17),h=r(19),v=r(57);e.ng1ViewConfigFactory=function(t,e){return[new y(t,e)]},e.ng1ViewsBuilder=n;var d=function(t){return Object.keys(t||{}).map(function(e){return[e,/^([=<@])[?]?(.*)/.exec(t[e])]}).filter(function(t){return u.isDefined(t)&&u.isDefined(t[1])}).map(function(t){return{name:t[1][2]||t[0],type:t[1][1]}})},m=function(t){return d(u.isObject(t.bindToController)?t.bindToController:t.scope)},g=0,y=function(){function t(t,e){this.path=t,this.viewDecl=e,this.$id=g++,this.loaded=!1}return t.prototype.load=function(){var t=this,e=c.services.$q;if(!this.hasTemplate())throw new Error("No template configuration specified for '"+this.viewDecl.$uiViewName+"@"+this.viewDecl.$uiViewContextAnchor+"'");var r=new p.ResolveContext(this.path),n=this.path.reduce(function(t,e){return o.extend(t,e.paramValues)},{}),i={template:e.when(this.getTemplate(n,new l.TemplateFactory,r)),controller:e.when(this.getController(r))};return e.all(i).then(function(e){return f.trace.traceViewServiceEvent("Loaded",t),t.controller=e.controller,t.template=e.template,t})},t.prototype.hasTemplate=function(){return!!(this.viewDecl.template||this.viewDecl.templateUrl||this.viewDecl.templateProvider)},t.prototype.getTemplate=function(t,e,r){return e.fromConfig(this.viewDecl,t,r)},t.prototype.getController=function(t){var e=this.viewDecl.controllerProvider;if(!u.isInjectable(e))return this.viewDecl.controller;var r=c.services.$injector.annotate(e),n=u.isArray(e)?o.tail(e):e,i=new h.Resolvable("",n,r);return i.get(t)},t}();e.Ng1ViewConfig=y},function(t,e,r){"use strict";var n=r(4),i=r(6),o=r(3),a=r(19),s=function(){function t(){}return t.prototype.fromConfig=function(t,e,r){return n.isDefined(t.template)?this.fromString(t.template,e):n.isDefined(t.templateUrl)?this.fromUrl(t.templateUrl,e):n.isDefined(t.templateProvider)?this.fromProvider(t.templateProvider,e,r):null},t.prototype.fromString=function(t,e){return n.isFunction(t)?t(e):t},t.prototype.fromUrl=function(t,e){return n.isFunction(t)&&(t=t(e)),null==t?null:i.services.template.get(t)},t.prototype.fromProvider=function(t,e,r){var s=i.services.$injector.annotate(t),u=n.isArray(t)?o.tail(t):t,c=new a.Resolvable("",u,s);return c.get(r)},t}();e.TemplateFactory=s},function(e,r){e.exports=t},function(t,e,r){"use strict";var n=r(4),i=r(3),o=function(){function t(e,r){this.stateRegistry=e,this.stateService=r,i.bindFunctions(t.prototype,this,this)}return t.prototype.decorator=function(t,e){return this.stateRegistry.decorator(t,e)||this},t.prototype.state=function(t,e){return n.isObject(t)?e=t:e.name=t,this.stateRegistry.register(e),this},t.prototype.onInvalid=function(t){return this.stateService.onInvalid(t)},t}();e.StateProvider=o},function(t,e,r){"use strict";var n=r(6),i=r(53),o=r(17),a=r(3);e.getStateHookBuilder=function(t){return function(e,r){function s(t,e){var r=new o.ResolveContext(t.treeChanges().to);return n.services.$injector.invoke(u,this,a.extend({$state$:e},i.getLocals(r)))}var u=e[t];return u?s:void 0}}},function(t,e,r){"use strict";function n(t,e){var r,n=t.match(/^\s*({[^}]*})\s*$/);if(n&&(t=e+"("+n[1]+")"),r=t.replace(/\n/g," ").match(/^([^(]+?)\s*(\((.*)\))?$/),!r||4!==r.length)throw new Error("Invalid state ref '"+t+"'");return{state:r[1],paramExpr:r[3]||null}}function i(t){var e=t.parent().inheritedData("$uiView"),r=l.parse("$cfg.path")(e);return r?c.tail(r).state.name:void 0}function o(t){var e="[object SVGAnimatedString]"===Object.prototype.toString.call(t.prop("href")),r="FORM"===t[0].nodeName;return{attr:r?"action":e?"xlink:href":"href",isAnchor:"A"===t.prop("tagName").toUpperCase(),clickable:!r}}function a(t,e,r,n,i){return function(o){var a=o.which||o.button,s=i();if(!(a>1||o.ctrlKey||o.metaKey||o.shiftKey||t.attr("target"))){var u=r(function(){e.go(s.state,s.params,s.options)});o.preventDefault();var c=n.isAnchor&&!s.href?1:0;o.preventDefault=function(){c--<=0&&r.cancel(u)}}}}function s(t,e){return{relative:i(t)||e.$current,inherit:!0,source:"sref"}}var u=r(57),c=r(3),f=r(4),l=r(5),p=["$state","$timeout",function(t,e){return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(r,i,f,l){var p,h=n(f.uiSref,t.current.name),v={state:h.state,href:null,params:null,options:null},d=o(i),m=l[1]||l[0],g=null;v.options=c.extend(s(i,t),f.uiSrefOpts?r.$eval(f.uiSrefOpts):{});var y=function(e){e&&(v.params=u.copy(e)),v.href=t.href(h.state,v.params,v.options),g&&g(),m&&(g=m.$$addStateInfo(h.state,v.params)),null!==v.href&&f.$set(d.attr,v.href)};h.paramExpr&&(r.$watch(h.paramExpr,function(t){t!==v.params&&y(t)},!0),v.params=u.copy(r.$eval(h.paramExpr))),y(),d.clickable&&(p=a(i,t,e,d,function(){return v}),i.on("click",p),r.$on("$destroy",function(){i.off("click",p)}))}}}],h=["$state","$timeout",function(t,e){return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(r,n,i,s){function u(e){v.state=e[0],v.params=e[1],v.options=e[2],v.href=t.href(v.state,v.params,v.options),d&&d(),l&&(d=l.$$addStateInfo(v.state,v.params)),v.href&&i.$set(f.attr,v.href)}var c,f=o(n),l=s[1]||s[0],p=[i.uiState,i.uiStateParams||null,i.uiStateOpts||null],h="["+p.map(function(t){return t||"null"}).join(", ")+"]",v={state:null,params:null,options:null,href:null},d=null;r.$watch(h,u,!0),u(r.$eval(h)),f.clickable&&(c=a(n,t,e,f,function(){return v}),n.on("click",c),r.$on("$destroy",function(){n.off("click",c)}))}}}],v=["$state","$stateParams","$interpolate","$transitions","$uiRouter",function(t,e,r,o,a){return{restrict:"A",controller:["$scope","$element","$attrs","$timeout",function(e,s,u,l){function p(t){t.promise.then(d)}function h(e,r,n){var o=t.get(e,i(s)),a=v(e,r),u={state:o||{name:e},params:r,hash:a};return R.push(u),S[a]=n,function(){var t=R.indexOf(u);t!==-1&&R.splice(t,1)}}function v(t,r){if(!f.isString(t))throw new Error("state should be a string");return f.isObject(r)?t+c.toJson(r):(r=e.$eval(r),f.isObject(r)?t+c.toJson(r):t)}function d(){for(var t=0;t<R.length;t++)y(R[t].state,R[t].params)?m(s,S[R[t].hash]):g(s,S[R[t].hash]),w(R[t].state,R[t].params)?m(s,b):g(s,b)}function m(t,e){l(function(){t.addClass(e)})}function g(t,e){t.removeClass(e)}function y(e,r){return t.includes(e.name,r)}function w(e,r){return t.is(e.name,r)}var b,$,R=[],S={};b=r(u.uiSrefActiveEq||"",!1)(e);try{$=e.$eval(u.uiSrefActive)}catch(E){}$=$||r(u.uiSrefActive||"",!1)(e),f.isObject($)&&c.forEach($,function(r,i){if(f.isString(r)){var o=n(r,t.current.name);h(o.state,e.$eval(o.paramExpr),i)}}),this.$$addStateInfo=function(t,e){if(!(f.isObject($)&&R.length>0)){var r=h(t,e,$);return d(),r}},e.$on("$stateChangeSuccess",d),e.$on("$destroy",o.onStart({},p)),a.globals.transition&&p(a.globals.transition),d()}]}}];u.module("ui.router.state").directive("uiSref",p).directive("uiSrefActive",v).directive("uiSrefActiveEq",v).directive("uiState",h)},function(t,e,r){"use strict";function n(t){var e=function(e,r,n){return t.is(e,r,n)};return e.$stateful=!0,e}function i(t){var e=function(e,r,n){return t.includes(e,r,n)};return e.$stateful=!0,e}var o=r(57);n.$inject=["$state"],e.$IsStateFilter=n,i.$inject=["$state"],e.$IncludedByStateFilter=i,o.module("ui.router.state").filter("isState",n).filter("includedByState",i)},function(t,e,r){"use strict";function n(t,e,r,n,u){var v=c.parse("viewDecl.controllerAs"),d=c.parse("viewDecl.resolveAs");return{restrict:"ECA",priority:-400,compile:function(n){var u=n.html();return function(n,c){var m=c.data("$uiView");if(m){var g=m.$cfg||{viewDecl:{}};c.html(g.template||u),s.trace.traceUIViewFill(m.$uiView,c.html());var y=t(c.contents()),w=g.controller,b=v(g),$=d(g),R=g.path&&new f.ResolveContext(g.path),S=R&&p.getLocals(R);if(n[$]=S,w){var E=e(w,o.extend({},S,{$scope:n,$element:c}));b&&(n[b]=E,n[b][$]=S),c.data("$ngControllerController",E),c.children().data("$ngControllerController",E),i(r,E,n,g)}if(a.isString(g.viewDecl.component))var x=g.viewDecl.component,k=l.kebobString(x),P=function(){var t=[].slice.call(c[0].children).filter(function(t){return t&&t.tagName&&t.tagName.toLowerCase()===k});return t&&h.element(t).data("$"+x+"Controller")},_=n.$watch(P,function(t){t&&(i(r,t,n,g),_())});y(n)}}}}}function i(t,e,r,n){!a.isFunction(e.$onInit)||n.viewDecl.component&&d||e.$onInit();var i=o.tail(n.path).state.self,s={bind:e};if(a.isFunction(e.uiOnParamsChanged)){var u=new f.ResolveContext(n.path),c=u.getResolvable("$transition$").data,l=function(t){if(t!==c&&t.exiting().indexOf(i)===-1){var r=t.params("to"),n=t.params("from"),a=t.treeChanges().to.map(function(t){return t.paramSchema}).reduce(o.unnestR,[]),s=t.treeChanges().from.map(function(t){return t.paramSchema}).reduce(o.unnestR,[]),u=a.filter(function(t){var e=s.indexOf(t);return e===-1||!s[e].type.equals(r[t.id],n[t.id])});if(u.length){var f=u.map(function(t){return t.id});e.uiOnParamsChanged(o.filter(r,function(t,e){return f.indexOf(e)!==-1}),t)}}};r.$on("$destroy",t.onSuccess({},l,s))}if(a.isFunction(e.uiCanExit)){var p={exiting:i.name};r.$on("$destroy",t.onBefore(p,e.uiCanExit,s))}}var o=r(3),a=r(4),s=r(12),u=r(55),c=r(5),f=r(17),l=r(9),p=r(53),h=r(57),v=["$view","$animate","$uiViewScroll","$interpolate","$q",function(t,e,r,n,i){function o(t,r){return{enter:function(t,r,n){h.version.minor>2?e.enter(t,null,r).then(n):e.enter(t,null,r,n)},leave:function(t,r){h.version.minor>2?e.leave(t).then(r):e.leave(t,r)}}}function f(t,e){return t===e}var l={$cfg:{viewDecl:{$context:t.rootContext()}},$uiView:{}},p={count:0,restrict:"ECA",terminal:!0,priority:400,transclude:"element",compile:function(e,h,v){return function(e,h,d){function m(t){(!t||t instanceof u.Ng1ViewConfig)&&(f(k,t)||(s.trace.traceUIViewConfigUpdated(C,t&&t.viewDecl&&t.viewDecl.$context),k=t,y(t)))}function g(){if(w&&(s.trace.traceUIViewEvent("Removing (previous) el",w.data("$uiView")),w.remove(),w=null),$&&(s.trace.traceUIViewEvent("Destroying scope",C),$.$destroy(),$=null),b){var t=b.data("$uiViewAnim");s.trace.traceUIViewEvent("Animate out",t),x.leave(b,function(){t.$$animLeave.resolve(),w=null}),w=b,b=null}}function y(t){var n=e.$new(),o=i.defer(),s=i.defer(),u={$cfg:t,$uiView:C},c={$animEnter:o.promise,$animLeave:s.promise,$$animLeave:s},f=v(n,function(t){t.data("$uiViewAnim",c),t.data("$uiView",u),
1778 x.enter(t,h,function(){o.resolve(),$&&$.$emit("$viewContentAnimationEnded"),(a.isDefined(E)&&!E||e.$eval(E))&&r(t)}),g()});b=f,$=n,$.$emit("$viewContentLoaded",t||k),$.$eval(S)}var w,b,$,R,S=d.onload||"",E=d.autoscroll,x=o(d,e),k=void 0,P=h.inheritedData("$uiView")||l,_=n(d.uiView||d.name||"")(e)||"$default",C={$type:"ng1",id:p.count++,name:_,fqn:P.$uiView.fqn?P.$uiView.fqn+"."+_:_,config:null,configUpdated:m,get creationContext(){return c.parse("$cfg.viewDecl.$context")(P)}};s.trace.traceUIViewEvent("Linking",C),h.data("$uiView",{$uiView:C}),y(),R=t.registerUIView(C),e.$on("$destroy",function(){s.trace.traceUIViewEvent("Destroying/Unregistering",C),R()})}}};return p}];n.$inject=["$compile","$controller","$transitions","$view","$timeout"];var d="function"==typeof h.module("ui.router").component;h.module("ui.router.state").directive("uiView",v),h.module("ui.router.state").directive("uiView",n)},function(t,e,r){"use strict";function n(){var t=!1;this.useAnchorScroll=function(){t=!0},this.$get=["$anchorScroll","$timeout",function(e,r){return t?e:function(t){return r(function(){t[0].scrollIntoView()},0,!1)}}]}var i=r(57);i.module("ui.router.state").provider("$uiViewScroll",n)}])});
1778 1779 //# sourceMappingURL=angular-ui-router.min.js.map
1779 1780 ;angular.module('angular-toArrayFilter', [])
1780 1781
@@ -5829,7 +5830,7 b' function kickstartAE(initialUserData) {'
5829 5830 "\n" +
5830 5831 "\n" +
5831 5832 " <div class=\"text-center\">\n" +
5832 " <uib-pagination total-items=\"logs.itemCount\" items-per-page=\"logs.itemsPerPage\" ng-model=\"logs.searchParams.page\" max-size=\"10\"\n" +
5833 " <uib-pagination total-items=\"logs.itemCount\" items-per-page=\"logs.itemsPerPage\" ng-model=\"logs.page\" max-size=\"10\"\n" +
5833 5834 " ng-change=\"logs.paginationChange()\"\n" +
5834 5835 " class=\"pagination pagination-sm\" boundary-links=\"true\" direction-links=\"false\"></uib-pagination>\n" +
5835 5836 " </div>\n" +
@@ -5873,7 +5874,7 b' function kickstartAE(initialUserData) {'
5873 5874 " </div>\n" +
5874 5875 "\n" +
5875 5876 " <div class=\"text-center\">\n" +
5876 " <uib-pagination total-items=\"logs.itemCount\" items-per-page=\"logs.itemsPerPage\" ng-model=\"logs.searchParams.page\" max-size=\"10\"\n" +
5877 " <uib-pagination total-items=\"logs.itemCount\" items-per-page=\"logs.itemsPerPage\" ng-model=\"logs.page\" max-size=\"10\"\n" +
5877 5878 " ng-change=\"logs.paginationChange()\"\n" +
5878 5879 " class=\"pagination pagination-sm\" boundary-links=\"true\" direction-links=\"false\"></uib-pagination>\n" +
5879 5880 " </div>\n" +
@@ -5967,7 +5968,7 b' function kickstartAE(initialUserData) {'
5967 5968 "\n" +
5968 5969 "\n" +
5969 5970 " <div class=\"text-center\">\n" +
5970 " <uib-pagination total-items=\"reports_list.itemCount\" items-per-page=\"reports_list.itemsPerPage\" ng-model=\"reports_list.searchParams.page\" max-size=\"10\"\n" +
5971 " <uib-pagination total-items=\"reports_list.itemCount\" items-per-page=\"reports_list.itemsPerPage\" ng-model=\"reports_list.page\" max-size=\"10\"\n" +
5971 5972 " class=\"pagination pagination-sm\" boundary-links=\"true\" direction-links=\"false\"\n" +
5972 5973 " ng-change=\"reports_list.paginationChange()\"\n" +
5973 5974 " ng-show=\"!reports_list.is_loading\"></uib-pagination>\n" +
@@ -6019,7 +6020,7 b' function kickstartAE(initialUserData) {'
6019 6020 " </div>\n" +
6020 6021 "\n" +
6021 6022 " <div class=\"text-center\">\n" +
6022 " <uib-pagination total-items=\"reports_list.itemCount\" items-per-page=\"reports_list.itemsPerPage\" ng-model=\"reports_list.searchParams.page\" max-size=\"10\"\n" +
6023 " <uib-pagination total-items=\"reports_list.itemCount\" items-per-page=\"reports_list.itemsPerPage\" ng-model=\"reports_list.page\" max-size=\"10\"\n" +
6023 6024 " class=\"pagination pagination-sm\" boundary-links=\"true\" direction-links=\"false\"\n" +
6024 6025 " ng-change=\"reports_list.paginationChange()\"\n" +
6025 6026 " ng-show=\"!reports_list.is_loading\"></uib-pagination>\n" +
@@ -6064,7 +6065,7 b' function kickstartAE(initialUserData) {'
6064 6065 "\n" +
6065 6066 "\n" +
6066 6067 " <div class=\"text-center\">\n" +
6067 " <uib-pagination total-items=\"reports_list.itemCount\" items-per-page=\"reports_list.itemsPerPage\" ng-model=\"reports_list.searchParams.page\" max-size=\"10\"\n" +
6068 " <uib-pagination total-items=\"reports_list.itemCount\" items-per-page=\"reports_list.itemsPerPage\" ng-model=\"reports_list.page\" max-size=\"10\"\n" +
6068 6069 " class=\"pagination pagination-sm\" boundary-links=\"true\" direction-links=\"false\"\n" +
6069 6070 " ng-change=\"reports_list.paginationChange()\"\n" +
6070 6071 " ng-show=\"!reports_list.is_loading\"></uib-pagination>\n" +
@@ -6112,7 +6113,7 b' function kickstartAE(initialUserData) {'
6112 6113 "\n" +
6113 6114 "\n" +
6114 6115 " <div class=\"text-center\">\n" +
6115 " <uib-pagination total-items=\"reports_list.itemCount\" items-per-page=\"reports_list.itemsPerPage\" ng-model=\"reports_list.searchParams.page\" max-size=\"10\"\n" +
6116 " <uib-pagination total-items=\"reports_list.itemCount\" items-per-page=\"reports_list.itemsPerPage\" ng-model=\"reports_list.page\" max-size=\"10\"\n" +
6116 6117 " class=\"pagination pagination-sm\" boundary-links=\"true\" direction-links=\"false\"\n" +
6117 6118 " ng-change=\"reports_list.paginationChange()\"\n" +
6118 6119 " ng-show=\"!reports_list.is_loading\"></uib-pagination>\n" +
@@ -9069,15 +9070,6 b' function IndexDashboardController($rootScope, $scope, $location, $cookies, $inte'
9069 9070 vm.determineStartState();
9070 9071 vm.refreshData();
9071 9072 }
9072
9073 $scope.$on('$locationChangeSuccess', function () {
9074
9075 if (vm.loading.series === false) {
9076 vm.determineStartState();
9077 vm.refreshData();
9078 }
9079 });
9080
9081 9073 }
9082 9074
9083 9075 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
@@ -9417,9 +9409,9 b' function JiraIntegrationCtrl($uibModalInstance, $state, report, integrationName,'
9417 9409
9418 9410 angular.module('appenlight.controllers').controller('LogsController', LogsController);
9419 9411
9420 LogsController.$inject = ['$scope', '$location', 'stateHolder', 'typeAheadTagHelper', 'logsNoIdResource', 'sectionViewResource'];
9412 LogsController.$inject = ['$location', 'stateHolder', 'typeAheadTagHelper', 'logsNoIdResource', 'sectionViewResource'];
9421 9413
9422 function LogsController($scope, $location, stateHolder, typeAheadTagHelper, logsNoIdResource, sectionViewResource) {
9414 function LogsController($location, stateHolder, typeAheadTagHelper, logsNoIdResource, sectionViewResource) {
9423 9415 var vm = this;
9424 9416 vm.logEventsChartConfig = {
9425 9417 data: {
@@ -9485,7 +9477,7 b' function LogsController($scope, $location, stateHolder, typeAheadTagHelper, logs'
9485 9477 vm.logsPage = [];
9486 9478 vm.itemCount = 0;
9487 9479 vm.itemsPerPage = 250;
9488 vm.searchParams = parseSearchToTags($location.search());
9480 vm.page = 1;
9489 9481 vm.$location = $location;
9490 9482 vm.isLoading = {
9491 9483 logs: true,
@@ -9559,13 +9551,16 b' function LogsController($scope, $location, stateHolder, typeAheadTagHelper, logs'
9559 9551 vm.aheadFilter = typeAheadTagHelper.aheadFilter;
9560 9552 vm.removeSearchTag = function (tag) {
9561 9553 $location.search(tag.type, null);
9554 vm.refresh();
9562 9555 };
9563 9556 vm.addSearchTag = function (tag) {
9564 9557 $location.search(tag.type, tag.value);
9558 vm.refresh();
9565 9559 };
9566 9560
9567 9561 vm.paginationChange = function(){
9568 $location.search('page', vm.searchParams.page);
9562 $location.search('page', vm.page);
9563 vm.refresh();
9569 9564 };
9570 9565
9571 9566
@@ -9583,8 +9578,7 b' function LogsController($scope, $location, stateHolder, typeAheadTagHelper, logs'
9583 9578 var text = vm.filterTypeAhead;
9584 9579 if (_.isObject(vm.filterTypeAhead)) {
9585 9580 text = vm.filterTypeAhead.text;
9586 }
9587 ;
9581 };
9588 9582 if (!vm.filterTypeAhead) {
9589 9583 return
9590 9584 }
@@ -9620,8 +9614,7 b' function LogsController($scope, $location, stateHolder, typeAheadTagHelper, logs'
9620 9614 }
9621 9615 vm.showDatePicker = false;
9622 9616 // aka we selected one of main options
9623 $location.search(tag.type, tag.value);
9624
9617 vm.addSearchTag({type: tag.type, value: tag.value});
9625 9618 // clear typeahead
9626 9619 vm.filterTypeAhead = undefined;
9627 9620 };
@@ -9676,24 +9669,18 b' function LogsController($scope, $location, stateHolder, typeAheadTagHelper, logs'
9676 9669
9677 9670 vm.filterId = function (log) {
9678 9671 $location.search('request_id', log.request_id);
9672 vm.refresh();
9679 9673 };
9680 9674
9681 var params = parseTagsToSearch(vm.searchParams);
9682 vm.fetchLogs(params);
9683 vm.fetchSeriesData(params);
9684
9685 $scope.$on('$locationChangeSuccess', function () {
9686
9675 vm.refresh = function(){
9687 9676 vm.searchParams = parseSearchToTags($location.search());
9677 vm.page = Number(vm.searchParams.page) || 1;
9688 9678 var params = parseTagsToSearch(vm.searchParams);
9689
9690 if (vm.isLoading.logs === false) {
9691
9692 vm.fetchLogs(params);
9693 vm.fetchSeriesData(params);
9694 }
9695 });
9696
9679 vm.fetchLogs(params);
9680 vm.fetchSeriesData(params);
9681 };
9682 console.info('page load');
9683 vm.refresh();
9697 9684 }
9698 9685
9699 9686 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
@@ -9868,10 +9855,10 b' function AssignReportCtrl($uibModalInstance, reportGroupPropertyResource, report'
9868 9855 angular.module('appenlight.controllers')
9869 9856 .controller('ReportsListSlowController', ReportsListSlowController);
9870 9857
9871 ReportsListSlowController.$inject = ['$scope', '$location', '$cookies',
9858 ReportsListSlowController.$inject = ['$location', '$cookies',
9872 9859 'stateHolder', 'typeAheadTagHelper', 'slowReportsResource']
9873 9860
9874 function ReportsListSlowController($scope, $location, $cookies, stateHolder, typeAheadTagHelper, slowReportsResource) {
9861 function ReportsListSlowController($location, $cookies, stateHolder, typeAheadTagHelper, slowReportsResource) {
9875 9862 var vm = this;
9876 9863 vm.applications = stateHolder.AeUser.applications_map;
9877 9864 stateHolder.section = 'slow_reports';
@@ -9880,11 +9867,11 b' function ReportsListSlowController($scope, $location, $cookies, stateHolder, typ'
9880 9867 };
9881 9868 vm.today();
9882 9869 vm.reportsPage = [];
9870 vm.page = 1;
9883 9871 vm.itemCount = 0;
9884 9872 vm.itemsPerPage = 250;
9885 9873 typeAheadTagHelper.tags = [];
9886 9874 vm.searchParams = {tags: [], page: 1, type: 'slow_report'};
9887 vm.searchParams = parseSearchToTags($location.search());
9888 9875 vm.is_loading = false;
9889 9876 vm.filterTypeAheadOptions = [
9890 9877 {
@@ -9978,9 +9965,11 b' function ReportsListSlowController($scope, $location, $cookies, stateHolder, typ'
9978 9965 vm.aheadFilter = typeAheadTagHelper.aheadFilter;
9979 9966 vm.removeSearchTag = function (tag) {
9980 9967 $location.search(tag.type, null);
9968 vm.refresh();
9981 9969 };
9982 9970 vm.addSearchTag = function (tag) {
9983 9971 $location.search(tag.type, tag.value);
9972 vm.refresh();
9984 9973 };
9985 9974 vm.manualOpen = false;
9986 9975 vm.notRelativeTime = false;
@@ -10025,8 +10014,7 b' function ReportsListSlowController($scope, $location, $cookies, stateHolder, typ'
10025 10014 var text = vm.filterTypeAhead;
10026 10015 if (_.isObject(vm.filterTypeAhead)) {
10027 10016 text = vm.filterTypeAhead.text;
10028 }
10029 ;
10017 };
10030 10018 if (!vm.filterTypeAhead) {
10031 10019 return
10032 10020 }
@@ -10061,14 +10049,15 b' function ReportsListSlowController($scope, $location, $cookies, stateHolder, typ'
10061 10049 }
10062 10050 vm.showDatePicker = false;
10063 10051 // aka we selected one of main options
10064 $location.search(tag.type, tag.value);
10052 vm.addSearchTag({type: tag.type, value: tag.value});
10065 10053 // clear typeahead
10066 10054 vm.filterTypeAhead = undefined;
10067 }
10055 };
10068 10056
10069 10057 vm.paginationChange = function(){
10070 $location.search('page', vm.searchParams.page);
10071 }
10058 $location.search('page', vm.page);
10059 vm.refresh();
10060 };
10072 10061
10073 10062 vm.pickerDateChanged = function(){
10074 10063 if (vm.filterTypeAhead.indexOf('start_date:') == '0') {
@@ -10078,7 +10067,7 b' function ReportsListSlowController($scope, $location, $cookies, stateHolder, typ'
10078 10067 vm.filterTypeAhead = 'end_date:' + moment(vm.pickerDate).utc().hour(23).minute(59).format();
10079 10068 }
10080 10069 vm.showDatePicker = false;
10081 }
10070 };
10082 10071
10083 10072 var reportPresentation = function (report) {
10084 10073 report.presentation = {};
@@ -10099,7 +10088,7 b' function ReportsListSlowController($scope, $location, $cookies, stateHolder, typ'
10099 10088 report.presentation.tooltip = 'New';
10100 10089 }
10101 10090 return report;
10102 }
10091 };
10103 10092
10104 10093 vm.fetchReports = function (searchParams) {
10105 10094 vm.is_loading = true;
@@ -10115,30 +10104,24 b' function ReportsListSlowController($scope, $location, $cookies, stateHolder, typ'
10115 10104 }, function () {
10116 10105 vm.is_loading = false;
10117 10106 });
10118 }
10107 };
10119 10108
10120 10109 vm.filterId = function (log) {
10121 10110 vm.searchParams.tags.push({
10122 10111 type: "request_id",
10123 10112 value: log.request_id
10124 10113 });
10125 }
10126 //initial load
10127 var params = parseTagsToSearch(vm.searchParams);
10128 vm.fetchReports(params);
10129
10130 $scope.$on('$locationChangeSuccess', function () {
10131
10114 vm.refresh();
10115 };
10116 vm.refresh = function(){
10132 10117 vm.searchParams = parseSearchToTags($location.search());
10118 vm.page = Number(vm.searchParams.page) || 1;
10133 10119 var params = parseTagsToSearch(vm.searchParams);
10134
10135 if (vm.is_loading === false) {
10136
10137 vm.fetchReports(params);
10138 }
10139 });
10140
10120 vm.fetchReports(params);
10121 };
10141 10122
10123 //initial load
10124 vm.refresh();
10142 10125 }
10143 10126
10144 10127 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
@@ -10163,10 +10146,10 b' function ReportsListSlowController($scope, $location, $cookies, stateHolder, typ'
10163 10146 angular.module('appenlight.controllers')
10164 10147 .controller('ReportsListController', ReportsListController);
10165 10148
10166 ReportsListController.$inject = ['$scope', '$location', '$cookies',
10149 ReportsListController.$inject = ['$location', '$cookies',
10167 10150 'stateHolder', 'typeAheadTagHelper', 'reportsResource'];
10168 10151
10169 function ReportsListController($scope, $location, $cookies, stateHolder,
10152 function ReportsListController($location, $cookies, stateHolder,
10170 10153 typeAheadTagHelper, reportsResource) {
10171 10154 var vm = this;
10172 10155 vm.applications = stateHolder.AeUser.applications_map;
@@ -10176,11 +10159,11 b' function ReportsListController($scope, $location, $cookies, stateHolder,'
10176 10159 };
10177 10160 vm.today();
10178 10161 vm.reportsPage = [];
10162 vm.page = 1;
10179 10163 vm.itemCount = 0;
10180 10164 vm.itemsPerPage = 250;
10181 10165 typeAheadTagHelper.tags = [];
10182 10166 vm.searchParams = {tags: [], page: 1, type: 'report'};
10183 vm.searchParams = parseSearchToTags($location.search());
10184 10167 vm.is_loading = false;
10185 10168 vm.filterTypeAheadOptions = [
10186 10169 {
@@ -10296,9 +10279,11 b' function ReportsListController($scope, $location, $cookies, stateHolder,'
10296 10279 vm.aheadFilter = typeAheadTagHelper.aheadFilter;
10297 10280 vm.removeSearchTag = function (tag) {
10298 10281 $location.search(tag.type, null);
10282 vm.refresh();
10299 10283 };
10300 10284 vm.addSearchTag = function (tag) {
10301 10285 $location.search(tag.type, tag.value);
10286 vm.refresh();
10302 10287 };
10303 10288 vm.notRelativeTime = false;
10304 10289 if ($cookies.notRelativeTime) {
@@ -10307,7 +10292,7 b' function ReportsListController($scope, $location, $cookies, stateHolder,'
10307 10292
10308 10293 vm.changeRelativeTime = function () {
10309 10294 $cookies.notRelativeTime = JSON.stringify(vm.notRelativeTime);
10310 }
10295 };
10311 10296
10312 10297 _.each(_.range(1, 11), function (priority) {
10313 10298 vm.filterTypeAheadOptions.push({
@@ -10338,7 +10323,8 b' function ReportsListController($scope, $location, $cookies, stateHolder,'
10338 10323 });
10339 10324
10340 10325 vm.paginationChange = function(){
10341 $location.search('page', vm.searchParams.page);
10326 $location.search('page', vm.page);
10327 vm.refresh();
10342 10328 };
10343 10329
10344 10330 vm.typeAheadTag = function (event) {
@@ -10385,10 +10371,10 b' function ReportsListController($scope, $location, $cookies, stateHolder,'
10385 10371 }
10386 10372 vm.showDatePicker = false;
10387 10373 // aka we selected one of main options
10388 $location.search(tag.type, tag.value);
10374 vm.addSearchTag({type: tag.type, value: tag.value});
10389 10375 // clear typeahead
10390 10376 vm.filterTypeAhead = undefined;
10391 }
10377 };
10392 10378
10393 10379 vm.pickerDateChanged = function(){
10394 10380 if (vm.filterTypeAhead.indexOf('start_date:') == '0') {
@@ -10442,24 +10428,18 b' function ReportsListController($scope, $location, $cookies, stateHolder,'
10442 10428 type: "request_id",
10443 10429 value: log.request_id
10444 10430 });
10431 vm.refresh();
10445 10432 };
10446 // initial load
10447 var params = parseTagsToSearch(vm.searchParams);
10448 vm.fetchReports(params);
10449 10433
10450 $scope.$on('$locationChangeSuccess', function () {
10451
10434 vm.refresh = function(){
10452 10435 vm.searchParams = parseSearchToTags($location.search());
10436 vm.page = Number(vm.searchParams.page) || 1;
10453 10437 var params = parseTagsToSearch(vm.searchParams);
10454 10438
10455 if (vm.is_loading === false) {
10456
10457 vm.fetchReports(params);
10458 }
10459
10460 });
10461
10462
10439 vm.fetchReports(params);
10440 };
10441 // initial load
10442 vm.refresh();
10463 10443 }
10464 10444
10465 10445 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
@@ -11319,7 +11299,6 b" angular.module('appenlight.directives.c3chart', [])"
11319 11299 scope.chart = scope.chart.destroy();
11320 11300 delete element;
11321 11301 delete scope.chart;
11322
11323 11302 }
11324 11303 }
11325 11304 );
@@ -31,7 +31,7 b''
31 31 "angular-mocks": "1.5.5",
32 32 "angular-scenario": "1.5.5",
33 33 "angular-bootstrap": "1.3.2",
34 "angular-ui-router": "1.0.0-alpha.5",
34 "angular-ui-router": "1.0.0-beta.3",
35 35 "angular-toArrayFilter" : "1.0.1",
36 36 "d3": "3.5.0",
37 37 "c3": "0.4.11",
@@ -655,13 +655,4 b' function IndexDashboardController($rootScope, $scope, $location, $cookies, $inte'
655 655 vm.determineStartState();
656 656 vm.refreshData();
657 657 }
658
659 $scope.$on('$locationChangeSuccess', function () {
660 console.log('$locationChangeSuccess IndexDashboardController');
661 if (vm.loading.series === false) {
662 vm.determineStartState();
663 vm.refreshData();
664 }
665 });
666
667 658 }
@@ -19,9 +19,9 b''
19 19
20 20 angular.module('appenlight.controllers').controller('LogsController', LogsController);
21 21
22 LogsController.$inject = ['$scope', '$location', 'stateHolder', 'typeAheadTagHelper', 'logsNoIdResource', 'sectionViewResource'];
22 LogsController.$inject = ['$location', 'stateHolder', 'typeAheadTagHelper', 'logsNoIdResource', 'sectionViewResource'];
23 23
24 function LogsController($scope, $location, stateHolder, typeAheadTagHelper, logsNoIdResource, sectionViewResource) {
24 function LogsController($location, stateHolder, typeAheadTagHelper, logsNoIdResource, sectionViewResource) {
25 25 var vm = this;
26 26 vm.logEventsChartConfig = {
27 27 data: {
@@ -87,7 +87,7 b' function LogsController($scope, $location, stateHolder, typeAheadTagHelper, logs'
87 87 vm.logsPage = [];
88 88 vm.itemCount = 0;
89 89 vm.itemsPerPage = 250;
90 vm.searchParams = parseSearchToTags($location.search());
90 vm.page = 1;
91 91 vm.$location = $location;
92 92 vm.isLoading = {
93 93 logs: true,
@@ -161,13 +161,16 b' function LogsController($scope, $location, stateHolder, typeAheadTagHelper, logs'
161 161 vm.aheadFilter = typeAheadTagHelper.aheadFilter;
162 162 vm.removeSearchTag = function (tag) {
163 163 $location.search(tag.type, null);
164 vm.refresh();
164 165 };
165 166 vm.addSearchTag = function (tag) {
166 167 $location.search(tag.type, tag.value);
168 vm.refresh();
167 169 };
168 170
169 171 vm.paginationChange = function(){
170 $location.search('page', vm.searchParams.page);
172 $location.search('page', vm.page);
173 vm.refresh();
171 174 };
172 175
173 176
@@ -185,8 +188,7 b' function LogsController($scope, $location, stateHolder, typeAheadTagHelper, logs'
185 188 var text = vm.filterTypeAhead;
186 189 if (_.isObject(vm.filterTypeAhead)) {
187 190 text = vm.filterTypeAhead.text;
188 }
189 ;
191 };
190 192 if (!vm.filterTypeAhead) {
191 193 return
192 194 }
@@ -222,8 +224,7 b' function LogsController($scope, $location, stateHolder, typeAheadTagHelper, logs'
222 224 }
223 225 vm.showDatePicker = false;
224 226 // aka we selected one of main options
225 $location.search(tag.type, tag.value);
226
227 vm.addSearchTag({type: tag.type, value: tag.value});
227 228 // clear typeahead
228 229 vm.filterTypeAhead = undefined;
229 230 };
@@ -278,22 +279,16 b' function LogsController($scope, $location, stateHolder, typeAheadTagHelper, logs'
278 279
279 280 vm.filterId = function (log) {
280 281 $location.search('request_id', log.request_id);
282 vm.refresh();
281 283 };
282 284
283 var params = parseTagsToSearch(vm.searchParams);
284 vm.fetchLogs(params);
285 vm.fetchSeriesData(params);
286
287 $scope.$on('$locationChangeSuccess', function () {
288 console.log('$locationChangeSuccess LogsController');
285 vm.refresh = function(){
289 286 vm.searchParams = parseSearchToTags($location.search());
287 vm.page = Number(vm.searchParams.page) || 1;
290 288 var params = parseTagsToSearch(vm.searchParams);
291 console.log($location.path());
292 if (vm.isLoading.logs === false) {
293 console.log(params);
294 vm.fetchLogs(params);
295 vm.fetchSeriesData(params);
296 }
297 });
298
289 vm.fetchLogs(params);
290 vm.fetchSeriesData(params);
291 };
292 console.info('page load');
293 vm.refresh();
299 294 }
@@ -20,10 +20,10 b''
20 20 angular.module('appenlight.controllers')
21 21 .controller('ReportsListController', ReportsListController);
22 22
23 ReportsListController.$inject = ['$scope', '$location', '$cookies',
23 ReportsListController.$inject = ['$location', '$cookies',
24 24 'stateHolder', 'typeAheadTagHelper', 'reportsResource'];
25 25
26 function ReportsListController($scope, $location, $cookies, stateHolder,
26 function ReportsListController($location, $cookies, stateHolder,
27 27 typeAheadTagHelper, reportsResource) {
28 28 var vm = this;
29 29 vm.applications = stateHolder.AeUser.applications_map;
@@ -33,11 +33,11 b' function ReportsListController($scope, $location, $cookies, stateHolder,'
33 33 };
34 34 vm.today();
35 35 vm.reportsPage = [];
36 vm.page = 1;
36 37 vm.itemCount = 0;
37 38 vm.itemsPerPage = 250;
38 39 typeAheadTagHelper.tags = [];
39 40 vm.searchParams = {tags: [], page: 1, type: 'report'};
40 vm.searchParams = parseSearchToTags($location.search());
41 41 vm.is_loading = false;
42 42 vm.filterTypeAheadOptions = [
43 43 {
@@ -153,9 +153,11 b' function ReportsListController($scope, $location, $cookies, stateHolder,'
153 153 vm.aheadFilter = typeAheadTagHelper.aheadFilter;
154 154 vm.removeSearchTag = function (tag) {
155 155 $location.search(tag.type, null);
156 vm.refresh();
156 157 };
157 158 vm.addSearchTag = function (tag) {
158 159 $location.search(tag.type, tag.value);
160 vm.refresh();
159 161 };
160 162 vm.notRelativeTime = false;
161 163 if ($cookies.notRelativeTime) {
@@ -164,7 +166,7 b' function ReportsListController($scope, $location, $cookies, stateHolder,'
164 166
165 167 vm.changeRelativeTime = function () {
166 168 $cookies.notRelativeTime = JSON.stringify(vm.notRelativeTime);
167 }
169 };
168 170
169 171 _.each(_.range(1, 11), function (priority) {
170 172 vm.filterTypeAheadOptions.push({
@@ -195,7 +197,8 b' function ReportsListController($scope, $location, $cookies, stateHolder,'
195 197 });
196 198
197 199 vm.paginationChange = function(){
198 $location.search('page', vm.searchParams.page);
200 $location.search('page', vm.page);
201 vm.refresh();
199 202 };
200 203
201 204 vm.typeAheadTag = function (event) {
@@ -242,10 +245,10 b' function ReportsListController($scope, $location, $cookies, stateHolder,'
242 245 }
243 246 vm.showDatePicker = false;
244 247 // aka we selected one of main options
245 $location.search(tag.type, tag.value);
248 vm.addSearchTag({type: tag.type, value: tag.value});
246 249 // clear typeahead
247 250 vm.filterTypeAhead = undefined;
248 }
251 };
249 252
250 253 vm.pickerDateChanged = function(){
251 254 if (vm.filterTypeAhead.indexOf('start_date:') == '0') {
@@ -299,22 +302,16 b' function ReportsListController($scope, $location, $cookies, stateHolder,'
299 302 type: "request_id",
300 303 value: log.request_id
301 304 });
305 vm.refresh();
302 306 };
303 // initial load
304 var params = parseTagsToSearch(vm.searchParams);
305 vm.fetchReports(params);
306 307
307 $scope.$on('$locationChangeSuccess', function () {
308 console.log('$locationChangeSuccess ReportsListController ');
308 vm.refresh = function(){
309 309 vm.searchParams = parseSearchToTags($location.search());
310 vm.page = Number(vm.searchParams.page) || 1;
310 311 var params = parseTagsToSearch(vm.searchParams);
311 console.log($location.path());
312 if (vm.is_loading === false) {
313 console.log(params);
314 vm.fetchReports(params);
315 }
316
317 });
318
319
312 console.log(params);
313 vm.fetchReports(params);
314 };
315 // initial load
316 vm.refresh();
320 317 }
@@ -24,10 +24,10 b''
24 24 angular.module('appenlight.controllers')
25 25 .controller('ReportsListSlowController', ReportsListSlowController);
26 26
27 ReportsListSlowController.$inject = ['$scope', '$location', '$cookies',
27 ReportsListSlowController.$inject = ['$location', '$cookies',
28 28 'stateHolder', 'typeAheadTagHelper', 'slowReportsResource']
29 29
30 function ReportsListSlowController($scope, $location, $cookies, stateHolder, typeAheadTagHelper, slowReportsResource) {
30 function ReportsListSlowController($location, $cookies, stateHolder, typeAheadTagHelper, slowReportsResource) {
31 31 var vm = this;
32 32 vm.applications = stateHolder.AeUser.applications_map;
33 33 stateHolder.section = 'slow_reports';
@@ -36,11 +36,11 b' function ReportsListSlowController($scope, $location, $cookies, stateHolder, typ'
36 36 };
37 37 vm.today();
38 38 vm.reportsPage = [];
39 vm.page = 1;
39 40 vm.itemCount = 0;
40 41 vm.itemsPerPage = 250;
41 42 typeAheadTagHelper.tags = [];
42 43 vm.searchParams = {tags: [], page: 1, type: 'slow_report'};
43 vm.searchParams = parseSearchToTags($location.search());
44 44 vm.is_loading = false;
45 45 vm.filterTypeAheadOptions = [
46 46 {
@@ -134,9 +134,11 b' function ReportsListSlowController($scope, $location, $cookies, stateHolder, typ'
134 134 vm.aheadFilter = typeAheadTagHelper.aheadFilter;
135 135 vm.removeSearchTag = function (tag) {
136 136 $location.search(tag.type, null);
137 vm.refresh();
137 138 };
138 139 vm.addSearchTag = function (tag) {
139 140 $location.search(tag.type, tag.value);
141 vm.refresh();
140 142 };
141 143 vm.manualOpen = false;
142 144 vm.notRelativeTime = false;
@@ -181,8 +183,7 b' function ReportsListSlowController($scope, $location, $cookies, stateHolder, typ'
181 183 var text = vm.filterTypeAhead;
182 184 if (_.isObject(vm.filterTypeAhead)) {
183 185 text = vm.filterTypeAhead.text;
184 }
185 ;
186 };
186 187 if (!vm.filterTypeAhead) {
187 188 return
188 189 }
@@ -217,14 +218,15 b' function ReportsListSlowController($scope, $location, $cookies, stateHolder, typ'
217 218 }
218 219 vm.showDatePicker = false;
219 220 // aka we selected one of main options
220 $location.search(tag.type, tag.value);
221 vm.addSearchTag({type: tag.type, value: tag.value});
221 222 // clear typeahead
222 223 vm.filterTypeAhead = undefined;
223 }
224 };
224 225
225 226 vm.paginationChange = function(){
226 $location.search('page', vm.searchParams.page);
227 }
227 $location.search('page', vm.page);
228 vm.refresh();
229 };
228 230
229 231 vm.pickerDateChanged = function(){
230 232 if (vm.filterTypeAhead.indexOf('start_date:') == '0') {
@@ -234,7 +236,7 b' function ReportsListSlowController($scope, $location, $cookies, stateHolder, typ'
234 236 vm.filterTypeAhead = 'end_date:' + moment(vm.pickerDate).utc().hour(23).minute(59).format();
235 237 }
236 238 vm.showDatePicker = false;
237 }
239 };
238 240
239 241 var reportPresentation = function (report) {
240 242 report.presentation = {};
@@ -255,7 +257,7 b' function ReportsListSlowController($scope, $location, $cookies, stateHolder, typ'
255 257 report.presentation.tooltip = 'New';
256 258 }
257 259 return report;
258 }
260 };
259 261
260 262 vm.fetchReports = function (searchParams) {
261 263 vm.is_loading = true;
@@ -271,28 +273,22 b' function ReportsListSlowController($scope, $location, $cookies, stateHolder, typ'
271 273 }, function () {
272 274 vm.is_loading = false;
273 275 });
274 }
276 };
275 277
276 278 vm.filterId = function (log) {
277 279 vm.searchParams.tags.push({
278 280 type: "request_id",
279 281 value: log.request_id
280 282 });
281 }
282 //initial load
283 var params = parseTagsToSearch(vm.searchParams);
284 vm.fetchReports(params);
285
286 $scope.$on('$locationChangeSuccess', function () {
287 console.log('$locationChangeSuccess ReportsListSlowController ');
283 vm.refresh();
284 };
285 vm.refresh = function(){
288 286 vm.searchParams = parseSearchToTags($location.search());
287 vm.page = Number(vm.searchParams.page) || 1;
289 288 var params = parseTagsToSearch(vm.searchParams);
290 console.log($location.path());
291 if (vm.is_loading === false) {
292 console.log(params);
293 vm.fetchReports(params);
294 }
295 });
296
289 vm.fetchReports(params);
290 };
297 291
292 //initial load
293 vm.refresh();
298 294 }
@@ -105,7 +105,6 b" angular.module('appenlight.directives.c3chart', [])"
105 105 scope.chart = scope.chart.destroy();
106 106 delete element;
107 107 delete scope.chart;
108 console.log('destroy called');
109 108 }
110 109 }
111 110 );
@@ -44,7 +44,7 b''
44 44
45 45
46 46 <div class="text-center">
47 <uib-pagination total-items="logs.itemCount" items-per-page="logs.itemsPerPage" ng-model="logs.searchParams.page" max-size="10"
47 <uib-pagination total-items="logs.itemCount" items-per-page="logs.itemsPerPage" ng-model="logs.page" max-size="10"
48 48 ng-change="logs.paginationChange()"
49 49 class="pagination pagination-sm" boundary-links="true" direction-links="false"></uib-pagination>
50 50 </div>
@@ -88,7 +88,7 b''
88 88 </div>
89 89
90 90 <div class="text-center">
91 <uib-pagination total-items="logs.itemCount" items-per-page="logs.itemsPerPage" ng-model="logs.searchParams.page" max-size="10"
91 <uib-pagination total-items="logs.itemCount" items-per-page="logs.itemsPerPage" ng-model="logs.page" max-size="10"
92 92 ng-change="logs.paginationChange()"
93 93 class="pagination pagination-sm" boundary-links="true" direction-links="false"></uib-pagination>
94 94 </div>
@@ -32,7 +32,7 b''
32 32
33 33
34 34 <div class="text-center">
35 <uib-pagination total-items="reports_list.itemCount" items-per-page="reports_list.itemsPerPage" ng-model="reports_list.searchParams.page" max-size="10"
35 <uib-pagination total-items="reports_list.itemCount" items-per-page="reports_list.itemsPerPage" ng-model="reports_list.page" max-size="10"
36 36 class="pagination pagination-sm" boundary-links="true" direction-links="false"
37 37 ng-change="reports_list.paginationChange()"
38 38 ng-show="!reports_list.is_loading"></uib-pagination>
@@ -80,7 +80,7 b''
80 80
81 81
82 82 <div class="text-center">
83 <uib-pagination total-items="reports_list.itemCount" items-per-page="reports_list.itemsPerPage" ng-model="reports_list.searchParams.page" max-size="10"
83 <uib-pagination total-items="reports_list.itemCount" items-per-page="reports_list.itemsPerPage" ng-model="reports_list.page" max-size="10"
84 84 class="pagination pagination-sm" boundary-links="true" direction-links="false"
85 85 ng-change="reports_list.paginationChange()"
86 86 ng-show="!reports_list.is_loading"></uib-pagination>
@@ -34,7 +34,7 b''
34 34
35 35
36 36 <div class="text-center">
37 <uib-pagination total-items="reports_list.itemCount" items-per-page="reports_list.itemsPerPage" ng-model="reports_list.searchParams.page" max-size="10"
37 <uib-pagination total-items="reports_list.itemCount" items-per-page="reports_list.itemsPerPage" ng-model="reports_list.page" max-size="10"
38 38 class="pagination pagination-sm" boundary-links="true" direction-links="false"
39 39 ng-change="reports_list.paginationChange()"
40 40 ng-show="!reports_list.is_loading"></uib-pagination>
@@ -86,7 +86,7 b''
86 86 </div>
87 87
88 88 <div class="text-center">
89 <uib-pagination total-items="reports_list.itemCount" items-per-page="reports_list.itemsPerPage" ng-model="reports_list.searchParams.page" max-size="10"
89 <uib-pagination total-items="reports_list.itemCount" items-per-page="reports_list.itemsPerPage" ng-model="reports_list.page" max-size="10"
90 90 class="pagination pagination-sm" boundary-links="true" direction-links="false"
91 91 ng-change="reports_list.paginationChange()"
92 92 ng-show="!reports_list.is_loading"></uib-pagination>
General Comments 0
You need to be logged in to leave comments. Login now