Browse code

Asset changes needed to support a non / context root. Global redirect to asset server or dump of api paths when / is requested.

Jessica Forrester authored on 2015/03/26 04:02:48
Showing 24 changed files
... ...
@@ -66,6 +66,24 @@ Architecture
66 66
 
67 67
 The OpenShift v3 management console is based on AngularJS and [Hawt.io](https://github.com/hawtio/hawtio-core)
68 68
 
69
+#### Navigation
70
+
71
+The v3 console supports a custom context root.  When running as part of the `openshift start` command the console's context root is injected into the `<base>` tag of the index.html file.  In order to support custom context roots, all console URLs must be relative, so they should not contain a leading "/" character.
72
+
73
+For example if you want to specify a URL directly in an HTML template to go to the project overview it would look like
74
+
75
+```
76
+<a href="project/foo/overview">
77
+```
78
+
79
+and would actually resolve to be `/contextroot/project/foo/overview` by the browser.  Similarly, if you want to use JavaScript to change the current page location, you should use the $location service from angular like
80
+
81
+```
82
+$location.url("project/foo/overview")
83
+```
84
+
85
+Finally, if you want to reference the root of the web console use the path `./`
86
+
69 87
 #### Custom directives and filters
70 88
 
71 89
 The v3 console relies heavily on custom directives and filters, some of which are intended to be utilties and used throughout the console source. The list below is NOT a complete list of all of our directives and filters.
... ...
@@ -31,7 +31,7 @@
31 31
           <span class="icon-bar"></span>
32 32
           <span class="icon-bar"></span>
33 33
         </button>
34
-        <a class="navbar-brand" href="/">
34
+        <a class="navbar-brand" href="./">
35 35
           <img src="images/logo-origin-thin.svg" alt="OpenShift Origin">
36 36
         </a>
37 37
       </div>
... ...
@@ -56,7 +56,7 @@
56 56
               <li class="divider"></li>
57 57
               -->
58 58
               <li>
59
-                <a href="/logout">Log out</a>
59
+                <a href="logout">Log out</a>
60 60
               </li>
61 61
             </ul>
62 62
           </li>
... ...
@@ -99,7 +99,7 @@
99 99
     <script src="bower_components/patternfly/components/bootstrap-select/bootstrap-select.js"></script>
100 100
     <script src="bower_components/js-logger/src/logger.js"></script>
101 101
     <script src="bower_components/hawtio-core/hawtio-core.js"></script>
102
-    <script src="bower_components/lodash/dist/lodash.compat.js"></script>
102
+    <script src="bower_components/lodash/lodash.js"></script>
103 103
     <script src="bower_components/hawtio-core-navigation/dist/hawtio-core-navigation.js"></script>
104 104
     <script src="bower_components/hawtio-extension-service/dist/hawtio-extension-service.js"></script>
105 105
     <script src="bower_components/sifter/sifter.js"></script>
... ...
@@ -42,10 +42,10 @@ angular
42 42
         if (injector) {
43 43
           var routeParams = injector.get("$routeParams");
44 44
           if (routeParams.project) {
45
-            return "/project/" + encodeURIComponent(routeParams.project) + "/" + path;
45
+            return "project/" + encodeURIComponent(routeParams.project) + "/" + path;
46 46
           }
47 47
         }
48
-        return "/project/:project/" + path;
48
+        return "project/:project/" + path;
49 49
       }
50 50
     };
51 51
 
... ...
@@ -11,7 +11,7 @@ angular.module('openshiftConsole')
11 11
   .controller('NewFromTemplateController', function ($scope, $http, $routeParams, DataService, $q, $location, TaskList, $parse) {
12 12
 
13 13
     function errorPage(message) {
14
-      var redirect = URI('/error').query({
14
+      var redirect = URI('error').query({
15 15
         "error_description": message
16 16
       }).toString();
17 17
       $location.url(redirect);
... ...
@@ -133,7 +133,7 @@ angular.module('openshiftConsole')
133 133
             );
134 134
             return d.promise;
135 135
           });
136
-          $location.path("/project/" + $scope.projectName + "/overview");
136
+          $location.path("project/" + $scope.projectName + "/overview");
137 137
         },
138 138
         function(result) { // failure
139 139
           $scope.alerts = [
... ...
@@ -33,7 +33,7 @@ angular.module('openshiftConsole')
33 33
             var message = e.status == 403 ? 
34 34
               ("The project " + $scope.projectName + " does not exist or you are not authorized to view it.") :
35 35
               ("The project " + $scope.projectName + " does not exist.")
36
-            var redirect = URI('/error').query({
36
+            var redirect = URI('error').query({
37 37
               "error_description": message,
38 38
               "error" : e.status == 403 ? 'access_denied' : 'not_found'
39 39
             }).toString();
... ...
@@ -19,7 +19,7 @@ angular.module('openshiftConsole')
19 19
         // Make sure the logout completed
20 20
         if (AuthService.isLoggedIn()) {
21 21
           $log.debug("LogoutController, logout failed, still logged in");
22
-          $scope.logoutMessage = 'You could not be logged out. Return to the <a href="/">console</a>.';
22
+          $scope.logoutMessage = 'You could not be logged out. Return to the <a href="./">console</a>.';
23 23
         } else {
24 24
           if (AUTH_CFG.logout_uri) {
25 25
             $log.debug("LogoutController, logout completed, redirecting to AUTH_CFG.logout_uri", AUTH_CFG.logout_uri);
... ...
@@ -37,6 +37,6 @@ angular.module('openshiftConsole')
37 37
     } else {
38 38
       // TODO: redirect to configurable logout destination
39 39
       $log.debug("LogoutController, not logged in, logout complete");
40
-      $scope.logoutMessage = 'You are logged out. Return to the <a href="/">console</a>.';
40
+      $scope.logoutMessage = 'You are logged out. Return to the <a href="./">console</a>.';
41 41
     }
42 42
   });
... ...
@@ -20,7 +20,7 @@ angular.module('openshiftConsole')
20 20
       // Typically, this means we accessed /oauth directly, rather than via an auth redirect
21 21
       if (!token) {
22 22
         authLogger.log("OAuthController, no token or error, redirecting to /");
23
-        $location.url('/');
23
+        $location.url('./');
24 24
         return;
25 25
       }
26 26
 
... ...
@@ -35,24 +35,24 @@ angular.module('openshiftConsole')
35 35
         AuthService.setUser(user, token);
36 36
 
37 37
         // Redirect to original destination (or default to '/')
38
-        var destination = then || '/';
38
+        var destination = then || './';
39 39
         if (URI(destination).is('absolute')) {
40
-          if (debug) { Logger.log("OAuthController, invalid absolute redirect", destination); }
41
-          destination = '/';
40
+          authLogger.log("OAuthController, invalid absolute redirect", destination);
41
+          destination = './';
42 42
         }
43 43
         authLogger.log("OAuthController, redirecting", destination);
44 44
         $location.url(destination);
45 45
       })
46 46
       .catch(function(rejection) {
47 47
         // Handle an API error response fetching the user
48
-        var redirect = URI('/error').query({error: 'user_fetch_failed'}).toString();
48
+        var redirect = URI('error').query({error: 'user_fetch_failed'}).toString();
49 49
         authLogger.error("OAuthController, error fetching user", rejection, "redirecting", redirect);
50 50
         $location.url(redirect);
51 51
       });
52 52
 
53 53
     })
54 54
     .catch(function(rejection) {
55
-      var redirect = URI('/error').query({
55
+      var redirect = URI('error').query({
56 56
       	error: rejection.error || "",
57 57
       	error_description: rejection.error_description || "",
58 58
       	error_uri: rejection.error_uri || "",
... ...
@@ -14,7 +14,7 @@ angular.module('openshiftConsole')
14 14
           // Must trigger off of the modal's hidden event to guarantee modal has finished closing before switching screens
15 15
           $(".modal", elem).on('hidden.bs.modal', function () {
16 16
             scope.$apply(function() {
17
-              var createURI = URI.expand("/project/{project}/create/fromtemplate{?q*}", {
17
+              var createURI = URI.expand("project/{project}/create/fromtemplate{?q*}", {
18 18
                 project: scope.project,
19 19
                 q: {
20 20
                   name: scope.template.metadata.name,
... ...
@@ -18,7 +18,7 @@
18 18
           </div>
19 19
           <div class="col-md-4 active-filters">
20 20
           </div>
21
-          <div class="col-md-2" style="margin-top: 30px;"><a href="/project/{{projectName}}/catalog" class="btn btn-lg btn-primary">Create <i class="fa fa-plus" /></a></div>
21
+          <div class="col-md-2" style="margin-top: 30px;"><a href="project/{{projectName}}/catalog" class="btn btn-lg btn-primary">Create <i class="fa fa-plus" /></a></div>
22 22
         </div>
23 23
     </div>
24 24
   </div>
... ...
@@ -11,7 +11,7 @@
11 11
       <div style="margin-bottom: 10px;" ng-repeat="image in images">
12 12
         <h3>{{image.dockerImageReference | imageName}} <span class="small">({{image.metadata.name}})</span></h3>
13 13
         <div>Created: <relative-timestamp timestamp="image.metadata.creationTimestamp"></relative-timestamp></div>
14
-        <div ng-if="build = (image | buildForImage : builds)">Created from: Build {{build.metadata.labels.buildconfig}} (<a href="/project/{{projectName}}/browse/builds" class="small" title="{{build.metadata.name}}">{{build.metadata.name.substr(0, 10)}}</a>)
14
+        <div ng-if="build = (image | buildForImage : builds)">Created from: Build {{build.metadata.labels.buildconfig}} (<a href="project/{{projectName}}/browse/builds" class="small" title="{{build.metadata.name}}">{{build.metadata.name.substr(0, 10)}}</a>)
15 15
       </div>      
16 16
     </div>
17 17
   </project-page>
... ...
@@ -1,7 +1,7 @@
1 1
 <div class="container">
2 2
   <h1>Projects</h1>
3 3
   <div class="tile tile-project tile-click" style="margin-bottom: 10px;" ng-repeat="project in projects">
4
-    <h2 class="project"><a class="tile-target" href="/project/{{project.metadata.name}}">{{project.displayName || project.metadata.name}}</a></h2>
4
+    <h2 class="project"><a class="tile-target" href="project/{{project.metadata.name}}">{{project.displayName || project.metadata.name}}</a></h2>
5 5
     <div class="muted" style="margin-top: -5px;" ng-if="project | annotation : 'description'">{{project | annotation : 'description'}}</div>
6 6
   </div>
7 7
   <div ng-if="emptyMessage && (projects | hashSize) == 0">{{emptyMessage}}</div>
... ...
@@ -15,10 +15,10 @@
15 15
     "uri.js": "1.14.1",
16 16
     "moment": "2.8.4",
17 17
     "patternfly": "1.1.2",
18
-    "hawtio-core": "2.0.8",
19
-    "hawtio-core-navigation": "2.0.15",
18
+    "hawtio-core": "2.0.11",
19
+    "hawtio-core-navigation": "2.0.33",
20 20
     "hawtio-extension-service": "2.0.0",
21
-    "lodash": "2.4.1",
21
+    "lodash": "3.2.0",
22 22
     "jquery": "2.1.3",
23 23
     "sifter": "0.3.4",
24 24
     "microplugin": "0.0.3",
... ...
@@ -38,7 +38,7 @@ module.exports = function(config) {
38 38
       "bower_components/js-logger/src/logger.js",
39 39
       //"bower_components/webcomponentsjs/webcomponents.js",
40 40
       "bower_components/hawtio-core/hawtio-core.js",
41
-      "bower_components/lodash/dist/lodash.compat.js",
41
+      "bower_components/lodash/lodash.js",
42 42
       "bower_components/hawtio-core-navigation/dist/hawtio-core-navigation.js",
43 43
       "bower_components/hawtio-extension-service/dist/hawtio-extension-service.js",
44 44
       'app/scripts/**/*.js',
... ...
@@ -13,14 +13,12 @@ TIME_MIN=$((60 * $TIME_SEC))
13 13
 
14 14
 # TODO: Randomize these ports
15 15
 export OS_MASTER_PORT=$(go run ${OS_ROOT}/test/util/random_port/generate.go)
16
-export OS_ASSETS_PORT=$(go run ${OS_ROOT}/test/util/random_port/generate.go)
17 16
 export OS_DNS_PORT=$(go run ${OS_ROOT}/test/util/random_port/generate.go)
18 17
 export ETCD_PORT=$(go run ${OS_ROOT}/test/util/random_port/generate.go)
19 18
 
20 19
 DEFAULT_SERVER_IP=$(ifconfig | grep -Ev "(127.0.0.1|172.17.42.1)" | grep "inet " | head -n 1 | awk '{print $2}')
21 20
 
22 21
 export OS_MASTER_ADDR=${DEFAULT_SERVER_IP}:${OS_MASTER_PORT}
23
-export OS_ASSETS_ADDR=${DEFAULT_SERVER_IP}:${OS_ASSETS_PORT}
24 22
 export OS_DNS_ADDR=${DEFAULT_SERVER_IP}:${OS_DNS_PORT}
25 23
 export KUBERNETES_MASTER="https://${OS_MASTER_ADDR}"
26 24
 
... ...
@@ -12512,7 +12512,7 @@ var _index_html = []byte(`<!doctype html>
12512 12512
 <span class="icon-bar"></span>
12513 12513
 <span class="icon-bar"></span>
12514 12514
 </button>
12515
-<a class="navbar-brand" href="/">
12515
+<a class="navbar-brand" href="./">
12516 12516
 <img src="images/logo-origin-thin.svg" alt="OpenShift Origin">
12517 12517
 </a>
12518 12518
 </div>
... ...
@@ -12529,7 +12529,7 @@ var _index_html = []byte(`<!doctype html>
12529 12529
 <ul class="dropdown-menu">
12530 12530
 
12531 12531
 <li>
12532
-<a href="/logout">Log out</a>
12532
+<a href="logout">Log out</a>
12533 12533
 </li>
12534 12534
 </ul>
12535 12535
 </li>
... ...
@@ -13179,9 +13179,9 @@ return function() {
13179 13179
 var b = HawtioCore.injector;
13180 13180
 if (b) {
13181 13181
 var c = b.get("$routeParams");
13182
-if (c.project) return "/project/" + encodeURIComponent(c.project) + "/" + a;
13182
+if (c.project) return "project/" + encodeURIComponent(c.project) + "/" + a;
13183 13183
 }
13184
-return "/project/:project/" + a;
13184
+return "project/:project/" + a;
13185 13185
 };
13186 13186
 }, f = "views", g = "openshiftConsole", h = c.create().id(c.join(g, "overview")).title(function() {
13187 13187
 return "Overview";
... ...
@@ -14182,7 +14182,7 @@ errorNotification:!1
14182 14182
 a.project = b, a.projectPromise.resolve(b);
14183 14183
 }, function(b) {
14184 14184
 if (a.projectPromise.reject(b), 403 == b.status || 404 == b.status) {
14185
-var c = 403 == b.status ? "The project " + a.projectName + " does not exist or you are not authorized to view it." :"The project " + a.projectName + " does not exist.", d = URI("/error").query({
14185
+var c = 403 == b.status ? "The project " + a.projectName + " does not exist or you are not authorized to view it." :"The project " + a.projectName + " does not exist.", d = URI("error").query({
14186 14186
 error_description:c,
14187 14187
 error:403 == b.status ? "access_denied" :"not_found"
14188 14188
 }).toString();
... ...
@@ -14460,7 +14460,7 @@ b.unwatchAll(f);
14460 14460
 });
14461 14461
 } ]), angular.module("openshiftConsole").controller("NewFromTemplateController", [ "$scope", "$http", "$routeParams", "DataService", "$q", "$location", "TaskList", "$parse", function(a, b, c, d, e, f, g, h) {
14462 14462
 function i(a) {
14463
-var b = URI("/error").query({
14463
+var b = URI("error").query({
14464 14464
 error_description:a
14465 14465
 }).toString();
14466 14466
 f.url(b);
... ...
@@ -14528,7 +14528,7 @@ alerts:d,
14528 14528
 hasErrors:e
14529 14529
 });
14530 14530
 }), c.promise;
14531
-}), f.path("/project/" + a.projectName + "/overview");
14531
+}), f.path("project/" + a.projectName + "/overview");
14532 14532
 }, function(b) {
14533 14533
 a.alerts = [ {
14534 14534
 type:"error",
... ...
@@ -14568,9 +14568,9 @@ a.expanded = !a.expanded;
14568 14568
 } ]), angular.module("openshiftConsole").controller("OAuthController", [ "$location", "$q", "RedirectLoginService", "DataService", "AuthService", "Logger", function(a, b, c, d, e, f) {
14569 14569
 var g = f.get("auth");
14570 14570
 c.finish().then(function(b) {
14571
-var c = b.token, h = b.then;
14572
-if (!c) return g.log("OAuthController, no token or error, redirecting to /"), void a.url("/");
14573
-var i = {
14571
+var c = b.token, f = b.then;
14572
+if (!c) return g.log("OAuthController, no token or error, redirecting to /"), void a.url("./");
14573
+var h = {
14574 14574
 errorNotification:!1,
14575 14575
 http:{
14576 14576
 auth:{
... ...
@@ -14579,18 +14579,18 @@ triggerLogin:!1
14579 14579
 }
14580 14580
 }
14581 14581
 };
14582
-g.log("OAuthController, got token, fetching user", i), d.get("users", "~", {}, i).then(function(b) {
14582
+g.log("OAuthController, got token, fetching user", h), d.get("users", "~", {}, h).then(function(b) {
14583 14583
 g.log("OAuthController, got user", b), e.setUser(b, c);
14584
-var d = h || "/";
14585
-URI(d).is("absolute") && (debug && f.log("OAuthController, invalid absolute redirect", d), d = "/"), g.log("OAuthController, redirecting", d), a.url(d);
14584
+var d = f || "./";
14585
+URI(d).is("absolute") && (g.log("OAuthController, invalid absolute redirect", d), d = "./"), g.log("OAuthController, redirecting", d), a.url(d);
14586 14586
 })["catch"](function(b) {
14587
-var c = URI("/error").query({
14587
+var c = URI("error").query({
14588 14588
 error:"user_fetch_failed"
14589 14589
 }).toString();
14590 14590
 g.error("OAuthController, error fetching user", b, "redirecting", c), a.url(c);
14591 14591
 });
14592 14592
 })["catch"](function(b) {
14593
-var c = URI("/error").query({
14593
+var c = URI("error").query({
14594 14594
 error:b.error || "",
14595 14595
 error_description:b.error_description || "",
14596 14596
 error_uri:b.error_uri || ""
... ...
@@ -14617,8 +14617,8 @@ a.errorMessage = "An error has occurred";
14617 14617
 b.error_description && (a.errorDetails = b.error_description);
14618 14618
 } ]), angular.module("openshiftConsole").controller("LogoutController", [ "$scope", "$log", "AuthService", "AUTH_CFG", function(a, b, c, d) {
14619 14619
 b.debug("LogoutController"), c.isLoggedIn() ? (b.debug("LogoutController, logged in, initiating logout"), a.logoutMessage = "Logging out...", c.startLogout()["finally"](function() {
14620
-c.isLoggedIn() ? (b.debug("LogoutController, logout failed, still logged in"), a.logoutMessage = 'You could not be logged out. Return to the <a href="/">console</a>.') :d.logout_uri ? (b.debug("LogoutController, logout completed, redirecting to AUTH_CFG.logout_uri", d.logout_uri), window.location.href = d.logout_uri) :(b.debug("LogoutController, logout completed, reloading the page"), window.location.reload(!1));
14621
-})) :d.logout_uri ? (b.debug("LogoutController, logout completed, redirecting to AUTH_CFG.logout_uri", d.logout_uri), a.logoutMessage = "Logging out...", window.location.href = d.logout_uri) :(b.debug("LogoutController, not logged in, logout complete"), a.logoutMessage = 'You are logged out. Return to the <a href="/">console</a>.');
14620
+c.isLoggedIn() ? (b.debug("LogoutController, logout failed, still logged in"), a.logoutMessage = 'You could not be logged out. Return to the <a href="./">console</a>.') :d.logout_uri ? (b.debug("LogoutController, logout completed, redirecting to AUTH_CFG.logout_uri", d.logout_uri), window.location.href = d.logout_uri) :(b.debug("LogoutController, logout completed, reloading the page"), window.location.reload(!1));
14621
+})) :d.logout_uri ? (b.debug("LogoutController, logout completed, redirecting to AUTH_CFG.logout_uri", d.logout_uri), a.logoutMessage = "Logging out...", window.location.href = d.logout_uri) :(b.debug("LogoutController, not logged in, logout complete"), a.logoutMessage = 'You are logged out. Return to the <a href="./">console</a>.');
14622 14622
 } ]), angular.module("openshiftConsole").controller("CatalogController", [ "$scope", "DataService", "$filter", "LabelFilter", "Logger", function(a, b, c, d, e) {
14623 14623
 a.projectTemplates = {}, a.openshiftTemplates = {}, a.templatesByTag = {}, a.templates = [], a.instantApps = [], b.list("templates", a, function(b) {
14624 14624
 a.projectTemplates = b.by("metadata.name"), f(), g(), e.log("project templates", a.projectTemplates);
... ...
@@ -14870,7 +14870,7 @@ link:function(b, c) {
14870 14870
 $(".select-template", c).click(function() {
14871 14871
 $(".modal", c).on("hidden.bs.modal", function() {
14872 14872
 b.$apply(function() {
14873
-var c = URI.expand("/project/{project}/create/fromtemplate{?q*}", {
14873
+var c = URI.expand("project/{project}/create/fromtemplate{?q*}", {
14874 14874
 project:b.project,
14875 14875
 q:{
14876 14876
 name:b.template.metadata.name,
... ...
@@ -29954,8 +29954,8 @@ a();
29954 29954
 
29955 29955
 var hawtioPluginLoader = function(a) {
29956 29956
 var b = Logger.get("hawtio-loader");
29957
-return a.log = b, a.urls = [], a.modules = [], a.tasks = [], a.registerPreBootstrapTask = function(b) {
29958
-a.tasks.push(b);
29957
+return a.log = b, a.urls = [], a.modules = [], a.tasks = [], a.registerPreBootstrapTask = function(b, c) {
29958
+c ? a.tasks.unshift(b) :a.tasks.push(b);
29959 29959
 }, a.addModule = function(c) {
29960 29960
 b.debug("Adding module: " + c), a.modules.push(c);
29961 29961
 }, a.addUrl = function(c) {
... ...
@@ -30116,1242 +30116,2081 @@ return b || (b = {}, a.toastr = b), b;
30116 30116
 } ]), c.factory("branding", function() {
30117 30117
 return {};
30118 30118
 }), c.factory("userDetails", function() {
30119
-return {};
30119
+return {
30120
+logout:function() {
30121
+b.debug("Dummy userDetails.logout()");
30122
+}
30123
+};
30120 30124
 }), hawtioPluginLoader.addModule("ng"), hawtioPluginLoader.addModule("ngSanitize"), hawtioPluginLoader.addModule(a.pluginName), $(function() {
30121 30125
 hawtioPluginLoader.loadPlugins(function() {
30122
-a.injector = angular.bootstrap(document, hawtioPluginLoader.getModules()), b.debug("Bootstrapped application");
30126
+a.injector ? b.debug("Application already bootstrapped") :(a.injector = angular.bootstrap(document, hawtioPluginLoader.getModules()), b.debug("Bootstrapped application"));
30123 30127
 });
30124 30128
 });
30125 30129
 }(HawtioCore || (HawtioCore = {})), function() {
30126
-function a(a, b, c) {
30127
-for (var d = (c || 0) - 1, e = a ? a.length :0; ++d < e; ) if (a[d] === b) return d;
30128
-return -1;
30130
+function a(a, b) {
30131
+if (a !== b) {
30132
+var c = a === a, d = b === b;
30133
+if (a > b || !c || "undefined" == typeof a && d) return 1;
30134
+if (b > a || !d || "undefined" == typeof b && c) return -1;
30129 30135
 }
30130
-function b(b, c) {
30131
-var d = typeof c;
30132
-if (b = b.cache, "boolean" == d || null == c) return b[c] ? 0 :-1;
30133
-"number" != d && "string" != d && (d = "object");
30134
-var e = "number" == d ? c :u + c;
30135
-return b = (b = b[d]) && b[e], "object" == d ? b && a(b, c) > -1 ? 0 :-1 :b ? 0 :-1;
30136
+return 0;
30136 30137
 }
30137
-function c(a) {
30138
-var b = this.cache, c = typeof a;
30139
-if ("boolean" == c || null == a) b[a] = !0; else {
30140
-"number" != c && "string" != c && (c = "object");
30141
-var d = "number" == c ? a :u + a, e = b[c] || (b[c] = {});
30142
-"object" == c ? (e[d] || (e[d] = [])).push(a) :e[d] = !0;
30138
+function b(a, b, c) {
30139
+if (b !== b) return m(a, c);
30140
+for (var d = (c || 0) - 1, e = a.length; ++d < e; ) if (a[d] === b) return d;
30141
+return -1;
30143 30142
 }
30143
+function c(a, b) {
30144
+var c = a.length;
30145
+for (a.sort(b); c--; ) a[c] = a[c].value;
30146
+return a;
30144 30147
 }
30145 30148
 function d(a) {
30146
-return a.charCodeAt(0);
30147
-}
30148
-function e(a, b) {
30149
-for (var c = a.criteria, d = b.criteria, e = -1, f = c.length; ++e < f; ) {
30150
-var g = c[e], h = d[e];
30151
-if (g !== h) {
30152
-if (g > h || "undefined" == typeof g) return 1;
30153
-if (h > g || "undefined" == typeof h) return -1;
30149
+return "string" == typeof a ? a :null == a ? "" :a + "";
30154 30150
 }
30151
+function e(a) {
30152
+return a.charCodeAt(0);
30155 30153
 }
30156
-return a.index - b.index;
30154
+function f(a, b) {
30155
+for (var c = -1, d = a.length; ++c < d && b.indexOf(a.charAt(c)) > -1; ) ;
30156
+return c;
30157 30157
 }
30158
-function f(a) {
30159
-var b = -1, d = a.length, e = a[0], f = a[d / 2 | 0], g = a[d - 1];
30160
-if (e && "object" == typeof e && f && "object" == typeof f && g && "object" == typeof g) return !1;
30161
-var h = i();
30162
-h["false"] = h["null"] = h["true"] = h.undefined = !1;
30163
-var j = i();
30164
-for (j.array = a, j.cache = h, j.push = c; ++b < d; ) j.push(a[b]);
30165
-return j;
30158
+function g(a, b) {
30159
+for (var c = a.length; c-- && b.indexOf(a.charAt(c)) > -1; ) ;
30160
+return c;
30166 30161
 }
30167
-function g(a) {
30168
-return "\\" + _[a];
30162
+function h(b, c) {
30163
+return a(b.criteria, c.criteria) || b.index - c.index;
30169 30164
 }
30170
-function h() {
30171
-return q.pop() || [];
30165
+function i(b, c) {
30166
+for (var d = -1, e = b.criteria, f = c.criteria, g = e.length; ++d < g; ) {
30167
+var h = a(e[d], f[d]);
30168
+if (h) return h;
30172 30169
 }
30173
-function i() {
30174
-return r.pop() || {
30175
-array:null,
30176
-cache:null,
30177
-criteria:null,
30178
-"false":!1,
30179
-index:0,
30180
-"null":!1,
30181
-number:null,
30182
-object:null,
30183
-push:null,
30184
-string:null,
30185
-"true":!1,
30186
-undefined:!1,
30187
-value:null
30188
-};
30170
+return b.index - c.index;
30189 30171
 }
30190 30172
 function j(a) {
30191
-return "function" != typeof a.toString && "string" == typeof (a + "");
30173
+return Ma[a];
30174
+}
30175
+function k(a) {
30176
+return Na[a];
30192 30177
 }
30193 30178
 function l(a) {
30194
-a.length = 0, q.length < w && q.push(a);
30179
+return "\\" + Qa[a];
30195 30180
 }
30196
-function m(a) {
30197
-var b = a.cache;
30198
-b && m(b), a.array = a.cache = a.criteria = a.object = a.number = a.string = a.value = null, r.length < w && r.push(a);
30181
+function m(a, b, c) {
30182
+for (var d = a.length, e = c ? b || d :(b || 0) - 1; c ? e-- :++e < d; ) {
30183
+var f = a[e];
30184
+if (f !== f) return e;
30199 30185
 }
30200
-function n(a, b, c) {
30201
-b || (b = 0), "undefined" == typeof c && (c = a ? a.length :0);
30202
-for (var d = -1, e = c - b || 0, f = Array(0 > e ? 0 :e); ++d < e; ) f[d] = a[b + d];
30203
-return f;
30186
+return -1;
30204 30187
 }
30205
-function o(c) {
30206
-function q(a) {
30207
-return a && "object" == typeof a && !kd(a) && Rc.call(a, "__wrapped__") ? a :new r(a);
30188
+function n(a) {
30189
+return a && "object" == typeof a || !1;
30208 30190
 }
30209
-function r(a, b) {
30210
-this.__chain__ = !!b, this.__wrapped__ = a;
30191
+function o(a) {
30192
+return 160 >= a && a >= 9 && 13 >= a || 32 == a || 160 == a || 5760 == a || 6158 == a || a >= 8192 && (8202 >= a || 8232 == a || 8233 == a || 8239 == a || 8287 == a || 12288 == a || 65279 == a);
30211 30193
 }
30212
-function w(a) {
30213
-function b() {
30214
-if (d) {
30215
-var a = n(d);
30216
-Sc.apply(a, arguments);
30194
+function p(a, b) {
30195
+for (var c = -1, d = a.length, e = -1, f = []; ++c < d; ) a[c] === b && (a[c] = O, f[++e] = c);
30196
+return f;
30217 30197
 }
30218
-if (this instanceof b) {
30219
-var f = ba(c.prototype), g = c.apply(f, a || arguments);
30220
-return La(g) ? g :f;
30198
+function q(a, b) {
30199
+for (var c, d = -1, e = a.length, f = -1, g = []; ++d < e; ) {
30200
+var h = a[d], i = b ? b(h, d, a) :h;
30201
+d && c === i || (c = i, g[++f] = h);
30221 30202
 }
30222
-return c.apply(e, a || arguments);
30203
+return g;
30223 30204
 }
30224
-var c = a[0], d = a[2], e = a[4];
30225
-return jd(b, a), b;
30205
+function r(a) {
30206
+for (var b = -1, c = a.length; ++b < c && o(a.charCodeAt(b)); ) ;
30207
+return b;
30226 30208
 }
30227
-function _(a, b, c, d, e) {
30228
-if (c) {
30229
-var f = c(a);
30230
-if ("undefined" != typeof f) return f;
30231
-}
30232
-var g = La(a);
30233
-if (!g) return a;
30234
-var i = Kc.call(a);
30235
-if (!W[i] || !hd.nodeClass && j(a)) return a;
30236
-var k = fd[i];
30237
-switch (i) {
30238
-case O:
30239
-case P:
30240
-return new k(+a);
30241
-
30242
-case S:
30243
-case V:
30244
-return new k(a);
30245
-
30246
-case U:
30247
-return f = k(a.source, C.exec(a)), f.lastIndex = a.lastIndex, f;
30209
+function s(a) {
30210
+for (var b = a.length; b-- && o(a.charCodeAt(b)); ) ;
30211
+return b;
30248 30212
 }
30249
-var m = kd(a);
30250
-if (b) {
30251
-var o = !d;
30252
-d || (d = h()), e || (e = h());
30253
-for (var p = d.length; p--; ) if (d[p] == a) return e[p];
30254
-f = m ? k(a.length) :{};
30255
-} else f = m ? n(a) :vd({}, a);
30256
-return m && (Rc.call(a, "index") && (f.index = a.index), Rc.call(a, "input") && (f.input = a.input)), b ? (d.push(a), e.push(f), (m ? ud :yd)(a, function(a, g) {
30257
-f[g] = _(a, b, c, d, e);
30258
-}), o && (l(d), l(e)), f) :f;
30213
+function t(a) {
30214
+return Oa[a];
30259 30215
 }
30260
-function ba(a) {
30261
-return La(a) ? Yc(a) :{};
30216
+function u(o) {
30217
+function V(a) {
30218
+if (n(a) && !Xg(a) && !(a instanceof _)) {
30219
+if (a instanceof Z) return a;
30220
+if (_f.call(a, "__chain__") && _f.call(a, "__wrapped__")) return Ic(a);
30262 30221
 }
30263
-function ca(a, b, c) {
30264
-if ("function" != typeof a) return ec;
30265
-if ("undefined" == typeof b || !("prototype" in a)) return a;
30266
-var d = a.__bindData__;
30267
-if ("undefined" == typeof d && (hd.funcNames && (d = !a.name), d = d || !hd.funcDecomp, !d)) {
30268
-var e = Pc.call(a);
30269
-hd.funcNames || (d = !D.test(e)), d || (d = H.test(e), jd(a, d));
30222
+return new Z(a);
30270 30223
 }
30271
-if (d === !1 || d !== !0 && 1 & d[1]) return a;
30272
-switch (c) {
30273
-case 1:
30274
-return function(c) {
30275
-return a.call(b, c);
30276
-};
30277
-
30278
-case 2:
30279
-return function(c, d) {
30280
-return a.call(b, c, d);
30281
-};
30282
-
30283
-case 3:
30284
-return function(c, d, e) {
30285
-return a.call(b, c, d, e);
30286
-};
30287
-
30288
-case 4:
30289
-return function(c, d, e, f) {
30290
-return a.call(b, c, d, e, f);
30291
-};
30224
+function Z(a, b, c) {
30225
+this.__wrapped__ = a, this.__actions__ = c || [], this.__chain__ = !!b;
30292 30226
 }
30293
-return Pb(a, b);
30227
+function _(a) {
30228
+this.__wrapped__ = a, this.__actions__ = null, this.__dir__ = 1, this.__dropCount__ = 0, this.__filtered__ = !1, this.__iteratees__ = null, this.__takeCount__ = Dg, this.__views__ = null;
30294 30229
 }
30295
-function da(a) {
30296
-function b() {
30297
-var a = i ? g :this;
30298
-if (e) {
30299
-var o = n(e);
30300
-Sc.apply(o, arguments);
30230
+function Ma() {
30231
+var a = this.__actions__, b = this.__iteratees__, c = this.__views__, d = new _(this.__wrapped__);
30232
+return d.__actions__ = a ? Za(a) :null, d.__dir__ = this.__dir__, d.__dropCount__ = this.__dropCount__, d.__filtered__ = this.__filtered__, d.__iteratees__ = b ? Za(b) :null, d.__takeCount__ = this.__takeCount__, d.__views__ = c ? Za(c) :null, d;
30301 30233
 }
30302
-if ((f || k) && (o || (o = n(arguments)), f && Sc.apply(o, f), k && o.length < h)) return d |= 16, da([ c, l ? d :-4 & d, o, null, g, h ]);
30303
-if (o || (o = arguments), j && (c = a[m]), this instanceof b) {
30304
-a = ba(c.prototype);
30305
-var p = c.apply(a, o);
30306
-return La(p) ? p :a;
30234
+function Na() {
30235
+if (this.__filtered__) {
30236
+var a = new _(this);
30237
+a.__dir__ = -1, a.__filtered__ = !0;
30238
+} else a = this.clone(), a.__dir__ *= -1;
30239
+return a;
30307 30240
 }
30308
-return c.apply(a, o);
30241
+function Oa() {
30242
+var a = this.__wrapped__.value();
30243
+if (!Xg(a)) return Wb(a, this.__actions__);
30244
+var b = this.__dir__, c = 0 > b, d = rc(0, a.length, this.__views__), e = d.start, f = d.end, g = f - e, h = this.__dropCount__, i = xg(g, this.__takeCount__), j = c ? f :e - 1, k = this.__iteratees__, l = k ? k.length :0, m = 0, n = [];
30245
+a:for (;g-- && i > m; ) {
30246
+j += b;
30247
+for (var o = -1, p = a[j]; ++o < l; ) {
30248
+var q = k[o], r = q.iteratee, s = r(p, j, a), t = q.type;
30249
+if (t == L) p = s; else if (!s) {
30250
+if (t == K) continue a;
30251
+break a;
30309 30252
 }
30310
-var c = a[0], d = a[1], e = a[2], f = a[3], g = a[4], h = a[5], i = 1 & d, j = 2 & d, k = 4 & d, l = 8 & d, m = c;
30311
-return jd(b, a), b;
30312 30253
 }
30313
-function ea(c, d) {
30314
-var e = -1, g = pa(), h = c ? c.length :0, i = h >= v && g === a, j = [];
30315
-if (i) {
30316
-var k = f(d);
30317
-k ? (g = b, d = k) :i = !1;
30254
+h ? h-- :n[m++] = p;
30318 30255
 }
30319
-for (;++e < h; ) {
30320
-var l = c[e];
30321
-g(d, l) < 0 && j.push(l);
30256
+return n;
30322 30257
 }
30323
-return i && m(d), j;
30258
+function Pa() {
30259
+this.__data__ = {};
30324 30260
 }
30325
-function ga(a, b, c, d) {
30326
-for (var e = (d || 0) - 1, f = a ? a.length :0, g = []; ++e < f; ) {
30327
-var h = a[e];
30328
-if (h && "object" == typeof h && "number" == typeof h.length && (kd(h) || ta(h))) {
30329
-b || (h = ga(h, b, c));
30330
-var i = -1, j = h.length, k = g.length;
30331
-for (g.length += j; ++i < j; ) g[k++] = h[i];
30332
-} else c || g.push(h);
30261
+function Qa(a) {
30262
+return this.has(a) && delete this.__data__[a];
30333 30263
 }
30334
-return g;
30264
+function Sa(a) {
30265
+return "__proto__" == a ? v :this.__data__[a];
30335 30266
 }
30336
-function ha(a, b, c, d, e, f) {
30337
-if (c) {
30338
-var g = c(a, b);
30339
-if ("undefined" != typeof g) return !!g;
30267
+function Ta(a) {
30268
+return "__proto__" != a && _f.call(this.__data__, a);
30340 30269
 }
30341
-if (a === b) return 0 !== a || 1 / a == 1 / b;
30342
-var i = typeof a, k = typeof b;
30343
-if (!(a !== a || a && $[i] || b && $[k])) return !1;
30344
-if (null == a || null == b) return a === b;
30345
-var m = Kc.call(a), n = Kc.call(b);
30346
-if (m == M && (m = T), n == M && (n = T), m != n) return !1;
30347
-switch (m) {
30348
-case O:
30349
-case P:
30350
-return +a == +b;
30351
-
30352
-case S:
30353
-return a != +a ? b != +b :0 == a ? 1 / a == 1 / b :a == +b;
30354
-
30355
-case U:
30356
-case V:
30357
-return a == Dc(b);
30358
-}
30359
-var o = m == N;
30360
-if (!o) {
30361
-var p = Rc.call(a, "__wrapped__"), q = Rc.call(b, "__wrapped__");
30362
-if (p || q) return ha(p ? a.__wrapped__ :a, q ? b.__wrapped__ :b, c, d, e, f);
30363
-if (m != T || !hd.nodeClass && (j(a) || j(b))) return !1;
30364
-var r = !hd.argsObject && ta(a) ? Bc :a.constructor, s = !hd.argsObject && ta(b) ? Bc :b.constructor;
30365
-if (r != s && !(Ka(r) && r instanceof r && Ka(s) && s instanceof s) && "constructor" in a && "constructor" in b) return !1;
30366
-}
30367
-var t = !e;
30368
-e || (e = h()), f || (f = h());
30369
-for (var u = e.length; u--; ) if (e[u] == a) return f[u] == b;
30370
-var v = 0;
30371
-if (g = !0, e.push(a), f.push(b), o) {
30372
-if (u = a.length, v = b.length, g = v == u, g || d) for (;v--; ) {
30373
-var w = u, x = b[v];
30374
-if (d) for (;w-- && !(g = ha(a[w], x, c, d, e, f)); ) ; else if (!(g = ha(a[v], x, c, d, e, f))) break;
30375
-}
30376
-} else xd(b, function(b, h, i) {
30377
-return Rc.call(i, h) ? (v++, g = Rc.call(a, h) && ha(a[h], b, c, d, e, f)) :void 0;
30378
-}), g && !d && xd(a, function(a, b, c) {
30379
-return Rc.call(c, b) ? g = --v > -1 :void 0;
30380
-});
30381
-return e.pop(), f.pop(), t && (l(e), l(f)), g;
30270
+function Ua(a, b) {
30271
+return "__proto__" != a && (this.__data__[a] = b), this;
30382 30272
 }
30383
-function ia(a, b, c, d, e) {
30384
-(kd(b) ? db :yd)(b, function(b, f) {
30385
-var g, h, i = b, j = a[f];
30386
-if (b && ((h = kd(b)) || zd(b))) {
30387
-for (var k = d.length; k--; ) if (g = d[k] == b) {
30388
-j = e[k];
30389
-break;
30273
+function Va(a) {
30274
+var b = a ? a.length :0;
30275
+for (this.data = {
30276
+hash:tg(null),
30277
+set:new mg()
30278
+}; b--; ) this.push(a[b]);
30390 30279
 }
30391
-if (!g) {
30392
-var l;
30393
-c && (i = c(j, b), (l = "undefined" != typeof i) && (j = i)), l || (j = h ? kd(j) ? j :[] :zd(j) ? j :{}), d.push(b), e.push(j), l || ia(j, b, c, d, e);
30280
+function Xa(a, b) {
30281
+var c = a.data, d = "string" == typeof b || Ae(b) ? c.set.has(b) :c.hash[b];
30282
+return d ? 0 :-1;
30394 30283
 }
30395
-} else c && (i = c(j, b), "undefined" == typeof i && (i = b)), "undefined" != typeof i && (j = i);
30396
-a[f] = j;
30397
-});
30284
+function Ya(a) {
30285
+var b = this.data;
30286
+"string" == typeof a || Ae(a) ? b.set.add(a) :b.hash[a] = !0;
30398 30287
 }
30399
-function ja(a, b) {
30400
-return a + Oc(ed() * (b - a + 1));
30288
+function Za(a, b) {
30289
+var c = -1, d = a.length;
30290
+for (b || (b = Mf(d)); ++c < d; ) b[c] = a[c];
30291
+return b;
30401 30292
 }
30402
-function ka(c, d, e) {
30403
-var g = -1, i = pa(), j = c ? c.length :0, k = [], n = !d && j >= v && i === a, o = e || n ? h() :k;
30404
-if (n) {
30405
-var p = f(o);
30406
-i = b, o = p;
30293
+function $a(a, b) {
30294
+for (var c = -1, d = a.length; ++c < d && b(a[c], c, a) !== !1; ) ;
30295
+return a;
30407 30296
 }
30408
-for (;++g < j; ) {
30409
-var q = c[g], r = e ? e(q, g, c) :q;
30410
-(d ? !g || o[o.length - 1] !== r :i(o, r) < 0) && ((e || n) && o.push(r), k.push(q));
30297
+function _a(a, b) {
30298
+for (var c = a.length; c-- && b(a[c], c, a) !== !1; ) ;
30299
+return a;
30411 30300
 }
30412
-return n ? (l(o.array), m(o)) :e && l(o), k;
30301
+function ab(a, b) {
30302
+for (var c = -1, d = a.length; ++c < d; ) if (!b(a[c], c, a)) return !1;
30303
+return !0;
30413 30304
 }
30414
-function la(a) {
30415
-return function(b, c, d) {
30416
-var e = {};
30417
-if (c = q.createCallback(c, d, 3), kd(b)) for (var f = -1, g = b.length; ++f < g; ) {
30418
-var h = b[f];
30419
-a(e, h, c(h, f, b), b);
30420
-} else ud(b, function(b, d, f) {
30421
-a(e, b, c(b, d, f), f);
30422
-});
30305
+function bb(a, b) {
30306
+for (var c = -1, d = a.length, e = -1, f = []; ++c < d; ) {
30307
+var g = a[c];
30308
+b(g, c, a) && (f[++e] = g);
30309
+}
30310
+return f;
30311
+}
30312
+function cb(a, b) {
30313
+for (var c = -1, d = a.length, e = Mf(d); ++c < d; ) e[c] = b(a[c], c, a);
30423 30314
 return e;
30424
-};
30425 30315
 }
30426
-function ma(a, b, c, d, e, f) {
30427
-var g = 1 & b, h = 2 & b, i = 4 & b, j = 16 & b, k = 32 & b;
30428
-if (!h && !Ka(a)) throw new Ec();
30429
-j && !c.length && (b &= -17, j = c = !1), k && !d.length && (b &= -33, k = d = !1);
30430
-var l = a && a.__bindData__;
30431
-if (l && l !== !0) return l = n(l), l[2] && (l[2] = n(l[2])), l[3] && (l[3] = n(l[3])), !g || 1 & l[1] || (l[4] = e), !g && 1 & l[1] && (b |= 8), !i || 4 & l[1] || (l[5] = f), j && Sc.apply(l[2] || (l[2] = []), c), k && Wc.apply(l[3] || (l[3] = []), d), l[1] |= b, ma.apply(null, l);
30432
-var m = 1 == b || 17 === b ? w :da;
30433
-return m([ a, b, c, d, e, f ]);
30434
-}
30435
-function na() {
30436
-Z.shadowedProps = K, Z.array = Z.bottom = Z.loop = Z.top = "", Z.init = "iterable", Z.useHas = !0;
30437
-for (var a, b = 0; a = arguments[b]; b++) for (var c in a) Z[c] = a[c];
30438
-var d = Z.args;
30439
-Z.firstArg = /^[^,]+/.exec(d)[0];
30440
-var e = yc("baseCreateCallback, errorClass, errorProto, hasOwnProperty, indicatorObject, isArguments, isArray, isString, keys, objectProto, objectTypes, nonEnumProps, stringClass, stringProto, toString", "return function(" + d + ") {\n" + id(Z) + "\n}");
30441
-return e(ca, Q, Gc, Rc, t, ta, kd, Qa, Z.keys, Hc, $, gd, V, Ic, Kc);
30442
-}
30443
-function oa(a) {
30444
-return qd[a];
30445
-}
30446
-function pa() {
30447
-var b = (b = q.indexOf) === yb ? a :b;
30448
-return b;
30316
+function db(a) {
30317
+for (var b = -1, c = a.length, d = Cg; ++b < c; ) {
30318
+var e = a[b];
30319
+e > d && (d = e);
30449 30320
 }
30450
-function qa(a) {
30451
-return "function" == typeof a && Lc.test(a);
30321
+return d;
30452 30322
 }
30453
-function ra(a) {
30454
-var b, c;
30455
-return !a || Kc.call(a) != T || (b = a.constructor, Ka(b) && !(b instanceof b)) || !hd.argsClass && ta(a) || !hd.nodeClass && j(a) ? !1 :hd.ownLast ? (xd(a, function(a, b, d) {
30456
-return c = Rc.call(d, b), !1;
30457
-}), c !== !1) :(xd(a, function(a, b) {
30458
-c = b;
30459
-}), "undefined" == typeof c || Rc.call(a, c));
30323
+function eb(a) {
30324
+for (var b = -1, c = a.length, d = Dg; ++b < c; ) {
30325
+var e = a[b];
30326
+d > e && (d = e);
30460 30327
 }
30461
-function sa(a) {
30462
-return rd[a];
30328
+return d;
30463 30329
 }
30464
-function ta(a) {
30465
-return a && "object" == typeof a && "number" == typeof a.length && Kc.call(a) == M || !1;
30330
+function fb(a, b, c, d) {
30331
+var e = -1, f = a.length;
30332
+for (d && f && (c = a[++e]); ++e < f; ) c = b(c, a[e], e, a);
30333
+return c;
30466 30334
 }
30467
-function ua(a, b, c, d) {
30468
-return "boolean" != typeof b && null != b && (d = c, c = b, b = !1), _(a, b, "function" == typeof c && ca(c, d, 1));
30335
+function gb(a, b, c, d) {
30336
+var e = a.length;
30337
+for (d && e && (c = a[--e]); e--; ) c = b(c, a[e], e, a);
30338
+return c;
30469 30339
 }
30470
-function va(a, b, c) {
30471
-return _(a, !0, "function" == typeof b && ca(b, c, 1));
30340
+function hb(a, b) {
30341
+for (var c = -1, d = a.length; ++c < d; ) if (b(a[c], c, a)) return !0;
30342
+return !1;
30472 30343
 }
30473
-function wa(a, b) {
30474
-var c = ba(a);
30475
-return b ? vd(c, b) :c;
30344
+function ib(a, b) {
30345
+return "undefined" == typeof a ? b :a;
30476 30346
 }
30477
-function xa(a, b, c) {
30478
-var d;
30479
-return b = q.createCallback(b, c, 3), yd(a, function(a, c, e) {
30480
-return b(a, c, e) ? (d = c, !1) :void 0;
30481
-}), d;
30347
+function jb(a, b, c, d) {
30348
+return "undefined" != typeof a && _f.call(d, c) ? a :b;
30482 30349
 }
30483
-function ya(a, b, c) {
30484
-var d;
30485
-return b = q.createCallback(b, c, 3), Aa(a, function(a, c, e) {
30486
-return b(a, c, e) ? (d = c, !1) :void 0;
30487
-}), d;
30350
+function kb(a, b, c) {
30351
+var d = _g(b);
30352
+if (!c) return mb(b, a, d);
30353
+for (var e = -1, f = d.length; ++e < f; ) {
30354
+var g = d[e], h = a[g], i = c(h, b[g], g, a, b);
30355
+(i === i ? i === h :h !== h) && ("undefined" != typeof h || g in a) || (a[g] = i);
30488 30356
 }
30489
-function za(a, b, c) {
30490
-var d = [];
30491
-xd(a, function(a, b) {
30492
-d.push(b, a);
30493
-});
30494
-var e = d.length;
30495
-for (b = ca(b, c, 3); e-- && b(d[e--], d[e], a) !== !1; ) ;
30496 30357
 return a;
30497 30358
 }
30498
-function Aa(a, b, c) {
30499
-var d = md(a), e = d.length;
30500
-for (b = ca(b, c, 3); e--; ) {
30501
-var f = d[e];
30502
-if (b(a[f], f, a) === !1) break;
30359
+function lb(a, b) {
30360
+for (var c = -1, d = a.length, e = yc(d), f = b.length, g = Mf(f); ++c < f; ) {
30361
+var h = b[c];
30362
+e ? (h = parseFloat(h), g[c] = wc(h, d) ? a[h] :v) :g[c] = a[h];
30363
+}
30364
+return g;
30365
+}
30366
+function mb(a, b, c) {
30367
+c || (c = b, b = {});
30368
+for (var d = -1, e = c.length; ++d < e; ) {
30369
+var f = c[d];
30370
+b[f] = a[f];
30371
+}
30372
+return b;
30373
+}
30374
+function nb(a, b) {
30375
+for (var c = -1, d = b.length; ++c < d; ) {
30376
+var e = b[c];
30377
+a[e] = kc(a[e], x, a);
30503 30378
 }
30504 30379
 return a;
30505 30380
 }
30506
-function Ba(a) {
30507
-var b = [];
30508
-return xd(a, function(a, c) {
30509
-Ka(a) && b.push(c);
30510
-}), b.sort();
30381
+function ob(a, b, c) {
30382
+var d = typeof a;
30383
+return "function" == d ? "undefined" != typeof b && vc(a) ? Zb(a, b, c) :a :null == a ? Bf :"object" == d ? Kb(a) :"undefined" == typeof b ? Ob(a + "") :Lb(a + "", b);
30511 30384
 }
30512
-function Ca(a, b) {
30513
-return a ? Rc.call(a, b) :!1;
30385
+function pb(a, b, c, d, e, f, g) {
30386
+var h;
30387
+if (c && (h = e ? c(a, d, e) :c(a)), "undefined" != typeof h) return h;
30388
+if (!Ae(a)) return a;
30389
+var i = Xg(a);
30390
+if (i) {
30391
+if (h = sc(a), !b) return Za(a, h);
30392
+} else {
30393
+var j = bg.call(a), k = j == U;
30394
+if (j != X && j != P && (!k || e)) return Ka[j] ? uc(a, j, b) :e ? a :{};
30395
+if (h = tc(k ? {} :a), !b) return mb(a, h, _g(a));
30396
+}
30397
+f || (f = []), g || (g = []);
30398
+for (var l = f.length; l--; ) if (f[l] == a) return g[l];
30399
+return f.push(a), g.push(h), (i ? $a :Cb)(a, function(d, e) {
30400
+h[e] = pb(d, b, c, e, a, f, g);
30401
+}), h;
30514 30402
 }
30515
-function Da(a) {
30516
-for (var b = -1, c = md(a), d = c.length, e = {}; ++b < d; ) {
30517
-var f = c[b];
30518
-e[a[f]] = f;
30403
+function qb(a, b, c, d) {
30404
+if ("function" != typeof a) throw new Vf(N);
30405
+return ng(function() {
30406
+a.apply(v, Sb(c, d));
30407
+}, b);
30408
+}
30409
+function rb(a, c) {
30410
+var d = a ? a.length :0, e = [];
30411
+if (!d) return e;
30412
+var f = -1, g = qc(), h = g == b, i = h && c.length >= 200 && Ng(c), j = c.length;
30413
+i && (g = Xa, h = !1, c = i);
30414
+a:for (;++f < d; ) {
30415
+var k = a[f];
30416
+if (h && k === k) {
30417
+for (var l = j; l--; ) if (c[l] === k) continue a;
30418
+e.push(k);
30419
+} else g(c, k) < 0 && e.push(k);
30519 30420
 }
30520 30421
 return e;
30521 30422
 }
30522
-function Ea(a) {
30523
-return a === !0 || a === !1 || a && "object" == typeof a && Kc.call(a) == O || !1;
30423
+function sb(a, b) {
30424
+var c = a ? a.length :0;
30425
+if (!yc(c)) return Cb(a, b);
30426
+for (var d = -1, e = Hc(a); ++d < c && b(e[d], d, e) !== !1; ) ;
30427
+return a;
30524 30428
 }
30525
-function Fa(a) {
30526
-return a && "object" == typeof a && Kc.call(a) == P || !1;
30429
+function tb(a, b) {
30430
+var c = a ? a.length :0;
30431
+if (!yc(c)) return Db(a, b);
30432
+for (var d = Hc(a); c-- && b(d[c], c, d) !== !1; ) ;
30433
+return a;
30527 30434
 }
30528
-function Ga(a) {
30529
-return a && 1 === a.nodeType || !1;
30435
+function ub(a, b) {
30436
+var c = !0;
30437
+return sb(a, function(a, d, e) {
30438
+return c = !!b(a, d, e);
30439
+}), c;
30530 30440
 }
30531
-function Ha(a) {
30532
-var b = !0;
30533
-if (!a) return b;
30534
-var c = Kc.call(a), d = a.length;
30535
-return c == N || c == V || (hd.argsClass ? c == M :ta(a)) || c == T && "number" == typeof d && Ka(a.splice) ? !d :(yd(a, function() {
30536
-return b = !1;
30537
-}), b);
30441
+function vb(a, b, c, d) {
30442
+var e = a.length;
30443
+for (c = null == c ? 0 :+c || 0, 0 > c && (c = -c > e ? 0 :e + c), d = "undefined" == typeof d || d > e ? e :+d || 0, 0 > d && (d += e), e = c > d ? 0 :d >>> 0, c >>>= 0; e > c; ) a[c++] = b;
30444
+return a;
30538 30445
 }
30539
-function Ia(a, b, c, d) {
30540
-return ha(a, b, "function" == typeof c && ca(c, d, 2));
30446
+function wb(a, b) {
30447
+var c = [];
30448
+return sb(a, function(a, d, e) {
30449
+b(a, d, e) && c.push(a);
30450
+}), c;
30541 30451
 }
30542
-function Ja(a) {
30543
-return $c(a) && !_c(parseFloat(a));
30452
+function xb(a, b, c, d) {
30453
+var e;
30454
+return c(a, function(a, c, f) {
30455
+return b(a, c, f) ? (e = d ? c :a, !1) :void 0;
30456
+}), e;
30544 30457
 }
30545
-function Ka(a) {
30546
-return "function" == typeof a;
30458
+function yb(a, b, c, d) {
30459
+for (var e = (d || 0) - 1, f = a.length, g = -1, h = []; ++e < f; ) {
30460
+var i = a[e];
30461
+if (n(i) && yc(i.length) && (Xg(i) || se(i))) {
30462
+b && (i = yb(i, b, c));
30463
+var j = -1, k = i.length;
30464
+for (h.length += k; ++j < k; ) h[++g] = i[j];
30465
+} else c || (h[++g] = i);
30547 30466
 }
30548
-function La(a) {
30549
-return !(!a || !$[typeof a]);
30467
+return h;
30550 30468
 }
30551
-function Ma(a) {
30552
-return Oa(a) && a != +a;
30469
+function zb(a, b, c) {
30470
+for (var d = -1, e = Hc(a), f = c(a), g = f.length; ++d < g; ) {
30471
+var h = f[d];
30472
+if (b(e[h], h, e) === !1) break;
30553 30473
 }
30554
-function Na(a) {
30555
-return null === a;
30474
+return a;
30556 30475
 }
30557
-function Oa(a) {
30558
-return "number" == typeof a || a && "object" == typeof a && Kc.call(a) == S || !1;
30476
+function Ab(a, b, c) {
30477
+for (var d = Hc(a), e = c(a), f = e.length; f--; ) {
30478
+var g = e[f];
30479
+if (b(d[g], g, d) === !1) break;
30559 30480
 }
30560
-function Pa(a) {
30561
-return a && $[typeof a] && Kc.call(a) == U || !1;
30481
+return a;
30562 30482
 }
30563
-function Qa(a) {
30564
-return "string" == typeof a || a && "object" == typeof a && Kc.call(a) == V || !1;
30483
+function Bb(a, b) {
30484
+return zb(a, b, Xe);
30565 30485
 }
30566
-function Ra(a) {
30567
-return "undefined" == typeof a;
30486
+function Cb(a, b) {
30487
+return zb(a, b, _g);
30568 30488
 }
30569
-function Sa(a, b, c) {
30570
-var d = {};
30571
-return b = q.createCallback(b, c, 3), yd(a, function(a, c, e) {
30572
-d[c] = b(a, c, e);
30573
-}), d;
30489
+function Db(a, b) {
30490
+return Ab(a, b, _g);
30574 30491
 }
30575
-function Ta(a) {
30576
-var b = arguments, c = 2;
30577
-if (!La(a)) return a;
30578
-if ("number" != typeof b[2] && (c = b.length), c > 3 && "function" == typeof b[c - 2]) var d = ca(b[--c - 1], b[c--], 2); else c > 2 && "function" == typeof b[c - 1] && (d = b[--c]);
30579
-for (var e = n(arguments, 1, c), f = -1, g = h(), i = h(); ++f < c; ) ia(a, e[f], d, g, i);
30580
-return l(g), l(i), a;
30492
+function Eb(a, b) {
30493
+for (var c = -1, d = b.length, e = -1, f = []; ++c < d; ) {
30494
+var g = b[c];
30495
+ze(a[g]) && (f[++e] = g);
30581 30496
 }
30582
-function Ua(a, b, c) {
30583
-var d = {};
30584
-if ("function" != typeof b) {
30585
-var e = [];
30586
-xd(a, function(a, b) {
30587
-e.push(b);
30588
-}), e = ea(e, ga(arguments, !0, !1, 1));
30589
-for (var f = -1, g = e.length; ++f < g; ) {
30590
-var h = e[f];
30591
-d[h] = a[h];
30497
+return f;
30592 30498
 }
30593
-} else b = q.createCallback(b, c, 3), xd(a, function(a, c, e) {
30594
-b(a, c, e) || (d[c] = a);
30595
-});
30596
-return d;
30499
+function Fb(a, b, c) {
30500
+var d = -1, e = "function" == typeof b, f = a ? a.length :0, g = yc(f) ? Mf(f) :[];
30501
+return sb(a, function(a) {
30502
+var f = e ? b :null != a && a[b];
30503
+g[++d] = f ? f.apply(a, c) :v;
30504
+}), g;
30597 30505
 }
30598
-function Va(a) {
30599
-for (var b = -1, c = md(a), d = c.length, e = uc(d); ++b < d; ) {
30600
-var f = c[b];
30601
-e[b] = [ f, a[f] ];
30506
+function Gb(a, b, c, d, e, f) {
30507
+if (a === b) return 0 !== a || 1 / a == 1 / b;
30508
+var g = typeof a, h = typeof b;
30509
+return "function" != g && "object" != g && "function" != h && "object" != h || null == a || null == b ? a !== a && b !== b :Hb(a, b, Gb, c, d, e, f);
30510
+}
30511
+function Hb(a, b, c, d, e, f, g) {
30512
+var h = Xg(a), i = Xg(b), j = Q, k = Q;
30513
+h || (j = bg.call(a), j == P ? j = X :j != X && (h = Ie(a))), i || (k = bg.call(b), k == P ? k = X :k != X && (i = Ie(b)));
30514
+var l = j == X, m = k == X, n = j == k;
30515
+if (n && !h && !l) return mc(a, b, j);
30516
+var o = l && _f.call(a, "__wrapped__"), p = m && _f.call(b, "__wrapped__");
30517
+if (o || p) return c(o ? a.value() :a, p ? b.value() :b, d, e, f, g);
30518
+if (!n) return !1;
30519
+f || (f = []), g || (g = []);
30520
+for (var q = f.length; q--; ) if (f[q] == a) return g[q] == b;
30521
+f.push(a), g.push(b);
30522
+var r = (h ? lc :nc)(a, b, c, d, e, f, g);
30523
+return f.pop(), g.pop(), r;
30524
+}
30525
+function Ib(a, b, c, d, e) {
30526
+var f = b.length;
30527
+if (null == a) return !f;
30528
+for (var g = -1, h = !e; ++g < f; ) if (h && d[g] ? c[g] !== a[b[g]] :!_f.call(a, b[g])) return !1;
30529
+for (g = -1; ++g < f; ) {
30530
+var i = b[g];
30531
+if (h && d[g]) var j = _f.call(a, i); else {
30532
+var k = a[i], l = c[g];
30533
+j = e ? e(k, l, i) :v, "undefined" == typeof j && (j = Gb(l, k, e, !0));
30534
+}
30535
+if (!j) return !1;
30602 30536
 }
30603
-return e;
30537
+return !0;
30604 30538
 }
30605
-function Wa(a, b, c) {
30606
-var d = {};
30607
-if ("function" != typeof b) for (var e = -1, f = ga(arguments, !0, !1, 1), g = La(a) ? f.length :0; ++e < g; ) {
30608
-var h = f[e];
30609
-h in a && (d[h] = a[h]);
30610
-} else b = q.createCallback(b, c, 3), xd(a, function(a, c, e) {
30611
-b(a, c, e) && (d[c] = a);
30612
-});
30613
-return d;
30539
+function Jb(a, b) {
30540
+var c = [];
30541
+return sb(a, function(a, d, e) {
30542
+c.push(b(a, d, e));
30543
+}), c;
30614 30544
 }
30615
-function Xa(a, b, c, d) {
30616
-var e = kd(a);
30617
-if (null == c) if (e) c = []; else {
30618
-var f = a && a.constructor, g = f && f.prototype;
30619
-c = ba(g);
30545
+function Kb(a) {
30546
+var b = _g(a), c = b.length;
30547
+if (1 == c) {
30548
+var d = b[0], e = a[d];
30549
+if (zc(e)) return function(a) {
30550
+return null != a && a[d] === e && _f.call(a, d);
30551
+};
30552
+}
30553
+for (var f = Mf(c), g = Mf(c); c--; ) e = a[b[c]], f[c] = e, g[c] = zc(e);
30554
+return function(a) {
30555
+return Ib(a, b, f, g);
30556
+};
30557
+}
30558
+function Lb(a, b) {
30559
+return zc(b) ? function(c) {
30560
+return null != c && c[a] === b;
30561
+} :function(c) {
30562
+return null != c && Gb(b, c[a], null, !0);
30563
+};
30564
+}
30565
+function Mb(a, b, c, d, e) {
30566
+var f = yc(b.length) && (Xg(b) || Ie(b));
30567
+return (f ? $a :Cb)(b, function(b, g, h) {
30568
+if (n(b)) return d || (d = []), e || (e = []), Nb(a, h, g, Mb, c, d, e);
30569
+var i = a[g], j = c ? c(i, b, g, a, h) :v, k = "undefined" == typeof j;
30570
+k && (j = b), !f && "undefined" == typeof j || !k && (j === j ? j === i :i !== i) || (a[g] = j);
30571
+}), a;
30572
+}
30573
+function Nb(a, b, c, d, e, f, g) {
30574
+for (var h = f.length, i = b[c]; h--; ) if (f[h] == i) return void (a[c] = g[h]);
30575
+var j = a[c], k = e ? e(j, i, c, a, b) :v, l = "undefined" == typeof k;
30576
+l && (k = i, yc(i.length) && (Xg(i) || Ie(i)) ? k = Xg(j) ? j :j ? Za(j) :[] :Zg(i) || se(i) ? k = se(j) ? Le(j) :Zg(j) ? j :{} :l = !1), f.push(i), g.push(k), l ? a[c] = d(k, i, e, f, g) :(k === k ? k !== j :j === j) && (a[c] = k);
30577
+}
30578
+function Ob(a) {
30579
+return function(b) {
30580
+return null == b ? v :b[a];
30581
+};
30582
+}
30583
+function Pb(b, c) {
30584
+var d = c.length, e = lb(b, c);
30585
+for (c.sort(a); d--; ) {
30586
+var f = parseFloat(c[d]);
30587
+if (f != g && wc(f)) {
30588
+var g = f;
30589
+og.call(b, f, 1);
30620 30590
 }
30621
-return b && (b = q.createCallback(b, d, 4), (e ? ud :yd)(a, function(a, d, e) {
30622
-return b(c, a, d, e);
30623
-})), c;
30624 30591
 }
30625
-function Ya(a) {
30626
-for (var b = -1, c = md(a), d = c.length, e = uc(d); ++b < d; ) e[b] = a[c[b]];
30627 30592
 return e;
30628 30593
 }
30629
-function Za(a) {
30630
-var b = arguments, c = -1, d = ga(b, !0, !1, 1), e = b[2] && b[2][b[1]] === a ? 1 :d.length, f = uc(e);
30631
-for (hd.unindexedChars && Qa(a) && (a = a.split("")); ++c < e; ) f[c] = a[d[c]];
30594
+function Qb(a, b) {
30595
+return a + ig(Bg() * (b - a + 1));
30596
+}
30597
+function Rb(a, b, c, d, e) {
30598
+return e(a, function(a, e, f) {
30599
+c = d ? (d = !1, a) :b(c, a, e, f);
30600
+}), c;
30601
+}
30602
+function Sb(a, b, c) {
30603
+var d = -1, e = a.length;
30604
+b = null == b ? 0 :+b || 0, 0 > b && (b = -b > e ? 0 :e + b), c = "undefined" == typeof c || c > e ? e :+c || 0, 0 > c && (c += e), e = b > c ? 0 :c - b >>> 0, b >>>= 0;
30605
+for (var f = Mf(e); ++d < e; ) f[d] = a[d + b];
30632 30606
 return f;
30633 30607
 }
30634
-function $a(a, b, c) {
30635
-var d = -1, e = pa(), f = a ? a.length :0, g = !1;
30636
-return c = (0 > c ? bd(0, f + c) :c) || 0, kd(a) ? g = e(a, b, c) > -1 :"number" == typeof f ? g = (Qa(a) ? a.indexOf(b, c) :e(a, b, c)) > -1 :ud(a, function(a) {
30637
-return ++d >= c ? !(g = a === b) :void 0;
30638
-}), g;
30608
+function Tb(a, b) {
30609
+var c;
30610
+return sb(a, function(a, d, e) {
30611
+return c = b(a, d, e), !c;
30612
+}), !!c;
30613
+}
30614
+function Ub(a, c) {
30615
+var d = -1, e = qc(), f = a.length, g = e == b, h = g && f >= 200, i = h && Ng(), j = [];
30616
+i ? (e = Xa, g = !1) :(h = !1, i = c ? [] :j);
30617
+a:for (;++d < f; ) {
30618
+var k = a[d], l = c ? c(k, d, a) :k;
30619
+if (g && k === k) {
30620
+for (var m = i.length; m--; ) if (i[m] === l) continue a;
30621
+c && i.push(l), j.push(k);
30622
+} else e(i, l) < 0 && ((c || h) && i.push(l), j.push(k));
30639 30623
 }
30640
-function _a(a, b, c) {
30641
-var d = !0;
30642
-if (b = q.createCallback(b, c, 3), kd(a)) for (var e = -1, f = a.length; ++e < f && (d = !!b(a[e], e, a)); ) ; else ud(a, function(a, c, e) {
30643
-return d = !!b(a, c, e);
30644
-});
30645
-return d;
30624
+return j;
30646 30625
 }
30647
-function ab(a, b, c) {
30648
-var d = [];
30649
-if (b = q.createCallback(b, c, 3), kd(a)) for (var e = -1, f = a.length; ++e < f; ) {
30650
-var g = a[e];
30651
-b(g, e, a) && d.push(g);
30652
-} else ud(a, function(a, c, e) {
30653
-b(a, c, e) && d.push(a);
30654
-});
30655
-return d;
30626
+function Vb(a, b) {
30627
+for (var c = -1, d = b.length, e = Mf(d); ++c < d; ) e[c] = a[b[c]];
30628
+return e;
30656 30629
 }
30657
-function bb(a, b, c) {
30658
-if (b = q.createCallback(b, c, 3), !kd(a)) {
30659
-var d;
30660
-return ud(a, function(a, c, e) {
30661
-return b(a, c, e) ? (d = a, !1) :void 0;
30662
-}), d;
30630
+function Wb(a, b) {
30631
+var c = a;
30632
+c instanceof _ && (c = c.value());
30633
+for (var d = -1, e = b.length; ++d < e; ) {
30634
+var f = [ c ], g = b[d];
30635
+kg.apply(f, g.args), c = g.func.apply(g.thisArg, f);
30663 30636
 }
30664
-for (var e = -1, f = a.length; ++e < f; ) {
30665
-var g = a[e];
30666
-if (b(g, e, a)) return g;
30637
+return c;
30667 30638
 }
30639
+function Xb(a, b, c) {
30640
+var d = 0, e = a ? a.length :d;
30641
+if ("number" == typeof b && b === b && Gg >= e) {
30642
+for (;e > d; ) {
30643
+var f = d + e >>> 1, g = a[f];
30644
+(c ? b >= g :b > g) ? d = f + 1 :e = f;
30668 30645
 }
30669
-function cb(a, b, c) {
30670
-var d;
30671
-return b = q.createCallback(b, c, 3), eb(a, function(a, c, e) {
30672
-return b(a, c, e) ? (d = a, !1) :void 0;
30673
-}), d;
30646
+return e;
30674 30647
 }
30675
-function db(a, b, c) {
30676
-if (b && "undefined" == typeof c && kd(a)) for (var d = -1, e = a.length; ++d < e && b(a[d], d, a) !== !1; ) ; else ud(a, b, c);
30677
-return a;
30648
+return Yb(a, b, Bf, c);
30678 30649
 }
30679
-function eb(a, b, c) {
30680
-var d = a, e = a ? a.length :0;
30681
-if (b = b && "undefined" == typeof c ? b :ca(b, c, 3), kd(a)) for (;e-- && b(a[e], e, a) !== !1; ) ; else {
30682
-if ("number" != typeof e) {
30683
-var f = md(a);
30684
-e = f.length;
30685
-} else hd.unindexedChars && Qa(a) && (d = a.split(""));
30686
-ud(a, function(a, c, g) {
30687
-return c = f ? f[--e] :--e, b(d[c], c, g);
30688
-});
30650
+function Yb(a, b, c, d) {
30651
+b = c(b);
30652
+for (var e = 0, f = a ? a.length :0, g = b !== b, h = "undefined" == typeof b; f > e; ) {
30653
+var i = ig((e + f) / 2), j = c(a[i]), k = j === j;
30654
+if (g) var l = k || d; else l = h ? k && (d || "undefined" != typeof j) :d ? b >= j :b > j;
30655
+l ? e = i + 1 :f = i;
30689 30656
 }
30690
-return a;
30657
+return xg(f, Fg);
30691 30658
 }
30692
-function fb(a, b) {
30693
-var c = n(arguments, 2), d = -1, e = "function" == typeof b, f = a ? a.length :0, g = uc("number" == typeof f ? f :0);
30694
-return db(a, function(a) {
30695
-g[++d] = (e ? b :a[b]).apply(a, c);
30696
-}), g;
30659
+function Zb(a, b, c) {
30660
+if ("function" != typeof a) return Bf;
30661
+if ("undefined" == typeof b) return a;
30662
+switch (c) {
30663
+case 1:
30664
+return function(c) {
30665
+return a.call(b, c);
30666
+};
30667
+
30668
+case 3:
30669
+return function(c, d, e) {
30670
+return a.call(b, c, d, e);
30671
+};
30672
+
30673
+case 4:
30674
+return function(c, d, e, f) {
30675
+return a.call(b, c, d, e, f);
30676
+};
30677
+
30678
+case 5:
30679
+return function(c, d, e, f, g) {
30680
+return a.call(b, c, d, e, f, g);
30681
+};
30682
+}
30683
+return function() {
30684
+return a.apply(b, arguments);
30685
+};
30686
+}
30687
+function $b(a) {
30688
+return fg.call(a, 0);
30689
+}
30690
+function _b(a, b, c) {
30691
+for (var d = c.length, e = -1, f = wg(a.length - d, 0), g = -1, h = b.length, i = Mf(f + h); ++g < h; ) i[g] = b[g];
30692
+for (;++e < d; ) i[c[e]] = a[e];
30693
+for (;f--; ) i[g++] = a[e++];
30694
+return i;
30695
+}
30696
+function ac(a, b, c) {
30697
+for (var d = -1, e = c.length, f = -1, g = wg(a.length - e, 0), h = -1, i = b.length, j = Mf(g + i); ++f < g; ) j[f] = a[f];
30698
+for (var k = f; ++h < i; ) j[k + h] = b[h];
30699
+for (;++d < e; ) j[k + c[d]] = a[f++];
30700
+return j;
30697 30701
 }
30698
-function gb(a, b, c) {
30699
-var d = -1, e = a ? a.length :0, f = uc("number" == typeof e ? e :0);
30700
-if (b = q.createCallback(b, c, 3), kd(a)) for (;++d < e; ) f[d] = b(a[d], d, a); else ud(a, function(a, c, e) {
30701
-f[++d] = b(a, c, e);
30702
+function bc(a, b) {
30703
+return function(c, d, e) {
30704
+var f = b ? b() :{};
30705
+if (d = pc(d, e, 3), Xg(c)) for (var g = -1, h = c.length; ++g < h; ) {
30706
+var i = c[g];
30707
+a(f, i, d(i, g, c), c);
30708
+} else sb(c, function(b, c, e) {
30709
+a(f, b, d(b, c, e), e);
30702 30710
 });
30703 30711
 return f;
30712
+};
30704 30713
 }
30705
-function hb(a, b, c) {
30706
-var e = -(1 / 0), f = e;
30707
-if ("function" != typeof b && c && c[b] === a && (b = null), null == b && kd(a)) for (var g = -1, h = a.length; ++g < h; ) {
30708
-var i = a[g];
30709
-i > f && (f = i);
30710
-} else b = null == b && Qa(a) ? d :q.createCallback(b, c, 3), ud(a, function(a, c, d) {
30711
-var g = b(a, c, d);
30712
-g > e && (e = g, f = a);
30713
-});
30714
+function cc(a) {
30715
+return function() {
30716
+var b = arguments.length, c = arguments[0];
30717
+if (2 > b || null == c) return c;
30718
+if (b > 3 && xc(arguments[1], arguments[2], arguments[3]) && (b = 2), b > 3 && "function" == typeof arguments[b - 2]) var d = Zb(arguments[--b - 1], arguments[b--], 5); else b > 2 && "function" == typeof arguments[b - 1] && (d = arguments[--b]);
30719
+for (var e = 0; ++e < b; ) {
30720
+var f = arguments[e];
30721
+f && a(c, f, d);
30722
+}
30723
+return c;
30724
+};
30725
+}
30726
+function dc(a, b) {
30727
+function c() {
30728
+return (this instanceof c ? d :a).apply(b, arguments);
30729
+}
30730
+var d = fc(a);
30731
+return c;
30732
+}
30733
+function ec(a) {
30734
+return function(b) {
30735
+for (var c = -1, d = xf(gf(b)), e = d.length, f = ""; ++c < e; ) f = a(f, d[c], c);
30714 30736
 return f;
30737
+};
30738
+}
30739
+function fc(a) {
30740
+return function() {
30741
+var b = Lg(a.prototype), c = a.apply(b, arguments);
30742
+return Ae(c) ? c :b;
30743
+};
30744
+}
30745
+function gc(a, b) {
30746
+return function(c, d, f) {
30747
+f && xc(c, d, f) && (d = null);
30748
+var g = pc(), h = null == d;
30749
+if (g === ob && h || (h = !1, d = g(d, f, 3)), h) {
30750
+var i = Xg(c);
30751
+if (i || !He(c)) return a(i ? c :Gc(c));
30752
+d = e;
30753
+}
30754
+return oc(c, d, b);
30755
+};
30756
+}
30757
+function hc(a, b, c, d, e, f, g, h, i, j) {
30758
+function k() {
30759
+for (var u = arguments.length, v = u, w = Mf(u); v--; ) w[v] = arguments[v];
30760
+if (d && (w = _b(w, d, e)), f && (w = ac(w, f, g)), o || r) {
30761
+var z = k.placeholder, A = p(w, z);
30762
+if (u -= A.length, j > u) {
30763
+var B = h ? Za(h) :null, E = wg(j - u, 0), F = o ? A :null, G = o ? null :A, H = o ? w :null, I = o ? null :w;
30764
+b |= o ? C :D, b &= ~(o ? D :C), q || (b &= ~(x | y));
30765
+var J = hc(a, b, c, H, F, I, G, B, i, E);
30766
+return J.placeholder = z, J;
30767
+}
30768
+}
30769
+var K = m ? c :this;
30770
+return n && (a = K[t]), h && (w = Dc(w, h)), l && i < w.length && (w.length = i), (this instanceof k ? s || fc(a) :a).apply(K, w);
30771
+}
30772
+var l = b & F, m = b & x, n = b & y, o = b & A, q = b & z, r = b & B, s = !n && fc(a), t = a;
30773
+return k;
30774
+}
30775
+function ic(a, b, c) {
30776
+var d = a.length;
30777
+if (b = +b, d >= b || !ug(b)) return "";
30778
+var e = b - d;
30779
+return c = null == c ? " " :c + "", pf(c, gg(e / c.length)).slice(0, e);
30780
+}
30781
+function jc(a, b, c, d) {
30782
+function e() {
30783
+for (var b = -1, h = arguments.length, i = -1, j = d.length, k = Mf(h + j); ++i < j; ) k[i] = d[i];
30784
+for (;h--; ) k[i++] = arguments[++b];
30785
+return (this instanceof e ? g :a).apply(f ? c :this, k);
30786
+}
30787
+var f = b & x, g = fc(a);
30788
+return e;
30789
+}
30790
+function kc(a, b, c, d, e, f, g, h) {
30791
+var i = b & y;
30792
+if (!i && "function" != typeof a) throw new Vf(N);
30793
+var j = d ? d.length :0;
30794
+if (j || (b &= ~(C | D), d = e = null), j -= e ? e.length :0, b & D) {
30795
+var k = d, l = e;
30796
+d = e = null;
30797
+}
30798
+var m = !i && Og(a), n = [ a, b, c, d, e, k, l, f, g, h ];
30799
+if (m && m !== !0 && (Ac(n, m), b = n[1], h = n[9]), n[9] = null == h ? i ? 0 :a.length :wg(h - j, 0) || 0, b == x) var o = dc(n[0], n[2]); else o = b != C && b != (x | C) || n[4].length ? hc.apply(v, n) :jc.apply(v, n);
30800
+var p = m ? Mg :Pg;
30801
+return p(o, n);
30802
+}
30803
+function lc(a, b, c, d, e, f, g) {
30804
+var h = -1, i = a.length, j = b.length, k = !0;
30805
+if (i != j && !(e && j > i)) return !1;
30806
+for (;k && ++h < i; ) {
30807
+var l = a[h], m = b[h];
30808
+if (k = v, d && (k = e ? d(m, l, h) :d(l, m, h)), "undefined" == typeof k) if (e) for (var n = j; n-- && (m = b[n], !(k = l && l === m || c(l, m, d, e, f, g))); ) ; else k = l && l === m || c(l, m, d, e, f, g);
30809
+}
30810
+return !!k;
30811
+}
30812
+function mc(a, b, c) {
30813
+switch (c) {
30814
+case R:
30815
+case S:
30816
+return +a == +b;
30817
+
30818
+case T:
30819
+return a.name == b.name && a.message == b.message;
30820
+
30821
+case W:
30822
+return a != +a ? b != +b :0 == a ? 1 / a == 1 / b :a == +b;
30823
+
30824
+case Y:
30825
+case $:
30826
+return a == b + "";
30827
+}
30828
+return !1;
30829
+}
30830
+function nc(a, b, c, d, e, f, g) {
30831
+var h = _g(a), i = h.length, j = _g(b), k = j.length;
30832
+if (i != k && !e) return !1;
30833
+for (var l, m = -1; ++m < i; ) {
30834
+var n = h[m], o = _f.call(b, n);
30835
+if (o) {
30836
+var p = a[n], q = b[n];
30837
+o = v, d && (o = e ? d(q, p, n) :d(p, q, n)), "undefined" == typeof o && (o = p && p === q || c(p, q, d, e, f, g));
30838
+}
30839
+if (!o) return !1;
30840
+l || (l = "constructor" == n);
30841
+}
30842
+if (!l) {
30843
+var r = a.constructor, s = b.constructor;
30844
+if (r != s && "constructor" in a && "constructor" in b && !("function" == typeof r && r instanceof r && "function" == typeof s && s instanceof s)) return !1;
30845
+}
30846
+return !0;
30847
+}
30848
+function oc(a, b, c) {
30849
+var d = c ? Dg :Cg, e = d, f = e;
30850
+return sb(a, function(a, g, h) {
30851
+var i = b(a, g, h);
30852
+((c ? e > i :i > e) || i === d && i === f) && (e = i, f = a);
30853
+}), f;
30854
+}
30855
+function pc(a, b, c) {
30856
+var d = V.callback || zf;
30857
+return d = d === zf ? ob :d, c ? d(a, b, c) :d;
30858
+}
30859
+function qc(a, c, d) {
30860
+var e = V.indexOf || Wc;
30861
+return e = e === Wc ? b :e, a ? e(a, c, d) :e;
30862
+}
30863
+function rc(a, b, c) {
30864
+for (var d = -1, e = c ? c.length :0; ++d < e; ) {
30865
+var f = c[d], g = f.size;
30866
+switch (f.type) {
30867
+case "drop":
30868
+a += g;
30869
+break;
30870
+
30871
+case "dropRight":
30872
+b -= g;
30873
+break;
30874
+
30875
+case "take":
30876
+b = xg(b, a + g);
30877
+break;
30878
+
30879
+case "takeRight":
30880
+a = wg(a, b - g);
30881
+}
30882
+}
30883
+return {
30884
+start:a,
30885
+end:b
30886
+};
30887
+}
30888
+function sc(a) {
30889
+var b = a.length, c = new a.constructor(b);
30890
+return b && "string" == typeof a[0] && _f.call(a, "index") && (c.index = a.index, c.input = a.input), c;
30891
+}
30892
+function tc(a) {
30893
+var b = a.constructor;
30894
+return "function" == typeof b && b instanceof b || (b = Sf), new b();
30895
+}
30896
+function uc(a, b, c) {
30897
+var d = a.constructor;
30898
+switch (b) {
30899
+case aa:
30900
+return $b(a);
30901
+
30902
+case R:
30903
+case S:
30904
+return new d(+a);
30905
+
30906
+case ba:
30907
+case ca:
30908
+case da:
30909
+case ea:
30910
+case fa:
30911
+case ga:
30912
+case ha:
30913
+case ia:
30914
+case ja:
30915
+var e = a.buffer;
30916
+return new d(c ? $b(e) :e, a.byteOffset, a.length);
30917
+
30918
+case W:
30919
+case $:
30920
+return new d(a);
30921
+
30922
+case Y:
30923
+var f = new d(a.source, va.exec(a));
30924
+f.lastIndex = a.lastIndex;
30715 30925
 }
30716
-function ib(a, b, c) {
30717
-var e = 1 / 0, f = e;
30718
-if ("function" != typeof b && c && c[b] === a && (b = null), null == b && kd(a)) for (var g = -1, h = a.length; ++g < h; ) {
30719
-var i = a[g];
30720
-f > i && (f = i);
30721
-} else b = null == b && Qa(a) ? d :q.createCallback(b, c, 3), ud(a, function(a, c, d) {
30722
-var g = b(a, c, d);
30723
-e > g && (e = g, f = a);
30724
-});
30725 30926
 return f;
30726 30927
 }
30727
-function jb(a, b, c, d) {
30728
-var e = arguments.length < 3;
30729
-if (b = q.createCallback(b, d, 4), kd(a)) {
30730
-var f = -1, g = a.length;
30731
-for (e && (c = a[++f]); ++f < g; ) c = b(c, a[f], f, a);
30732
-} else ud(a, function(a, d, f) {
30733
-c = e ? (e = !1, a) :b(c, a, d, f);
30734
-});
30928
+function vc(a) {
30929
+var b = V.support, c = !(b.funcNames ? a.name :b.funcDecomp);
30930
+if (!c) {
30931
+var d = Zf.call(a);
30932
+b.funcNames || (c = !wa.test(d)), c || (c = Da.test(d) || De(a), Mg(a, c));
30933
+}
30735 30934
 return c;
30736 30935
 }
30737
-function kb(a, b, c, d) {
30738
-var e = arguments.length < 3;
30739
-return b = q.createCallback(b, d, 4), eb(a, function(a, d, f) {
30740
-c = e ? (e = !1, a) :b(c, a, d, f);
30936
+function wc(a, b) {
30937
+return a = +a, b = null == b ? Ig :b, a > -1 && a % 1 == 0 && b > a;
30938
+}
30939
+function xc(a, b, c) {
30940
+if (!Ae(c)) return !1;
30941
+var d = typeof b;
30942
+if ("number" == d) var e = c.length, f = yc(e) && wc(b, e); else f = "string" == d && b in c;
30943
+return f && c[b] === a;
30944
+}
30945
+function yc(a) {
30946
+return "number" == typeof a && a > -1 && a % 1 == 0 && Ig >= a;
30947
+}
30948
+function zc(a) {
30949
+return a === a && (0 === a ? 1 / a > 0 :!Ae(a));
30950
+}
30951
+function Ac(a, b) {
30952
+var c = a[1], d = b[1], e = c | d, f = F | E, g = x | y, h = f | g | z | B, i = c & F && !(d & F), j = c & E && !(d & E), k = (j ? a :b)[7], l = (i ? a :b)[8], m = !(c >= E && d > g || c > g && d >= E), n = e >= f && h >= e && (E > c || (j || i) && k.length <= l);
30953
+if (!m && !n) return a;
30954
+d & x && (a[2] = b[2], e |= c & x ? 0 :z);
30955
+var o = b[3];
30956
+if (o) {
30957
+var q = a[3];
30958
+a[3] = q ? _b(q, o, b[4]) :Za(o), a[4] = q ? p(a[3], O) :Za(b[4]);
30959
+}
30960
+return o = b[5], o && (q = a[5], a[5] = q ? ac(q, o, b[6]) :Za(o), a[6] = q ? p(a[5], O) :Za(b[6])), o = b[7], o && (a[7] = Za(o)), d & F && (a[8] = null == a[8] ? b[8] :xg(a[8], b[8])), null == a[9] && (a[9] = b[9]), a[0] = b[0], a[1] = e, a;
30961
+}
30962
+function Bc(a, b) {
30963
+a = Hc(a);
30964
+for (var c = -1, d = b.length, e = {}; ++c < d; ) {
30965
+var f = b[c];
30966
+f in a && (e[f] = a[f]);
30967
+}
30968
+return e;
30969
+}
30970
+function Cc(a, b) {
30971
+var c = {};
30972
+return Bb(a, function(a, d, e) {
30973
+b(a, d, e) && (c[d] = a);
30741 30974
 }), c;
30742 30975
 }
30743
-function lb(a, b, c) {
30744
-return b = q.createCallback(b, c, 3), ab(a, function(a, c, d) {
30745
-return !b(a, c, d);
30746
-});
30976
+function Dc(a, b) {
30977
+for (var c = a.length, d = xg(b.length, c), e = Za(a); d--; ) {
30978
+var f = b[d];
30979
+a[d] = wc(f, c) ? e[f] :v;
30747 30980
 }
30748
-function mb(a, b, c) {
30749
-if (a && "number" != typeof a.length ? a = Ya(a) :hd.unindexedChars && Qa(a) && (a = a.split("")), null == b || c) return a ? a[ja(0, a.length - 1)] :p;
30750
-var d = nb(a);
30751
-return d.length = cd(bd(0, b), d.length), d;
30752
-}
30753
-function nb(a) {
30754
-var b = -1, c = a ? a.length :0, d = uc("number" == typeof c ? c :0);
30755
-return db(a, function(a) {
30756
-var c = ja(0, ++b);
30757
-d[b] = d[c], d[c] = a;
30758
-}), d;
30981
+return a;
30759 30982
 }
30760
-function ob(a) {
30761
-var b = a ? a.length :0;
30762
-return "number" == typeof b ? b :md(a).length;
30983
+function Ec(a) {
30984
+{
30985
+var b;
30986
+V.support;
30763 30987
 }
30764
-function pb(a, b, c) {
30765
-var d;
30766
-if (b = q.createCallback(b, c, 3), kd(a)) for (var e = -1, f = a.length; ++e < f && !(d = b(a[e], e, a)); ) ; else ud(a, function(a, c, e) {
30767
-return !(d = b(a, c, e));
30768
-});
30769
-return !!d;
30988
+if (!n(a) || bg.call(a) != X || !_f.call(a, "constructor") && (b = a.constructor, "function" == typeof b && !(b instanceof b))) return !1;
30989
+var c;
30990
+return Bb(a, function(a, b) {
30991
+c = b;
30992
+}), "undefined" == typeof c || _f.call(a, c);
30770 30993
 }
30771
-function qb(a, b, c) {
30772
-var d = -1, f = kd(b), g = a ? a.length :0, j = uc("number" == typeof g ? g :0);
30773
-for (f || (b = q.createCallback(b, c, 3)), db(a, function(a, c, e) {
30774
-var g = j[++d] = i();
30775
-f ? g.criteria = gb(b, function(b) {
30776
-return a[b];
30777
-}) :(g.criteria = h())[0] = b(a, c, e), g.index = d, g.value = a;
30778
-}), g = j.length, j.sort(e); g--; ) {
30779
-var k = j[g];
30780
-j[g] = k.value, f || l(k.criteria), m(k);
30994
+function Fc(a) {
30995
+for (var b = Xe(a), c = b.length, d = c && a.length, e = V.support, f = d && yc(d) && (Xg(a) || e.nonEnumArgs && se(a)), g = -1, h = []; ++g < c; ) {
30996
+var i = b[g];
30997
+(f && wc(i, d) || _f.call(a, i)) && h.push(i);
30781 30998
 }
30782
-return j;
30999
+return h;
30783 31000
 }
30784
-function rb(a) {
30785
-return a && "number" == typeof a.length ? hd.unindexedChars && Qa(a) ? a.split("") :n(a) :Ya(a);
31001
+function Gc(a) {
31002
+return null == a ? [] :yc(a.length) ? Ae(a) ? a :Sf(a) :cf(a);
30786 31003
 }
30787
-function sb(a) {
30788
-for (var b = -1, c = a ? a.length :0, d = []; ++b < c; ) {
30789
-var e = a[b];
30790
-e && d.push(e);
31004
+function Hc(a) {
31005
+return Ae(a) ? a :Sf(a);
30791 31006
 }
30792
-return d;
31007
+function Ic(a) {
31008
+return a instanceof _ ? a.clone() :new Z(a.__wrapped__, a.__chain__, Za(a.__actions__));
30793 31009
 }
30794
-function tb(a) {
30795
-return ea(a, ga(arguments, !0, !0, 1));
31010
+function Jc(a, b, c) {
31011
+b = (c ? xc(a, b, c) :null == b) ? 1 :wg(+b || 1, 1);
31012
+for (var d = 0, e = a ? a.length :0, f = -1, g = Mf(gg(e / b)); e > d; ) g[++f] = Sb(a, d, d += b);
31013
+return g;
31014
+}
31015
+function Kc(a) {
31016
+for (var b = -1, c = a ? a.length :0, d = -1, e = []; ++b < c; ) {
31017
+var f = a[b];
31018
+f && (e[++d] = f);
30796 31019
 }
30797
-function ub(a, b, c) {
31020
+return e;
31021
+}
31022
+function Lc() {
31023
+for (var a = -1, b = arguments.length; ++a < b; ) {
31024
+var c = arguments[a];
31025
+if (Xg(c) || se(c)) break;
31026
+}
31027
+return rb(c, yb(arguments, !1, !0, ++a));
31028
+}
31029
+function Mc(a, b, c) {
31030
+var d = a ? a.length :0;
31031
+return d ? ((c ? xc(a, b, c) :null == b) && (b = 1), Sb(a, 0 > b ? 0 :b)) :[];
31032
+}
31033
+function Nc(a, b, c) {
31034
+var d = a ? a.length :0;
31035
+return d ? ((c ? xc(a, b, c) :null == b) && (b = 1), b = d - (+b || 0), Sb(a, 0, 0 > b ? 0 :b)) :[];
31036
+}
31037
+function Oc(a, b, c) {
31038
+var d = a ? a.length :0;
31039
+if (!d) return [];
31040
+for (b = pc(b, c, 3); d-- && b(a[d], d, a); ) ;
31041
+return Sb(a, 0, d + 1);
31042
+}
31043
+function Pc(a, b, c) {
31044
+var d = a ? a.length :0;
31045
+if (!d) return [];
31046
+var e = -1;
31047
+for (b = pc(b, c, 3); ++e < d && b(a[e], e, a); ) ;
31048
+return Sb(a, e);
31049
+}
31050
+function Qc(a, b, c, d) {
31051
+var e = a ? a.length :0;
31052
+return e ? (c && "number" != typeof c && xc(a, b, c) && (c = 0, d = e), vb(a, b, c, d)) :[];
31053
+}
31054
+function Rc(a, b, c) {
30798 31055
 var d = -1, e = a ? a.length :0;
30799
-for (b = q.createCallback(b, c, 3); ++d < e; ) if (b(a[d], d, a)) return d;
31056
+for (b = pc(b, c, 3); ++d < e; ) if (b(a[d], d, a)) return d;
30800 31057
 return -1;
30801 31058
 }
30802
-function vb(a, b, c) {
31059
+function Sc(a, b, c) {
30803 31060
 var d = a ? a.length :0;
30804
-for (b = q.createCallback(b, c, 3); d--; ) if (b(a[d], d, a)) return d;
31061
+for (b = pc(b, c, 3); d--; ) if (b(a[d], d, a)) return d;
30805 31062
 return -1;
30806 31063
 }
30807
-function wb(a, b, c) {
30808
-var d = 0, e = a ? a.length :0;
30809
-if ("number" != typeof b && null != b) {
30810
-var f = -1;
30811
-for (b = q.createCallback(b, c, 3); ++f < e && b(a[f], f, a); ) d++;
30812
-} else if (d = b, null == d || c) return a ? a[0] :p;
30813
-return n(a, 0, cd(bd(0, d), e));
31064
+function Tc(a) {
31065
+return a ? a[0] :v;
30814 31066
 }
30815
-function xb(a, b, c, d) {
30816
-return "boolean" != typeof b && null != b && (d = c, c = "function" != typeof b && d && d[b] === a ? null :b, b = !1), null != c && (a = gb(a, c, d)), ga(a, b);
31067
+function Uc(a, b, c) {
31068
+var d = a ? a.length :0;
31069
+return c && xc(a, b, c) && (b = !1), d ? yb(a, b) :[];
30817 31070
 }
30818
-function yb(b, c, d) {
30819
-if ("number" == typeof d) {
30820
-var e = b ? b.length :0;
30821
-d = 0 > d ? bd(0, e + d) :d || 0;
30822
-} else if (d) {
30823
-var f = Hb(b, c);
30824
-return b[f] === c ? f :-1;
31071
+function Vc(a) {
31072
+var b = a ? a.length :0;
31073
+return b ? yb(a, !0) :[];
30825 31074
 }
30826
-return a(b, c, d);
31075
+function Wc(a, c, d) {
31076
+var e = a ? a.length :0;
31077
+if (!e) return -1;
31078
+if ("number" == typeof d) d = 0 > d ? wg(e + d, 0) :d || 0; else if (d) {
31079
+var f = Xb(a, c), g = a[f];
31080
+return (c === c ? c === g :g !== g) ? f :-1;
30827 31081
 }
30828
-function zb(a, b, c) {
30829
-var d = 0, e = a ? a.length :0;
30830
-if ("number" != typeof b && null != b) {
30831
-var f = e;
30832
-for (b = q.createCallback(b, c, 3); f-- && b(a[f], f, a); ) d++;
30833
-} else d = null == b || c ? 1 :b || d;
30834
-return n(a, 0, cd(bd(0, e - d), e));
31082
+return b(a, c, d);
30835 31083
 }
30836
-function Ab() {
30837
-for (var c = [], d = -1, e = arguments.length, g = h(), i = pa(), j = i === a, k = h(); ++d < e; ) {
30838
-var n = arguments[d];
30839
-(kd(n) || ta(n)) && (c.push(n), g.push(j && n.length >= v && f(d ? c[d] :k)));
31084
+function Xc(a) {
31085
+return Nc(a, 1);
30840 31086
 }
30841
-var o = c[0], p = -1, q = o ? o.length :0, r = [];
30842
-a:for (;++p < q; ) {
30843
-var s = g[0];
30844
-if (n = o[p], (s ? b(s, n) :i(k, n)) < 0) {
30845
-for (d = e, (s || k).push(n); --d; ) if (s = g[d], (s ? b(s, n) :i(c[d], n)) < 0) continue a;
30846
-r.push(n);
31087
+function Yc() {
31088
+for (var a = [], c = -1, d = arguments.length, e = [], f = qc(), g = f == b; ++c < d; ) {
31089
+var h = arguments[c];
31090
+(Xg(h) || se(h)) && (a.push(h), e.push(g && h.length >= 120 && Ng(c && h)));
30847 31091
 }
31092
+d = a.length;
31093
+var i = a[0], j = -1, k = i ? i.length :0, l = [], m = e[0];
31094
+a:for (;++j < k; ) if (h = i[j], (m ? Xa(m, h) :f(l, h)) < 0) {
31095
+for (c = d; --c; ) {
31096
+var n = e[c];
31097
+if ((n ? Xa(n, h) :f(a[c], h)) < 0) continue a;
30848 31098
 }
30849
-for (;e--; ) s = g[e], s && m(s);
30850
-return l(g), l(k), r;
31099
+m && m.push(h), l.push(h);
30851 31100
 }
30852
-function Bb(a, b, c) {
30853
-var d = 0, e = a ? a.length :0;
30854
-if ("number" != typeof b && null != b) {
30855
-var f = e;
30856
-for (b = q.createCallback(b, c, 3); f-- && b(a[f], f, a); ) d++;
30857
-} else if (d = b, null == d || c) return a ? a[e - 1] :p;
30858
-return n(a, bd(0, e - d));
31101
+return l;
30859 31102
 }
30860
-function Cb(a, b, c) {
31103
+function Zc(a) {
31104
+var b = a ? a.length :0;
31105
+return b ? a[b - 1] :v;
31106
+}
31107
+function $c(a, b, c) {
30861 31108
 var d = a ? a.length :0;
30862
-for ("number" == typeof c && (d = (0 > c ? bd(0, d + c) :cd(c, d - 1)) + 1); d--; ) if (a[d] === b) return d;
31109
+if (!d) return -1;
31110
+var e = d;
31111
+if ("number" == typeof c) e = (0 > c ? wg(d + c, 0) :xg(c || 0, d - 1)) + 1; else if (c) {
31112
+e = Xb(a, b, !0) - 1;
31113
+var f = a[e];
31114
+return (b === b ? b === f :f !== f) ? e :-1;
31115
+}
31116
+if (b !== b) return m(a, e, !0);
31117
+for (;e--; ) if (a[e] === b) return e;
30863 31118
 return -1;
30864 31119
 }
30865
-function Db(a) {
30866
-for (var b = arguments, c = 0, d = b.length, e = a ? a.length :0; ++c < d; ) for (var f = -1, g = b[c]; ++f < e; ) a[f] === g && (Vc.call(a, f--, 1), e--);
31120
+function _c() {
31121
+var a = arguments[0];
31122
+if (!a || !a.length) return a;
31123
+for (var b = 0, c = qc(), d = arguments.length; ++b < d; ) for (var e = 0, f = arguments[b]; (e = c(a, f, e)) > -1; ) og.call(a, e, 1);
30867 31124
 return a;
30868 31125
 }
30869
-function Eb(a, b, c) {
30870
-a = +a || 0, c = "number" == typeof c ? c :+c || 1, null == b && (b = a, a = 0);
30871
-for (var d = -1, e = bd(0, Mc((b - a) / (c || 1))), f = uc(e); ++d < e; ) f[d] = a, a += c;
30872
-return f;
31126
+function ad(a) {
31127
+return Pb(a || [], yb(arguments, !1, !1, 1));
30873 31128
 }
30874
-function Fb(a, b, c) {
31129
+function bd(a, b, c) {
30875 31130
 var d = -1, e = a ? a.length :0, f = [];
30876
-for (b = q.createCallback(b, c, 3); ++d < e; ) {
31131
+for (b = pc(b, c, 3); ++d < e; ) {
30877 31132
 var g = a[d];
30878
-b(g, d, a) && (f.push(g), Vc.call(a, d--, 1), e--);
31133
+b(g, d, a) && (f.push(g), og.call(a, d--, 1), e--);
30879 31134
 }
30880 31135
 return f;
30881 31136
 }
30882
-function Gb(a, b, c) {
30883
-if ("number" != typeof b && null != b) {
30884
-var d = 0, e = -1, f = a ? a.length :0;
30885
-for (b = q.createCallback(b, c, 3); ++e < f && b(a[e], e, a); ) d++;
30886
-} else d = null == b || c ? 1 :bd(0, b);
30887
-return n(a, d);
31137
+function cd(a) {
31138
+return Mc(a, 1);
30888 31139
 }
30889
-function Hb(a, b, c, d) {
30890
-var e = 0, f = a ? a.length :e;
30891
-for (c = c ? q.createCallback(c, d, 1) :ec, b = c(b); f > e; ) {
30892
-var g = e + f >>> 1;
30893
-c(a[g]) < b ? e = g + 1 :f = g;
31140
+function dd(a, b, c) {
31141
+var d = a ? a.length :0;
31142
+return d ? (c && "number" != typeof c && xc(a, b, c) && (b = 0, c = d), Sb(a, b, c)) :[];
30894 31143
 }
30895
-return e;
31144
+function ed(a, b, c, d) {
31145
+var e = pc(c);
31146
+return e === ob && null == c ? Xb(a, b) :Yb(a, b, e(c, d, 1));
30896 31147
 }
30897
-function Ib() {
30898
-return ka(ga(arguments, !0, !0));
31148
+function fd(a, b, c, d) {
31149
+var e = pc(c);
31150
+return e === ob && null == c ? Xb(a, b, !0) :Yb(a, b, e(c, d, 1), !0);
30899 31151
 }
30900
-function Jb(a, b, c, d) {
30901
-return "boolean" != typeof b && null != b && (d = c, c = "function" != typeof b && d && d[b] === a ? null :b, b = !1), null != c && (c = q.createCallback(c, d, 3)), ka(a, b, c);
31152
+function gd(a, b, c) {
31153
+var d = a ? a.length :0;
31154
+return d ? ((c ? xc(a, b, c) :null == b) && (b = 1), Sb(a, 0, 0 > b ? 0 :b)) :[];
30902 31155
 }
30903
-function Kb(a) {
30904
-return ea(a, n(arguments, 1));
31156
+function hd(a, b, c) {
31157
+var d = a ? a.length :0;
31158
+return d ? ((c ? xc(a, b, c) :null == b) && (b = 1), b = d - (+b || 0), Sb(a, 0 > b ? 0 :b)) :[];
31159
+}
31160
+function id(a, b, c) {
31161
+var d = a ? a.length :0;
31162
+if (!d) return [];
31163
+for (b = pc(b, c, 3); d-- && b(a[d], d, a); ) ;
31164
+return Sb(a, d + 1);
31165
+}
31166
+function jd(a, b, c) {
31167
+var d = a ? a.length :0;
31168
+if (!d) return [];
31169
+var e = -1;
31170
+for (b = pc(b, c, 3); ++e < d && b(a[e], e, a); ) ;
31171
+return Sb(a, 0, e);
31172
+}
31173
+function kd() {
31174
+return Ub(yb(arguments, !1, !0));
31175
+}
31176
+function ld(a, c, d, e) {
31177
+var f = a ? a.length :0;
31178
+if (!f) return [];
31179
+"boolean" != typeof c && null != c && (e = d, d = xc(a, c, e) ? null :c, c = !1);
31180
+var g = pc();
31181
+return (g !== ob || null != d) && (d = g(d, e, 3)), c && qc() == b ? q(a, d) :Ub(a, d);
31182
+}
31183
+function md(a) {
31184
+for (var b = -1, c = (a && a.length && db(cb(a, $f))) >>> 0, d = Mf(c); ++b < c; ) d[b] = cb(a, Ob(b));
31185
+return d;
31186
+}
31187
+function nd(a) {
31188
+return rb(a, Sb(arguments, 1));
30905 31189
 }
30906
-function Lb() {
31190
+function od() {
30907 31191
 for (var a = -1, b = arguments.length; ++a < b; ) {
30908 31192
 var c = arguments[a];
30909
-if (kd(c) || ta(c)) var d = d ? ka(ea(d, c).concat(ea(c, d))) :c;
31193
+if (Xg(c) || se(c)) var d = d ? rb(d, c).concat(rb(c, d)) :c;
30910 31194
 }
30911
-return d || [];
31195
+return d ? Ub(d) :[];
30912 31196
 }
30913
-function Mb() {
30914
-for (var a = arguments.length > 1 ? arguments :arguments[0], b = -1, c = a ? hb(Dd(a, "length")) :0, d = uc(0 > c ? 0 :c); ++b < c; ) d[b] = Dd(a, b);
30915
-return d;
31197
+function pd() {
31198
+for (var a = arguments.length, b = Mf(a); a--; ) b[a] = arguments[a];
31199
+return md(b);
30916 31200
 }
30917
-function Nb(a, b) {
31201
+function qd(a, b) {
30918 31202
 var c = -1, d = a ? a.length :0, e = {};
30919
-for (b || !d || kd(a[0]) || (b = []); ++c < d; ) {
31203
+for (!d || b || Xg(a[0]) || (b = []); ++c < d; ) {
30920 31204
 var f = a[c];
30921 31205
 b ? e[f] = b[c] :f && (e[f[0]] = f[1]);
30922 31206
 }
30923 31207
 return e;
30924 31208
 }
30925
-function Ob(a, b) {
30926
-if (!Ka(b)) throw new Ec();
30927
-return function() {
30928
-return --a < 1 ? b.apply(this, arguments) :void 0;
30929
-};
31209
+function rd(a) {
31210
+var b = V(a);
31211
+return b.__chain__ = !0, b;
30930 31212
 }
30931
-function Pb(a, b) {
30932
-return arguments.length > 2 ? ma(a, 17, n(arguments, 2), null, b) :ma(a, 1, null, null, b);
31213
+function sd(a, b, c) {
31214
+return b.call(c, a), a;
30933 31215
 }
30934
-function Qb(a) {
30935
-for (var b = arguments.length > 1 ? ga(arguments, !0, !1, 1) :Ba(a), c = -1, d = b.length; ++c < d; ) {
30936
-var e = b[c];
30937
-a[e] = ma(a[e], 1, null, null, a);
31216
+function td(a, b, c) {
31217
+return b.call(c, a);
30938 31218
 }
30939
-return a;
31219
+function ud() {
31220
+return rd(this);
30940 31221
 }
30941
-function Rb(a, b) {
30942
-return arguments.length > 2 ? ma(b, 19, n(arguments, 2), null, a) :ma(b, 3, null, null, a);
31222
+function vd() {
31223
+return new Z(this.value(), this.__chain__);
30943 31224
 }
30944
-function Sb() {
30945
-for (var a = arguments, b = a.length; b--; ) if (!Ka(a[b])) throw new Ec();
30946
-return function() {
30947
-for (var b = arguments, c = a.length; c--; ) b = [ a[c].apply(this, b) ];
30948
-return b[0];
30949
-};
31225
+function wd(a) {
31226
+for (var b, c = this; c instanceof Z; ) {
31227
+var d = Ic(c);
31228
+b ? e.__wrapped__ = d :b = d;
31229
+var e = d;
31230
+c = c.__wrapped__;
30950 31231
 }
30951
-function Tb(a, b) {
30952
-return b = "number" == typeof b ? b :+b || a.length, ma(a, 4, null, null, null, b);
31232
+return e.__wrapped__ = a, b;
30953 31233
 }
30954
-function Ub(a, b, c) {
30955
-var d, e, f, g, h, i, j, k = 0, l = !1, m = !0;
30956
-if (!Ka(a)) throw new Ec();
30957
-if (b = bd(0, b) || 0, c === !0) {
30958
-var n = !0;
30959
-m = !1;
30960
-} else La(c) && (n = c.leading, l = "maxWait" in c && (bd(b, c.maxWait) || 0), m = "trailing" in c ? c.trailing :m);
30961
-var o = function() {
30962
-var c = b - (Fd() - g);
30963
-if (0 >= c) {
30964
-e && Nc(e);
30965
-var l = j;
30966
-e = i = j = p, l && (k = Fd(), f = a.apply(h, d), i || e || (d = h = null));
30967
-} else i = Uc(o, c);
30968
-}, q = function() {
30969
-i && Nc(i), e = i = j = p, (m || l !== b) && (k = Fd(), f = a.apply(h, d), i || e || (d = h = null));
30970
-};
30971
-return function() {
30972
-if (d = arguments, g = Fd(), h = this, j = m && (i || !n), l === !1) var c = n && !i; else {
30973
-e || n || (k = g);
30974
-var p = l - (g - k), r = 0 >= p;
30975
-r ? (e && (e = Nc(e)), k = g, f = a.apply(h, d)) :e || (e = Uc(q, p));
31234
+function xd() {
31235
+var a = this.__wrapped__;
31236
+return a instanceof _ ? (this.__actions__.length && (a = new _(this)), new Z(a.reverse(), this.__chain__)) :this.thru(function(a) {
31237
+return a.reverse();
31238
+});
31239
+}
31240
+function yd() {
31241
+return this.value() + "";
31242
+}
31243
+function zd() {
31244
+return Wb(this.__wrapped__, this.__actions__);
31245
+}
31246
+function Ad(a) {
31247
+var b = a ? a.length :0;
31248
+return yc(b) && (a = Gc(a)), lb(a, yb(arguments, !1, !1, 1));
31249
+}
31250
+function Bd(a, b, c) {
31251
+var d = a ? a.length :0;
31252
+return yc(d) || (a = cf(a), d = a.length), d ? (c = "number" == typeof c ? 0 > c ? wg(d + c, 0) :c || 0 :0, "string" == typeof a || !Xg(a) && He(a) ? d > c && a.indexOf(b, c) > -1 :qc(a, b, c) > -1) :!1;
31253
+}
31254
+function Cd(a, b, c) {
31255
+var d = Xg(a) ? ab :ub;
31256
+return ("function" != typeof b || "undefined" != typeof c) && (b = pc(b, c, 3)), d(a, b);
30976 31257
 }
30977
-return r && i ? i = Nc(i) :i || b === l || (i = Uc(o, b)), c && (r = !0, f = a.apply(h, d)), !r || i || e || (d = h = null), f;
31258
+function Dd(a, b, c) {
31259
+var d = Xg(a) ? bb :wb;
31260
+return b = pc(b, c, 3), d(a, b);
31261
+}
31262
+function Ed(a, b, c) {
31263
+if (Xg(a)) {
31264
+var d = Rc(a, b, c);
31265
+return d > -1 ? a[d] :v;
31266
+}
31267
+return b = pc(b, c, 3), xb(a, b, sb);
31268
+}
31269
+function Fd(a, b, c) {
31270
+return b = pc(b, c, 3), xb(a, b, tb);
31271
+}
31272
+function Gd(a, b) {
31273
+return Ed(a, Kb(b));
31274
+}
31275
+function Hd(a, b, c) {
31276
+return "function" == typeof b && "undefined" == typeof c && Xg(a) ? $a(a, b) :sb(a, Zb(b, c, 3));
31277
+}
31278
+function Id(a, b, c) {
31279
+return "function" == typeof b && "undefined" == typeof c && Xg(a) ? _a(a, b) :tb(a, Zb(b, c, 3));
31280
+}
31281
+function Jd(a, b) {
31282
+return Fb(a, b, Sb(arguments, 2));
31283
+}
31284
+function Kd(a, b, c) {
31285
+var d = Xg(a) ? cb :Jb;
31286
+return b = pc(b, c, 3), d(a, b);
31287
+}
31288
+function Ld(a, b) {
31289
+return Kd(a, Ob(b));
31290
+}
31291
+function Md(a, b, c, d) {
31292
+var e = Xg(a) ? fb :Rb;
31293
+return e(a, pc(b, d, 4), c, arguments.length < 3, sb);
31294
+}
31295
+function Nd(a, b, c, d) {
31296
+var e = Xg(a) ? gb :Rb;
31297
+return e(a, pc(b, d, 4), c, arguments.length < 3, tb);
31298
+}
31299
+function Od(a, b, c) {
31300
+var d = Xg(a) ? bb :wb;
31301
+return b = pc(b, c, 3), d(a, function(a, c, d) {
31302
+return !b(a, c, d);
31303
+});
31304
+}
31305
+function Pd(a, b, c) {
31306
+if (c ? xc(a, b, c) :null == b) {
31307
+a = Gc(a);
31308
+var d = a.length;
31309
+return d > 0 ? a[Qb(0, d - 1)] :v;
31310
+}
31311
+var e = Qd(a);
31312
+return e.length = xg(0 > b ? 0 :+b || 0, e.length), e;
31313
+}
31314
+function Qd(a) {
31315
+a = Gc(a);
31316
+for (var b = -1, c = a.length, d = Mf(c); ++b < c; ) {
31317
+var e = Qb(0, b);
31318
+b != e && (d[b] = d[e]), d[e] = a[b];
31319
+}
31320
+return d;
31321
+}
31322
+function Rd(a) {
31323
+var b = a ? a.length :0;
31324
+return yc(b) ? b :_g(a).length;
31325
+}
31326
+function Sd(a, b, c) {
31327
+var d = Xg(a) ? hb :Tb;
31328
+return ("function" != typeof b || "undefined" != typeof c) && (b = pc(b, c, 3)), d(a, b);
31329
+}
31330
+function Td(a, b, d) {
31331
+var e = -1, f = a ? a.length :0, g = yc(f) ? Mf(f) :[];
31332
+return d && xc(a, b, d) && (b = null), b = pc(b, d, 3), sb(a, function(a, c, d) {
31333
+g[++e] = {
31334
+criteria:b(a, c, d),
31335
+index:e,
31336
+value:a
31337
+};
31338
+}), c(g, h);
31339
+}
31340
+function Ud(a) {
31341
+var b = arguments;
31342
+b.length > 3 && xc(b[1], b[2], b[3]) && (b = [ a, b[1] ]);
31343
+var d = -1, e = a ? a.length :0, f = yb(b, !1, !1, 1), g = yc(e) ? Mf(e) :[];
31344
+return sb(a, function(a) {
31345
+for (var b = f.length, c = Mf(b); b--; ) c[b] = null == a ? v :a[f[b]];
31346
+g[++d] = {
31347
+criteria:c,
31348
+index:d,
31349
+value:a
30978 31350
 };
31351
+}), c(g, i);
30979 31352
 }
30980
-function Vb(a) {
30981
-if (!Ka(a)) throw new Ec();
30982
-var b = n(arguments, 1);
30983
-return Uc(function() {
30984
-a.apply(p, b);
30985
-}, 1);
31353
+function Vd(a, b) {
31354
+return Dd(a, Kb(b));
30986 31355
 }
30987
-function Wb(a, b) {
30988
-if (!Ka(a)) throw new Ec();
30989
-var c = n(arguments, 2);
30990
-return Uc(function() {
30991
-a.apply(p, c);
30992
-}, b);
31356
+function Wd(a, b) {
31357
+if ("function" != typeof b) {
31358
+if ("function" != typeof a) throw new Vf(N);
31359
+var c = a;
31360
+a = b, b = c;
30993 31361
 }
30994
-function Xb(a, b) {
30995
-if (!Ka(a)) throw new Ec();
30996
-var c = function() {
30997
-var d = c.cache, e = b ? b.apply(this, arguments) :u + arguments[0];
30998
-return Rc.call(d, e) ? d[e] :d[e] = a.apply(this, arguments);
31362
+return a = ug(a = +a) ? a :0, function() {
31363
+return --a < 1 ? b.apply(this, arguments) :void 0;
30999 31364
 };
31000
-return c.cache = {}, c;
31001 31365
 }
31002
-function Yb(a) {
31003
-var b, c;
31004
-if (!Ka(a)) throw new Ec();
31366
+function Xd(a, b, c) {
31367
+return c && xc(a, b, c) && (b = null), b = a && null == b ? a.length :wg(+b || 0, 0), kc(a, F, null, null, null, null, b);
31368
+}
31369
+function Yd(a, b) {
31370
+var c;
31371
+if ("function" != typeof b) {
31372
+if ("function" != typeof a) throw new Vf(N);
31373
+var d = a;
31374
+a = b, b = d;
31375
+}
31005 31376
 return function() {
31006
-return b ? c :(b = !0, c = a.apply(this, arguments), a = null, c);
31377
+return --a > 0 ? c = b.apply(this, arguments) :b = null, c;
31007 31378
 };
31008 31379
 }
31009
-function Zb(a) {
31010
-return ma(a, 16, n(arguments, 1));
31380
+function Zd(a, b) {
31381
+var c = x;
31382
+if (arguments.length > 2) {
31383
+var d = Sb(arguments, 2), e = p(d, Zd.placeholder);
31384
+c |= C;
31011 31385
 }
31012
-function $b(a) {
31013
-return ma(a, 32, null, n(arguments, 1));
31386
+return kc(a, c, b, d, e);
31014 31387
 }
31015
-function _b(a, b, c) {
31016
-var d = !0, e = !0;
31017
-if (!Ka(a)) throw new Ec();
31018
-return c === !1 ? d = !1 :La(c) && (d = "leading" in c ? c.leading :d, e = "trailing" in c ? c.trailing :e), X.leading = d, X.maxWait = b, X.trailing = e, Ub(a, b, X);
31388
+function $d(a) {
31389
+return nb(a, arguments.length > 1 ? yb(arguments, !1, !1, 1) :Ue(a));
31390
+}
31391
+function _d(a, b) {
31392
+var c = x | y;
31393
+if (arguments.length > 2) {
31394
+var d = Sb(arguments, 2), e = p(d, _d.placeholder);
31395
+c |= C;
31396
+}
31397
+return kc(b, c, a, d, e);
31398
+}
31399
+function ae(a, b, c) {
31400
+c && xc(a, b, c) && (b = null);
31401
+var d = kc(a, A, null, null, null, null, null, b);
31402
+return d.placeholder = ae.placeholder, d;
31403
+}
31404
+function be(a, b, c) {
31405
+c && xc(a, b, c) && (b = null);
31406
+var d = kc(a, B, null, null, null, null, null, b);
31407
+return d.placeholder = be.placeholder, d;
31408
+}
31409
+function ce(a, b, c) {
31410
+function d() {
31411
+m && hg(m), i && hg(i), i = m = n = v;
31412
+}
31413
+function e() {
31414
+var c = b - (Wg() - k);
31415
+if (0 >= c || c > b) {
31416
+i && hg(i);
31417
+var d = n;
31418
+i = m = n = v, d && (o = Wg(), j = a.apply(l, h), m || i || (h = l = null));
31419
+} else m = ng(e, c);
31019 31420
 }
31020
-function ac(a, b) {
31021
-return ma(b, 16, [ a ]);
31421
+function f() {
31422
+m && hg(m), i = m = n = v, (q || p !== b) && (o = Wg(), j = a.apply(l, h), m || i || (h = l = null));
31423
+}
31424
+function g() {
31425
+if (h = arguments, k = Wg(), l = this, n = q && (m || !r), p === !1) var c = r && !m; else {
31426
+i || r || (o = k);
31427
+var d = p - (k - o), g = 0 >= d || d > p;
31428
+g ? (i && (i = hg(i)), o = k, j = a.apply(l, h)) :i || (i = ng(f, d));
31429
+}
31430
+return g && m ? m = hg(m) :m || b === p || (m = ng(e, b)), c && (g = !0, j = a.apply(l, h)), !g || m || i || (h = l = null), j;
31431
+}
31432
+var h, i, j, k, l, m, n, o = 0, p = !1, q = !0;
31433
+if ("function" != typeof a) throw new Vf(N);
31434
+if (b = 0 > b ? 0 :b, c === !0) {
31435
+var r = !0;
31436
+q = !1;
31437
+} else Ae(c) && (r = c.leading, p = "maxWait" in c && wg(+c.maxWait || 0, b), q = "trailing" in c ? c.trailing :q);
31438
+return g.cancel = d, g;
31439
+}
31440
+function de(a) {
31441
+return qb(a, 1, arguments, 1);
31022 31442
 }
31023
-function bc(a) {
31443
+function ee(a, b) {
31444
+return qb(a, b, arguments, 2);
31445
+}
31446
+function fe() {
31447
+var a = arguments, b = a.length;
31448
+if (!b) return function() {
31449
+return arguments[0];
31450
+};
31451
+if (!ab(a, ze)) throw new Vf(N);
31024 31452
 return function() {
31025
-return a;
31453
+for (var c = 0, d = a[c].apply(this, arguments); ++c < b; ) d = a[c].call(this, d);
31454
+return d;
31026 31455
 };
31027 31456
 }
31028
-function cc(a, b, c) {
31029
-var d = typeof a;
31030
-if (null == a || "function" == d) return ca(a, b, c);
31031
-if ("object" != d) return ic(a);
31032
-var e = md(a), f = e[0], g = a[f];
31033
-return 1 != e.length || g !== g || La(g) ? function(b) {
31034
-for (var c = e.length, d = !1; c-- && (d = ha(b[e[c]], a[e[c]], null, !0)); ) ;
31457
+function ge() {
31458
+var a = arguments, b = a.length - 1;
31459
+if (0 > b) return function() {
31460
+return arguments[0];
31461
+};
31462
+if (!ab(a, ze)) throw new Vf(N);
31463
+return function() {
31464
+for (var c = b, d = a[c].apply(this, arguments); c--; ) d = a[c].call(this, d);
31035 31465
 return d;
31036
-} :function(a) {
31037
-var b = a[f];
31038
-return g === b && (0 !== g || 1 / g == 1 / b);
31039 31466
 };
31040 31467
 }
31041
-function dc(a) {
31042
-return null == a ? "" :Dc(a).replace(td, oa);
31468
+function he(a, b) {
31469
+if ("function" != typeof a || b && "function" != typeof b) throw new Vf(N);
31470
+var c = function() {
31471
+var d = c.cache, e = b ? b.apply(this, arguments) :arguments[0];
31472
+if (d.has(e)) return d.get(e);
31473
+var f = a.apply(this, arguments);
31474
+return d.set(e, f), f;
31475
+};
31476
+return c.cache = new he.Cache(), c;
31043 31477
 }
31044
-function ec(a) {
31045
-return a;
31478
+function ie(a) {
31479
+if ("function" != typeof a) throw new Vf(N);
31480
+return function() {
31481
+return !a.apply(this, arguments);
31482
+};
31046 31483
 }
31047
-function fc(a, b, c) {
31048
-var d = !0, e = b && Ba(b);
31049
-b && (c || e.length) || (null == c && (c = b), f = r, b = a, a = q, e = Ba(b)), c === !1 ? d = !1 :La(c) && "chain" in c && (d = c.chain);
31050
-var f = a, g = Ka(f);
31051
-db(e, function(c) {
31052
-var e = a[c] = b[c];
31053
-g && (f.prototype[c] = function() {
31054
-var b = this.__chain__, c = this.__wrapped__, g = [ c ];
31055
-Sc.apply(g, arguments);
31056
-var h = e.apply(a, g);
31057
-if (d || b) {
31058
-if (c === h && La(h)) return this;
31059
-h = new f(h), h.__chain__ = b;
31484
+function je(a) {
31485
+return Yd(a, 2);
31060 31486
 }
31061
-return h;
31062
-});
31063
-});
31487
+function ke(a) {
31488
+var b = Sb(arguments, 1), c = p(b, ke.placeholder);
31489
+return kc(a, C, null, b, c);
31490
+}
31491
+function le(a) {
31492
+var b = Sb(arguments, 1), c = p(b, le.placeholder);
31493
+return kc(a, D, null, b, c);
31064 31494
 }
31065
-function gc() {
31066
-return c._ = Jc, this;
31495
+function me(a) {
31496
+var b = yb(arguments, !1, !1, 1);
31497
+return kc(a, E, null, null, null, b);
31067 31498
 }
31068
-function hc() {}
31069
-function ic(a) {
31499
+function ne(a) {
31500
+if ("function" != typeof a) throw new Vf(N);
31070 31501
 return function(b) {
31071
-return b[a];
31502
+return a.apply(this, b);
31072 31503
 };
31073 31504
 }
31074
-function jc(a, b, c) {
31075
-var d = null == a, e = null == b;
31076
-if (null == c && ("boolean" == typeof a && e ? (c = a, a = 1) :e || "boolean" != typeof b || (c = b, e = !0)), d && e && (b = 1), a = +a || 0, e ? (b = a, a = 0) :b = +b || 0, c || a % 1 || b % 1) {
31077
-var f = ed();
31078
-return cd(a + f * (b - a + parseFloat("1e-" + ((f + "").length - 1))), b);
31505
+function oe(a, b, c) {
31506
+var d = !0, e = !0;
31507
+if ("function" != typeof a) throw new Vf(N);
31508
+return c === !1 ? d = !1 :Ae(c) && (d = "leading" in c ? !!c.leading :d, e = "trailing" in c ? !!c.trailing :e), La.leading = d, La.maxWait = +b, La.trailing = e, ce(a, b, La);
31079 31509
 }
31080
-return ja(a, b);
31510
+function pe(a, b) {
31511
+return b = null == b ? Bf :b, kc(b, C, null, [ a ], []);
31081 31512
 }
31082
-function kc(a, b) {
31083
-if (a) {
31084
-var c = a[b];
31085
-return Ka(c) ? a[b]() :c;
31086
-}
31087
-}
31088
-function lc(a, b, c) {
31089
-var d = q.templateSettings;
31090
-a = Dc(a || ""), c = wd({}, c, d);
31091
-var e, f = wd({}, c.imports, d.imports), h = md(f), i = Ya(f), j = 0, k = c.interpolate || G, l = "__p += '", m = Cc((c.escape || G).source + "|" + k.source + "|" + (k === E ? B :G).source + "|" + (c.evaluate || G).source + "|$", "g");
31092
-a.replace(m, function(b, c, d, f, h, i) {
31093
-return d || (d = f), l += a.slice(j, i).replace(I, g), c && (l += "' +\n__e(" + c + ") +\n'"), h && (e = !0, l += "';\n" + h + ";\n__p += '"), d && (l += "' +\n((__t = (" + d + ")) == null ? '' : __t) +\n'"), j = i + b.length, b;
31094
-}), l += "';\n";
31095
-var n = c.variable, o = n;
31096
-o || (n = "obj", l = "with (" + n + ") {\n" + l + "\n}\n"), l = (e ? l.replace(y, "") :l).replace(z, "$1").replace(A, "$1;"), l = "function(" + n + ") {\n" + (o ? "" :n + " || (" + n + " = {});\n") + "var __t, __p = '', __e = _.escape" + (e ? ", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n" :";\n") + l + "return __p\n}";
31097
-var r = "\n/*\n//# sourceURL=" + (c.sourceURL || "/lodash/template/source[" + L++ + "]") + "\n*/";
31098
-try {
31099
-var s = yc(h, "return " + l + r).apply(p, i);
31100
-} catch (t) {
31101
-throw t.source = l, t;
31513
+function qe(a, b, c, d) {
31514
+return "boolean" != typeof b && null != b && (d = c, c = xc(a, b, d) ? null :b, b = !1), c = "function" == typeof c && Zb(c, d, 1), pb(a, b, c);
31102 31515
 }
31103
-return b ? s(b) :(s.source = l, s);
31516
+function re(a, b, c) {
31517
+return b = "function" == typeof b && Zb(b, c, 1), pb(a, !0, b);
31518
+}
31519
+function se(a) {
31520
+var b = n(a) ? a.length :v;
31521
+return yc(b) && bg.call(a) == P || !1;
31522
+}
31523
+function te(a) {
31524
+return a === !0 || a === !1 || n(a) && bg.call(a) == R || !1;
31525
+}
31526
+function ue(a) {
31527
+return n(a) && bg.call(a) == S || !1;
31528
+}
31529
+function ve(a) {
31530
+return a && 1 === a.nodeType && n(a) && bg.call(a).indexOf("Element") > -1 || !1;
31531
+}
31532
+function we(a) {
31533
+if (null == a) return !0;
31534
+var b = a.length;
31535
+return yc(b) && (Xg(a) || He(a) || se(a) || n(a) && ze(a.splice)) ? !b :!_g(a).length;
31536
+}
31537
+function xe(a, b, c, d) {
31538
+if (c = "function" == typeof c && Zb(c, d, 3), !c && zc(a) && zc(b)) return a === b;
31539
+var e = c ? c(a, b) :v;
31540
+return "undefined" == typeof e ? Gb(a, b, c) :!!e;
31541
+}
31542
+function ye(a) {
31543
+return n(a) && "string" == typeof a.message && bg.call(a) == T || !1;
31544
+}
31545
+function ze(a) {
31546
+return "function" == typeof a || !1;
31547
+}
31548
+function Ae(a) {
31549
+var b = typeof a;
31550
+return "function" == b || a && "object" == b || !1;
31551
+}
31552
+function Be(a, b, c, d) {
31553
+var e = _g(b), f = e.length;
31554
+if (c = "function" == typeof c && Zb(c, d, 3), !c && 1 == f) {
31555
+var g = e[0], h = b[g];
31556
+if (zc(h)) return null != a && h === a[g] && _f.call(a, g);
31557
+}
31558
+for (var i = Mf(f), j = Mf(f); f--; ) h = i[f] = b[e[f]], j[f] = zc(h);
31559
+return Ib(a, e, i, j, c);
31560
+}
31561
+function Ce(a) {
31562
+return Fe(a) && a != +a;
31563
+}
31564
+function De(a) {
31565
+return null == a ? !1 :bg.call(a) == U ? dg.test(Zf.call(a)) :n(a) && ya.test(a) || !1;
31566
+}
31567
+function Ee(a) {
31568
+return null === a;
31569
+}
31570
+function Fe(a) {
31571
+return "number" == typeof a || n(a) && bg.call(a) == W || !1;
31572
+}
31573
+function Ge(a) {
31574
+return n(a) && bg.call(a) == Y || !1;
31575
+}
31576
+function He(a) {
31577
+return "string" == typeof a || n(a) && bg.call(a) == $ || !1;
31578
+}
31579
+function Ie(a) {
31580
+return n(a) && yc(a.length) && Ja[bg.call(a)] || !1;
31581
+}
31582
+function Je(a) {
31583
+return "undefined" == typeof a;
31584
+}
31585
+function Ke(a) {
31586
+var b = a ? a.length :0;
31587
+return yc(b) ? b ? Za(a) :[] :cf(a);
31588
+}
31589
+function Le(a) {
31590
+return mb(a, Xe(a));
31591
+}
31592
+function Me(a, b, c) {
31593
+var d = Lg(a);
31594
+return c && xc(a, b, c) && (b = null), b ? mb(b, d, _g(b)) :d;
31595
+}
31596
+function Ne(a) {
31597
+if (null == a) return a;
31598
+var b = Za(arguments);
31599
+return b.push(ib), $g.apply(v, b);
31600
+}
31601
+function Oe(a, b, c) {
31602
+return b = pc(b, c, 3), xb(a, b, Cb, !0);
31603
+}
31604
+function Pe(a, b, c) {
31605
+return b = pc(b, c, 3), xb(a, b, Db, !0);
31606
+}
31607
+function Qe(a, b, c) {
31608
+return ("function" != typeof b || "undefined" != typeof c) && (b = Zb(b, c, 3)), zb(a, b, Xe);
31609
+}
31610
+function Re(a, b, c) {
31611
+return b = Zb(b, c, 3), Ab(a, b, Xe);
31612
+}
31613
+function Se(a, b, c) {
31614
+return ("function" != typeof b || "undefined" != typeof c) && (b = Zb(b, c, 3)), Cb(a, b);
31615
+}
31616
+function Te(a, b, c) {
31617
+return b = Zb(b, c, 3), Ab(a, b, _g);
31618
+}
31619
+function Ue(a) {
31620
+return Eb(a, Xe(a));
31621
+}
31622
+function Ve(a, b) {
31623
+return a ? _f.call(a, b) :!1;
31624
+}
31625
+function We(a, b, c) {
31626
+c && xc(a, b, c) && (b = null);
31627
+for (var d = -1, e = _g(a), f = e.length, g = {}; ++d < f; ) {
31628
+var h = e[d], i = a[h];
31629
+b ? _f.call(g, i) ? g[i].push(h) :g[i] = [ h ] :g[i] = h;
31630
+}
31631
+return g;
31632
+}
31633
+function Xe(a) {
31634
+if (null == a) return [];
31635
+Ae(a) || (a = Sf(a));
31636
+var b = a.length;
31637
+b = b && yc(b) && (Xg(a) || Kg.nonEnumArgs && se(a)) && b || 0;
31638
+for (var c = a.constructor, d = -1, e = "function" == typeof c && c.prototype === a, f = Mf(b), g = b > 0; ++d < b; ) f[d] = d + "";
31639
+for (var h in a) g && wc(h, b) || "constructor" == h && (e || !_f.call(a, h)) || f.push(h);
31640
+return f;
31641
+}
31642
+function Ye(a, b, c) {
31643
+var d = {};
31644
+return b = pc(b, c, 3), Cb(a, function(a, c, e) {
31645
+d[c] = b(a, c, e);
31646
+}), d;
31647
+}
31648
+function Ze(a, b, c) {
31649
+if (null == a) return {};
31650
+if ("function" != typeof b) {
31651
+var d = cb(yb(arguments, !1, !1, 1), Uf);
31652
+return Bc(a, rb(Xe(a), d));
31653
+}
31654
+return b = Zb(b, c, 3), Cc(a, function(a, c, d) {
31655
+return !b(a, c, d);
31656
+});
31657
+}
31658
+function $e(a) {
31659
+for (var b = -1, c = _g(a), d = c.length, e = Mf(d); ++b < d; ) {
31660
+var f = c[b];
31661
+e[b] = [ f, a[f] ];
31104 31662
 }
31105
-function mc(a, b, c) {
31106
-a = (a = +a) > -1 ? a :0;
31107
-var d = -1, e = uc(a);
31108
-for (b = ca(b, c, 1); ++d < a; ) e[d] = b(d);
31109 31663
 return e;
31110 31664
 }
31111
-function nc(a) {
31112
-return null == a ? "" :Dc(a).replace(sd, sa);
31665
+function _e(a, b, c) {
31666
+return null == a ? {} :"function" == typeof b ? Cc(a, Zb(b, c, 3)) :Bc(a, yb(arguments, !1, !1, 1));
31113 31667
 }
31114
-function oc(a) {
31115
-var b = ++s;
31116
-return Dc(null == a ? "" :a) + b;
31668
+function af(a, b, c) {
31669
+var d = null == a ? v :a[b];
31670
+return "undefined" == typeof d && (d = c), ze(d) ? d.call(a) :d;
31117 31671
 }
31118
-function pc(a) {
31119
-return a = new r(a), a.__chain__ = !0, a;
31672
+function bf(a, b, c, d) {
31673
+var e = Xg(a) || Ie(a);
31674
+if (b = pc(b, d, 4), null == c) if (e || Ae(a)) {
31675
+var f = a.constructor;
31676
+c = e ? Xg(a) ? new f() :[] :Lg(ze(f) && f.prototype);
31677
+} else c = {};
31678
+return (e ? $a :Cb)(a, function(a, d, e) {
31679
+return b(c, a, d, e);
31680
+}), c;
31120 31681
 }
31121
-function qc(a, b) {
31122
-return b(a), a;
31682
+function cf(a) {
31683
+return Vb(a, _g(a));
31123 31684
 }
31124
-function rc() {
31125
-return this.__chain__ = !0, this;
31685
+function df(a) {
31686
+return Vb(a, Xe(a));
31126 31687
 }
31127
-function sc() {
31128
-return Dc(this.__wrapped__);
31688
+function ef(a, b, c) {
31689
+c && xc(a, b, c) && (b = c = null);
31690
+var d = null == a, e = null == b;
31691
+if (null == c && (e && "boolean" == typeof a ? (c = a, a = 1) :"boolean" == typeof b && (c = b, e = !0)), d && e && (b = 1, e = !1), a = +a || 0, e ? (b = a, a = 0) :b = +b || 0, c || a % 1 || b % 1) {
31692
+var f = Bg();
31693
+return xg(a + f * (b - a + parseFloat("1e-" + ((f + "").length - 1))), b);
31129 31694
 }
31130
-function tc() {
31131
-return this.__wrapped__;
31695
+return Qb(a, b);
31132 31696
 }
31133
-c = c ? fa.defaults(aa.Object(), c, fa.pick(aa, J)) :aa;
31134
-var uc = c.Array, vc = c.Boolean, wc = c.Date, xc = c.Error, yc = c.Function, zc = c.Math, Ac = c.Number, Bc = c.Object, Cc = c.RegExp, Dc = c.String, Ec = c.TypeError, Fc = [], Gc = xc.prototype, Hc = Bc.prototype, Ic = Dc.prototype, Jc = c._, Kc = Hc.toString, Lc = Cc("^" + Dc(Kc).replace(/[.*+?^${}()|[\]\\]/g, "\\$&").replace(/toString| for [^\]]+/g, ".*?") + "$"), Mc = zc.ceil, Nc = c.clearTimeout, Oc = zc.floor, Pc = yc.prototype.toString, Qc = qa(Qc = Bc.getPrototypeOf) && Qc, Rc = Hc.hasOwnProperty, Sc = Fc.push, Tc = Hc.propertyIsEnumerable, Uc = c.setTimeout, Vc = Fc.splice, Wc = Fc.unshift, Xc = function() {
31135
-try {
31136
-var a = {}, b = qa(b = Bc.defineProperty) && b, c = b(a, a, a) && b;
31137
-} catch (d) {}
31697
+function ff(a) {
31698
+return a = d(a), a && a.charAt(0).toUpperCase() + a.slice(1);
31699
+}
31700
+function gf(a) {
31701
+return a = d(a), a && a.replace(za, j);
31702
+}
31703
+function hf(a, b, c) {
31704
+a = d(a), b += "";
31705
+var e = a.length;
31706
+return c = ("undefined" == typeof c ? e :xg(0 > c ? 0 :+c || 0, e)) - b.length, c >= 0 && a.indexOf(b, c) == c;
31707
+}
31708
+function jf(a) {
31709
+return a = d(a), a && qa.test(a) ? a.replace(oa, k) :a;
31710
+}
31711
+function kf(a) {
31712
+return a = d(a), a && Ca.test(a) ? a.replace(Ba, "\\$&") :a;
31713
+}
31714
+function lf(a, b, c) {
31715
+a = d(a), b = +b;
31716
+var e = a.length;
31717
+if (e >= b || !ug(b)) return a;
31718
+var f = (b - e) / 2, g = ig(f), h = gg(f);
31719
+return c = ic("", h, c), c.slice(0, g) + a + c;
31720
+}
31721
+function mf(a, b, c) {
31722
+return a = d(a), a && ic(a, b, c) + a;
31723
+}
31724
+function nf(a, b, c) {
31725
+return a = d(a), a && a + ic(a, b, c);
31726
+}
31727
+function of(a, b, c) {
31728
+return c && xc(a, b, c) && (b = 0), Ag(a, b);
31729
+}
31730
+function pf(a, b) {
31731
+var c = "";
31732
+if (a = d(a), b = +b, 1 > b || !a || !ug(b)) return c;
31733
+do b % 2 && (c += a), b = ig(b / 2), a += a; while (b);
31138 31734
 return c;
31139
-}(), Yc = qa(Yc = Bc.create) && Yc, Zc = qa(Zc = uc.isArray) && Zc, $c = c.isFinite, _c = c.isNaN, ad = qa(ad = Bc.keys) && ad, bd = zc.max, cd = zc.min, dd = c.parseInt, ed = zc.random, fd = {};
31140
-fd[N] = uc, fd[O] = vc, fd[P] = wc, fd[R] = yc, fd[T] = Bc, fd[S] = Ac, fd[U] = Cc, fd[V] = Dc;
31141
-var gd = {};
31142
-gd[N] = gd[P] = gd[S] = {
31143
-constructor:!0,
31144
-toLocaleString:!0,
31145
-toString:!0,
31146
-valueOf:!0
31147
-}, gd[O] = gd[V] = {
31148
-constructor:!0,
31149
-toString:!0,
31150
-valueOf:!0
31151
-}, gd[Q] = gd[R] = gd[U] = {
31152
-constructor:!0,
31153
-toString:!0
31154
-}, gd[T] = {
31155
-constructor:!0
31156
-}, function() {
31157
-for (var a = K.length; a--; ) {
31158
-var b = K[a];
31159
-for (var c in gd) Rc.call(gd, c) && !Rc.call(gd[c], b) && (gd[c][b] = !1);
31160 31735
 }
31161
-}(), r.prototype = q.prototype;
31162
-var hd = q.support = {};
31736
+function qf(a, b, c) {
31737
+return a = d(a), c = null == c ? 0 :xg(0 > c ? 0 :+c || 0, a.length), a.lastIndexOf(b, c) == c;
31738
+}
31739
+function rf(a, b, c) {
31740
+var e = V.templateSettings;
31741
+c && xc(a, b, c) && (b = c = null), a = d(a), b = kb(kb({}, c || b), e, jb);
31742
+var f, g, h = kb(kb({}, b.imports), e.imports, jb), i = _g(h), j = Vb(h, i), k = 0, m = b.interpolate || Aa, n = "__p += '", o = Tf((b.escape || Aa).source + "|" + m.source + "|" + (m === ta ? ua :Aa).source + "|" + (b.evaluate || Aa).source + "|$", "g"), p = "//# sourceURL=" + ("sourceURL" in b ? b.sourceURL :"lodash.templateSources[" + ++Ia + "]") + "\n";
31743
+a.replace(o, function(b, c, d, e, h, i) {
31744
+return d || (d = e), n += a.slice(k, i).replace(Ea, l), c && (f = !0, n += "' +\n__e(" + c + ") +\n'"), h && (g = !0, n += "';\n" + h + ";\n__p += '"), d && (n += "' +\n((__t = (" + d + ")) == null ? '' : __t) +\n'"), k = i + b.length, b;
31745
+}), n += "';\n";
31746
+var q = b.variable;
31747
+q || (n = "with (obj) {\n" + n + "\n}\n"), n = (g ? n.replace(ka, "") :n).replace(la, "$1").replace(ma, "$1;"), n = "function(" + (q || "obj") + ") {\n" + (q ? "" :"obj || (obj = {});\n") + "var __t, __p = ''" + (f ? ", __e = _.escape" :"") + (g ? ", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n" :";\n") + n + "return __p\n}";
31748
+var r = yf(function() {
31749
+return Pf(i, p + "return " + n).apply(v, j);
31750
+});
31751
+if (r.source = n, ye(r)) throw r;
31752
+return r;
31753
+}
31754
+function sf(a, b, c) {
31755
+var e = a;
31756
+return (a = d(a)) ? (c ? xc(e, b, c) :null == b) ? a.slice(r(a), s(a) + 1) :(b += "", a.slice(f(a, b), g(a, b) + 1)) :a;
31757
+}
31758
+function tf(a, b, c) {
31759
+var e = a;
31760
+return a = d(a), a ? a.slice((c ? xc(e, b, c) :null == b) ? r(a) :f(a, b + "")) :a;
31761
+}
31762
+function uf(a, b, c) {
31763
+var e = a;
31764
+return a = d(a), a ? (c ? xc(e, b, c) :null == b) ? a.slice(0, s(a) + 1) :a.slice(0, g(a, b + "") + 1) :a;
31765
+}
31766
+function vf(a, b, c) {
31767
+c && xc(a, b, c) && (b = null);
31768
+var e = G, f = H;
31769
+if (null != b) if (Ae(b)) {
31770
+var g = "separator" in b ? b.separator :g;
31771
+e = "length" in b ? +b.length || 0 :e, f = "omission" in b ? d(b.omission) :f;
31772
+} else e = +b || 0;
31773
+if (a = d(a), e >= a.length) return a;
31774
+var h = e - f.length;
31775
+if (1 > h) return f;
31776
+var i = a.slice(0, h);
31777
+if (null == g) return i + f;
31778
+if (Ge(g)) {
31779
+if (a.slice(h).search(g)) {
31780
+var j, k, l = a.slice(0, h);
31781
+for (g.global || (g = Tf(g.source, (va.exec(g) || "") + "g")), g.lastIndex = 0; j = g.exec(l); ) k = j.index;
31782
+i = i.slice(0, null == k ? h :k);
31783
+}
31784
+} else if (a.indexOf(g, h) != h) {
31785
+var m = i.lastIndexOf(g);
31786
+m > -1 && (i = i.slice(0, m));
31787
+}
31788
+return i + f;
31789
+}
31790
+function wf(a) {
31791
+return a = d(a), a && pa.test(a) ? a.replace(na, t) :a;
31792
+}
31793
+function xf(a, b, c) {
31794
+return c && xc(a, b, c) && (b = null), a = d(a), a.match(b || Fa) || [];
31795
+}
31796
+function yf(a) {
31797
+try {
31798
+return a.apply(v, Sb(arguments, 1));
31799
+} catch (b) {
31800
+return ye(b) ? b :new Of(b);
31801
+}
31802
+}
31803
+function zf(a, b, c) {
31804
+return c && xc(a, b, c) && (b = null), n(a) ? Cf(a) :ob(a, b);
31805
+}
31806
+function Af(a) {
31807
+return function() {
31808
+return a;
31809
+};
31810
+}
31811
+function Bf(a) {
31812
+return a;
31813
+}
31814
+function Cf(a) {
31815
+return Kb(pb(a, !0));
31816
+}
31817
+function Df(a, b) {
31818
+return Lb(a + "", pb(b, !0));
31819
+}
31820
+function Ef(a, b, c) {
31821
+if (null == c) {
31822
+var d = Ae(b), e = d && _g(b), f = e && e.length && Eb(b, e);
31823
+(f ? f.length :d) || (f = !1, c = b, b = a, a = this);
31824
+}
31825
+f || (f = Eb(b, _g(b)));
31826
+var g = !0, h = -1, i = ze(a), j = f.length;
31827
+c === !1 ? g = !1 :Ae(c) && "chain" in c && (g = c.chain);
31828
+for (;++h < j; ) {
31829
+var k = f[h], l = b[k];
31830
+a[k] = l, i && (a.prototype[k] = function(b) {
31831
+return function() {
31832
+var c = this.__chain__;
31833
+if (g || c) {
31834
+var d = a(this.__wrapped__);
31835
+return (d.__actions__ = Za(this.__actions__)).push({
31836
+func:b,
31837
+args:arguments,
31838
+thisArg:a
31839
+}), d.__chain__ = c, d;
31840
+}
31841
+var e = [ this.value() ];
31842
+return kg.apply(e, arguments), b.apply(a, e);
31843
+};
31844
+}(l));
31845
+}
31846
+return a;
31847
+}
31848
+function Ff() {
31849
+return o._ = cg, this;
31850
+}
31851
+function Gf() {}
31852
+function Hf(a) {
31853
+return Ob(a + "");
31854
+}
31855
+function If(a) {
31856
+return function(b) {
31857
+return null == a ? v :a[b];
31858
+};
31859
+}
31860
+function Jf(a, b, c) {
31861
+c && xc(a, b, c) && (b = c = null), a = +a || 0, c = null == c ? 1 :+c || 0, null == b ? (b = a, a = 0) :b = +b || 0;
31862
+for (var d = -1, e = wg(gg((b - a) / (c || 1)), 0), f = Mf(e); ++d < e; ) f[d] = a, a += c;
31863
+return f;
31864
+}
31865
+function Kf(a, b, c) {
31866
+if (a = +a, 1 > a || !ug(a)) return [];
31867
+var d = -1, e = Mf(xg(a, Eg));
31868
+for (b = Zb(b, c, 1); ++d < a; ) Eg > d ? e[d] = b(d) :b(d);
31869
+return e;
31870
+}
31871
+function Lf(a) {
31872
+var b = ++ag;
31873
+return d(a) + b;
31874
+}
31875
+o = o ? Wa.defaults(Ra.Object(), o, Wa.pick(Ra, Ha)) :Ra;
31876
+var Mf = o.Array, Nf = o.Date, Of = o.Error, Pf = o.Function, Qf = o.Math, Rf = o.Number, Sf = o.Object, Tf = o.RegExp, Uf = o.String, Vf = o.TypeError, Wf = Mf.prototype, Xf = Sf.prototype, Yf = (Yf = o.window) && Yf.document, Zf = Pf.prototype.toString, $f = Ob("length"), _f = Xf.hasOwnProperty, ag = 0, bg = Xf.toString, cg = o._, dg = Tf("^" + kf(bg).replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"), eg = De(eg = o.ArrayBuffer) && eg, fg = De(fg = eg && new eg(0).slice) && fg, gg = Qf.ceil, hg = o.clearTimeout, ig = Qf.floor, jg = De(jg = Sf.getPrototypeOf) && jg, kg = Wf.push, lg = Xf.propertyIsEnumerable, mg = De(mg = o.Set) && mg, ng = o.setTimeout, og = Wf.splice, pg = De(pg = o.Uint8Array) && pg, qg = De(qg = o.WeakMap) && qg, rg = function() {
31877
+try {
31878
+var a = De(a = o.Float64Array) && a, b = new a(new eg(10), 0, 1) && a;
31879
+} catch (c) {}
31880
+return b;
31881
+}(), sg = De(sg = Mf.isArray) && sg, tg = De(tg = Sf.create) && tg, ug = o.isFinite, vg = De(vg = Sf.keys) && vg, wg = Qf.max, xg = Qf.min, yg = De(yg = Nf.now) && yg, zg = De(zg = Rf.isFinite) && zg, Ag = o.parseInt, Bg = Qf.random, Cg = Rf.NEGATIVE_INFINITY, Dg = Rf.POSITIVE_INFINITY, Eg = Qf.pow(2, 32) - 1, Fg = Eg - 1, Gg = Eg >>> 1, Hg = rg ? rg.BYTES_PER_ELEMENT :0, Ig = Qf.pow(2, 53) - 1, Jg = qg && new qg(), Kg = V.support = {};
31163 31882
 !function() {
31164
-var a = function() {
31165
-this.x = 1;
31166
-}, b = {
31167
-"0":1,
31168
-length:1
31169
-}, d = [];
31170
-a.prototype = {
31171
-valueOf:1,
31172
-y:1
31173
-};
31174
-for (var e in new a()) d.push(e);
31175
-for (e in arguments) ;
31176
-hd.argsClass = Kc.call(arguments) == M, hd.argsObject = arguments.constructor == Bc && !(arguments instanceof uc), hd.enumErrorProps = Tc.call(Gc, "message") || Tc.call(Gc, "name"), hd.enumPrototypes = Tc.call(a, "prototype"), hd.funcDecomp = !qa(c.WinRTError) && H.test(o), hd.funcNames = "string" == typeof yc.name, hd.nonEnumArgs = 0 != e, hd.nonEnumShadows = !/valueOf/.test(d), hd.ownLast = "x" != d[0], hd.spliceObjects = (Fc.splice.call(b, 0, 1), !b[0]), hd.unindexedChars = "x"[0] + Bc("x")[0] != "xx";
31883
+Kg.funcDecomp = !De(o.WinRTError) && Da.test(u), Kg.funcNames = "string" == typeof Pf.name;
31177 31884
 try {
31178
-hd.nodeClass = !(Kc.call(document) == T && !({
31179
-toString:0
31180
-} + ""));
31181
-} catch (f) {
31182
-hd.nodeClass = !0;
31885
+Kg.dom = 11 === Yf.createDocumentFragment().nodeType;
31886
+} catch (a) {
31887
+Kg.dom = !1;
31183 31888
 }
31184
-}(1), q.templateSettings = {
31185
-escape:/<%-([\s\S]+?)%>/g,
31186
-evaluate:/<%([\s\S]+?)%>/g,
31187
-interpolate:E,
31889
+try {
31890
+Kg.nonEnumArgs = !lg.call(arguments, 1);
31891
+} catch (a) {
31892
+Kg.nonEnumArgs = !0;
31893
+}
31894
+}(0, 0), V.templateSettings = {
31895
+escape:ra,
31896
+evaluate:sa,
31897
+interpolate:ta,
31188 31898
 variable:"",
31189 31899
 imports:{
31190
-_:q
31191
-}
31192
-};
31193
-var id = function(a) {
31194
-var b = "var index, iterable = " + a.firstArg + ", result = " + a.init + ";\nif (!iterable) return result;\n" + a.top + ";";
31195
-a.array ? (b += "\nvar length = iterable.length; index = -1;\nif (" + a.array + ") {  ", hd.unindexedChars && (b += "\n  if (isString(iterable)) {\n    iterable = iterable.split('')\n  }  "), b += "\n  while (++index < length) {\n    " + a.loop + ";\n  }\n}\nelse {  ") :hd.nonEnumArgs && (b += "\n  var length = iterable.length; index = -1;\n  if (length && isArguments(iterable)) {\n    while (++index < length) {\n      index += '';\n      " + a.loop + ";\n    }\n  } else {  "), hd.enumPrototypes && (b += "\n  var skipProto = typeof iterable == 'function';\n  "), hd.enumErrorProps && (b += "\n  var skipErrorProps = iterable === errorProto || iterable instanceof Error;\n  ");
31196
-var c = [];
31197
-if (hd.enumPrototypes && c.push('!(skipProto && index == "prototype")'), hd.enumErrorProps && c.push('!(skipErrorProps && (index == "message" || index == "name"))'), a.useHas && a.keys) b += "\n  var ownIndex = -1,\n      ownProps = objectTypes[typeof iterable] && keys(iterable),\n      length = ownProps ? ownProps.length : 0;\n\n  while (++ownIndex < length) {\n    index = ownProps[ownIndex];\n", c.length && (b += "    if (" + c.join(" && ") + ") {\n  "), b += a.loop + ";    ", c.length && (b += "\n    }"), b += "\n  }  "; else if (b += "\n  for (index in iterable) {\n", a.useHas && c.push("hasOwnProperty.call(iterable, index)"), c.length && (b += "    if (" + c.join(" && ") + ") {\n  "), b += a.loop + ";    ", c.length && (b += "\n    }"), b += "\n  }    ", hd.nonEnumShadows) {
31198
-for (b += "\n\n  if (iterable !== objectProto) {\n    var ctor = iterable.constructor,\n        isProto = iterable === (ctor && ctor.prototype),\n        className = iterable === stringProto ? stringClass : iterable === errorProto ? errorClass : toString.call(iterable),\n        nonEnum = nonEnumProps[className];\n      ", k = 0; 7 > k; k++) b += "\n    index = '" + a.shadowedProps[k] + "';\n    if ((!(isProto && nonEnum[index]) && hasOwnProperty.call(iterable, index))", a.useHas || (b += " || (!nonEnum[index] && iterable[index] !== objectProto[index])"), b += ") {\n      " + a.loop + ";\n    }      ";
31199
-b += "\n  }    ";
31900
+_:V
31200 31901
 }
31201
-return (a.array || hd.nonEnumArgs) && (b += "\n}"), b += a.bottom + ";\nreturn result";
31202 31902
 };
31203
-Yc || (ba = function() {
31903
+var Lg = function() {
31204 31904
 function a() {}
31205 31905
 return function(b) {
31206
-if (La(b)) {
31906
+if (Ae(b)) {
31207 31907
 a.prototype = b;
31208
-var d = new a();
31908
+var c = new a();
31209 31909
 a.prototype = null;
31210 31910
 }
31211
-return d || c.Object();
31212
-};
31213
-}());
31214
-var jd = Xc ? function(a, b) {
31215
-Y.value = b, Xc(a, "__bindData__", Y);
31216
-} :hc;
31217
-hd.argsClass || (ta = function(a) {
31218
-return a && "object" == typeof a && "number" == typeof a.length && Rc.call(a, "callee") && !Tc.call(a, "callee") || !1;
31219
-});
31220
-var kd = Zc || function(a) {
31221
-return a && "object" == typeof a && "number" == typeof a.length && Kc.call(a) == N || !1;
31222
-}, ld = na({
31223
-args:"object",
31224
-init:"[]",
31225
-top:"if (!(objectTypes[typeof object])) return result",
31226
-loop:"result.push(index)"
31227
-}), md = ad ? function(a) {
31228
-return La(a) ? hd.enumPrototypes && "function" == typeof a || hd.nonEnumArgs && a.length && ta(a) ? ld(a) :ad(a) :[];
31229
-} :ld, nd = {
31230
-args:"collection, callback, thisArg",
31231
-top:"callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3)",
31232
-array:"typeof length == 'number'",
31233
-keys:md,
31234
-loop:"if (callback(iterable[index], index, collection) === false) return result"
31235
-}, od = {
31236
-args:"object, source, guard",
31237
-top:"var args = arguments,\n    argsIndex = 0,\n    argsLength = typeof guard == 'number' ? 2 : args.length;\nwhile (++argsIndex < argsLength) {\n  iterable = args[argsIndex];\n  if (iterable && objectTypes[typeof iterable]) {",
31238
-keys:md,
31239
-loop:"if (typeof result[index] == 'undefined') result[index] = iterable[index]",
31240
-bottom:"  }\n}"
31241
-}, pd = {
31242
-top:"if (!objectTypes[typeof iterable]) return result;\n" + nd.top,
31243
-array:!1
31244
-}, qd = {
31245
-"&":"&amp;",
31246
-"<":"&lt;",
31247
-">":"&gt;",
31248
-'"':"&quot;",
31249
-"'":"&#39;"
31250
-}, rd = Da(qd), sd = Cc("(" + md(rd).join("|") + ")", "g"), td = Cc("[" + md(qd).join("") + "]", "g"), ud = na(nd), vd = na(od, {
31251
-top:od.top.replace(";", ";\nif (argsLength > 3 && typeof args[argsLength - 2] == 'function') {\n  var callback = baseCreateCallback(args[--argsLength - 1], args[argsLength--], 2);\n} else if (argsLength > 2 && typeof args[argsLength - 1] == 'function') {\n  callback = args[--argsLength];\n}"),
31252
-loop:"result[index] = callback ? callback(result[index], iterable[index]) : iterable[index]"
31253
-}), wd = na(od), xd = na(nd, pd, {
31254
-useHas:!1
31255
-}), yd = na(nd, pd);
31256
-Ka(/x/) && (Ka = function(a) {
31257
-return "function" == typeof a && Kc.call(a) == R;
31258
-});
31259
-var zd = Qc ? function(a) {
31260
-if (!a || Kc.call(a) != T || !hd.argsClass && ta(a)) return !1;
31261
-var b = a.valueOf, c = qa(b) && (c = Qc(b)) && Qc(c);
31262
-return c ? a == c || Qc(a) == c :ra(a);
31263
-} :ra, Ad = la(function(a, b, c) {
31264
-Rc.call(a, c) ? a[c]++ :a[c] = 1;
31265
-}), Bd = la(function(a, b, c) {
31266
-(Rc.call(a, c) ? a[c] :a[c] = []).push(b);
31267
-}), Cd = la(function(a, b, c) {
31911
+return c || o.Object();
31912
+};
31913
+}(), Mg = Jg ? function(a, b) {
31914
+return Jg.set(a, b), a;
31915
+} :Bf;
31916
+fg || ($b = eg && pg ? function(a) {
31917
+var b = a.byteLength, c = rg ? ig(b / Hg) :0, d = c * Hg, e = new eg(b);
31918
+if (c) {
31919
+var f = new rg(e, 0, c);
31920
+f.set(new rg(a, 0, c));
31921
+}
31922
+return b != d && (f = new pg(e, d), f.set(new pg(a, d))), e;
31923
+} :Af(null));
31924
+var Ng = tg && mg ? function(a) {
31925
+return new Va(a);
31926
+} :Af(null), Og = Jg ? function(a) {
31927
+return Jg.get(a);
31928
+} :Gf, Pg = function() {
31929
+var a = 0, b = 0;
31930
+return function(c, d) {
31931
+var e = Wg(), f = J - (e - b);
31932
+if (b = e, f > 0) {
31933
+if (++a >= I) return c;
31934
+} else a = 0;
31935
+return Mg(c, d);
31936
+};
31937
+}(), Qg = bc(function(a, b, c) {
31938
+_f.call(a, c) ? ++a[c] :a[c] = 1;
31939
+}), Rg = bc(function(a, b, c) {
31940
+_f.call(a, c) ? a[c].push(b) :a[c] = [ b ];
31941
+}), Sg = bc(function(a, b, c) {
31268 31942
 a[c] = b;
31269
-}), Dd = gb, Ed = ab, Fd = qa(Fd = wc.now) && Fd || function() {
31270
-return new wc().getTime();
31271
-}, Gd = 8 == dd(x + "08") ? dd :function(a, b) {
31272
-return dd(Qa(a) ? a.replace(F, "") :a, b || 0);
31273
-};
31274
-return q.after = Ob, q.assign = vd, q.at = Za, q.bind = Pb, q.bindAll = Qb, q.bindKey = Rb, q.chain = pc, q.compact = sb, q.compose = Sb, q.constant = bc, q.countBy = Ad, q.create = wa, q.createCallback = cc, q.curry = Tb, q.debounce = Ub, q.defaults = wd, q.defer = Vb, q.delay = Wb, q.difference = tb, q.filter = ab, q.flatten = xb, q.forEach = db, q.forEachRight = eb, q.forIn = xd, q.forInRight = za, q.forOwn = yd, q.forOwnRight = Aa, q.functions = Ba, q.groupBy = Bd, q.indexBy = Cd, q.initial = zb, q.intersection = Ab, q.invert = Da, q.invoke = fb, q.keys = md, q.map = gb, q.mapValues = Sa, q.max = hb, q.memoize = Xb, q.merge = Ta, q.min = ib, q.omit = Ua, q.once = Yb, q.pairs = Va, q.partial = Zb, q.partialRight = $b, q.pick = Wa, q.pluck = Dd, q.property = ic, q.pull = Db, q.range = Eb, q.reject = lb, q.remove = Fb, q.rest = Gb, q.shuffle = nb, q.sortBy = qb, q.tap = qc, q.throttle = _b, q.times = mc, q.toArray = rb, q.transform = Xa, q.union = Ib, q.uniq = Jb, q.values = Ya, q.where = Ed, 
31275
-q.without = Kb, q.wrap = ac, q.xor = Lb, q.zip = Mb, q.zipObject = Nb, q.collect = gb, q.drop = Gb, q.each = db, q.eachRight = eb, q.extend = vd, q.methods = Ba, q.object = Nb, q.select = ab, q.tail = Gb, q.unique = Jb, q.unzip = Mb, fc(q), q.clone = ua, q.cloneDeep = va, q.contains = $a, q.escape = dc, q.every = _a, q.find = bb, q.findIndex = ub, q.findKey = xa, q.findLast = cb, q.findLastIndex = vb, q.findLastKey = ya, q.has = Ca, q.identity = ec, q.indexOf = yb, q.isArguments = ta, q.isArray = kd, q.isBoolean = Ea, q.isDate = Fa, q.isElement = Ga, q.isEmpty = Ha, q.isEqual = Ia, q.isFinite = Ja, q.isFunction = Ka, q.isNaN = Ma, q.isNull = Na, q.isNumber = Oa, q.isObject = La, q.isPlainObject = zd, q.isRegExp = Pa, q.isString = Qa, q.isUndefined = Ra, q.lastIndexOf = Cb, q.mixin = fc, q.noConflict = gc, q.noop = hc, q.now = Fd, q.parseInt = Gd, q.random = jc, q.reduce = jb, q.reduceRight = kb, q.result = kc, q.runInContext = o, q.size = ob, q.some = pb, q.sortedIndex = Hb, q.template = lc, 
31276
-q.unescape = nc, q.uniqueId = oc, q.all = _a, q.any = pb, q.detect = bb, q.findWhere = bb, q.foldl = jb, q.foldr = kb, q.include = $a, q.inject = jb, fc(function() {
31943
+}), Tg = gc(db), Ug = gc(eb, !0), Vg = bc(function(a, b, c) {
31944
+a[c ? 0 :1].push(b);
31945
+}, function() {
31946
+return [ [], [] ];
31947
+}), Wg = yg || function() {
31948
+return new Nf().getTime();
31949
+}, Xg = sg || function(a) {
31950
+return n(a) && yc(a.length) && bg.call(a) == Q || !1;
31951
+};
31952
+Kg.dom || (ve = function(a) {
31953
+return a && 1 === a.nodeType && n(a) && !Zg(a) || !1;
31954
+});
31955
+var Yg = zg || function(a) {
31956
+return "number" == typeof a && ug(a);
31957
+};
31958
+(ze(/x/) || pg && !ze(pg)) && (ze = function(a) {
31959
+return bg.call(a) == U;
31960
+});
31961
+var Zg = jg ? function(a) {
31962
+if (!a || bg.call(a) != X) return !1;
31963
+var b = a.valueOf, c = De(b) && (c = jg(b)) && jg(c);
31964
+return c ? a == c || jg(a) == c :Ec(a);
31965
+} :Ec, $g = cc(kb), _g = vg ? function(a) {
31966
+if (a) var b = a.constructor, c = a.length;
31967
+return "function" == typeof b && b.prototype === a || "function" != typeof a && c && yc(c) ? Fc(a) :Ae(a) ? vg(a) :[];
31968
+} :Fc, ah = cc(Mb), bh = ec(function(a, b, c) {
31969
+return b = b.toLowerCase(), a + (c ? b.charAt(0).toUpperCase() + b.slice(1) :b);
31970
+}), ch = ec(function(a, b, c) {
31971
+return a + (c ? "-" :"") + b.toLowerCase();
31972
+});
31973
+8 != Ag(Ga + "08") && (of = function(a, b, c) {
31974
+return (c ? xc(a, b, c) :null == b) ? b = 0 :b && (b = +b), a = sf(a), Ag(a, b || (xa.test(a) ? 16 :10));
31975
+});
31976
+var dh = ec(function(a, b, c) {
31977
+return a + (c ? "_" :"") + b.toLowerCase();
31978
+}), eh = ec(function(a, b, c) {
31979
+return a + (c ? " " :"") + (b.charAt(0).toUpperCase() + b.slice(1));
31980
+});
31981
+return Z.prototype = Lg(V.prototype), _.prototype = Lg(Z.prototype), _.prototype.constructor = _, Pa.prototype["delete"] = Qa, Pa.prototype.get = Sa, Pa.prototype.has = Ta, Pa.prototype.set = Ua, Va.prototype.push = Ya, he.Cache = Pa, V.after = Wd, V.ary = Xd, V.assign = $g, V.at = Ad, V.before = Yd, V.bind = Zd, V.bindAll = $d, V.bindKey = _d, V.callback = zf, V.chain = rd, V.chunk = Jc, V.compact = Kc, V.constant = Af, V.countBy = Qg, V.create = Me, V.curry = ae, V.curryRight = be, V.debounce = ce, V.defaults = Ne, V.defer = de, V.delay = ee, V.difference = Lc, V.drop = Mc, V.dropRight = Nc, V.dropRightWhile = Oc, V.dropWhile = Pc, V.fill = Qc, V.filter = Dd, V.flatten = Uc, V.flattenDeep = Vc, V.flow = fe, V.flowRight = ge, V.forEach = Hd, V.forEachRight = Id, V.forIn = Qe, V.forInRight = Re, V.forOwn = Se, V.forOwnRight = Te, V.functions = Ue, V.groupBy = Rg, V.indexBy = Sg, V.initial = Xc, V.intersection = Yc, V.invert = We, V.invoke = Jd, V.keys = _g, V.keysIn = Xe, V.map = Kd, V.mapValues = Ye, 
31982
+V.matches = Cf, V.matchesProperty = Df, V.memoize = he, V.merge = ah, V.mixin = Ef, V.negate = ie, V.omit = Ze, V.once = je, V.pairs = $e, V.partial = ke, V.partialRight = le, V.partition = Vg, V.pick = _e, V.pluck = Ld, V.property = Hf, V.propertyOf = If, V.pull = _c, V.pullAt = ad, V.range = Jf, V.rearg = me, V.reject = Od, V.remove = bd, V.rest = cd, V.shuffle = Qd, V.slice = dd, V.sortBy = Td, V.sortByAll = Ud, V.spread = ne, V.take = gd, V.takeRight = hd, V.takeRightWhile = id, V.takeWhile = jd, V.tap = sd, V.throttle = oe, V.thru = td, V.times = Kf, V.toArray = Ke, V.toPlainObject = Le, V.transform = bf, V.union = kd, V.uniq = ld, V.unzip = md, V.values = cf, V.valuesIn = df, V.where = Vd, V.without = nd, V.wrap = pe, V.xor = od, V.zip = pd, V.zipObject = qd, V.backflow = ge, V.collect = Kd, V.compose = ge, V.each = Hd, V.eachRight = Id, V.extend = $g, V.iteratee = zf, V.methods = Ue, V.object = qd, V.select = Dd, V.tail = cd, V.unique = ld, Ef(V, V), V.attempt = yf, V.camelCase = bh, 
31983
+V.capitalize = ff, V.clone = qe, V.cloneDeep = re, V.deburr = gf, V.endsWith = hf, V.escape = jf, V.escapeRegExp = kf, V.every = Cd, V.find = Ed, V.findIndex = Rc, V.findKey = Oe, V.findLast = Fd, V.findLastIndex = Sc, V.findLastKey = Pe, V.findWhere = Gd, V.first = Tc, V.has = Ve, V.identity = Bf, V.includes = Bd, V.indexOf = Wc, V.isArguments = se, V.isArray = Xg, V.isBoolean = te, V.isDate = ue, V.isElement = ve, V.isEmpty = we, V.isEqual = xe, V.isError = ye, V.isFinite = Yg, V.isFunction = ze, V.isMatch = Be, V.isNaN = Ce, V.isNative = De, V.isNull = Ee, V.isNumber = Fe, V.isObject = Ae, V.isPlainObject = Zg, V.isRegExp = Ge, V.isString = He, V.isTypedArray = Ie, V.isUndefined = Je, V.kebabCase = ch, V.last = Zc, V.lastIndexOf = $c, V.max = Tg, V.min = Ug, V.noConflict = Ff, V.noop = Gf, V.now = Wg, V.pad = lf, V.padLeft = mf, V.padRight = nf, V.parseInt = of, V.random = ef, V.reduce = Md, V.reduceRight = Nd, V.repeat = pf, V.result = af, V.runInContext = u, V.size = Rd, V.snakeCase = dh, 
31984
+V.some = Sd, V.sortedIndex = ed, V.sortedLastIndex = fd, V.startCase = eh, V.startsWith = qf, V.template = rf, V.trim = sf, V.trimLeft = tf, V.trimRight = uf, V.trunc = vf, V.unescape = wf, V.uniqueId = Lf, V.words = xf, V.all = Cd, V.any = Sd, V.contains = Bd, V.detect = Ed, V.foldl = Md, V.foldr = Nd, V.head = Tc, V.include = Bd, V.inject = Md, Ef(V, function() {
31277 31985
 var a = {};
31278
-return yd(q, function(b, c) {
31279
-q.prototype[c] || (a[c] = b);
31986
+return Cb(V, function(b, c) {
31987
+V.prototype[c] || (a[c] = b);
31280 31988
 }), a;
31281
-}(), !1), q.first = wb, q.last = Bb, q.sample = mb, q.take = wb, q.head = wb, yd(q, function(a, b) {
31282
-var c = "sample" !== b;
31283
-q.prototype[b] || (q.prototype[b] = function(b, d) {
31284
-var e = this.__chain__, f = a(this.__wrapped__, b, d);
31285
-return e || null != b && (!d || c && "function" == typeof b) ? new r(f, e) :f;
31286
-});
31287
-}), q.VERSION = "2.4.1", q.prototype.chain = rc, q.prototype.toString = sc, q.prototype.value = tc, q.prototype.valueOf = tc, ud([ "join", "pop", "shift" ], function(a) {
31288
-var b = Fc[a];
31289
-q.prototype[a] = function() {
31290
-var a = this.__chain__, c = b.apply(this.__wrapped__, arguments);
31291
-return a ? new r(c, a) :c;
31292
-};
31293
-}), ud([ "push", "reverse", "sort", "unshift" ], function(a) {
31294
-var b = Fc[a];
31295
-q.prototype[a] = function() {
31296
-return b.apply(this.__wrapped__, arguments), this;
31297
-};
31298
-}), ud([ "concat", "slice", "splice" ], function(a) {
31299
-var b = Fc[a];
31300
-q.prototype[a] = function() {
31301
-return new r(b.apply(this.__wrapped__, arguments), this.__chain__);
31302
-};
31303
-}), hd.spliceObjects || ud([ "pop", "shift", "splice" ], function(a) {
31304
-var b = Fc[a], c = "splice" == a;
31305
-q.prototype[a] = function() {
31306
-var a = this.__chain__, d = this.__wrapped__, e = b.apply(d, arguments);
31307
-return 0 === d.length && delete d[0], a || c ? new r(e, a) :e;
31308
-};
31309
-}), q;
31310
-}
31311
-var p, q = [], r = [], s = 0, t = {}, u = +new Date() + "", v = 75, w = 40, x = " 	\f \ufeff\n\r\u2028\u2029 ᠎              ", y = /\b__p \+= '';/g, z = /\b(__p \+=) '' \+/g, A = /(__e\(.*?\)|\b__t\)) \+\n'';/g, B = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, C = /\w*$/, D = /^\s*function[ \n\r\t]+\w/, E = /<%=([\s\S]+?)%>/g, F = RegExp("^[" + x + "]*0+(?=.$)"), G = /($^)/, H = /\bthis\b/, I = /['\n\r\t\u2028\u2029\\]/g, J = [ "Array", "Boolean", "Date", "Error", "Function", "Math", "Number", "Object", "RegExp", "String", "_", "attachEvent", "clearTimeout", "isFinite", "isNaN", "parseInt", "setTimeout" ], K = [ "constructor", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "toLocaleString", "toString", "valueOf" ], L = 0, M = "[object Arguments]", N = "[object Array]", O = "[object Boolean]", P = "[object Date]", Q = "[object Error]", R = "[object Function]", S = "[object Number]", T = "[object Object]", U = "[object RegExp]", V = "[object String]", W = {};
31312
-W[R] = !1, W[M] = W[N] = W[O] = W[P] = W[S] = W[T] = W[U] = W[V] = !0;
31313
-var X = {
31989
+}(), !1), V.sample = Pd, V.prototype.sample = function(a) {
31990
+return this.__chain__ || null != a ? this.thru(function(b) {
31991
+return Pd(b, a);
31992
+}) :Pd(this.value());
31993
+}, V.VERSION = w, $a([ "bind", "bindKey", "curry", "curryRight", "partial", "partialRight" ], function(a) {
31994
+V[a].placeholder = V;
31995
+}), $a([ "filter", "map", "takeWhile" ], function(a, b) {
31996
+var c = b == K, d = b == M;
31997
+_.prototype[a] = function(a, e) {
31998
+var f = this.clone(), g = f.__filtered__, h = f.__iteratees__ || (f.__iteratees__ = []);
31999
+return f.__filtered__ = g || c || d && f.__dir__ < 0, h.push({
32000
+iteratee:pc(a, e, 3),
32001
+type:b
32002
+}), f;
32003
+};
32004
+}), $a([ "drop", "take" ], function(a, b) {
32005
+var c = "__" + a + "Count__", d = a + "While";
32006
+_.prototype[a] = function(d) {
32007
+d = null == d ? 1 :wg(ig(d) || 0, 0);
32008
+var e = this.clone();
32009
+if (e.__filtered__) {
32010
+var f = e[c];
32011
+e[c] = b ? xg(f, d) :f + d;
32012
+} else {
32013
+var g = e.__views__ || (e.__views__ = []);
32014
+g.push({
32015
+size:d,
32016
+type:a + (e.__dir__ < 0 ? "Right" :"")
32017
+});
32018
+}
32019
+return e;
32020
+}, _.prototype[a + "Right"] = function(b) {
32021
+return this.reverse()[a](b).reverse();
32022
+}, _.prototype[a + "RightWhile"] = function(a, b) {
32023
+return this.reverse()[d](a, b).reverse();
32024
+};
32025
+}), $a([ "first", "last" ], function(a, b) {
32026
+var c = "take" + (b ? "Right" :"");
32027
+_.prototype[a] = function() {
32028
+return this[c](1).value()[0];
32029
+};
32030
+}), $a([ "initial", "rest" ], function(a, b) {
32031
+var c = "drop" + (b ? "" :"Right");
32032
+_.prototype[a] = function() {
32033
+return this[c](1);
32034
+};
32035
+}), $a([ "pluck", "where" ], function(a, b) {
32036
+var c = b ? "filter" :"map", d = b ? Kb :Ob;
32037
+_.prototype[a] = function(a) {
32038
+return this[c](d(a));
32039
+};
32040
+}), _.prototype.compact = function() {
32041
+return this.filter(Bf);
32042
+}, _.prototype.dropWhile = function(a, b) {
32043
+var c;
32044
+return a = pc(a, b, 3), this.filter(function(b, d, e) {
32045
+return c || (c = !a(b, d, e));
32046
+});
32047
+}, _.prototype.reject = function(a, b) {
32048
+return a = pc(a, b, 3), this.filter(function(b, c, d) {
32049
+return !a(b, c, d);
32050
+});
32051
+}, _.prototype.slice = function(a, b) {
32052
+a = null == a ? 0 :+a || 0;
32053
+var c = 0 > a ? this.takeRight(-a) :this.drop(a);
32054
+return "undefined" != typeof b && (b = +b || 0, c = 0 > b ? c.dropRight(-b) :c.take(b - a)), c;
32055
+}, _.prototype.toArray = function() {
32056
+return this.drop(0);
32057
+}, Cb(_.prototype, function(a, b) {
32058
+var c = V[b], d = /^(?:first|last)$/.test(b);
32059
+V.prototype[b] = function() {
32060
+var b = this.__wrapped__, e = arguments, f = this.__chain__, g = !!this.__actions__.length, h = b instanceof _, i = h && !g;
32061
+if (d && !f) return i ? a.call(b) :c.call(V, this.value());
32062
+var j = function(a) {
32063
+var b = [ a ];
32064
+return kg.apply(b, e), c.apply(V, b);
32065
+};
32066
+if (h || Xg(b)) {
32067
+var k = i ? b :new _(this), l = a.apply(k, e);
32068
+if (!d && (g || l.__actions__)) {
32069
+var m = l.__actions__ || (l.__actions__ = []);
32070
+m.push({
32071
+func:td,
32072
+args:[ j ],
32073
+thisArg:V
32074
+});
32075
+}
32076
+return new Z(l, f);
32077
+}
32078
+return this.thru(j);
32079
+};
32080
+}), $a([ "concat", "join", "pop", "push", "shift", "sort", "splice", "unshift" ], function(a) {
32081
+var b = Wf[a], c = /^(?:push|sort|unshift)$/.test(a) ? "tap" :"thru", d = /^(?:join|pop|shift)$/.test(a);
32082
+V.prototype[a] = function() {
32083
+var a = arguments;
32084
+return d && !this.__chain__ ? b.apply(this.value(), a) :this[c](function(c) {
32085
+return b.apply(c, a);
32086
+});
32087
+};
32088
+}), _.prototype.clone = Ma, _.prototype.reverse = Na, _.prototype.value = Oa, V.prototype.chain = ud, V.prototype.commit = vd, V.prototype.plant = wd, V.prototype.reverse = xd, V.prototype.toString = yd, V.prototype.run = V.prototype.toJSON = V.prototype.valueOf = V.prototype.value = zd, V.prototype.collect = V.prototype.map, V.prototype.head = V.prototype.first, V.prototype.select = V.prototype.filter, V.prototype.tail = V.prototype.rest, V;
32089
+}
32090
+var v, w = "3.2.0", x = 1, y = 2, z = 4, A = 8, B = 16, C = 32, D = 64, E = 128, F = 256, G = 30, H = "...", I = 150, J = 16, K = 0, L = 1, M = 2, N = "Expected a function", O = "__lodash_placeholder__", P = "[object Arguments]", Q = "[object Array]", R = "[object Boolean]", S = "[object Date]", T = "[object Error]", U = "[object Function]", V = "[object Map]", W = "[object Number]", X = "[object Object]", Y = "[object RegExp]", Z = "[object Set]", $ = "[object String]", _ = "[object WeakMap]", aa = "[object ArrayBuffer]", ba = "[object Float32Array]", ca = "[object Float64Array]", da = "[object Int8Array]", ea = "[object Int16Array]", fa = "[object Int32Array]", ga = "[object Uint8Array]", ha = "[object Uint8ClampedArray]", ia = "[object Uint16Array]", ja = "[object Uint32Array]", ka = /\b__p \+= '';/g, la = /\b(__p \+=) '' \+/g, ma = /(__e\(.*?\)|\b__t\)) \+\n'';/g, na = /&(?:amp|lt|gt|quot|#39|#96);/g, oa = /[&<>"'`+"`"+`]/g, pa = RegExp(na.source), qa = RegExp(oa.source), ra = /<%-([\s\S]+?)%>/g, sa = /<%([\s\S]+?)%>/g, ta = /<%=([\s\S]+?)%>/g, ua = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, va = /\w*$/, wa = /^\s*function[ \n\r\t]+\w/, xa = /^0[xX]/, ya = /^\[object .+?Constructor\]$/, za = /[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g, Aa = /($^)/, Ba = /[.*+?^${}()|[\]\/\\]/g, Ca = RegExp(Ba.source), Da = /\bthis\b/, Ea = /['\n\r\u2028\u2029\\]/g, Fa = function() {
32091
+var a = "[A-Z\\xc0-\\xd6\\xd8-\\xde]", b = "[a-z\\xdf-\\xf6\\xf8-\\xff]+";
32092
+return RegExp(a + "{2,}(?=" + a + b + ")|" + a + "?" + b + "|" + a + "+|[0-9]+", "g");
32093
+}(), Ga = " 	\f \ufeff\n\r\u2028\u2029 ᠎              ", Ha = [ "Array", "ArrayBuffer", "Date", "Error", "Float32Array", "Float64Array", "Function", "Int8Array", "Int16Array", "Int32Array", "Math", "Number", "Object", "RegExp", "Set", "String", "_", "clearTimeout", "document", "isFinite", "parseInt", "setTimeout", "TypeError", "Uint8Array", "Uint8ClampedArray", "Uint16Array", "Uint32Array", "WeakMap", "window", "WinRTError" ], Ia = -1, Ja = {};
32094
+Ja[ba] = Ja[ca] = Ja[da] = Ja[ea] = Ja[fa] = Ja[ga] = Ja[ha] = Ja[ia] = Ja[ja] = !0, Ja[P] = Ja[Q] = Ja[aa] = Ja[R] = Ja[S] = Ja[T] = Ja[U] = Ja[V] = Ja[W] = Ja[X] = Ja[Y] = Ja[Z] = Ja[$] = Ja[_] = !1;
32095
+var Ka = {};
32096
+Ka[P] = Ka[Q] = Ka[aa] = Ka[R] = Ka[S] = Ka[ba] = Ka[ca] = Ka[da] = Ka[ea] = Ka[fa] = Ka[W] = Ka[X] = Ka[Y] = Ka[$] = Ka[ga] = Ka[ha] = Ka[ia] = Ka[ja] = !0, Ka[T] = Ka[U] = Ka[V] = Ka[Z] = Ka[_] = !1;
32097
+var La = {
31314 32098
 leading:!1,
31315 32099
 maxWait:0,
31316 32100
 trailing:!1
31317
-}, Y = {
31318
-configurable:!1,
31319
-enumerable:!1,
31320
-value:null,
31321
-writable:!1
31322
-}, Z = {
31323
-args:"",
31324
-array:null,
31325
-bottom:"",
31326
-firstArg:"",
31327
-init:"",
31328
-keys:null,
31329
-loop:"",
31330
-shadowedProps:null,
31331
-support:null,
31332
-top:"",
31333
-useHas:!1
31334
-}, $ = {
31335
-"boolean":!1,
32101
+}, Ma = {
32102
+"À":"A",
32103
+"Á":"A",
32104
+"Â":"A",
32105
+"Ã":"A",
32106
+"Ä":"A",
32107
+"Å":"A",
32108
+"à":"a",
32109
+"á":"a",
32110
+"â":"a",
32111
+"ã":"a",
32112
+"ä":"a",
32113
+"å":"a",
32114
+"Ç":"C",
32115
+"ç":"c",
32116
+"Ð":"D",
32117
+"ð":"d",
32118
+"È":"E",
32119
+"É":"E",
32120
+"Ê":"E",
32121
+"Ë":"E",
32122
+"è":"e",
32123
+"é":"e",
32124
+"ê":"e",
32125
+"ë":"e",
32126
+"Ì":"I",
32127
+"Í":"I",
32128
+"Î":"I",
32129
+"Ï":"I",
32130
+"ì":"i",
32131
+"í":"i",
32132
+"î":"i",
32133
+"ï":"i",
32134
+"Ñ":"N",
32135
+"ñ":"n",
32136
+"Ò":"O",
32137
+"Ó":"O",
32138
+"Ô":"O",
32139
+"Õ":"O",
32140
+"Ö":"O",
32141
+"Ø":"O",
32142
+"ò":"o",
32143
+"ó":"o",
32144
+"ô":"o",
32145
+"õ":"o",
32146
+"ö":"o",
32147
+"ø":"o",
32148
+"Ù":"U",
32149
+"Ú":"U",
32150
+"Û":"U",
32151
+"Ü":"U",
32152
+"ù":"u",
32153
+"ú":"u",
32154
+"û":"u",
32155
+"ü":"u",
32156
+"Ý":"Y",
32157
+"ý":"y",
32158
+"ÿ":"y",
32159
+"Æ":"Ae",
32160
+"æ":"ae",
32161
+"Þ":"Th",
32162
+"þ":"th",
32163
+"ß":"ss"
32164
+}, Na = {
32165
+"&":"&amp;",
32166
+"<":"&lt;",
32167
+">":"&gt;",
32168
+'"':"&quot;",
32169
+"'":"&#39;",
32170
+"`+"`"+`":"&#96;"
32171
+}, Oa = {
32172
+"&amp;":"&",
32173
+"&lt;":"<",
32174
+"&gt;":">",
32175
+"&quot;":'"',
32176
+"&#39;":"'",
32177
+"&#96;":"`+"`"+`"
32178
+}, Pa = {
31336 32179
 "function":!0,
31337
-object:!0,
31338
-number:!1,
31339
-string:!1,
31340
-undefined:!1
31341
-}, _ = {
32180
+object:!0
32181
+}, Qa = {
31342 32182
 "\\":"\\",
31343 32183
 "'":"'",
31344 32184
 "\n":"n",
31345 32185
 "\r":"r",
31346
-"	":"t",
31347 32186
 "\u2028":"u2028",
31348 32187
 "\u2029":"u2029"
31349
-}, aa = $[typeof window] && window || this, ba = $[typeof exports] && exports && !exports.nodeType && exports, ca = $[typeof module] && module && !module.nodeType && module, da = ca && ca.exports === ba && ba, ea = $[typeof global] && global;
31350
-!ea || ea.global !== ea && ea.window !== ea || (aa = ea);
31351
-var fa = o();
31352
-"function" == typeof define && "object" == typeof define.amd && define.amd ? (aa._ = fa, define(function() {
31353
-return fa;
31354
-})) :ba && ca ? da ? (ca.exports = fa)._ = fa :ba._ = fa :aa._ = fa;
32188
+}, Ra = Pa[typeof window] && window !== (this && this.window) ? window :this, Sa = Pa[typeof exports] && exports && !exports.nodeType && exports, Ta = Pa[typeof module] && module && !module.nodeType && module, Ua = Sa && Ta && "object" == typeof global && global;
32189
+!Ua || Ua.global !== Ua && Ua.window !== Ua && Ua.self !== Ua || (Ra = Ua);
32190
+var Va = Ta && Ta.exports === Sa && Sa, Wa = u();
32191
+"function" == typeof define && "object" == typeof define.amd && define.amd ? (Ra._ = Wa, define(function() {
32192
+return Wa;
32193
+})) :Sa && Ta ? Va ? (Ta.exports = Wa)._ = Wa :Sa._ = Wa :Ra._ = Wa;
31355 32194
 }.call(this), function() {
31356 32195
 function a(a, b) {
31357 32196
 b = b || {
... ...
@@ -31369,26 +32208,42 @@ var HawtioMainNav;
31369 31369
 
31370 31370
 !function(a) {
31371 31371
 function b(a) {
31372
-return new h(a);
31372
+return new j(a);
31373 31373
 }
31374 31374
 function c(a) {
31375 31375
 return "isValid" in a ? _.isFunction(a.isValid) ? a.isValid() :!1 :!0;
31376 31376
 }
31377 31377
 function d(a, b) {
31378 31378
 !("isSelected" in b) && "href" in b && (b.isSelected = function() {
31379
-return a.path() === b.href() || 0 === a.path().indexOf(b.href() + "/");
31379
+var a = $("<a>").attr("href", b.href()), c = new URI(a[0].href), d = new URI(), e = d.path(), f = d.query(!0), g = f["main-tab"], h = f["sub-tab"], i = !1;
31380
+return i = b.isSubTab ? h ? h === b.id :_.startsWith(e, c.path()) :g ? g === b.id :_.startsWith(e, c.path());
31380 31381
 });
31381 31382
 }
31382 31383
 function e(a, b, d, e, f) {
31383 31384
 if (c(f)) {
31384 31385
 var g = d.$new();
31385
-g.item = f;
31386
+f.hide = function() {
31387
+return f.show && !f.show();
31388
+}, g.item = f;
31386 31389
 var h = null;
31387 31390
 h = _.isFunction(f.template) ? f.template() :a.get("templates/main-nav/navItem.html"), e.append(b(h)(g));
31388 31391
 }
31389 31392
 }
31393
+function f(a) {
31394
+var b = [];
31395
+return a.forEach(function(a) {
31396
+g(a, b);
31397
+}), b;
31398
+}
31399
+function g(a, b) {
31400
+if (!("rank" in a) || 0 === b.length) return void b.push(a);
31401
+var c = _.findIndex(b, function(b) {
31402
+return "rank" in b && a.rank > b.rank ? !0 :void 0;
31403
+});
31404
+"rank" in b[0] || (c = 0), 0 > c ? b.push(a) :b.splice(c, 0, a);
31405
+}
31390 31406
 a.pluginName = "hawtio-nav";
31391
-var f = Logger.get(a.pluginName), g = function() {
31407
+var h = Logger.get(a.pluginName), i = function() {
31392 31408
 function a() {}
31393 31409
 return Object.defineProperty(a, "ADD", {
31394 31410
 get:function() {
... ...
@@ -31416,8 +32271,8 @@ enumerable:!0,
31416 31416
 configurable:!0
31417 31417
 }), a;
31418 31418
 }();
31419
-a.Actions = g;
31420
-var h = function() {
31419
+a.Actions = i;
31420
+var j = function() {
31421 31421
 function b(a) {
31422 31422
 this.items = [], this.root = a;
31423 31423
 }
... ...
@@ -31505,7 +32360,7 @@ this.root.dispatchEvent(f);
31505 31505
 }, b;
31506 31506
 }();
31507 31507
 a.createRegistry = b;
31508
-var i = function() {
31508
+var k = function() {
31509 31509
 function a() {
31510 31510
 this.self = {
31511 31511
 id:""
... ...
@@ -31521,6 +32376,8 @@ var e = c.join("/");
31521 31521
 return e;
31522 31522
 }, a.prototype.id = function(a) {
31523 31523
 return this.self.id = a, this;
31524
+}, a.prototype.rank = function(a) {
31525
+return this.self.rank = a, this;
31524 31526
 }, a.prototype.title = function(a) {
31525 31527
 return this.self.title = a, this;
31526 31528
 }, a.prototype.page = function(a) {
... ...
@@ -31537,26 +32394,30 @@ return this.self.click = a, this;
31537 31537
 return this.self.isSelected = a, this;
31538 31538
 }, a.prototype.isValid = function(a) {
31539 31539
 return this.self.isValid = a, this;
31540
+}, a.prototype.show = function(a) {
31541
+return this.self.show = a, this;
31540 31542
 }, a.prototype.template = function(a) {
31541 31543
 return this.self.template = a, this;
31544
+}, a.prototype.defaultPage = function(a) {
31545
+return this.self.defaultPage = a, this;
31542 31546
 }, a.prototype.tabs = function(a) {
31543 31547
 for (var b = [], c = 1; c < arguments.length; c++) b[c - 1] = arguments[c];
31544 31548
 return this.self.tabs = _.union(this.self.tabs, [ a ], b), this;
31545
-}, a.prototype.subPath = function(b, c, d, e, f) {
31546
-var g = this.self;
31549
+}, a.prototype.subPath = function(b, c, d, e, f, g) {
31550
+var h = this.self;
31547 31551
 this.self.tabs || (this.self.tabs = []);
31548
-var h = {
31552
+var i = {
31549 31553
 id:"",
31550 31554
 title:function() {
31551 31555
 return b;
31552 31556
 },
31553 31557
 href:function() {
31554
-return g.href ? a.join(g.href(), c) :c;
31558
+return h.href ? a.join(h.href(), c) :c;
31555 31559
 }
31556 31560
 };
31557
-return _.isUndefined(d) || (h.page = function() {
31561
+return _.isUndefined(d) || (i.page = function() {
31558 31562
 return d;
31559
-}), _.isUndefined(e) || (h.reload = e), _.isUndefined(f) || (h.isValid = f), this.self.tabs.push(h), this;
31563
+}), _.isUndefined(e) || (i.rank = e), _.isUndefined(f) || (i.reload = f), _.isUndefined(g) || (i.isValid = g), this.self.tabs.push(i), this;
31560 31564
 }, a.prototype.build = function() {
31561 31565
 var a = _.cloneDeep(this.self);
31562 31566
 return this.self = {
... ...
@@ -31564,34 +32425,124 @@ id:""
31564 31564
 }, a;
31565 31565
 }, a;
31566 31566
 }();
31567
-a.NavItemBuilderImpl = i, a.createBuilder = function() {
31567
+a.NavItemBuilderImpl = k, a.createBuilder = function() {
31568 31568
 return new a.NavItemBuilderImpl();
31569 31569
 };
31570
-var j = angular.module(a.pluginName, []);
31571
-a._module = j, j.constant("layoutFull", "templates/main-nav/layoutFull.html"), j.controller("HawtioNav.ViewController", [ "$scope", "$route", "$location", "layoutFull", "viewRegistry", function(a, b, c, d, e) {
31570
+var l = angular.module(a.pluginName, [ "ngRoute" ]);
31571
+a._module = l, l.constant("layoutFull", "templates/main-nav/layoutFull.html"), l.config([ "$routeProvider", function(a) {
31572
+a.otherwise({
31573
+templateUrl:"templates/main-nav/welcome.html"
31574
+});
31575
+} ]), l.controller("HawtioNav.WelcomeController", [ "$scope", "$location", "WelcomePageRegistry", "HawtioNav", "$timeout", function(a, b, c, d, e) {
31576
+function g(a) {
31577
+if (a && a.href) {
31578
+var c = new URI(a.href()), d = _.merge(b.search(), c.query(!0));
31579
+h.debug("Going to item id: ", a.id, " href: ", c.path(), " query: ", d), e(function() {
31580
+b.path(c.path()).search(d);
31581
+}, 10);
31582
+}
31583
+}
31584
+function i() {
31585
+var a = [];
31586
+d.iterate(function(b) {
31587
+var c = b.isValid || function() {
31588
+return !0;
31589
+}, d = b.show || function() {
31590
+return !0;
31591
+};
31592
+c() && d() && a.push(b);
31593
+});
31594
+var b = f(a);
31595
+g(b[0]);
31596
+}
31597
+e(function() {
31598
+function a() {
31599
+0 === c.pages.length && (h.debug("No welcome pages, going to first available nav"), i());
31600
+var a = _.sortBy(c.pages, function(a) {
31601
+return a.rank;
31602
+}), b = _.find(a, function(a) {
31603
+return "isValid" in a ? a.isValid() :!0;
31604
+});
31605
+b ? g(item) :i();
31606
+}
31607
+function e(b) {
31608
+if (0 === b.length) return void a();
31609
+var c = b.pop(), d = b;
31610
+if (h.debug("Trying candidate: ", c, " remaining: ", d), !c) return void a();
31611
+var f = c.defaultPage.isValid;
31612
+if (f) {
31613
+var i = function() {
31614
+g(c);
31615
+}, j = function() {
31616
+e(d);
31617
+};
31618
+try {
31619
+f(i, j);
31620
+} catch (k) {
31621
+h.debug("Failed to eval item: ", c.id, " error: ", k), j();
31622
+}
31623
+} else e(d);
31624
+}
31625
+var f = b.search();
31626
+if (f.tab) {
31627
+var j, k = f.tab;
31628
+if (d.iterate(function(a) {
31629
+j || a.id !== k || (j = a);
31630
+}), j) return void g(j);
31631
+}
31632
+var l = [];
31633
+d.iterate(function(a) {
31634
+if ("defaultPage" in a) {
31635
+var b = a.defaultPage;
31636
+if (!("rank" in b)) return void l.push(a);
31637
+var c = _.findIndex(l, function(b) {
31638
+return "rank" in b && a.rank > b.rank ? !0 :void 0;
31639
+});
31640
+0 > c ? l.push(a) :l.splice(c, 0, a);
31641
+}
31642
+}), e(l);
31643
+}, 500);
31644
+} ]), l.controller("HawtioNav.ViewController", [ "$scope", "$route", "$location", "layoutFull", "viewRegistry", function(a, b, c, d, e) {
31645
+function f(a) {
31646
+var b = void 0;
31647
+if (!a || 0 === _.keys(a).length) return void h.debug("No query, skipping query matching");
31648
+var c = _.keys(e), d = _.filter(c, function(a) {
31649
+return "{" === a.charAt(0);
31650
+});
31651
+return d.forEach(function(c) {
31652
+if (!b) try {
31653
+var d = angular.fromJson(c);
31654
+_.isObject(d) && _.merge(d, a, function(a, d) {
31655
+a && (b = a === d ? e[c] :void 0);
31656
+});
31657
+} catch (f) {
31658
+h.debug("Unable to parse json: ", c);
31659
+}
31660
+}), b;
31661
+}
31572 31662
 function g(a) {
31573 31663
 var b = void 0;
31574 31664
 return _.forIn(e, function(c, d) {
31575 31665
 if (!b) try {
31576 31666
 var e = new RegExp(d, "");
31577 31667
 e.exec(a) && (b = c);
31578
-} catch (g) {
31579
-f.debug("Invalid RegExp " + text + " for viewRegistry value: " + c);
31668
+} catch (f) {
31669
+h.debug("Invalid RegExp " + text + " for viewRegistry value: " + c);
31580 31670
 }
31581 31671
 }), b;
31582 31672
 }
31583
-function h() {
31584
-var b = null, e = c.search(), h = e.tab;
31585
-if (angular.isString(h) && (b = g(h)), !b) {
31673
+function i() {
31674
+var b = null, e = c.search();
31675
+if (b = f(e), b && h.debug("View partial matched on query"), !b) {
31586 31676
 var i = c.path();
31587
-i && (b = g(i));
31677
+i && (b = g(i), b && h.debug("View partial matched on path name"));
31588 31678
 }
31589
-return b || (b = d), a.viewPartial = b, f.debug("Using view partial: " + b), b;
31679
+return b || (b = d, h.debug("Using default view partial")), a.viewPartial = b, h.debug("Using view partial: " + b), b;
31590 31680
 }
31591
-h(), a.$on("$routeChangeSuccess", function() {
31592
-h();
31681
+i(), a.$on("$routeChangeSuccess", function() {
31682
+i();
31593 31683
 });
31594
-} ]), j.run([ "HawtioNav", "$rootScope", function(b, c) {
31684
+} ]), l.run([ "HawtioNav", "$rootScope", "$route", function(b, c, d) {
31595 31685
 b.on(a.Actions.CHANGED, "$apply", function() {
31596 31686
 c.$$phase || c.$apply();
31597 31687
 }), b.on(a.Actions.ADD, "$apply", function(a) {
... ...
@@ -31602,61 +32553,76 @@ c.$apply();
31602 31602
 } catch (d) {}
31603 31603
 b && b(a);
31604 31604
 };
31605
-}), f.debug("loaded");
31605
+}), d.reload(), h.debug("loaded");
31606 31606
 } ]), hawtioPluginLoader.addModule(a.pluginName), hawtioPluginLoader.addModule("ngRoute"), a._module.directive("hawtioSubTabs", [ "HawtioNav", "$templateCache", "$compile", "$location", "$rootScope", function(a, b, c) {
31607 31607
 return {
31608 31608
 restrict:"A",
31609 31609
 controller:[ "$scope", function(b) {
31610
-b.nav = a, b.redraw = !0, b.$watch("nav.selected()", function(a, c) {
31611
-a !== c && (b.redraw = !0);
31610
+b.nav = a, b.redraw = !0, b.$watch("nav.selected().length", function() {
31611
+b.redraw = !0;
31612
+}), b.$watchCollection("nav.selected()", function() {
31613
+b.redraw = !0;
31612 31614
 }), b.$on("hawtio-nav-redraw", function() {
31613 31615
 b.redraw = !0;
31614 31616
 });
31615 31617
 } ],
31616
-link:function(d, f, g) {
31618
+link:function(d, g, h) {
31617 31619
 d.$watch("redraw", function() {
31618
-f.empty();
31619
-var h = a.selected();
31620
-if (h && h.tabs) {
31621
-if (g.showHeading) {
31622
-var i = angular.extend({}, h, {
31620
+g.empty();
31621
+var i = a.selected();
31622
+if (i && i.tabs) {
31623
+if (h.showHeading) {
31624
+var j = angular.extend({}, i, {
31623 31625
 template:function() {
31624 31626
 return b.get("templates/main-nav/subTabHeader.html");
31625 31627
 }
31626 31628
 });
31627
-e(b, c, d, f, i);
31629
+e(b, c, d, g, j);
31628 31630
 }
31629
-h.tabs.forEach(function(a) {
31630
-e(b, c, d, f, a);
31631
+var k = f(i.tabs);
31632
+k.forEach(function(a) {
31633
+e(b, c, d, g, a);
31631 31634
 });
31632 31635
 }
31633 31636
 d.redraw = !1;
31634 31637
 });
31635 31638
 }
31636 31639
 };
31637
-} ]), a._module.directive("hawtioMainNav", [ "HawtioNav", "$templateCache", "$compile", "$location", "$rootScope", function(b, f, g, h) {
31638
-var i = {
31640
+} ]), a._module.directive("hawtioMainNav", [ "HawtioNav", "$templateCache", "$compile", "$location", "$rootScope", function(b, f, h, i) {
31641
+var j = {
31639 31642
 nav:{},
31640 31643
 numKeys:0,
31641 31644
 numValid:0
31642
-}, j = function(a) {
31643
-c(a) && (i.numValid = i.numValid + 1);
31645
+}, k = function(a) {
31646
+c(a) && (j.numValid = j.numValid + 1);
31644 31647
 };
31645
-return b.on(a.Actions.ADD, "isSelectedEnricher", function(a) {
31646
-d(h, a), a.tabs && a.tabs.forEach(function(a) {
31647
-d(h, a);
31648
+return b.on(a.Actions.ADD, "subTabEnricher", function(a) {
31649
+a.tabs && a.tabs.length > 0 && a.tabs.forEach(function(b) {
31650
+b.isSubTab = !0, b.oldHref || (b.oldHref = b.href, b.href = function() {
31651
+var c = new URI(b.oldHref());
31652
+return c.setSearch("main-tab", a.id), c.setSearch("sub-tab", b.id), c.search(_.merge(new URI().query(!0), c.query(!0))), c.toString();
31653
+});
31654
+});
31655
+}), b.on(a.Actions.ADD, "hrefEnricher", function(a) {
31656
+a.isSubTab = !1, a.href && !a.oldHref && (a.oldHref = a.href, a.href = function() {
31657
+var b = new URI(a.oldHref());
31658
+return b.setSearch("main-tab", a.id), b.search(_.merge(new URI().query(!0), b.query(!0))), b.removeSearch("sub-tab"), b.toString();
31659
+});
31660
+}), b.on(a.Actions.ADD, "isSelectedEnricher", function(a) {
31661
+d(i, a), a.tabs && a.tabs.forEach(function(a) {
31662
+d(i, a);
31648 31663
 });
31649 31664
 }), b.on(a.Actions.ADD, "PrimaryController", function(a) {
31650
-i.nav[a.id] = a;
31665
+j.nav[a.id] = a;
31651 31666
 }), b.on(a.Actions.REMOVE, "PrimaryController", function(a) {
31652
-delete i.nav[a.id];
31667
+delete j.nav[a.id];
31653 31668
 }), b.on(a.Actions.CHANGED, "PrimaryController", function(a) {
31654
-i.numKeys = a.length, i.numValid = 0, a.forEach(j);
31669
+j.numKeys = a.length, j.numValid = 0, a.forEach(k);
31655 31670
 }), {
31656 31671
 restrict:"A",
31657 31672
 replace:!1,
31658 31673
 controller:[ "$scope", "$element", "$attrs", function(a) {
31659
-a.config = i, a.redraw = !0, a.$watch("config.numKeys", function(b, c) {
31674
+a.config = j, a.redraw = !0, a.$watch("config.numKeys", function(b, c) {
31660 31675
 b !== c && (a.redraw = !0);
31661 31676
 }), a.$watch("config.numValid", function(b, c) {
31662 31677
 b !== c && (a.redraw = !0);
... ...
@@ -31666,18 +32632,28 @@ a.redraw = !0;
31666 31666
 } ],
31667 31667
 link:function(a, c) {
31668 31668
 a.$watch(function() {
31669
-var d = i.numValid;
31670
-i.numValid = 0, b.iterate(j), i.numValid !== d && (a.redraw = !0), a.redraw ? (a.redraw = !1, c.empty(), b.iterate(function(b) {
31671
-"context" in b && b.context && e(f, g, a, c, b);
31672
-}), b.iterate(function(b) {
31673
-b.context || e(f, g, a, c, b);
31674
-})) :(i.numValid = 0, b.iterate(j));
31669
+var d = j.numValid;
31670
+if (j.numValid = 0, b.iterate(k), j.numValid !== d && (a.redraw = !0), a.redraw) {
31671
+a.redraw = !1, c.empty();
31672
+var i = [];
31673
+b.iterate(function(a) {
31674
+"context" in a && a.context && g(a, i);
31675
+}), i.forEach(function(b) {
31676
+e(f, h, a, c, b);
31677
+});
31678
+var l = [];
31679
+b.iterate(function(a) {
31680
+a.context || g(a, l);
31681
+}), l.forEach(function(b) {
31682
+e(f, h, a, c, b);
31683
+});
31684
+} else j.numValid = 0, b.iterate(k);
31675 31685
 });
31676 31686
 }
31677 31687
 };
31678 31688
 } ]), a._module.provider("HawtioNavBuilder", [ function() {
31679 31689
 function b(a, b) {
31680
-f.debug("Setting route: ", b.href(), " to template URL: ", b.page());
31690
+h.debug("Setting route: ", b.href(), " to template URL: ", b.page());
31681 31691
 var c = {
31682 31692
 templateUrl:b.page()
31683 31693
 };
... ...
@@ -31687,11 +32663,11 @@ this.$get = function() {
31687 31687
 return {};
31688 31688
 }, this.create = function() {
31689 31689
 return a.createBuilder();
31690
-}, this.join = i.join, this.configureRouting = function(a, c) {
31690
+}, this.join = k.join, this.configureRouting = function(a, c) {
31691 31691
 if (_.isUndefined(c.page)) {
31692 31692
 if (c.tabs) {
31693 31693
 var d = _.first(c.tabs).href;
31694
-d && (f.debug("Setting route: ", c.href(), " to redirect to ", d()), a.when(c.href(), {
31694
+d && (h.debug("Setting route: ", c.href(), " to redirect to ", d()), a.when(c.href(), {
31695 31695
 reloadOnSearch:c.reload,
31696 31696
 redirectTo:d()
31697 31697
 }));
... ...
@@ -31720,12 +32696,16 @@ getLabels:function() {
31720 31720
 return [];
31721 31721
 }
31722 31722
 };
31723
+} ]), a._module.factory("WelcomePageRegistry", [ function() {
31724
+return {
31725
+pages:[]
31726
+};
31723 31727
 } ]), a._module.factory("HawtioNav", [ "$window", "$rootScope", function() {
31724 31728
 var b = a.createRegistry(window);
31725 31729
 return b;
31726 31730
 } ]);
31727 31731
 }(HawtioMainNav || (HawtioMainNav = {})), angular.module("hawtio-nav").run([ "$templateCache", function(a) {
31728
-a.put("templates/main-nav/layoutFull.html", "<div ng-view></div>\n\n\n"), a.put("templates/main-nav/navItem.html", '<li ng-class="{ active: item.isSelected() }">\n  <a ng-href="{{item.href()}}" ng-click="item.click($event)">{{item.title()}}</a>\n</li>\n'), a.put("templates/main-nav/subTabHeader.html", '<li class="header">\n  <a href=""><strong>{{item.title()}}</strong></a>\n</li>\n');
31732
+a.put("templates/main-nav/layoutFull.html", "<div ng-view></div>\n\n\n"), a.put("templates/main-nav/layoutTest.html", "<div>\n  <h1>Test Layout</h1>\n  <div ng-view>\n\n\n  </div>\n</div>\n\n\n"), a.put("templates/main-nav/navItem.html", '<li ng-class="{ active: item.isSelected() }" ng-hide="item.hide()">\n  <a ng-href="{{item.href()}}" ng-click="item.click($event)" ng-bind-html="item.title()"></a>\n</li>\n'), a.put("templates/main-nav/subTabHeader.html", '<li class="header">\n  <a href=""><strong>{{item.title()}}</strong></a>\n</li>\n'), a.put("templates/main-nav/welcome.html", '<div ng-controller="HawtioNav.WelcomeController"></div>\n');
31729 31733
 } ]);
31730 31734
 
31731 31735
 var HawtioExtensionService;
... ...
@@ -59500,7 +60480,7 @@ var _views_project_nav_html = []byte(`<div class="navbar-project">
59500 59500
 </div>
59501 59501
 <div class="col-md-4 active-filters">
59502 59502
 </div>
59503
-<div class="col-md-2" style="margin-top: 30px"><a href="/project/{{projectName}}/catalog" class="btn btn-lg btn-primary">Create <i class="fa fa-plus"/></a></div>
59503
+<div class="col-md-2" style="margin-top: 30px"><a href="project/{{projectName}}/catalog" class="btn btn-lg btn-primary">Create <i class="fa fa-plus"/></a></div>
59504 59504
 </div>
59505 59505
 </div>
59506 59506
 </div>
... ...
@@ -60024,7 +61004,7 @@ var _views_images_html = []byte(`<div ng-controller="ProjectController" class="c
60024 60024
 <div style="margin-bottom: 10px" ng-repeat="image in images">
60025 60025
 <h3>{{image.dockerImageReference | imageName}} <span class="small">({{image.metadata.name}})</span></h3>
60026 60026
 <div>Created: <relative-timestamp timestamp="image.metadata.creationTimestamp"></relative-timestamp></div>
60027
-<div ng-if="build = (image | buildForImage : builds)">Created from: Build {{build.metadata.labels.buildconfig}} (<a href="/project/{{projectName}}/browse/builds" class="small" title="{{build.metadata.name}}">{{build.metadata.name.substr(0, 10)}}</a>)
60027
+<div ng-if="build = (image | buildForImage : builds)">Created from: Build {{build.metadata.labels.buildconfig}} (<a href="project/{{projectName}}/browse/builds" class="small" title="{{build.metadata.name}}">{{build.metadata.name.substr(0, 10)}}</a>)
60028 60028
 </div>
60029 60029
 </div>
60030 60030
 </div></project-page>
... ...
@@ -60312,7 +61292,7 @@ func views_project_html() ([]byte, error) {
60312 60312
 var _views_projects_html = []byte(`<div class="container">
60313 60313
 <h1>Projects</h1>
60314 60314
 <div class="tile tile-project tile-click" style="margin-bottom: 10px" ng-repeat="project in projects">
60315
-<h2 class="project"><a class="tile-target" href="/project/{{project.metadata.name}}">{{project.displayName || project.metadata.name}}</a></h2>
60315
+<h2 class="project"><a class="tile-target" href="project/{{project.metadata.name}}">{{project.displayName || project.metadata.name}}</a></h2>
60316 60316
 <div class="muted" style="margin-top: -5px" ng-if="project | annotation : 'description'">{{project | annotation : 'description'}}</div>
60317 60317
 </div>
60318 60318
 <div ng-if="emptyMessage && (projects | hashSize) == 0">{{emptyMessage}}</div>
... ...
@@ -1,6 +1,7 @@
1 1
 package assets
2 2
 
3 3
 import (
4
+	"bytes"
4 5
 	"compress/gzip"
5 6
 	"encoding/hex"
6 7
 	"fmt"
... ...
@@ -76,20 +77,24 @@ func CacheControlHandler(version string, h http.Handler) http.Handler {
76 76
 	})
77 77
 }
78 78
 
79
-func HTML5ModeHandler(h http.Handler) http.Handler {
79
+// HTML5ModeHandler will serve any static assets we know about, all other paths
80
+// are assumed to be HTML5 paths for the console application and index.html will
81
+// be served.
82
+// contextRoot must contain leading and trailing slashes, e.g. /console/
83
+func HTML5ModeHandler(contextRoot string, h http.Handler) (http.Handler, error) {
84
+	b, err := Asset("index.html")
85
+	if err != nil {
86
+		return nil, err
87
+	}
88
+	b = bytes.Replace(b, []byte(`<base href="/">`), []byte(fmt.Sprintf(`<base href="%s">`, contextRoot)), 1)
89
+
80 90
 	return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
81 91
 		if _, err := Asset(strings.TrimPrefix(r.URL.Path, "/")); err != nil {
82
-			b, err := Asset("index.html")
83
-			if err != nil {
84
-				http.Error(w, "Failed to read index.html", http.StatusInternalServerError)
85
-				return
86
-			} else {
87
-				w.Write(b)
88
-				return
89
-			}
92
+			w.Write(b)
93
+			return
90 94
 		}
91 95
 		h.ServeHTTP(w, r)
92
-	})
96
+	}), nil
93 97
 }
94 98
 
95 99
 var configTemplate = template.Must(template.New("webConsoleConfig").Parse(`
... ...
@@ -134,7 +139,7 @@ type WebConsoleConfig struct {
134 134
 
135 135
 func GeneratedConfigHandler(config WebConsoleConfig, h http.Handler) http.Handler {
136 136
 	return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
137
-		if r.URL.Path == "/config.js" {
137
+		if strings.TrimPrefix(r.URL.Path, "/") == "config.js" {
138 138
 			w.Header().Add("Cache-Control", "no-cache, no-store")
139 139
 			if err := configTemplate.Execute(w, config); err != nil {
140 140
 				glog.Errorf("Unable to render config template: %v", err)
... ...
@@ -126,9 +126,10 @@ func ValidateAssetConfig(config *api.AssetConfig) errs.ValidationErrorList {
126 126
 	if len(urlErrs) > 0 {
127 127
 		allErrs = append(allErrs, urlErrs...)
128 128
 	}
129
-	// TODO: remove once this is configurable
130
-	if urlObj != nil && urlObj.Path != "/console" {
131
-		allErrs = append(allErrs, errs.NewFieldInvalid("publicURL", config.PublicURL, "must be located at the /console path"))
129
+	if urlObj != nil {
130
+		if !strings.HasSuffix(urlObj.Path, "/") {
131
+			allErrs = append(allErrs, errs.NewFieldInvalid("publicURL", config.PublicURL, "must have a trailing slash in path"))
132
+		}
132 133
 	}
133 134
 
134 135
 	return allErrs
... ...
@@ -141,6 +142,23 @@ func ValidateMasterConfig(config *api.MasterConfig) errs.ValidationErrorList {
141 141
 
142 142
 	if config.AssetConfig != nil {
143 143
 		allErrs = append(allErrs, ValidateAssetConfig(config.AssetConfig).Prefix("assetConfig")...)
144
+		colocated := config.AssetConfig.ServingInfo.BindAddress == config.ServingInfo.BindAddress
145
+		if colocated {
146
+			publicURL, _ := url.Parse(config.AssetConfig.PublicURL)
147
+			if publicURL.Path == "/" {
148
+				allErrs = append(allErrs, errs.NewFieldInvalid("assetConfig.publicURL", config.AssetConfig.PublicURL, "path can not be / when colocated with master API"))
149
+			}
150
+		}
151
+
152
+		if config.OAuthConfig != nil && config.OAuthConfig.AssetPublicURL != config.AssetConfig.PublicURL {
153
+			allErrs = append(allErrs,
154
+				errs.NewFieldInvalid("assetConfig.publicURL", config.AssetConfig.PublicURL, "must match oauthConfig.assetPublicURL"),
155
+				errs.NewFieldInvalid("oauthConfig.assetPublicURL", config.OAuthConfig.AssetPublicURL, "must match assetConfig.publicURL"),
156
+			)
157
+		}
158
+
159
+		// TODO warn when the CORS list does not include the assetConfig.publicURL host:port
160
+		// only warn cause they could handle CORS headers themselves in a proxy
144 161
 	}
145 162
 
146 163
 	if config.DNSConfig != nil {
... ...
@@ -17,11 +17,11 @@ import (
17 17
 	"github.com/openshift/origin/pkg/version"
18 18
 )
19 19
 
20
-// InstallSupport registers endpoints for an OAuth2 server into the provided mux,
20
+// InstallAPI adds handlers for serving static assets into the provided mux,
21 21
 // then returns an array of strings indicating what endpoints were started
22 22
 // (these are format strings that will expect to be sent a single string value).
23 23
 func (c *AssetConfig) InstallAPI(container *restful.Container) []string {
24
-	assetHandler, err := c.handler()
24
+	assetHandler, err := c.buildHandler()
25 25
 	if err != nil {
26 26
 		glog.Fatal(err)
27 27
 	}
... ...
@@ -37,8 +37,10 @@ func (c *AssetConfig) InstallAPI(container *restful.Container) []string {
37 37
 	return []string{fmt.Sprintf("Started OpenShift UI %%s%s", publicURL.Path)}
38 38
 }
39 39
 
40
+// Run starts an http server for the static assets listening on the configured
41
+// bind address
40 42
 func (c *AssetConfig) Run() {
41
-	assetHandler, err := c.handler()
43
+	assetHandler, err := c.buildHandler()
42 44
 	if err != nil {
43 45
 		glog.Fatal(err)
44 46
 	}
... ...
@@ -50,9 +52,11 @@ func (c *AssetConfig) Run() {
50 50
 
51 51
 	mux := http.NewServeMux()
52 52
 	mux.Handle(publicURL.Path, http.StripPrefix(publicURL.Path, assetHandler))
53
-	mux.HandleFunc("/", func(w http.ResponseWriter, req *http.Request) {
54
-		http.Redirect(w, req, publicURL.Path, http.StatusFound)
55
-	})
53
+	if publicURL.Path != "/" {
54
+		mux.HandleFunc("/", func(w http.ResponseWriter, req *http.Request) {
55
+			http.Redirect(w, req, publicURL.Path, http.StatusFound)
56
+		})
57
+	}
56 58
 
57 59
 	server := &http.Server{
58 60
 		Addr:           c.Options.ServingInfo.BindAddress,
... ...
@@ -73,7 +77,7 @@ func (c *AssetConfig) Run() {
73 73
 			glog.Infof("OpenShift UI listening at https://%s", c.Options.ServingInfo.BindAddress)
74 74
 			glog.Fatal(server.ListenAndServeTLS(c.Options.ServingInfo.ServerCert.CertFile, c.Options.ServingInfo.ServerCert.KeyFile))
75 75
 		} else {
76
-			glog.Infof("OpenShift UI listening at https://%s", c.Options.ServingInfo.BindAddress)
76
+			glog.Infof("OpenShift UI listening at http://%s", c.Options.ServingInfo.BindAddress)
77 77
 			glog.Fatal(server.ListenAndServe())
78 78
 		}
79 79
 	}, 0)
... ...
@@ -84,7 +88,7 @@ func (c *AssetConfig) Run() {
84 84
 	glog.Infof("OpenShift UI available at %s", c.Options.PublicURL)
85 85
 }
86 86
 
87
-func (c *AssetConfig) handler() (http.Handler, error) {
87
+func (c *AssetConfig) buildHandler() (http.Handler, error) {
88 88
 	assets.RegisterMimeTypes()
89 89
 
90 90
 	masterURL, err := url.Parse(c.Options.MasterPublicURL)
... ...
@@ -97,41 +101,44 @@ func (c *AssetConfig) handler() (http.Handler, error) {
97 97
 		return nil, err
98 98
 	}
99 99
 
100
+	publicURL, err := url.Parse(c.Options.PublicURL)
101
+	if err != nil {
102
+		glog.Fatal(err)
103
+	}
104
+
100 105
 	config := assets.WebConsoleConfig{
101 106
 		MasterAddr:        masterURL.Host,
102
-		MasterPrefix:      "/osapi", // TODO: make configurable
107
+		MasterPrefix:      OpenShiftAPIPrefix,
103 108
 		KubernetesAddr:    k8sURL.Host,
104
-		KubernetesPrefix:  "/api", // TODO: make configurable
109
+		KubernetesPrefix:  KubernetesAPIPrefix,
105 110
 		OAuthAuthorizeURI: OpenShiftOAuthAuthorizeURL(masterURL.String()),
106 111
 		OAuthRedirectBase: c.Options.PublicURL,
107 112
 		OAuthClientID:     OpenShiftWebConsoleClientID,
108 113
 		LogoutURI:         c.Options.LogoutURI,
109 114
 	}
110 115
 
111
-	mux := http.NewServeMux()
112
-	mux.Handle("/",
113
-		// Gzip first so that inner handlers can react to the addition of the Vary header
114
-		assets.GzipHandler(
115
-			// Generated config.js can not be cached since it changes depending on startup options
116
-			assets.GeneratedConfigHandler(
117
-				config,
118
-				// Cache control should happen after all Vary headers are added, but before
119
-				// any asset related routing (HTML5ModeHandler and FileServer)
120
-				assets.CacheControlHandler(
121
-					version.Get().GitCommit,
122
-					assets.HTML5ModeHandler(
123
-						http.FileServer(
124
-							&assetfs.AssetFS{
125
-								assets.Asset,
126
-								assets.AssetDir,
127
-								"",
128
-							},
129
-						),
130
-					),
131
-				),
132
-			),
133
-		),
116
+	handler := http.FileServer(
117
+		&assetfs.AssetFS{
118
+			assets.Asset,
119
+			assets.AssetDir,
120
+			"",
121
+		},
134 122
 	)
135 123
 
136
-	return mux, nil
124
+	handler, err = assets.HTML5ModeHandler(publicURL.Path, handler)
125
+	if err != nil {
126
+		return nil, err
127
+	}
128
+
129
+	// Cache control should happen after all Vary headers are added, but before
130
+	// any asset related routing (HTML5ModeHandler and FileServer)
131
+	handler = assets.CacheControlHandler(version.Get().GitCommit, handler)
132
+
133
+	// Generated config.js can not be cached since it changes depending on startup options
134
+	handler = assets.GeneratedConfigHandler(config, handler)
135
+
136
+	// Gzip first so that inner handlers can react to the addition of the Vary header
137
+	handler = assets.GzipHandler(handler)
138
+
139
+	return handler, nil
137 140
 }
... ...
@@ -10,6 +10,7 @@ import (
10 10
 	"net/http"
11 11
 	"os"
12 12
 	"regexp"
13
+	"strings"
13 14
 	"time"
14 15
 
15 16
 	etcdclient "github.com/coreos/go-etcd/etcd"
... ...
@@ -93,7 +94,8 @@ import (
93 93
 )
94 94
 
95 95
 const (
96
-	OpenShiftAPIPrefix        = "/osapi"
96
+	OpenShiftAPIPrefix        = "/osapi" // TODO: make configurable
97
+	KubernetesAPIPrefix       = "/api"   // TODO: make configurable
97 98
 	OpenShiftAPIV1Beta1       = "v1beta1"
98 99
 	OpenShiftAPIPrefixV1Beta1 = OpenShiftAPIPrefix + "/" + OpenShiftAPIV1Beta1
99 100
 	OpenShiftRouteSubdomain   = "router.default.local"
... ...
@@ -269,6 +271,55 @@ func initAPIVersionRoute(root *restful.WebService, version string) {
269 269
 		Consumes(restful.MIME_JSON))
270 270
 }
271 271
 
272
+// If we know the location of the asset server, redirect to it when / is requested
273
+// and the Accept header supports text/html
274
+func assetServerRedirect(handler http.Handler, assetPublicURL string) http.Handler {
275
+	return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
276
+		accept := req.Header.Get("Accept")
277
+		if req.URL.Path == "/" && strings.Contains(accept, "text/html") {
278
+			http.Redirect(w, req, assetPublicURL, http.StatusFound)
279
+		} else {
280
+			// Dispatch to the next handler
281
+			handler.ServeHTTP(w, req)
282
+		}
283
+	})
284
+}
285
+
286
+// TODO We would like to use the IndexHandler from k8s but we do not yet have a
287
+// MuxHelper to track all registered paths
288
+func indexAPIPaths(handler http.Handler) http.Handler {
289
+	return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
290
+		if req.URL.Path == "/" {
291
+			// TODO once we have a MuxHelper we will not need to hardcode this list of paths
292
+			object := api.RootPaths{Paths: []string{
293
+				"/api",
294
+				"/api/v1beta1",
295
+				"/api/v1beta2",
296
+				"/api/v1beta3",
297
+				"/healthz",
298
+				"/healthz/ping",
299
+				"/logs/",
300
+				"/metrics",
301
+				"/osapi",
302
+				"/osapi/v1beta1",
303
+				"/swaggerapi/",
304
+			}}
305
+			// TODO it would be nice if apiserver.writeRawJSON was not private
306
+			output, err := json.MarshalIndent(object, "", "  ")
307
+			if err != nil {
308
+				http.Error(w, err.Error(), http.StatusInternalServerError)
309
+				return
310
+			}
311
+			w.Header().Set("Content-Type", "application/json")
312
+			w.WriteHeader(http.StatusOK)
313
+			w.Write(output)
314
+		} else {
315
+			// Dispatch to the next handler
316
+			handler.ServeHTTP(w, req)
317
+		}
318
+	})
319
+}
320
+
272 321
 // Run launches the OpenShift master. It takes optional installers that may install additional endpoints into the server.
273 322
 // All endpoints get configured CORS behavior
274 323
 // Protected installers' endpoints are protected by API authentication and authorization.
... ...
@@ -293,6 +344,9 @@ func (c *MasterConfig) Run(protected []APIInstaller, unprotected []APIInstaller)
293 293
 	for _, i := range unprotected {
294 294
 		extra = append(extra, i.InstallAPI(open)...)
295 295
 	}
296
+
297
+	handler = indexAPIPaths(handler)
298
+
296 299
 	open.Handle("/", handler)
297 300
 
298 301
 	// install swagger
... ...
@@ -310,6 +364,10 @@ func (c *MasterConfig) Run(protected []APIInstaller, unprotected []APIInstaller)
310 310
 		handler = apiserver.CORS(handler, origins, nil, nil, "true")
311 311
 	}
312 312
 
313
+	if c.Options.AssetConfig != nil {
314
+		handler = assetServerRedirect(handler, c.Options.AssetConfig.PublicURL)
315
+	}
316
+
313 317
 	// Make the outermost filter the requestContextMapper to ensure all components share the same context
314 318
 	if contextHandler, err := kapi.NewRequestContextFilter(c.getRequestContextMapper(), handler); err != nil {
315 319
 		glog.Fatalf("Error setting up request context filter: %v", err)
... ...
@@ -82,27 +82,10 @@ func TestMasterPublicAddressExplicit(t *testing.T) {
82 82
 
83 83
 func TestAssetPublicAddressDefaulting(t *testing.T) {
84 84
 	master := "http://example.com:9011"
85
-	expected := "http://example.com:9012"
86
-
87
-	masterArgs := NewDefaultMasterArgs()
88
-	masterArgs.MasterAddr.Set(master)
89
-
90
-	actual, err := masterArgs.GetAssetPublicAddress()
91
-	if err != nil {
92
-		t.Errorf("unexpected error: %v", err)
93
-	}
94
-	if expected != actual.String() {
95
-		t.Errorf("expected %v, got %v", expected, actual)
96
-	}
97
-}
98
-
99
-func TestAssetPublicAddressExplicit(t *testing.T) {
100
-	master := "http://example.com:9011"
101
-	expected := "https://example.com:9014"
85
+	expected := "http://example.com:9011/console/"
102 86
 
103 87
 	masterArgs := NewDefaultMasterArgs()
104 88
 	masterArgs.MasterAddr.Set(master)
105
-	masterArgs.AssetPublicAddr.Set(expected)
106 89
 
107 90
 	actual, err := masterArgs.GetAssetPublicAddress()
108 91
 	if err != nil {
... ...
@@ -115,24 +98,10 @@ func TestAssetPublicAddressExplicit(t *testing.T) {
115 115
 
116 116
 func TestAssetBindAddressDefaulting(t *testing.T) {
117 117
 	bind := "1.2.3.4:9011"
118
-	expected := "1.2.3.4:9012"
119
-
120
-	masterArgs := NewDefaultMasterArgs()
121
-	masterArgs.ListenArg.ListenAddr.Set(bind)
122
-
123
-	actual := masterArgs.GetAssetBindAddress()
124
-	if expected != actual {
125
-		t.Errorf("expected %v, got %v", expected, actual)
126
-	}
127
-}
128
-
129
-func TestAssetBindAddressExplicit(t *testing.T) {
130
-	bind := "1.2.3.4:9011"
131
-	expected := "2.3.4.5:1234"
118
+	expected := "1.2.3.4:9011"
132 119
 
133 120
 	masterArgs := NewDefaultMasterArgs()
134 121
 	masterArgs.ListenArg.ListenAddr.Set(bind)
135
-	masterArgs.AssetBindAddr.Set(expected)
136 122
 
137 123
 	actual := masterArgs.GetAssetBindAddress()
138 124
 	if expected != actual {
... ...
@@ -29,11 +29,8 @@ type MasterArgs struct {
29 29
 	PortalNet  flagtypes.IPNet
30 30
 	// addresses for external clients
31 31
 	MasterPublicAddr     flagtypes.Addr
32
-	AssetPublicAddr      flagtypes.Addr
33 32
 	KubernetesPublicAddr flagtypes.Addr
34 33
 
35
-	// AssetBindAddr exposed for integration tests to set
36
-	AssetBindAddr flagtypes.Addr
37 34
 	// DNSBindAddr exposed for integration tests to set
38 35
 	DNSBindAddr flagtypes.Addr
39 36
 
... ...
@@ -74,8 +71,6 @@ func NewDefaultMasterArgs() *MasterArgs {
74 74
 		PortalNet:            flagtypes.DefaultIPNet("172.30.17.0/24"),
75 75
 		MasterPublicAddr:     flagtypes.Addr{Value: "localhost:8443", DefaultScheme: "https", DefaultPort: 8443, AllowPrefix: true}.Default(),
76 76
 		KubernetesPublicAddr: flagtypes.Addr{Value: "localhost:8443", DefaultScheme: "https", DefaultPort: 8443, AllowPrefix: true}.Default(),
77
-		AssetPublicAddr:      flagtypes.Addr{Value: "https://localhost:8443/console", DefaultScheme: "https", DefaultPort: 8443, AllowPrefix: true}.Default(),
78
-		AssetBindAddr:        flagtypes.Addr{Value: "0.0.0.0:8443", DefaultScheme: "https", DefaultPort: 8443, AllowPrefix: true}.Default(),
79 77
 		DNSBindAddr:          flagtypes.Addr{Value: "0.0.0.0:53", DefaultScheme: "http", DefaultPort: 53, AllowPrefix: true}.Default(),
80 78
 
81 79
 		ListenArg:          NewDefaultListenArg(),
... ...
@@ -410,25 +405,17 @@ func (args MasterArgs) GetKubernetesPublicAddress() (*url.URL, error) {
410 410
 }
411 411
 
412 412
 func (args MasterArgs) GetAssetPublicAddress() (*url.URL, error) {
413
-	if args.AssetPublicAddr.Provided {
414
-		return args.AssetPublicAddr.URL, nil
415
-	}
416
-	// Derive the asset public address by incrementing the master public address port by 1
417
-	// TODO: derive the scheme/port from the asset bind scheme/port once that is settable via the command line
418 413
 	t, err := args.GetMasterPublicAddress()
419 414
 	if err != nil {
420 415
 		return nil, err
421 416
 	}
422 417
 	assetPublicAddr := *t
423
-	assetPublicAddr.Path = "/console" // TODO: make a constant, eventually make configurable
418
+	assetPublicAddr.Path = "/console/" // TODO: make a constant
424 419
 
425 420
 	return &assetPublicAddr, nil
426 421
 }
427 422
 
428 423
 func (args MasterArgs) GetAssetBindAddress() string {
429
-	if args.AssetBindAddr.Provided {
430
-		return args.AssetBindAddr.URL.Host
431
-	}
432 424
 	return args.ListenArg.ListenAddr.URL.Host
433 425
 }
434 426
 
... ...
@@ -353,17 +353,17 @@ func StartMaster(openshiftMasterConfig *configapi.MasterConfig) error {
353 353
 	}
354 354
 	unprotectedInstallers = append(unprotectedInstallers, authConfig)
355 355
 
356
-	var assetConfig *origin.AssetConfig
357
-	var assetColocated = false
356
+	var standaloneAssetConfig *origin.AssetConfig
358 357
 	if openshiftMasterConfig.AssetConfig != nil {
359
-		assetConfig, err := origin.BuildAssetConfig(*openshiftMasterConfig.AssetConfig)
358
+		config, err := origin.BuildAssetConfig(*openshiftMasterConfig.AssetConfig)
360 359
 		if err != nil {
361 360
 			return err
362 361
 		}
363 362
 
364 363
 		if openshiftMasterConfig.AssetConfig.ServingInfo.BindAddress == openshiftMasterConfig.ServingInfo.BindAddress {
365
-			assetColocated = true
366
-			unprotectedInstallers = append(unprotectedInstallers, assetConfig)
364
+			unprotectedInstallers = append(unprotectedInstallers, config)
365
+		} else {
366
+			standaloneAssetConfig = config
367 367
 		}
368 368
 	}
369 369
 
... ...
@@ -404,8 +404,8 @@ func StartMaster(openshiftMasterConfig *configapi.MasterConfig) error {
404 404
 
405 405
 	glog.Infof("Using images from %q", openshiftConfig.ImageFor("<component>"))
406 406
 
407
-	if assetConfig != nil && !assetColocated {
408
-		assetConfig.Run()
407
+	if standaloneAssetConfig != nil {
408
+		standaloneAssetConfig.Run()
409 409
 	}
410 410
 	if openshiftMasterConfig.DNSConfig != nil {
411 411
 		openshiftConfig.RunDNSServer()
412 412
new file mode 100644
... ...
@@ -0,0 +1,53 @@
0
+// +build integration,!no-etcd
1
+
2
+package integration
3
+
4
+import (
5
+	"crypto/tls"
6
+	"net/http"
7
+	"testing"
8
+
9
+	testutil "github.com/openshift/origin/test/util"
10
+)
11
+
12
+func TestRootRedirect(t *testing.T) {
13
+	masterConfig, _, err := testutil.StartTestMaster()
14
+	if err != nil {
15
+		t.Fatalf("unexpected error: %v", err)
16
+	}
17
+
18
+	transport := &http.Transport{
19
+		TLSClientConfig: &tls.Config{
20
+			InsecureSkipVerify: true,
21
+		},
22
+	}
23
+
24
+	req, err := http.NewRequest("GET", masterConfig.AssetConfig.MasterPublicURL, nil)
25
+	req.Header.Set("Accept", "*/*")
26
+	resp, err := transport.RoundTrip(req)
27
+	if err != nil {
28
+		t.Errorf("Unexpected error: %v", err)
29
+	}
30
+	if resp.StatusCode != http.StatusOK {
31
+		t.Errorf("Expected %d, got %d", http.StatusOK, resp.StatusCode)
32
+	}
33
+	if resp.Header.Get("Content-Type") != "application/json" {
34
+		t.Errorf("Expected %s, got %s", "application/json", resp.Header.Get("Content-Type"))
35
+	}
36
+
37
+	req, err = http.NewRequest("GET", masterConfig.AssetConfig.MasterPublicURL, nil)
38
+	req.Header.Set("Accept", "text/html")
39
+	resp, err = transport.RoundTrip(req)
40
+	if err != nil {
41
+		t.Errorf("Unexpected error: %v", err)
42
+	}
43
+	if resp.StatusCode != http.StatusFound {
44
+		t.Errorf("Expected %d, got %d", http.StatusFound, resp.StatusCode)
45
+	}
46
+	if resp.Header.Get("Location") != masterConfig.AssetConfig.PublicURL {
47
+		t.Errorf("Expected %s, got %s", masterConfig.AssetConfig.PublicURL, resp.Header.Get("Location"))
48
+	}
49
+
50
+	// TODO add a test for when asset config is nil, the redirect should not occur in this case even when
51
+	// accept header contains text/html
52
+}
... ...
@@ -61,15 +61,6 @@ func setupStartOptions() (*start.MasterArgs, *start.NodeArgs, *start.ListenArg,
61 61
 	listenArg.ListenAddr.Set(masterAddr)
62 62
 	masterArgs.EtcdAddr.Set(GetEtcdURL())
63 63
 
64
-	assetAddr := httptest.NewUnstartedServer(nil).Listener.Addr().String()
65
-	if len(os.Getenv("OS_ASSETS_ADDR")) > 0 {
66
-		assetAddr = os.Getenv("OS_ASSETS_ADDR")
67
-	}
68
-
69
-	fmt.Printf("assetAddr: %#v\n", assetAddr)
70
-	masterArgs.AssetBindAddr.Set(assetAddr)
71
-	masterArgs.AssetPublicAddr.Set(assetAddr)
72
-
73 64
 	dnsAddr := httptest.NewUnstartedServer(nil).Listener.Addr().String()
74 65
 	if len(os.Getenv("OS_DNS_ADDR")) > 0 {
75 66
 		dnsAddr = os.Getenv("OS_DNS_ADDR")