You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@climate.apache.org by jo...@apache.org on 2014/08/28 05:07:45 UTC
[01/28] CLIMATE-512 - Replace frontend with new Yeoman/Grunt/Bower
frontend
Repository: climate
Updated Branches:
refs/heads/master fb37845c2 -> fc2e0ffc0
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/unit/controllers/WorldMapCtrlTest.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/test/unit/controllers/WorldMapCtrlTest.js b/ocw-ui/frontend/test/unit/controllers/WorldMapCtrlTest.js
deleted file mode 100644
index 805dc88..0000000
--- a/ocw-ui/frontend/test/unit/controllers/WorldMapCtrlTest.js
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
-**/
-
-'use strict';
-
-describe('OCW Controllers', function() {
-
- beforeEach(module('ocw.controllers'));
- beforeEach(module('ocw.services'));
-
- describe('WorldMapCtrl', function() {
- it('should initialize the updateMap function', function() {
- inject(function($rootScope, $controller) {
- var scope = $rootScope.$new();
- var ctrl = $controller("WorldMapCtrl", {$scope: scope});
-
- // Set the important attributes for a fake dataset
- scope.datasets.push({shouldDisplay: true, latlonVals: {latMin: 0, latMax: 0, lonMin: 0, lonMax: 0}});
- // Don't try to add the user defined region since we don't have one
- scope.regionParams.areValid = false;
- // We need to fake the map object. The only thing we care about is faking the "addLayer" function
- // and the "fitBounds" functions which our map controllers makes use of.
- $rootScope.map = {addLayer: function(){}, fitBounds: function(){}};
- $rootScope.fillColors = ['#ff0000'];
-
- expect("rectangleGroup" in $rootScope).toBe(false);
- scope.updateMap();
- expect("rectangleGroup" in $rootScope).toBe(true);
- });
- });
- });
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/unit/directives/BootstrapModalTest.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/test/unit/directives/BootstrapModalTest.js b/ocw-ui/frontend/test/unit/directives/BootstrapModalTest.js
deleted file mode 100644
index dacc74c..0000000
--- a/ocw-ui/frontend/test/unit/directives/BootstrapModalTest.js
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
-**/
-'use strict';
-
-describe('directives', function() {
- beforeEach(module('ocw'));
-
- describe('bootstrap-modal directive', function() {
- it('should create a div element of the correct form', function() {
- inject(function($compile, $rootScope) {
- var element = $compile('<bootstrap-modal modal-id="testmodal"></bootstrap-modal>')($rootScope);
- expect(element.hasClass("modal")).toBeTruthy();
- expect(element.hasClass("hide")).toBeTruthy();
- expect(element.attr("id")).toEqual('{{modalId}}');
- });
- });
-
- it('should properly wrap the interior html content' , function() {
- inject(function($compile, $rootScope) {
- var element = $compile('<bootstrap-modal modal-id="testmodal"><h3>Hello</h3></bootstrap-modal>')($rootScope);
- expect(element.html()).toEqual("<div ng-transclude=\"\"><h3 class=\"ng-scope\">Hello</h3></div>");
- });
- });
- });
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/unit/directives/OnBlurTest.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/test/unit/directives/OnBlurTest.js b/ocw-ui/frontend/test/unit/directives/OnBlurTest.js
deleted file mode 100644
index c99b2c3..0000000
--- a/ocw-ui/frontend/test/unit/directives/OnBlurTest.js
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
-**/
-
-'use strict';
-
-describe('directives', function() {
- beforeEach(module('ocw'));
-
- describe('onBlur directive', function() {
- it('should call the supplied function on the blur event', function() {
- inject(function($compile, $rootScope) {
- // Set a rootScope variable to make sure that on-blur calls
- // the function that we pass to it.
- $rootScope.bogusFunction = function() {
- $rootScope.test = "hi"
- }
-
- var element = $compile('<input on-blur="bogusFunction();" />')($rootScope);
-
- expect($rootScope.test).toNotBe('hi');
- element.trigger('blur');
- expect($rootScope.test).toBe('hi');
- });
- });
- });
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/unit/directives/PreviewMapTest.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/test/unit/directives/PreviewMapTest.js b/ocw-ui/frontend/test/unit/directives/PreviewMapTest.js
deleted file mode 100644
index a7991e6..0000000
--- a/ocw-ui/frontend/test/unit/directives/PreviewMapTest.js
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
-**/
-
-'use strict';
-
-describe('directives', function() {
- beforeEach(module('ocw'));
-
- describe('preview-map directive', function() {
- it('should set the proper class', function() {
- inject(function($compile, $rootScope) {
- $rootScope.dataset = {latlonVals: {latMax: 90, lonMax: 90, latMin: -90, lonMin: -90}, name: "TRMM"};
-
- var element = $compile('<div preview-map="dataset"></div>')($rootScope);
-
- expect(element.hasClass("preview-map")).toBeTruthy();
- });
- });
-
- it('should set the id of the template to the name of the dataset', function() {
- inject(function($compile, $rootScope) {
- $rootScope.dataset = {latlonVals: {latMax: 90, lonMax: 90, latMin: -90, lonMin: -90}, name: "TRMM"};
-
- var element = $compile('<div preview-map="dataset"></div>')($rootScope);
-
- expect(element.attr('id')).toEqual("{{dataset.name}}");
- });
- });
- });
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/unit/filters/ISODateToMiddleEndianTest.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/test/unit/filters/ISODateToMiddleEndianTest.js b/ocw-ui/frontend/test/unit/filters/ISODateToMiddleEndianTest.js
deleted file mode 100644
index 9228765..0000000
--- a/ocw-ui/frontend/test/unit/filters/ISODateToMiddleEndianTest.js
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
-**/
-'use strict';
-
-describe('OCW Filters', function() {
- beforeEach(module('ocw.filters'));
-
- describe('ISODateToMiddleEndian', function() {
- it('should replace the ISO Date/Time stamp', function() {
- inject(function($filter) {
- var filter = $filter('ISODateToMiddleEndian');
- expect(filter('2012-01-02T00:00:00')).toEqual('01/02/2012');
- });
- });
-
- it('should replace the modified ISO Date/Time stamp', function() {
- inject(function($filter) {
- var filter = $filter('ISODateToMiddleEndian');
- expect(filter('2012-01-02 00:00:00')).toEqual('01/02/2012');
- });
- });
-
- it('should replace the ISO Date stamp', function() {
- inject(function($filter) {
- var filter = $filter('ISODateToMiddleEndian');
- expect(filter('2012-01-02')).toEqual('01/02/2012');
- });
- });
-
- it('should replace leading and trailing whitespace', function() {
- inject(function($filter) {
- var filter = $filter('ISODateToMiddleEndian');
- expect(filter(' 2012-01-02T00:00:00 ')).toEqual('01/02/2012');
- });
- });
-
- it('should do nothing when the date format has the incorrect number of hyphens', function() {
- inject(function($filter) {
- var filter = $filter('ISODateToMiddleEndian');
- expect(filter('2012-234T234')).toEqual('2012-234T234')
- });
- });
-
- it('should do nothing when the date format has no hyphens', function() {
- inject(function($filter) {
- var filter = $filter('ISODateToMiddleEndian');
- expect(filter('2012234T234')).toEqual('2012234T234')
- });
- });
- });
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/unit/services/EvaluationSettingsTest.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/test/unit/services/EvaluationSettingsTest.js b/ocw-ui/frontend/test/unit/services/EvaluationSettingsTest.js
deleted file mode 100644
index b8d021a..0000000
--- a/ocw-ui/frontend/test/unit/services/EvaluationSettingsTest.js
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
-**/
-
-'use strict';
-
-describe('OCW Services', function() {
-
- beforeEach(module('ocw.services'));
-
- describe('EvaluationSettings', function() {
-
- it('should initialize the evaluationSettings service', function() {
- inject(function(evaluationSettings) {
- expect(evaluationSettings).not.toEqual(null);
- });
- });
-
- it('should provide a getSettings function', function() {
- inject(function(evaluationSettings) {
- expect(evaluationSettings.getSettings()).not.toEqual(null);
- })
- })
- });
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/unit/services/RegionSelectParamsTest.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/test/unit/services/RegionSelectParamsTest.js b/ocw-ui/frontend/test/unit/services/RegionSelectParamsTest.js
deleted file mode 100644
index 2b90ec3..0000000
--- a/ocw-ui/frontend/test/unit/services/RegionSelectParamsTest.js
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
-**/
-
-'use strict';
-
-describe('OCW Services', function() {
-
- beforeEach(module('ocw.services'));
-
- describe('RegionSelectParams', function() {
-
- it('should initialize the regionSelectParams service', function() {
- inject(function(regionSelectParams) {
- expect(regionSelectParams).not.toEqual(null);
- });
- });
-
- it('should provide the getParameters function', function() {
- inject(function(regionSelectParams) {
- expect(regionSelectParams.getParameters()).not.toEqual(null);
- });
- });
- });
-});
-
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/unit/services/SelectedDatasetInfomationTest.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/test/unit/services/SelectedDatasetInfomationTest.js b/ocw-ui/frontend/test/unit/services/SelectedDatasetInfomationTest.js
deleted file mode 100644
index aeada3d..0000000
--- a/ocw-ui/frontend/test/unit/services/SelectedDatasetInfomationTest.js
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
-**/
-
-'use strict';
-
-describe('OCW Services', function() {
-
- beforeEach(module('ocw.services'));
-
- describe('SelectedDatasetInformation', function() {
-
- it('should initialize the selectedDatasetInformation service', function() {
- inject(function(selectedDatasetInformation) {
- expect(selectedDatasetInformation).not.toEqual(null);
- });
- });
-
- it('should provide the getDatasets function', function() {
- inject(function(selectedDatasetInformation) {
- expect(selectedDatasetInformation.getDatasets()).not.toEqual(null);
- });
- });
-
- it('should provide the getDatasetCount function', function() {
- inject(function(selectedDatasetInformation) {
- expect(selectedDatasetInformation.getDatasetCount()).toEqual(0);
- });
- });
-
- it('should provide the addDataset function', function() {
- inject(function(selectedDatasetInformation) {
- selectedDatasetInformation.addDataset({});
- expect(selectedDatasetInformation.getDatasetCount()).toEqual(1);
- });
- });
-
- it('should set the shouldDisplay attribute when adding a dataset', function() {
- inject(function(selectedDatasetInformation) {
- selectedDatasetInformation.addDataset({});
- expect(selectedDatasetInformation.getDatasets()[0].shouldDisplay).toBe(false);
- });
- });
-
- it('should set the regrid attribute when adding a dataset', function() {
- inject(function(selectedDatasetInformation) {
- selectedDatasetInformation.addDataset({});
- expect(selectedDatasetInformation.getDatasets()[0].regrid).toBe(false);
- });
- });
-
- it('should provide the removeDataset function', function() {
- inject(function(selectedDatasetInformation) {
- selectedDatasetInformation.addDataset(1);
- selectedDatasetInformation.addDataset(2);
-
- expect(selectedDatasetInformation.getDatasets()[0]).toEqual(1);
- selectedDatasetInformation.removeDataset(0);
- expect(selectedDatasetInformation.getDatasets()[0]).toEqual(2);
- });
- });
-
- it('should provide the clearDatasets function', function() {
- inject(function(selectedDatasetInformation) {
- selectedDatasetInformation.addDataset({});
- expect(selectedDatasetInformation.getDatasetCount()).toEqual(1);
-
- selectedDatasetInformation.clearDatasets();
- expect(selectedDatasetInformation.getDatasetCount()).toEqual(0);
- });
- });
- });
-});
-
-
[19/28] CLIMATE-512 - Replace frontend with new Yeoman/Grunt/Bower
frontend
Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/js/lib/angular-ui/angular-ui-0.4-tpls.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/js/lib/angular-ui/angular-ui-0.4-tpls.js b/ocw-ui/frontend/app/js/lib/angular-ui/angular-ui-0.4-tpls.js
deleted file mode 100644
index 76dd8f4..0000000
--- a/ocw-ui/frontend/app/js/lib/angular-ui/angular-ui-0.4-tpls.js
+++ /dev/null
@@ -1,2 +0,0 @@
-angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.transition","ui.bootstrap.collapse","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.datepicker","ui.bootstrap.dialog","ui.bootstrap.dropdownToggle","ui.bootstrap.modal","ui.bootstrap.pagination","ui.bootstrap.position","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]),angular.module("ui.bootstrap.tpls",["template/accordion/accordion-group.html","template/accordion/accordion.html","template/alert/alert.html","template/carousel/carousel.html","template/carousel/slide.html","template/datepicker/datepicker.html","template/dialog/message.html","template/pagination/pager.html","template/pagination/pagination.html","template/tooltip/tooltip-html-unsafe-popup.html","template/tooltip/tooltip-popup.html","template/popover/popover.html","template/progressb
ar/bar.html","template/progressbar/progress.html","template/rating/rating.html","template/tabs/tab.html","template/tabs/tabset.html","template/timepicker/timepicker.html","template/typeahead/typeahead.html"]),angular.module("ui.bootstrap.transition",[]).factory("$transition",["$q","$timeout","$rootScope",function(e,t,n){function a(e){for(var t in e)if(void 0!==i.style[t])return e[t]}var o=function(a,i,r){r=r||{};var l=e.defer(),s=o[r.animation?"animationEndEventName":"transitionEndEventName"],c=function(){n.$apply(function(){a.unbind(s,c),l.resolve(a)})};return s&&a.bind(s,c),t(function(){angular.isString(i)?a.addClass(i):angular.isFunction(i)?i(a):angular.isObject(i)&&a.css(i),s||l.resolve(a)}),l.promise.cancel=function(){s&&a.unbind(s,c),l.reject("Transition cancelled")},l.promise},i=document.createElement("trans"),r={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"},l={WebkitTransition:"webkitAnimationEnd
",MozTransition:"animationend",OTransition:"oAnimationEnd",transition:"animationend"};return o.transitionEndEventName=a(r),o.animationEndEventName=a(l),o}]),angular.module("ui.bootstrap.collapse",["ui.bootstrap.transition"]).directive("collapse",["$transition",function(e){var t=function(e,t,n){t.removeClass("collapse"),t.css({height:n}),t[0].offsetWidth,t.addClass("collapse")};return{link:function(n,a,o){var i,r=!0;n.$watch(function(){return a[0].scrollHeight},function(){0!==a[0].scrollHeight&&(i||(r?t(n,a,a[0].scrollHeight+"px"):t(n,a,"auto")))}),n.$watch(o.collapse,function(e){e?u():c()});var l,s=function(t){return l&&l.cancel(),l=e(a,t),l.then(function(){l=void 0},function(){l=void 0}),l},c=function(){r?(r=!1,i||t(n,a,"auto")):s({height:a[0].scrollHeight+"px"}).then(function(){i||t(n,a,"auto")}),i=!1},u=function(){i=!0,r?(r=!1,t(n,a,0)):(t(n,a,a[0].scrollHeight+"px"),s({height:"0"}))}}}}]),angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse"]).constant("accordionConfi
g",{closeOthers:!0}).controller("AccordionController",["$scope","$attrs","accordionConfig",function(e,t,n){this.groups=[],this.closeOthers=function(a){var o=angular.isDefined(t.closeOthers)?e.$eval(t.closeOthers):n.closeOthers;o&&angular.forEach(this.groups,function(e){e!==a&&(e.isOpen=!1)})},this.addGroup=function(e){var t=this;this.groups.push(e),e.$on("$destroy",function(){t.removeGroup(e)})},this.removeGroup=function(e){var t=this.groups.indexOf(e);-1!==t&&this.groups.splice(this.groups.indexOf(e),1)}}]).directive("accordion",function(){return{restrict:"EA",controller:"AccordionController",transclude:!0,replace:!1,templateUrl:"template/accordion/accordion.html"}}).directive("accordionGroup",["$parse","$transition","$timeout",function(e){return{require:"^accordion",restrict:"EA",transclude:!0,replace:!0,templateUrl:"template/accordion/accordion-group.html",scope:{heading:"@"},controller:["$scope",function(){this.setHeading=function(e){this.heading=e}}],link:function(t,n,a,o){var
i,r;o.addGroup(t),t.isOpen=!1,a.isOpen&&(i=e(a.isOpen),r=i.assign,t.$watch(function(){return i(t.$parent)},function(e){t.isOpen=e}),t.isOpen=i?i(t.$parent):!1),t.$watch("isOpen",function(e){e&&o.closeOthers(t),r&&r(t.$parent,e)})}}}]).directive("accordionHeading",function(){return{restrict:"EA",transclude:!0,template:"",replace:!0,require:"^accordionGroup",compile:function(e,t,n){return function(e,t,a,o){o.setHeading(n(e,function(){}))}}}}).directive("accordionTransclude",function(){return{require:"^accordionGroup",link:function(e,t,n,a){e.$watch(function(){return a[n.accordionTransclude]},function(e){e&&(t.html(""),t.append(e))})}}}),angular.module("ui.bootstrap.alert",[]).directive("alert",function(){return{restrict:"EA",templateUrl:"template/alert/alert.html",transclude:!0,replace:!0,scope:{type:"=",close:"&"},link:function(e,t,n){e.closeable="close"in n}}}),angular.module("ui.bootstrap.buttons",[]).constant("buttonConfig",{activeClass:"active",toggleEvent:"click"}).directive("bt
nRadio",["buttonConfig",function(e){var t=e.activeClass||"active",n=e.toggleEvent||"click";return{require:"ngModel",link:function(e,a,o,i){i.$render=function(){a.toggleClass(t,angular.equals(i.$modelValue,e.$eval(o.btnRadio)))},a.bind(n,function(){a.hasClass(t)||e.$apply(function(){i.$setViewValue(e.$eval(o.btnRadio)),i.$render()})})}}}]).directive("btnCheckbox",["buttonConfig",function(e){var t=e.activeClass||"active",n=e.toggleEvent||"click";return{require:"ngModel",link:function(e,a,o,i){var r=e.$eval(o.btnCheckboxTrue),l=e.$eval(o.btnCheckboxFalse);r=angular.isDefined(r)?r:!0,l=angular.isDefined(l)?l:!1,i.$render=function(){a.toggleClass(t,angular.equals(i.$modelValue,r))},a.bind(n,function(){e.$apply(function(){i.$setViewValue(a.hasClass(t)?l:r),i.$render()})})}}}]),angular.module("ui.bootstrap.carousel",["ui.bootstrap.transition"]).controller("CarouselController",["$scope","$timeout","$transition","$q",function(e,t,n){function a(){function n(){i?(e.next(),a()):e.pause()}o&&t.c
ancel(o);var r=+e.interval;!isNaN(r)&&r>=0&&(o=t(n,r))}var o,i,r=this,l=r.slides=[],s=-1;r.currentSlide=null,r.select=function(o,i){function c(){r.currentSlide&&angular.isString(i)&&!e.noTransition&&o.$element?(o.$element.addClass(i),o.$element[0].offsetWidth=o.$element[0].offsetWidth,angular.forEach(l,function(e){angular.extend(e,{direction:"",entering:!1,leaving:!1,active:!1})}),angular.extend(o,{direction:i,active:!0,entering:!0}),angular.extend(r.currentSlide||{},{direction:i,leaving:!0}),e.$currentTransition=n(o.$element,{}),function(t,n){e.$currentTransition.then(function(){u(t,n)},function(){u(t,n)})}(o,r.currentSlide)):u(o,r.currentSlide),r.currentSlide=o,s=p,a()}function u(t,n){angular.extend(t,{direction:"",active:!0,leaving:!1,entering:!1}),angular.extend(n||{},{direction:"",active:!1,leaving:!1,entering:!1}),e.$currentTransition=null}var p=l.indexOf(o);void 0===i&&(i=p>s?"next":"prev"),o&&o!==r.currentSlide&&(e.$currentTransition?(e.$currentTransition.cancel(),t(c)):c())
},r.indexOfSlide=function(e){return l.indexOf(e)},e.next=function(){var t=(s+1)%l.length;return e.$currentTransition?void 0:r.select(l[t],"next")},e.prev=function(){var t=0>s-1?l.length-1:s-1;return e.$currentTransition?void 0:r.select(l[t],"prev")},e.select=function(e){r.select(e)},e.isActive=function(e){return r.currentSlide===e},e.slides=function(){return l},e.$watch("interval",a),e.play=function(){i||(i=!0,a())},e.pause=function(){e.noPause||(i=!1,o&&t.cancel(o))},r.addSlide=function(t,n){t.$element=n,l.push(t),1===l.length||t.active?(r.select(l[l.length-1]),1==l.length&&e.play()):t.active=!1},r.removeSlide=function(e){var t=l.indexOf(e);l.splice(t,1),l.length>0&&e.active?t>=l.length?r.select(l[t-1]):r.select(l[t]):s>t&&s--}}]).directive("carousel",[function(){return{restrict:"EA",transclude:!0,replace:!0,controller:"CarouselController",require:"carousel",templateUrl:"template/carousel/carousel.html",scope:{interval:"=",noTransition:"=",noPause:"="}}}]).directive("slide",["$pars
e",function(e){return{require:"^carousel",restrict:"EA",transclude:!0,replace:!0,templateUrl:"template/carousel/slide.html",scope:{},link:function(t,n,a,o){if(a.active){var i=e(a.active),r=i.assign,l=t.active=i(t.$parent);t.$watch(function(){var e=i(t.$parent);return e!==t.active&&(e!==l?l=t.active=e:r(t.$parent,e=l=t.active)),e})}o.addSlide(t,n),t.$on("$destroy",function(){o.removeSlide(t)}),t.$watch("active",function(e){e&&o.select(t)})}}}]),angular.module("ui.bootstrap.datepicker",[]).constant("datepickerConfig",{dayFormat:"dd",monthFormat:"MMMM",yearFormat:"yyyy",dayHeaderFormat:"EEE",dayTitleFormat:"MMMM yyyy",monthTitleFormat:"yyyy",showWeeks:!0,startingDay:0,yearRange:20}).directive("datepicker",["dateFilter","$parse","datepickerConfig",function(e,t,n){return{restrict:"EA",replace:!0,scope:{model:"=ngModel",dateDisabled:"&"},templateUrl:"template/datepicker/datepicker.html",link:function(a,o,r){function l(e,t,n){a.rows=e,a.labels=t,a.title=n}function s(){a.showWeekNumbers="da
y"===a.mode&&p}function c(e,t){return"year"===a.mode?t.getFullYear()-e.getFullYear():"month"===a.mode?new Date(t.getFullYear(),t.getMonth())-new Date(e.getFullYear(),e.getMonth()):"day"===a.mode?new Date(t.getFullYear(),t.getMonth(),t.getDate())-new Date(e.getFullYear(),e.getMonth(),e.getDate()):void 0}function u(e){return d&&c(e,d)>0||m&&0>c(e,m)||a.dateDisabled&&a.dateDisabled({date:e,mode:a.mode})}a.mode="day";var p,d,m,g=new Date,f={};f.day=angular.isDefined(r.dayFormat)?a.$eval(r.dayFormat):n.dayFormat,f.month=angular.isDefined(r.monthFormat)?a.$eval(r.monthFormat):n.monthFormat,f.year=angular.isDefined(r.yearFormat)?a.$eval(r.yearFormat):n.yearFormat,f.dayHeader=angular.isDefined(r.dayHeaderFormat)?a.$eval(r.dayHeaderFormat):n.dayHeaderFormat,f.dayTitle=angular.isDefined(r.dayTitleFormat)?a.$eval(r.dayTitleFormat):n.dayTitleFormat,f.monthTitle=angular.isDefined(r.monthTitleFormat)?a.$eval(r.monthTitleFormat):n.monthTitleFormat;var h=angular.isDefined(r.startingDay)?a.$eval(r.s
tartingDay):n.startingDay,v=angular.isDefined(r.yearRange)?a.$eval(r.yearRange):n.yearRange;r.showWeeks?a.$parent.$watch(t(r.showWeeks),function(e){p=!!e,s()}):(p=n.showWeeks,s()),r.min&&a.$parent.$watch(t(r.min),function(e){d=new Date(e),w()}),r.max&&a.$parent.$watch(t(r.max),function(e){m=new Date(e),w()});var b=function(e,t){for(var n=[];e.length>0;)n.push(e.splice(0,t));return n},$=function(e,t){return new Date(e,t+1,0).getDate()},y={day:function(){function t(t,a,i){for(var r=0;a>r;r++)n.push({date:new Date(t),isCurrent:i,isSelected:k(t),label:e(t,f.day),disabled:u(t)}),t.setDate(t.getDate()+1);o=t}var n=[],a=[],o=null,r=new Date(g);r.setDate(1);var s=h-r.getDay(),c=s>0?7-s:-s;for(c>0&&(r.setDate(-c+1),t(r,c,!1)),t(o||r,$(g.getFullYear(),g.getMonth()),!0),t(o,(7-n.length%7)%7,!1),i=0;7>i;i++)a.push(e(n[i].date,f.dayHeader));l(b(n,7),a,e(g,f.dayTitle))},month:function(){for(var t=[],n=0,a=g.getFullYear();12>n;){var o=new Date(a,n++,1);t.push({date:o,isCurrent:!0,isSelected:k(o),l
abel:e(o,f.month),disabled:u(o)})}l(b(t,3),[],e(g,f.monthTitle))},year:function(){for(var t=[],n=parseInt((g.getFullYear()-1)/v,10)*v+1,a=0;v>a;a++){var o=new Date(n+a,0,1);t.push({date:o,isCurrent:!0,isSelected:k(o),label:e(o,f.year),disabled:u(o)})}var i=t[0].label+" - "+t[t.length-1].label;l(b(t,5),[],i)}},w=function(){y[a.mode]()},k=function(e){if(a.model&&a.model.getFullYear()===e.getFullYear()){if("year"===a.mode)return!0;if(a.model.getMonth()===e.getMonth())return"month"===a.mode||"day"===a.mode&&a.model.getDate()===e.getDate()}return!1};a.$watch("model",function(e,t){angular.isDate(e)&&(g=angular.copy(e)),angular.equals(e,t)||w()}),a.$watch("mode",function(){s(),w()}),a.select=function(e){g=new Date(e),"year"===a.mode?(a.mode="month",g.setFullYear(e.getFullYear())):"month"===a.mode?(a.mode="day",g.setMonth(e.getMonth())):"day"===a.mode&&(a.model=new Date(g))},a.move=function(e){"day"===a.mode?g.setMonth(g.getMonth()+e):"month"===a.mode?g.setFullYear(g.getFullYear()+e):"year"
===a.mode&&g.setFullYear(g.getFullYear()+e*v),w()},a.toggleMode=function(){a.mode="day"===a.mode?"month":"month"===a.mode?"year":"day"},a.getWeekNumber=function(e){if("day"===a.mode&&a.showWeekNumbers&&7===e.length){var t=h>4?11-h:4-h,n=new Date(e[t].date);return n.setHours(0,0,0),Math.ceil(((n-new Date(n.getFullYear(),0,1))/864e5+1)/7)}}}}}]);var dialogModule=angular.module("ui.bootstrap.dialog",["ui.bootstrap.transition"]);dialogModule.controller("MessageBoxController",["$scope","dialog","model",function(e,t,n){e.title=n.title,e.message=n.message,e.buttons=n.buttons,e.close=function(e){t.close(e)}}]),dialogModule.provider("$dialog",function(){var e={backdrop:!0,dialogClass:"modal",backdropClass:"modal-backdrop",transitionClass:"fade",triggerClass:"in",resolve:{},backdropFade:!1,dialogFade:!1,keyboard:!0,backdropClick:!0},t={},n={value:0};this.options=function(e){t=e},this.$get=["$http","$document","$compile","$rootScope","$controller","$templateCache","$q","$transition","$injector
",function(a,o,i,r,l,s,c,u,p){function d(e){var t=angular.element("<div>");return t.addClass(e),t}function m(n){var a=this,o=this.options=angular.extend({},e,t,n);this._open=!1,this.backdropEl=d(o.backdropClass),o.backdropFade&&(this.backdropEl.addClass(o.transitionClass),this.backdropEl.removeClass(o.triggerClass)),this.modalEl=d(o.dialogClass),o.dialogFade&&(this.modalEl.addClass(o.transitionClass),this.modalEl.removeClass(o.triggerClass)),this.handledEscapeKey=function(e){27===e.which&&(a.close(),e.preventDefault(),a.$scope.$apply())},this.handleBackDropClick=function(e){a.close(),e.preventDefault(),a.$scope.$apply()},this.handleLocationChange=function(){a.close()}}var g=o.find("body");return m.prototype.isOpen=function(){return this._open},m.prototype.open=function(e,t){var n=this,a=this.options;if(e&&(a.templateUrl=e),t&&(a.controller=t),!a.template&&!a.templateUrl)throw Error("Dialog.open expected template or templateUrl, neither found. Use options or open method to specify th
em.");return this._loadResolves().then(function(e){var t=e.$scope=n.$scope=e.$scope?e.$scope:r.$new();if(n.modalEl.html(e.$template),n.options.controller){var a=l(n.options.controller,e);n.modalEl.children().data("ngControllerController",a)}i(n.modalEl)(t),n._addElementsToDom(),setTimeout(function(){n.options.dialogFade&&n.modalEl.addClass(n.options.triggerClass),n.options.backdropFade&&n.backdropEl.addClass(n.options.triggerClass)}),n._bindEvents()}),this.deferred=c.defer(),this.deferred.promise},m.prototype.close=function(e){function t(e){e.removeClass(a.options.triggerClass)}function n(){a._open&&a._onCloseComplete(e)}var a=this,o=this._getFadingElements();if(o.length>0)for(var i=o.length-1;i>=0;i--)u(o[i],t).then(n);else this._onCloseComplete(e)},m.prototype._getFadingElements=function(){var e=[];return this.options.dialogFade&&e.push(this.modalEl),this.options.backdropFade&&e.push(this.backdropEl),e},m.prototype._bindEvents=function(){this.options.keyboard&&g.bind("keydown",thi
s.handledEscapeKey),this.options.backdrop&&this.options.backdropClick&&this.backdropEl.bind("click",this.handleBackDropClick)},m.prototype._unbindEvents=function(){this.options.keyboard&&g.unbind("keydown",this.handledEscapeKey),this.options.backdrop&&this.options.backdropClick&&this.backdropEl.unbind("click",this.handleBackDropClick)},m.prototype._onCloseComplete=function(e){this._removeElementsFromDom(),this._unbindEvents(),this.deferred.resolve(e)},m.prototype._addElementsToDom=function(){g.append(this.modalEl),this.options.backdrop&&(0===n.value&&g.append(this.backdropEl),n.value++),this._open=!0},m.prototype._removeElementsFromDom=function(){this.modalEl.remove(),this.options.backdrop&&(n.value--,0===n.value&&this.backdropEl.remove()),this._open=!1},m.prototype._loadResolves=function(){var e,t=[],n=[],o=this;return this.options.template?e=c.when(this.options.template):this.options.templateUrl&&(e=a.get(this.options.templateUrl,{cache:s}).then(function(e){return e.data})),angula
r.forEach(this.options.resolve||[],function(e,a){n.push(a),t.push(angular.isString(e)?p.get(e):p.invoke(e))}),n.push("$template"),t.push(e),c.all(t).then(function(e){var t={};return angular.forEach(e,function(e,a){t[n[a]]=e}),t.dialog=o,t})},{dialog:function(e){return new m(e)},messageBox:function(e,t,n){return new m({templateUrl:"template/dialog/message.html",controller:"MessageBoxController",resolve:{model:function(){return{title:e,message:t,buttons:n}}}})}}}]}),angular.module("ui.bootstrap.dropdownToggle",[]).directive("dropdownToggle",["$document","$location",function(e){var t=null,n=angular.noop;return{restrict:"CA",link:function(a,o){a.$watch("$location.path",function(){n()}),o.parent().bind("click",function(){n()}),o.bind("click",function(a){var i=o===t;a.preventDefault(),a.stopPropagation(),t&&n(),i||(o.parent().addClass("open"),t=o,n=function(a){a&&(a.preventDefault(),a.stopPropagation()),e.unbind("click",n),o.parent().removeClass("open"),n=angular.noop,t=null},e.bind("clic
k",n))})}}}]),angular.module("ui.bootstrap.modal",["ui.bootstrap.dialog"]).directive("modal",["$parse","$dialog",function(e,t){return{restrict:"EA",terminal:!0,link:function(n,a,o){var i,r=angular.extend({},n.$eval(o.uiOptions||o.bsOptions||o.options)),l=o.modal||o.show;r=angular.extend(r,{template:a.html(),resolve:{$scope:function(){return n}}});var s=t.dialog(r);a.remove(),i=o.close?function(){e(o.close)(n)}:function(){angular.isFunction(e(l).assign)&&e(l).assign(n,!1)},n.$watch(l,function(e){e?s.open().then(function(){i()}):s.isOpen()&&s.close()})}}}]),angular.module("ui.bootstrap.pagination",[]).controller("PaginationController",["$scope",function(e){e.noPrevious=function(){return 1===e.currentPage},e.noNext=function(){return e.currentPage===e.numPages},e.isActive=function(t){return e.currentPage===t},e.selectPage=function(t){!e.isActive(t)&&t>0&&e.numPages>=t&&(e.currentPage=t,e.onSelectPage({page:t}))}}]).constant("paginationConfig",{boundaryLinks:!1,directionLinks:!0,firstTex
t:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0}).directive("pagination",["paginationConfig",function(e){return{restrict:"EA",scope:{numPages:"=",currentPage:"=",maxSize:"=",onSelectPage:"&"},controller:"PaginationController",templateUrl:"template/pagination/pagination.html",replace:!0,link:function(t,n,a){function o(e,t,n,a){return{number:e,text:t,active:n,disabled:a}}var i=angular.isDefined(a.boundaryLinks)?t.$eval(a.boundaryLinks):e.boundaryLinks,r=angular.isDefined(a.directionLinks)?t.$eval(a.directionLinks):e.directionLinks,l=angular.isDefined(a.firstText)?t.$parent.$eval(a.firstText):e.firstText,s=angular.isDefined(a.previousText)?t.$parent.$eval(a.previousText):e.previousText,c=angular.isDefined(a.nextText)?t.$parent.$eval(a.nextText):e.nextText,u=angular.isDefined(a.lastText)?t.$parent.$eval(a.lastText):e.lastText,p=angular.isDefined(a.rotate)?t.$eval(a.rotate):e.rotate;t.$watch("numPages + currentPage + maxSize",function(){t.pages=[];var e=1,n=t.
numPages,a=angular.isDefined(t.maxSize)&&t.maxSize<t.numPages;a&&(p?(e=Math.max(t.currentPage-Math.floor(t.maxSize/2),1),n=e+t.maxSize-1,n>t.numPages&&(n=t.numPages,e=n-t.maxSize+1)):(e=(Math.ceil(t.currentPage/t.maxSize)-1)*t.maxSize+1,n=Math.min(e+t.maxSize-1,t.numPages)));for(var d=e;n>=d;d++){var m=o(d,d,t.isActive(d),!1);t.pages.push(m)}if(a&&!p){if(e>1){var g=o(e-1,"...",!1,!1);t.pages.unshift(g)}if(t.numPages>n){var f=o(n+1,"...",!1,!1);t.pages.push(f)}}if(r){var h=o(t.currentPage-1,s,!1,t.noPrevious());t.pages.unshift(h);var v=o(t.currentPage+1,c,!1,t.noNext());t.pages.push(v)}if(i){var b=o(1,l,!1,t.noPrevious());t.pages.unshift(b);var $=o(t.numPages,u,!1,t.noNext());t.pages.push($)}t.currentPage>t.numPages&&t.selectPage(t.numPages)})}}}]).constant("pagerConfig",{previousText:"« Previous",nextText:"Next »",align:!0}).directive("pager",["pagerConfig",function(e){return{restrict:"EA",scope:{numPages:"=",currentPage:"=",onSelectPage:"&"},controller:"PaginationController",temp
lateUrl:"template/pagination/pager.html",replace:!0,link:function(t,n,a){function o(e,t,n,a,o){return{number:e,text:t,disabled:n,previous:l&&a,next:l&&o}}var i=angular.isDefined(a.previousText)?t.$parent.$eval(a.previousText):e.previousText,r=angular.isDefined(a.nextText)?t.$parent.$eval(a.nextText):e.nextText,l=angular.isDefined(a.align)?t.$parent.$eval(a.align):e.align;t.$watch("numPages + currentPage",function(){t.pages=[];var e=o(t.currentPage-1,i,t.noPrevious(),!0,!1);t.pages.unshift(e);var n=o(t.currentPage+1,r,t.noNext(),!1,!0);t.pages.push(n),t.currentPage>t.numPages&&t.selectPage(t.numPages)})}}}]),angular.module("ui.bootstrap.position",[]).factory("$position",["$document","$window",function(e,t){function n(e,n){return e.currentStyle?e.currentStyle[n]:t.getComputedStyle?t.getComputedStyle(e)[n]:e.style[n]}function a(e){return"static"===(n(e,"position")||"static")}var o,i;e.bind("mousemove",function(e){o=e.pageX,i=e.pageY});var r=function(t){for(var n=e[0],o=t.offsetParent||
n;o&&o!==n&&a(o);)o=o.offsetParent;return o||n};return{position:function(t){var n=this.offset(t),a={top:0,left:0},o=r(t[0]);return o!=e[0]&&(a=this.offset(angular.element(o)),a.top+=o.clientTop,a.left+=o.clientLeft),{width:t.prop("offsetWidth"),height:t.prop("offsetHeight"),top:n.top-a.top,left:n.left-a.left}},offset:function(n){var a=n[0].getBoundingClientRect();return{width:n.prop("offsetWidth"),height:n.prop("offsetHeight"),top:a.top+(t.pageYOffset||e[0].body.scrollTop),left:a.left+(t.pageXOffset||e[0].body.scrollLeft)}},mouse:function(){return{x:o,y:i}}}}]),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position"]).provider("$tooltip",function(){function e(e){var t=/[A-Z]/g,n="-";return e.replace(t,function(e,t){return(t?n:"")+e.toLowerCase()})}var t={placement:"top",animation:!0,popupDelay:0},n={mouseenter:"mouseleave",click:"click",focus:"blur"},a={};this.options=function(e){angular.extend(a,e)},this.setTriggers=function(e){angular.extend(n,e)},this.$get=["$window","$com
pile","$timeout","$parse","$document","$position","$interpolate",function(o,i,r,l,s,c,u){return function(o,p,d){function m(e){var t,a;return t=e||g.trigger||d,a=angular.isDefined(g.trigger)?n[g.trigger]||t:n[t]||t,{show:t,hide:a}}var g=angular.extend({},t,a),f=e(o),h=m(void 0),v=u.startSymbol(),b=u.endSymbol(),$="<"+f+"-popup "+'title="'+v+"tt_title"+b+'" '+'content="'+v+"tt_content"+b+'" '+'placement="'+v+"tt_placement"+b+'" '+'animation="tt_animation()" '+'is-open="tt_isOpen"'+">"+"</"+f+"-popup>";return{restrict:"EA",scope:!0,link:function(e,t,n){function a(){e.tt_isOpen?d():u()}function u(){e.tt_popupDelay?y=r(f,e.tt_popupDelay):e.$apply(f)}function d(){e.$apply(function(){v()})}function f(){var n,a,o,i;if(e.tt_content){switch(b&&r.cancel(b),k.css({top:0,left:0,display:"block"}),x?(w=w||s.find("body"),w.append(k)):t.after(k),n=g.appendToBody?c.offset(t):c.position(t),a=k.prop("offsetWidth"),o=k.prop("offsetHeight"),e.tt_placement){case"mouse":var l=c.mouse();i={top:l.y,left:l.x}
;break;case"right":i={top:n.top+n.height/2-o/2,left:n.left+n.width};break;case"bottom":i={top:n.top+n.height,left:n.left+n.width/2-a/2};break;case"left":i={top:n.top+n.height/2-o/2,left:n.left-a};break;default:i={top:n.top-o,left:n.left+n.width/2-a/2}}i.top+="px",i.left+="px",k.css(i),e.tt_isOpen=!0}}function v(){e.tt_isOpen=!1,r.cancel(y),angular.isDefined(e.tt_animation)&&e.tt_animation()?b=r(function(){k.remove()},500):k.remove()}var b,y,w,k=i($)(e),x=angular.isDefined(g.appendToBody)?g.appendToBody:!1;e.tt_isOpen=!1,n.$observe(o,function(t){e.tt_content=t}),n.$observe(p+"Title",function(t){e.tt_title=t}),n.$observe(p+"Placement",function(t){e.tt_placement=angular.isDefined(t)?t:g.placement}),n.$observe(p+"Animation",function(t){e.tt_animation=angular.isDefined(t)?l(t):function(){return g.animation}}),n.$observe(p+"PopupDelay",function(t){var n=parseInt(t,10);e.tt_popupDelay=isNaN(n)?g.popupDelay:n}),n.$observe(p+"Trigger",function(e){t.unbind(h.show),t.unbind(h.hide),h=m(e),h.sh
ow===h.hide?t.bind(h.show,a):(t.bind(h.show,u),t.bind(h.hide,d))}),n.$observe(p+"AppendToBody",function(t){x=angular.isDefined(t)?l(t)(e):x}),x&&e.$on("$locationChangeSuccess",function(){e.tt_isOpen&&v()}),e.$on("$destroy",function(){e.tt_isOpen?v():k.remove()})}}}}]}).directive("tooltipPopup",function(){return{restrict:"E",replace:!0,scope:{content:"@",placement:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-popup.html"}}).directive("tooltip",["$tooltip",function(e){return e("tooltip","tooltip","mouseenter")}]).directive("tooltipHtmlUnsafePopup",function(){return{restrict:"E",replace:!0,scope:{content:"@",placement:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-html-unsafe-popup.html"}}).directive("tooltipHtmlUnsafe",["$tooltip",function(e){return e("tooltipHtmlUnsafe","tooltip","mouseenter")}]),angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("popoverPopup",function(){return{restrict:"EA",replace:!0,scope:{title:"@
",content:"@",placement:"@",animation:"&",isOpen:"&"},templateUrl:"template/popover/popover.html"}}).directive("popover",["$compile","$timeout","$parse","$window","$tooltip",function(e,t,n,a,o){return o("popover","popover","click")}]),angular.module("ui.bootstrap.progressbar",["ui.bootstrap.transition"]).constant("progressConfig",{animate:!0,autoType:!1,stackedTypes:["success","info","warning","danger"]}).controller("ProgressBarController",["$scope","$attrs","progressConfig",function(e,t,n){function a(e){return r[e]}var o=angular.isDefined(t.animate)?e.$eval(t.animate):n.animate,i=angular.isDefined(t.autoType)?e.$eval(t.autoType):n.autoType,r=angular.isDefined(t.stackedTypes)?e.$eval("["+t.stackedTypes+"]"):n.stackedTypes;this.makeBar=function(e,t,n){var r=angular.isObject(e)?e.value:e||0,l=angular.isObject(t)?t.value:t||0,s=angular.isObject(e)&&angular.isDefined(e.type)?e.type:i?a(n||0):null;return{from:l,to:r,type:s,animate:o}},this.addBar=function(t){e.bars.push(t),e.totalPercent
+=t.to},this.clearBars=function(){e.bars=[],e.totalPercent=0},this.clearBars()}]).directive("progress",function(){return{restrict:"EA",replace:!0,controller:"ProgressBarController",scope:{value:"=percent",onFull:"&",onEmpty:"&"},templateUrl:"template/progressbar/progress.html",link:function(e,t,n,a){e.$watch("value",function(e,t){if(a.clearBars(),angular.isArray(e))for(var n=0,o=e.length;o>n;n++)a.addBar(a.makeBar(e[n],t[n],n));else a.addBar(a.makeBar(e,t))},!0),e.$watch("totalPercent",function(t){t>=100?e.onFull():0>=t&&e.onEmpty()},!0)}}}).directive("progressbar",["$transition",function(e){return{restrict:"EA",replace:!0,scope:{width:"=",old:"=",type:"=",animate:"="},templateUrl:"template/progressbar/bar.html",link:function(t,n){t.$watch("width",function(a){t.animate?(n.css("width",t.old+"%"),e(n,{width:a+"%"})):n.css("width",a+"%")})}}}]),angular.module("ui.bootstrap.rating",[]).constant("ratingConfig",{max:5}).directive("rating",["ratingConfig","$parse",function(e,t){return{rest
rict:"EA",scope:{value:"="},templateUrl:"template/rating/rating.html",replace:!0,link:function(n,a,o){var i=angular.isDefined(o.max)?n.$eval(o.max):e.max;n.range=[];for(var r=1;i>=r;r++)n.range.push(r);n.rate=function(e){n.readonly||(n.value=e)},n.enter=function(e){n.readonly||(n.val=e)},n.reset=function(){n.val=angular.copy(n.value)},n.reset(),n.$watch("value",function(e){n.val=e}),n.readonly=!1,o.readonly&&n.$parent.$watch(t(o.readonly),function(e){n.readonly=!!e})}}}]),angular.module("ui.bootstrap.tabs",[]).directive("tabs",function(){return function(){throw Error("The `tabs` directive is deprecated, please migrate to `tabset`. Instructions can be found at http://github.com/angular-ui/bootstrap/tree/master/CHANGELOG.md")}}).controller("TabsetController",["$scope","$element",function(e){var t=this,n=t.tabs=e.tabs=[];t.select=function(e){angular.forEach(n,function(e){e.active=!1}),e.active=!0},t.addTab=function(e){n.push(e),1==n.length&&t.select(e)},t.removeTab=function(e){var a=n.
indexOf(e);if(e.active&&n.length>1){var o=a==n.length-1?a-1:a+1;t.select(n[o])}n.splice(a,1)}}]).directive("tabset",function(){return{restrict:"EA",transclude:!0,scope:{},controller:"TabsetController",templateUrl:"template/tabs/tabset.html",link:function(e,t,n){e.vertical=angular.isDefined(n.vertical)?e.$eval(n.vertical):!1,e.type=angular.isDefined(n.type)?e.$parent.$eval(n.type):"tabs"}}}).directive("tab",["$parse","$http","$templateCache","$compile",function(e){return{require:"^tabset",restrict:"EA",replace:!0,templateUrl:"template/tabs/tab.html",transclude:!0,scope:{heading:"@",onSelect:"&select"},controller:function(){},compile:function(t,n,a){return function(t,n,o,i){var r,l;t.active=!1,o.active?(r=e(o.active),l=r.assign,t.$parent.$watch(r,function(e){e&&t.disabled?l(t.$parent,!1):t.active=!!e})):l=r=angular.noop,t.$watch("active",function(e){l(t.$parent,e),e&&(i.select(t),t.onSelect())}),t.disabled=!1,o.disabled&&t.$parent.$watch(e(o.disabled),function(e){t.disabled=!!e}),t.se
lect=function(){t.disabled||(t.active=!0)},i.addTab(t),t.$on("$destroy",function(){i.removeTab(t)}),t.active&&l(t.$parent,!0),a(t.$parent,function(e){var n,a=[];angular.forEach(e,function(e){e.tagName&&(e.hasAttribute("tab-heading")||e.hasAttribute("data-tab-heading")||"tab-heading"==e.tagName.toLowerCase()||"data-tab-heading"==e.tagName.toLowerCase())?n=e:a.push(e)}),n&&(t.headingElement=angular.element(n)),t.contentElement=angular.element(a)})}}}}]).directive("tabHeadingTransclude",[function(){return{restrict:"A",require:"^tab",link:function(e,t){e.$watch("headingElement",function(e){e&&(t.html(""),t.append(e))})}}}]).directive("tabContentTransclude",["$parse",function(e){return{restrict:"A",require:"^tabset",link:function(t,n,a){t.$watch(e(a.tabContentTransclude),function(e){n.html(""),e&&n.append(e.contentElement)})}}}]),angular.module("ui.bootstrap.timepicker",[]).filter("pad",function(){return function(e){return angular.isDefined(e)&&2>(""+e).length&&(e="0"+e),e}}).constant("t
imepickerConfig",{hourStep:1,minuteStep:1,showMeridian:!0,meridians:["AM","PM"],readonlyInput:!1,mousewheel:!0}).directive("timepicker",["padFilter","$parse","timepickerConfig",function(e,t,n){return{restrict:"EA",require:"ngModel",replace:!0,templateUrl:"template/timepicker/timepicker.html",scope:{model:"=ngModel"},link:function(a,o,i){function r(){var e=parseInt(a.hours,10),t=a.showMeridian?e>0&&13>e:e>=0&&24>e;return t?(a.showMeridian&&(12===e&&(e=0),a.meridian===u[1]&&(e+=12)),e):void 0}function l(){var t=c.getHours();a.showMeridian&&(t=0===t||12===t?12:t%12),a.hours="h"===b?t:e(t),a.validHours=!0;var n=c.getMinutes();a.minutes="m"===b?n:e(n),a.validMinutes=!0,a.meridian=a.showMeridian?12>c.getHours()?u[0]:u[1]:"",b=!1}function s(e){var t=new Date(c.getTime()+6e4*e);t.getDate()!==c.getDate()&&t.setDate(t.getDate()-1),c.setTime(t.getTime()),a.model=new Date(c)}var c=new Date,u=n.meridians,p=n.hourStep;i.hourStep&&a.$parent.$watch(t(i.hourStep),function(e){p=parseInt(e,10)});var d
=n.minuteStep;i.minuteStep&&a.$parent.$watch(t(i.minuteStep),function(e){d=parseInt(e,10)}),a.showMeridian=n.showMeridian,i.showMeridian&&a.$parent.$watch(t(i.showMeridian),function(e){if(a.showMeridian=!!e,a.model)l();else{var t=new Date(c),n=r();angular.isDefined(n)&&t.setHours(n),a.model=new Date(t)}});var m=o.find("input"),g=m.eq(0),f=m.eq(1),h=angular.isDefined(i.mousewheel)?a.$eval(i.mousewheel):n.mousewheel;if(h){var v=function(e){return e.originalEvent&&(e=e.originalEvent),e.detail||e.wheelDelta>0};g.bind("mousewheel",function(e){a.$apply(v(e)?a.incrementHours():a.decrementHours()),e.preventDefault()}),f.bind("mousewheel",function(e){a.$apply(v(e)?a.incrementMinutes():a.decrementMinutes()),e.preventDefault()})}var b=!1;a.readonlyInput=angular.isDefined(i.readonlyInput)?a.$eval(i.readonlyInput):n.readonlyInput,a.readonlyInput?(a.updateHours=angular.noop,a.updateMinutes=angular.noop):(a.updateHours=function(){var e=r();angular.isDefined(e)?(b="h",null===a.model&&(a.model=new D
ate(c)),a.model.setHours(e)):(a.model=null,a.validHours=!1)},g.bind("blur",function(){a.validHours&&10>a.hours&&a.$apply(function(){a.hours=e(a.hours)
-})}),a.updateMinutes=function(){var e=parseInt(a.minutes,10);e>=0&&60>e?(b="m",null===a.model&&(a.model=new Date(c)),a.model.setMinutes(e)):(a.model=null,a.validMinutes=!1)},f.bind("blur",function(){a.validMinutes&&10>a.minutes&&a.$apply(function(){a.minutes=e(a.minutes)})})),a.$watch(function(){return+a.model},function(e){!isNaN(e)&&e>0&&(c=new Date(e),l())}),a.incrementHours=function(){s(60*p)},a.decrementHours=function(){s(60*-p)},a.incrementMinutes=function(){s(d)},a.decrementMinutes=function(){s(-d)},a.toggleMeridian=function(){s(720*(12>c.getHours()?1:-1))}}}}]),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.position"]).factory("typeaheadParser",["$parse",function(e){var t=/^\s*(.*?)(?:\s+as\s+(.*?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+(.*)$/;return{parse:function(n){var a=n.match(t);if(!a)throw Error("Expected typeahead specification in form of '_modelValue_ (as _label_)? for _item_ in _collection_' but got '"+n+"'.");return{itemName:a[3],source:e(a[4]),viewMapper:e
(a[2]||a[1]),modelMapper:e(a[1])}}}}]).directive("typeahead",["$compile","$parse","$q","$timeout","$document","$position","typeaheadParser",function(e,t,n,a,o,i,r){var l=[9,13,27,38,40];return{require:"ngModel",link:function(s,c,u,p){var d,m=s.$eval(u.typeaheadMinLength)||1,g=s.$eval(u.typeaheadWaitMs)||0,f=r.parse(u.typeahead),h=s.$eval(u.typeaheadEditable)!==!1,v=t(u.typeaheadLoading).assign||angular.noop,b=t(u.typeaheadOnSelect),$=angular.element("<typeahead-popup></typeahead-popup>");$.attr({matches:"matches",active:"activeIdx",select:"select(activeIdx)",query:"query",position:"position"});var y=s.$new();s.$on("$destroy",function(){y.$destroy()});var w=function(){y.matches=[],y.activeIdx=-1},k=function(e){var t={$viewValue:e};v(s,!0),n.when(f.source(y,t)).then(function(n){if(e===p.$viewValue){if(n.length>0){y.activeIdx=0,y.matches.length=0;for(var a=0;n.length>a;a++)t[f.itemName]=n[a],y.matches.push({label:f.viewMapper(y,t),model:n[a]});y.query=e,y.position=i.position(c),y.posit
ion.top=y.position.top+c.prop("offsetHeight")}else w();v(s,!1)}},function(){w(),v(s,!1)})};w(),y.query=void 0,p.$parsers.push(function(e){var t;return w(),d?e:(e&&e.length>=m&&(g>0?(t&&a.cancel(t),t=a(function(){k(e)},g)):k(e)),h?e:void 0)}),p.$render=function(){var e={};e[f.itemName]=d||p.$viewValue,c.val(f.viewMapper(y,e)||p.$viewValue),d=void 0},y.select=function(e){var t,n,a={};a[f.itemName]=n=d=y.matches[e].model,t=f.modelMapper(y,a),p.$setViewValue(t),p.$render(),b(y,{$item:n,$model:t,$label:f.viewMapper(y,a)}),c[0].focus()},c.bind("keydown",function(e){0!==y.matches.length&&-1!==l.indexOf(e.which)&&(e.preventDefault(),40===e.which?(y.activeIdx=(y.activeIdx+1)%y.matches.length,y.$digest()):38===e.which?(y.activeIdx=(y.activeIdx?y.activeIdx:y.matches.length)-1,y.$digest()):13===e.which||9===e.which?y.$apply(function(){y.select(y.activeIdx)}):27===e.which&&(e.stopPropagation(),w(),y.$digest()))}),o.bind("click",function(){w(),y.$digest()}),c.after(e($)(y))}}}]).directive("typeah
eadPopup",function(){return{restrict:"E",scope:{matches:"=",query:"=",active:"=",position:"=",select:"&"},replace:!0,templateUrl:"template/typeahead/typeahead.html",link:function(e){e.isOpen=function(){return e.matches.length>0},e.isActive=function(t){return e.active==t},e.selectActive=function(t){e.active=t},e.selectMatch=function(t){e.select({activeIdx:t})}}}}).filter("typeaheadHighlight",function(){function e(e){return e.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}return function(t,n){return n?t.replace(RegExp(e(n),"gi"),"<strong>$&</strong>"):n}}),angular.module("template/accordion/accordion-group.html",[]).run(["$templateCache",function(e){e.put("template/accordion/accordion-group.html",'<div class="accordion-group">\n <div class="accordion-heading" ><a class="accordion-toggle" ng-click="isOpen = !isOpen" accordion-transclude="heading">{{heading}}</a></div>\n <div class="accordion-body" collapse="!isOpen">\n <div class="accordion-inner" ng-transclude></div> </div>\n</div>')}
]),angular.module("template/accordion/accordion.html",[]).run(["$templateCache",function(e){e.put("template/accordion/accordion.html",'<div class="accordion" ng-transclude></div>')}]),angular.module("template/alert/alert.html",[]).run(["$templateCache",function(e){e.put("template/alert/alert.html","<div class='alert' ng-class='type && \"alert-\" + type'>\n <button ng-show='closeable' type='button' class='close' ng-click='close()'>×</button>\n <div ng-transclude></div>\n</div>\n")}]),angular.module("template/carousel/carousel.html",[]).run(["$templateCache",function(e){e.put("template/carousel/carousel.html",'<div ng-mouseenter="pause()" ng-mouseleave="play()" class="carousel">\n <ol class="carousel-indicators" ng-show="slides().length > 1">\n <li ng-repeat="slide in slides()" ng-class="{active: isActive(slide)}" ng-click="select(slide)"></li>\n </ol>\n <div class="carousel-inner" ng-transclude></div>\n <a ng-click="prev()" class="carousel-control left"
ng-show="slides().length > 1">‹</a>\n <a ng-click="next()" class="carousel-control right" ng-show="slides().length > 1">›</a>\n</div>\n')}]),angular.module("template/carousel/slide.html",[]).run(["$templateCache",function(e){e.put("template/carousel/slide.html","<div ng-class=\"{\n 'active': leaving || (active && !entering),\n 'prev': (next || active) && direction=='prev',\n 'next': (next || active) && direction=='next',\n 'right': direction=='prev',\n 'left': direction=='next'\n }\" class=\"item\" ng-transclude></div>\n")}]),angular.module("template/datepicker/datepicker.html",[]).run(["$templateCache",function(e){e.put("template/datepicker/datepicker.html",'<table class="well well-large">\n <thead>\n <tr class="text-center">\n <th><button class="btn pull-left" ng-click="move(-1)"><i class="icon-chevron-left"></i></button></th>\n <th colspan="{{rows[0].length - 2 + showWeekNumbers}}"><button class="btn btn-block" ng-click="toggleMode(
)"><strong>{{title}}</strong></button></th>\n <th><button class="btn pull-right" ng-click="move(1)"><i class="icon-chevron-right"></i></button></th>\n </tr>\n <tr class="text-center" ng-show="labels.length > 0">\n <th ng-show="showWeekNumbers">#</th>\n <th ng-repeat="label in labels">{{label}}</th>\n </tr>\n </thead>\n <tbody>\n <tr ng-repeat="row in rows">\n <td ng-show="showWeekNumbers" class="text-center"><em>{{ getWeekNumber(row) }}</em></td>\n <td ng-repeat="dt in row" class="text-center">\n <button style="width:100%;" class="btn" ng-class="{\'btn-info\': dt.isSelected}" ng-click="select(dt.date)" ng-disabled="dt.disabled"><span ng-class="{muted: ! dt.isCurrent}">{{dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("template/dialog/message.html",[]).run(["$templateCache",function(e){e.put("template/dialog/message.html",'<div class="modal-header">\n <h3>{{ title }}</h3>\n</div>\n<div class=
"modal-body">\n <p>{{ message }}</p>\n</div>\n<div class="modal-footer">\n <button ng-repeat="btn in buttons" ng-click="close(btn.result)" class="btn" ng-class="btn.cssClass">{{ btn.label }}</button>\n</div>\n')}]),angular.module("template/modal/backdrop.html",[]).run(["$templateCache",function(e){e.put("template/modal/backdrop.html",'<div class="modal-backdrop"></div>')}]),angular.module("template/modal/window.html",[]).run(["$templateCache",function(e){e.put("template/modal/window.html",'<div class="modal in" ng-transclude></div>')}]),angular.module("template/pagination/pager.html",[]).run(["$templateCache",function(e){e.put("template/pagination/pager.html",'<div class="pager">\n <ul>\n <li ng-repeat="page in pages" ng-class="{disabled: page.disabled, previous: page.previous, next: page.next}"><a ng-click="selectPage(page.number)">{{page.text}}</a></li>\n </ul>\n</div>\n')}]),angular.module("template/pagination/pagination.html",[]).run(["$templateCache",function(e){e.put("tem
plate/pagination/pagination.html",'<div class="pagination"><ul>\n <li ng-repeat="page in pages" ng-class="{active: page.active, disabled: page.disabled}"><a ng-click="selectPage(page.number)">{{page.text}}</a></li>\n </ul>\n</div>\n')}]),angular.module("template/tooltip/tooltip-html-unsafe-popup.html",[]).run(["$templateCache",function(e){e.put("template/tooltip/tooltip-html-unsafe-popup.html",'<div class="tooltip {{placement}}" ng-class="{ in: isOpen(), fade: animation() }">\n <div class="tooltip-arrow"></div>\n <div class="tooltip-inner" ng-bind-html-unsafe="content"></div>\n</div>\n')}]),angular.module("template/tooltip/tooltip-popup.html",[]).run(["$templateCache",function(e){e.put("template/tooltip/tooltip-popup.html",'<div class="tooltip {{placement}}" ng-class="{ in: isOpen(), fade: animation() }">\n <div class="tooltip-arrow"></div>\n <div class="tooltip-inner" ng-bind="content"></div>\n</div>\n')}]),angular.module("template/popover/popover.html",[]).run(["$templateCac
he",function(e){e.put("template/popover/popover.html",'<div class="popover {{placement}}" ng-class="{ in: isOpen(), fade: animation() }">\n <div class="arrow"></div>\n\n <div class="popover-inner">\n <h3 class="popover-title" ng-bind="title" ng-show="title"></h3>\n <div class="popover-content" ng-bind="content"></div>\n </div>\n</div>\n')}]),angular.module("template/progressbar/bar.html",[]).run(["$templateCache",function(e){e.put("template/progressbar/bar.html",'<div class="bar" ng-class=\'type && "bar-" + type\'></div>')}]),angular.module("template/progressbar/progress.html",[]).run(["$templateCache",function(e){e.put("template/progressbar/progress.html",'<div class="progress"><progressbar ng-repeat="bar in bars" width="bar.to" old="bar.from" animate="bar.animate" type="bar.type"></progressbar></div>')}]),angular.module("template/rating/rating.html",[]).run(["$templateCache",function(e){e.put("template/rating/rating.html",'<span ng-mouseleave="reset()">\n <i ng-repeat
="number in range" ng-mouseenter="enter(number)" ng-click="rate(number)" ng-class="{\'icon-star\': number <= val, \'icon-star-empty\': number > val}"></i>\n</span>\n')}]),angular.module("template/tabs/pane.html",[]).run(["$templateCache",function(e){e.put("template/tabs/pane.html",'<div class="tab-pane" ng-class="{active: selected}" ng-show="selected" ng-transclude></div>\n')}]),angular.module("template/tabs/tab.html",[]).run(["$templateCache",function(e){e.put("template/tabs/tab.html",'<li ng-class="{active: active, disabled: disabled}">\n <a ng-click="select()" tab-heading-transclude>{{heading}}</a>\n</li>\n')}]),angular.module("template/tabs/tabs.html",[]).run(["$templateCache",function(e){e.put("template/tabs/tabs.html",'<div class="tabbable">\n <ul class="nav nav-tabs">\n <li ng-repeat="pane in panes" ng-class="{active:pane.selected}">\n <a ng-click="select(pane)">{{pane.heading}}</a>\n </li>\n </ul>\n <div class="tab-content" ng-transclude></div>\n</div>\n')}]),
angular.module("template/tabs/tabset.html",[]).run(["$templateCache",function(e){e.put("template/tabs/tabset.html",'\n<div class="tabbable">\n <ul class="nav {{type && \'nav-\' + type}}" ng-class="{\'nav-stacked\': vertical}" ng-transclude>\n </ul>\n <div class="tab-content">\n <div class="tab-pane" \n ng-repeat="tab in tabs" \n ng-class="{active: tab.active}"\n tab-content-transclude="tab" tt="tab">\n </div>\n </div>\n</div>\n')}]),angular.module("template/timepicker/timepicker.html",[]).run(["$templateCache",function(e){e.put("template/timepicker/timepicker.html",'<table class="form-inline">\n <tr class="text-center">\n <td><a ng-click="incrementHours()" class="btn btn-link"><i class="icon-chevron-up"></i></a></td>\n <td> </td>\n <td><a ng-click="incrementMinutes()" class="btn btn-link"><i class="icon-chevron-up"></i></a></td>\n <td ng-show="showMeridian"></td>\n </tr>\n <tr>\n <td class="control-group" ng-class="{\'error\': !validHours}
"><input type="text" ng-model="hours" ng-change="updateHours()" class="span1 text-center" ng-mousewheel="incrementHours()" ng-readonly="readonlyInput" maxlength="2" /></td>\n <td>:</td>\n <td class="control-group" ng-class="{\'error\': !validMinutes}"><input type="text" ng-model="minutes" ng-change="updateMinutes()" class="span1 text-center" ng-readonly="readonlyInput" maxlength="2"></td>\n <td ng-show="showMeridian"><button ng-click="toggleMeridian()" class="btn text-center">{{meridian}}</button></td>\n </tr>\n <tr class="text-center">\n <td><a ng-click="decrementHours()" class="btn btn-link"><i class="icon-chevron-down"></i></a></td>\n <td> </td>\n <td><a ng-click="decrementMinutes()" class="btn btn-link"><i class="icon-chevron-down"></i></a></td>\n <td ng-show="showMeridian"></td>\n </tr>\n</table>')}]),angular.module("template/typeahead/typeahead.html",[]).run(["$templateCache",function(e){e.put("template/typeahead/typeahead.html",'<ul class="typeahead dropdown-menu"
ng-style="{display: isOpen()&&\'block\' || \'none\', top: position.top+\'px\', left: position.left+\'px\'}">\n <li ng-repeat="match in matches" ng-class="{active: isActive($index) }" ng-mouseenter="selectActive($index)">\n <a tabindex="-1" ng-click="selectMatch($index)" ng-bind-html-unsafe="match.label | typeaheadHighlight:query"></a>\n </li>\n</ul>')}]);
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/js/lib/angular-ui/angular-ui-router.min.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/js/lib/angular-ui/angular-ui-router.min.js b/ocw-ui/frontend/app/js/lib/angular-ui/angular-ui-router.min.js
deleted file mode 100644
index eb67425..0000000
--- a/ocw-ui/frontend/app/js/lib/angular-ui/angular-ui-router.min.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/**
- * State-based routing for AngularJS
- * @version v0.0.1
- * @link http://angular-ui.github.com/
- * @license MIT License, http://www.opensource.org/licenses/MIT
- */
-(function(t,r,e){"use strict";function n(t,r){return g(new(g(function(){},{prototype:t})),r)}function a(t){return d(arguments,function(r){r!==t&&d(r,function(r,e){t.hasOwnProperty(e)||(t[e]=r)})}),t}function i(t,r,e){this.fromConfig=function(t,r,e){return h(t.template)?this.fromString(t.template,r):h(t.templateUrl)?this.fromUrl(t.templateUrl,r):h(t.templateProvider)?this.fromProvider(t.templateProvider,r,e):null},this.fromString=function(t,r){return m(t)?t(r):t},this.fromUrl=function(e,n){return m(e)&&(e=e(n)),null==e?null:t.get(e,{cache:r}).then(function(t){return t.data})},this.fromProvider=function(t,r,n){return e.invoke(t,null,n||{params:r})}}function o(t){function r(r){if(!/^\w+$/.test(r))throw Error("Invalid parameter name '"+r+"' in pattern '"+t+"'");if(i[r])throw Error("Duplicate parameter name '"+r+"' in pattern '"+t+"'");i[r]=!0,l.push(r)}function e(t){return t.replace(/[\\\[\]\^$*+?.()|{}]/g,"\\$&")}var n,a=/([:*])(\w+)|\{(\w+)(?:\:((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+
))?\}/g,i={},o="^",s=0,u=this.segments=[],l=this.params=[];this.source=t;for(var c,f,h;(n=a.exec(t))&&(c=n[2]||n[3],f=n[4]||("*"==n[1]?".*":"[^/]*"),h=t.substring(s,n.index),!(h.indexOf("?")>=0));)o+=e(h)+"("+f+")",r(c),u.push(h),s=a.lastIndex;h=t.substring(s);var m=h.indexOf("?");if(m>=0){var p=this.sourceSearch=h.substring(m);h=h.substring(0,m),this.sourcePath=t.substring(0,s+m),d(p.substring(1).split(/[&?]/),r)}else this.sourcePath=t,this.sourceSearch="";o+=e(h)+"$",u.push(h),this.regexp=RegExp(o),this.prefix=u[0]}function s(){this.compile=function(t){return new o(t)},this.isMatcher=function(t){return t instanceof o},this.$get=function(){return this}}function u(t){function r(t){var r=/^\^((?:\\[^a-zA-Z0-9]|[^\\\[\]\^$*+?.()|{}]+)*)/.exec(t.source);return null!=r?r[1].replace(/\\(.)/g,"$1"):""}function e(t,r){return t.replace(/\$(\$|\d{1,2})/,function(t,e){return r["$"===e?0:Number(e)]})}function n(t,r,e){if(!e)return!1;var n=t.invoke(r,r,{$match:e});return h(n)?n:!0}var a=[],i=nu
ll;this.rule=function(t){if(!m(t))throw Error("'rule' must be a function");return a.push(t),this},this.otherwise=function(t){if(p(t)){var r=t;t=function(){return r}}else if(!m(t))throw Error("'rule' must be a function");return i=t,this},this.when=function(a,i){var o,s;if(p(a)&&(a=t.compile(a)),t.isMatcher(a)){if(p(i))s=t.compile(i),i=["$match",function(t){return s.format(t)}];else if(!m(i)&&!v(i))throw Error("invalid 'handler' in when()");o=function(t,r){return n(t,i,a.exec(r.path(),r.search()))},o.prefix=p(a.prefix)?a.prefix:""}else{if(!(a instanceof RegExp))throw Error("invalid 'what' in when()");if(p(i))s=i,i=["$match",function(t){return e(s,t)}];else if(!m(i)&&!v(i))throw Error("invalid 'handler' in when()");if(a.global||a.sticky)throw Error("when() RegExp must not be global or sticky");o=function(t,r){return n(t,i,a.exec(r.path()))},o.prefix=r(a)}return this.rule(o)},this.$get=["$location","$rootScope","$injector",function(t,r,e){function n(){var r,n,i=a.length;for(r=0;i>r;r++)
if(n=a[r](e,t)){p(n)&&t.replace().url(n);break}}return i&&a.push(i),r.$on("$locationChangeSuccess",n),{}}]}function l(t,r){function e(t){var r;if(p(t)){if(r=c[t],!r)throw Error("No such state '"+t+"'")}else if(r=c[t.name],!r||r!==t&&r.self!==t)throw Error("Invalid or unregistered state");return r}function i(a){a=n(a,{self:a,toString:function(){return this.name}});var i=a.name;if(!p(i)||i.indexOf("@")>=0)throw Error("State must have a valid name");if(c[i])throw Error("State '"+i+"'' is already defined");var o=u;if(h(a.parent))null!=a.parent&&(o=e(a.parent));else{var s=/^(.+)\.[^.]+$/.exec(i);null!=s&&(o=e(s[1]))}a.parent=o;var f=a.url;if(p(f))f=a.url="^"==f.charAt(0)?r.compile(f.substring(1)):(o.navigable||u).url.concat(f);else if($(f)&&m(f.exec)&&m(f.format)&&m(f.concat));else if(null!=f)throw Error("Invalid url '"+f+"' in state '"+a+"'");a.navigable=f?a:o?o.navigable:null;var w=a.params;if(w){if(!v(w))throw Error("Invalid params in state '"+a+"'");if(f)throw Error("Both params and
url specicified in state '"+a+"'")}else w=a.params=f?f.parameters():a.parent.params;var b={};if(d(w,function(t){b[t]=!0}),o){d(o.params,function(t){if(!b[t])throw Error("Missing required parameter '"+t+"' in state '"+i+"'");b[t]=!1});var E=a.ownParams=[];d(b,function(t,r){t&&E.push(r)})}else a.ownParams=w;var x={};d(h(a.views)?a.views:{"":a},function(t,r){0>r.indexOf("@")&&(r=r+"@"+a.parent.name),x[r]=t}),a.views=x,a.path=o?o.path.concat(a):[];var P=a.includes=o?g({},o.includes):{};return P[i]=!0,a.resolve||(a.resolve={}),!a["abstract"]&&f&&t.when(f,["$match",function(t){l.transitionTo(a,t,!1)}]),c[i]=a,a}function o(t,r){return $(t)?r=t:r.name=t,i(r),this}function s(t,r,i,o,s,c){function f(t,e,n,s,u){function l(e,n){d(e,function(e,a){f.push(r.when(p(e)?o.get(e):o.invoke(e,t.self,h)).then(function(t){n[a]=t}))})}var c,f=[s];n?c=e:(c={},d(t.params,function(t){c[t]=e[t]}));var h={$stateParams:c},m=u.globals={$stateParams:c};return l(t.resolve,m),m.$$state=t,d(t.views,function(e,n){var
a=u[n]={$$controller:e.controller};f.push(r.when(i.fromConfig(e,c,h)||"").then(function(t){a.$template=t})),e.resolve!==t.resolve&&l(e.resolve,a)}),r.all(f).then(function(r){return a(u.globals,r[0].globals),d(t.views,function(t,r){a(u[r],u.globals)}),u})}function m(t,r){var e={};return d(t,function(t){var n=r[t];e[t]=null!=n?n+"":null}),e}function $(t,r,e){for(var n=0;e.length>n;n++){var a=e[n];if(t[a]!=r[a])return!1}return!0}var v=r.reject(Error("transition superseded")),g=r.reject(Error("transition prevented"));return l={params:{},current:u.self,$current:u,transition:null},l.transitionTo=function(a,i,p){if(h(p)||(p=!0),a=e(a),a["abstract"])throw Error("Cannot transition to abstract state '"+a+"'");var d,b,E=a.path,x=l.$current,P=l.params,S=x.path,C=u.locals,y=[];for(d=0,b=E[d];b&&b===S[d]&&$(i,P,b.ownParams);d++,b=E[d])C=y[d]=b.locals;if(a===x&&C===x.locals)return l.transition=null,r.when(l.current);if(i=m(a.params,i||{}),t.$broadcast("$stateChangeStart",a.self,i,x.self,P).default
Prevented)return g;for(var j=r.when(C),R=d;E.length>R;R++,b=E[R])C=y[R]=n(C),j=f(b,i,b===a,j,C);var k=l.transition=j.then(function(){var r,e,n;if(l.transition!==k)return v;for(r=S.length-1;r>=d;r--)n=S[r],n.self.onExit&&o.invoke(n.self.onExit,n.self,n.locals.globals),n.locals=null;for(r=d;E.length>r;r++)e=E[r],e.locals=y[r],e.self.onEnter&&o.invoke(e.self.onEnter,e.self,e.locals.globals);l.$current=a,l.current=a.self,l.params=i,w(l.params,s),l.transition=null;var u=a.navigable;return p&&u&&c.url(u.url.format(u.locals.globals.$stateParams)),t.$broadcast("$stateChangeSuccess",a.self,i,x.self,P),l.current},function(e){return l.transition!==k?v:(l.transition=null,t.$broadcast("$stateChangeError",a.self,i,x.self,P,e),r.reject(e))});return k},l.is=function(t){return l.$current===e(t)},l.includes=function(t){return l.$current.includes[e(t).name]},l.href=function(t,r){var n=e(t),a=n.navigable;if(!a)throw Error("State '"+n+"' is not navigable");return a.url.format(m(n.params,r||{}))},l}var u
,l,c={};u=i({name:"",url:"^",views:null,"abstract":!0}),u.locals={globals:{$stateParams:{}}},u.navigable=null,this.state=o,this.$get=s,s.$inject=["$rootScope","$q","$templateFactory","$injector","$stateParams","$location","$urlRouter"]}function c(t,e,n,a,i){var o;try{o=a.get("$animator")}catch(s){}var u={restrict:"ECA",terminal:!0,link:function(a,s,l){function c(o){var u=t.$current&&t.$current.locals[p];if(u!==m)if(f&&(v&&o?v.leave(s.contents(),s):s.html(""),f.$destroy(),f=null),u){m=u,g.state=u.$$state;var l;v&&o?(l=r.element("<div></div>").html(u.$template).contents(),v.enter(l,s)):(s.html(u.$template),l=s.contents());var c=e(l);if(f=a.$new(),u.$$controller){u.$scope=f;var h=n(u.$$controller,u);s.children().data("$ngControllerController",h)}c(f),f.$emit("$viewContentLoaded"),f.$eval($),i()}else m=null,g.state=null}var f,m,p=l[u.name]||l.name||"",$=l.onload||"",v=h(o)&&o(a,l),d=s.parent().inheritedData("$uiView");0>p.indexOf("@")&&(p=p+"@"+(d?d.state.name:""));var g={name:p,state:n
ull};s.data("$uiView",g),a.$on("$stateChangeSuccess",function(){c(!0)}),c(!1)}};return u}function f(t,r){function a(t){this.locals=t.locals.globals,this.params=this.locals.$stateParams}function i(){this.locals=null,this.params=null}function o(e,o){if(null!=o.redirectTo){var s,l=o.redirectTo;if(p(l))s=l;else{if(!m(l))throw Error("Invalid 'redirectTo' in when()");s=function(t,r){return l(t,r.path(),r.search())}}r.when(e,s)}else t.state(n(o,{parent:null,name:"route:"+encodeURIComponent(e),url:e,onEnter:a,onExit:i}));return u.push(o),this}function s(t,r,n){function a(t){return""!==t.name?t:e}var i={routes:u,params:n,current:e};return r.$on("$stateChangeStart",function(t,e,n,i){r.$broadcast("$routeChangeStart",a(e),a(i))}),r.$on("$stateChangeSuccess",function(t,e,n,o){i.current=a(e),r.$broadcast("$routeChangeSuccess",a(e),a(o)),w(n,i.params)}),r.$on("$stateChangeError",function(t,e,n,i,o,s){r.$broadcast("$routeChangeError",a(e),a(i),s)}),i}var u=[];a.$inject=["$$state"],this.when=o,this.
$get=s,s.$inject=["$state","$rootScope","$routeParams"]}var h=r.isDefined,m=r.isFunction,p=r.isString,$=r.isObject,v=r.isArray,d=r.forEach,g=r.extend,w=r.copy;r.module("ui.util",["ng"]),r.module("ui.router",["ui.util"]),r.module("ui.state",["ui.router","ui.util"]),r.module("ui.compat",["ui.state"]),i.$inject=["$http","$templateCache","$injector"],r.module("ui.util").service("$templateFactory",i),o.prototype.concat=function(t){return new o(this.sourcePath+t+this.sourceSearch)},o.prototype.toString=function(){return this.source},o.prototype.exec=function(t,r){var e=this.regexp.exec(t);if(!e)return null;var n,a=this.params,i=a.length,o=this.segments.length-1,s={};for(n=0;o>n;n++)s[a[n]]=decodeURIComponent(e[n+1]);for(;i>n;n++)s[a[n]]=r[a[n]];return s},o.prototype.parameters=function(){return this.params},o.prototype.format=function(t){var r=this.segments,e=this.params;if(!t)return r.join("");var n,a,i,o=r.length-1,s=e.length,u=r[0];for(n=0;o>n;n++)i=t[e[n]],null!=i&&(u+=i),u+=r[n+1];fo
r(;s>n;n++)i=t[e[n]],null!=i&&(u+=(a?"&":"?")+e[n]+"="+encodeURIComponent(i),a=!0);return u},r.module("ui.util").provider("$urlMatcherFactory",s),u.$inject=["$urlMatcherFactoryProvider"],r.module("ui.router").provider("$urlRouter",u),l.$inject=["$urlRouterProvider","$urlMatcherFactoryProvider"],r.module("ui.state").value("$stateParams",{}).provider("$state",l),c.$inject=["$state","$compile","$controller","$injector","$anchorScroll"],r.module("ui.state").directive("uiView",c),f.$inject=["$stateProvider","$urlRouterProvider"],r.module("ui.compat").provider("$route",f).directive("ngView",c)})(window,window.angular);
\ No newline at end of file
[28/28] git commit: Resolve CLIMATE-512. Merge PR #105.
Posted by jo...@apache.org.
Resolve CLIMATE-512. Merge PR #105.
Project: http://git-wip-us.apache.org/repos/asf/climate/repo
Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/fc2e0ffc
Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/fc2e0ffc
Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/fc2e0ffc
Branch: refs/heads/master
Commit: fc2e0ffc02941d3de3a81478b8be84ea912b5142
Parents: fb37845 652ea65
Author: Michael Joyce <jo...@apache.org>
Authored: Wed Aug 27 20:07:01 2014 -0700
Committer: Michael Joyce <jo...@apache.org>
Committed: Wed Aug 27 20:07:01 2014 -0700
----------------------------------------------------------------------
ocw-ui/frontend-new/.bowerrc | 3 -
ocw-ui/frontend-new/.editorconfig | 21 -
ocw-ui/frontend-new/.gitattributes | 1 -
ocw-ui/frontend-new/.gitignore | 5 -
ocw-ui/frontend-new/.jshintrc | 24 -
ocw-ui/frontend-new/.travis.yml | 6 -
ocw-ui/frontend-new/Gruntfile.js | 412 -
ocw-ui/frontend-new/app/.buildignore | 1 -
ocw-ui/frontend-new/app/.htaccess | 543 -
ocw-ui/frontend-new/app/404.html | 175 -
ocw-ui/frontend-new/app/favicon.ico | Bin 4286 -> 0 bytes
ocw-ui/frontend-new/app/index.html | 148 -
ocw-ui/frontend-new/app/robots.txt | 3 -
ocw-ui/frontend-new/app/scripts/app.js | 96 -
.../app/scripts/controllers/datasetdisplay.js | 43 -
.../app/scripts/controllers/datasetselect.js | 64 -
.../app/scripts/controllers/main.js | 36 -
.../scripts/controllers/observationselect.js | 203 -
.../app/scripts/controllers/parameterselect.js | 275 -
.../app/scripts/controllers/rcmedselection.js | 144 -
.../app/scripts/controllers/result.js | 47 -
.../app/scripts/controllers/resultdetail.js | 46 -
.../app/scripts/controllers/settings.js | 34 -
.../app/scripts/controllers/timeline.js | 103 -
.../app/scripts/controllers/worldmap.js | 104 -
.../app/scripts/directives/bootstrapmodal.js | 79 -
.../scripts/directives/bootstrapmodalopen.js | 43 -
.../app/scripts/directives/leafletmap.js | 46 -
.../app/scripts/directives/onblur.js | 38 -
.../directives/predictivefilebrowserinput.js | 316 -
.../app/scripts/directives/previewmap.js | 76 -
.../app/scripts/directives/timeline.js | 54 -
.../scripts/filters/isodatetomiddleendian.js | 55 -
.../app/scripts/services/evaluationsettings.js | 56 -
.../app/scripts/services/regionselectparams.js | 46 -
.../services/selecteddatasetinformation.js | 57 -
ocw-ui/frontend-new/app/styles/main.css | 120 -
ocw-ui/frontend-new/app/views/main.html | 274 -
ocw-ui/frontend-new/app/views/modelselect.html | 87 -
ocw-ui/frontend-new/app/views/results.html | 34 -
.../frontend-new/app/views/resultsdetail.html | 30 -
ocw-ui/frontend-new/app/views/resultslist.html | 21 -
.../app/views/selectobservation.html | 80 -
ocw-ui/frontend-new/app/views/selectrcmed.html | 40 -
ocw-ui/frontend-new/bower.json | 25 -
ocw-ui/frontend-new/package.json | 40 -
ocw-ui/frontend-new/test/.jshintrc | 36 -
ocw-ui/frontend-new/test/karma.conf.js | 86 -
.../test/spec/controllers/datasetdisplay.js | 59 -
.../test/spec/controllers/datasetselect.js | 54 -
.../frontend-new/test/spec/controllers/main.js | 41 -
.../test/spec/controllers/observationselect.js | 122 -
.../test/spec/controllers/parameterselect.js | 136 -
.../test/spec/controllers/rcmedselection.js | 145 -
.../test/spec/controllers/result.js | 37 -
.../test/spec/controllers/resultdetail.js | 37 -
.../test/spec/controllers/settings.js | 37 -
.../test/spec/controllers/timeline.js | 37 -
.../test/spec/controllers/worldmap.js | 57 -
.../test/spec/directives/bootstrapmodal.js | 33 -
.../test/spec/directives/bootstrapmodalopen.js | 33 -
.../test/spec/directives/leafletmap.js | 33 -
.../frontend-new/test/spec/directives/onblur.js | 50 -
.../directives/predictivefilebrowserinput.js | 33 -
.../test/spec/directives/previewmap.js | 53 -
.../test/spec/directives/timeline.js | 33 -
.../test/spec/filters/isodatetomiddleendian.js | 76 -
.../test/spec/services/evaluationsettings.js | 44 -
.../test/spec/services/regionselectparams.js | 44 -
.../spec/services/selecteddatasetinformation.js | 92 -
ocw-ui/frontend/.bowerrc | 3 +
ocw-ui/frontend/.editorconfig | 21 +
ocw-ui/frontend/.gitattributes | 1 +
ocw-ui/frontend/.gitignore | 5 +
ocw-ui/frontend/.jshintrc | 24 +
ocw-ui/frontend/.travis.yml | 6 +
ocw-ui/frontend/Gruntfile.js | 412 +
ocw-ui/frontend/app/.buildignore | 1 +
ocw-ui/frontend/app/.htaccess | 543 +
ocw-ui/frontend/app/404.html | 175 +
ocw-ui/frontend/app/css/app.css | 108 -
.../app/css/lib/bootstrap-responsive.min.css | 9 -
ocw-ui/frontend/app/css/lib/bootstrap.min.css | 9 -
.../frontend/app/css/lib/font-awesome.min.css | 403 -
ocw-ui/frontend/app/css/lib/timeline.css | 193 -
ocw-ui/frontend/app/favicon.ico | Bin 0 -> 4286 bytes
ocw-ui/frontend/app/font/FontAwesome.otf | Bin 61896 -> 0 bytes
.../frontend/app/font/fontawesome-webfont.eot | Bin 37405 -> 0 bytes
.../frontend/app/font/fontawesome-webfont.svg | 399 -
.../frontend/app/font/fontawesome-webfont.ttf | Bin 79076 -> 0 bytes
.../frontend/app/font/fontawesome-webfont.woff | Bin 43572 -> 0 bytes
ocw-ui/frontend/app/img/globe.png | Bin 25857 -> 0 bytes
.../app/img/glyphicons-halflings-white.png | Bin 8777 -> 0 bytes
.../frontend/app/img/glyphicons-halflings.png | Bin 12799 -> 0 bytes
ocw-ui/frontend/app/index.html | 213 +-
ocw-ui/frontend/app/js/app.js | 91 -
.../app/js/controllers/DatasetDisplayCtrl.js | 34 -
.../app/js/controllers/DatasetSelectCtrl.js | 55 -
.../app/js/controllers/ObservationSelectCtrl.js | 194 -
.../app/js/controllers/ParameterSelectCtrl.js | 296 -
.../app/js/controllers/RcmedSelectionCtrl.js | 133 -
.../frontend/app/js/controllers/ResultCtrl.js | 38 -
.../app/js/controllers/ResultDetailCtrl.js | 38 -
.../frontend/app/js/controllers/SettingsCtrl.js | 24 -
.../frontend/app/js/controllers/TimelineCtrl.js | 92 -
.../frontend/app/js/controllers/WorldMapCtrl.js | 95 -
.../app/js/directives/BootstrapModal.js | 71 -
.../app/js/directives/BootstrapModalOpen.js | 39 -
ocw-ui/frontend/app/js/directives/LeafletMap.js | 38 -
ocw-ui/frontend/app/js/directives/OnBlur.js | 36 -
.../js/directives/PredictiveFileBrowserInput.js | 308 -
ocw-ui/frontend/app/js/directives/PreviewMap.js | 68 -
ocw-ui/frontend/app/js/directives/Timeline.js | 44 -
.../app/js/filters/ISODateToMiddleEndian.js | 48 -
.../js/lib/angular-ui/angular-ui-0.4-tpls.js | 2 -
.../js/lib/angular-ui/angular-ui-router.min.js | 7 -
.../angular-ui/ui-bootstrap-tpls-0.5.0.min.js | 2 -
.../app/js/lib/angular/angular-cookies.js | 183 -
.../app/js/lib/angular/angular-cookies.min.js | 7 -
.../app/js/lib/angular/angular-loader.js | 276 -
.../app/js/lib/angular/angular-loader.min.js | 7 -
.../app/js/lib/angular/angular-resource.js | 445 -
.../app/js/lib/angular/angular-resource.min.js | 10 -
.../app/js/lib/angular/angular-sanitize.js | 535 -
.../app/js/lib/angular/angular-sanitize.min.js | 13 -
ocw-ui/frontend/app/js/lib/angular/angular.js | 14733 ---------
.../frontend/app/js/lib/angular/angular.min.js | 161 -
ocw-ui/frontend/app/js/lib/angular/version.txt | 1 -
.../frontend/app/js/lib/bootstrap/bootstrap.js | 2276 --
.../app/js/lib/bootstrap/bootstrap.min.js | 6 -
.../frontend/app/js/lib/jquery/jquery-1.10.1.js | 9807 ------
.../jquery/jquery-ui/datepicker-wrapper/date.js | 125 -
.../jquery/jquery-ui/jquery-ui-1.10.3.min.js | 12 -
.../frontend/app/js/lib/leaflet/leaflet-0.5.js | 8 -
.../app/js/lib/timeline/timeline-locales.js | 101 -
.../app/js/lib/timeline/timeline-min.js | 199 -
ocw-ui/frontend/app/js/lib/timeline/timeline.js | 6381 ----
.../app/js/services/EvaluationSettings.js | 47 -
.../app/js/services/RegionSelectParams.js | 37 -
.../js/services/SelectedDatasetInformation.js | 49 -
ocw-ui/frontend/app/partials/main.html | 261 -
ocw-ui/frontend/app/partials/modelSelect.html | 86 -
.../frontend/app/partials/results.detail.html | 30 -
ocw-ui/frontend/app/partials/results.html | 34 -
ocw-ui/frontend/app/partials/results.list.html | 22 -
.../app/partials/selectObservation.html | 58 -
ocw-ui/frontend/app/partials/selectRcmed.html | 44 -
ocw-ui/frontend/app/robots.txt | 3 +
ocw-ui/frontend/app/scripts/app.js | 96 +
.../app/scripts/controllers/datasetdisplay.js | 43 +
.../app/scripts/controllers/datasetselect.js | 64 +
ocw-ui/frontend/app/scripts/controllers/main.js | 36 +
.../scripts/controllers/observationselect.js | 203 +
.../app/scripts/controllers/parameterselect.js | 275 +
.../app/scripts/controllers/rcmedselection.js | 144 +
.../frontend/app/scripts/controllers/result.js | 47 +
.../app/scripts/controllers/resultdetail.js | 46 +
.../app/scripts/controllers/settings.js | 34 +
.../app/scripts/controllers/timeline.js | 103 +
.../app/scripts/controllers/worldmap.js | 104 +
.../app/scripts/directives/bootstrapmodal.js | 79 +
.../scripts/directives/bootstrapmodalopen.js | 43 +
.../app/scripts/directives/leafletmap.js | 46 +
.../frontend/app/scripts/directives/onblur.js | 38 +
.../directives/predictivefilebrowserinput.js | 316 +
.../app/scripts/directives/previewmap.js | 76 +
.../frontend/app/scripts/directives/timeline.js | 54 +
.../scripts/filters/isodatetomiddleendian.js | 55 +
.../app/scripts/services/evaluationsettings.js | 56 +
.../app/scripts/services/regionselectparams.js | 46 +
.../services/selecteddatasetinformation.js | 57 +
ocw-ui/frontend/app/styles/main.css | 120 +
ocw-ui/frontend/app/views/main.html | 274 +
ocw-ui/frontend/app/views/modelselect.html | 87 +
ocw-ui/frontend/app/views/results.html | 34 +
ocw-ui/frontend/app/views/resultsdetail.html | 30 +
ocw-ui/frontend/app/views/resultslist.html | 21 +
.../frontend/app/views/selectobservation.html | 80 +
ocw-ui/frontend/app/views/selectrcmed.html | 40 +
ocw-ui/frontend/bower.json | 25 +
ocw-ui/frontend/config/karma-e2e.conf.js | 40 -
ocw-ui/frontend/config/karma.conf.js | 48 -
ocw-ui/frontend/package.json | 40 +
ocw-ui/frontend/scripts/e2e-test.sh | 27 -
ocw-ui/frontend/scripts/test.sh | 27 -
ocw-ui/frontend/scripts/web-server.js | 313 -
ocw-ui/frontend/test/.jshintrc | 36 +
ocw-ui/frontend/test/e2e/runner.html | 28 -
ocw-ui/frontend/test/e2e/scenarios.js | 63 -
ocw-ui/frontend/test/karma.conf.js | 86 +
.../frontend/test/lib/angular/angular-mocks.js | 1764 --
.../test/lib/angular/angular-scenario.js | 26195 -----------------
ocw-ui/frontend/test/lib/angular/version.txt | 1 -
.../test/spec/controllers/datasetdisplay.js | 59 +
.../test/spec/controllers/datasetselect.js | 54 +
ocw-ui/frontend/test/spec/controllers/main.js | 41 +
.../test/spec/controllers/observationselect.js | 122 +
.../test/spec/controllers/parameterselect.js | 136 +
.../test/spec/controllers/rcmedselection.js | 145 +
ocw-ui/frontend/test/spec/controllers/result.js | 37 +
.../test/spec/controllers/resultdetail.js | 37 +
.../frontend/test/spec/controllers/settings.js | 37 +
.../frontend/test/spec/controllers/timeline.js | 37 +
.../frontend/test/spec/controllers/worldmap.js | 57 +
.../test/spec/directives/bootstrapmodal.js | 33 +
.../test/spec/directives/bootstrapmodalopen.js | 33 +
.../frontend/test/spec/directives/leafletmap.js | 33 +
ocw-ui/frontend/test/spec/directives/onblur.js | 50 +
.../directives/predictivefilebrowserinput.js | 33 +
.../frontend/test/spec/directives/previewmap.js | 53 +
.../frontend/test/spec/directives/timeline.js | 33 +
.../test/spec/filters/isodatetomiddleendian.js | 76 +
.../test/spec/services/evaluationsettings.js | 44 +
.../test/spec/services/regionselectparams.js | 44 +
.../spec/services/selecteddatasetinformation.js | 92 +
.../unit/controllers/DatasetDisplayCtrlTest.js | 65 -
.../unit/controllers/DatasetSelectCtrlTest.js | 51 -
.../controllers/ObservationSelectCtrlTest.js | 151 -
.../unit/controllers/ParameterSelectCtrlTest.js | 269 -
.../unit/controllers/RcmedSelectionCtrlTest.js | 161 -
.../test/unit/controllers/SettingsCtrlTest.js | 47 -
.../test/unit/controllers/WorldMapCtrlTest.js | 48 -
.../test/unit/directives/BootstrapModalTest.js | 41 -
.../frontend/test/unit/directives/OnBlurTest.js | 42 -
.../test/unit/directives/PreviewMapTest.js | 46 -
.../unit/filters/ISODateToMiddleEndianTest.js | 67 -
.../unit/services/EvaluationSettingsTest.js | 40 -
.../unit/services/RegionSelectParamsTest.js | 41 -
.../services/SelectedDatasetInfomationTest.js | 90 -
229 files changed, 5532 insertions(+), 74150 deletions(-)
----------------------------------------------------------------------
[18/28] CLIMATE-512 - Replace frontend with new Yeoman/Grunt/Bower
frontend
Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/js/lib/angular-ui/ui-bootstrap-tpls-0.5.0.min.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/js/lib/angular-ui/ui-bootstrap-tpls-0.5.0.min.js b/ocw-ui/frontend/app/js/lib/angular-ui/ui-bootstrap-tpls-0.5.0.min.js
deleted file mode 100644
index 9d3d10e..0000000
--- a/ocw-ui/frontend/app/js/lib/angular-ui/ui-bootstrap-tpls-0.5.0.min.js
+++ /dev/null
@@ -1,2 +0,0 @@
-angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.transition","ui.bootstrap.collapse","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.position","ui.bootstrap.datepicker","ui.bootstrap.dialog","ui.bootstrap.dropdownToggle","ui.bootstrap.modal","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]),angular.module("ui.bootstrap.tpls",["template/accordion/accordion-group.html","template/accordion/accordion.html","template/alert/alert.html","template/carousel/carousel.html","template/carousel/slide.html","template/datepicker/datepicker.html","template/datepicker/popup.html","template/dialog/message.html","template/pagination/pager.html","template/pagination/pagination.html","template/tooltip/tooltip-html-unsafe-popup.html","template/tooltip/tooltip-popup.html","template/popover/
popover.html","template/progressbar/bar.html","template/progressbar/progress.html","template/rating/rating.html","template/tabs/tab.html","template/tabs/tabset-titles.html","template/tabs/tabset.html","template/timepicker/timepicker.html","template/typeahead/typeahead-match.html","template/typeahead/typeahead-popup.html"]),angular.module("ui.bootstrap.transition",[]).factory("$transition",["$q","$timeout","$rootScope",function(e,t,n){function a(e){for(var t in e)if(void 0!==o.style[t])return e[t]}var i=function(a,o,r){r=r||{};var l=e.defer(),s=i[r.animation?"animationEndEventName":"transitionEndEventName"],c=function(){n.$apply(function(){a.unbind(s,c),l.resolve(a)})};return s&&a.bind(s,c),t(function(){angular.isString(o)?a.addClass(o):angular.isFunction(o)?o(a):angular.isObject(o)&&a.css(o),s||l.resolve(a)}),l.promise.cancel=function(){s&&a.unbind(s,c),l.reject("Transition cancelled")},l.promise},o=document.createElement("trans"),r={WebkitTransition:"webkitTransitionEnd",MozTransit
ion:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"},l={WebkitTransition:"webkitAnimationEnd",MozTransition:"animationend",OTransition:"oAnimationEnd",transition:"animationend"};return i.transitionEndEventName=a(r),i.animationEndEventName=a(l),i}]),angular.module("ui.bootstrap.collapse",["ui.bootstrap.transition"]).directive("collapse",["$transition",function(e){var t=function(e,t,n){t.removeClass("collapse"),t.css({height:n}),t[0].offsetWidth,t.addClass("collapse")};return{link:function(n,a,i){var o,r=!0;n.$watch(function(){return a[0].scrollHeight},function(){0!==a[0].scrollHeight&&(o||(r?t(n,a,a[0].scrollHeight+"px"):t(n,a,"auto")))}),n.$watch(i.collapse,function(e){e?u():c()});var l,s=function(t){return l&&l.cancel(),l=e(a,t),l.then(function(){l=void 0},function(){l=void 0}),l},c=function(){r?(r=!1,o||t(n,a,"auto")):s({height:a[0].scrollHeight+"px"}).then(function(){o||t(n,a,"auto")}),o=!1},u=function(){o=!0,r?(r=!1,t(n,a,0)):(t(n,a,a[0].scrollHeight+"px"
),s({height:"0"}))}}}}]),angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse"]).constant("accordionConfig",{closeOthers:!0}).controller("AccordionController",["$scope","$attrs","accordionConfig",function(e,t,n){this.groups=[],this.closeOthers=function(a){var i=angular.isDefined(t.closeOthers)?e.$eval(t.closeOthers):n.closeOthers;i&&angular.forEach(this.groups,function(e){e!==a&&(e.isOpen=!1)})},this.addGroup=function(e){var t=this;this.groups.push(e),e.$on("$destroy",function(){t.removeGroup(e)})},this.removeGroup=function(e){var t=this.groups.indexOf(e);-1!==t&&this.groups.splice(this.groups.indexOf(e),1)}}]).directive("accordion",function(){return{restrict:"EA",controller:"AccordionController",transclude:!0,replace:!1,templateUrl:"template/accordion/accordion.html"}}).directive("accordionGroup",["$parse","$transition","$timeout",function(e){return{require:"^accordion",restrict:"EA",transclude:!0,replace:!0,templateUrl:"template/accordion/accordion-group.html",scope:{he
ading:"@"},controller:["$scope",function(){this.setHeading=function(e){this.heading=e}}],link:function(t,n,a,i){var o,r;i.addGroup(t),t.isOpen=!1,a.isOpen&&(o=e(a.isOpen),r=o.assign,t.$watch(function(){return o(t.$parent)},function(e){t.isOpen=e}),t.isOpen=o?o(t.$parent):!1),t.$watch("isOpen",function(e){e&&i.closeOthers(t),r&&r(t.$parent,e)})}}}]).directive("accordionHeading",function(){return{restrict:"EA",transclude:!0,template:"",replace:!0,require:"^accordionGroup",compile:function(e,t,n){return function(e,t,a,i){i.setHeading(n(e,function(){}))}}}}).directive("accordionTransclude",function(){return{require:"^accordionGroup",link:function(e,t,n,a){e.$watch(function(){return a[n.accordionTransclude]},function(e){e&&(t.html(""),t.append(e))})}}}),angular.module("ui.bootstrap.alert",[]).directive("alert",function(){return{restrict:"EA",templateUrl:"template/alert/alert.html",transclude:!0,replace:!0,scope:{type:"=",close:"&"},link:function(e,t,n){e.closeable="close"in n}}}),angular
.module("ui.bootstrap.buttons",[]).constant("buttonConfig",{activeClass:"active",toggleEvent:"click"}).directive("btnRadio",["buttonConfig",function(e){var t=e.activeClass||"active",n=e.toggleEvent||"click";return{require:"ngModel",link:function(e,a,i,o){o.$render=function(){a.toggleClass(t,angular.equals(o.$modelValue,e.$eval(i.btnRadio)))},a.bind(n,function(){a.hasClass(t)||e.$apply(function(){o.$setViewValue(e.$eval(i.btnRadio)),o.$render()})})}}}]).directive("btnCheckbox",["buttonConfig",function(e){var t=e.activeClass||"active",n=e.toggleEvent||"click";return{require:"ngModel",link:function(e,a,i,o){function r(){var t=e.$eval(i.btnCheckboxTrue);return angular.isDefined(t)?t:!0}function l(){var t=e.$eval(i.btnCheckboxFalse);return angular.isDefined(t)?t:!1}o.$render=function(){a.toggleClass(t,angular.equals(o.$modelValue,r()))},a.bind(n,function(){e.$apply(function(){o.$setViewValue(a.hasClass(t)?l():r()),o.$render()})})}}}]),angular.module("ui.bootstrap.carousel",["ui.bootstrap
.transition"]).controller("CarouselController",["$scope","$timeout","$transition","$q",function(e,t,n){function a(){function n(){o?(e.next(),a()):e.pause()}i&&t.cancel(i);var r=+e.interval;!isNaN(r)&&r>=0&&(i=t(n,r))}var i,o,r=this,l=r.slides=[],s=-1;r.currentSlide=null,r.select=function(i,o){function c(){r.currentSlide&&angular.isString(o)&&!e.noTransition&&i.$element?(i.$element.addClass(o),i.$element[0].offsetWidth=i.$element[0].offsetWidth,angular.forEach(l,function(e){angular.extend(e,{direction:"",entering:!1,leaving:!1,active:!1})}),angular.extend(i,{direction:o,active:!0,entering:!0}),angular.extend(r.currentSlide||{},{direction:o,leaving:!0}),e.$currentTransition=n(i.$element,{}),function(t,n){e.$currentTransition.then(function(){u(t,n)},function(){u(t,n)})}(i,r.currentSlide)):u(i,r.currentSlide),r.currentSlide=i,s=p,a()}function u(t,n){angular.extend(t,{direction:"",active:!0,leaving:!1,entering:!1}),angular.extend(n||{},{direction:"",active:!1,leaving:!1,entering:!1}),e.$
currentTransition=null}var p=l.indexOf(i);void 0===o&&(o=p>s?"next":"prev"),i&&i!==r.currentSlide&&(e.$currentTransition?(e.$currentTransition.cancel(),t(c)):c())},r.indexOfSlide=function(e){return l.indexOf(e)},e.next=function(){var t=(s+1)%l.length;return e.$currentTransition?void 0:r.select(l[t],"next")},e.prev=function(){var t=0>s-1?l.length-1:s-1;return e.$currentTransition?void 0:r.select(l[t],"prev")},e.select=function(e){r.select(e)},e.isActive=function(e){return r.currentSlide===e},e.slides=function(){return l},e.$watch("interval",a),e.play=function(){o||(o=!0,a())},e.pause=function(){e.noPause||(o=!1,i&&t.cancel(i))},r.addSlide=function(t,n){t.$element=n,l.push(t),1===l.length||t.active?(r.select(l[l.length-1]),1==l.length&&e.play()):t.active=!1},r.removeSlide=function(e){var t=l.indexOf(e);l.splice(t,1),l.length>0&&e.active?t>=l.length?r.select(l[t-1]):r.select(l[t]):s>t&&s--}}]).directive("carousel",[function(){return{restrict:"EA",transclude:!0,replace:!0,controller:"Ca
rouselController",require:"carousel",templateUrl:"template/carousel/carousel.html",scope:{interval:"=",noTransition:"=",noPause:"="}}}]).directive("slide",["$parse",function(e){return{require:"^carousel",restrict:"EA",transclude:!0,replace:!0,templateUrl:"template/carousel/slide.html",scope:{},link:function(t,n,a,i){if(a.active){var o=e(a.active),r=o.assign,l=t.active=o(t.$parent);t.$watch(function(){var e=o(t.$parent);return e!==t.active&&(e!==l?l=t.active=e:r(t.$parent,e=l=t.active)),e})}i.addSlide(t,n),t.$on("$destroy",function(){i.removeSlide(t)}),t.$watch("active",function(e){e&&i.select(t)})}}}]),angular.module("ui.bootstrap.position",[]).factory("$position",["$document","$window",function(e,t){function n(e,n){return e.currentStyle?e.currentStyle[n]:t.getComputedStyle?t.getComputedStyle(e)[n]:e.style[n]}function a(e){return"static"===(n(e,"position")||"static")}var i,o;e.bind("mousemove",function(e){i=e.pageX,o=e.pageY});var r=function(t){for(var n=e[0],i=t.offsetParent||n;i&&
i!==n&&a(i);)i=i.offsetParent;return i||n};return{position:function(t){var n=this.offset(t),a={top:0,left:0},i=r(t[0]);return i!=e[0]&&(a=this.offset(angular.element(i)),a.top+=i.clientTop-i.scrollTop,a.left+=i.clientLeft-i.scrollLeft),{width:t.prop("offsetWidth"),height:t.prop("offsetHeight"),top:n.top-a.top,left:n.left-a.left}},offset:function(n){var a=n[0].getBoundingClientRect();return{width:n.prop("offsetWidth"),height:n.prop("offsetHeight"),top:a.top+(t.pageYOffset||e[0].body.scrollTop),left:a.left+(t.pageXOffset||e[0].body.scrollLeft)}},mouse:function(){return{x:i,y:o}}}}]),angular.module("ui.bootstrap.datepicker",["ui.bootstrap.position"]).constant("datepickerConfig",{dayFormat:"dd",monthFormat:"MMMM",yearFormat:"yyyy",dayHeaderFormat:"EEE",dayTitleFormat:"MMMM yyyy",monthTitleFormat:"yyyy",showWeeks:!0,startingDay:0,yearRange:20,minDate:null,maxDate:null}).controller("DatepickerController",["$scope","$attrs","dateFilter","datepickerConfig",function(e,t,n,a){function i(t,n){
return angular.isDefined(t)?e.$parent.$eval(t):n}function o(e,t){return new Date(e,t,0).getDate()}function r(e,t){for(var n=Array(t),a=e,i=0;t>i;)n[i++]=new Date(a),a.setDate(a.getDate()+1);return n}function l(e,t,a,i){return{date:e,label:n(e,t),selected:!!a,secondary:!!i}}var s={day:i(t.dayFormat,a.dayFormat),month:i(t.monthFormat,a.monthFormat),year:i(t.yearFormat,a.yearFormat),dayHeader:i(t.dayHeaderFormat,a.dayHeaderFormat),dayTitle:i(t.dayTitleFormat,a.dayTitleFormat),monthTitle:i(t.monthTitleFormat,a.monthTitleFormat)},c=i(t.startingDay,a.startingDay),u=i(t.yearRange,a.yearRange);this.minDate=a.minDate?new Date(a.minDate):null,this.maxDate=a.maxDate?new Date(a.maxDate):null,this.modes=[{name:"day",getVisibleDates:function(e,t){var a=e.getFullYear(),i=e.getMonth(),u=new Date(a,i,1),p=c-u.getDay(),d=p>0?7-p:-p,m=new Date(u),g=0;d>0&&(m.setDate(-d+1),g+=d),g+=o(a,i+1),g+=(7-g%7)%7;for(var f=r(m,g),h=Array(7),v=0;g>v;v++){var b=new Date(f[v]);f[v]=l(b,s.day,t&&t.getDate()===b.getD
ate()&&t.getMonth()===b.getMonth()&&t.getFullYear()===b.getFullYear(),b.getMonth()!==i)}for(var $=0;7>$;$++)h[$]=n(f[$].date,s.dayHeader);return{objects:f,title:n(e,s.dayTitle),labels:h}},compare:function(e,t){return new Date(e.getFullYear(),e.getMonth(),e.getDate())-new Date(t.getFullYear(),t.getMonth(),t.getDate())},split:7,step:{months:1}},{name:"month",getVisibleDates:function(e,t){for(var a=Array(12),i=e.getFullYear(),o=0;12>o;o++){var r=new Date(i,o,1);a[o]=l(r,s.month,t&&t.getMonth()===o&&t.getFullYear()===i)}return{objects:a,title:n(e,s.monthTitle)}},compare:function(e,t){return new Date(e.getFullYear(),e.getMonth())-new Date(t.getFullYear(),t.getMonth())},split:3,step:{years:1}},{name:"year",getVisibleDates:function(e,t){for(var n=Array(u),a=e.getFullYear(),i=parseInt((a-1)/u,10)*u+1,o=0;u>o;o++){var r=new Date(i+o,0,1);n[o]=l(r,s.year,t&&t.getFullYear()===r.getFullYear())}return{objects:n,title:[n[0].label,n[u-1].label].join(" - ")}},compare:function(e,t){return e.getFullY
ear()-t.getFullYear()},split:5,step:{years:u}}],this.isDisabled=function(t,n){var a=this.modes[n||0];return this.minDate&&0>a.compare(t,this.minDate)||this.maxDate&&a.compare(t,this.maxDate)>0||e.dateDisabled&&e.dateDisabled({date:t,mode:a.name})}}]).directive("datepicker",["dateFilter","$parse","datepickerConfig","$log",function(e,t,n,a){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/datepicker.html",scope:{dateDisabled:"&"},require:["datepicker","?^ngModel"],controller:"DatepickerController",link:function(e,i,o,r){function l(){e.showWeekNumbers=0===g&&h}function s(e,t){for(var n=[];e.length>0;)n.push(e.splice(0,t));return n}function c(t){var n=null,i=!0;m.$modelValue&&(n=new Date(m.$modelValue),isNaN(n)?(i=!1,a.error('Datepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')):t&&(f=n)),m.$setValidity("date",i);var o=d.modes[g],r=o.getVisibleDates(f,n);angular.for
Each(r.objects,function(e){e.disabled=d.isDisabled(e.date,g)}),m.$setValidity("date-disabled",!n||!d.isDisabled(n)),e.rows=s(r.objects,o.split),e.labels=r.labels||[],e.title=r.title}function u(e){g=e,l(),c()}function p(e){var t=new Date(e);t.setDate(t.getDate()+4-(t.getDay()||7));var n=t.getTime();return t.setMonth(0),t.setDate(1),Math.floor(Math.round((n-t)/864e5)/7)+1}var d=r[0],m=r[1];if(m){var g=0,f=new Date,h=n.showWeeks;o.showWeeks?e.$parent.$watch(t(o.showWeeks),function(e){h=!!e,l()}):l(),o.min&&e.$parent.$watch(t(o.min),function(e){d.minDate=e?new Date(e):null,c()}),o.max&&e.$parent.$watch(t(o.max),function(e){d.maxDate=e?new Date(e):null,c()}),m.$render=function(){c(!0)},e.select=function(e){if(0===g){var t=new Date(m.$modelValue);t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),m.$setViewValue(t),c(!0)}else f=e,u(g-1)},e.move=function(e){var t=d.modes[g].step;f.setMonth(f.getMonth()+e*(t.months||0)),f.setFullYear(f.getFullYear()+e*(t.years||0)),c()},e.toggleMode=fu
nction(){u((g+1)%d.modes.length)},e.getWeekNumber=function(t){return 0===g&&e.showWeekNumbers&&7===t.length?p(t[0].date):null}}}}}]).constant("datepickerPopupConfig",{dateFormat:"yyyy-MM-dd",closeOnDateSelection:!0}).directive("datepickerPopup",["$compile","$parse","$document","$position","dateFilter","datepickerPopupConfig",function(e,t,n,a,i,o){return{restrict:"EA",require:"ngModel",link:function(r,l,s,c){function u(e){return e?i(e,h):null}function p(e){if(e){var t=new Date(e);if(!isNaN(t))return t}return e}function d(e){$?$(r,!!e):v.isOpen=!!e}function m(e,n,a){e&&(r.$watch(t(e),function(e){v[n]=e}),D.attr(a||n,n))}function g(){v.position=a.position(l),v.position.top=v.position.top+l.prop("offsetHeight")}var f=angular.isDefined(s.closeOnDateSelection)?v.$eval(s.closeOnDateSelection):o.closeOnDateSelection,h=s.datepickerPopup||o.dateFormat,v=r.$new();r.$on("$destroy",function(){v.$destroy()}),c.$formatters.push(u),c.$parsers.push(p);var b,$;s.open&&(b=t(s.open),$=b.assign,r.$watch
(b,function(e){v.isOpen=!!e})),v.isOpen=b?b(r):!1;var y=function(e){v.isOpen&&e.target!==l[0]&&v.$apply(function(){d(!1)})},w=function(){v.$apply(function(){d(!0)})},k=angular.element("<datepicker-popup-wrap><datepicker></datepicker></datepicker-popup-wrap>");k.attr({"ng-model":"date","ng-change":"dateSelection()"});var D=k.find("datepicker");s.datepickerOptions&&D.attr(angular.extend({},r.$eval(s.datepickerOptions)));var x=t(s.ngModel).assign;v.dateSelection=function(){x(r,v.date),f&&d(!1)},v.$watch(function(){return c.$modelValue},function(e){if(angular.isString(e)){var t=p(e);if(e&&!t)throw x(r,null),Error(e+" cannot be parsed to a date object.");e=t}v.date=e,g()}),m(s.min,"min"),m(s.max,"max"),s.showWeeks?m(s.showWeeks,"showWeeks","show-weeks"):(v.showWeeks=!0,D.attr("show-weeks","showWeeks")),s.dateDisabled&&D.attr("date-disabled",s.dateDisabled),v.$watch("isOpen",function(e){e?(g(),n.bind("click",y),l.unbind("focus",w),l.focus()):(n.unbind("click",y),l.bind("focus",w)),$&&$(r,
e)}),v.today=function(){x(r,new Date)},v.clear=function(){x(r,null)},l.after(e(k)(v))}}}]).directive("datepickerPopupWrap",[function(){return{restrict:"E",replace:!0,transclude:!0,templateUrl:"template/datepicker/popup.html",link:function(e,t){t.bind("click",function(e){e.preventDefault(),e.stopPropagation()})}}}]);var dialogModule=angular.module("ui.bootstrap.dialog",["ui.bootstrap.transition"]);dialogModule.controller("MessageBoxController",["$scope","dialog","model",function(e,t,n){e.title=n.title,e.message=n.message,e.buttons=n.buttons,e.close=function(e){t.close(e)}}]),dialogModule.provider("$dialog",function(){var e={backdrop:!0,dialogClass:"modal",backdropClass:"modal-backdrop",transitionClass:"fade",triggerClass:"in",resolve:{},backdropFade:!1,dialogFade:!1,keyboard:!0,backdropClick:!0},t={},n={value:0};this.options=function(e){t=e},this.$get=["$http","$document","$compile","$rootScope","$controller","$templateCache","$q","$transition","$injector",function(a,i,o,r,l,s,c,u,p)
{function d(e){var t=angular.element("<div>");return t.addClass(e),t}function m(n){var a=this,i=this.options=angular.extend({},e,t,n);this._open=!1,this.backdropEl=d(i.backdropClass),i.backdropFade&&(this.backdropEl.addClass(i.transitionClass),this.backdropEl.removeClass(i.triggerClass)),this.modalEl=d(i.dialogClass),i.dialogFade&&(this.modalEl.addClass(i.transitionClass),this.modalEl.removeClass(i.triggerClass)),this.handledEscapeKey=function(e){27===e.which&&(a.close(),e.preventDefault(),a.$scope.$apply())},this.handleBackDropClick=function(e){a.close(),e.preventDefault(),a.$scope.$apply()}}var g=i.find("body");return m.prototype.isOpen=function(){return this._open},m.prototype.open=function(e,t){var n=this,a=this.options;if(e&&(a.templateUrl=e),t&&(a.controller=t),!a.template&&!a.templateUrl)throw Error("Dialog.open expected template or templateUrl, neither found. Use options or open method to specify them.");return this._loadResolves().then(function(e){var t=e.$scope=n.$scope=e.
$scope?e.$scope:r.$new();if(n.modalEl.html(e.$template),n.options.controller){var a=l(n.options.controller,e);n.modalEl.children().data("ngControllerController",a)}o(n.modalEl)(t),n._addElementsToDom(),setTimeout(function(){n.options.dialogFade&&n.modalEl.addClass(n.options.triggerClass),n.options.backdropFade&&n.backdropEl.addClass(n.options.triggerClass)}),n._bindEvents()}),this.deferred=c.defer(),this.deferred.promise},m.prototype.close=function(e){function t(e){e.removeClass(a.options.triggerClass)}function n(){a._open&&a._onCloseComplete(e)}var a=this,i=this._getFadingElements();if(i.length>0)for(var o=i.length-1;o>=0;o--)u(i[o],t).then(n);else this._onCloseComplete(e)},m.prototype._getFadingElements=function(){var e=[];return this.options.dialogFade&&e.push(this.modalEl),this.options.backdropFade&&e.push(this.backdropEl),e},m.prototype._bindEvents=function(){this.options.keyboard&&g.bind("keydown",this.handledEscapeKey),this.options.backdrop&&this.options.backdropClick&&this.b
ackdropEl.bind("click",this.handleBackDropClick)},m.prototype._unbindEvents=function(){this.options.keyboard&&g.unbind("keydown",this.handledEscapeKey),this.options.backdrop&&this.options.backdropClick&&this.backdropEl.unbind("click",this.handleBackDropClick)},m.prototype._onCloseComplete=function(e){this._removeElementsFromDom(),this._unbindEvents(),this.deferred.resolve(e)},m.prototype._addElementsToDom=function(){g.append(this.modalEl),this.options.backdrop&&(0===n.value&&g.append(this.backdropEl),n.value++),this._open=!0},m.prototype._removeElementsFromDom=function(){this.modalEl.remove(),this.options.backdrop&&(n.value--,0===n.value&&this.backdropEl.remove()),this._open=!1},m.prototype._loadResolves=function(){var e,t=[],n=[],i=this;return this.options.template?e=c.when(this.options.template):this.options.templateUrl&&(e=a.get(this.options.templateUrl,{cache:s}).then(function(e){return e.data})),angular.forEach(this.options.resolve||[],function(e,a){n.push(a),t.push(angular.isS
tring(e)?p.get(e):p.invoke(e))}),n.push("$template"),t.push(e),c.all(t).then(function(e){var t={};return angular.forEach(e,function(e,a){t[n[a]]=e}),t.dialog=i,t})},{dialog:function(e){return new m(e)},messageBox:function(e,t,n){return new m({templateUrl:"template/dialog/message.html",controller:"MessageBoxController",resolve:{model:function(){return{title:e,message:t,buttons:n}}}})}}}]}),angular.module("ui.bootstrap.dropdownToggle",[]).directive("dropdownToggle",["$document","$location",function(e){var t=null,n=angular.noop;return{restrict:"CA",link:function(a,i){a.$watch("$location.path",function(){n()}),i.parent().bind("click",function(){n()}),i.bind("click",function(a){var o=i===t;a.preventDefault(),a.stopPropagation(),t&&n(),o||(i.parent().addClass("open"),t=i,n=function(a){a&&(a.preventDefault(),a.stopPropagation()),e.unbind("click",n),i.parent().removeClass("open"),n=angular.noop,t=null},e.bind("click",n))})}}}]),angular.module("ui.bootstrap.modal",["ui.bootstrap.dialog"]).di
rective("modal",["$parse","$dialog",function(e,t){return{restrict:"EA",terminal:!0,link:function(n,a,i){var o,r=angular.extend({},n.$eval(i.uiOptions||i.bsOptions||i.options)),l=i.modal||i.show;r=angular.extend(r,{template:a.html(),resolve:{$scope:function(){return n}}});var s=t.dialog(r);a.remove(),o=i.close?function(){e(i.close)(n)}:function(){angular.isFunction(e(l).assign)&&e(l).assign(n,!1)},n.$watch(l,function(e){e?s.open().then(function(){o()}):s.isOpen()&&s.close()})}}}]),angular.module("ui.bootstrap.pagination",[]).controller("PaginationController",["$scope","$interpolate",function(e,t){this.currentPage=1,this.noPrevious=function(){return 1===this.currentPage},this.noNext=function(){return this.currentPage===e.numPages},this.isActive=function(e){return this.currentPage===e},this.reset=function(){e.pages=[],this.currentPage=parseInt(e.currentPage,10),this.currentPage>e.numPages&&e.selectPage(e.numPages)};var n=this;e.selectPage=function(t){!n.isActive(t)&&t>0&&e.numPages>=t&
&(e.currentPage=t,e.onSelectPage({page:t}))},this.getAttributeValue=function(n,a,i){return angular.isDefined(n)?i?t(n)(e.$parent):e.$parent.$eval(n):a}}]).constant("paginationConfig",{boundaryLinks:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0}).directive("pagination",["paginationConfig",function(e){return{restrict:"EA",scope:{numPages:"=",currentPage:"=",maxSize:"=",onSelectPage:"&"},controller:"PaginationController",templateUrl:"template/pagination/pagination.html",replace:!0,link:function(t,n,a,i){function o(e,t,n,a){return{number:e,text:t,active:n,disabled:a}}var r=i.getAttributeValue(a.boundaryLinks,e.boundaryLinks),l=i.getAttributeValue(a.directionLinks,e.directionLinks),s=i.getAttributeValue(a.firstText,e.firstText,!0),c=i.getAttributeValue(a.previousText,e.previousText,!0),u=i.getAttributeValue(a.nextText,e.nextText,!0),p=i.getAttributeValue(a.lastText,e.lastText,!0),d=i.getAttributeValue(a.rotate,e.rotate);t.$watch(
"numPages + currentPage + maxSize",function(){i.reset();var e=1,n=t.numPages,a=angular.isDefined(t.maxSize)&&t.maxSize<t.numPages;a&&(d?(e=Math.max(i.currentPage-Math.floor(t.maxSize/2),1),n=e+t.maxSize-1,n>t.numPages&&(n=t.numPages,e=n-t.maxSize+1)):(e=(Math.ceil(i.currentPage/t.maxSize)-1)*t.maxSize+1,n=Math.min(e+t.maxSize-1,t.numPages)));for(var m=e;n>=m;m++){var g=o(m,m,i.isActive(m),!1);t.pages.push(g)}if(a&&!d){if(e>1){var f=o(e-1,"...",!1,!1);t.pages.unshift(f)}if(t.numPages>n){var h=o(n+1,"...",!1,!1);t.pages.push(h)}}if(l){var v=o(i.currentPage-1,c,!1,i.noPrevious());t.pages.unshift(v);var b=o(i.currentPage+1,u,!1,i.noNext());t.pages.push(b)}if(r){var $=o(1,s,!1,i.noPrevious());t.pages.unshift($);var y=o(t.numPages,p,!1,i.noNext());t.pages.push(y)}})}}}]).constant("pagerConfig",{previousText:"« Previous",nextText:"Next »",align:!0}).directive("pager",["pagerConfig",function(e){return{restrict:"EA",scope:{numPages:"=",currentPage:"=",onSelectPage:"&"},controller:"Paginati
onController",templateUrl:"template/pagination/pager.html",replace:!0,link:function(t,n,a,i){function o(e,t,n,a,i){return{number:e,text:t,disabled:n,previous:s&&a,next:s&&i}}var r=i.getAttributeValue(a.previousText,e.previousText,!0),l=i.getAttributeValue(a.nextText,e.nextText,!0),s=i.getAttributeValue(a.align,e.align);t.$watch("numPages + currentPage",function(){i.reset();var e=o(i.currentPage-1,r,i.noPrevious(),!0,!1);t.pages.unshift(e);var n=o(i.currentPage+1,l,i.noNext(),!1,!0);t.pages.push(n)})}}}]),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position"]).provider("$tooltip",function(){function e(e){var t=/[A-Z]/g,n="-";return e.replace(t,function(e,t){return(t?n:"")+e.toLowerCase()})}var t={placement:"top",animation:!0,popupDelay:0},n={mouseenter:"mouseleave",click:"click",focus:"blur"},a={};this.options=function(e){angular.extend(a,e)},this.setTriggers=function(e){angular.extend(n,e)},this.$get=["$window","$compile","$timeout","$parse","$document","$position","$interp
olate",function(i,o,r,l,s,c,u){return function(i,p,d){function m(e){var t=e||g.trigger||d,a=n[t]||t;return{show:t,hide:a}}var g=angular.extend({},t,a),f=e(i),h=u.startSymbol(),v=u.endSymbol(),b="<"+f+"-popup "+'title="'+h+"tt_title"+v+'" '+'content="'+h+"tt_content"+v+'" '+'placement="'+h+"tt_placement"+v+'" '+'animation="tt_animation()" '+'is-open="tt_isOpen"'+">"+"</"+f+"-popup>";return{restrict:"EA",scope:!0,link:function(e,t,n){function a(){e.tt_isOpen?d():u()}function u(){e.tt_popupDelay?$=r(f,e.tt_popupDelay):e.$apply(f)}function d(){e.$apply(function(){h()})}function f(){var n,a,i,o;if(e.tt_content){switch(v&&r.cancel(v),w.css({top:0,left:0,display:"block"}),k?(y=y||s.find("body"),y.append(w)):t.after(w),n=k?c.offset(t):c.position(t),a=w.prop("offsetWidth"),i=w.prop("offsetHeight"),e.tt_placement){case"mouse":var l=c.mouse();o={top:l.y,left:l.x};break;case"right":o={top:n.top+n.height/2-i/2,left:n.left+n.width};break;case"bottom":o={top:n.top+n.height,left:n.left+n.width/2-a/
2};break;case"left":o={top:n.top+n.height/2-i/2,left:n.left-a};break;default:o={top:n.top-i,left:n.left+n.width/2-a/2}}o.top+="px",o.left+="px",w.css(o),e.tt_isOpen=!0}}function h(){e.tt_isOpen=!1,r.cancel($),angular.isDefined(e.tt_animation)&&e.tt_animation()?v=r(function(){w.remove()},500):w.remove()}var v,$,y,w=o(b)(e),k=angular.isDefined(g.appendToBody)?g.appendToBody:!1,D=m(void 0),x=!1;e.tt_isOpen=!1,n.$observe(i,function(t){e.tt_content=t}),n.$observe(p+"Title",function(t){e.tt_title=t}),n.$observe(p+"Placement",function(t){e.tt_placement=angular.isDefined(t)?t:g.placement}),n.$observe(p+"Animation",function(t){e.tt_animation=angular.isDefined(t)?l(t):function(){return g.animation}}),n.$observe(p+"PopupDelay",function(t){var n=parseInt(t,10);e.tt_popupDelay=isNaN(n)?g.popupDelay:n}),n.$observe(p+"Trigger",function(e){x&&(t.unbind(D.show,u),t.unbind(D.hide,d)),D=m(e),D.show===D.hide?t.bind(D.show,a):(t.bind(D.show,u),t.bind(D.hide,d)),x=!0}),n.$observe(p+"AppendToBody",functio
n(t){k=angular.isDefined(t)?l(t)(e):k}),k&&e.$on("$locationChangeSuccess",function(){e.tt_isOpen&&h()}),e.$on("$destroy",function(){e.tt_isOpen?h():w.remove()})}}}}]}).directive("tooltipPopup",function(){return{restrict:"E",replace:!0,scope:{content:"@",placement:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-popup.html"}}).directive("tooltip",["$tooltip",function(e){return e("tooltip","tooltip","mouseenter")}]).directive("tooltipHtmlUnsafePopup",function(){return{restrict:"E",replace:!0,scope:{content:"@",placement:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-html-unsafe-popup.html"}}).directive("tooltipHtmlUnsafe",["$tooltip",function(e){return e("tooltipHtmlUnsafe","tooltip","mouseenter")}]),angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("popoverPopup",function(){return{restrict:"EA",replace:!0,scope:{title:"@",content:"@",placement:"@",animation:"&",isOpen:"&"},templateUrl:"template/popover/popover.html"}}).d
irective("popover",["$compile","$timeout","$parse","$window","$tooltip",function(e,t,n,a,i){return i("popover","popover","click")}]),angular.module("ui.bootstrap.progressbar",["ui.bootstrap.transition"]).constant("progressConfig",{animate:!0,autoType:!1,stackedTypes:["success","info","warning","danger"]}).controller("ProgressBarController",["$scope","$attrs","progressConfig",function(e,t,n){function a(e){return r[e]}var i=angular.isDefined(t.animate)?e.$eval(t.animate):n.animate,o=angular.isDefined(t.autoType)?e.$eval(t.autoType):n.autoType,r=angular.isDefined(t.stackedTypes)?e.$eval("["+t.stackedTypes+"]"):n.stackedTypes;this.makeBar=function(e,t,n){var r=angular.isObject(e)?e.value:e||0,l=angular.isObject(t)?t.value:t||0,s=angular.isObject(e)&&angular.isDefined(e.type)?e.type:o?a(n||0):null;return{from:l,to:r,type:s,animate:i}},this.addBar=function(t){e.bars.push(t),e.totalPercent+=t.to},this.clearBars=function(){e.bars=[],e.totalPercent=0},this.clearBars()}]).directive("progress"
,function(){return{restrict:"EA",replace:!0,controller:"ProgressBarController",scope:{value:"=percent",onFull:"&",onEmpty:"&"},templateUrl:"template/progressbar/progress.html",link:function(e,t,n,a){e.$watch("value",function(e,t){if(a.clearBars(),angular.isArray(e))for(var n=0,i=e.length;i>n;n++)a.addBar(a.makeBar(e[n],t[n],n));else a.addBar(a.makeBar(e,t))},!0),e.$watch("totalPercent",function(t){t>=100?e.onFull():0>=t&&e.onEmpty()},!0)}}}).directive("progressbar",["$transition",function(e){return{restrict:"EA",replace:!0,scope:{width:"=",old:"=",type:"=",animate:"="},templateUrl:"template/progressbar/bar.html",link:function(t,n){t.$watch("width",function(a){t.animate?(n.css("width",t.old+"%"),e(n,{width:a+"%"})):n.css("width",a+"%")})}}}]),angular.module("ui.bootstrap.rating",[]).constant("ratingConfig",{max:5}).directive("rating",["ratingConfig","$parse",function(e,t){return{restrict:"EA",scope:{value:"=",onHover:"&",onLeave:"&"},templateUrl:"template/rating/rating.html",replace:
!0,link:function(n,a,i){var o=angular.isDefined(i.max)?n.$parent.$eval(i.max):e.max;n.range=[];for(var r=1;o>=r;r++)n.range.push(r);n.rate=function(e){n.readonly||(n.value=e)},n.enter=function(e){n.readonly||(n.val=e),n.onHover({value:e})},n.reset=function(){n.val=angular.copy(n.value),n.onLeave()},n.reset(),n.$watch("value",function(e){n.val=e}),n.readonly=!1,i.readonly&&n.$parent.$watch(t(i.readonly),function(e){n.readonly=!!e})}}}]),angular.module("ui.bootstrap.tabs",[]).directive("tabs",function(){return function(){throw Error("The `tabs` directive is deprecated, please migrate to `tabset`. Instructions can be found at http://github.com/angular-ui/bootstrap/tree/master/CHANGELOG.md")}}).controller("TabsetController",["$scope","$element",function(e){var t=this,n=t.tabs=e.tabs=[];t.select=function(e){angular.forEach(n,function(e){e.active=!1}),e.active=!0},t.addTab=function(e){n.push(e),(1===n.length||e.active)&&t.select(e)},t.removeTab=function(e){var a=n.indexOf(e);if(e.active&&
n.length>1){var i=a==n.length-1?a-1:a+1;t.select(n[i])}n.splice(a,1)}}]).directive("tabset",function(){return{restrict:"EA",transclude:!0,replace:!0,require:"^tabset",scope:{},controller:"TabsetController",templateUrl:"template/tabs/tabset.html",compile:function(e,t,n){return function(e,t,a,i){e.vertical=angular.isDefined(a.vertical)?e.$eval(a.vertical):!1,e.type=angular.isDefined(a.type)?e.$parent.$eval(a.type):"tabs",e.direction=angular.isDefined(a.direction)?e.$parent.$eval(a.direction):"top",e.tabsAbove="below"!=e.direction,i.$scope=e,i.$transcludeFn=n}}}}).directive("tab",["$parse","$http","$templateCache","$compile",function(e){return{require:"^tabset",restrict:"EA",replace:!0,templateUrl:"template/tabs/tab.html",transclude:!0,scope:{heading:"@",onSelect:"&select",onDeselect:"&deselect"},controller:function(){},compile:function(t,n,a){return function(t,n,i,o){var r,l;i.active?(r=e(i.active),l=r.assign,t.$parent.$watch(r,function(e){t.active=!!e}),t.active=r(t.$parent)):l=r=ang
ular.noop,t.$watch("active",function(e){l(t.$parent,e),e?(o.select(t),t.onSelect()):t.onDeselect()}),t.disabled=!1,i.disabled&&t.$parent.$watch(e(i.disabled),function(e){t.disabled=!!e
-}),t.select=function(){t.disabled||(t.active=!0)},o.addTab(t),t.$on("$destroy",function(){o.removeTab(t)}),t.active&&l(t.$parent,!0),t.$transcludeFn=a}}}}]).directive("tabHeadingTransclude",[function(){return{restrict:"A",require:"^tab",link:function(e,t){e.$watch("headingElement",function(e){e&&(t.html(""),t.append(e))})}}}]).directive("tabContentTransclude",["$compile","$parse",function(){function e(e){return e.tagName&&(e.hasAttribute("tab-heading")||e.hasAttribute("data-tab-heading")||"tab-heading"===e.tagName.toLowerCase()||"data-tab-heading"===e.tagName.toLowerCase())}return{restrict:"A",require:"^tabset",link:function(t,n,a){var i=t.$eval(a.tabContentTransclude);i.$transcludeFn(i.$parent,function(t){angular.forEach(t,function(t){e(t)?i.headingElement=t:n.append(t)})})}}}]).directive("tabsetTitles",function(){return{restrict:"A",require:"^tabset",templateUrl:"template/tabs/tabset-titles.html",replace:!0,link:function(e,t,n,a){e.$eval(n.tabsetTitles)?a.$transcludeFn(a.$scope.$p
arent,function(e){t.append(e)}):t.remove()}}}),angular.module("ui.bootstrap.timepicker",[]).filter("pad",function(){return function(e){return angular.isDefined(e)&&2>(""+e).length&&(e="0"+e),e}}).constant("timepickerConfig",{hourStep:1,minuteStep:1,showMeridian:!0,meridians:["AM","PM"],readonlyInput:!1,mousewheel:!0}).directive("timepicker",["padFilter","$parse","timepickerConfig",function(e,t,n){return{restrict:"EA",require:"ngModel",replace:!0,templateUrl:"template/timepicker/timepicker.html",scope:{model:"=ngModel"},link:function(a,i,o){function r(){var e=parseInt(a.hours,10),t=a.showMeridian?e>0&&13>e:e>=0&&24>e;return t?(a.showMeridian&&(12===e&&(e=0),a.meridian===u[1]&&(e+=12)),e):void 0}function l(){var t=c.getHours();a.showMeridian&&(t=0===t||12===t?12:t%12),a.hours="h"===b?t:e(t),a.validHours=!0;var n=c.getMinutes();a.minutes="m"===b?n:e(n),a.validMinutes=!0,a.meridian=a.showMeridian?12>c.getHours()?u[0]:u[1]:"",b=!1}function s(e){var t=new Date(c.getTime()+6e4*e);c.setHour
s(t.getHours()),c.setMinutes(t.getMinutes()),a.model=new Date(c)}var c=new Date,u=n.meridians,p=n.hourStep;o.hourStep&&a.$parent.$watch(t(o.hourStep),function(e){p=parseInt(e,10)});var d=n.minuteStep;o.minuteStep&&a.$parent.$watch(t(o.minuteStep),function(e){d=parseInt(e,10)}),a.showMeridian=n.showMeridian,o.showMeridian&&a.$parent.$watch(t(o.showMeridian),function(e){if(a.showMeridian=!!e,a.model)l();else{var t=new Date(c),n=r();angular.isDefined(n)&&t.setHours(n),a.model=new Date(t)}});var m=i.find("input"),g=m.eq(0),f=m.eq(1),h=angular.isDefined(o.mousewheel)?a.$eval(o.mousewheel):n.mousewheel;if(h){var v=function(e){e.originalEvent&&(e=e.originalEvent);var t=e.wheelDelta?e.wheelDelta:-e.deltaY;return e.detail||t>0};g.bind("mousewheel wheel",function(e){a.$apply(v(e)?a.incrementHours():a.decrementHours()),e.preventDefault()}),f.bind("mousewheel wheel",function(e){a.$apply(v(e)?a.incrementMinutes():a.decrementMinutes()),e.preventDefault()})}var b=!1;a.readonlyInput=angular.isDefin
ed(o.readonlyInput)?a.$eval(o.readonlyInput):n.readonlyInput,a.readonlyInput?(a.updateHours=angular.noop,a.updateMinutes=angular.noop):(a.updateHours=function(){var e=r();angular.isDefined(e)?(b="h",null===a.model&&(a.model=new Date(c)),a.model.setHours(e)):(a.model=null,a.validHours=!1)},g.bind("blur",function(){a.validHours&&10>a.hours&&a.$apply(function(){a.hours=e(a.hours)})}),a.updateMinutes=function(){var e=parseInt(a.minutes,10);e>=0&&60>e?(b="m",null===a.model&&(a.model=new Date(c)),a.model.setMinutes(e)):(a.model=null,a.validMinutes=!1)},f.bind("blur",function(){a.validMinutes&&10>a.minutes&&a.$apply(function(){a.minutes=e(a.minutes)})})),a.$watch(function(){return+a.model},function(e){!isNaN(e)&&e>0&&(c=new Date(e),l())}),a.incrementHours=function(){s(60*p)},a.decrementHours=function(){s(60*-p)},a.incrementMinutes=function(){s(d)},a.decrementMinutes=function(){s(-d)},a.toggleMeridian=function(){s(720*(12>c.getHours()?1:-1))}}}}]),angular.module("ui.bootstrap.typeahead",["u
i.bootstrap.position"]).factory("typeaheadParser",["$parse",function(e){var t=/^\s*(.*?)(?:\s+as\s+(.*?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+(.*)$/;return{parse:function(n){var a=n.match(t);if(!a)throw Error("Expected typeahead specification in form of '_modelValue_ (as _label_)? for _item_ in _collection_' but got '"+n+"'.");return{itemName:a[3],source:e(a[4]),viewMapper:e(a[2]||a[1]),modelMapper:e(a[1])}}}}]).directive("typeahead",["$compile","$parse","$q","$timeout","$document","$position","typeaheadParser",function(e,t,n,a,i,o,r){var l=[9,13,27,38,40];return{require:"ngModel",link:function(s,c,u,p){var d=s.$eval(u.typeaheadMinLength)||1,m=s.$eval(u.typeaheadWaitMs)||0,g=s.$eval(u.typeaheadEditable)!==!1,f=t(u.typeaheadLoading).assign||angular.noop,h=t(u.typeaheadOnSelect),v=u.typeaheadInputFormatter?t(u.typeaheadInputFormatter):void 0,b=t(u.ngModel).assign,$=r.parse(u.typeahead),y=angular.element("<typeahead-popup></typeahead-popup>");y.attr({matches:"matches",active:"activeI
dx",select:"select(activeIdx)",query:"query",position:"position"}),angular.isDefined(u.typeaheadTemplateUrl)&&y.attr("template-url",u.typeaheadTemplateUrl);var w=s.$new();s.$on("$destroy",function(){w.$destroy()});var k=function(){w.matches=[],w.activeIdx=-1},D=function(e){var t={$viewValue:e};f(s,!0),n.when($.source(w,t)).then(function(n){if(e===p.$viewValue){if(n.length>0){w.activeIdx=0,w.matches.length=0;for(var a=0;n.length>a;a++)t[$.itemName]=n[a],w.matches.push({label:$.viewMapper(w,t),model:n[a]});w.query=e,w.position=o.position(c),w.position.top=w.position.top+c.prop("offsetHeight")}else k();f(s,!1)}},function(){k(),f(s,!1)})};k(),w.query=void 0;var x;p.$parsers.push(function(e){return k(),e&&e.length>=d&&(m>0?(x&&a.cancel(x),x=a(function(){D(e)},m)):D(e)),g?e:void 0}),p.$formatters.push(function(e){var t,n,a={};return v?(a.$model=e,v(s,a)):(a[$.itemName]=e,t=$.viewMapper(s,a),n=$.viewMapper(s,{}),t!==n?t:e)}),w.select=function(e){var t,n,a={};a[$.itemName]=n=w.matches[e].mo
del,t=$.modelMapper(s,a),b(s,t),h(s,{$item:n,$model:t,$label:$.viewMapper(s,a)}),k(),c[0].focus()},c.bind("keydown",function(e){0!==w.matches.length&&-1!==l.indexOf(e.which)&&(e.preventDefault(),40===e.which?(w.activeIdx=(w.activeIdx+1)%w.matches.length,w.$digest()):38===e.which?(w.activeIdx=(w.activeIdx?w.activeIdx:w.matches.length)-1,w.$digest()):13===e.which||9===e.which?w.$apply(function(){w.select(w.activeIdx)}):27===e.which&&(e.stopPropagation(),k(),w.$digest()))}),i.bind("click",function(){k(),w.$digest()}),c.after(e(y)(w))}}}]).directive("typeaheadPopup",function(){return{restrict:"E",scope:{matches:"=",query:"=",active:"=",position:"=",select:"&"},replace:!0,templateUrl:"template/typeahead/typeahead-popup.html",link:function(e,t,n){e.templateUrl=n.templateUrl,e.isOpen=function(){return e.matches.length>0},e.isActive=function(t){return e.active==t},e.selectActive=function(t){e.active=t},e.selectMatch=function(t){e.select({activeIdx:t})}}}}).directive("typeaheadMatch",["$http
","$templateCache","$compile","$parse",function(e,t,n,a){return{restrict:"E",scope:{index:"=",match:"=",query:"="},link:function(i,o,r){var l=a(r.templateUrl)(i.$parent)||"template/typeahead/typeahead-match.html";e.get(l,{cache:t}).success(function(e){o.replaceWith(n(e.trim())(i))})}}}]).filter("typeaheadHighlight",function(){function e(e){return e.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}return function(t,n){return n?t.replace(RegExp(e(n),"gi"),"<strong>$&</strong>"):n}}),angular.module("template/accordion/accordion-group.html",[]).run(["$templateCache",function(e){e.put("template/accordion/accordion-group.html",'<div class="accordion-group">\n <div class="accordion-heading" ><a class="accordion-toggle" ng-click="isOpen = !isOpen" accordion-transclude="heading">{{heading}}</a></div>\n <div class="accordion-body" collapse="!isOpen">\n <div class="accordion-inner" ng-transclude></div> </div>\n</div>')}]),angular.module("template/accordion/accordion.html",[]).run(["$templateCach
e",function(e){e.put("template/accordion/accordion.html",'<div class="accordion" ng-transclude></div>')}]),angular.module("template/alert/alert.html",[]).run(["$templateCache",function(e){e.put("template/alert/alert.html","<div class='alert' ng-class='type && \"alert-\" + type'>\n <button ng-show='closeable' type='button' class='close' ng-click='close()'>×</button>\n <div ng-transclude></div>\n</div>\n")}]),angular.module("template/carousel/carousel.html",[]).run(["$templateCache",function(e){e.put("template/carousel/carousel.html",'<div ng-mouseenter="pause()" ng-mouseleave="play()" class="carousel">\n <ol class="carousel-indicators" ng-show="slides().length > 1">\n <li ng-repeat="slide in slides()" ng-class="{active: isActive(slide)}" ng-click="select(slide)"></li>\n </ol>\n <div class="carousel-inner" ng-transclude></div>\n <a ng-click="prev()" class="carousel-control left" ng-show="slides().length > 1">‹</a>\n <a ng-click="next()" class="
carousel-control right" ng-show="slides().length > 1">›</a>\n</div>\n')}]),angular.module("template/carousel/slide.html",[]).run(["$templateCache",function(e){e.put("template/carousel/slide.html","<div ng-class=\"{\n 'active': leaving || (active && !entering),\n 'prev': (next || active) && direction=='prev',\n 'next': (next || active) && direction=='next',\n 'right': direction=='prev',\n 'left': direction=='next'\n }\" class=\"item\" ng-transclude></div>\n")}]),angular.module("template/datepicker/datepicker.html",[]).run(["$templateCache",function(e){e.put("template/datepicker/datepicker.html",'<table>\n <thead>\n <tr class="text-center">\n <th><button type="button" class="btn pull-left" ng-click="move(-1)"><i class="icon-chevron-left"></i></button></th>\n <th colspan="{{rows[0].length - 2 + showWeekNumbers}}"><button type="button" class="btn btn-block" ng-click="toggleMode()"><strong>{{title}}</strong></button></th>\n <th><button type="butt
on" class="btn pull-right" ng-click="move(1)"><i class="icon-chevron-right"></i></button></th>\n </tr>\n <tr class="text-center" ng-show="labels.length > 0">\n <th ng-show="showWeekNumbers">#</th>\n <th ng-repeat="label in labels">{{label}}</th>\n </tr>\n </thead>\n <tbody>\n <tr ng-repeat="row in rows">\n <td ng-show="showWeekNumbers" class="text-center"><em>{{ getWeekNumber(row) }}</em></td>\n <td ng-repeat="dt in row" class="text-center">\n <button type="button" style="width:100%;" class="btn" ng-class="{\'btn-info\': dt.selected}" ng-click="select(dt.date)" ng-disabled="dt.disabled"><span ng-class="{muted: dt.secondary}">{{dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("template/datepicker/popup.html",[]).run(["$templateCache",function(e){e.put("template/datepicker/popup.html",'<ul class="dropdown-menu" ng-style="{display: (isOpen && \'block\') || \'none\', top: position.top+\'px\', left: po
sition.left+\'px\'}" class="dropdown-menu">\n <li ng-transclude></li>\n <li class="divider"></li>\n <li style="padding: 9px;">\n <span class="btn-group">\n <button class="btn btn-small btn-inverse" ng-click="today()">Today</button>\n <button class="btn btn-small btn-info" ng-click="showWeeks = ! showWeeks" ng-class="{active: showWeeks}">Weeks</button>\n <button class="btn btn-small btn-danger" ng-click="clear()">Clear</button>\n </span>\n <button class="btn btn-small btn-success pull-right" ng-click="isOpen = false">Close</button>\n </li>\n</ul>')}]),angular.module("template/dialog/message.html",[]).run(["$templateCache",function(e){e.put("template/dialog/message.html",'<div class="modal-header">\n <h3>{{ title }}</h3>\n</div>\n<div class="modal-body">\n <p>{{ message }}</p>\n</div>\n<div class="modal-footer">\n <button ng-repeat="btn in buttons" ng-click="close(btn.result)" class="btn" ng-class="btn.cssClass">{{ btn.label }}</button>\n</div>\n')}]),angular.module("template
/modal/backdrop.html",[]).run(["$templateCache",function(e){e.put("template/modal/backdrop.html",'<div class="modal-backdrop fade in"></div>')}]),angular.module("template/modal/window.html",[]).run(["$templateCache",function(e){e.put("template/modal/window.html",'<div class="modal in" ng-transclude></div>')}]),angular.module("template/pagination/pager.html",[]).run(["$templateCache",function(e){e.put("template/pagination/pager.html",'<div class="pager">\n <ul>\n <li ng-repeat="page in pages" ng-class="{disabled: page.disabled, previous: page.previous, next: page.next}"><a ng-click="selectPage(page.number)">{{page.text}}</a></li>\n </ul>\n</div>\n')}]),angular.module("template/pagination/pagination.html",[]).run(["$templateCache",function(e){e.put("template/pagination/pagination.html",'<div class="pagination"><ul>\n <li ng-repeat="page in pages" ng-class="{active: page.active, disabled: page.disabled}"><a ng-click="selectPage(page.number)">{{page.text}}</a></li>\n </ul>\n</div
>\n')}]),angular.module("template/tooltip/tooltip-html-unsafe-popup.html",[]).run(["$templateCache",function(e){e.put("template/tooltip/tooltip-html-unsafe-popup.html",'<div class="tooltip {{placement}}" ng-class="{ in: isOpen(), fade: animation() }">\n <div class="tooltip-arrow"></div>\n <div class="tooltip-inner" ng-bind-html-unsafe="content"></div>\n</div>\n')}]),angular.module("template/tooltip/tooltip-popup.html",[]).run(["$templateCache",function(e){e.put("template/tooltip/tooltip-popup.html",'<div class="tooltip {{placement}}" ng-class="{ in: isOpen(), fade: animation() }">\n <div class="tooltip-arrow"></div>\n <div class="tooltip-inner" ng-bind="content"></div>\n</div>\n')}]),angular.module("template/popover/popover.html",[]).run(["$templateCache",function(e){e.put("template/popover/popover.html",'<div class="popover {{placement}}" ng-class="{ in: isOpen(), fade: animation() }">\n <div class="arrow"></div>\n\n <div class="popover-inner">\n <h3 class="popover-title
" ng-bind="title" ng-show="title"></h3>\n <div class="popover-content" ng-bind="content"></div>\n </div>\n</div>\n')}]),angular.module("template/progressbar/bar.html",[]).run(["$templateCache",function(e){e.put("template/progressbar/bar.html",'<div class="bar" ng-class=\'type && "bar-" + type\'></div>')}]),angular.module("template/progressbar/progress.html",[]).run(["$templateCache",function(e){e.put("template/progressbar/progress.html",'<div class="progress"><progressbar ng-repeat="bar in bars" width="bar.to" old="bar.from" animate="bar.animate" type="bar.type"></progressbar></div>')}]),angular.module("template/rating/rating.html",[]).run(["$templateCache",function(e){e.put("template/rating/rating.html",'<span ng-mouseleave="reset()">\n <i ng-repeat="number in range" ng-mouseenter="enter(number)" ng-click="rate(number)" ng-class="{\'icon-star\': number <= val, \'icon-star-empty\': number > val}"></i>\n</span>')}]),angular.module("template/tabs/pane.html",[]).run(["$templateCa
che",function(e){e.put("template/tabs/pane.html",'<div class="tab-pane" ng-class="{active: selected}" ng-show="selected" ng-transclude></div>\n')}]),angular.module("template/tabs/tab.html",[]).run(["$templateCache",function(e){e.put("template/tabs/tab.html",'<li ng-class="{active: active, disabled: disabled}">\n <a ng-click="select()" tab-heading-transclude>{{heading}}</a>\n</li>\n')}]),angular.module("template/tabs/tabs.html",[]).run(["$templateCache",function(e){e.put("template/tabs/tabs.html",'<div class="tabbable">\n <ul class="nav nav-tabs">\n <li ng-repeat="pane in panes" ng-class="{active:pane.selected}">\n <a ng-click="select(pane)">{{pane.heading}}</a>\n </li>\n </ul>\n <div class="tab-content" ng-transclude></div>\n</div>\n')}]),angular.module("template/tabs/tabset-titles.html",[]).run(["$templateCache",function(e){e.put("template/tabs/tabset-titles.html","<ul class=\"nav {{type && 'nav-' + type}}\" ng-class=\"{'nav-stacked': vertical}\">\n</ul>\n")}]),angul
ar.module("template/tabs/tabset.html",[]).run(["$templateCache",function(e){e.put("template/tabs/tabset.html",'\n<div class="tabbable" ng-class="{\'tabs-right\': direction == \'right\', \'tabs-left\': direction == \'left\', \'tabs-below\': direction == \'below\'}">\n <div tabset-titles="tabsAbove"></div>\n <div class="tab-content">\n <div class="tab-pane" \n ng-repeat="tab in tabs" \n ng-class="{active: tab.active}"\n tab-content-transclude="tab">\n </div>\n </div>\n <div tabset-titles="!tabsAbove"></div>\n</div>\n')}]),angular.module("template/timepicker/timepicker.html",[]).run(["$templateCache",function(e){e.put("template/timepicker/timepicker.html",'<table class="form-inline">\n <tr class="text-center">\n <td><a ng-click="incrementHours()" class="btn btn-link"><i class="icon-chevron-up"></i></a></td>\n <td> </td>\n <td><a ng-click="incrementMinutes()" class="btn btn-link"><i class="icon-chevron-up"></i></a></td>\n <td ng-show="showMerid
ian"></td>\n </tr>\n <tr>\n <td class="control-group" ng-class="{\'error\': !validHours}"><input type="text" ng-model="hours" ng-change="updateHours()" class="span1 text-center" ng-mousewheel="incrementHours()" ng-readonly="readonlyInput" maxlength="2" /></td>\n <td>:</td>\n <td class="control-group" ng-class="{\'error\': !validMinutes}"><input type="text" ng-model="minutes" ng-change="updateMinutes()" class="span1 text-center" ng-readonly="readonlyInput" maxlength="2"></td>\n <td ng-show="showMeridian"><button ng-click="toggleMeridian()" class="btn text-center">{{meridian}}</button></td>\n </tr>\n <tr class="text-center">\n <td><a ng-click="decrementHours()" class="btn btn-link"><i class="icon-chevron-down"></i></a></td>\n <td> </td>\n <td><a ng-click="decrementMinutes()" class="btn btn-link"><i class="icon-chevron-down"></i></a></td>\n <td ng-show="showMeridian"></td>\n </tr>\n</table>')}]),angular.module("template/typeahead/typeahead-match.html",[]).run(["$templateCa
che",function(e){e.put("template/typeahead/typeahead-match.html",'<a tabindex="-1" ng-bind-html-unsafe="match.label | typeaheadHighlight:query"></a>')}]),angular.module("template/typeahead/typeahead-popup.html",[]).run(["$templateCache",function(e){e.put("template/typeahead/typeahead-popup.html",'<ul class="typeahead dropdown-menu" ng-style="{display: isOpen()&&\'block\' || \'none\', top: position.top+\'px\', left: position.left+\'px\'}">\n <li ng-repeat="match in matches" ng-class="{active: isActive($index) }" ng-mouseenter="selectActive($index)" ng-click="selectMatch($index)">\n <typeahead-match index="$index" match="match" query="query" template-url="templateUrl"></typeahead-match>\n </li>\n</ul>')}]),angular.module("template/typeahead/typeahead.html",[]).run(["$templateCache",function(e){e.put("template/typeahead/typeahead.html",'<ul class="typeahead dropdown-menu" ng-style="{display: isOpen()&&\'block\' || \'none\', top: position.top+\'px\', left: position.left+\'p
x\'}">\n <li ng-repeat="match in matches" ng-class="{active: isActive($index) }" ng-mouseenter="selectActive($index)">\n <a tabindex="-1" ng-click="selectMatch($index)" ng-bind-html-unsafe="match.label | typeaheadHighlight:query"></a>\n </li>\n</ul>')}]);
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/js/lib/angular/angular-cookies.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/js/lib/angular/angular-cookies.js b/ocw-ui/frontend/app/js/lib/angular/angular-cookies.js
deleted file mode 100755
index fbf0acb..0000000
--- a/ocw-ui/frontend/app/js/lib/angular/angular-cookies.js
+++ /dev/null
@@ -1,183 +0,0 @@
-/**
- * @license AngularJS v1.0.5
- * (c) 2010-2012 Google, Inc. http://angularjs.org
- * License: MIT
- */
-(function(window, angular, undefined) {
-'use strict';
-
-/**
- * @ngdoc overview
- * @name ngCookies
- */
-
-
-angular.module('ngCookies', ['ng']).
- /**
- * @ngdoc object
- * @name ngCookies.$cookies
- * @requires $browser
- *
- * @description
- * Provides read/write access to browser's cookies.
- *
- * Only a simple Object is exposed and by adding or removing properties to/from
- * this object, new cookies are created/deleted at the end of current $eval.
- *
- * @example
- <doc:example>
- <doc:source>
- <script>
- function ExampleController($cookies) {
- // Retrieving a cookie
- var favoriteCookie = $cookies.myFavorite;
- // Setting a cookie
- $cookies.myFavorite = 'oatmeal';
- }
- </script>
- </doc:source>
- </doc:example>
- */
- factory('$cookies', ['$rootScope', '$browser', function ($rootScope, $browser) {
- var cookies = {},
- lastCookies = {},
- lastBrowserCookies,
- runEval = false,
- copy = angular.copy,
- isUndefined = angular.isUndefined;
-
- //creates a poller fn that copies all cookies from the $browser to service & inits the service
- $browser.addPollFn(function() {
- var currentCookies = $browser.cookies();
- if (lastBrowserCookies != currentCookies) { //relies on browser.cookies() impl
- lastBrowserCookies = currentCookies;
- copy(currentCookies, lastCookies);
- copy(currentCookies, cookies);
- if (runEval) $rootScope.$apply();
- }
- })();
-
- runEval = true;
-
- //at the end of each eval, push cookies
- //TODO: this should happen before the "delayed" watches fire, because if some cookies are not
- // strings or browser refuses to store some cookies, we update the model in the push fn.
- $rootScope.$watch(push);
-
- return cookies;
-
-
- /**
- * Pushes all the cookies from the service to the browser and verifies if all cookies were stored.
- */
- function push() {
- var name,
- value,
- browserCookies,
- updated;
-
- //delete any cookies deleted in $cookies
- for (name in lastCookies) {
- if (isUndefined(cookies[name])) {
- $browser.cookies(name, undefined);
- }
- }
-
- //update all cookies updated in $cookies
- for(name in cookies) {
- value = cookies[name];
- if (!angular.isString(value)) {
- if (angular.isDefined(lastCookies[name])) {
- cookies[name] = lastCookies[name];
- } else {
- delete cookies[name];
- }
- } else if (value !== lastCookies[name]) {
- $browser.cookies(name, value);
- updated = true;
- }
- }
-
- //verify what was actually stored
- if (updated){
- updated = false;
- browserCookies = $browser.cookies();
-
- for (name in cookies) {
- if (cookies[name] !== browserCookies[name]) {
- //delete or reset all cookies that the browser dropped from $cookies
- if (isUndefined(browserCookies[name])) {
- delete cookies[name];
- } else {
- cookies[name] = browserCookies[name];
- }
- updated = true;
- }
- }
- }
- }
- }]).
-
-
- /**
- * @ngdoc object
- * @name ngCookies.$cookieStore
- * @requires $cookies
- *
- * @description
- * Provides a key-value (string-object) storage, that is backed by session cookies.
- * Objects put or retrieved from this storage are automatically serialized or
- * deserialized by angular's toJson/fromJson.
- * @example
- */
- factory('$cookieStore', ['$cookies', function($cookies) {
-
- return {
- /**
- * @ngdoc method
- * @name ngCookies.$cookieStore#get
- * @methodOf ngCookies.$cookieStore
- *
- * @description
- * Returns the value of given cookie key
- *
- * @param {string} key Id to use for lookup.
- * @returns {Object} Deserialized cookie value.
- */
- get: function(key) {
- return angular.fromJson($cookies[key]);
- },
-
- /**
- * @ngdoc method
- * @name ngCookies.$cookieStore#put
- * @methodOf ngCookies.$cookieStore
- *
- * @description
- * Sets a value for given cookie key
- *
- * @param {string} key Id for the `value`.
- * @param {Object} value Value to be stored.
- */
- put: function(key, value) {
- $cookies[key] = angular.toJson(value);
- },
-
- /**
- * @ngdoc method
- * @name ngCookies.$cookieStore#remove
- * @methodOf ngCookies.$cookieStore
- *
- * @description
- * Remove given cookie
- *
- * @param {string} key Id of the key-value pair to delete.
- */
- remove: function(key) {
- delete $cookies[key];
- }
- };
-
- }]);
-
-})(window, window.angular);
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/js/lib/angular/angular-cookies.min.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/js/lib/angular/angular-cookies.min.js b/ocw-ui/frontend/app/js/lib/angular/angular-cookies.min.js
deleted file mode 100755
index bd82c75..0000000
--- a/ocw-ui/frontend/app/js/lib/angular/angular-cookies.min.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
- AngularJS v1.0.5
- (c) 2010-2012 Google, Inc. http://angularjs.org
- License: MIT
-*/
-(function(m,f,l){'use strict';f.module("ngCookies",["ng"]).factory("$cookies",["$rootScope","$browser",function(d,c){var b={},g={},h,i=!1,j=f.copy,k=f.isUndefined;c.addPollFn(function(){var a=c.cookies();h!=a&&(h=a,j(a,g),j(a,b),i&&d.$apply())})();i=!0;d.$watch(function(){var a,e,d;for(a in g)k(b[a])&&c.cookies(a,l);for(a in b)e=b[a],f.isString(e)?e!==g[a]&&(c.cookies(a,e),d=!0):f.isDefined(g[a])?b[a]=g[a]:delete b[a];if(d)for(a in e=c.cookies(),b)b[a]!==e[a]&&(k(e[a])?delete b[a]:b[a]=e[a])});return b}]).factory("$cookieStore",
-["$cookies",function(d){return{get:function(c){return f.fromJson(d[c])},put:function(c,b){d[c]=f.toJson(b)},remove:function(c){delete d[c]}}}])})(window,window.angular);
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/js/lib/angular/angular-loader.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/js/lib/angular/angular-loader.js b/ocw-ui/frontend/app/js/lib/angular/angular-loader.js
deleted file mode 100755
index c4325dc..0000000
--- a/ocw-ui/frontend/app/js/lib/angular/angular-loader.js
+++ /dev/null
@@ -1,276 +0,0 @@
-/**
- * @license AngularJS v1.0.5
- * (c) 2010-2012 Google, Inc. http://angularjs.org
- * License: MIT
- */
-
-(
-
-/**
- * @ngdoc interface
- * @name angular.Module
- * @description
- *
- * Interface for configuring angular {@link angular.module modules}.
- */
-
-function setupModuleLoader(window) {
-
- function ensure(obj, name, factory) {
- return obj[name] || (obj[name] = factory());
- }
-
- return ensure(ensure(window, 'angular', Object), 'module', function() {
- /** @type {Object.<string, angular.Module>} */
- var modules = {};
-
- /**
- * @ngdoc function
- * @name angular.module
- * @description
- *
- * The `angular.module` is a global place for creating and registering Angular modules. All
- * modules (angular core or 3rd party) that should be available to an application must be
- * registered using this mechanism.
- *
- *
- * # Module
- *
- * A module is a collocation of services, directives, filters, and configuration information. Module
- * is used to configure the {@link AUTO.$injector $injector}.
- *
- * <pre>
- * // Create a new module
- * var myModule = angular.module('myModule', []);
- *
- * // register a new service
- * myModule.value('appName', 'MyCoolApp');
- *
- * // configure existing services inside initialization blocks.
- * myModule.config(function($locationProvider) {
-'use strict';
- * // Configure existing providers
- * $locationProvider.hashPrefix('!');
- * });
- * </pre>
- *
- * Then you can create an injector and load your modules like this:
- *
- * <pre>
- * var injector = angular.injector(['ng', 'MyModule'])
- * </pre>
- *
- * However it's more likely that you'll just use
- * {@link ng.directive:ngApp ngApp} or
- * {@link angular.bootstrap} to simplify this process for you.
- *
- * @param {!string} name The name of the module to create or retrieve.
- * @param {Array.<string>=} requires If specified then new module is being created. If unspecified then the
- * the module is being retrieved for further configuration.
- * @param {Function} configFn Optional configuration function for the module. Same as
- * {@link angular.Module#config Module#config()}.
- * @returns {module} new module with the {@link angular.Module} api.
- */
- return function module(name, requires, configFn) {
- if (requires && modules.hasOwnProperty(name)) {
- modules[name] = null;
- }
- return ensure(modules, name, function() {
- if (!requires) {
- throw Error('No module: ' + name);
- }
-
- /** @type {!Array.<Array.<*>>} */
- var invokeQueue = [];
-
- /** @type {!Array.<Function>} */
- var runBlocks = [];
-
- var config = invokeLater('$injector', 'invoke');
-
- /** @type {angular.Module} */
- var moduleInstance = {
- // Private state
- _invokeQueue: invokeQueue,
- _runBlocks: runBlocks,
-
- /**
- * @ngdoc property
- * @name angular.Module#requires
- * @propertyOf angular.Module
- * @returns {Array.<string>} List of module names which must be loaded before this module.
- * @description
- * Holds the list of modules which the injector will load before the current module is loaded.
- */
- requires: requires,
-
- /**
- * @ngdoc property
- * @name angular.Module#name
- * @propertyOf angular.Module
- * @returns {string} Name of the module.
- * @description
- */
- name: name,
-
-
- /**
- * @ngdoc method
- * @name angular.Module#provider
- * @methodOf angular.Module
- * @param {string} name service name
- * @param {Function} providerType Construction function for creating new instance of the service.
- * @description
- * See {@link AUTO.$provide#provider $provide.provider()}.
- */
- provider: invokeLater('$provide', 'provider'),
-
- /**
- * @ngdoc method
- * @name angular.Module#factory
- * @methodOf angular.Module
- * @param {string} name service name
- * @param {Function} providerFunction Function for creating new instance of the service.
- * @description
- * See {@link AUTO.$provide#factory $provide.factory()}.
- */
- factory: invokeLater('$provide', 'factory'),
-
- /**
- * @ngdoc method
- * @name angular.Module#service
- * @methodOf angular.Module
- * @param {string} name service name
- * @param {Function} constructor A constructor function that will be instantiated.
- * @description
- * See {@link AUTO.$provide#service $provide.service()}.
- */
- service: invokeLater('$provide', 'service'),
-
- /**
- * @ngdoc method
- * @name angular.Module#value
- * @methodOf angular.Module
- * @param {string} name service name
- * @param {*} object Service instance object.
- * @description
- * See {@link AUTO.$provide#value $provide.value()}.
- */
- value: invokeLater('$provide', 'value'),
-
- /**
- * @ngdoc method
- * @name angular.Module#constant
- * @methodOf angular.Module
- * @param {string} name constant name
- * @param {*} object Constant value.
- * @description
- * Because the constant are fixed, they get applied before other provide methods.
- * See {@link AUTO.$provide#constant $provide.constant()}.
- */
- constant: invokeLater('$provide', 'constant', 'unshift'),
-
- /**
- * @ngdoc method
- * @name angular.Module#filter
- * @methodOf angular.Module
- * @param {string} name Filter name.
- * @param {Function} filterFactory Factory function for creating new instance of filter.
- * @description
- * See {@link ng.$filterProvider#register $filterProvider.register()}.
- */
- filter: invokeLater('$filterProvider', 'register'),
-
- /**
- * @ngdoc method
- * @name angular.Module#controller
- * @methodOf angular.Module
- * @param {string} name Controller name.
- * @param {Function} constructor Controller constructor function.
- * @description
- * See {@link ng.$controllerProvider#register $controllerProvider.register()}.
- */
- controller: invokeLater('$controllerProvider', 'register'),
-
- /**
- * @ngdoc method
- * @name angular.Module#directive
- * @methodOf angular.Module
- * @param {string} name directive name
- * @param {Function} directiveFactory Factory function for creating new instance of
- * directives.
- * @description
- * See {@link ng.$compileProvider#directive $compileProvider.directive()}.
- */
- directive: invokeLater('$compileProvider', 'directive'),
-
- /**
- * @ngdoc method
- * @name angular.Module#config
- * @methodOf angular.Module
- * @param {Function} configFn Execute this function on module load. Useful for service
- * configuration.
- * @description
- * Use this method to register work which needs to be performed on module loading.
- */
- config: config,
-
- /**
- * @ngdoc method
- * @name angular.Module#run
- * @methodOf angular.Module
- * @param {Function} initializationFn Execute this function after injector creation.
- * Useful for application initialization.
- * @description
- * Use this method to register work which should be performed when the injector is done
- * loading all modules.
- */
- run: function(block) {
- runBlocks.push(block);
- return this;
- }
- };
-
- if (configFn) {
- config(configFn);
- }
-
- return moduleInstance;
-
- /**
- * @param {string} provider
- * @param {string} method
- * @param {String=} insertMethod
- * @returns {angular.Module}
- */
- function invokeLater(provider, method, insertMethod) {
- return function() {
- invokeQueue[insertMethod || 'push']([provider, method, arguments]);
- return moduleInstance;
- }
- }
- });
- };
- });
-
-}
-)(window);
-
-/**
- * Closure compiler type information
- *
- * @typedef { {
- * requires: !Array.<string>,
- * invokeQueue: !Array.<Array.<*>>,
- *
- * service: function(string, Function):angular.Module,
- * factory: function(string, Function):angular.Module,
- * value: function(string, *):angular.Module,
- *
- * filter: function(string, Function):angular.Module,
- *
- * init: function(Function):angular.Module
- * } }
- */
-angular.Module;
-
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/js/lib/angular/angular-loader.min.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/js/lib/angular/angular-loader.min.js b/ocw-ui/frontend/app/js/lib/angular/angular-loader.min.js
deleted file mode 100755
index a264fbe..0000000
--- a/ocw-ui/frontend/app/js/lib/angular/angular-loader.min.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
- AngularJS v1.0.5
- (c) 2010-2012 Google, Inc. http://angularjs.org
- License: MIT
-*/
-(function(i){'use strict';function d(c,b,e){return c[b]||(c[b]=e())}return d(d(i,"angular",Object),"module",function(){var c={};return function(b,e,f){e&&c.hasOwnProperty(b)&&(c[b]=null);return d(c,b,function(){function a(a,b,d){return function(){c[d||"push"]([a,b,arguments]);return g}}if(!e)throw Error("No module: "+b);var c=[],d=[],h=a("$injector","invoke"),g={_invokeQueue:c,_runBlocks:d,requires:e,name:b,provider:a("$provide","provider"),factory:a("$provide","factory"),service:a("$provide","service"),
-value:a("$provide","value"),constant:a("$provide","constant","unshift"),filter:a("$filterProvider","register"),controller:a("$controllerProvider","register"),directive:a("$compileProvider","directive"),config:h,run:function(a){d.push(a);return this}};f&&h(f);return g})}})})(window);
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/js/lib/angular/angular-resource.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/js/lib/angular/angular-resource.js b/ocw-ui/frontend/app/js/lib/angular/angular-resource.js
deleted file mode 100755
index a74c483..0000000
--- a/ocw-ui/frontend/app/js/lib/angular/angular-resource.js
+++ /dev/null
@@ -1,445 +0,0 @@
-/**
- * @license AngularJS v1.0.5
- * (c) 2010-2012 Google, Inc. http://angularjs.org
- * License: MIT
- */
-(function(window, angular, undefined) {
-'use strict';
-
-/**
- * @ngdoc overview
- * @name ngResource
- * @description
- */
-
-/**
- * @ngdoc object
- * @name ngResource.$resource
- * @requires $http
- *
- * @description
- * A factory which creates a resource object that lets you interact with
- * [RESTful](http://en.wikipedia.org/wiki/Representational_State_Transfer) server-side data sources.
- *
- * The returned resource object has action methods which provide high-level behaviors without
- * the need to interact with the low level {@link ng.$http $http} service.
- *
- * @param {string} url A parameterized URL template with parameters prefixed by `:` as in
- * `/user/:username`. If you are using a URL with a port number (e.g.
- * `http://example.com:8080/api`), you'll need to escape the colon character before the port
- * number, like this: `$resource('http://example.com\\:8080/api')`.
- *
- * @param {Object=} paramDefaults Default values for `url` parameters. These can be overridden in
- * `actions` methods.
- *
- * Each key value in the parameter object is first bound to url template if present and then any
- * excess keys are appended to the url search query after the `?`.
- *
- * Given a template `/path/:verb` and parameter `{verb:'greet', salutation:'Hello'}` results in
- * URL `/path/greet?salutation=Hello`.
- *
- * If the parameter value is prefixed with `@` then the value of that parameter is extracted from
- * the data object (useful for non-GET operations).
- *
- * @param {Object.<Object>=} actions Hash with declaration of custom action that should extend the
- * default set of resource actions. The declaration should be created in the following format:
- *
- * {action1: {method:?, params:?, isArray:?},
- * action2: {method:?, params:?, isArray:?},
- * ...}
- *
- * Where:
- *
- * - `action` – {string} – The name of action. This name becomes the name of the method on your
- * resource object.
- * - `method` – {string} – HTTP request method. Valid methods are: `GET`, `POST`, `PUT`, `DELETE`,
- * and `JSONP`
- * - `params` – {object=} – Optional set of pre-bound parameters for this action.
- * - isArray – {boolean=} – If true then the returned object for this action is an array, see
- * `returns` section.
- *
- * @returns {Object} A resource "class" object with methods for the default set of resource actions
- * optionally extended with custom `actions`. The default set contains these actions:
- *
- * { 'get': {method:'GET'},
- * 'save': {method:'POST'},
- * 'query': {method:'GET', isArray:true},
- * 'remove': {method:'DELETE'},
- * 'delete': {method:'DELETE'} };
- *
- * Calling these methods invoke an {@link ng.$http} with the specified http method,
- * destination and parameters. When the data is returned from the server then the object is an
- * instance of the resource class. The actions `save`, `remove` and `delete` are available on it
- * as methods with the `$` prefix. This allows you to easily perform CRUD operations (create,
- * read, update, delete) on server-side data like this:
- * <pre>
- var User = $resource('/user/:userId', {userId:'@id'});
- var user = User.get({userId:123}, function() {
- user.abc = true;
- user.$save();
- });
- </pre>
- *
- * It is important to realize that invoking a $resource object method immediately returns an
- * empty reference (object or array depending on `isArray`). Once the data is returned from the
- * server the existing reference is populated with the actual data. This is a useful trick since
- * usually the resource is assigned to a model which is then rendered by the view. Having an empty
- * object results in no rendering, once the data arrives from the server then the object is
- * populated with the data and the view automatically re-renders itself showing the new data. This
- * means that in most case one never has to write a callback function for the action methods.
- *
- * The action methods on the class object or instance object can be invoked with the following
- * parameters:
- *
- * - HTTP GET "class" actions: `Resource.action([parameters], [success], [error])`
- * - non-GET "class" actions: `Resource.action([parameters], postData, [success], [error])`
- * - non-GET instance actions: `instance.$action([parameters], [success], [error])`
- *
- *
- * @example
- *
- * # Credit card resource
- *
- * <pre>
- // Define CreditCard class
- var CreditCard = $resource('/user/:userId/card/:cardId',
- {userId:123, cardId:'@id'}, {
- charge: {method:'POST', params:{charge:true}}
- });
-
- // We can retrieve a collection from the server
- var cards = CreditCard.query(function() {
- // GET: /user/123/card
- // server returns: [ {id:456, number:'1234', name:'Smith'} ];
-
- var card = cards[0];
- // each item is an instance of CreditCard
- expect(card instanceof CreditCard).toEqual(true);
- card.name = "J. Smith";
- // non GET methods are mapped onto the instances
- card.$save();
- // POST: /user/123/card/456 {id:456, number:'1234', name:'J. Smith'}
- // server returns: {id:456, number:'1234', name: 'J. Smith'};
-
- // our custom method is mapped as well.
- card.$charge({amount:9.99});
- // POST: /user/123/card/456?amount=9.99&charge=true {id:456, number:'1234', name:'J. Smith'}
- });
-
- // we can create an instance as well
- var newCard = new CreditCard({number:'0123'});
- newCard.name = "Mike Smith";
- newCard.$save();
- // POST: /user/123/card {number:'0123', name:'Mike Smith'}
- // server returns: {id:789, number:'01234', name: 'Mike Smith'};
- expect(newCard.id).toEqual(789);
- * </pre>
- *
- * The object returned from this function execution is a resource "class" which has "static" method
- * for each action in the definition.
- *
- * Calling these methods invoke `$http` on the `url` template with the given `method` and `params`.
- * When the data is returned from the server then the object is an instance of the resource type and
- * all of the non-GET methods are available with `$` prefix. This allows you to easily support CRUD
- * operations (create, read, update, delete) on server-side data.
-
- <pre>
- var User = $resource('/user/:userId', {userId:'@id'});
- var user = User.get({userId:123}, function() {
- user.abc = true;
- user.$save();
- });
- </pre>
- *
- * It's worth noting that the success callback for `get`, `query` and other method gets passed
- * in the response that came from the server as well as $http header getter function, so one
- * could rewrite the above example and get access to http headers as:
- *
- <pre>
- var User = $resource('/user/:userId', {userId:'@id'});
- User.get({userId:123}, function(u, getResponseHeaders){
- u.abc = true;
- u.$save(function(u, putResponseHeaders) {
- //u => saved user object
- //putResponseHeaders => $http header getter
- });
- });
- </pre>
-
- * # Buzz client
-
- Let's look at what a buzz client created with the `$resource` service looks like:
- <doc:example>
- <doc:source jsfiddle="false">
- <script>
- function BuzzController($resource) {
- this.userId = 'googlebuzz';
- this.Activity = $resource(
- 'https://www.googleapis.com/buzz/v1/activities/:userId/:visibility/:activityId/:comments',
- {alt:'json', callback:'JSON_CALLBACK'},
- {get:{method:'JSONP', params:{visibility:'@self'}}, replies: {method:'JSONP', params:{visibility:'@self', comments:'@comments'}}}
- );
- }
-
- BuzzController.prototype = {
- fetch: function() {
- this.activities = this.Activity.get({userId:this.userId});
- },
- expandReplies: function(activity) {
- activity.replies = this.Activity.replies({userId:this.userId, activityId:activity.id});
- }
- };
- BuzzController.$inject = ['$resource'];
- </script>
-
- <div ng-controller="BuzzController">
- <input ng-model="userId"/>
- <button ng-click="fetch()">fetch</button>
- <hr/>
- <div ng-repeat="item in activities.data.items">
- <h1 style="font-size: 15px;">
- <img src="{{item.actor.thumbnailUrl}}" style="max-height:30px;max-width:30px;"/>
- <a href="{{item.actor.profileUrl}}">{{item.actor.name}}</a>
- <a href ng-click="expandReplies(item)" style="float: right;">Expand replies: {{item.links.replies[0].count}}</a>
- </h1>
- {{item.object.content | html}}
- <div ng-repeat="reply in item.replies.data.items" style="margin-left: 20px;">
- <img src="{{reply.actor.thumbnailUrl}}" style="max-height:30px;max-width:30px;"/>
- <a href="{{reply.actor.profileUrl}}">{{reply.actor.name}}</a>: {{reply.content | html}}
- </div>
- </div>
- </div>
- </doc:source>
- <doc:scenario>
- </doc:scenario>
- </doc:example>
- */
-angular.module('ngResource', ['ng']).
- factory('$resource', ['$http', '$parse', function($http, $parse) {
- var DEFAULT_ACTIONS = {
- 'get': {method:'GET'},
- 'save': {method:'POST'},
- 'query': {method:'GET', isArray:true},
- 'remove': {method:'DELETE'},
- 'delete': {method:'DELETE'}
- };
- var noop = angular.noop,
- forEach = angular.forEach,
- extend = angular.extend,
- copy = angular.copy,
- isFunction = angular.isFunction,
- getter = function(obj, path) {
- return $parse(path)(obj);
- };
-
- /**
- * We need our custom method because encodeURIComponent is too aggressive and doesn't follow
- * http://www.ietf.org/rfc/rfc3986.txt with regards to the character set (pchar) allowed in path
- * segments:
- * segment = *pchar
- * pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
- * pct-encoded = "%" HEXDIG HEXDIG
- * unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
- * sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
- * / "*" / "+" / "," / ";" / "="
- */
- function encodeUriSegment(val) {
- return encodeUriQuery(val, true).
- replace(/%26/gi, '&').
- replace(/%3D/gi, '=').
- replace(/%2B/gi, '+');
- }
-
-
- /**
- * This method is intended for encoding *key* or *value* parts of query component. We need a custom
- * method becuase encodeURIComponent is too agressive and encodes stuff that doesn't have to be
- * encoded per http://tools.ietf.org/html/rfc3986:
- * query = *( pchar / "/" / "?" )
- * pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
- * unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
- * pct-encoded = "%" HEXDIG HEXDIG
- * sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
- * / "*" / "+" / "," / ";" / "="
- */
- function encodeUriQuery(val, pctEncodeSpaces) {
- return encodeURIComponent(val).
- replace(/%40/gi, '@').
- replace(/%3A/gi, ':').
- replace(/%24/g, '$').
- replace(/%2C/gi, ',').
- replace((pctEncodeSpaces ? null : /%20/g), '+');
- }
-
- function Route(template, defaults) {
- this.template = template = template + '#';
- this.defaults = defaults || {};
- var urlParams = this.urlParams = {};
- forEach(template.split(/\W/), function(param){
- if (param && (new RegExp("(^|[^\\\\]):" + param + "\\W").test(template))) {
- urlParams[param] = true;
- }
- });
- this.template = template.replace(/\\:/g, ':');
- }
-
- Route.prototype = {
- url: function(params) {
- var self = this,
- url = this.template,
- val,
- encodedVal;
-
- params = params || {};
- forEach(this.urlParams, function(_, urlParam){
- val = params.hasOwnProperty(urlParam) ? params[urlParam] : self.defaults[urlParam];
- if (angular.isDefined(val) && val !== null) {
- encodedVal = encodeUriSegment(val);
- url = url.replace(new RegExp(":" + urlParam + "(\\W)", "g"), encodedVal + "$1");
- } else {
- url = url.replace(new RegExp("(\/?):" + urlParam + "(\\W)", "g"), function(match,
- leadingSlashes, tail) {
- if (tail.charAt(0) == '/') {
- return tail;
- } else {
- return leadingSlashes + tail;
- }
- });
- }
- });
- url = url.replace(/\/?#$/, '');
- var query = [];
- forEach(params, function(value, key){
- if (!self.urlParams[key]) {
- query.push(encodeUriQuery(key) + '=' + encodeUriQuery(value));
- }
- });
- query.sort();
- url = url.replace(/\/*$/, '');
- return url + (query.length ? '?' + query.join('&') : '');
- }
- };
-
-
- function ResourceFactory(url, paramDefaults, actions) {
- var route = new Route(url);
-
- actions = extend({}, DEFAULT_ACTIONS, actions);
-
- function extractParams(data, actionParams){
- var ids = {};
- actionParams = extend({}, paramDefaults, actionParams);
- forEach(actionParams, function(value, key){
- ids[key] = value.charAt && value.charAt(0) == '@' ? getter(data, value.substr(1)) : value;
- });
- return ids;
- }
-
- function Resource(value){
- copy(value || {}, this);
- }
-
- forEach(actions, function(action, name) {
- action.method = angular.uppercase(action.method);
- var hasBody = action.method == 'POST' || action.method == 'PUT' || action.method == 'PATCH';
- Resource[name] = function(a1, a2, a3, a4) {
- var params = {};
- var data;
- var success = noop;
- var error = null;
- switch(arguments.length) {
- case 4:
- error = a4;
- success = a3;
- //fallthrough
- case 3:
- case 2:
- if (isFunction(a2)) {
- if (isFunction(a1)) {
- success = a1;
- error = a2;
- break;
- }
-
- success = a2;
- error = a3;
- //fallthrough
- } else {
- params = a1;
- data = a2;
- success = a3;
- break;
- }
- case 1:
- if (isFunction(a1)) success = a1;
- else if (hasBody) data = a1;
- else params = a1;
- break;
- case 0: break;
- default:
- throw "Expected between 0-4 arguments [params, data, success, error], got " +
- arguments.length + " arguments.";
- }
-
- var value = this instanceof Resource ? this : (action.isArray ? [] : new Resource(data));
- $http({
- method: action.method,
- url: route.url(extend({}, extractParams(data, action.params || {}), params)),
- data: data
- }).then(function(response) {
- var data = response.data;
-
- if (data) {
- if (action.isArray) {
- value.length = 0;
- forEach(data, function(item) {
- value.push(new Resource(item));
- });
- } else {
- copy(data, value);
- }
- }
- (success||noop)(value, response.headers);
- }, error);
-
- return value;
- };
-
-
- Resource.prototype['$' + name] = function(a1, a2, a3) {
- var params = extractParams(this),
- success = noop,
- error;
-
- switch(arguments.length) {
- case 3: params = a1; success = a2; error = a3; break;
- case 2:
- case 1:
- if (isFunction(a1)) {
- success = a1;
- error = a2;
- } else {
- params = a1;
- success = a2 || noop;
- }
- case 0: break;
- default:
- throw "Expected between 1-3 arguments [params, success, error], got " +
- arguments.length + " arguments.";
- }
- var data = hasBody ? this : undefined;
- Resource[name].call(this, params, data, success, error);
- };
- });
-
- Resource.bind = function(additionalParamDefaults){
- return ResourceFactory(url, extend({}, paramDefaults, additionalParamDefaults), actions);
- };
-
- return Resource;
- }
-
- return ResourceFactory;
- }]);
-
-})(window, window.angular);
[09/28] CLIMATE-512 - Replace frontend with new Yeoman/Grunt/Bower
frontend
Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/js/lib/leaflet/leaflet-0.5.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/js/lib/leaflet/leaflet-0.5.js b/ocw-ui/frontend/app/js/lib/leaflet/leaflet-0.5.js
deleted file mode 100644
index 4875188..0000000
--- a/ocw-ui/frontend/app/js/lib/leaflet/leaflet-0.5.js
+++ /dev/null
@@ -1,8 +0,0 @@
-/*
- Leaflet, a JavaScript library for mobile-friendly interactive maps. http://leafletjs.com
- (c) 2010-2013, Vladimir Agafonkin, CloudMade
-*/
-(function(t,e,i){var n,o;typeof exports!=i+""?n=exports:(o=t.L,n={},n.noConflict=function(){return t.L=o,this},t.L=n),n.version="0.5",n.Util={extend:function(t){var e,i,n,o,s=Array.prototype.slice.call(arguments,1);for(i=0,n=s.length;n>i;i++){o=s[i]||{};for(e in o)o.hasOwnProperty(e)&&(t[e]=o[e])}return t},bind:function(t,e){var i=arguments.length>2?Array.prototype.slice.call(arguments,2):null;return function(){return t.apply(e,i||arguments)}},stamp:function(){var t=0,e="_leaflet_id";return function(i){return i[e]=i[e]||++t,i[e]}}(),limitExecByInterval:function(t,e,n){var o,s;return function a(){var r=arguments;return o?(s=!0,i):(o=!0,setTimeout(function(){o=!1,s&&(a.apply(n,r),s=!1)},e),t.apply(n,r),i)}},falseFn:function(){return!1},formatNum:function(t,e){var i=Math.pow(10,e||5);return Math.round(t*i)/i},splitWords:function(t){return t.replace(/^\s+|\s+$/g,"").split(/\s+/)},setOptions:function(t,e){return t.options=n.extend({},t.options,e),t.options},getParamString:function(t,e){v
ar i=[];for(var n in t)t.hasOwnProperty(n)&&i.push(n+"="+t[n]);return(e&&-1!==e.indexOf("?")?"&":"?")+i.join("&")},template:function(t,e){return t.replace(/\{ *([\w_]+) *\}/g,function(t,i){var n=e[i];if(!e.hasOwnProperty(i))throw Error("No value provided for variable "+t);return n})},isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},emptyImageUrl:"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="},function(){function e(e){var i,n,o=["webkit","moz","o","ms"];for(i=0;o.length>i&&!n;i++)n=t[o[i]+e];return n}function o(e){var i=+new Date,n=Math.max(0,16-(i-s));return s=i+n,t.setTimeout(e,n)}var s=0,a=t.requestAnimationFrame||e("RequestAnimationFrame")||o,r=t.cancelAnimationFrame||e("CancelAnimationFrame")||e("CancelRequestAnimationFrame")||function(e){t.clearTimeout(e)};n.Util.requestAnimFrame=function(e,s,r,h){return e=n.bind(e,s),r&&a===o?(e(),i):a.call(t,e,h)},n.Util.cancelAnimFrame=function(e){e&&r.call(t,e)}}(),n.extend=n.Util.extend,n.bind=n
.Util.bind,n.stamp=n.Util.stamp,n.setOptions=n.Util.setOptions,n.Class=function(){},n.Class.extend=function(t){var e=function(){this.initialize&&this.initialize.apply(this,arguments),this._initHooks&&this.callInitHooks()},i=function(){};i.prototype=this.prototype;var o=new i;o.constructor=e,e.prototype=o;for(var s in this)this.hasOwnProperty(s)&&"prototype"!==s&&(e[s]=this[s]);t.statics&&(n.extend(e,t.statics),delete t.statics),t.includes&&(n.Util.extend.apply(null,[o].concat(t.includes)),delete t.includes),t.options&&o.options&&(t.options=n.extend({},o.options,t.options)),n.extend(o,t),o._initHooks=[];var a=this;return o.callInitHooks=function(){if(!this._initHooksCalled){a.prototype.callInitHooks&&a.prototype.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=o._initHooks.length;e>t;t++)o._initHooks[t].call(this)}},e},n.Class.include=function(t){n.extend(this.prototype,t)},n.Class.mergeOptions=function(t){n.extend(this.prototype.options,t)},n.Class.addInitHook=functio
n(t){var e=Array.prototype.slice.call(arguments,1),i="function"==typeof t?t:function(){this[t].apply(this,e)};this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i)};var s="_leaflet_events";n.Mixin={},n.Mixin.Events={addEventListener:function(t,e,i){var o,a,r,h=this[s]=this[s]||{};if("object"==typeof t){for(o in t)t.hasOwnProperty(o)&&this.addEventListener(o,t[o],e);return this}for(t=n.Util.splitWords(t),a=0,r=t.length;r>a;a++)h[t[a]]=h[t[a]]||[],h[t[a]].push({action:e,context:i||this});return this},hasEventListeners:function(t){return s in this&&t in this[s]&&this[s][t].length>0},removeEventListener:function(t,e,i){var o,a,r,h,l,u=this[s];if("object"==typeof t){for(o in t)t.hasOwnProperty(o)&&this.removeEventListener(o,t[o],e);return this}for(t=n.Util.splitWords(t),a=0,r=t.length;r>a;a++)if(this.hasEventListeners(t[a]))for(h=u[t[a]],l=h.length-1;l>=0;l--)e&&h[l].action!==e||i&&h[l].context!==i||h.splice(l,1);return this},fireEvent:function(t,e){if
(!this.hasEventListeners(t))return this;for(var i=n.extend({type:t,target:this},e),o=this[s][t].slice(),a=0,r=o.length;r>a;a++)o[a].action.call(o[a].context||this,i);return this}},n.Mixin.Events.on=n.Mixin.Events.addEventListener,n.Mixin.Events.off=n.Mixin.Events.removeEventListener,n.Mixin.Events.fire=n.Mixin.Events.fireEvent,function(){var o=!!t.ActiveXObject,s=o&&!t.XMLHttpRequest,a=o&&!e.querySelector,r=navigator.userAgent.toLowerCase(),h=-1!==r.indexOf("webkit"),l=-1!==r.indexOf("chrome"),u=-1!==r.indexOf("android"),c=-1!==r.search("android [23]"),_=typeof orientation!=i+"",d=t.navigator&&t.navigator.msPointerEnabled&&t.navigator.msMaxTouchPoints,p="devicePixelRatio"in t&&t.devicePixelRatio>1||"matchMedia"in t&&t.matchMedia("(min-resolution:144dpi)")&&t.matchMedia("(min-resolution:144dpi)").matches,m=e.documentElement,f=o&&"transition"in m.style,g="WebKitCSSMatrix"in t&&"m11"in new t.WebKitCSSMatrix,v="MozPerspective"in m.style,y="OTransition"in m.style,L=!t.L_DISABLE_3D&&(f||g
||v||y),P=!t.L_NO_TOUCH&&function(){var t="ontouchstart";if(d||t in m)return!0;var i=e.createElement("div"),n=!1;return i.setAttribute?(i.setAttribute(t,"return;"),"function"==typeof i[t]&&(n=!0),i.removeAttribute(t),i=null,n):!1}();n.Browser={ie:o,ie6:s,ie7:a,webkit:h,android:u,android23:c,chrome:l,ie3d:f,webkit3d:g,gecko3d:v,opera3d:y,any3d:L,mobile:_,mobileWebkit:_&&h,mobileWebkit3d:_&&g,mobileOpera:_&&t.opera,touch:P,msTouch:d,retina:p}}(),n.Point=function(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e},n.Point.prototype={clone:function(){return new n.Point(this.x,this.y)},add:function(t){return this.clone()._add(n.point(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(n.point(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_mu
ltiplyBy:function(t){return this.x*=t,this.y*=t,this},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},distanceTo:function(t){t=n.point(t);var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return t.x===this.x&&t.y===this.y},toString:function(){return"Point("+n.Util.formatNum(this.x)+", "+n.Util.formatNum(this.y)+")"}},n.point=function(t,e,i){return t instanceof n.Point?t:n.Util.isArray(t)?new n.Point(t[0],t[1]):isNaN(t)?t:new n.Point(t,e,i)},n.Bounds=function(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;o>n;n++)this.extend(i[n])},n.Bounds.prototype={extend:function(t){return t=n.point(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):
(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new n.Point((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new n.Point(this.min.x,this.max.y)},getTopRight:function(){return new n.Point(this.max.x,this.min.y)},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,i;return t="number"==typeof t[0]||t instanceof n.Point?n.point(t):n.bounds(t),t instanceof n.Bounds?(e=t.min,i=t.max):e=i=t,e.x>=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=n.bounds(t);var e=this.min,i=this.max,o=t.min,s=t.max,a=s.x>=e.x&&o.x<=i.x,r=s.y>=e.y&&o.y<=i.y;return a&&r},isValid:function(){return!(!this.min||!this.max)}},n.bounds=function(t,e){return!t||t instanceof n.Bounds?t:new n.Bounds(t,e)},n.Transformation=function(t,e,i,n){this._a=t,this._b=e,this._c=i,this._d=n},n.Transformation.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(
t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new n.Point((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}},n.DomUtil={get:function(t){return"string"==typeof t?e.getElementById(t):t},getStyle:function(t,i){var n=t.style[i];if(!n&&t.currentStyle&&(n=t.currentStyle[i]),(!n||"auto"===n)&&e.defaultView){var o=e.defaultView.getComputedStyle(t,null);n=o?o[i]:null}return"auto"===n?null:n},getViewportOffset:function(t){var i,o=0,s=0,a=t,r=e.body,h=n.Browser.ie7;do{if(o+=a.offsetTop||0,s+=a.offsetLeft||0,o+=parseInt(n.DomUtil.getStyle(a,"borderTopWidth"),10)||0,s+=parseInt(n.DomUtil.getStyle(a,"borderLeftWidth"),10)||0,i=n.DomUtil.getStyle(a,"position"),a.offsetParent===r&&"absolute"===i)break;if("fixed"===i){o+=r.scrollTop||0,s+=r.scrollLeft||0;break}a=a.offsetParent}while(a);a=t;do{if(a===r)break;o-=a.scrollTop||0,s-=a.scrollLeft||0,n.DomUtil.documentIsLtr()||!n.Browser.webkit&&!h||(s+=a.scrollWidth-a.clientWidth,h&&"
hidden"!==n.DomUtil.getStyle(a,"overflow-y")&&"hidden"!==n.DomUtil.getStyle(a,"overflow")&&(s+=17)),a=a.parentNode}while(a);return new n.Point(s,o)},documentIsLtr:function(){return n.DomUtil._docIsLtrCached||(n.DomUtil._docIsLtrCached=!0,n.DomUtil._docIsLtr="ltr"===n.DomUtil.getStyle(e.body,"direction")),n.DomUtil._docIsLtr},create:function(t,i,n){var o=e.createElement(t);return o.className=i,n&&n.appendChild(o),o},disableTextSelection:function(){e.selection&&e.selection.empty&&e.selection.empty(),this._onselectstart||(this._onselectstart=e.onselectstart||null,e.onselectstart=n.Util.falseFn)},enableTextSelection:function(){e.onselectstart===n.Util.falseFn&&(e.onselectstart=this._onselectstart,this._onselectstart=null)},hasClass:function(t,e){return t.className.length>0&&RegExp("(^|\\s)"+e+"(\\s|$)").test(t.className)},addClass:function(t,e){n.DomUtil.hasClass(t,e)||(t.className+=(t.className?" ":"")+e)},removeClass:function(t,e){function i(t,i){return i===e?"":t}t.className=t.classN
ame.replace(/(\S+)\s*/g,i).replace(/(^\s+|\s+$)/,"")},setOpacity:function(t,e){if("opacity"in t.style)t.style.opacity=e;else if("filter"in t.style){var i=!1,n="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(n)}catch(o){}e=Math.round(100*e),i?(i.Enabled=100!==e,i.Opacity=e):t.style.filter+=" progid:"+n+"(opacity="+e+")"}},testProp:function(t){for(var i=e.documentElement.style,n=0;t.length>n;n++)if(t[n]in i)return t[n];return!1},getTranslateString:function(t){var e=n.Browser.webkit3d,i="translate"+(e?"3d":"")+"(",o=(e?",0":"")+")";return i+t.x+"px,"+t.y+"px"+o},getScaleString:function(t,e){var i=n.DomUtil.getTranslateString(e.add(e.multiplyBy(-1*t))),o=" scale("+t+") ";return i+o},setPosition:function(t,e,i){t._leaflet_pos=e,!i&&n.Browser.any3d?(t.style[n.DomUtil.TRANSFORM]=n.DomUtil.getTranslateString(e),n.Browser.mobileWebkit3d&&(t.style.WebkitBackfaceVisibility="hidden")):(t.style.left=e.x+"px",t.style.top=e.y+"px")},getPosition:function(t){return t._leaflet_pos}},n.DomUtil
.TRANSFORM=n.DomUtil.testProp(["transform","WebkitTransform","OTransform","MozTransform","msTransform"]),n.DomUtil.TRANSITION=n.DomUtil.testProp(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),n.DomUtil.TRANSITION_END="webkitTransition"===n.DomUtil.TRANSITION||"OTransition"===n.DomUtil.TRANSITION?n.DomUtil.TRANSITION+"End":"transitionend",n.LatLng=function(t,e){var i=parseFloat(t),n=parseFloat(e);if(isNaN(i)||isNaN(n))throw Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=i,this.lng=n},n.extend(n.LatLng,{DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,MAX_MARGIN:1e-9}),n.LatLng.prototype={equals:function(t){if(!t)return!1;t=n.latLng(t);var e=Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng));return n.LatLng.MAX_MARGIN>=e},toString:function(t){return"LatLng("+n.Util.formatNum(this.lat,t)+", "+n.Util.formatNum(this.lng,t)+")"},distanceTo:function(t){t=n.latLng(t);var e=6378137,i=n.LatLng.DEG_TO_RAD,o=(t.lat-this.lat)*i,s=(t.lng-this.lng)*i
,a=this.lat*i,r=t.lat*i,h=Math.sin(o/2),l=Math.sin(s/2),u=h*h+l*l*Math.cos(a)*Math.cos(r);return 2*e*Math.atan2(Math.sqrt(u),Math.sqrt(1-u))},wrap:function(t,e){var i=this.lng;return t=t||-180,e=e||180,i=(i+e)%(e-t)+(t>i||i===e?e:t),new n.LatLng(this.lat,i)}},n.latLng=function(t,e){return t instanceof n.LatLng?t:n.Util.isArray(t)?new n.LatLng(t[0],t[1]):isNaN(t)?t:new n.LatLng(t,e)},n.LatLngBounds=function(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;o>n;n++)this.extend(i[n])},n.LatLngBounds.prototype={extend:function(t){return t="number"==typeof t[0]||"string"==typeof t[0]||t instanceof n.LatLng?n.latLng(t):n.latLngBounds(t),t instanceof n.LatLng?this._southWest||this._northEast?(this._southWest.lat=Math.min(t.lat,this._southWest.lat),this._southWest.lng=Math.min(t.lng,this._southWest.lng),this._northEast.lat=Math.max(t.lat,this._northEast.lat),this._northEast.lng=Math.max(t.lng,this._northEast.lng)):(this._southWest=new n.LatLng(t.lat,t.lng),this._northEast=new n.LatLng(t.lat,t.ln
g)):t instanceof n.LatLngBounds&&(this.extend(t._southWest),this.extend(t._northEast)),this},pad:function(t){var e=this._southWest,i=this._northEast,o=Math.abs(e.lat-i.lat)*t,s=Math.abs(e.lng-i.lng)*t;return new n.LatLngBounds(new n.LatLng(e.lat-o,e.lng-s),new n.LatLng(i.lat+o,i.lng+s))},getCenter:function(){return new n.LatLng((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new n.LatLng(this._northEast.lat,this._southWest.lng)},getSouthEast:function(){return new n.LatLng(this._southWest.lat,this._northEast.lng)},contains:function(t){t="number"==typeof t[0]||t instanceof n.LatLng?n.latLng(t):n.latLngBounds(t);var e,i,o=this._southWest,s=this._northEast;return t instanceof n.LatLngBounds?(e=t.getSouthWest(),i=t.getNorthEast()):e=i=t,e.lat>=o.lat&&i.lat<=s.lat&&e.lng>=o.lng&&i.lng<=s.lng},intersects:function(t){t=n.lat
LngBounds(t);var e=this._southWest,i=this._northEast,o=t.getSouthWest(),s=t.getNorthEast(),a=s.lat>=e.lat&&o.lat<=i.lat,r=s.lng>=e.lng&&o.lng<=i.lng;return a&&r},toBBoxString:function(){var t=this._southWest,e=this._northEast;return[t.lng,t.lat,e.lng,e.lat].join(",")},equals:function(t){return t?(t=n.latLngBounds(t),this._southWest.equals(t.getSouthWest())&&this._northEast.equals(t.getNorthEast())):!1},isValid:function(){return!(!this._southWest||!this._northEast)}},n.latLngBounds=function(t,e){return!t||t instanceof n.LatLngBounds?t:new n.LatLngBounds(t,e)},n.Projection={},n.Projection.SphericalMercator={MAX_LATITUDE:85.0511287798,project:function(t){var e=n.LatLng.DEG_TO_RAD,i=this.MAX_LATITUDE,o=Math.max(Math.min(i,t.lat),-i),s=t.lng*e,a=o*e;return a=Math.log(Math.tan(Math.PI/4+a/2)),new n.Point(s,a)},unproject:function(t){var e=n.LatLng.RAD_TO_DEG,i=t.x*e,o=(2*Math.atan(Math.exp(t.y))-Math.PI/2)*e;return new n.LatLng(o,i)}},n.Projection.LonLat={project:function(t){return new n.P
oint(t.lng,t.lat)},unproject:function(t){return new n.LatLng(t.y,t.x)}},n.CRS={latLngToPoint:function(t,e){var i=this.projection.project(t),n=this.scale(e);return this.transformation._transform(i,n)},pointToLatLng:function(t,e){var i=this.scale(e),n=this.transformation.untransform(t,i);return this.projection.unproject(n)},project:function(t){return this.projection.project(t)},scale:function(t){return 256*Math.pow(2,t)}},n.CRS.Simple=n.extend({},n.CRS,{projection:n.Projection.LonLat,transformation:new n.Transformation(1,0,-1,0),scale:function(t){return Math.pow(2,t)}}),n.CRS.EPSG3857=n.extend({},n.CRS,{code:"EPSG:3857",projection:n.Projection.SphericalMercator,transformation:new n.Transformation(.5/Math.PI,.5,-.5/Math.PI,.5),project:function(t){var e=this.projection.project(t),i=6378137;return e.multiplyBy(i)}}),n.CRS.EPSG900913=n.extend({},n.CRS.EPSG3857,{code:"EPSG:900913"}),n.CRS.EPSG4326=n.extend({},n.CRS,{code:"EPSG:4326",projection:n.Projection.LonLat,transformation:new n.Trans
formation(1/360,.5,-1/360,.5)}),n.Map=n.Class.extend({includes:n.Mixin.Events,options:{crs:n.CRS.EPSG3857,fadeAnimation:n.DomUtil.TRANSITION&&!n.Browser.android23,trackResize:!0,markerZoomAnimation:n.DomUtil.TRANSITION&&n.Browser.any3d},initialize:function(t,e){e=n.setOptions(this,e),this._initContainer(t),this._initLayout(),this.callInitHooks(),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),e.center&&e.zoom!==i&&this.setView(n.latLng(e.center),e.zoom,!0),this._initLayers(e.layers)},setView:function(t,e){return this._resetView(n.latLng(t),this._limitZoom(e)),this},setZoom:function(t){return this.setView(this.getCenter(),t)},zoomIn:function(t){return this.setZoom(this._zoom+(t||1))},zoomOut:function(t){return this.setZoom(this._zoom-(t||1))},fitBounds:function(t){var e=this.getBoundsZoom(t);return this.setView(n.latLngBounds(t).getCenter(),e)},fitWorld:function(){var t=new n.LatLng(-60,-170),e=new n.LatLng(85,179);return this.fitBounds(new n.LatLngBounds(t,e))},panTo:
function(t){return this.setView(t,this._zoom)},panBy:function(t){return this.fire("movestart"),this._rawPanBy(n.point(t)),this.fire("move"),this.fire("moveend")},setMaxBounds:function(t){if(t=n.latLngBounds(t),this.options.maxBounds=t,!t)return this._boundsMinZoom=null,this;var e=this.getBoundsZoom(t,!0);return this._boundsMinZoom=e,this._loaded&&(e>this._zoom?this.setView(t.getCenter(),e):this.panInsideBounds(t)),this},panInsideBounds:function(t){t=n.latLngBounds(t);var e=this.getBounds(),i=this.project(e.getSouthWest()),o=this.project(e.getNorthEast()),s=this.project(t.getSouthWest()),a=this.project(t.getNorthEast()),r=0,h=0;return o.y<a.y&&(h=a.y-o.y),o.x>a.x&&(r=a.x-o.x),i.y>s.y&&(h=s.y-i.y),i.x<s.x&&(r=s.x-i.x),this.panBy(new n.Point(r,h,!0))},addLayer:function(t){var e=n.stamp(t);return this._layers[e]?this:(this._layers[e]=t,!t.options||isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[e]=t,this._updateZoomLevels()),this.options.zoomAnimation&&n.TileL
ayer&&t instanceof n.TileLayer&&(this._tileLayersNum++,this._tileLayersToLoad++,t.on("load",this._onTileLayerLoad,this)),this.whenReady(function(){t.onAdd(this),this.fire("layeradd",{layer:t})},this),this)},removeLayer:function(t){var e=n.stamp(t);if(this._layers[e])return t.onRemove(this),delete this._layers[e],this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels()),this.options.zoomAnimation&&n.TileLayer&&t instanceof n.TileLayer&&(this._tileLayersNum--,this._tileLayersToLoad--,t.off("load",this._onTileLayerLoad,this)),this.fire("layerremove",{layer:t})},hasLayer:function(t){var e=n.stamp(t);return this._layers.hasOwnProperty(e)},invalidateSize:function(t){var e=this.getSize();if(this._sizeChanged=!0,this.options.maxBounds&&this.setMaxBounds(this.options.maxBounds),!this._loaded)return this;var i=e._subtract(this.getSize())._divideBy(2)._round();return t===!0?this.panBy(i):(this._rawPanBy(i),this.fire("move"),clearTimeout(this._sizeTimer),this._sizeTim
er=setTimeout(n.bind(this.fire,this,"moveend"),200)),this},addHandler:function(t,e){return e?(this[t]=new e(this),this.options[t]&&this[t].enable(),this):i},getCenter:function(){return this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),i=this.unproject(t.getTopRight());return new n.LatLngBounds(e,i)},getMinZoom:function(){var t=this.options.minZoom||0,e=this._layersMinZoom||0,i=this._boundsMinZoom||0;return Math.max(t,e,i)},getMaxZoom:function(){var t=this.options.maxZoom===i?1/0:this.options.maxZoom,e=this._layersMaxZoom===i?1/0:this._layersMaxZoom;return Math.min(t,e)},getBoundsZoom:function(t,e){t=n.latLngBounds(t);var i,o,s,a=this.getSize(),r=this.options.minZoom||0,h=this.getMaxZoom(),l=t.getNorthEast(),u=t.getSouthWest(),c=!0;e&&r--;do r++,o=this.project(l,r),s=this.project(u,r),i=new n.Point(Math.abs(o.x-s.x),Math.abs(s.y-o.y)),c=e?i.x<a.x||i.y<a.y:i.x
<=a.x&&i.y<=a.y;while(c&&h>=r);return c&&e?null:e?r:r-1},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new n.Point(this._container.clientWidth,this._container.clientHeight),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(){var t=this._getTopLeftPoint();return new n.Bounds(t,t.add(this.getSize()))},getPixelOrigin:function(){return this._initialTopLeftPoint},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t){var e=this.options.crs;return e.scale(t)/e.scale(this._zoom)},getScaleZoom:function(t){return this._zoom+Math.log(t)/Math.LN2},project:function(t,e){return e=e===i?this._zoom:e,this.options.crs.latLngToPoint(n.latLng(t),e)},unproject:function(t,e){return e=e===i?this._zoom:e,this.options.crs.pointToLatLng(n.point(t),e)},layerPointToLatLng:function(t){var e=n.point(t).add(this._initialTopLeftPoint);return this.unproject(e)},latLngToLayerPoint:function(t){var e=this.project(n.lat
Lng(t))._round();return e._subtract(this._initialTopLeftPoint)},containerPointToLayerPoint:function(t){return n.point(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return n.point(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(n.point(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(n.latLng(t)))},mouseEventToContainerPoint:function(t){return n.DomEvent.getMousePosition(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=n.DomUtil.get(t);if(e._leaflet)throw Error("Map container is already initialized.");e._leaflet=!0},_initLayout:function(){var t=this._container;n.DomUtil.addClass(t,"leaflet-co
ntainer"),n.Browser.touch&&n.DomUtil.addClass(t,"leaflet-touch"),this.options.fadeAnimation&&n.DomUtil.addClass(t,"leaflet-fade-anim");var e=n.DomUtil.getStyle(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._mapPane=t.mapPane=this._createPane("leaflet-map-pane",this._container),this._tilePane=t.tilePane=this._createPane("leaflet-tile-pane",this._mapPane),t.objectsPane=this._createPane("leaflet-objects-pane",this._mapPane),t.shadowPane=this._createPane("leaflet-shadow-pane"),t.overlayPane=this._createPane("leaflet-overlay-pane"),t.markerPane=this._createPane("leaflet-marker-pane"),t.popupPane=this._createPane("leaflet-popup-pane");var e=" leaflet-zoom-hide";this.options.markerZoomAnimation||(n.DomUtil.addClass(t.markerPane,e),n.DomUtil.addClass(t.shadowPane,e),n.DomUtil.addClass(t.popupPane,e))},_createPane:function(t,e){return n.Do
mUtil.create("div",t,e||this._panes.objectsPane)},_initLayers:function(t){t=t?n.Util.isArray(t)?t:[t]:[],this._layers={},this._zoomBoundLayers={},this._tileLayersNum=0;var e,i;for(e=0,i=t.length;i>e;e++)this.addLayer(t[e])},_resetView:function(t,e,i,o){var s=this._zoom!==e;o||(this.fire("movestart"),s&&this.fire("zoomstart")),this._zoom=e,this._initialTopLeftPoint=this._getNewTopLeftPoint(t),i?this._initialTopLeftPoint._add(this._getMapPanePos()):n.DomUtil.setPosition(this._mapPane,new n.Point(0,0)),this._tileLayersToLoad=this._tileLayersNum;var a=!this._loaded;this._loaded=!0,this.fire("viewreset",{hard:!i}),this.fire("move"),(s||o)&&this.fire("zoomend"),this.fire("moveend",{hard:!i}),a&&this.fire("load")},_rawPanBy:function(t){n.DomUtil.setPosition(this._mapPane,this._getMapPanePos().subtract(t))},_updateZoomLevels:function(){var t,e=1/0,n=-1/0;for(t in this._zoomBoundLayers)if(this._zoomBoundLayers.hasOwnProperty(t)){var o=this._zoomBoundLayers[t];isNaN(o.options.minZoom)||(e=Mat
h.min(e,o.options.minZoom)),isNaN(o.options.maxZoom)||(n=Math.max(n,o.options.maxZoom))}t===i?this._layersMaxZoom=this._layersMinZoom=i:(this._layersMaxZoom=n,this._layersMinZoom=e)},_initEvents:function(){if(n.DomEvent){n.DomEvent.on(this._container,"click",this._onMouseClick,this);var e,i,o=["dblclick","mousedown","mouseup","mouseenter","mouseleave","mousemove","contextmenu"];for(e=0,i=o.length;i>e;e++)n.DomEvent.on(this._container,o[e],this._fireMouseEvent,this);this.options.trackResize&&n.DomEvent.on(t,"resize",this._onResize,this)}},_onResize:function(){n.Util.cancelAnimFrame(this._resizeRequest),this._resizeRequest=n.Util.requestAnimFrame(this.invalidateSize,this,!1,this._container)},_onMouseClick:function(t){!this._loaded||this.dragging&&this.dragging.moved()||(this.fire("preclick"),this._fireMouseEvent(t))},_fireMouseEvent:function(t){if(this._loaded){var e=t.type;if(e="mouseenter"===e?"mouseover":"mouseleave"===e?"mouseout":e,this.hasEventListeners(e)){"contextmenu"===e&&n.
DomEvent.preventDefault(t);var i=this.mouseEventToContainerPoint(t),o=this.containerPointToLayerPoint(i),s=this.layerPointToLatLng(o);this.fire(e,{latlng:s,layerPoint:o,containerPoint:i,originalEvent:t})}}},_onTileLayerLoad:function(){this._tileLayersToLoad--,this._tileLayersNum&&!this._tileLayersToLoad&&this._tileBg&&(clearTimeout(this._clearTileBgTimer),this._clearTileBgTimer=setTimeout(n.bind(this._clearTileBg,this),500))},whenReady:function(t,e){return this._loaded?t.call(e||this,this):this.on("load",t,e),this},_getMapPanePos:function(){return n.DomUtil.getPosition(this._mapPane)},_getTopLeftPoint:function(){if(!this._loaded)throw Error("Set map center and zoom first.");return this._initialTopLeftPoint.subtract(this._getMapPanePos())},_getNewTopLeftPoint:function(t,e){var i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._round()},_latLngToNewLayerPoint:function(t,e,i){var n=this._getNewTopLeftPoint(i,e).add(this._getMapPanePos());return this.project(t,e)._subt
ract(n)},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom();return Math.max(e,Math.min(i,t))}}),n.map=function(t,e){return new n.Map(t,e)},n.Projection.Mercator={MAX_LATITUDE:85.0840591556,R_MINOR:6356752.3142,R_MAJOR:6378137,project:function(t){var e=n.LatLng.DEG_TO_RAD,i=this.MAX_LATITUDE,o=Math.max(Math.min(i,t.lat),-i),s=this.R_MAJOR,a=this.R_MINOR,r=t.lng*e*s,h=o*e,l=a/s,u=Math.sqrt(1-l*l),c=u*Math.sin(h);c=Math.pow((1-c)/(1+c),.5*u);var _=Math.tan(.5*(.5*Math.PI-h))/c;return h=-a*Math.log(_),new n.Point(r,h)},unproject:function(t){for(var e,i=n.LatLng.RAD_TO_DEG,o=this.R_MAJOR,s=this.R_MINOR,a=t.x*i/o,r=s/o,h=Math.sqrt(1-r*r),l=Math.exp(-t.y/s),u=Math.PI/2-2*Math.atan(l),c=15,_=1e-7,d=c,p=.1;Math.abs(p)>_&&--d>0;)e=h*Math.sin(u),p=Math.PI/2-2*Math.atan(l*Math.po
w((1-e)/(1+e),.5*h))-u,u+=p;return new n.LatLng(u*i,a)}},n.CRS.EPSG3395=n.extend({},n.CRS,{code:"EPSG:3395",projection:n.Projection.Mercator,transformation:function(){var t=n.Projection.Mercator,e=t.R_MAJOR,i=t.R_MINOR;return new n.Transformation(.5/(Math.PI*e),.5,-.5/(Math.PI*i),.5)}()}),n.TileLayer=n.Class.extend({includes:n.Mixin.Events,options:{minZoom:0,maxZoom:18,tileSize:256,subdomains:"abc",errorTileUrl:"",attribution:"",zoomOffset:0,opacity:1,unloadInvisibleTiles:n.Browser.mobile,updateWhenIdle:n.Browser.mobile},initialize:function(t,e){e=n.setOptions(this,e),e.detectRetina&&n.Browser.retina&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomOffset++,e.minZoom>0&&e.minZoom--,this.options.maxZoom--),this._url=t;var i=this.options.subdomains;"string"==typeof i&&(this.options.subdomains=i.split(""))},onAdd:function(t){this._map=t,this._initContainer(),this._createTileProto(),t.on({viewreset:this._resetCallback,moveend:this._update},this),this.options.updateWhenIdle||(thi
s._limitedUpdate=n.Util.limitExecByInterval(this._update,150,this),t.on("move",this._limitedUpdate,this)),this._reset(),this._update()},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){this._container.parentNode.removeChild(this._container),t.off({viewreset:this._resetCallback,moveend:this._update},this),this.options.updateWhenIdle||t.off("move",this._limitedUpdate,this),this._container=null,this._map=null},bringToFront:function(){var t=this._map._panes.tilePane;return this._container&&(t.appendChild(this._container),this._setAutoZIndex(t,Math.max)),this},bringToBack:function(){var t=this._map._panes.tilePane;return this._container&&(t.insertBefore(this._container,t.firstChild),this._setAutoZIndex(t,Math.min)),this},getAttribution:function(){return this.options.attribution},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},setUrl:function(t,e){r
eturn this._url=t,e||this.redraw(),this},redraw:function(){return this._map&&(this._map._panes.tilePane.empty=!1,this._reset(!0),this._update()),this},_updateZIndex:function(){this._container&&this.options.zIndex!==i&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t,e){var i,n,o,s=t.children,a=-e(1/0,-1/0);for(n=0,o=s.length;o>n;n++)s[n]!==this._container&&(i=parseInt(s[n].style.zIndex,10),isNaN(i)||(a=e(a,i)));this.options.zIndex=this._container.style.zIndex=(isFinite(a)?a:0)+e(1,-1)},_updateOpacity:function(){n.DomUtil.setOpacity(this._container,this.options.opacity);var t,e=this._tiles;if(n.Browser.webkit)for(t in e)e.hasOwnProperty(t)&&(e[t].style.webkitTransform+=" translate(0,0)")},_initContainer:function(){var t=this._map._panes.tilePane;(!this._container||t.empty)&&(this._container=n.DomUtil.create("div","leaflet-layer"),this._updateZIndex(),t.appendChild(this._container),1>this.options.opacity&&this._updateOpacity())},_resetCallback:function(t){
this._reset(t.hard)},_reset:function(t){var e=this._tiles;for(var i in e)e.hasOwnProperty(i)&&this.fire("tileunload",{tile:e[i]});this._tiles={},this._tilesToLoad=0,this.options.reuseTiles&&(this._unusedTiles=[]),t&&this._container&&(this._container.innerHTML=""),this._initContainer()},_update:function(){if(this._map){var t=this._map.getPixelBounds(),e=this._map.getZoom(),i=this.options.tileSize;if(!(e>this.options.maxZoom||this.options.minZoom>e)){var o=new n.Point(Math.floor(t.min.x/i),Math.floor(t.min.y/i)),s=new n.Point(Math.floor(t.max.x/i),Math.floor(t.max.y/i)),a=new n.Bounds(o,s);this._addTilesFromCenterOut(a),(this.options.unloadInvisibleTiles||this.options.reuseTiles)&&this._removeOtherTiles(a)}}},_addTilesFromCenterOut:function(t){var i,o,s,a=[],r=t.getCenter();for(i=t.min.y;t.max.y>=i;i++)for(o=t.min.x;t.max.x>=o;o++)s=new n.Point(o,i),this._tileShouldBeLoaded(s)&&a.push(s);var h=a.length;if(0!==h){a.sort(function(t,e){return t.distanceTo(r)-e.distanceTo(r)});var l=e.cre
ateDocumentFragment();for(this._tilesToLoad||this.fire("loading"),this._tilesToLoad+=h,o=0;h>o;o++)this._addTile(a[o],l);this._container.appendChild(l)}},_tileShouldBeLoaded:function(t){if(t.x+":"+t.y in this._tiles)return!1;if(!this.options.continuousWorld){var e=this._getWrapTileNum();if(this.options.noWrap&&(0>t.x||t.x>=e)||0>t.y||t.y>=e)return!1}return!0},_removeOtherTiles:function(t){var e,i,n,o;for(o in this._tiles)this._tiles.hasOwnProperty(o)&&(e=o.split(":"),i=parseInt(e[0],10),n=parseInt(e[1],10),(t.min.x>i||i>t.max.x||t.min.y>n||n>t.max.y)&&this._removeTile(o))},_removeTile:function(t){var e=this._tiles[t];this.fire("tileunload",{tile:e,url:e.src}),this.options.reuseTiles?(n.DomUtil.removeClass(e,"leaflet-tile-loaded"),this._unusedTiles.push(e)):e.parentNode===this._container&&this._container.removeChild(e),n.Browser.android||(e.src=n.Util.emptyImageUrl),delete this._tiles[t]},_addTile:function(t,e){var i=this._getTilePos(t),o=this._getTile();n.DomUtil.setPosition(o,i,n.B
rowser.chrome||n.Browser.android23),this._tiles[t.x+":"+t.y]=o,this._loadTile(o,t),o.parentNode!==this._container&&e.appendChild(o)
-},_getZoomForUrl:function(){var t=this.options,e=this._map.getZoom();return t.zoomReverse&&(e=t.maxZoom-e),e+t.zoomOffset},_getTilePos:function(t){var e=this._map.getPixelOrigin(),i=this.options.tileSize;return t.multiplyBy(i).subtract(e)},getTileUrl:function(t){return this._adjustTilePoint(t),n.Util.template(this._url,n.extend({s:this._getSubdomain(t),z:this._getZoomForUrl(),x:t.x,y:t.y},this.options))},_getWrapTileNum:function(){return Math.pow(2,this._getZoomForUrl())},_adjustTilePoint:function(t){var e=this._getWrapTileNum();this.options.continuousWorld||this.options.noWrap||(t.x=(t.x%e+e)%e),this.options.tms&&(t.y=e-t.y-1)},_getSubdomain:function(t){var e=(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_createTileProto:function(){var t=this._tileImg=n.DomUtil.create("img","leaflet-tile");t.style.width=t.style.height=this.options.tileSize+"px",t.galleryimg="no"},_getTile:function(){if(this.options.reuseTiles&&this._unusedTiles.length>0){var t=this._un
usedTiles.pop();return this._resetTile(t),t}return this._createTile()},_resetTile:function(){},_createTile:function(){var t=this._tileImg.cloneNode(!1);return t.onselectstart=t.onmousemove=n.Util.falseFn,t},_loadTile:function(t,e){t._layer=this,t.onload=this._tileOnLoad,t.onerror=this._tileOnError,t.src=this.getTileUrl(e)},_tileLoaded:function(){this._tilesToLoad--,this._tilesToLoad||this.fire("load")},_tileOnLoad:function(){var t=this._layer;this.src!==n.Util.emptyImageUrl&&(n.DomUtil.addClass(this,"leaflet-tile-loaded"),t.fire("tileload",{tile:this,url:this.src})),t._tileLoaded()},_tileOnError:function(){var t=this._layer;t.fire("tileerror",{tile:this,url:this.src});var e=t.options.errorTileUrl;e&&(this.src=e),t._tileLoaded()}}),n.tileLayer=function(t,e){return new n.TileLayer(t,e)},n.TileLayer.WMS=n.TileLayer.extend({defaultWmsParams:{service:"WMS",request:"GetMap",version:"1.1.1",layers:"",styles:"",format:"image/jpeg",transparent:!1},initialize:function(t,e){this._url=t;var i=n
.extend({},this.defaultWmsParams);i.width=i.height=e.detectRetina&&n.Browser.retina?2*this.options.tileSize:this.options.tileSize;for(var o in e)this.options.hasOwnProperty(o)||(i[o]=e[o]);this.wmsParams=i,n.setOptions(this,e)},onAdd:function(t){var e=parseFloat(this.wmsParams.version)>=1.3?"crs":"srs";this.wmsParams[e]=t.options.crs.code,n.TileLayer.prototype.onAdd.call(this,t)},getTileUrl:function(t,e){this._adjustTilePoint(t);var i=this._map,o=i.options.crs,s=this.options.tileSize,a=t.multiplyBy(s),r=a.add(new n.Point(s,s)),h=o.project(i.unproject(a,e)),l=o.project(i.unproject(r,e)),u=[h.x,l.y,l.x,h.y].join(","),c=n.Util.template(this._url,{s:this._getSubdomain(t)});return c+n.Util.getParamString(this.wmsParams,c)+"&bbox="+u},setParams:function(t,e){return n.extend(this.wmsParams,t),e||this.redraw(),this}}),n.tileLayer.wms=function(t,e){return new n.TileLayer.WMS(t,e)},n.TileLayer.Canvas=n.TileLayer.extend({options:{async:!1},initialize:function(t){n.setOptions(this,t)},redraw:fu
nction(){var t=this._tiles;for(var e in t)t.hasOwnProperty(e)&&this._redrawTile(t[e])},_redrawTile:function(t){this.drawTile(t,t._tilePoint,this._map._zoom)},_createTileProto:function(){var t=this._canvasProto=n.DomUtil.create("canvas","leaflet-tile");t.width=t.height=this.options.tileSize},_createTile:function(){var t=this._canvasProto.cloneNode(!1);return t.onselectstart=t.onmousemove=n.Util.falseFn,t},_loadTile:function(t,e){t._layer=this,t._tilePoint=e,this._redrawTile(t),this.options.async||this.tileDrawn(t)},drawTile:function(){},tileDrawn:function(t){this._tileOnLoad.call(t)}}),n.tileLayer.canvas=function(t){return new n.TileLayer.Canvas(t)},n.ImageOverlay=n.Class.extend({includes:n.Mixin.Events,options:{opacity:1},initialize:function(t,e,i){this._url=t,this._bounds=n.latLngBounds(e),n.setOptions(this,i)},onAdd:function(t){this._map=t,this._image||this._initImage(),t._panes.overlayPane.appendChild(this._image),t.on("viewreset",this._reset,this),t.options.zoomAnimation&&n.Brow
ser.any3d&&t.on("zoomanim",this._animateZoom,this),this._reset()},onRemove:function(t){t.getPanes().overlayPane.removeChild(this._image),t.off("viewreset",this._reset,this),t.options.zoomAnimation&&t.off("zoomanim",this._animateZoom,this)},addTo:function(t){return t.addLayer(this),this},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},bringToFront:function(){return this._image&&this._map._panes.overlayPane.appendChild(this._image),this},bringToBack:function(){var t=this._map._panes.overlayPane;return this._image&&t.insertBefore(this._image,t.firstChild),this},_initImage:function(){this._image=n.DomUtil.create("img","leaflet-image-layer"),this._map.options.zoomAnimation&&n.Browser.any3d?n.DomUtil.addClass(this._image,"leaflet-zoom-animated"):n.DomUtil.addClass(this._image,"leaflet-zoom-hide"),this._updateOpacity(),n.extend(this._image,{galleryimg:"no",onselectstart:n.Util.falseFn,onmousemove:n.Util.falseFn,onload:n.bind(this._onImageLoad,this),src:this
._url})},_animateZoom:function(t){var e=this._map,i=this._image,o=e.getZoomScale(t.zoom),s=this._bounds.getNorthWest(),a=this._bounds.getSouthEast(),r=e._latLngToNewLayerPoint(s,t.zoom,t.center),h=e._latLngToNewLayerPoint(a,t.zoom,t.center)._subtract(r),l=r._add(h._multiplyBy(.5*(1-1/o)));i.style[n.DomUtil.TRANSFORM]=n.DomUtil.getTranslateString(l)+" scale("+o+") "},_reset:function(){var t=this._image,e=this._map.latLngToLayerPoint(this._bounds.getNorthWest()),i=this._map.latLngToLayerPoint(this._bounds.getSouthEast())._subtract(e);n.DomUtil.setPosition(t,e),t.style.width=i.x+"px",t.style.height=i.y+"px"},_onImageLoad:function(){this.fire("load")},_updateOpacity:function(){n.DomUtil.setOpacity(this._image,this.options.opacity)}}),n.imageOverlay=function(t,e,i){return new n.ImageOverlay(t,e,i)},n.Icon=n.Class.extend({options:{className:""},initialize:function(t){n.setOptions(this,t)},createIcon:function(){return this._createIcon("icon")},createShadow:function(){return this._createIco
n("shadow")},_createIcon:function(t){var e=this._getIconUrl(t);if(!e){if("icon"===t)throw Error("iconUrl not set in Icon options (see the docs).");return null}var i=this._createImg(e);return this._setIconStyles(i,t),i},_setIconStyles:function(t,e){var i,o=this.options,s=n.point(o[e+"Size"]);i="shadow"===e?n.point(o.shadowAnchor||o.iconAnchor):n.point(o.iconAnchor),!i&&s&&(i=s.divideBy(2,!0)),t.className="leaflet-marker-"+e+" "+o.className,i&&(t.style.marginLeft=-i.x+"px",t.style.marginTop=-i.y+"px"),s&&(t.style.width=s.x+"px",t.style.height=s.y+"px")},_createImg:function(t){var i;return n.Browser.ie6?(i=e.createElement("div"),i.style.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+t+'")'):(i=e.createElement("img"),i.src=t),i},_getIconUrl:function(t){return n.Browser.retina&&this.options[t+"RetinaUrl"]?this.options[t+"RetinaUrl"]:this.options[t+"Url"]}}),n.icon=function(t){return new n.Icon(t)},n.Icon.Default=n.Icon.extend({options:{iconSize:new n.Point(25,41),iconA
nchor:new n.Point(12,41),popupAnchor:new n.Point(1,-34),shadowSize:new n.Point(41,41)},_getIconUrl:function(t){var e=t+"Url";if(this.options[e])return this.options[e];n.Browser.retina&&"icon"===t&&(t+="@2x");var i=n.Icon.Default.imagePath;if(!i)throw Error("Couldn't autodetect L.Icon.Default.imagePath, set it manually.");return i+"/marker-"+t+".png"}}),n.Icon.Default.imagePath=function(){var t,i,n,o,s=e.getElementsByTagName("script"),a=/\/?leaflet[\-\._]?([\w\-\._]*)\.js\??/;for(t=0,i=s.length;i>t;t++)if(n=s[t].src,o=n.match(a))return n.split(a)[0]+"/images"}(),n.Marker=n.Class.extend({includes:n.Mixin.Events,options:{icon:new n.Icon.Default,title:"",clickable:!0,draggable:!1,zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250},initialize:function(t,e){n.setOptions(this,e),this._latlng=n.latLng(t)},onAdd:function(t){this._map=t,t.on("viewreset",this.update,this),this._initIcon(),this.update(),t.options.zoomAnimation&&t.options.markerZoomAnimation&&t.on("zoomanim",this._animateZoo
m,this)},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){this._removeIcon(),this.fire("remove"),t.off({viewreset:this.update,zoomanim:this._animateZoom},this),this._map=null},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=n.latLng(t),this.update(),this.fire("move",{latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update(),this},setIcon:function(t){return this._map&&this._removeIcon(),this.options.icon=t,this._map&&(this._initIcon(),this.update()),this},update:function(){if(this._icon){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e=this._map,i=e.options.zoomAnimation&&e.options.markerZoomAnimation,o=i?"leaflet-zoom-animated":"leaflet-zoom-hide",s=!1;this._icon||(this._icon=t.icon.createIcon(),t.title&&(this._icon.title=t.title),this._initInteraction(),s=1>this.options.opacity,n.DomUtil.addClass(this._icon,
o),t.riseOnHover&&n.DomEvent.on(this._icon,"mouseover",this._bringToFront,this).on(this._icon,"mouseout",this._resetZIndex,this)),this._shadow||(this._shadow=t.icon.createShadow(),this._shadow&&(n.DomUtil.addClass(this._shadow,o),s=1>this.options.opacity)),s&&this._updateOpacity();var a=this._map._panes;a.markerPane.appendChild(this._icon),this._shadow&&a.shadowPane.appendChild(this._shadow)},_removeIcon:function(){var t=this._map._panes;this.options.riseOnHover&&n.DomEvent.off(this._icon,"mouseover",this._bringToFront).off(this._icon,"mouseout",this._resetZIndex),t.markerPane.removeChild(this._icon),this._shadow&&t.shadowPane.removeChild(this._shadow),this._icon=this._shadow=null},_setPos:function(t){n.DomUtil.setPosition(this._icon,t),this._shadow&&n.DomUtil.setPosition(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon.style.zIndex=this._zIndex+t},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this
._latlng,t.zoom,t.center);this._setPos(e)},_initInteraction:function(){if(this.options.clickable){var t=this._icon,e=["dblclick","mousedown","mouseover","mouseout","contextmenu"];n.DomUtil.addClass(t,"leaflet-clickable"),n.DomEvent.on(t,"click",this._onMouseClick,this);for(var i=0;e.length>i;i++)n.DomEvent.on(t,e[i],this._fireMouseEvent,this);n.Handler.MarkerDrag&&(this.dragging=new n.Handler.MarkerDrag(this),this.options.draggable&&this.dragging.enable())}},_onMouseClick:function(t){var e=this.dragging&&this.dragging.moved();(this.hasEventListeners(t.type)||e)&&n.DomEvent.stopPropagation(t),e||(this.dragging&&this.dragging._enabled||!this._map.dragging||!this._map.dragging.moved())&&this.fire(t.type,{originalEvent:t})},_fireMouseEvent:function(t){this.fire(t.type,{originalEvent:t}),"contextmenu"===t.type&&this.hasEventListeners(t.type)&&n.DomEvent.preventDefault(t),"mousedown"!==t.type&&n.DomEvent.stopPropagation(t)},setOpacity:function(t){this.options.opacity=t,this._map&&this._up
dateOpacity()},_updateOpacity:function(){n.DomUtil.setOpacity(this._icon,this.options.opacity),this._shadow&&n.DomUtil.setOpacity(this._shadow,this.options.opacity)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)}}),n.marker=function(t,e){return new n.Marker(t,e)},n.DivIcon=n.Icon.extend({options:{iconSize:new n.Point(12,12),className:"leaflet-div-icon"},createIcon:function(){var t=e.createElement("div"),i=this.options;return i.html&&(t.innerHTML=i.html),i.bgPos&&(t.style.backgroundPosition=-i.bgPos.x+"px "+-i.bgPos.y+"px"),this._setIconStyles(t,"icon"),t},createShadow:function(){return null}}),n.divIcon=function(t){return new n.DivIcon(t)},n.Map.mergeOptions({closePopupOnClick:!0}),n.Popup=n.Class.extend({includes:n.Mixin.Events,options:{minWidth:50,maxWidth:300,maxHeight:null,autoPan:!0,closeButton:!0,offset:new n.Point(0,6),autoPanPadding:new n.Point(5,5),className:"",zoomAnimation:!0},initialize:function(t,e){n
.setOptions(this,t),this._source=e,this._animated=n.Browser.any3d&&this.options.zoomAnimation},onAdd:function(t){this._map=t,this._container||this._initLayout(),this._updateContent();var e=t.options.fadeAnimation;e&&n.DomUtil.setOpacity(this._container,0),t._panes.popupPane.appendChild(this._container),t.on("viewreset",this._updatePosition,this),this._animated&&t.on("zoomanim",this._zoomAnimation,this),t.options.closePopupOnClick&&t.on("preclick",this._close,this),this._update(),e&&n.DomUtil.setOpacity(this._container,1)},addTo:function(t){return t.addLayer(this),this},openOn:function(t){return t.openPopup(this),this},onRemove:function(t){t._panes.popupPane.removeChild(this._container),n.Util.falseFn(this._container.offsetWidth),t.off({viewreset:this._updatePosition,preclick:this._close,zoomanim:this._zoomAnimation},this),t.options.fadeAnimation&&n.DomUtil.setOpacity(this._container,0),this._map=null},setLatLng:function(t){return this._latlng=n.latLng(t),this._update(),this},setCont
ent:function(t){return this._content=t,this._update(),this},_close:function(){var t=this._map;t&&(t._popup=null,t.removeLayer(this).fire("popupclose",{popup:this}))},_initLayout:function(){var t,e="leaflet-popup",i=e+" "+this.options.className+" leaflet-zoom-"+(this._animated?"animated":"hide"),o=this._container=n.DomUtil.create("div",i);this.options.closeButton&&(t=this._closeButton=n.DomUtil.create("a",e+"-close-button",o),t.href="#close",t.innerHTML="×",n.DomEvent.on(t,"click",this._onCloseButtonClick,this));var s=this._wrapper=n.DomUtil.create("div",e+"-content-wrapper",o);n.DomEvent.disableClickPropagation(s),this._contentNode=n.DomUtil.create("div",e+"-content",s),n.DomEvent.on(this._contentNode,"mousewheel",n.DomEvent.stopPropagation),this._tipContainer=n.DomUtil.create("div",e+"-tip-container",o),this._tip=n.DomUtil.create("div",e+"-tip",this._tipContainer)},_update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout
(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},_updateContent:function(){if(this._content){if("string"==typeof this._content)this._contentNode.innerHTML=this._content;else{for(;this._contentNode.hasChildNodes();)this._contentNode.removeChild(this._contentNode.firstChild);this._contentNode.appendChild(this._content)}this.fire("contentupdate")}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var i=t.offsetWidth;i=Math.min(i,this.options.maxWidth),i=Math.max(i,this.options.minWidth),e.width=i+1+"px",e.whiteSpace="",e.height="";var o=t.offsetHeight,s=this.options.maxHeight,a="leaflet-popup-scrolled";s&&o>s?(e.height=s+"px",n.DomUtil.addClass(t,a)):n.DomUtil.removeClass(t,a),this._containerWidth=this._container.offsetWidth},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=this._animated,i=this.options.offset;e&&n.DomUtil.setPosition(this._container,t),this._container
Bottom=-i.y-(e?0:t.y),this._containerLeft=-Math.round(this._containerWidth/2)+i.x+(e?0:t.x),this._container.style.bottom=this._containerBottom+"px",this._container.style.left=this._containerLeft+"px"}},_zoomAnimation:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);n.DomUtil.setPosition(this._container,e)},_adjustPan:function(){if(this.options.autoPan){var t=this._map,e=this._container.offsetHeight,i=this._containerWidth,o=new n.Point(this._containerLeft,-e-this._containerBottom);this._animated&&o._add(n.DomUtil.getPosition(this._container));var s=t.layerPointToContainerPoint(o),a=this.options.autoPanPadding,r=t.getSize(),h=0,l=0;0>s.x&&(h=s.x-a.x),s.x+i>r.x&&(h=s.x+i-r.x+a.x),0>s.y&&(l=s.y-a.y),s.y+e>r.y&&(l=s.y+e-r.y+a.y),(h||l)&&t.panBy(new n.Point(h,l))}},_onCloseButtonClick:function(t){this._close(),n.DomEvent.stop(t)}}),n.popup=function(t,e){return new n.Popup(t,e)},n.Marker.include({openPopup:function(){return this._popup&&this._map&&(this._pop
up.setLatLng(this._latlng),this._map.openPopup(this._popup)),this},closePopup:function(){return this._popup&&this._popup._close(),this},bindPopup:function(t,e){var i=n.point(this.options.icon.options.popupAnchor)||new n.Point(0,0);return i=i.add(n.Popup.prototype.options.offset),e&&e.offset&&(i=i.add(e.offset)),e=n.extend({offset:i},e),this._popup||this.on("click",this.openPopup,this).on("remove",this.closePopup,this).on("move",this._movePopup,this),this._popup=new n.Popup(e,this).setContent(t),this},unbindPopup:function(){return this._popup&&(this._popup=null,this.off("click",this.openPopup).off("remove",this.closePopup).off("move",this._movePopup)),this},_movePopup:function(t){this._popup.setLatLng(t.latlng)}}),n.Map.include({openPopup:function(t){return this.closePopup(),this._popup=t,this.addLayer(t).fire("popupopen",{popup:this._popup})},closePopup:function(){return this._popup&&this._popup._close(),this}}),n.LayerGroup=n.Class.extend({initialize:function(t){this._layers={};var
e,i;if(t)for(e=0,i=t.length;i>e;e++)this.addLayer(t[e])},addLayer:function(t){var e=n.stamp(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=n.stamp(t);return delete this._layers[e],this._map&&this._map.removeLayer(t),this},clearLayers:function(){return this.eachLayer(this.removeLayer,this),this},invoke:function(t){var e,i,n=Array.prototype.slice.call(arguments,1);for(e in this._layers)this._layers.hasOwnProperty(e)&&(i=this._layers[e],i[t]&&i[t].apply(i,n));return this},onAdd:function(t){this._map=t,this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t),this._map=null},addTo:function(t){return t.addLayer(this),this},eachLayer:function(t,e){for(var i in this._layers)this._layers.hasOwnProperty(i)&&t.call(e,this._layers[i])},setZIndex:function(t){return this.invoke("setZIndex",t)}}),n.layerGroup=function(t){return new n.LayerGroup(t)},n.FeatureGroup=n.LayerGroup.extend({includes:n.Mixin.Events,statics:{EVENT
S:"click dblclick mouseover mouseout mousemove contextmenu"},addLayer:function(t){return this._layers[n.stamp(t)]?this:(t.on(n.FeatureGroup.EVENTS,this._propagateEvent,this),n.LayerGroup.prototype.addLayer.call(this,t),this._popupContent&&t.bindPopup&&t.bindPopup(this._popupContent,this._popupOptions),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return t.off(n.FeatureGroup.EVENTS,this._propagateEvent,this),n.LayerGroup.prototype.removeLayer.call(this,t),this._popupContent&&this.invoke("unbindPopup"),this.fire("layerremove",{layer:t})},bindPopup:function(t,e){return this._popupContent=t,this._popupOptions=e,this.invoke("bindPopup",t,e)},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new n.LatLngBounds;return this.eachLayer(function(e){t.extend(e instanceof n.Marker?e.getLatLng():e.getBounds())}),t},_propagateEvent:functi
on(t){t.layer=t.target,t.target=this,this.fire(t.type,t)}}),n.featureGroup=function(t){return new n.FeatureGroup(t)},n.Path=n.Class.extend({includes:[n.Mixin.Events],statics:{CLIP_PADDING:n.Browser.mobile?Math.max(0,Math.min(.5,(1280/Math.max(t.innerWidth,t.innerHeight)-1)/2)):.5},options:{stroke:!0,color:"#0033ff",dashArray:null,weight:5,opacity:.5,fill:!1,fillColor:null,fillOpacity:.2,clickable:!0},initialize:function(t){n.setOptions(this,t)},onAdd:function(t){this._map=t,this._container||(this._initElements(),this._initEvents()),this.projectLatlngs(),this._updatePath(),this._container&&this._map._pathRoot.appendChild(this._container),this.fire("add"),t.on({viewreset:this.projectLatlngs,moveend:this._updatePath},this)},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){t._pathRoot.removeChild(this._container),this.fire("remove"),this._map=null,n.Browser.vml&&(this._container=null,this._stroke=null,this._fill=null),t.off({viewreset:this.projectLatlngs,moveend:this
._updatePath},this)},projectLatlngs:function(){},setStyle:function(t){return n.setOptions(this,t),this._container&&this._updateStyle(),this},redraw:function(){return this._map&&(this.projectLatlngs(),this._updatePath()),this}}),n.Map.include({_updatePathViewport:function(){var t=n.Path.CLIP_PADDING,e=this.getSize(),i=n.DomUtil.getPosition(this._mapPane),o=i.multiplyBy(-1)._subtract(e.multiplyBy(t)._round()),s=o.add(e.multiplyBy(1+2*t)._round());this._pathViewport=new n.Bounds(o,s)}}),n.Path.SVG_NS="http://www.w3.org/2000/svg",n.Browser.svg=!(!e.createElementNS||!e.createElementNS(n.Path.SVG_NS,"svg").createSVGRect),n.Path=n.Path.extend({statics:{SVG:n.Browser.svg},bringToFront:function(){var t=this._map._pathRoot,e=this._container;return e&&t.lastChild!==e&&t.appendChild(e),this},bringToBack:function(){var t=this._map._pathRoot,e=this._container,i=t.firstChild;return e&&i!==e&&t.insertBefore(e,i),this},getPathString:function(){},_createElement:function(t){return e.createElementNS(n.
Path.SVG_NS,t)},_initElements:function(){this._map._initPathRoot(),this._initPath(),this._initStyle()},_initPath:function(){this._container=this._createElement("g"),this._path=this._createElement("path"),this._container.appendChild(this._path)},_initStyle:function(){this.options.stroke&&(this._path.setAttribute("stroke-linejoin","round"),this._path.setAttribute("stroke-linecap","round")),this.options.fill&&this._path.setAttribute("fill-rule","evenodd"),this._updateStyle()},_updateStyle:function(){this.options.stroke?(this._path.setAttribute("stroke",this.options.color),this._path.setAttribute("stroke-opacity",this.options.opacity),this._path.setAttribute("stroke-width",this.options.weight),this.options.dashArray?this._path.setAttribute("stroke-dasharray",this.options.dashArray):this._path.removeAttribute("stroke-dasharray")):this._path.setAttribute("stroke","none"),this.options.fill?(this._path.setAttribute("fill",this.options.fillColor||this.options.color),this._path.setAttribute("
fill-opacity",this.options.fillOpacity)):this._path.setAttribute("fill","none")},_updatePath:function(){var t=this.getPathString();t||(t="M0 0"),this._path.setAttribute("d",t)},_initEvents:function(){if(this.options.clickable){(n.Browser.svg||!n.Browser.vml)&&this._path.setAttribute("class","leaflet-clickable"),n.DomEvent.on(this._container,"click",this._onMouseClick,this);for(var t=["dblclick","mousedown","mouseover","mouseout","mousemove","contextmenu"],e=0;t.length>e;e++)n.DomEvent.on(this._container,t[e],this._fireMouseEvent,this)}},_onMouseClick:function(t){this._map.dragging&&this._map.dragging.moved()||this._fireMouseEvent(t)},_fireMouseEvent:function(t){if(this.hasEventListeners(t.type)){var e=this._map,i=e.mouseEventToContainerPoint(t),o=e.containerPointToLayerPoint(i),s=e.layerPointToLatLng(o);this.fire(t.type,{latlng:s,layerPoint:o,containerPoint:i,originalEvent:t}),"contextmenu"===t.type&&n.DomEvent.preventDefault(t),"mousemove"!==t.type&&n.DomEvent.stopPropagation(t)}}}
),n.Map.include({_initPathRoot:function(){this._pathRoot||(this._pathRoot=n.Path.prototype._createElement("svg"),this._panes.overlayPane.appendChild(this._pathRoot),this.options.zoomAnimation&&n.Browser.any3d?(this._pathRoot.setAttribute("class"," leaflet-zoom-animated"),this.on({zoomanim:this._animatePathZoom,zoomend:this._endPathZoom})):this._pathRoot.setAttribute("class"," leaflet-zoom-hide"),this.on("moveend",this._updateSvgViewport),this._updateSvgViewport())},_animatePathZoom:function(t){var e=this.getZoomScale(t.zoom),i=this._getCenterOffset(t.center)._multiplyBy(-e)._add(this._pathViewport.min);this._pathRoot.style[n.DomUtil.TRANSFORM]=n.DomUtil.getTranslateString(i)+" scale("+e+") ",this._pathZooming=!0},_endPathZoom:function(){this._pathZooming=!1},_updateSvgViewport:function(){if(!this._pathZooming){this._updatePathViewport();var t=this._pathViewport,e=t.min,i=t.max,o=i.x-e.x,s=i.y-e.y,a=this._pathRoot,r=this._panes.overlayPane;n.Browser.mobileWebkit&&r.removeChild(a),n.D
omUtil.setPosition(a,e),a.setAttribute("width",o),a.setAttribute("height",s),a.setAttribute("viewBox",[e.x,e.y,o,s].join(" ")),n.Browser.mobileWebkit&&r.appendChild(a)}}}),n.Path.include({bindPopup:function(t,e){return(!this._popup||e)&&(this._popup=new n.Popup(e,this)),this._popup.setContent(t),this._popupHandlersAdded||(this.on("click",this._openPopup,this).on("remove",this.closePopup,this),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this._popup=null,this.off("click",this._openPopup).off("remove",this.closePopup),this._popupHandlersAdded=!1),this},openPopup:function(t){return this._popup&&(t=t||this._latlng||this._latlngs[Math.floor(this._latlngs.length/2)],this._openPopup({latlng:t})),this},closePopup:function(){return this._popup&&this._popup._close(),this},_openPopup:function(t){this._popup.setLatLng(t.latlng),this._map.openPopup(this._popup)}}),n.Browser.vml=!n.Browser.svg&&function(){try{var t=e.createElement("div");t.innerHTML='<v:shape adj
="1"/>';var i=t.firstChild;return i.style.behavior="url(#default#VML)",i&&"object"==typeof i.adj}catch(n){return!1}}(),n.Path=n.Browser.svg||!n.Browser.vml?n.Path:n.Path.extend({statics:{VML:!0,CLIP_PADDING:.02},_createElement:function(){try{return e.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return e.createElement("<lvml:"+t+' class="lvml">')}}catch(t){return function(t){return e.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),_initPath:function(){var t=this._container=this._createElement("shape");n.DomUtil.addClass(t,"leaflet-vml-shape"),this.options.clickable&&n.DomUtil.addClass(t,"leaflet-clickable"),t.coordsize="1 1",this._path=this._createElement("path"),t.appendChild(this._path),this._map._pathRoot.appendChild(t)},_initStyle:function(){this._updateStyle()},_updateStyle:function(){var t=this._stroke,e=this._fill,i=this.options,n=this._container;n.stroked=i.stroke,n.filled=i.fill,i.stroke?(t||(t=this._stroke=this._createE
lement("stroke"),t.endcap="round",n.appendChild(t)),t.weight=i.weight+"px",t.color=i.color,t.opacity=i.opacity,t.dashStyle=i.dashArray?i.dashArray instanceof Array?i.dashArray.join(" "):i.dashArray.replace(/ *, */g," "):""):t&&(n.removeChild(t),this._stroke=null),i.fill?(e||(e=this._fill=this._createElement("fill"),n.appendChild(e)),e.color=i.fillColor||i.color,e.opacity=i.fillOpacity):e&&(n.removeChild(e),this._fill=null)},_updatePath:function(){var t=this._container.style;t.display="none",this._path.v=this.getPathString()+" ",t.display=""}}),n.Map.include(n.Browser.svg||!n.Browser.vml?{}:{_initPathRoot:function(){if(!this._pathRoot){var t=this._pathRoot=e.createElement("div");t.className="leaflet-vml-container",this._panes.overlayPane.appendChild(t),this.on("moveend",this._updatePathViewport),this._updatePathViewport()}}}),n.Browser.canvas=function(){return!!e.createElement("canvas").getContext}(),n.Path=n.Path.SVG&&!t.L_PREFER_CANVAS||!n.Browser.canvas?n.Path:n.Path.extend({stati
cs:{CANVAS:!0,SVG:!1},redraw:function(){return this._map&&(this.projectLatlngs(),this._requestUpdate()),this},setStyle:function(t){return n.setOptions(this,t),this._map&&(this._updateStyle(),this._requestUpdate()),this},onRemove:function(t){t.off("viewreset",this.projectLatlngs,this).off("moveend",this._updatePath,this),this.options.clickable&&this._map.off("click",this._onClick,this),this._requestUpdate(),this._map=null},_requestUpdate:function(){this._map&&!n.Path._updateRequest&&(n.Path._updateRequest=n.Util.requestAnimFrame(this._fireMapMoveEnd,this._map))},_fireMapMoveEnd:function(){n.Path._updateRequest=null,this.fire("moveend")},_initElements:function(){this._map._initPathRoot(),this._ctx=this._map._canvasCtx},_updateStyle:function(){var t=this.options;t.stroke&&(this._ctx.lineWidth=t.weight,this._ctx.strokeStyle=t.color),t.fill&&(this._ctx.fillStyle=t.fillColor||t.color)},_drawPath:function(){var t,e,i,o,s,a;for(this._ctx.beginPath(),t=0,i=this._parts.length;i>t;t++){for(e=0
,o=this._parts[t].length;o>e;e++)s=this._parts[t][e],a=(0===e?"move":"line")+"To",this._ctx[a](s.x,s.y);this instanceof n.Polygon&&this._ctx.closePath()}},_checkIfEmpty:function(){return!this._parts.length},_updatePath:function(){if(!this._checkIfEmpty()){var t=this._ctx,e=this.options;this._drawPath(),t.save(),this._updateStyle(),e.fill&&(t.globalAlpha=e.fillOpacity,t.fill()),e.stroke&&(t.globalAlpha=e.opacity,t.stroke()),t.restore()}},_initEvents:function(){this.options.clickable&&this._map.on("click",this._onClick,this)},_onClick:function(t){this._containsPoint(t.layerPoint)&&this.fire("click",{latlng:t.latlng,layerPoint:t.layerPoint,containerPoint:t.containerPoint,originalEvent:t})}}),n.Map.include(n.Path.SVG&&!t.L_PREFER_CANVAS||!n.Browser.canvas?{}:{_initPathRoot:function(){var t,i=this._pathRoot;i||(i=this._pathRoot=e.createElement("canvas"),i.style.position="absolute",t=this._canvasCtx=i.getContext("2d"),t.lineCap="round",t.lineJoin="round",this._panes.overlayPane.appendChil
d(i),this.options.zoomAnimation&&(this._pathRoot.className="leaflet-zoom-animated",this.on("zoomanim",this._animatePathZoom),this.on("zoomend",this._endPathZoom)),this.on("moveend",this._updateCanvasViewport),this._updateCanvasViewport())},_updateCanvasViewport:function(){if(!this._pathZooming){this._updatePathViewport();var t=this._pathViewport,e=t.min,i=t.max.subtract(e),o=this._pathRoot;n.DomUtil.setPosition(o,e),o.width=i.x,o.height=i.y,o.getContext("2d").translate(-e.x,-e.y)}}}),n.LineUtil={simplify:function(t,e){if(!e||!t.length)return t.slice();var i=e*e;return t=this._reducePoints(t,i),t=this._simplifyDP(t,i)},pointToSegmentDistance:function(t,e,i){return Math.sqrt(this._sqClosestPointOnSegment(t,e,i,!0))},closestPointOnSegment:function(t,e,i){return this._sqClosestPointOnSegment(t,e,i)},_simplifyDP:function(t,e){var n=t.length,o=typeof Uint8Array!=i+""?Uint8Array:Array,s=new o(n);s[0]=s[n-1]=1,this._simplifyDPStep(t,s,e,0,n-1);var a,r=[];for(a=0;n>a;a++)s[a]&&r.push(t[a]);r
eturn r},_simplifyDPStep:function(t,e,i,n,o){var s,a,r,h=0;for(a=n+1;o-1>=a;a++)r=this._sqClosestPointOnSegment(t[a],t[n],t[o],!0),r>h&&(s=a,h=r);h>i&&(e[s]=1,this._simplifyDPStep(t,e,i,n,s),this._simplifyDPStep(t,e,i,s,o))},_reducePoints:function(t,e){for(var i=[t[0]],n=1,o=0,s=t.length;s>n;n++)this._sqDist(t[n],t[o])>e&&(i.push(t[n]),o=n);return s-1>o&&i.push(t[s-1]),i},clipSegment:function(t,e,i,n){var o,s,a,r=n?this._lastCode:this._getBitCode(t,i),h=this._getBitCode(e,i);for(this._lastCode=h;;){if(!(r|h))return[t,e];if(r&h)return!1;o=r||h,s=this._getEdgeIntersection(t,e,o,i),a=this._getBitCode(s,i),o===r?(t=s,r=a):(e=s,h=a)}},_getEdgeIntersection:function(t,e,o,s){var a=e.x-t.x,r=e.y-t.y,h=s.min,l=s.max;return 8&o?new n.Point(t.x+a*(l.y-t.y)/r,l.y):4&o?new n.Point(t.x+a*(h.y-t.y)/r,h.y):2&o?new n.Point(l.x,t.y+r*(l.x-t.x)/a):1&o?new n.Point(h.x,t.y+r*(h.x-t.x)/a):i},_getBitCode:function(t,e){var i=0;return t.x<e.min.x?i|=1:t.x>e.max.x&&(i|=2),t.y<e.min.y?i|=4:t.y>e.max.y&&(i|=8)
,i},_sqDist:function(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n},_sqClosestPointOnSegment:function(t,e,i,o){var s,a=e.x,r=e.y,h=i.x-a,l=i.y-r,u=h*h+l*l;return u>0&&(s=((t.x-a)*h+(t.y-r)*l)/u,s>1?(a=i.x,r=i.y):s>0&&(a+=h*s,r+=l*s)),h=t.x-a,l=t.y-r,o?h*h+l*l:new n.Point(a,r)}},n.Polyline=n.Path.extend({initialize:function(t,e){n.Path.prototype.initialize.call(this,e),this._latlngs=this._convertLatLngs(t)},options:{smoothFactor:1,noClip:!1},projectLatlngs:function(){this._originalPoints=[];for(var t=0,e=this._latlngs.length;e>t;t++)this._originalPoints[t]=this._map.latLngToLayerPoint(this._latlngs[t])},getPathString:function(){for(var t=0,e=this._parts.length,i="";e>t;t++)i+=this._getPathPartStr(this._parts[t]);return i},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._latlngs=this._convertLatLngs(t),this.redraw()},addLatLng:function(t){return this._latlngs.push(n.latLng(t)),this.redraw()},spliceLatLngs:function(){var t=[].splice.apply(this._latlngs,argu
ments);return this._convertLatLngs(this._latlngs),this.redraw(),t},closestLayerPoint:function(t){for(var e,i,o=1/0,s=this._parts,a=null,r=0,h=s.length;h>r;r++)for(var l=s[r],u=1,c=l.length;c>u;u++){e=l[u-1],i=l[u];
-var _=n.LineUtil._sqClosestPointOnSegment(t,e,i,!0);o>_&&(o=_,a=n.LineUtil._sqClosestPointOnSegment(t,e,i))}return a&&(a.distance=Math.sqrt(o)),a},getBounds:function(){var t,e,i=new n.LatLngBounds,o=this.getLatLngs();for(t=0,e=o.length;e>t;t++)i.extend(o[t]);return i},_convertLatLngs:function(t){var e,i;for(e=0,i=t.length;i>e;e++){if(n.Util.isArray(t[e])&&"number"!=typeof t[e][0])return;t[e]=n.latLng(t[e])}return t},_initEvents:function(){n.Path.prototype._initEvents.call(this)},_getPathPartStr:function(t){for(var e,i=n.Path.VML,o=0,s=t.length,a="";s>o;o++)e=t[o],i&&e._round(),a+=(o?"L":"M")+e.x+" "+e.y;return a},_clipPoints:function(){var t,e,o,s=this._originalPoints,a=s.length;if(this.options.noClip)return this._parts=[s],i;this._parts=[];var r=this._parts,h=this._map._pathViewport,l=n.LineUtil;for(t=0,e=0;a-1>t;t++)o=l.clipSegment(s[t],s[t+1],h,t),o&&(r[e]=r[e]||[],r[e].push(o[0]),(o[1]!==s[t+1]||t===a-2)&&(r[e].push(o[1]),e++))},_simplifyPoints:function(){for(var t=this._parts,e
=n.LineUtil,i=0,o=t.length;o>i;i++)t[i]=e.simplify(t[i],this.options.smoothFactor)},_updatePath:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),n.Path.prototype._updatePath.call(this))}}),n.polyline=function(t,e){return new n.Polyline(t,e)},n.PolyUtil={},n.PolyUtil.clipPolygon=function(t,e){var i,o,s,a,r,h,l,u,c,_=[1,4,2,8],d=n.LineUtil;for(o=0,l=t.length;l>o;o++)t[o]._code=d._getBitCode(t[o],e);for(a=0;4>a;a++){for(u=_[a],i=[],o=0,l=t.length,s=l-1;l>o;s=o++)r=t[o],h=t[s],r._code&u?h._code&u||(c=d._getEdgeIntersection(h,r,u,e),c._code=d._getBitCode(c,e),i.push(c)):(h._code&u&&(c=d._getEdgeIntersection(h,r,u,e),c._code=d._getBitCode(c,e),i.push(c)),i.push(r));t=i}return t},n.Polygon=n.Polyline.extend({options:{fill:!0},initialize:function(t,e){n.Polyline.prototype.initialize.call(this,t,e),t&&n.Util.isArray(t[0])&&"number"!=typeof t[0][0]&&(this._latlngs=this._convertLatLngs(t[0]),this._holes=t.slice(1))},projectLatlngs:function(){if(n.Polyline.prototype.projectLatln
gs.call(this),this._holePoints=[],this._holes){var t,e,i,o;for(t=0,i=this._holes.length;i>t;t++)for(this._holePoints[t]=[],e=0,o=this._holes[t].length;o>e;e++)this._holePoints[t][e]=this._map.latLngToLayerPoint(this._holes[t][e])}},_clipPoints:function(){var t=this._originalPoints,e=[];if(this._parts=[t].concat(this._holePoints),!this.options.noClip){for(var i=0,o=this._parts.length;o>i;i++){var s=n.PolyUtil.clipPolygon(this._parts[i],this._map._pathViewport);s.length&&e.push(s)}this._parts=e}},_getPathPartStr:function(t){var e=n.Polyline.prototype._getPathPartStr.call(this,t);return e+(n.Browser.svg?"z":"x")}}),n.polygon=function(t,e){return new n.Polygon(t,e)},function(){function t(t){return n.FeatureGroup.extend({initialize:function(t,e){this._layers={},this._options=e,this.setLatLngs(t)},setLatLngs:function(e){var i=0,n=e.length;for(this.eachLayer(function(t){n>i?t.setLatLngs(e[i++]):this.removeLayer(t)},this);n>i;)this.addLayer(new t(e[i++],this._options));return this}})}n.Mult
iPolyline=t(n.Polyline),n.MultiPolygon=t(n.Polygon),n.multiPolyline=function(t,e){return new n.MultiPolyline(t,e)},n.multiPolygon=function(t,e){return new n.MultiPolygon(t,e)}}(),n.Rectangle=n.Polygon.extend({initialize:function(t,e){n.Polygon.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=n.latLngBounds(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}}),n.rectangle=function(t,e){return new n.Rectangle(t,e)},n.Circle=n.Path.extend({initialize:function(t,e,i){n.Path.prototype.initialize.call(this,i),this._latlng=n.latLng(t),this._mRadius=e},options:{fill:!0},setLatLng:function(t){return this._latlng=n.latLng(t),this.redraw()},setRadius:function(t){return this._mRadius=t,this.redraw()},projectLatlngs:function(){var t=this._getLngRadius(),e=new n.LatLng(this._latlng.lat,this._latlng.lng-t),i=this._map.latLngToLayerPoint(e);this._point=this._map.la
tLngToLayerPoint(this._latlng),this._radius=Math.max(Math.round(this._point.x-i.x),1)},getBounds:function(){var t=this._getLngRadius(),e=360*(this._mRadius/40075017),i=this._latlng,o=new n.LatLng(i.lat-e,i.lng-t),s=new n.LatLng(i.lat+e,i.lng+t);return new n.LatLngBounds(o,s)},getLatLng:function(){return this._latlng},getPathString:function(){var t=this._point,e=this._radius;return this._checkIfEmpty()?"":n.Browser.svg?"M"+t.x+","+(t.y-e)+"A"+e+","+e+",0,1,1,"+(t.x-.1)+","+(t.y-e)+" z":(t._round(),e=Math.round(e),"AL "+t.x+","+t.y+" "+e+","+e+" 0,"+23592600)},getRadius:function(){return this._mRadius},_getLatRadius:function(){return 360*(this._mRadius/40075017)},_getLngRadius:function(){return this._getLatRadius()/Math.cos(n.LatLng.DEG_TO_RAD*this._latlng.lat)},_checkIfEmpty:function(){if(!this._map)return!1;var t=this._map._pathViewport,e=this._radius,i=this._point;return i.x-e>t.max.x||i.y-e>t.max.y||i.x+e<t.min.x||i.y+e<t.min.y}}),n.circle=function(t,e,i){return new n.Circle(t,e,i
)},n.CircleMarker=n.Circle.extend({options:{radius:10,weight:2},initialize:function(t,e){n.Circle.prototype.initialize.call(this,t,null,e),this._radius=this.options.radius},projectLatlngs:function(){this._point=this._map.latLngToLayerPoint(this._latlng)},_updateStyle:function(){n.Circle.prototype._updateStyle.call(this),this.setRadius(this.options.radius)},setRadius:function(t){return this._radius=t,this.redraw()}}),n.circleMarker=function(t,e){return new n.CircleMarker(t,e)},n.Polyline.include(n.Path.CANVAS?{_containsPoint:function(t,e){var i,o,s,a,r,h,l,u=this.options.weight/2;for(n.Browser.touch&&(u+=10),i=0,a=this._parts.length;a>i;i++)for(l=this._parts[i],o=0,r=l.length,s=r-1;r>o;s=o++)if((e||0!==o)&&(h=n.LineUtil.pointToSegmentDistance(t,l[s],l[o]),u>=h))return!0;return!1}}:{}),n.Polygon.include(n.Path.CANVAS?{_containsPoint:function(t){var e,i,o,s,a,r,h,l,u=!1;if(n.Polyline.prototype._containsPoint.call(this,t,!0))return!0;for(s=0,h=this._parts.length;h>s;s++)for(e=this._part
s[s],a=0,l=e.length,r=l-1;l>a;r=a++)i=e[a],o=e[r],i.y>t.y!=o.y>t.y&&t.x<(o.x-i.x)*(t.y-i.y)/(o.y-i.y)+i.x&&(u=!u);return u}}:{}),n.Circle.include(n.Path.CANVAS?{_drawPath:function(){var t=this._point;this._ctx.beginPath(),this._ctx.arc(t.x,t.y,this._radius,0,2*Math.PI,!1)},_containsPoint:function(t){var e=this._point,i=this.options.stroke?this.options.weight/2:0;return t.distanceTo(e)<=this._radius+i}}:{}),n.GeoJSON=n.FeatureGroup.extend({initialize:function(t,e){n.setOptions(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,o=n.Util.isArray(t)?t:t.features;if(o){for(e=0,i=o.length;i>e;e++)(o[e].geometries||o[e].geometry)&&this.addData(o[e]);return this}var s=this.options;if(!s.filter||s.filter(t)){var a=n.GeoJSON.geometryToLayer(t,s.pointToLayer);return a.feature=t,a.defaultOptions=a.options,this.resetStyle(a),s.onEachFeature&&s.onEachFeature(t,a),this.addLayer(a)}},resetStyle:function(t){var e=this.options.style;e&&(n.Util.extend(t.options,t.defaultOptions),t
his._setLayerStyle(t,e))},setStyle:function(t){this.eachLayer(function(e){this._setLayerStyle(e,t)},this)},_setLayerStyle:function(t,e){"function"==typeof e&&(e=e(t.feature)),t.setStyle&&t.setStyle(e)}}),n.extend(n.GeoJSON,{geometryToLayer:function(t,e){var i,o,s,a,r,h="Feature"===t.type?t.geometry:t,l=h.coordinates,u=[];switch(h.type){case"Point":return i=this.coordsToLatLng(l),e?e(t,i):new n.Marker(i);case"MultiPoint":for(s=0,a=l.length;a>s;s++)i=this.coordsToLatLng(l[s]),r=e?e(t,i):new n.Marker(i),u.push(r);return new n.FeatureGroup(u);case"LineString":return o=this.coordsToLatLngs(l),new n.Polyline(o);case"Polygon":return o=this.coordsToLatLngs(l,1),new n.Polygon(o);case"MultiLineString":return o=this.coordsToLatLngs(l,1),new n.MultiPolyline(o);case"MultiPolygon":return o=this.coordsToLatLngs(l,2),new n.MultiPolygon(o);case"GeometryCollection":for(s=0,a=h.geometries.length;a>s;s++)r=this.geometryToLayer({geometry:h.geometries[s],type:"Feature",properties:t.properties},e),u.push(
r);return new n.FeatureGroup(u);default:throw Error("Invalid GeoJSON object.")}},coordsToLatLng:function(t,e){var i=parseFloat(t[e?0:1]),o=parseFloat(t[e?1:0]);return new n.LatLng(i,o)},coordsToLatLngs:function(t,e,i){var n,o,s,a=[];for(o=0,s=t.length;s>o;o++)n=e?this.coordsToLatLngs(t[o],e-1,i):this.coordsToLatLng(t[o],i),a.push(n);return a}}),n.geoJson=function(t,e){return new n.GeoJSON(t,e)},n.DomEvent={addListener:function(t,e,o,s){var a,r,h,l=n.stamp(o),u="_leaflet_"+e+l;return t[u]?this:(a=function(e){return o.call(s||t,e||n.DomEvent._getEvent())},n.Browser.msTouch&&0===e.indexOf("touch")?this.addMsTouchListener(t,e,a,l):(n.Browser.touch&&"dblclick"===e&&this.addDoubleTapListener&&this.addDoubleTapListener(t,a,l),"addEventListener"in t?"mousewheel"===e?(t.addEventListener("DOMMouseScroll",a,!1),t.addEventListener(e,a,!1)):"mouseenter"===e||"mouseleave"===e?(r=a,h="mouseenter"===e?"mouseover":"mouseout",a=function(e){return n.DomEvent._checkMouse(t,e)?r(e):i},t.addEventListener
(h,a,!1)):t.addEventListener(e,a,!1):"attachEvent"in t&&t.attachEvent("on"+e,a),t[u]=a,this))},removeListener:function(t,e,i){var o=n.stamp(i),s="_leaflet_"+e+o,a=t[s];if(a)return n.Browser.msTouch&&0===e.indexOf("touch")?this.removeMsTouchListener(t,e,o):n.Browser.touch&&"dblclick"===e&&this.removeDoubleTapListener?this.removeDoubleTapListener(t,o):"removeEventListener"in t?"mousewheel"===e?(t.removeEventListener("DOMMouseScroll",a,!1),t.removeEventListener(e,a,!1)):"mouseenter"===e||"mouseleave"===e?t.removeEventListener("mouseenter"===e?"mouseover":"mouseout",a,!1):t.removeEventListener(e,a,!1):"detachEvent"in t&&t.detachEvent("on"+e,a),t[s]=null,this},stopPropagation:function(t){return t.stopPropagation?t.stopPropagation():t.cancelBubble=!0,this},disableClickPropagation:function(t){for(var e=n.DomEvent.stopPropagation,i=n.Draggable.START.length-1;i>=0;i--)n.DomEvent.addListener(t,n.Draggable.START[i],e);return n.DomEvent.addListener(t,"click",e).addListener(t,"dblclick",e)},prev
entDefault:function(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this},stop:function(t){return n.DomEvent.preventDefault(t).stopPropagation(t)},getMousePosition:function(t,i){var o=e.body,s=e.documentElement,a=t.pageX?t.pageX:t.clientX+o.scrollLeft+s.scrollLeft,r=t.pageY?t.pageY:t.clientY+o.scrollTop+s.scrollTop,h=new n.Point(a,r);return i?h._subtract(n.DomUtil.getViewportOffset(i)):h},getWheelDelta:function(t){var e=0;return t.wheelDelta&&(e=t.wheelDelta/120),t.detail&&(e=-t.detail/3),e},_checkMouse:function(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch(n){return!1}return i!==t},_getEvent:function(){var e=t.event;if(!e)for(var i=arguments.callee.caller;i&&(e=i.arguments[0],!e||t.Event!==e.constructor);)i=i.caller;return e}},n.DomEvent.on=n.DomEvent.addListener,n.DomEvent.off=n.DomEvent.removeListener,n.Draggable=n.Class.extend({includes:n.Mixin.Events,statics:{START:n.Browser.touch?["touchstart","mousedown"]:["mousedown"],END:{m
ousedown:"mouseup",touchstart:"touchend",MSPointerDown:"touchend"},MOVE:{mousedown:"mousemove",touchstart:"touchmove",MSPointerDown:"touchmove"},TAP_TOLERANCE:15},initialize:function(t,e,i){this._element=t,this._dragStartTarget=e||t,this._longPress=i&&!n.Browser.msTouch},enable:function(){if(!this._enabled){for(var t=n.Draggable.START.length-1;t>=0;t--)n.DomEvent.on(this._dragStartTarget,n.Draggable.START[t],this._onDown,this);this._enabled=!0}},disable:function(){if(this._enabled){for(var t=n.Draggable.START.length-1;t>=0;t--)n.DomEvent.off(this._dragStartTarget,n.Draggable.START[t],this._onDown,this);this._enabled=!1,this._moved=!1}},_onDown:function(t){if(!(!n.Browser.touch&&t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(n.DomEvent.preventDefault(t),n.DomEvent.stopPropagation(t),n.Draggable._disabled))){if(this._simulateClick=!0,t.touches&&t.touches.length>1)return this._simulateClick=!1,clearTimeout(this._longPressTimeout),i;var o=t.touches&&1===t.touches.length?t.touches[0
]:t,s=o.target;n.Browser.touch&&"a"===s.tagName.toLowerCase()&&n.DomUtil.addClass(s,"leaflet-active"),this._moved=!1,this._moving||(this._startPoint=new n.Point(o.clientX,o.clientY),this._startPos=this._newPos=n.DomUtil.getPosition(this._element),t.touches&&1===t.touches.length&&n.Browser.touch&&this._longPress&&(this._longPressTimeout=setTimeout(n.bind(function(){var t=this._newPos&&this._newPos.distanceTo(this._startPos)||0;n.Draggable.TAP_TOLERANCE>t&&(this._simulateClick=!1,this._onUp(),this._simulateEvent("contextmenu",o))},this),1e3)),n.DomEvent.on(e,n.Draggable.MOVE[t.type],this._onMove,this),n.DomEvent.on(e,n.Draggable.END[t.type],this._onUp,this))}},_onMove:function(t){if(!(t.touches&&t.touches.length>1)){var e=t.touches&&1===t.touches.length?t.touches[0]:t,i=new n.Point(e.clientX,e.clientY),o=i.subtract(this._startPoint);(o.x||o.y)&&(n.DomEvent.preventDefault(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=n.DomUtil.getPosition(this._element).subtract
(o),n.Browser.touch||(n.DomUtil.disableTextSelection(),this._setMovingCursor())),this._newPos=this._startPos.add(o),this._moving=!0,n.Util.cancelAnimFrame(this._animRequest),this._animRequest=n.Util.requestAnimFrame(this._updatePosition,this,!0,this._dragStartTarget))}},_updatePosition:function(){this.fire("predrag"),n.DomUtil.setPosition(this._element,this._newPos),this.fire("drag")},_onUp:function(t){var i;if(clearTimeout(this._longPressTimeout),this._simulateClick&&t.changedTouches){var o=t.changedTouches[0],s=o.target,a=this._newPos&&this._newPos.distanceTo(this._startPos)||0;"a"===s.tagName.toLowerCase()&&n.DomUtil.removeClass(s,"leaflet-active"),n.Draggable.TAP_TOLERANCE>a&&(i=o)}n.Browser.touch||(n.DomUtil.enableTextSelection(),this._restoreCursor());for(var r in n.Draggable.MOVE)n.Draggable.MOVE.hasOwnProperty(r)&&(n.DomEvent.off(e,n.Draggable.MOVE[r],this._onMove),n.DomEvent.off(e,n.Draggable.END[r],this._onUp));this._moved&&(n.Util.cancelAnimFrame(this._animRequest),this.f
ire("dragend")),this._moving=!1,i&&(this._moved=!1,this._simulateEvent("click",i))},_setMovingCursor:function(){n.DomUtil.addClass(e.body,"leaflet-dragging")},_restoreCursor:function(){n.DomUtil.removeClass(e.body,"leaflet-dragging")},_simulateEvent:function(i,n){var o=e.createEvent("MouseEvents");o.initMouseEvent(i,!0,!0,t,1,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),n.target.dispatchEvent(o)}}),n.Handler=n.Class.extend({initialize:function(t){this._map=t},enable:function(){this._enabled||(this._enabled=!0,this.addHooks())},disable:function(){this._enabled&&(this._enabled=!1,this.removeHooks())},enabled:function(){return!!this._enabled}}),n.Map.mergeOptions({dragging:!0,inertia:!n.Browser.android23,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,inertiaThreshold:n.Browser.touch?32:18,easeLinearity:.25,longPress:!0,worldCopyJump:!1}),n.Map.Drag=n.Handler.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new n.Draggable(t._mapPane,t._conta
iner,t.options.longPress),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDrag,this),t.on("viewreset",this._onViewReset,this))}this._draggable.enable()},removeHooks:function(){this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){var t=this._map;t._panAnim&&t._panAnim.stop(),t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(){if(this._map.options.inertia){var t=this._lastTime=+new Date,e=this._lastPos=this._draggable._newPos;this._positions.push(e),this._times.push(t),t-this._times[0]>200&&(this._positions.shift(),this._times.shift())}this._map.fire("move").fire("drag")},_onViewReset:function(){var t=this._map.getSize()._divideBy(2),e=this._map.latLngToLayerPoint(new n.LatLng(0,0));this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.
project(new n.LatLng(0,180)).x},_onPreDrag:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-e+i)%t+e-i,s=(n+e+i)%t-e-i,a=Math.abs(o+i)<Math.abs(s+i)?o:s;this._draggable._newPos.x=a},_onDragEnd:function(){var t=this._map,e=t.options,i=+new Date-this._lastTime,o=!e.inertia||i>e.inertiaThreshold||!this._positions[0];if(o)t.fire("moveend");else{var s=this._lastPos.subtract(this._positions[0]),a=(this._lastTime+i-this._times[0])/1e3,r=e.easeLinearity,h=s.multiplyBy(r/a),l=h.distanceTo(new n.Point(0,0)),u=Math.min(e.inertiaMaxSpeed,l),c=h.multiplyBy(u/l),_=u/(e.inertiaDeceleration*r),d=c.multiplyBy(-_/2).round();n.Util.requestAnimFrame(function(){t.panBy(d,_,r)})}t.fire("dragend"),e.maxBounds&&n.Util.requestAnimFrame(this._panInsideMaxBounds,t,!0,t._container)},_panInsideMaxBounds:function(){this.panInsideBounds(this.options.maxBounds)}}),n.Map.addInitHook("addHandler","dragging",n.Map.Drag),n.Map.mergeOptions({doubleClickZoom
:!0}),n.Map.DoubleClickZoom=n.Handler.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick)},_onDoubleClick:function(t){this.setView(t.latlng,this._zoom+1)}}),n.Map.addInitHook("addHandler","doubleClickZoom",n.Map.DoubleClickZoom),n.Map.mergeOptions({scrollWheelZoom:!0}),n.Map.ScrollWheelZoom=n.Handler.extend({addHooks:function(){n.DomEvent.on(this._map._container,"mousewheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){n.DomEvent.off(this._map._container,"mousewheel",this._onWheelScroll)},_onWheelScroll:function(t){var e=n.DomEvent.getWheelDelta(t);this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var i=Math.max(40-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(n.bind(this._performZoom,this),i),n.DomEvent.preventDefault(t),n.DomEvent.stopPropagation(t)},_performZoom:function
(){var t=this._map,e=this._delta,i=t.getZoom();if(e=e>0?Math.ceil(e):Math.round(e),e=Math.max(Math.min(e,4),-4),e=t._limitZoom(i+e)-i,this._delta=0,this._startTime=null,e){var n=i+e,o=this._getCenterForScrollWheelZoom(n);t.setView(o,n)}},_getCenterForScrollWheelZoom:function(t){var e=this._map,i=e.getZoomScale(t),n=e.getSize()._divideBy(2),o=this._lastMousePos._subtract(n)._multiplyBy(1-1/i),s=e._getTopLeftPoint()._add(n)._add(o);return e.unproject(s)}}),n.Map.addInitHook("addHandler","scrollWheelZoom",n.Map.ScrollWheelZoom),n.extend(n.DomEvent,{_touchstart:n.Browser.msTouch?"MSPointerDown":"touchstart",_touchend:n.Browser.msTouch?"MSPointerUp":"touchend",addDoubleTapListener:function(t,i,o){function s(t){var e;if(n.Browser.msTouch?(p.push(t.pointerId),e=p.length):e=t.touches.length,!(e>1)){var i=Date.now(),o=i-(r||i);h=t.touches?t.touches[0]:t,l=o>0&&u>=o,r=i}}function a(t){if(n.Browser.msTouch){var e=p.indexOf(t.pointerId);if(-1===e)return;p.splice(e,1)}if(l){if(n.Browser.msTouch)
{var o,s={};for(var a in h)o=h[a],s[a]="function"==typeof o?o.bind(h):o;h=s}h.type="dblclick",i(h),r=null}}var r,h,l=!1,u=250,c="_leaflet_",_=this._touchstart,d=this._touchend,p=[];t[c+_+o]=s,t[c+d+o]=a;var m=n.Browser.msTouch?e.documentElement:t;return t.addEventListener(_,s,!1),m.addEventListener(d,a,!1),n.Browser.msTouch&&m.addEventListener("MSPointerCancel",a,!1),this},removeDoubleTapListener:function(t,i){var o="_leaflet_";return t.removeEventListener(this._touchstart,t[o+this._touchstart+i],!1),(n.Browser.msTouch?e.documentElement:t).removeEventListener(this._touchend,t[o+this._touchend+i],!1),n.Browser.msTouch&&e.documentElement.removeEventListener("MSPointerCancel",t[o+this._touchend+i],!1),this}}),n.extend(n.DomEvent,{_msTouches:[],_msDocumentListener:!1,addMsTouchListener:function(t,e,i,n){switch(e){case"touchstart":return this.addMsTouchListenerStart(t,e,i,n);case"touchend":return this.addMsTouchListenerEnd(t,e,i,n);case"touchmove":return this.addMsTouchListenerMove(t,e,i
,n);default:throw"Unknown touch event type"}},addMsTouchListenerStart:function(t,i,n,o){var s="_leaflet_",a=this._msTouches,r=function(t){for(var e=!1,i=0;a.length>i;i++)if(a[i].pointerId===t.pointerId){e=!0;break}e||a.push(t),t.touches=a.slice(),t.changedTouches=[t],n(t)};if(t[s+"touchstart"+o]=r,t.addEventListener("MSPointerDown",r,!1),!this._msDocumentListener){var h=function(t){for(var e=0;a.length>e;e++)if(a[e].pointerId===t.pointerId){a.splice(e,1);break}};e.documentElement.addEventListener("MSPointerUp",h,!1),e.documentElement.addEventListener("MSPointerCancel",h,!1),this._msDocumentListener=!0}return this},addMsTouchListenerMove:function(t,e,i,n){function o(t){if(t.pointerType!==t.MSPOINTER_TYPE_MOUSE||0!==t.buttons){for(var e=0;a.length>e;e++)if(a[e].pointerId===t.pointerId){a[e]=t;break}t.touches=a.slice(),t.changedTouches=[t],i(t)}}var s="_leaflet_",a=this._msTouches;return t[s+"touchmove"+n]=o,t.addEventListener("MSPointerMove",o,!1),this},addMsTouchListenerEnd:function(
t,e,i,n){var o="_leaflet_",s=this._msTouches,a=function(t){for(var e=0;s.length>e;e++)if(s[e].pointerId===t.pointerId){s.splice(e,1);break}t.touches=s.slice(),t.changedTouches=[t],i(t)};return t[o+"touchend"+n]=a,t.addEventListener("MSPointerUp",a,!1),t.addEventListener("MSPointerCancel",a,!1),this},removeMsTouchListener:function(t,e,i){var n="_leaflet_",o=t[n+e+i];switch(e){case"touchstart":t.removeEventListener("MSPointerDown",o,!1);break;case"touchmove":t.removeEventListener("MSPointerMove",o,!1);break;case"touchend":t.removeEventListener("MSPointerUp",o,!1),t.removeEventListener("MSPointerCancel",o,!1)}return this}}),n.Map.mergeOptions({touchZoom:n.Browser.touch&&!n.Browser.android23}),n.Map.TouchZoom=n.Handler.extend({addHooks:function(){n.DomEvent.on(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){n.DomEvent.off(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var i=this._map;if(t.touches&&2===t.touches.le
ngth&&!i._animatingZoom&&!this._zooming){var o=i.mouseEventToLayerPoint(t.touches[0]),s=i.mouseEventToLayerPoint(t.touches[1]),a=i._getCenterLayerPoint();this._startCenter=o.add(s)._divideBy(2),this._startDist=o.distanceTo(s),this._moved=!1,this._zooming=!0,this._centerOffset=a.subtract(this._startCenter),i._panAnim&&i._panAnim.stop(),n.DomEvent.on(e,"touchmove",this._onTouchMove,this).on(e,"touchend",this._onTouchEnd,this),n.DomEvent.preventDefault(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length){var e=this._map,i=e.mouseEventToLayerPoint(t.touches[0]),o=e.mouseEventToLayerPoint(t.touches[1]);this._scale=i.distanceTo(o)/this._startDist,this._delta=i._add(o)._divideBy(2)._subtract(this._startCenter),1!==this._scale&&(this._moved||(n.DomUtil.addClass(e._mapPane,"leaflet-zoom-anim leaflet-touching"),e.fire("movestart").fire("zoomstart")._prepareTileBg(),this._moved=!0),n.Util.cancelAnimFrame(this._animRequest),this._animRequest=n.Util.requestAnimFrame(this._updateOnMo
ve,this,!0,this._map._container),n.DomEvent.preventDefault(t))}},_updateOnMove:function(){var t=this._map,e=this._getScaleOrigin(),i=t.layerPointToLatLng(e);t.fire("zoomanim",{center:i,zoom:t.getScaleZoom(this._scale)}),t._tileBg.style[n.DomUtil.TRANSFORM]=n.DomUtil.getTranslateString(this._delta)+" "+n.DomUtil.getScaleString(this._scale,this._startCenter)},_onTouchEnd:function(){if(this._moved&&this._zooming){var t=this._map;this._zooming=!1,n.DomUtil.removeClass(t._mapPane,"leaflet-touching"),n.DomEvent.off(e,"touchmove",this._onTouchMove).off(e,"touchend",this._onTouchEnd);var i=this._getScaleOrigin(),o=t.layerPointToLatLng(i),s=t.getZoom(),a=t.getScaleZoom(this._scale)-s,r=a>0?Math.ceil(a):Math.floor(a),h=t._limitZoom(s+r);t.fire("zoomanim",{center:o,zoom:h}),t._runAnimation(o,h,t.getZoomScale(h)/this._scale,i,!0)}},_getScaleOrigin:function(){var t=this._centerOffset.subtract(this._delta).divideBy(this._scale);return this._startCenter.add(t)}}),n.Map.addInitHook("addHandler","to
uchZoom",n.Map.TouchZoom),n.Map.mergeOptions({boxZoom:!0}),n.Map.BoxZoom=n.Handler.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane},addHooks:function(){n.DomEvent.on(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){n.DomEvent.off(this._container,"mousedown",this._onMouseDown)},_onMouseDown:function(t){return!t.shiftKey||1!==t.which&&1!==t.button?!1:(n.DomUtil.disableTextSelection(),this._startLayerPoint=this._map.mouseEventToLayerPoint(t),this._box=n.DomUtil.create("div","leaflet-zoom-box",this._pane),n.DomUtil.setPosition(this._box,this._startLayerPoint),this._container.style.cursor="crosshair",n.DomEvent.on(e,"mousemove",this._onMouseMove,this).on(e,"mouseup",this._onMouseUp,this).preventDefault(t),this._map.fire("boxzoomstart
<TRUNCATED>
[04/28] CLIMATE-512 - Replace frontend with new Yeoman/Grunt/Bower
frontend
Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/lib/angular/angular-mocks.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/test/lib/angular/angular-mocks.js b/ocw-ui/frontend/test/lib/angular/angular-mocks.js
deleted file mode 100755
index b6ecc79..0000000
--- a/ocw-ui/frontend/test/lib/angular/angular-mocks.js
+++ /dev/null
@@ -1,1764 +0,0 @@
-/**
- * @license AngularJS v1.0.5
- * (c) 2010-2012 Google, Inc. http://angularjs.org
- * License: MIT
- *
- * TODO(vojta): wrap whole file into closure during build
- */
-
-/**
- * @ngdoc overview
- * @name angular.mock
- * @description
- *
- * Namespace from 'angular-mocks.js' which contains testing related code.
- */
-angular.mock = {};
-
-/**
- * ! This is a private undocumented service !
- *
- * @name ngMock.$browser
- *
- * @description
- * This service is a mock implementation of {@link ng.$browser}. It provides fake
- * implementation for commonly used browser apis that are hard to test, e.g. setTimeout, xhr,
- * cookies, etc...
- *
- * The api of this service is the same as that of the real {@link ng.$browser $browser}, except
- * that there are several helper methods available which can be used in tests.
- */
-angular.mock.$BrowserProvider = function() {
- this.$get = function(){
- return new angular.mock.$Browser();
- };
-};
-
-angular.mock.$Browser = function() {
- var self = this;
-
- this.isMock = true;
- self.$$url = "http://server/";
- self.$$lastUrl = self.$$url; // used by url polling fn
- self.pollFns = [];
-
- // TODO(vojta): remove this temporary api
- self.$$completeOutstandingRequest = angular.noop;
- self.$$incOutstandingRequestCount = angular.noop;
-
-
- // register url polling fn
-
- self.onUrlChange = function(listener) {
- self.pollFns.push(
- function() {
- if (self.$$lastUrl != self.$$url) {
- self.$$lastUrl = self.$$url;
- listener(self.$$url);
- }
- }
- );
-
- return listener;
- };
-
- self.cookieHash = {};
- self.lastCookieHash = {};
- self.deferredFns = [];
- self.deferredNextId = 0;
-
- self.defer = function(fn, delay) {
- delay = delay || 0;
- self.deferredFns.push({time:(self.defer.now + delay), fn:fn, id: self.deferredNextId});
- self.deferredFns.sort(function(a,b){ return a.time - b.time;});
- return self.deferredNextId++;
- };
-
-
- self.defer.now = 0;
-
-
- self.defer.cancel = function(deferId) {
- var fnIndex;
-
- angular.forEach(self.deferredFns, function(fn, index) {
- if (fn.id === deferId) fnIndex = index;
- });
-
- if (fnIndex !== undefined) {
- self.deferredFns.splice(fnIndex, 1);
- return true;
- }
-
- return false;
- };
-
-
- /**
- * @name ngMock.$browser#defer.flush
- * @methodOf ngMock.$browser
- *
- * @description
- * Flushes all pending requests and executes the defer callbacks.
- *
- * @param {number=} number of milliseconds to flush. See {@link #defer.now}
- */
- self.defer.flush = function(delay) {
- if (angular.isDefined(delay)) {
- self.defer.now += delay;
- } else {
- if (self.deferredFns.length) {
- self.defer.now = self.deferredFns[self.deferredFns.length-1].time;
- } else {
- throw Error('No deferred tasks to be flushed');
- }
- }
-
- while (self.deferredFns.length && self.deferredFns[0].time <= self.defer.now) {
- self.deferredFns.shift().fn();
- }
- };
- /**
- * @name ngMock.$browser#defer.now
- * @propertyOf ngMock.$browser
- *
- * @description
- * Current milliseconds mock time.
- */
-
- self.$$baseHref = '';
- self.baseHref = function() {
- return this.$$baseHref;
- };
-};
-angular.mock.$Browser.prototype = {
-
-/**
- * @name ngMock.$browser#poll
- * @methodOf ngMock.$browser
- *
- * @description
- * run all fns in pollFns
- */
- poll: function poll() {
- angular.forEach(this.pollFns, function(pollFn){
- pollFn();
- });
- },
-
- addPollFn: function(pollFn) {
- this.pollFns.push(pollFn);
- return pollFn;
- },
-
- url: function(url, replace) {
- if (url) {
- this.$$url = url;
- return this;
- }
-
- return this.$$url;
- },
-
- cookies: function(name, value) {
- if (name) {
- if (value == undefined) {
- delete this.cookieHash[name];
- } else {
- if (angular.isString(value) && //strings only
- value.length <= 4096) { //strict cookie storage limits
- this.cookieHash[name] = value;
- }
- }
- } else {
- if (!angular.equals(this.cookieHash, this.lastCookieHash)) {
- this.lastCookieHash = angular.copy(this.cookieHash);
- this.cookieHash = angular.copy(this.cookieHash);
- }
- return this.cookieHash;
- }
- },
-
- notifyWhenNoOutstandingRequests: function(fn) {
- fn();
- }
-};
-
-
-/**
- * @ngdoc object
- * @name ngMock.$exceptionHandlerProvider
- *
- * @description
- * Configures the mock implementation of {@link ng.$exceptionHandler} to rethrow or to log errors passed
- * into the `$exceptionHandler`.
- */
-
-/**
- * @ngdoc object
- * @name ngMock.$exceptionHandler
- *
- * @description
- * Mock implementation of {@link ng.$exceptionHandler} that rethrows or logs errors passed
- * into it. See {@link ngMock.$exceptionHandlerProvider $exceptionHandlerProvider} for configuration
- * information.
- *
- *
- * <pre>
- * describe('$exceptionHandlerProvider', function() {
- *
- * it('should capture log messages and exceptions', function() {
- *
- * module(function($exceptionHandlerProvider) {
- * $exceptionHandlerProvider.mode('log');
- * });
- *
- * inject(function($log, $exceptionHandler, $timeout) {
- * $timeout(function() { $log.log(1); });
- * $timeout(function() { $log.log(2); throw 'banana peel'; });
- * $timeout(function() { $log.log(3); });
- * expect($exceptionHandler.errors).toEqual([]);
- * expect($log.assertEmpty());
- * $timeout.flush();
- * expect($exceptionHandler.errors).toEqual(['banana peel']);
- * expect($log.log.logs).toEqual([[1], [2], [3]]);
- * });
- * });
- * });
- * </pre>
- */
-
-angular.mock.$ExceptionHandlerProvider = function() {
- var handler;
-
- /**
- * @ngdoc method
- * @name ngMock.$exceptionHandlerProvider#mode
- * @methodOf ngMock.$exceptionHandlerProvider
- *
- * @description
- * Sets the logging mode.
- *
- * @param {string} mode Mode of operation, defaults to `rethrow`.
- *
- * - `rethrow`: If any errors are are passed into the handler in tests, it typically
- * means that there is a bug in the application or test, so this mock will
- * make these tests fail.
- * - `log`: Sometimes it is desirable to test that an error is throw, for this case the `log` mode stores an
- * array of errors in `$exceptionHandler.errors`, to allow later assertion of them.
- * See {@link ngMock.$log#assertEmpty assertEmpty()} and
- * {@link ngMock.$log#reset reset()}
- */
- this.mode = function(mode) {
- switch(mode) {
- case 'rethrow':
- handler = function(e) {
- throw e;
- };
- break;
- case 'log':
- var errors = [];
-
- handler = function(e) {
- if (arguments.length == 1) {
- errors.push(e);
- } else {
- errors.push([].slice.call(arguments, 0));
- }
- };
-
- handler.errors = errors;
- break;
- default:
- throw Error("Unknown mode '" + mode + "', only 'log'/'rethrow' modes are allowed!");
- }
- };
-
- this.$get = function() {
- return handler;
- };
-
- this.mode('rethrow');
-};
-
-
-/**
- * @ngdoc service
- * @name ngMock.$log
- *
- * @description
- * Mock implementation of {@link ng.$log} that gathers all logged messages in arrays
- * (one array per logging level). These arrays are exposed as `logs` property of each of the
- * level-specific log function, e.g. for level `error` the array is exposed as `$log.error.logs`.
- *
- */
-angular.mock.$LogProvider = function() {
-
- function concat(array1, array2, index) {
- return array1.concat(Array.prototype.slice.call(array2, index));
- }
-
-
- this.$get = function () {
- var $log = {
- log: function() { $log.log.logs.push(concat([], arguments, 0)); },
- warn: function() { $log.warn.logs.push(concat([], arguments, 0)); },
- info: function() { $log.info.logs.push(concat([], arguments, 0)); },
- error: function() { $log.error.logs.push(concat([], arguments, 0)); }
- };
-
- /**
- * @ngdoc method
- * @name ngMock.$log#reset
- * @methodOf ngMock.$log
- *
- * @description
- * Reset all of the logging arrays to empty.
- */
- $log.reset = function () {
- /**
- * @ngdoc property
- * @name ngMock.$log#log.logs
- * @propertyOf ngMock.$log
- *
- * @description
- * Array of logged messages.
- */
- $log.log.logs = [];
- /**
- * @ngdoc property
- * @name ngMock.$log#warn.logs
- * @propertyOf ngMock.$log
- *
- * @description
- * Array of logged messages.
- */
- $log.warn.logs = [];
- /**
- * @ngdoc property
- * @name ngMock.$log#info.logs
- * @propertyOf ngMock.$log
- *
- * @description
- * Array of logged messages.
- */
- $log.info.logs = [];
- /**
- * @ngdoc property
- * @name ngMock.$log#error.logs
- * @propertyOf ngMock.$log
- *
- * @description
- * Array of logged messages.
- */
- $log.error.logs = [];
- };
-
- /**
- * @ngdoc method
- * @name ngMock.$log#assertEmpty
- * @methodOf ngMock.$log
- *
- * @description
- * Assert that the all of the logging methods have no logged messages. If messages present, an exception is thrown.
- */
- $log.assertEmpty = function() {
- var errors = [];
- angular.forEach(['error', 'warn', 'info', 'log'], function(logLevel) {
- angular.forEach($log[logLevel].logs, function(log) {
- angular.forEach(log, function (logItem) {
- errors.push('MOCK $log (' + logLevel + '): ' + String(logItem) + '\n' + (logItem.stack || ''));
- });
- });
- });
- if (errors.length) {
- errors.unshift("Expected $log to be empty! Either a message was logged unexpectedly, or an expected " +
- "log message was not checked and removed:");
- errors.push('');
- throw new Error(errors.join('\n---------\n'));
- }
- };
-
- $log.reset();
- return $log;
- };
-};
-
-
-(function() {
- var R_ISO8061_STR = /^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?:\:?(\d\d)(?:\:?(\d\d)(?:\.(\d{3}))?)?)?(Z|([+-])(\d\d):?(\d\d)))?$/;
-
- function jsonStringToDate(string){
- var match;
- if (match = string.match(R_ISO8061_STR)) {
- var date = new Date(0),
- tzHour = 0,
- tzMin = 0;
- if (match[9]) {
- tzHour = int(match[9] + match[10]);
- tzMin = int(match[9] + match[11]);
- }
- date.setUTCFullYear(int(match[1]), int(match[2]) - 1, int(match[3]));
- date.setUTCHours(int(match[4]||0) - tzHour, int(match[5]||0) - tzMin, int(match[6]||0), int(match[7]||0));
- return date;
- }
- return string;
- }
-
- function int(str) {
- return parseInt(str, 10);
- }
-
- function padNumber(num, digits, trim) {
- var neg = '';
- if (num < 0) {
- neg = '-';
- num = -num;
- }
- num = '' + num;
- while(num.length < digits) num = '0' + num;
- if (trim)
- num = num.substr(num.length - digits);
- return neg + num;
- }
-
-
- /**
- * @ngdoc object
- * @name angular.mock.TzDate
- * @description
- *
- * *NOTE*: this is not an injectable instance, just a globally available mock class of `Date`.
- *
- * Mock of the Date type which has its timezone specified via constroctor arg.
- *
- * The main purpose is to create Date-like instances with timezone fixed to the specified timezone
- * offset, so that we can test code that depends on local timezone settings without dependency on
- * the time zone settings of the machine where the code is running.
- *
- * @param {number} offset Offset of the *desired* timezone in hours (fractions will be honored)
- * @param {(number|string)} timestamp Timestamp representing the desired time in *UTC*
- *
- * @example
- * !!!! WARNING !!!!!
- * This is not a complete Date object so only methods that were implemented can be called safely.
- * To make matters worse, TzDate instances inherit stuff from Date via a prototype.
- *
- * We do our best to intercept calls to "unimplemented" methods, but since the list of methods is
- * incomplete we might be missing some non-standard methods. This can result in errors like:
- * "Date.prototype.foo called on incompatible Object".
- *
- * <pre>
- * var newYearInBratislava = new TzDate(-1, '2009-12-31T23:00:00Z');
- * newYearInBratislava.getTimezoneOffset() => -60;
- * newYearInBratislava.getFullYear() => 2010;
- * newYearInBratislava.getMonth() => 0;
- * newYearInBratislava.getDate() => 1;
- * newYearInBratislava.getHours() => 0;
- * newYearInBratislava.getMinutes() => 0;
- * </pre>
- *
- */
- angular.mock.TzDate = function (offset, timestamp) {
- var self = new Date(0);
- if (angular.isString(timestamp)) {
- var tsStr = timestamp;
-
- self.origDate = jsonStringToDate(timestamp);
-
- timestamp = self.origDate.getTime();
- if (isNaN(timestamp))
- throw {
- name: "Illegal Argument",
- message: "Arg '" + tsStr + "' passed into TzDate constructor is not a valid date string"
- };
- } else {
- self.origDate = new Date(timestamp);
- }
-
- var localOffset = new Date(timestamp).getTimezoneOffset();
- self.offsetDiff = localOffset*60*1000 - offset*1000*60*60;
- self.date = new Date(timestamp + self.offsetDiff);
-
- self.getTime = function() {
- return self.date.getTime() - self.offsetDiff;
- };
-
- self.toLocaleDateString = function() {
- return self.date.toLocaleDateString();
- };
-
- self.getFullYear = function() {
- return self.date.getFullYear();
- };
-
- self.getMonth = function() {
- return self.date.getMonth();
- };
-
- self.getDate = function() {
- return self.date.getDate();
- };
-
- self.getHours = function() {
- return self.date.getHours();
- };
-
- self.getMinutes = function() {
- return self.date.getMinutes();
- };
-
- self.getSeconds = function() {
- return self.date.getSeconds();
- };
-
- self.getTimezoneOffset = function() {
- return offset * 60;
- };
-
- self.getUTCFullYear = function() {
- return self.origDate.getUTCFullYear();
- };
-
- self.getUTCMonth = function() {
- return self.origDate.getUTCMonth();
- };
-
- self.getUTCDate = function() {
- return self.origDate.getUTCDate();
- };
-
- self.getUTCHours = function() {
- return self.origDate.getUTCHours();
- };
-
- self.getUTCMinutes = function() {
- return self.origDate.getUTCMinutes();
- };
-
- self.getUTCSeconds = function() {
- return self.origDate.getUTCSeconds();
- };
-
- self.getUTCMilliseconds = function() {
- return self.origDate.getUTCMilliseconds();
- };
-
- self.getDay = function() {
- return self.date.getDay();
- };
-
- // provide this method only on browsers that already have it
- if (self.toISOString) {
- self.toISOString = function() {
- return padNumber(self.origDate.getUTCFullYear(), 4) + '-' +
- padNumber(self.origDate.getUTCMonth() + 1, 2) + '-' +
- padNumber(self.origDate.getUTCDate(), 2) + 'T' +
- padNumber(self.origDate.getUTCHours(), 2) + ':' +
- padNumber(self.origDate.getUTCMinutes(), 2) + ':' +
- padNumber(self.origDate.getUTCSeconds(), 2) + '.' +
- padNumber(self.origDate.getUTCMilliseconds(), 3) + 'Z'
- }
- }
-
- //hide all methods not implemented in this mock that the Date prototype exposes
- var unimplementedMethods = ['getMilliseconds', 'getUTCDay',
- 'getYear', 'setDate', 'setFullYear', 'setHours', 'setMilliseconds',
- 'setMinutes', 'setMonth', 'setSeconds', 'setTime', 'setUTCDate', 'setUTCFullYear',
- 'setUTCHours', 'setUTCMilliseconds', 'setUTCMinutes', 'setUTCMonth', 'setUTCSeconds',
- 'setYear', 'toDateString', 'toGMTString', 'toJSON', 'toLocaleFormat', 'toLocaleString',
- 'toLocaleTimeString', 'toSource', 'toString', 'toTimeString', 'toUTCString', 'valueOf'];
-
- angular.forEach(unimplementedMethods, function(methodName) {
- self[methodName] = function() {
- throw Error("Method '" + methodName + "' is not implemented in the TzDate mock");
- };
- });
-
- return self;
- };
-
- //make "tzDateInstance instanceof Date" return true
- angular.mock.TzDate.prototype = Date.prototype;
-})();
-
-
-/**
- * @ngdoc function
- * @name angular.mock.dump
- * @description
- *
- * *NOTE*: this is not an injectable instance, just a globally available function.
- *
- * Method for serializing common angular objects (scope, elements, etc..) into strings, useful for debugging.
- *
- * This method is also available on window, where it can be used to display objects on debug console.
- *
- * @param {*} object - any object to turn into string.
- * @return {string} a serialized string of the argument
- */
-angular.mock.dump = function(object) {
- return serialize(object);
-
- function serialize(object) {
- var out;
-
- if (angular.isElement(object)) {
- object = angular.element(object);
- out = angular.element('<div></div>');
- angular.forEach(object, function(element) {
- out.append(angular.element(element).clone());
- });
- out = out.html();
- } else if (angular.isArray(object)) {
- out = [];
- angular.forEach(object, function(o) {
- out.push(serialize(o));
- });
- out = '[ ' + out.join(', ') + ' ]';
- } else if (angular.isObject(object)) {
- if (angular.isFunction(object.$eval) && angular.isFunction(object.$apply)) {
- out = serializeScope(object);
- } else if (object instanceof Error) {
- out = object.stack || ('' + object.name + ': ' + object.message);
- } else {
- out = angular.toJson(object, true);
- }
- } else {
- out = String(object);
- }
-
- return out;
- }
-
- function serializeScope(scope, offset) {
- offset = offset || ' ';
- var log = [offset + 'Scope(' + scope.$id + '): {'];
- for ( var key in scope ) {
- if (scope.hasOwnProperty(key) && !key.match(/^(\$|this)/)) {
- log.push(' ' + key + ': ' + angular.toJson(scope[key]));
- }
- }
- var child = scope.$$childHead;
- while(child) {
- log.push(serializeScope(child, offset + ' '));
- child = child.$$nextSibling;
- }
- log.push('}');
- return log.join('\n' + offset);
- }
-};
-
-/**
- * @ngdoc object
- * @name ngMock.$httpBackend
- * @description
- * Fake HTTP backend implementation suitable for unit testing application that use the
- * {@link ng.$http $http service}.
- *
- * *Note*: For fake http backend implementation suitable for end-to-end testing or backend-less
- * development please see {@link ngMockE2E.$httpBackend e2e $httpBackend mock}.
- *
- * During unit testing, we want our unit tests to run quickly and have no external dependencies so
- * we don’t want to send {@link https://developer.mozilla.org/en/xmlhttprequest XHR} or
- * {@link http://en.wikipedia.org/wiki/JSONP JSONP} requests to a real server. All we really need is
- * to verify whether a certain request has been sent or not, or alternatively just let the
- * application make requests, respond with pre-trained responses and assert that the end result is
- * what we expect it to be.
- *
- * This mock implementation can be used to respond with static or dynamic responses via the
- * `expect` and `when` apis and their shortcuts (`expectGET`, `whenPOST`, etc).
- *
- * When an Angular application needs some data from a server, it calls the $http service, which
- * sends the request to a real server using $httpBackend service. With dependency injection, it is
- * easy to inject $httpBackend mock (which has the same API as $httpBackend) and use it to verify
- * the requests and respond with some testing data without sending a request to real server.
- *
- * There are two ways to specify what test data should be returned as http responses by the mock
- * backend when the code under test makes http requests:
- *
- * - `$httpBackend.expect` - specifies a request expectation
- * - `$httpBackend.when` - specifies a backend definition
- *
- *
- * # Request Expectations vs Backend Definitions
- *
- * Request expectations provide a way to make assertions about requests made by the application and
- * to define responses for those requests. The test will fail if the expected requests are not made
- * or they are made in the wrong order.
- *
- * Backend definitions allow you to define a fake backend for your application which doesn't assert
- * if a particular request was made or not, it just returns a trained response if a request is made.
- * The test will pass whether or not the request gets made during testing.
- *
- *
- * <table class="table">
- * <tr><th width="220px"></th><th>Request expectations</th><th>Backend definitions</th></tr>
- * <tr>
- * <th>Syntax</th>
- * <td>.expect(...).respond(...)</td>
- * <td>.when(...).respond(...)</td>
- * </tr>
- * <tr>
- * <th>Typical usage</th>
- * <td>strict unit tests</td>
- * <td>loose (black-box) unit testing</td>
- * </tr>
- * <tr>
- * <th>Fulfills multiple requests</th>
- * <td>NO</td>
- * <td>YES</td>
- * </tr>
- * <tr>
- * <th>Order of requests matters</th>
- * <td>YES</td>
- * <td>NO</td>
- * </tr>
- * <tr>
- * <th>Request required</th>
- * <td>YES</td>
- * <td>NO</td>
- * </tr>
- * <tr>
- * <th>Response required</th>
- * <td>optional (see below)</td>
- * <td>YES</td>
- * </tr>
- * </table>
- *
- * In cases where both backend definitions and request expectations are specified during unit
- * testing, the request expectations are evaluated first.
- *
- * If a request expectation has no response specified, the algorithm will search your backend
- * definitions for an appropriate response.
- *
- * If a request didn't match any expectation or if the expectation doesn't have the response
- * defined, the backend definitions are evaluated in sequential order to see if any of them match
- * the request. The response from the first matched definition is returned.
- *
- *
- * # Flushing HTTP requests
- *
- * The $httpBackend used in production, always responds to requests with responses asynchronously.
- * If we preserved this behavior in unit testing, we'd have to create async unit tests, which are
- * hard to write, follow and maintain. At the same time the testing mock, can't respond
- * synchronously because that would change the execution of the code under test. For this reason the
- * mock $httpBackend has a `flush()` method, which allows the test to explicitly flush pending
- * requests and thus preserving the async api of the backend, while allowing the test to execute
- * synchronously.
- *
- *
- * # Unit testing with mock $httpBackend
- *
- * <pre>
- // controller
- function MyController($scope, $http) {
- $http.get('/auth.py').success(function(data) {
- $scope.user = data;
- });
-
- this.saveMessage = function(message) {
- $scope.status = 'Saving...';
- $http.post('/add-msg.py', message).success(function(response) {
- $scope.status = '';
- }).error(function() {
- $scope.status = 'ERROR!';
- });
- };
- }
-
- // testing controller
- var $httpBackend;
-
- beforeEach(inject(function($injector) {
- $httpBackend = $injector.get('$httpBackend');
-
- // backend definition common for all tests
- $httpBackend.when('GET', '/auth.py').respond({userId: 'userX'}, {'A-Token': 'xxx'});
- }));
-
-
- afterEach(function() {
- $httpBackend.verifyNoOutstandingExpectation();
- $httpBackend.verifyNoOutstandingRequest();
- });
-
-
- it('should fetch authentication token', function() {
- $httpBackend.expectGET('/auth.py');
- var controller = scope.$new(MyController);
- $httpBackend.flush();
- });
-
-
- it('should send msg to server', function() {
- // now you don’t care about the authentication, but
- // the controller will still send the request and
- // $httpBackend will respond without you having to
- // specify the expectation and response for this request
- $httpBackend.expectPOST('/add-msg.py', 'message content').respond(201, '');
-
- var controller = scope.$new(MyController);
- $httpBackend.flush();
- controller.saveMessage('message content');
- expect(controller.status).toBe('Saving...');
- $httpBackend.flush();
- expect(controller.status).toBe('');
- });
-
-
- it('should send auth header', function() {
- $httpBackend.expectPOST('/add-msg.py', undefined, function(headers) {
- // check if the header was send, if it wasn't the expectation won't
- // match the request and the test will fail
- return headers['Authorization'] == 'xxx';
- }).respond(201, '');
-
- var controller = scope.$new(MyController);
- controller.saveMessage('whatever');
- $httpBackend.flush();
- });
- </pre>
- */
-angular.mock.$HttpBackendProvider = function() {
- this.$get = [createHttpBackendMock];
-};
-
-/**
- * General factory function for $httpBackend mock.
- * Returns instance for unit testing (when no arguments specified):
- * - passing through is disabled
- * - auto flushing is disabled
- *
- * Returns instance for e2e testing (when `$delegate` and `$browser` specified):
- * - passing through (delegating request to real backend) is enabled
- * - auto flushing is enabled
- *
- * @param {Object=} $delegate Real $httpBackend instance (allow passing through if specified)
- * @param {Object=} $browser Auto-flushing enabled if specified
- * @return {Object} Instance of $httpBackend mock
- */
-function createHttpBackendMock($delegate, $browser) {
- var definitions = [],
- expectations = [],
- responses = [],
- responsesPush = angular.bind(responses, responses.push);
-
- function createResponse(status, data, headers) {
- if (angular.isFunction(status)) return status;
-
- return function() {
- return angular.isNumber(status)
- ? [status, data, headers]
- : [200, status, data];
- };
- }
-
- // TODO(vojta): change params to: method, url, data, headers, callback
- function $httpBackend(method, url, data, callback, headers) {
- var xhr = new MockXhr(),
- expectation = expectations[0],
- wasExpected = false;
-
- function prettyPrint(data) {
- return (angular.isString(data) || angular.isFunction(data) || data instanceof RegExp)
- ? data
- : angular.toJson(data);
- }
-
- if (expectation && expectation.match(method, url)) {
- if (!expectation.matchData(data))
- throw Error('Expected ' + expectation + ' with different data\n' +
- 'EXPECTED: ' + prettyPrint(expectation.data) + '\nGOT: ' + data);
-
- if (!expectation.matchHeaders(headers))
- throw Error('Expected ' + expectation + ' with different headers\n' +
- 'EXPECTED: ' + prettyPrint(expectation.headers) + '\nGOT: ' +
- prettyPrint(headers));
-
- expectations.shift();
-
- if (expectation.response) {
- responses.push(function() {
- var response = expectation.response(method, url, data, headers);
- xhr.$$respHeaders = response[2];
- callback(response[0], response[1], xhr.getAllResponseHeaders());
- });
- return;
- }
- wasExpected = true;
- }
-
- var i = -1, definition;
- while ((definition = definitions[++i])) {
- if (definition.match(method, url, data, headers || {})) {
- if (definition.response) {
- // if $browser specified, we do auto flush all requests
- ($browser ? $browser.defer : responsesPush)(function() {
- var response = definition.response(method, url, data, headers);
- xhr.$$respHeaders = response[2];
- callback(response[0], response[1], xhr.getAllResponseHeaders());
- });
- } else if (definition.passThrough) {
- $delegate(method, url, data, callback, headers);
- } else throw Error('No response defined !');
- return;
- }
- }
- throw wasExpected ?
- Error('No response defined !') :
- Error('Unexpected request: ' + method + ' ' + url + '\n' +
- (expectation ? 'Expected ' + expectation : 'No more request expected'));
- }
-
- /**
- * @ngdoc method
- * @name ngMock.$httpBackend#when
- * @methodOf ngMock.$httpBackend
- * @description
- * Creates a new backend definition.
- *
- * @param {string} method HTTP method.
- * @param {string|RegExp} url HTTP url.
- * @param {(string|RegExp)=} data HTTP request body.
- * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header
- * object and returns true if the headers match the current definition.
- * @returns {requestHandler} Returns an object with `respond` method that control how a matched
- * request is handled.
- *
- * - respond – `{function([status,] data[, headers])|function(function(method, url, data, headers)}`
- * – The respond method takes a set of static data to be returned or a function that can return
- * an array containing response status (number), response data (string) and response headers
- * (Object).
- */
- $httpBackend.when = function(method, url, data, headers) {
- var definition = new MockHttpExpectation(method, url, data, headers),
- chain = {
- respond: function(status, data, headers) {
- definition.response = createResponse(status, data, headers);
- }
- };
-
- if ($browser) {
- chain.passThrough = function() {
- definition.passThrough = true;
- };
- }
-
- definitions.push(definition);
- return chain;
- };
-
- /**
- * @ngdoc method
- * @name ngMock.$httpBackend#whenGET
- * @methodOf ngMock.$httpBackend
- * @description
- * Creates a new backend definition for GET requests. For more info see `when()`.
- *
- * @param {string|RegExp} url HTTP url.
- * @param {(Object|function(Object))=} headers HTTP headers.
- * @returns {requestHandler} Returns an object with `respond` method that control how a matched
- * request is handled.
- */
-
- /**
- * @ngdoc method
- * @name ngMock.$httpBackend#whenHEAD
- * @methodOf ngMock.$httpBackend
- * @description
- * Creates a new backend definition for HEAD requests. For more info see `when()`.
- *
- * @param {string|RegExp} url HTTP url.
- * @param {(Object|function(Object))=} headers HTTP headers.
- * @returns {requestHandler} Returns an object with `respond` method that control how a matched
- * request is handled.
- */
-
- /**
- * @ngdoc method
- * @name ngMock.$httpBackend#whenDELETE
- * @methodOf ngMock.$httpBackend
- * @description
- * Creates a new backend definition for DELETE requests. For more info see `when()`.
- *
- * @param {string|RegExp} url HTTP url.
- * @param {(Object|function(Object))=} headers HTTP headers.
- * @returns {requestHandler} Returns an object with `respond` method that control how a matched
- * request is handled.
- */
-
- /**
- * @ngdoc method
- * @name ngMock.$httpBackend#whenPOST
- * @methodOf ngMock.$httpBackend
- * @description
- * Creates a new backend definition for POST requests. For more info see `when()`.
- *
- * @param {string|RegExp} url HTTP url.
- * @param {(string|RegExp)=} data HTTP request body.
- * @param {(Object|function(Object))=} headers HTTP headers.
- * @returns {requestHandler} Returns an object with `respond` method that control how a matched
- * request is handled.
- */
-
- /**
- * @ngdoc method
- * @name ngMock.$httpBackend#whenPUT
- * @methodOf ngMock.$httpBackend
- * @description
- * Creates a new backend definition for PUT requests. For more info see `when()`.
- *
- * @param {string|RegExp} url HTTP url.
- * @param {(string|RegExp)=} data HTTP request body.
- * @param {(Object|function(Object))=} headers HTTP headers.
- * @returns {requestHandler} Returns an object with `respond` method that control how a matched
- * request is handled.
- */
-
- /**
- * @ngdoc method
- * @name ngMock.$httpBackend#whenJSONP
- * @methodOf ngMock.$httpBackend
- * @description
- * Creates a new backend definition for JSONP requests. For more info see `when()`.
- *
- * @param {string|RegExp} url HTTP url.
- * @returns {requestHandler} Returns an object with `respond` method that control how a matched
- * request is handled.
- */
- createShortMethods('when');
-
-
- /**
- * @ngdoc method
- * @name ngMock.$httpBackend#expect
- * @methodOf ngMock.$httpBackend
- * @description
- * Creates a new request expectation.
- *
- * @param {string} method HTTP method.
- * @param {string|RegExp} url HTTP url.
- * @param {(string|RegExp)=} data HTTP request body.
- * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header
- * object and returns true if the headers match the current expectation.
- * @returns {requestHandler} Returns an object with `respond` method that control how a matched
- * request is handled.
- *
- * - respond – `{function([status,] data[, headers])|function(function(method, url, data, headers)}`
- * – The respond method takes a set of static data to be returned or a function that can return
- * an array containing response status (number), response data (string) and response headers
- * (Object).
- */
- $httpBackend.expect = function(method, url, data, headers) {
- var expectation = new MockHttpExpectation(method, url, data, headers);
- expectations.push(expectation);
- return {
- respond: function(status, data, headers) {
- expectation.response = createResponse(status, data, headers);
- }
- };
- };
-
-
- /**
- * @ngdoc method
- * @name ngMock.$httpBackend#expectGET
- * @methodOf ngMock.$httpBackend
- * @description
- * Creates a new request expectation for GET requests. For more info see `expect()`.
- *
- * @param {string|RegExp} url HTTP url.
- * @param {Object=} headers HTTP headers.
- * @returns {requestHandler} Returns an object with `respond` method that control how a matched
- * request is handled. See #expect for more info.
- */
-
- /**
- * @ngdoc method
- * @name ngMock.$httpBackend#expectHEAD
- * @methodOf ngMock.$httpBackend
- * @description
- * Creates a new request expectation for HEAD requests. For more info see `expect()`.
- *
- * @param {string|RegExp} url HTTP url.
- * @param {Object=} headers HTTP headers.
- * @returns {requestHandler} Returns an object with `respond` method that control how a matched
- * request is handled.
- */
-
- /**
- * @ngdoc method
- * @name ngMock.$httpBackend#expectDELETE
- * @methodOf ngMock.$httpBackend
- * @description
- * Creates a new request expectation for DELETE requests. For more info see `expect()`.
- *
- * @param {string|RegExp} url HTTP url.
- * @param {Object=} headers HTTP headers.
- * @returns {requestHandler} Returns an object with `respond` method that control how a matched
- * request is handled.
- */
-
- /**
- * @ngdoc method
- * @name ngMock.$httpBackend#expectPOST
- * @methodOf ngMock.$httpBackend
- * @description
- * Creates a new request expectation for POST requests. For more info see `expect()`.
- *
- * @param {string|RegExp} url HTTP url.
- * @param {(string|RegExp)=} data HTTP request body.
- * @param {Object=} headers HTTP headers.
- * @returns {requestHandler} Returns an object with `respond` method that control how a matched
- * request is handled.
- */
-
- /**
- * @ngdoc method
- * @name ngMock.$httpBackend#expectPUT
- * @methodOf ngMock.$httpBackend
- * @description
- * Creates a new request expectation for PUT requests. For more info see `expect()`.
- *
- * @param {string|RegExp} url HTTP url.
- * @param {(string|RegExp)=} data HTTP request body.
- * @param {Object=} headers HTTP headers.
- * @returns {requestHandler} Returns an object with `respond` method that control how a matched
- * request is handled.
- */
-
- /**
- * @ngdoc method
- * @name ngMock.$httpBackend#expectPATCH
- * @methodOf ngMock.$httpBackend
- * @description
- * Creates a new request expectation for PATCH requests. For more info see `expect()`.
- *
- * @param {string|RegExp} url HTTP url.
- * @param {(string|RegExp)=} data HTTP request body.
- * @param {Object=} headers HTTP headers.
- * @returns {requestHandler} Returns an object with `respond` method that control how a matched
- * request is handled.
- */
-
- /**
- * @ngdoc method
- * @name ngMock.$httpBackend#expectJSONP
- * @methodOf ngMock.$httpBackend
- * @description
- * Creates a new request expectation for JSONP requests. For more info see `expect()`.
- *
- * @param {string|RegExp} url HTTP url.
- * @returns {requestHandler} Returns an object with `respond` method that control how a matched
- * request is handled.
- */
- createShortMethods('expect');
-
-
- /**
- * @ngdoc method
- * @name ngMock.$httpBackend#flush
- * @methodOf ngMock.$httpBackend
- * @description
- * Flushes all pending requests using the trained responses.
- *
- * @param {number=} count Number of responses to flush (in the order they arrived). If undefined,
- * all pending requests will be flushed. If there are no pending requests when the flush method
- * is called an exception is thrown (as this typically a sign of programming error).
- */
- $httpBackend.flush = function(count) {
- if (!responses.length) throw Error('No pending request to flush !');
-
- if (angular.isDefined(count)) {
- while (count--) {
- if (!responses.length) throw Error('No more pending request to flush !');
- responses.shift()();
- }
- } else {
- while (responses.length) {
- responses.shift()();
- }
- }
- $httpBackend.verifyNoOutstandingExpectation();
- };
-
-
- /**
- * @ngdoc method
- * @name ngMock.$httpBackend#verifyNoOutstandingExpectation
- * @methodOf ngMock.$httpBackend
- * @description
- * Verifies that all of the requests defined via the `expect` api were made. If any of the
- * requests were not made, verifyNoOutstandingExpectation throws an exception.
- *
- * Typically, you would call this method following each test case that asserts requests using an
- * "afterEach" clause.
- *
- * <pre>
- * afterEach($httpBackend.verifyExpectations);
- * </pre>
- */
- $httpBackend.verifyNoOutstandingExpectation = function() {
- if (expectations.length) {
- throw Error('Unsatisfied requests: ' + expectations.join(', '));
- }
- };
-
-
- /**
- * @ngdoc method
- * @name ngMock.$httpBackend#verifyNoOutstandingRequest
- * @methodOf ngMock.$httpBackend
- * @description
- * Verifies that there are no outstanding requests that need to be flushed.
- *
- * Typically, you would call this method following each test case that asserts requests using an
- * "afterEach" clause.
- *
- * <pre>
- * afterEach($httpBackend.verifyNoOutstandingRequest);
- * </pre>
- */
- $httpBackend.verifyNoOutstandingRequest = function() {
- if (responses.length) {
- throw Error('Unflushed requests: ' + responses.length);
- }
- };
-
-
- /**
- * @ngdoc method
- * @name ngMock.$httpBackend#resetExpectations
- * @methodOf ngMock.$httpBackend
- * @description
- * Resets all request expectations, but preserves all backend definitions. Typically, you would
- * call resetExpectations during a multiple-phase test when you want to reuse the same instance of
- * $httpBackend mock.
- */
- $httpBackend.resetExpectations = function() {
- expectations.length = 0;
- responses.length = 0;
- };
-
- return $httpBackend;
-
-
- function createShortMethods(prefix) {
- angular.forEach(['GET', 'DELETE', 'JSONP'], function(method) {
- $httpBackend[prefix + method] = function(url, headers) {
- return $httpBackend[prefix](method, url, undefined, headers)
- }
- });
-
- angular.forEach(['PUT', 'POST', 'PATCH'], function(method) {
- $httpBackend[prefix + method] = function(url, data, headers) {
- return $httpBackend[prefix](method, url, data, headers)
- }
- });
- }
-}
-
-function MockHttpExpectation(method, url, data, headers) {
-
- this.data = data;
- this.headers = headers;
-
- this.match = function(m, u, d, h) {
- if (method != m) return false;
- if (!this.matchUrl(u)) return false;
- if (angular.isDefined(d) && !this.matchData(d)) return false;
- if (angular.isDefined(h) && !this.matchHeaders(h)) return false;
- return true;
- };
-
- this.matchUrl = function(u) {
- if (!url) return true;
- if (angular.isFunction(url.test)) return url.test(u);
- return url == u;
- };
-
- this.matchHeaders = function(h) {
- if (angular.isUndefined(headers)) return true;
- if (angular.isFunction(headers)) return headers(h);
- return angular.equals(headers, h);
- };
-
- this.matchData = function(d) {
- if (angular.isUndefined(data)) return true;
- if (data && angular.isFunction(data.test)) return data.test(d);
- if (data && !angular.isString(data)) return angular.toJson(data) == d;
- return data == d;
- };
-
- this.toString = function() {
- return method + ' ' + url;
- };
-}
-
-function MockXhr() {
-
- // hack for testing $http, $httpBackend
- MockXhr.$$lastInstance = this;
-
- this.open = function(method, url, async) {
- this.$$method = method;
- this.$$url = url;
- this.$$async = async;
- this.$$reqHeaders = {};
- this.$$respHeaders = {};
- };
-
- this.send = function(data) {
- this.$$data = data;
- };
-
- this.setRequestHeader = function(key, value) {
- this.$$reqHeaders[key] = value;
- };
-
- this.getResponseHeader = function(name) {
- // the lookup must be case insensitive, that's why we try two quick lookups and full scan at last
- var header = this.$$respHeaders[name];
- if (header) return header;
-
- name = angular.lowercase(name);
- header = this.$$respHeaders[name];
- if (header) return header;
-
- header = undefined;
- angular.forEach(this.$$respHeaders, function(headerVal, headerName) {
- if (!header && angular.lowercase(headerName) == name) header = headerVal;
- });
- return header;
- };
-
- this.getAllResponseHeaders = function() {
- var lines = [];
-
- angular.forEach(this.$$respHeaders, function(value, key) {
- lines.push(key + ': ' + value);
- });
- return lines.join('\n');
- };
-
- this.abort = angular.noop;
-}
-
-
-/**
- * @ngdoc function
- * @name ngMock.$timeout
- * @description
- *
- * This service is just a simple decorator for {@link ng.$timeout $timeout} service
- * that adds a "flush" method.
- */
-
-/**
- * @ngdoc method
- * @name ngMock.$timeout#flush
- * @methodOf ngMock.$timeout
- * @description
- *
- * Flushes the queue of pending tasks.
- */
-
-/**
- *
- */
-angular.mock.$RootElementProvider = function() {
- this.$get = function() {
- return angular.element('<div ng-app></div>');
- }
-};
-
-/**
- * @ngdoc overview
- * @name ngMock
- * @description
- *
- * The `ngMock` is an angular module which is used with `ng` module and adds unit-test configuration as well as useful
- * mocks to the {@link AUTO.$injector $injector}.
- */
-angular.module('ngMock', ['ng']).provider({
- $browser: angular.mock.$BrowserProvider,
- $exceptionHandler: angular.mock.$ExceptionHandlerProvider,
- $log: angular.mock.$LogProvider,
- $httpBackend: angular.mock.$HttpBackendProvider,
- $rootElement: angular.mock.$RootElementProvider
-}).config(function($provide) {
- $provide.decorator('$timeout', function($delegate, $browser) {
- $delegate.flush = function() {
- $browser.defer.flush();
- };
- return $delegate;
- });
-});
-
-
-/**
- * @ngdoc overview
- * @name ngMockE2E
- * @description
- *
- * The `ngMockE2E` is an angular module which contains mocks suitable for end-to-end testing.
- * Currently there is only one mock present in this module -
- * the {@link ngMockE2E.$httpBackend e2e $httpBackend} mock.
- */
-angular.module('ngMockE2E', ['ng']).config(function($provide) {
- $provide.decorator('$httpBackend', angular.mock.e2e.$httpBackendDecorator);
-});
-
-/**
- * @ngdoc object
- * @name ngMockE2E.$httpBackend
- * @description
- * Fake HTTP backend implementation suitable for end-to-end testing or backend-less development of
- * applications that use the {@link ng.$http $http service}.
- *
- * *Note*: For fake http backend implementation suitable for unit testing please see
- * {@link ngMock.$httpBackend unit-testing $httpBackend mock}.
- *
- * This implementation can be used to respond with static or dynamic responses via the `when` api
- * and its shortcuts (`whenGET`, `whenPOST`, etc) and optionally pass through requests to the
- * real $httpBackend for specific requests (e.g. to interact with certain remote apis or to fetch
- * templates from a webserver).
- *
- * As opposed to unit-testing, in an end-to-end testing scenario or in scenario when an application
- * is being developed with the real backend api replaced with a mock, it is often desirable for
- * certain category of requests to bypass the mock and issue a real http request (e.g. to fetch
- * templates or static files from the webserver). To configure the backend with this behavior
- * use the `passThrough` request handler of `when` instead of `respond`.
- *
- * Additionally, we don't want to manually have to flush mocked out requests like we do during unit
- * testing. For this reason the e2e $httpBackend automatically flushes mocked out requests
- * automatically, closely simulating the behavior of the XMLHttpRequest object.
- *
- * To setup the application to run with this http backend, you have to create a module that depends
- * on the `ngMockE2E` and your application modules and defines the fake backend:
- *
- * <pre>
- * myAppDev = angular.module('myAppDev', ['myApp', 'ngMockE2E']);
- * myAppDev.run(function($httpBackend) {
- * phones = [{name: 'phone1'}, {name: 'phone2'}];
- *
- * // returns the current list of phones
- * $httpBackend.whenGET('/phones').respond(phones);
- *
- * // adds a new phone to the phones array
- * $httpBackend.whenPOST('/phones').respond(function(method, url, data) {
- * phones.push(angular.fromJSON(data));
- * });
- * $httpBackend.whenGET(/^\/templates\//).passThrough();
- * //...
- * });
- * </pre>
- *
- * Afterwards, bootstrap your app with this new module.
- */
-
-/**
- * @ngdoc method
- * @name ngMockE2E.$httpBackend#when
- * @methodOf ngMockE2E.$httpBackend
- * @description
- * Creates a new backend definition.
- *
- * @param {string} method HTTP method.
- * @param {string|RegExp} url HTTP url.
- * @param {(string|RegExp)=} data HTTP request body.
- * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header
- * object and returns true if the headers match the current definition.
- * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
- * control how a matched request is handled.
- *
- * - respond – `{function([status,] data[, headers])|function(function(method, url, data, headers)}`
- * – The respond method takes a set of static data to be returned or a function that can return
- * an array containing response status (number), response data (string) and response headers
- * (Object).
- * - passThrough – `{function()}` – Any request matching a backend definition with `passThrough`
- * handler, will be pass through to the real backend (an XHR request will be made to the
- * server.
- */
-
-/**
- * @ngdoc method
- * @name ngMockE2E.$httpBackend#whenGET
- * @methodOf ngMockE2E.$httpBackend
- * @description
- * Creates a new backend definition for GET requests. For more info see `when()`.
- *
- * @param {string|RegExp} url HTTP url.
- * @param {(Object|function(Object))=} headers HTTP headers.
- * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
- * control how a matched request is handled.
- */
-
-/**
- * @ngdoc method
- * @name ngMockE2E.$httpBackend#whenHEAD
- * @methodOf ngMockE2E.$httpBackend
- * @description
- * Creates a new backend definition for HEAD requests. For more info see `when()`.
- *
- * @param {string|RegExp} url HTTP url.
- * @param {(Object|function(Object))=} headers HTTP headers.
- * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
- * control how a matched request is handled.
- */
-
-/**
- * @ngdoc method
- * @name ngMockE2E.$httpBackend#whenDELETE
- * @methodOf ngMockE2E.$httpBackend
- * @description
- * Creates a new backend definition for DELETE requests. For more info see `when()`.
- *
- * @param {string|RegExp} url HTTP url.
- * @param {(Object|function(Object))=} headers HTTP headers.
- * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
- * control how a matched request is handled.
- */
-
-/**
- * @ngdoc method
- * @name ngMockE2E.$httpBackend#whenPOST
- * @methodOf ngMockE2E.$httpBackend
- * @description
- * Creates a new backend definition for POST requests. For more info see `when()`.
- *
- * @param {string|RegExp} url HTTP url.
- * @param {(string|RegExp)=} data HTTP request body.
- * @param {(Object|function(Object))=} headers HTTP headers.
- * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
- * control how a matched request is handled.
- */
-
-/**
- * @ngdoc method
- * @name ngMockE2E.$httpBackend#whenPUT
- * @methodOf ngMockE2E.$httpBackend
- * @description
- * Creates a new backend definition for PUT requests. For more info see `when()`.
- *
- * @param {string|RegExp} url HTTP url.
- * @param {(string|RegExp)=} data HTTP request body.
- * @param {(Object|function(Object))=} headers HTTP headers.
- * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
- * control how a matched request is handled.
- */
-
-/**
- * @ngdoc method
- * @name ngMockE2E.$httpBackend#whenPATCH
- * @methodOf ngMockE2E.$httpBackend
- * @description
- * Creates a new backend definition for PATCH requests. For more info see `when()`.
- *
- * @param {string|RegExp} url HTTP url.
- * @param {(string|RegExp)=} data HTTP request body.
- * @param {(Object|function(Object))=} headers HTTP headers.
- * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
- * control how a matched request is handled.
- */
-
-/**
- * @ngdoc method
- * @name ngMockE2E.$httpBackend#whenJSONP
- * @methodOf ngMockE2E.$httpBackend
- * @description
- * Creates a new backend definition for JSONP requests. For more info see `when()`.
- *
- * @param {string|RegExp} url HTTP url.
- * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
- * control how a matched request is handled.
- */
-angular.mock.e2e = {};
-angular.mock.e2e.$httpBackendDecorator = ['$delegate', '$browser', createHttpBackendMock];
-
-
-angular.mock.clearDataCache = function() {
- var key,
- cache = angular.element.cache;
-
- for(key in cache) {
- if (cache.hasOwnProperty(key)) {
- var handle = cache[key].handle;
-
- handle && angular.element(handle.elem).unbind();
- delete cache[key];
- }
- }
-};
-
-
-window.jstestdriver && (function(window) {
- /**
- * Global method to output any number of objects into JSTD console. Useful for debugging.
- */
- window.dump = function() {
- var args = [];
- angular.forEach(arguments, function(arg) {
- args.push(angular.mock.dump(arg));
- });
- jstestdriver.console.log.apply(jstestdriver.console, args);
- if (window.console) {
- window.console.log.apply(window.console, args);
- }
- };
-})(window);
-
-
-window.jasmine && (function(window) {
-
- afterEach(function() {
- var spec = getCurrentSpec();
- var injector = spec.$injector;
-
- spec.$injector = null;
- spec.$modules = null;
-
- if (injector) {
- injector.get('$rootElement').unbind();
- injector.get('$browser').pollFns.length = 0;
- }
-
- angular.mock.clearDataCache();
-
- // clean up jquery's fragment cache
- angular.forEach(angular.element.fragments, function(val, key) {
- delete angular.element.fragments[key];
- });
-
- MockXhr.$$lastInstance = null;
-
- angular.forEach(angular.callbacks, function(val, key) {
- delete angular.callbacks[key];
- });
- angular.callbacks.counter = 0;
- });
-
- function getCurrentSpec() {
- return jasmine.getEnv().currentSpec;
- }
-
- function isSpecRunning() {
- var spec = getCurrentSpec();
- return spec && spec.queue.running;
- }
-
- /**
- * @ngdoc function
- * @name angular.mock.module
- * @description
- *
- * *NOTE*: This is function is also published on window for easy access.<br>
- * *NOTE*: Only available with {@link http://pivotal.github.com/jasmine/ jasmine}.
- *
- * This function registers a module configuration code. It collects the configuration information
- * which will be used when the injector is created by {@link angular.mock.inject inject}.
- *
- * See {@link angular.mock.inject inject} for usage example
- *
- * @param {...(string|Function)} fns any number of modules which are represented as string
- * aliases or as anonymous module initialization functions. The modules are used to
- * configure the injector. The 'ng' and 'ngMock' modules are automatically loaded.
- */
- window.module = angular.mock.module = function() {
- var moduleFns = Array.prototype.slice.call(arguments, 0);
- return isSpecRunning() ? workFn() : workFn;
- /////////////////////
- function workFn() {
- var spec = getCurrentSpec();
- if (spec.$injector) {
- throw Error('Injector already created, can not register a module!');
- } else {
- var modules = spec.$modules || (spec.$modules = []);
- angular.forEach(moduleFns, function(module) {
- modules.push(module);
- });
- }
- }
- };
-
- /**
- * @ngdoc function
- * @name angular.mock.inject
- * @description
- *
- * *NOTE*: This is function is also published on window for easy access.<br>
- * *NOTE*: Only available with {@link http://pivotal.github.com/jasmine/ jasmine}.
- *
- * The inject function wraps a function into an injectable function. The inject() creates new
- * instance of {@link AUTO.$injector $injector} per test, which is then used for
- * resolving references.
- *
- * See also {@link angular.mock.module module}
- *
- * Example of what a typical jasmine tests looks like with the inject method.
- * <pre>
- *
- * angular.module('myApplicationModule', [])
- * .value('mode', 'app')
- * .value('version', 'v1.0.1');
- *
- *
- * describe('MyApp', function() {
- *
- * // You need to load modules that you want to test,
- * // it loads only the "ng" module by default.
- * beforeEach(module('myApplicationModule'));
- *
- *
- * // inject() is used to inject arguments of all given functions
- * it('should provide a version', inject(function(mode, version) {
- * expect(version).toEqual('v1.0.1');
- * expect(mode).toEqual('app');
- * }));
- *
- *
- * // The inject and module method can also be used inside of the it or beforeEach
- * it('should override a version and test the new version is injected', function() {
- * // module() takes functions or strings (module aliases)
- * module(function($provide) {
- * $provide.value('version', 'overridden'); // override version here
- * });
- *
- * inject(function(version) {
- * expect(version).toEqual('overridden');
- * });
- * ));
- * });
- *
- * </pre>
- *
- * @param {...Function} fns any number of functions which will be injected using the injector.
- */
- window.inject = angular.mock.inject = function() {
- var blockFns = Array.prototype.slice.call(arguments, 0);
- var errorForStack = new Error('Declaration Location');
- return isSpecRunning() ? workFn() : workFn;
- /////////////////////
- function workFn() {
- var spec = getCurrentSpec();
- var modules = spec.$modules || [];
- modules.unshift('ngMock');
- modules.unshift('ng');
- var injector = spec.$injector;
- if (!injector) {
- injector = spec.$injector = angular.injector(modules);
- }
- for(var i = 0, ii = blockFns.length; i < ii; i++) {
- try {
- injector.invoke(blockFns[i] || angular.noop, this);
- } catch (e) {
- if(e.stack) e.stack += '\n' + errorForStack.stack;
- throw e;
- } finally {
- errorForStack = null;
- }
- }
- }
- };
-})(window);
[22/28] CLIMATE-512 - Replace frontend with new Yeoman/Grunt/Bower
frontend
Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/css/lib/font-awesome.min.css
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/css/lib/font-awesome.min.css b/ocw-ui/frontend/app/css/lib/font-awesome.min.css
deleted file mode 100644
index ff1a096..0000000
--- a/ocw-ui/frontend/app/css/lib/font-awesome.min.css
+++ /dev/null
@@ -1,403 +0,0 @@
-@font-face{font-family:'FontAwesome';src:url('../../font/fontawesome-webfont.eot?v=3.2.1');src:url('../../font/fontawesome-webfont.eot?#iefix&v=3.2.1') format('embedded-opentype'),url('../../font/fontawesome-webfont.woff?v=3.2.1') format('woff'),url('../../font/fontawesome-webfont.ttf?v=3.2.1') format('truetype'),url('../../font/fontawesome-webfont.svg#fontawesomeregular?v=3.2.1') format('svg');font-weight:normal;font-style:normal;}[class^="icon-"],[class*=" icon-"]{font-family:FontAwesome;font-weight:normal;font-style:normal;text-decoration:inherit;-webkit-font-smoothing:antialiased;*margin-right:.3em;}
-[class^="icon-"]:before,[class*=" icon-"]:before{text-decoration:inherit;display:inline-block;speak:none;}
-.icon-large:before{vertical-align:-10%;font-size:1.3333333333333333em;}
-a [class^="icon-"],a [class*=" icon-"]{display:inline;}
-[class^="icon-"].icon-fixed-width,[class*=" icon-"].icon-fixed-width{display:inline-block;width:1.1428571428571428em;text-align:right;padding-right:0.2857142857142857em;}[class^="icon-"].icon-fixed-width.icon-large,[class*=" icon-"].icon-fixed-width.icon-large{width:1.4285714285714286em;}
-.icons-ul{margin-left:2.142857142857143em;list-style-type:none;}.icons-ul>li{position:relative;}
-.icons-ul .icon-li{position:absolute;left:-2.142857142857143em;width:2.142857142857143em;text-align:center;line-height:inherit;}
-[class^="icon-"].hide,[class*=" icon-"].hide{display:none;}
-.icon-muted{color:#eeeeee;}
-.icon-light{color:#ffffff;}
-.icon-dark{color:#333333;}
-.icon-border{border:solid 1px #eeeeee;padding:.2em .25em .15em;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
-.icon-2x{font-size:2em;}.icon-2x.icon-border{border-width:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
-.icon-3x{font-size:3em;}.icon-3x.icon-border{border-width:3px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;}
-.icon-4x{font-size:4em;}.icon-4x.icon-border{border-width:4px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}
-.icon-5x{font-size:5em;}.icon-5x.icon-border{border-width:5px;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px;}
-.pull-right{float:right;}
-.pull-left{float:left;}
-[class^="icon-"].pull-left,[class*=" icon-"].pull-left{margin-right:.3em;}
-[class^="icon-"].pull-right,[class*=" icon-"].pull-right{margin-left:.3em;}
-[class^="icon-"],[class*=" icon-"]{display:inline;width:auto;height:auto;line-height:normal;vertical-align:baseline;background-image:none;background-position:0% 0%;background-repeat:repeat;margin-top:0;}
-.icon-white,.nav-pills>.active>a>[class^="icon-"],.nav-pills>.active>a>[class*=" icon-"],.nav-list>.active>a>[class^="icon-"],.nav-list>.active>a>[class*=" icon-"],.navbar-inverse .nav>.active>a>[class^="icon-"],.navbar-inverse .nav>.active>a>[class*=" icon-"],.dropdown-menu>li>a:hover>[class^="icon-"],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>.active>a>[class^="icon-"],.dropdown-menu>.active>a>[class*=" icon-"],.dropdown-submenu:hover>a>[class^="icon-"],.dropdown-submenu:hover>a>[class*=" icon-"]{background-image:none;}
-.btn [class^="icon-"].icon-large,.nav [class^="icon-"].icon-large,.btn [class*=" icon-"].icon-large,.nav [class*=" icon-"].icon-large{line-height:.9em;}
-.btn [class^="icon-"].icon-spin,.nav [class^="icon-"].icon-spin,.btn [class*=" icon-"].icon-spin,.nav [class*=" icon-"].icon-spin{display:inline-block;}
-.nav-tabs [class^="icon-"],.nav-pills [class^="icon-"],.nav-tabs [class*=" icon-"],.nav-pills [class*=" icon-"],.nav-tabs [class^="icon-"].icon-large,.nav-pills [class^="icon-"].icon-large,.nav-tabs [class*=" icon-"].icon-large,.nav-pills [class*=" icon-"].icon-large{line-height:.9em;}
-.btn [class^="icon-"].pull-left.icon-2x,.btn [class*=" icon-"].pull-left.icon-2x,.btn [class^="icon-"].pull-right.icon-2x,.btn [class*=" icon-"].pull-right.icon-2x{margin-top:.18em;}
-.btn [class^="icon-"].icon-spin.icon-large,.btn [class*=" icon-"].icon-spin.icon-large{line-height:.8em;}
-.btn.btn-small [class^="icon-"].pull-left.icon-2x,.btn.btn-small [class*=" icon-"].pull-left.icon-2x,.btn.btn-small [class^="icon-"].pull-right.icon-2x,.btn.btn-small [class*=" icon-"].pull-right.icon-2x{margin-top:.25em;}
-.btn.btn-large [class^="icon-"],.btn.btn-large [class*=" icon-"]{margin-top:0;}.btn.btn-large [class^="icon-"].pull-left.icon-2x,.btn.btn-large [class*=" icon-"].pull-left.icon-2x,.btn.btn-large [class^="icon-"].pull-right.icon-2x,.btn.btn-large [class*=" icon-"].pull-right.icon-2x{margin-top:.05em;}
-.btn.btn-large [class^="icon-"].pull-left.icon-2x,.btn.btn-large [class*=" icon-"].pull-left.icon-2x{margin-right:.2em;}
-.btn.btn-large [class^="icon-"].pull-right.icon-2x,.btn.btn-large [class*=" icon-"].pull-right.icon-2x{margin-left:.2em;}
-.nav-list [class^="icon-"],.nav-list [class*=" icon-"]{line-height:inherit;}
-.icon-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:-35%;}.icon-stack [class^="icon-"],.icon-stack [class*=" icon-"]{display:block;text-align:center;position:absolute;width:100%;height:100%;font-size:1em;line-height:inherit;*line-height:2em;}
-.icon-stack .icon-stack-base{font-size:2em;*line-height:1em;}
-.icon-spin{display:inline-block;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;-webkit-animation:spin 2s infinite linear;animation:spin 2s infinite linear;}
-a .icon-stack,a .icon-spin{display:inline-block;text-decoration:none;}
-@-moz-keyframes spin{0%{-moz-transform:rotate(0deg);} 100%{-moz-transform:rotate(359deg);}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg);} 100%{-webkit-transform:rotate(359deg);}}@-o-keyframes spin{0%{-o-transform:rotate(0deg);} 100%{-o-transform:rotate(359deg);}}@-ms-keyframes spin{0%{-ms-transform:rotate(0deg);} 100%{-ms-transform:rotate(359deg);}}@keyframes spin{0%{transform:rotate(0deg);} 100%{transform:rotate(359deg);}}.icon-rotate-90:before{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);}
-.icon-rotate-180:before{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);}
-.icon-rotate-270:before{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);}
-.icon-flip-horizontal:before{-webkit-transform:scale(-1, 1);-moz-transform:scale(-1, 1);-ms-transform:scale(-1, 1);-o-transform:scale(-1, 1);transform:scale(-1, 1);}
-.icon-flip-vertical:before{-webkit-transform:scale(1, -1);-moz-transform:scale(1, -1);-ms-transform:scale(1, -1);-o-transform:scale(1, -1);transform:scale(1, -1);}
-a .icon-rotate-90:before,a .icon-rotate-180:before,a .icon-rotate-270:before,a .icon-flip-horizontal:before,a .icon-flip-vertical:before{display:inline-block;}
-.icon-glass:before{content:"\f000";}
-.icon-music:before{content:"\f001";}
-.icon-search:before{content:"\f002";}
-.icon-envelope-alt:before{content:"\f003";}
-.icon-heart:before{content:"\f004";}
-.icon-star:before{content:"\f005";}
-.icon-star-empty:before{content:"\f006";}
-.icon-user:before{content:"\f007";}
-.icon-film:before{content:"\f008";}
-.icon-th-large:before{content:"\f009";}
-.icon-th:before{content:"\f00a";}
-.icon-th-list:before{content:"\f00b";}
-.icon-ok:before{content:"\f00c";}
-.icon-remove:before{content:"\f00d";}
-.icon-zoom-in:before{content:"\f00e";}
-.icon-zoom-out:before{content:"\f010";}
-.icon-power-off:before,.icon-off:before{content:"\f011";}
-.icon-signal:before{content:"\f012";}
-.icon-gear:before,.icon-cog:before{content:"\f013";}
-.icon-trash:before{content:"\f014";}
-.icon-home:before{content:"\f015";}
-.icon-file-alt:before{content:"\f016";}
-.icon-time:before{content:"\f017";}
-.icon-road:before{content:"\f018";}
-.icon-download-alt:before{content:"\f019";}
-.icon-download:before{content:"\f01a";}
-.icon-upload:before{content:"\f01b";}
-.icon-inbox:before{content:"\f01c";}
-.icon-play-circle:before{content:"\f01d";}
-.icon-rotate-right:before,.icon-repeat:before{content:"\f01e";}
-.icon-refresh:before{content:"\f021";}
-.icon-list-alt:before{content:"\f022";}
-.icon-lock:before{content:"\f023";}
-.icon-flag:before{content:"\f024";}
-.icon-headphones:before{content:"\f025";}
-.icon-volume-off:before{content:"\f026";}
-.icon-volume-down:before{content:"\f027";}
-.icon-volume-up:before{content:"\f028";}
-.icon-qrcode:before{content:"\f029";}
-.icon-barcode:before{content:"\f02a";}
-.icon-tag:before{content:"\f02b";}
-.icon-tags:before{content:"\f02c";}
-.icon-book:before{content:"\f02d";}
-.icon-bookmark:before{content:"\f02e";}
-.icon-print:before{content:"\f02f";}
-.icon-camera:before{content:"\f030";}
-.icon-font:before{content:"\f031";}
-.icon-bold:before{content:"\f032";}
-.icon-italic:before{content:"\f033";}
-.icon-text-height:before{content:"\f034";}
-.icon-text-width:before{content:"\f035";}
-.icon-align-left:before{content:"\f036";}
-.icon-align-center:before{content:"\f037";}
-.icon-align-right:before{content:"\f038";}
-.icon-align-justify:before{content:"\f039";}
-.icon-list:before{content:"\f03a";}
-.icon-indent-left:before{content:"\f03b";}
-.icon-indent-right:before{content:"\f03c";}
-.icon-facetime-video:before{content:"\f03d";}
-.icon-picture:before{content:"\f03e";}
-.icon-pencil:before{content:"\f040";}
-.icon-map-marker:before{content:"\f041";}
-.icon-adjust:before{content:"\f042";}
-.icon-tint:before{content:"\f043";}
-.icon-edit:before{content:"\f044";}
-.icon-share:before{content:"\f045";}
-.icon-check:before{content:"\f046";}
-.icon-move:before{content:"\f047";}
-.icon-step-backward:before{content:"\f048";}
-.icon-fast-backward:before{content:"\f049";}
-.icon-backward:before{content:"\f04a";}
-.icon-play:before{content:"\f04b";}
-.icon-pause:before{content:"\f04c";}
-.icon-stop:before{content:"\f04d";}
-.icon-forward:before{content:"\f04e";}
-.icon-fast-forward:before{content:"\f050";}
-.icon-step-forward:before{content:"\f051";}
-.icon-eject:before{content:"\f052";}
-.icon-chevron-left:before{content:"\f053";}
-.icon-chevron-right:before{content:"\f054";}
-.icon-plus-sign:before{content:"\f055";}
-.icon-minus-sign:before{content:"\f056";}
-.icon-remove-sign:before{content:"\f057";}
-.icon-ok-sign:before{content:"\f058";}
-.icon-question-sign:before{content:"\f059";}
-.icon-info-sign:before{content:"\f05a";}
-.icon-screenshot:before{content:"\f05b";}
-.icon-remove-circle:before{content:"\f05c";}
-.icon-ok-circle:before{content:"\f05d";}
-.icon-ban-circle:before{content:"\f05e";}
-.icon-arrow-left:before{content:"\f060";}
-.icon-arrow-right:before{content:"\f061";}
-.icon-arrow-up:before{content:"\f062";}
-.icon-arrow-down:before{content:"\f063";}
-.icon-mail-forward:before,.icon-share-alt:before{content:"\f064";}
-.icon-resize-full:before{content:"\f065";}
-.icon-resize-small:before{content:"\f066";}
-.icon-plus:before{content:"\f067";}
-.icon-minus:before{content:"\f068";}
-.icon-asterisk:before{content:"\f069";}
-.icon-exclamation-sign:before{content:"\f06a";}
-.icon-gift:before{content:"\f06b";}
-.icon-leaf:before{content:"\f06c";}
-.icon-fire:before{content:"\f06d";}
-.icon-eye-open:before{content:"\f06e";}
-.icon-eye-close:before{content:"\f070";}
-.icon-warning-sign:before{content:"\f071";}
-.icon-plane:before{content:"\f072";}
-.icon-calendar:before{content:"\f073";}
-.icon-random:before{content:"\f074";}
-.icon-comment:before{content:"\f075";}
-.icon-magnet:before{content:"\f076";}
-.icon-chevron-up:before{content:"\f077";}
-.icon-chevron-down:before{content:"\f078";}
-.icon-retweet:before{content:"\f079";}
-.icon-shopping-cart:before{content:"\f07a";}
-.icon-folder-close:before{content:"\f07b";}
-.icon-folder-open:before{content:"\f07c";}
-.icon-resize-vertical:before{content:"\f07d";}
-.icon-resize-horizontal:before{content:"\f07e";}
-.icon-bar-chart:before{content:"\f080";}
-.icon-twitter-sign:before{content:"\f081";}
-.icon-facebook-sign:before{content:"\f082";}
-.icon-camera-retro:before{content:"\f083";}
-.icon-key:before{content:"\f084";}
-.icon-gears:before,.icon-cogs:before{content:"\f085";}
-.icon-comments:before{content:"\f086";}
-.icon-thumbs-up-alt:before{content:"\f087";}
-.icon-thumbs-down-alt:before{content:"\f088";}
-.icon-star-half:before{content:"\f089";}
-.icon-heart-empty:before{content:"\f08a";}
-.icon-signout:before{content:"\f08b";}
-.icon-linkedin-sign:before{content:"\f08c";}
-.icon-pushpin:before{content:"\f08d";}
-.icon-external-link:before{content:"\f08e";}
-.icon-signin:before{content:"\f090";}
-.icon-trophy:before{content:"\f091";}
-.icon-github-sign:before{content:"\f092";}
-.icon-upload-alt:before{content:"\f093";}
-.icon-lemon:before{content:"\f094";}
-.icon-phone:before{content:"\f095";}
-.icon-unchecked:before,.icon-check-empty:before{content:"\f096";}
-.icon-bookmark-empty:before{content:"\f097";}
-.icon-phone-sign:before{content:"\f098";}
-.icon-twitter:before{content:"\f099";}
-.icon-facebook:before{content:"\f09a";}
-.icon-github:before{content:"\f09b";}
-.icon-unlock:before{content:"\f09c";}
-.icon-credit-card:before{content:"\f09d";}
-.icon-rss:before{content:"\f09e";}
-.icon-hdd:before{content:"\f0a0";}
-.icon-bullhorn:before{content:"\f0a1";}
-.icon-bell:before{content:"\f0a2";}
-.icon-certificate:before{content:"\f0a3";}
-.icon-hand-right:before{content:"\f0a4";}
-.icon-hand-left:before{content:"\f0a5";}
-.icon-hand-up:before{content:"\f0a6";}
-.icon-hand-down:before{content:"\f0a7";}
-.icon-circle-arrow-left:before{content:"\f0a8";}
-.icon-circle-arrow-right:before{content:"\f0a9";}
-.icon-circle-arrow-up:before{content:"\f0aa";}
-.icon-circle-arrow-down:before{content:"\f0ab";}
-.icon-globe:before{content:"\f0ac";}
-.icon-wrench:before{content:"\f0ad";}
-.icon-tasks:before{content:"\f0ae";}
-.icon-filter:before{content:"\f0b0";}
-.icon-briefcase:before{content:"\f0b1";}
-.icon-fullscreen:before{content:"\f0b2";}
-.icon-group:before{content:"\f0c0";}
-.icon-link:before{content:"\f0c1";}
-.icon-cloud:before{content:"\f0c2";}
-.icon-beaker:before{content:"\f0c3";}
-.icon-cut:before{content:"\f0c4";}
-.icon-copy:before{content:"\f0c5";}
-.icon-paperclip:before,.icon-paper-clip:before{content:"\f0c6";}
-.icon-save:before{content:"\f0c7";}
-.icon-sign-blank:before{content:"\f0c8";}
-.icon-reorder:before{content:"\f0c9";}
-.icon-list-ul:before{content:"\f0ca";}
-.icon-list-ol:before{content:"\f0cb";}
-.icon-strikethrough:before{content:"\f0cc";}
-.icon-underline:before{content:"\f0cd";}
-.icon-table:before{content:"\f0ce";}
-.icon-magic:before{content:"\f0d0";}
-.icon-truck:before{content:"\f0d1";}
-.icon-pinterest:before{content:"\f0d2";}
-.icon-pinterest-sign:before{content:"\f0d3";}
-.icon-google-plus-sign:before{content:"\f0d4";}
-.icon-google-plus:before{content:"\f0d5";}
-.icon-money:before{content:"\f0d6";}
-.icon-caret-down:before{content:"\f0d7";}
-.icon-caret-up:before{content:"\f0d8";}
-.icon-caret-left:before{content:"\f0d9";}
-.icon-caret-right:before{content:"\f0da";}
-.icon-columns:before{content:"\f0db";}
-.icon-sort:before{content:"\f0dc";}
-.icon-sort-down:before{content:"\f0dd";}
-.icon-sort-up:before{content:"\f0de";}
-.icon-envelope:before{content:"\f0e0";}
-.icon-linkedin:before{content:"\f0e1";}
-.icon-rotate-left:before,.icon-undo:before{content:"\f0e2";}
-.icon-legal:before{content:"\f0e3";}
-.icon-dashboard:before{content:"\f0e4";}
-.icon-comment-alt:before{content:"\f0e5";}
-.icon-comments-alt:before{content:"\f0e6";}
-.icon-bolt:before{content:"\f0e7";}
-.icon-sitemap:before{content:"\f0e8";}
-.icon-umbrella:before{content:"\f0e9";}
-.icon-paste:before{content:"\f0ea";}
-.icon-lightbulb:before{content:"\f0eb";}
-.icon-exchange:before{content:"\f0ec";}
-.icon-cloud-download:before{content:"\f0ed";}
-.icon-cloud-upload:before{content:"\f0ee";}
-.icon-user-md:before{content:"\f0f0";}
-.icon-stethoscope:before{content:"\f0f1";}
-.icon-suitcase:before{content:"\f0f2";}
-.icon-bell-alt:before{content:"\f0f3";}
-.icon-coffee:before{content:"\f0f4";}
-.icon-food:before{content:"\f0f5";}
-.icon-file-text-alt:before{content:"\f0f6";}
-.icon-building:before{content:"\f0f7";}
-.icon-hospital:before{content:"\f0f8";}
-.icon-ambulance:before{content:"\f0f9";}
-.icon-medkit:before{content:"\f0fa";}
-.icon-fighter-jet:before{content:"\f0fb";}
-.icon-beer:before{content:"\f0fc";}
-.icon-h-sign:before{content:"\f0fd";}
-.icon-plus-sign-alt:before{content:"\f0fe";}
-.icon-double-angle-left:before{content:"\f100";}
-.icon-double-angle-right:before{content:"\f101";}
-.icon-double-angle-up:before{content:"\f102";}
-.icon-double-angle-down:before{content:"\f103";}
-.icon-angle-left:before{content:"\f104";}
-.icon-angle-right:before{content:"\f105";}
-.icon-angle-up:before{content:"\f106";}
-.icon-angle-down:before{content:"\f107";}
-.icon-desktop:before{content:"\f108";}
-.icon-laptop:before{content:"\f109";}
-.icon-tablet:before{content:"\f10a";}
-.icon-mobile-phone:before{content:"\f10b";}
-.icon-circle-blank:before{content:"\f10c";}
-.icon-quote-left:before{content:"\f10d";}
-.icon-quote-right:before{content:"\f10e";}
-.icon-spinner:before{content:"\f110";}
-.icon-circle:before{content:"\f111";}
-.icon-mail-reply:before,.icon-reply:before{content:"\f112";}
-.icon-github-alt:before{content:"\f113";}
-.icon-folder-close-alt:before{content:"\f114";}
-.icon-folder-open-alt:before{content:"\f115";}
-.icon-expand-alt:before{content:"\f116";}
-.icon-collapse-alt:before{content:"\f117";}
-.icon-smile:before{content:"\f118";}
-.icon-frown:before{content:"\f119";}
-.icon-meh:before{content:"\f11a";}
-.icon-gamepad:before{content:"\f11b";}
-.icon-keyboard:before{content:"\f11c";}
-.icon-flag-alt:before{content:"\f11d";}
-.icon-flag-checkered:before{content:"\f11e";}
-.icon-terminal:before{content:"\f120";}
-.icon-code:before{content:"\f121";}
-.icon-reply-all:before{content:"\f122";}
-.icon-mail-reply-all:before{content:"\f122";}
-.icon-star-half-full:before,.icon-star-half-empty:before{content:"\f123";}
-.icon-location-arrow:before{content:"\f124";}
-.icon-crop:before{content:"\f125";}
-.icon-code-fork:before{content:"\f126";}
-.icon-unlink:before{content:"\f127";}
-.icon-question:before{content:"\f128";}
-.icon-info:before{content:"\f129";}
-.icon-exclamation:before{content:"\f12a";}
-.icon-superscript:before{content:"\f12b";}
-.icon-subscript:before{content:"\f12c";}
-.icon-eraser:before{content:"\f12d";}
-.icon-puzzle-piece:before{content:"\f12e";}
-.icon-microphone:before{content:"\f130";}
-.icon-microphone-off:before{content:"\f131";}
-.icon-shield:before{content:"\f132";}
-.icon-calendar-empty:before{content:"\f133";}
-.icon-fire-extinguisher:before{content:"\f134";}
-.icon-rocket:before{content:"\f135";}
-.icon-maxcdn:before{content:"\f136";}
-.icon-chevron-sign-left:before{content:"\f137";}
-.icon-chevron-sign-right:before{content:"\f138";}
-.icon-chevron-sign-up:before{content:"\f139";}
-.icon-chevron-sign-down:before{content:"\f13a";}
-.icon-html5:before{content:"\f13b";}
-.icon-css3:before{content:"\f13c";}
-.icon-anchor:before{content:"\f13d";}
-.icon-unlock-alt:before{content:"\f13e";}
-.icon-bullseye:before{content:"\f140";}
-.icon-ellipsis-horizontal:before{content:"\f141";}
-.icon-ellipsis-vertical:before{content:"\f142";}
-.icon-rss-sign:before{content:"\f143";}
-.icon-play-sign:before{content:"\f144";}
-.icon-ticket:before{content:"\f145";}
-.icon-minus-sign-alt:before{content:"\f146";}
-.icon-check-minus:before{content:"\f147";}
-.icon-level-up:before{content:"\f148";}
-.icon-level-down:before{content:"\f149";}
-.icon-check-sign:before{content:"\f14a";}
-.icon-edit-sign:before{content:"\f14b";}
-.icon-external-link-sign:before{content:"\f14c";}
-.icon-share-sign:before{content:"\f14d";}
-.icon-compass:before{content:"\f14e";}
-.icon-collapse:before{content:"\f150";}
-.icon-collapse-top:before{content:"\f151";}
-.icon-expand:before{content:"\f152";}
-.icon-euro:before,.icon-eur:before{content:"\f153";}
-.icon-gbp:before{content:"\f154";}
-.icon-dollar:before,.icon-usd:before{content:"\f155";}
-.icon-rupee:before,.icon-inr:before{content:"\f156";}
-.icon-yen:before,.icon-jpy:before{content:"\f157";}
-.icon-renminbi:before,.icon-cny:before{content:"\f158";}
-.icon-won:before,.icon-krw:before{content:"\f159";}
-.icon-bitcoin:before,.icon-btc:before{content:"\f15a";}
-.icon-file:before{content:"\f15b";}
-.icon-file-text:before{content:"\f15c";}
-.icon-sort-by-alphabet:before{content:"\f15d";}
-.icon-sort-by-alphabet-alt:before{content:"\f15e";}
-.icon-sort-by-attributes:before{content:"\f160";}
-.icon-sort-by-attributes-alt:before{content:"\f161";}
-.icon-sort-by-order:before{content:"\f162";}
-.icon-sort-by-order-alt:before{content:"\f163";}
-.icon-thumbs-up:before{content:"\f164";}
-.icon-thumbs-down:before{content:"\f165";}
-.icon-youtube-sign:before{content:"\f166";}
-.icon-youtube:before{content:"\f167";}
-.icon-xing:before{content:"\f168";}
-.icon-xing-sign:before{content:"\f169";}
-.icon-youtube-play:before{content:"\f16a";}
-.icon-dropbox:before{content:"\f16b";}
-.icon-stackexchange:before{content:"\f16c";}
-.icon-instagram:before{content:"\f16d";}
-.icon-flickr:before{content:"\f16e";}
-.icon-adn:before{content:"\f170";}
-.icon-bitbucket:before{content:"\f171";}
-.icon-bitbucket-sign:before{content:"\f172";}
-.icon-tumblr:before{content:"\f173";}
-.icon-tumblr-sign:before{content:"\f174";}
-.icon-long-arrow-down:before{content:"\f175";}
-.icon-long-arrow-up:before{content:"\f176";}
-.icon-long-arrow-left:before{content:"\f177";}
-.icon-long-arrow-right:before{content:"\f178";}
-.icon-apple:before{content:"\f179";}
-.icon-windows:before{content:"\f17a";}
-.icon-android:before{content:"\f17b";}
-.icon-linux:before{content:"\f17c";}
-.icon-dribbble:before{content:"\f17d";}
-.icon-skype:before{content:"\f17e";}
-.icon-foursquare:before{content:"\f180";}
-.icon-trello:before{content:"\f181";}
-.icon-female:before{content:"\f182";}
-.icon-male:before{content:"\f183";}
-.icon-gittip:before{content:"\f184";}
-.icon-sun:before{content:"\f185";}
-.icon-moon:before{content:"\f186";}
-.icon-archive:before{content:"\f187";}
-.icon-bug:before{content:"\f188";}
-.icon-vk:before{content:"\f189";}
-.icon-weibo:before{content:"\f18a";}
-.icon-renren:before{content:"\f18b";}
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/css/lib/timeline.css
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/css/lib/timeline.css b/ocw-ui/frontend/app/css/lib/timeline.css
deleted file mode 100644
index 9618dbb..0000000
--- a/ocw-ui/frontend/app/css/lib/timeline.css
+++ /dev/null
@@ -1,193 +0,0 @@
-/**
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the 'Software'), to deal in the Software without
- * restriction, including without limitation the rights to
- * use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons
- * to whom the Software is furnished to do so, subject to the
- * following conditions:
- *
- * The above copyright notice and this permission
- * notice shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
- * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT
- * OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-
-div.timeline-frame {
- border: 1px solid #BEBEBE;
- overflow: hidden;
-}
-
-div.timeline-axis {
- border-color: #BEBEBE;
- border-width: 1px;
- border-top-style: solid;
-}
-div.timeline-axis-grid {
- border-left-style: solid;
- border-width: 1px;
-}
-div.timeline-axis-grid-minor {
- border-color: #e5e5e5;
-}
-div.timeline-axis-grid-major {
- border-color: #bfbfbf;
-}
-div.timeline-axis-text {
- color: #4D4D4D;
- padding: 3px;
- white-space: nowrap;
-}
-
-div.timeline-axis-text-minor {
-}
-
-div.timeline-axis-text-major {
-}
-
-div.timeline-event {
- color: #1A1A1A;
- border-color: #97B0F8;
- background-color: #D5DDF6;
- display: inline-block;
-}
-
-div.timeline-event-selected {
- border-color: #FFC200;
- background-color: #FFF785;
- z-index: 999;
-}
-
-div.timeline-event-cluster {
- /* TODO: use another color or pattern? */
- background: #97B0F8 url('img/cluster_bg.png');
- color: white;
-}
-div.timeline-event-cluster div.timeline-event-dot {
- border-color: #D5DDF6;
-}
-
-div.timeline-event-box {
- text-align: center;
- border-style: solid;
- border-width: 1px;
- border-radius: 5px;
- -moz-border-radius: 5px; /* For Firefox 3.6 and older */
-}
-
-div.timeline-event-dot {
- border-style: solid;
- border-width: 5px;
- border-radius: 5px;
- -moz-border-radius: 5px; /* For Firefox 3.6 and older */
-}
-
-div.timeline-event-range {
- border-style: solid;
- border-width: 1px;
- border-radius: 2px;
- -moz-border-radius: 2px; /* For Firefox 3.6 and older */
-}
-
-div.timeline-event-range-drag-left {
- cursor: w-resize;
- z-index: 1000;
-}
-
-div.timeline-event-range-drag-right {
- cursor: e-resize;
- z-index: 1000;
-}
-
-
-div.timeline-event-line {
- border-left-width: 1px;
- border-left-style: solid;
-}
-
-div.timeline-event-content {
- margin: 5px;
- white-space: nowrap;
- overflow: hidden;
-}
-
-div.timeline-groups-axis {
- border-color: #BEBEBE;
- border-width: 1px;
-}
-div.timeline-groups-text {
- color: #4D4D4D;
- padding-left: 10px;
- padding-right: 10px;
-}
-
-div.timeline-currenttime {
- background-color: #FF7F6E;
- width: 2px;
-}
-
-div.timeline-customtime {
- background-color: #6E94FF;
- width: 2px;
- cursor: move;
-}
-
-div.timeline-navigation {
- font-family: arial;
- font-size: 20px;
- font-weight: bold;
- color: gray;
-
- border: 1px solid #BEBEBE;
- background-color: #F5F5F5;
- border-radius: 2px;
- -moz-border-radius: 2px; /* For Firefox 3.6 and older */
-}
-
-div.timeline-navigation-new, div.timeline-navigation-delete,
-div.timeline-navigation-zoom-in, div.timeline-navigation-zoom-out,
-div.timeline-navigation-move-left, div.timeline-navigation-move-right {
- cursor: pointer;
- padding: 10px 10px;
- float: left;
- text-decoration: none;
- border-color: #BEBEBE; /* border is used for the separator between new and navigation buttons */
-
- width: 16px;
- height: 16px;
-}
-
-div.timeline-navigation-new {
- background: url('img/16/new.png') no-repeat center;
-}
-
-div.timeline-navigation-delete {
- padding: 0px;
- padding-left: 5px;
- background: url('img/16/delete.png') no-repeat center;
-}
-
-div.timeline-navigation-zoom-in {
- background: url('img/16/zoomin.png') no-repeat center;
-}
-
-div.timeline-navigation-zoom-out {
- background: url('img/16/zoomout.png') no-repeat center;
-}
-
-div.timeline-navigation-move-left {
- background: url('img/16/moveleft.png') no-repeat center;
-}
-
-div.timeline-navigation-move-right {
- background: url('img/16/moveright.png') no-repeat center;
-}
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/favicon.ico
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/favicon.ico b/ocw-ui/frontend/app/favicon.ico
new file mode 100644
index 0000000..6527905
Binary files /dev/null and b/ocw-ui/frontend/app/favicon.ico differ
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/font/FontAwesome.otf
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/font/FontAwesome.otf b/ocw-ui/frontend/app/font/FontAwesome.otf
deleted file mode 100644
index 7012545..0000000
Binary files a/ocw-ui/frontend/app/font/FontAwesome.otf and /dev/null differ
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/font/fontawesome-webfont.eot
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/font/fontawesome-webfont.eot b/ocw-ui/frontend/app/font/fontawesome-webfont.eot
deleted file mode 100755
index 0662cb9..0000000
Binary files a/ocw-ui/frontend/app/font/fontawesome-webfont.eot and /dev/null differ
[06/28] CLIMATE-512 - Replace frontend with new Yeoman/Grunt/Bower
frontend
Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/js/services/EvaluationSettings.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/js/services/EvaluationSettings.js b/ocw-ui/frontend/app/js/services/EvaluationSettings.js
deleted file mode 100755
index 02b4a63..0000000
--- a/ocw-ui/frontend/app/js/services/EvaluationSettings.js
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
-**/
-
-// EvaluationSettings gives controllers access to the user's selected evaluation settings.
-App.Services.service('evaluationSettings', function($rootScope, $http) {
- $http.get($rootScope.baseURL + '/processing/metrics/').then(function(data) {
- metrics_data = data['data']['metrics'];
- metrics = [];
-
- for (var i = 0; i < metrics_data.length; ++i) {
- metrics.push({'name': metrics_data[i], 'select': false});
- }
-
- settings['metrics'] = metrics;
- });
-
- var settings = {
- 'metrics': [],
- 'temporal': {
- 'options': ['daily', 'monthly', 'yearly'],
- 'selected': 'yearly',
- },
- 'spatialSelect': null,
- };
-
- return {
- getSettings: function() {
- return settings;
- }
- };
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/js/services/RegionSelectParams.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/js/services/RegionSelectParams.js b/ocw-ui/frontend/app/js/services/RegionSelectParams.js
deleted file mode 100644
index 4f36be6..0000000
--- a/ocw-ui/frontend/app/js/services/RegionSelectParams.js
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
-**/
-
-// RegionSelectParams gives controllers access to the user selected evaluation region.
-App.Services.service('regionSelectParams', function() {
- var parameters = {
- "areValid" : true,
- "latMin" : "",
- "latMax" : "",
- "lonMin" : "",
- "lonMax" : "",
- "start" : "",
- "end" : "",
- };
-
- return {
- getParameters: function() {
- return parameters;
- },
- };
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/js/services/SelectedDatasetInformation.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/js/services/SelectedDatasetInformation.js b/ocw-ui/frontend/app/js/services/SelectedDatasetInformation.js
deleted file mode 100644
index 8378212..0000000
--- a/ocw-ui/frontend/app/js/services/SelectedDatasetInformation.js
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
-**/
-
-// Service for giving controllers access to the information on datasets that
-// the user has selected for evaluation.
-App.Services.service('selectedDatasetInformation', function() {
- var datasets = [];
-
- return {
- getDatasets: function() {
- return datasets;
- },
- getDatasetCount: function() {
- return datasets.length;
- },
- // TODO: Define the structure of the objects that are added with addDataset.
- addDataset: function(dataset) {
- // All datasets need a shouldDisplay attribute that is used when rendering
- // the overlays on the map!
- dataset.shouldDisplay = false;
- // The regrid attribute indicates which dataset should be used for spatial regridding
- dataset.regrid = false;
-
- datasets.push(dataset);
- },
- removeDataset: function(index) {
- datasets.splice(index, 1);
- },
- clearDatasets: function() {
- datasets.length = 0;
- },
- };
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/partials/main.html
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/partials/main.html b/ocw-ui/frontend/app/partials/main.html
deleted file mode 100644
index f100fde..0000000
--- a/ocw-ui/frontend/app/partials/main.html
+++ /dev/null
@@ -1,261 +0,0 @@
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<!-- Modal for evaluation settings -->
- <bootstrap-modal modal-id="evaluationSettings">
- <div class="modal-header">
- <button class="close">×</button>
- <h3>Settings</h3>
- </div>
- <div class="modal-body" ng-controller="SettingsCtrl">
- <h4>Select the metrics you would like to run.</h4>
- <div ng-repeat="metric in settings.metrics">
- <label><input type="checkbox" ng-model="metric.select"> {{metric.name}}</label>
- </div>
- <hr />
- <h4>Select how you would like to temporally re-grid the datasets.</h4>
- <select ng-model="settings.temporal.selected" ng-options="opt for opt in settings.temporal.options"></select>
- <hr />
- <h4>Select which dataset to use as the reference.</h4>
- <select ng-model="settings.spatialSelect" ng-options="dataset as dataset.name for dataset in datasets"></select>
- <hr />
- <!-- Temporarily hidden for work on CLIMATE-365.-->
- <div ng-hide=true>
- <h4>Select a file which will define the bounds of subregions.</h4>
- <form class="form-inline" autocomplete="off">
- <input id="subregionFileInput" predictive-file-browser-input ng-model="settings.subregionFile" type="text" class="input-xlarge" autocomplete="off" />
- </form>
- </div>
- <!--End hidden section for CLIMATE-365-->
- </div>
- <div class="modal-footer">
- <a href="#" class="btn btn-warning close">Close</a>
- </div>
- </bootstrap-modal>
-<!-- END - Modal for evaluation settings -->
-
- <div class="row-fluid">
- <div class="span12">
- <div class="row-fluid">
- <div class="span6">
- <!--Dataset Select Controls-->
- <div ng-controller="DatasetSelectCtrl">
- <div class="row-fluid">
- <div class="span1 offset10">
- <button class="btn btn-link no-color-link" ng-click="clearDatasets()" ng-disabled="shouldDisableClearButton()">
- <span tooltip-placement="left" tooltip-popup-delay="700" tooltip="Clear Datasets">
- <i class="icon-trash icon-2x"></i>
- </span>
- </button>
- </div>
- <div class="span1">
- <button class="btn btn-link no-color-link" ng-click="open()">
- <span tooltip-placement="left" tooltip-popup-delay="700" tooltip="Add Dataset">
- <i class="icon-plus icon-2x"></i>
- </span>
- </button>
- </div>
- </div>
- <!-- Modal for dataset selection -->
- <div modal="datasetSelect" close="close()" options="opts">
- <div class="modal-header">
- <h3>Dataset Select</h3>
- </div>
- <div class="modal-body">
- <tabset>
- <tab ng-repeat="tab in templates" heading="{{tab.title}}" active="tab.active" disabled="tab.disabled">
- <div ng-include src="tab.url"></div>
- </tab>
- <li class="pull-right">Queued Datasets: {{datasetCount.length}}</li>
- </tabset>
- </div>
- <div class="modal-footer">
- <button class="btn btn-warning cancel" ng-click="close()">Close</button>
- </div>
- </div>
- <!-- END - Modal for dataset selection -->
- <div class="row-fluid">
- <div class="span12">
- <hr />
- </div>
- </div>
- </div>
- <!--Dataset display-->
- <div ng-controller="DatasetDisplayCtrl" id="datasetDiv">
- <div ng-repeat="dataset in datasets">
- <div class="row-fluid">
- <!--Data section-->
- <div class="span8 offset1 muted">
- {{dataset.name}}
- </div>
- <div class="span1 offset2">
- <span tooltip-placement="left" tooltip-popup-delay="700" tooltip="Remove Dataset">
- <a class="no-color-link" href="#" ng-click="removeDataset($index)">
- <i class="icon-remove"></i>
- </a>
- </span>
- </div>
- </div>
- <!--Time Values!-->
- <div class="row-fluid">
- <!--Dataset Info Section-->
- <div class="span9">
- <div class="row-fluid">
- <div class="span2 offset1 text-center">Start:</div>
- <div class="span2">
- <div class="span2 text-center">{{dataset.timeVals.start | ISODateToMiddleEndian}}</div>
- </div>
- <div class="span2 text-center">End:</div>
- <div class="span2">
- <div class="span2 text-center">{{dataset.timeVals.end | ISODateToMiddleEndian}}</div>
- </div>
- </div>
- <!--Lat/Long Values!-->
- <div class="row-fluid">
- <div class="span2 offset1 text-center">North:</div>
- <div class="span2 text-center">
- {{dataset.latlonVals.latMax | number:2}}
- </div>
- <div class="span2 text-center">West:</div>
- <div class="span2 text-center">
- {{dataset.latlonVals.lonMin | number:2}}
- </div>
- </div>
- <div class="row-fluid">
- <div class="span2 offset1 text-center">South:</div>
- <div class="span2 text-center">
- {{dataset.latlonVals.latMin | number:2}}
- </div>
- <div class="span2 text-center">East:</div>
- <div class="span2 text-center">
- {{dataset.latlonVals.lonMax | number:2}}
- </div>
- </div>
- </div>
- <!--Preview Map Section-->
- <div class="span3">
- <!--If the dataset is global we show a picture of a globe instead of the actual map-->
- <div ng-hide="dataset.latlonVals.lonMin == -180 && dataset.latlonVals.lonMax == 180 &&
- dataset.latlonVals.latMin == -90 && dataset.latlonVals.latMax == 90"
- preview-map="dataset" index="$index"></div>
- <div ng-show="dataset.latlonVals.lonMin == -180 && dataset.latlonVals.lonMax == 180 &&
- dataset.latlonVals.latMin == -90 && dataset.latlonVals.latMax == 90">
- <img src="img/globe.png" class="preview-map">
- </div>
- </div>
- </div>
- <div class="row-fluid">
- <div class="span6 offset3"><hr /></div>
- </div>
- </div>
- </div>
- </div>
- <div class="span6">
- <!--Map-->
- <div class="row-fluid" ng-controller="WorldMapCtrl">
- <div class="span12">
- <leaflet-map id="map"></leaflet-map>
- </div>
- </div>
-
- <!--Timeline-->
- <div class="row-fluid">
- <div class="span12" ng-controller="TimelineCtrl">
- <div class="timeline"></div>
- </div>
- </div>
-
- <div class="row-fluid">
- <div class="span12" ng-controller="ParameterSelectCtrl">
- <div class="row-fluid">
- <div class="span2 text-center">Start Date:</div>
- <div class="span4">
- <form>
- <!--This styling HAD to be done inline. Using a class wouldn't work and for some -->
- <!--reason the input boxes refused to be 100% wide when their span size was set.-->
- <input ng-disabled="shouldDisableControls()" on-blur="checkParameters();" ng-model="displayParams.start" ui-date="datepickerSettings" ui-date-format="yy-mm-dd" type="text" class="text-center span4" style="width:100%" />
- </form>
- </div>
- <div class="span2 text-center">End Date:</div>
- <div class="span4">
- <form>
- <!--This styling HAD to be done inline. Using a class wouldn't work and for some -->
- <!--reason the input boxes refused to be 100% wide when their span size was set.-->
- <input ng-disabled="shouldDisableControls()" on-blur="checkParameters();" ng-model="displayParams.end" ui-date="datepickerSettings" ui-date-format="yy-mm-dd" type="text" class="text-center span4" style="width:100%"/>
- </form>
- </div>
- </div>
- <div class="row-fluid">
- <div class="span2 text-center">North:</div>
- <div class="span4">
- <form action="">
- <input ng-disabled="shouldDisableControls()" ng-model="displayParams.latMax" on-blur="checkParameters();" type="text" class="span4 text-center" style="width:100%"/>
- </form>
- </div>
- <div class="span2 text-center">South:</div>
- <div class="span4">
- <form action="">
- <!--This styling HAD to be done inline. Using a class wouldn't work and for some -->
- <!--reason the input boxes refused to be 100% wide when their span size was set.-->
- <input ng-disabled="shouldDisableControls()" ng-model="displayParams.latMin" on-blur="checkParameters();" type="text" class="span4 text-center" style="width:100%"/>
- </form>
- </div>
- </div>
- <div class="row-fluid">
- <div class="span2 text-center">East:</div>
- <div class="span4">
- <form>
- <!--This styling HAD to be done inline. Using a class wouldn't work and for some -->
- <!--reason the input boxes refused to be 100% wide when their span size was set.-->
- <input ng-disabled="shouldDisableControls()" ng-model="displayParams.lonMax" on-blur="checkParameters();" type="text" class="span4 text-center" style="width:100%"/>
- </form>
- </div>
- <div class="span2 text-center">West:</div>
- <div class="span4">
- <form>
- <!--This styling HAD to be done inline. Using a class wouldn't work and for some -->
- <!--reason the input boxes refused to be 100% wide when their span size was set.-->
- <input ng-disabled="shouldDisableControls()" ng-model="displayParams.lonMin" on-blur="checkParameters();"; type="text" class="span4 text-center" style="width:100%"/>
- </form>
- </div>
- </div>
- <div class="row-fluid">
- <div class="span2 offset6">
- <button class="btn btn-link no-color-link pull-right" bootstrap-modal-open="evaluationSettings">
- <span tooltip-placement="left" tooltip-popup-delay="700" tooltip="Settings">
- <span class="icon-stack">
- <i class="icon-check-empty icon-stack-base"></i>
- <i class="icon-cogs"></i>
- </span>
- </span>
- </button>
- </div>
- <div class="span4">
- <button ng-click="runEvaluation()" ng-disabled="shouldDisableEvaluateButton()" class="btn btn-block btn-primary">
- <div ng-hide="runningEval">Evaluate</div>
- <div ng-show="runningEval"><i class="icon-spinner icon-spin"></i></div>
- </button>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/partials/modelSelect.html
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/partials/modelSelect.html b/ocw-ui/frontend/app/partials/modelSelect.html
deleted file mode 100644
index 6a28a3f..0000000
--- a/ocw-ui/frontend/app/partials/modelSelect.html
+++ /dev/null
@@ -1,86 +0,0 @@
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<div class="container">
- <div class="row">
- <div class="span10 offset1 columns">
- <div class="row">
- <div class="span10">
- <center>
- <form id="modelSelectorForm">
- <input type="file" name="modelSelector">
- </form>
- </center>
- </div>
- </div>
- <div class="row">
- <div class="span10 offset2">
- <form class="form-horizontal" id="parameterSelectorForm">
- <div class="control-group">
- <label class="control-label" for="paramSelect">Parameter Value</label>
- <div class="controls">
- <select id="paramSelect">
- <option ng-repeat="param in modelParameters">
- {{param.text}}
- </option>
- </select>
- </div>
- </div>
- <div class="control-group">
- <label class="control-label" for="latSelect">Latitude Variable</label>
- <div class="controls">
- <select id="latSelect">
- <option ng-repeat="lat in latVariables">
- {{lat.text}}
- </option>
- </select>
- </div>
- </div>
- <div class="control-group">
- <label class="control-label" for="lonSelect">Longitude Variable</label>
- <div class"controls">
- <select id="lonSelect">
- <option ng-repeat="lon in lonVariables">
- {{lon.text}}
- </option>
- </select>
- </div>
- </div>
- <div class="control-group">
- <label class="control-label" for="dateTimeSelect">Date/Time Variable</label>
- <div class="controls">
- <select id="dateTimeSelect">
- <option ng-repeat="dateTime in dateTimeVariables">
- {{dateTime.text}}
- </option>
- </select>
- </div>
- </div>
- <div class="control-group">
- <div class="controls">
- <button type="submit" class="btn btn-warn">Cancel</button>
- <button type="submit" class="btn">Add Model</button>
- </div>
- </div>
- </form>
- </div>
- </div>
- </div>
- </div>
-</div>
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/partials/results.detail.html
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/partials/results.detail.html b/ocw-ui/frontend/app/partials/results.detail.html
deleted file mode 100644
index a5c4d7c..0000000
--- a/ocw-ui/frontend/app/partials/results.detail.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<div>
- <h2>{{result}}</h2>
- <div class="row-fluid text-center">
- <div class="{{alertClass}}">{{alertMessage}}</div>
- <ul>
- <li ng-repeat="figure in figures">
- <img class="result-figures" ng-src="{{baseURL}}/static/eval_results/{{figure}}" alt="" />
- </li>
- </ul>
- </div>
-</div>
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/partials/results.html
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/partials/results.html b/ocw-ui/frontend/app/partials/results.html
deleted file mode 100644
index a21dadc..0000000
--- a/ocw-ui/frontend/app/partials/results.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<div class="row">
- <div class="span3">
- <div id="results-sidebar" class="pa-sidebar well well-small">
- <ul class="nav nav-list">
- <li id="results-sidebar-header" class="nav-header">Latest Run Results</li>
- <li ng-repeat="result in results"
- ng-class="{ active: $state.includes('results.detail') && $stateParams.resultId == result }">
- <a href="#/results/{{result.replace('/', '')}}" >{{result}}</a>
- </li>
- </ul>
- <div ui-view="menu"></div>
- </div>
- </div>
- <div class="span9" ui-view ng-animate="{enter:'fade-enter'}"></div>
-</div>
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/partials/results.list.html
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/partials/results.list.html b/ocw-ui/frontend/app/partials/results.list.html
deleted file mode 100644
index ef1d9d7..0000000
--- a/ocw-ui/frontend/app/partials/results.list.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<h4>Select one of your previous runs. If none are displayed, please return
- to the main page and start one!</h4>
-
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/partials/selectObservation.html
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/partials/selectObservation.html b/ocw-ui/frontend/app/partials/selectObservation.html
deleted file mode 100644
index c364f75..0000000
--- a/ocw-ui/frontend/app/partials/selectObservation.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<div ng-controller="ObservationSelectCtrl">
- <form class="form-inline" autocomplete="off">
- <input id="observationFileInput" predictive-file-browser-input ng-model="filePathInput" type="text" class="input-xlarge" autocomplete="off" />
- <button class="btn" ng-click="uploadLocalFile()" ng-disabled="shouldDisableLoadButton()">
- <div ng-hide="loadingFile">Parse File</div>
- <div ng-show="loadingFile"><i class="icon-spinner icon-spin"></i></div>
- </button>
- </form>
-
- <div class="row">
- <div class="span2 text-center">
- Evaluation Variable
- </div>
- <div class="span3">
- <select ng-model="paramSelect" ng-options="param for param in params"></select>
- </div>
- <div class="span2 text-center">
- Latitude Variable
- </div>
- <div class="span3">
- <select ng-model="latsSelect" ng-options="lat for lat in lats"></select>
- </div>
- <div class="span2 text-center">
- Longitude Variable
- </div>
- <div class="span3">
- <select ng-model="lonsSelect" ng-options="lon for lon in lons"></select>
- </div>
- <div class="span2 text-center">
- Date/Time Variable
- </div>
- <div class="span3">
- <select ng-model="timeSelect" ng-options="time for time in times"></select>
- </div>
- </div>
-
- <button class="btn btn-primary pull-left" ng-click="addDataSet()">Add Dataset</button>
- <div class="pull-left small-alert" ng-show="fileAdded">Successfully added dataset...</div>
-</div>
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/partials/selectRcmed.html
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/partials/selectRcmed.html b/ocw-ui/frontend/app/partials/selectRcmed.html
deleted file mode 100644
index c454165..0000000
--- a/ocw-ui/frontend/app/partials/selectRcmed.html
+++ /dev/null
@@ -1,44 +0,0 @@
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<div ng-controller="RcmedSelectionCtrl">
- <div class="row">
- <div class="span5">
- Select the RCMED dataset that you would like use.
- </div>
- </div>
- <div class="row">
- <div class="span4">
- <select ng-change="dataSelectUpdated()" class="span5" ng-model="datasetSelection" ng-options="obs as obs.longname for obs in availableObs"></select>
- </div>
- </div>
- <div class="row">
- <div class="span5">
- Select the dataset parameter that you would like to test.
- </div>
- </div>
- <div class="row">
- <div class="span4">
- <select class="span3" ng-model="parameterSelection" ng-options="param as param.shortname for param in retrievedObsParams"></select>
- </div>
- </div>
-
- <button class="btn btn-primary pull-left" ng-click="addObservation()">Add Observation</button>
- <div class="pull-left small-alert" ng-show="fileAdded">Successfully added dataset...</div>
-</div>
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/robots.txt
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/robots.txt b/ocw-ui/frontend/app/robots.txt
new file mode 100644
index 0000000..9417495
--- /dev/null
+++ b/ocw-ui/frontend/app/robots.txt
@@ -0,0 +1,3 @@
+# robotstxt.org
+
+User-agent: *
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/scripts/app.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/scripts/app.js b/ocw-ui/frontend/app/scripts/app.js
new file mode 100644
index 0000000..8dca2dc
--- /dev/null
+++ b/ocw-ui/frontend/app/scripts/app.js
@@ -0,0 +1,96 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http: *www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+'use strict';
+
+/**
+ * @ngdoc overview
+ * @name ocwUiApp
+ * @description
+ * # ocwUiApp
+ *
+ * Main module of the application.
+ */
+angular
+ .module('ocwUiApp', [
+ 'ngAnimate',
+ 'ngCookies',
+ 'ngResource',
+ 'ngRoute',
+ 'ui.router',
+ 'ui.bootstrap',
+ 'ui.date',
+ ])
+ .config(['$stateProvider', '$routeProvider', '$urlRouterProvider',
+ function ($stateProvider, $routeProvider, $urlRouterProvider) {
+ $urlRouterProvider
+ .when('/r?id', '/results/:id')
+ .otherwise('/evaluate');
+
+ $routeProvider
+ .when('/evaluation/:id', {
+ redirectTo: '/results/:id',
+ })
+ .when('/', {
+ redirectTo: '/evaluate',
+ });
+
+ $stateProvider
+ .state('main',{
+ url: '/evaluate',
+ templateUrl: 'views/main.html',
+ })
+ .state('results', {
+ url: '/results',
+ abstract: true,
+ templateUrl: 'views/results.html',
+ controller: 'ResultCtrl'
+ })
+ .state('results.list', {
+ // parent: 'results',
+ url: '',
+ templateUrl: 'views/resultslist.html',
+ })
+ .state('results.detail', {
+ // parent: 'results',
+ url: '/{resultId}',
+ views: {
+ '': {
+ templateUrl: 'views/resultsdetail.html',
+ controller: 'ResultDetailCtrl'
+ },
+ 'menu': {
+ templateProvider:
+ [ '$stateParams',
+ function ($stateParams){
+ return '<hr><small class="muted">result ID: ' + $stateParams.resultId + '</small>';
+ }],
+ },
+ },
+ });
+ }])
+ .run(['$rootScope', '$state', '$stateParams',
+ function ($rootScope, $state, $stateParams) {
+ $rootScope.$state = $state;
+ $rootScope.$stateParams = $stateParams;
+ $rootScope.evalResults = '';
+ $rootScope.fillColors = ['#ff0000', '#00c90d', '#cd0074', '#f3fd00'];
+ $rootScope.surroundColors = ['#a60000', '#008209', '#8f004b', '#93a400'];
+ $rootScope.baseURL = 'http://localhost:8082';
+ }]);
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/scripts/controllers/datasetdisplay.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/scripts/controllers/datasetdisplay.js b/ocw-ui/frontend/app/scripts/controllers/datasetdisplay.js
new file mode 100644
index 0000000..f7d2a77
--- /dev/null
+++ b/ocw-ui/frontend/app/scripts/controllers/datasetdisplay.js
@@ -0,0 +1,43 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http: *www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+'use strict';
+
+/**
+ * @ngdoc function
+ * @name ocwUiApp.controller:DatasetDisplayCtrl
+ * @description
+ * # DatasetDisplayCtrl
+ * Controller of the ocwUiApp
+ */
+angular.module('ocwUiApp')
+ .controller('DatasetDisplayCtrl', ['$rootScope', '$scope', 'selectedDatasetInformation',
+ function($rootScope, $scope, selectedDatasetInformation) {
+ $scope.datasets = selectedDatasetInformation.getDatasets();
+
+ $scope.removeDataset = function($index) {
+ selectedDatasetInformation.removeDataset($index);
+ };
+
+ $scope.setRegridBase = function(index) {
+ for (var i = 0; i < $scope.datasets.length; i++) {
+ $scope.datasets[i].regrid = ((i === index) ? $scope.datasets[i].regrid : false);
+ }
+ };
+}]);
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/scripts/controllers/datasetselect.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/scripts/controllers/datasetselect.js b/ocw-ui/frontend/app/scripts/controllers/datasetselect.js
new file mode 100644
index 0000000..b6b52ef
--- /dev/null
+++ b/ocw-ui/frontend/app/scripts/controllers/datasetselect.js
@@ -0,0 +1,64 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http: *www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+'use strict';
+
+/**
+ * @ngdoc function
+ * @name ocwUiApp.controller:DatasetSelectCtrl
+ * @description
+ * # DatasetSelectCtrl
+ * Controller of the ocwUiApp
+ */
+angular.module('ocwUiApp')
+ .controller('DatasetSelectCtrl', ['$scope', 'selectedDatasetInformation',
+ function($scope, selectedDatasetInformation) {
+ // Grab a copy of the datasets so we can display a count to the user!
+ $scope.datasetCount = selectedDatasetInformation.getDatasets();
+
+ $scope.shouldDisableClearButton = function() {
+ return (selectedDatasetInformation.getDatasetCount() === 0);
+ };
+
+ $scope.clearDatasets = function() {
+ selectedDatasetInformation.clearDatasets();
+ };
+
+ $scope.open = function () {
+ $scope.datasetSelect = true;
+ };
+
+ $scope.close = function () {
+ $scope.datasetSelect = false;
+ };
+
+ $scope.opts = {
+ backdropFade: true,
+ dialogFade: true,
+ };
+
+ $scope.templates = [
+ {title:'Local File', url: 'views/selectobservation.html'},
+ {title:'RCMED', url: 'views/selectrcmed.html'},
+ {title:'ESG', disabled: true}
+ ];
+
+ $scope.template = $scope.templates[0];
+ }
+ ]);
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/scripts/controllers/main.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/scripts/controllers/main.js b/ocw-ui/frontend/app/scripts/controllers/main.js
new file mode 100644
index 0000000..16008c0
--- /dev/null
+++ b/ocw-ui/frontend/app/scripts/controllers/main.js
@@ -0,0 +1,36 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http: *www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+'use strict';
+
+/**
+ * @ngdoc function
+ * @name ocwUiApp.controller:MainCtrl
+ * @description
+ * # MainCtrl
+ * Controller of the ocwUiApp
+ */
+angular.module('ocwUiApp')
+ .controller('MainCtrl', function ($scope) {
+ $scope.awesomeThings = [
+ 'HTML5 Boilerplate',
+ 'AngularJS',
+ 'Karma'
+ ];
+ });
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/scripts/controllers/observationselect.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/scripts/controllers/observationselect.js b/ocw-ui/frontend/app/scripts/controllers/observationselect.js
new file mode 100644
index 0000000..6dfbb57
--- /dev/null
+++ b/ocw-ui/frontend/app/scripts/controllers/observationselect.js
@@ -0,0 +1,203 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http: *www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+'use strict';
+
+/**
+ * @ngdoc function
+ * @name ocwUiApp.controller:ObservationSelectCtrl
+ * @description
+ * # ObservationSelectCtrl
+ * Controller of the ocwUiApp
+ */
+angular.module('ocwUiApp')
+ .controller('ObservationSelectCtrl', ['$rootScope', '$scope', '$http', '$q', '$timeout', 'selectedDatasetInformation',
+ function($rootScope, $scope, $http, $q, $timeout, selectedDatasetInformation) {
+ // Grab a copy of the datasets so we can display a count to the user!
+ $scope.datasetCount = selectedDatasetInformation.getDatasets();
+
+ // Initalize the option arrays and default to the first element
+ $scope.params = ['Please select a file above'];
+ $scope.paramSelect = $scope.params[0];
+ $scope.lats = ['Please select a file above'];
+ $scope.latsSelect = $scope.lats[0];
+ $scope.lons = ['Please select a file above'];
+ $scope.lonsSelect = $scope.lons[0];
+ $scope.times = ['Please select a file above'];
+ $scope.timeSelect = $scope.times[0];
+
+ // Grab the path leader information that the webserver is using to limit directory access.
+ $scope.pathLeader = false;
+ $http.jsonp($rootScope.baseURL + '/dir/path_leader/?callback=JSON_CALLBACK').
+ success(function(data) {
+ $scope.pathLeader = data.leader;
+ });
+
+ // Toggle load button view depending on upload state of selected files
+ $scope.loadingFile = false;
+
+ // Toggle display of a confirmation when loading a dataset
+ $scope.fileAdded = false;
+
+ $scope.latLonVals = [];
+ $scope.timeVals = [];
+ $scope.localSelectForm = {};
+
+ $scope.uploadLocalFile = function() {
+ $scope.loadingFile = true;
+
+ // TODO: Need to try to validate the input a bit. At least make sure we're not
+ // pointing at a directory perhaps?
+
+ // TODO: Two-way binding with ng-model isn't being used here because it fails to update
+ // properly with the auto-complete that we're using on the input box. So we're doing
+ // it the wrong way temporarily...
+ var input = $('#observationFileInput').val();
+
+ // If the backend is limiting directory access we need to add that leader to our path
+ // so it remains valid!
+ if ($scope.pathLeader) {
+ input = $scope.pathLeader + input
+ }
+
+ // TODO: We're not really handling the case where there is a failure here at all.
+ // Should check for fails and allow the user to make changes.
+ //
+ // Get model variables
+ var varsPromise = $http.jsonp($rootScope.baseURL + '/lfme/list_vars/' + input + '?callback=JSON_CALLBACK');
+ // Get Lat and Lon variables
+ var latlonPromise = $http.jsonp($rootScope.baseURL + '/lfme/list_latlon/' + input + '?callback=JSON_CALLBACK');
+ // Get Time variables
+ var timesPromise = $http.jsonp($rootScope.baseURL + '/lfme/list_time/' + input + '?callback=JSON_CALLBACK');
+
+ $q.all([varsPromise, latlonPromise, timesPromise]).then(
+ // Handle success fetches!
+ function(arrayOfResults) {
+ $scope.loadingFile = false;
+
+ // Handle lat/lon results
+ var data = arrayOfResults[1].data;
+ $scope.lats = [data.lat_name];
+ $scope.lons = [data.lon_name];
+ $scope.latLonVals = [data.lat_min, data.lat_max, data.lon_min, data.lon_max];
+
+ // If there is more than one option for the user, tell them they need to pick one!
+ if ($scope.lats.length > 1) $scope.lats.splice(0, 0, 'Please select an option');
+ if ($scope.lons.length > 1) $scope.lons.splice(0, 0, 'Please select an option');
+ // Default the display to the first available option.
+ $scope.latsSelect = $scope.lats[0];
+ $scope.lonsSelect = $scope.lons[0];
+
+ // Handle time results
+ var data = arrayOfResults[2].data
+ $scope.times = [data.time_name];
+ $scope.timeVals = [data.start_time, data.end_time];
+
+ if ($scope.times.length > 1) $scope.times.splice(0, 0, 'Please select an option');
+ $scope.timeSelect = $scope.times[0];
+
+ // Handle parameter results
+ var data = arrayOfResults[0].data.variables;
+ $scope.params = (data instanceof Array) ? data : [data];
+ $scope.params = $.grep($scope.params,
+ function(val) {
+ return ($.inArray(val, $scope.lats) != 0 &&
+ $.inArray(val, $scope.lons) != 0 &&
+ $.inArray(val, $scope.times) != 0);
+ });
+
+ if ($scope.params.length > 1) $scope.params.splice(0, 0, 'Please select an option');
+ $scope.paramSelect = $scope.params[0];
+ },
+ // Uh oh! AT LEAST on of our fetches failed
+ function(arrayOfFailure) {
+ $scope.loadingFile = false;
+
+ $scope.params = ['Unable to load variable(s)'];
+ $scope.paramSelect = $scope.params[0];
+ $scope.lats = ['Unable to load variable(s)'];
+ $scope.latsSelect = $scope.lats[0];
+ $scope.lons = ['Unable to load variable(s)'];
+ $scope.lonsSelect = $scope.lons[0];
+ $scope.times = ['Unable to load variable(s)'];
+ $scope.timeSelect = $scope.times[0];
+ }
+ );
+ };
+
+ $scope.addDataSet = function() {
+ // TODO: Need to verify that all the variables selected are correct!!!
+ // TODO: We shouldn't allow different parameters to match the same variables!!
+
+ var newDataset = {};
+ var input = $('#observationFileInput').val();
+
+ // If the backend is limiting directory access we need to add that leader to our path
+ // so it remains valid!
+ if ($scope.pathLeader != 'False') {
+ input = $scope.pathLeader + input
+ }
+
+ newDataset['isObs'] = 0;
+ // Save the model path. Note that the path is effectively the "id" for the model.
+ newDataset['id'] = input;
+ // Grab the file name later for display purposes.
+ var splitFilePath = input.split('/');
+ newDataset['name'] = splitFilePath[splitFilePath.length - 1];
+ // Save the model parameter variable. We save it twice for consistency and display convenience.
+ newDataset['param'] = $scope.paramSelect;
+ newDataset['paramName'] = newDataset['param'];
+ // Save the lat/lon information
+ newDataset['lat'] = $scope.latsSelect;
+ newDataset['lon'] = $scope.lonsSelect;
+
+ newDataset['latlonVals'] = {'latMin': $scope.latLonVals[0], 'latMax': $scope.latLonVals[1],
+ 'lonMin': $scope.latLonVals[2], 'lonMax': $scope.latLonVals[3]};
+ // Get the time information
+ newDataset['time'] = $scope.timeSelect;
+ newDataset['timeVals'] = {'start': $scope.timeVals[0], 'end': $scope.timeVals[1]};
+
+ selectedDatasetInformation.addDataset(newDataset);
+
+ // Reset all the fields!!
+ $scope.params = ['Please select a file above'];
+ $scope.paramSelect = $scope.params[0];
+ $scope.lats = ['Please select a file above'];
+ $scope.latsSelect = $scope.lats[0];
+ $scope.lons = ['Please select a file above'];
+ $scope.lonsSelect = $scope.lons[0];
+ $scope.times = ['Please select a file above'];
+ $scope.timeSelect = $scope.times[0];
+ $scope.latLonVals = [];
+ $scope.timeVals = [];
+
+ // Clear the input box
+ $('#observationFileInput').val('');
+
+ // Display a confirmation message for a little bit
+ $scope.fileAdded = true;
+ $timeout(function() {
+ $scope.fileAdded = false;
+ }, 2000);
+ }
+
+ $scope.shouldDisableLoadButton = function() {
+ return $scope.loadingFile;
+ }
+ }]);
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/scripts/controllers/parameterselect.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/scripts/controllers/parameterselect.js b/ocw-ui/frontend/app/scripts/controllers/parameterselect.js
new file mode 100644
index 0000000..cad97e0
--- /dev/null
+++ b/ocw-ui/frontend/app/scripts/controllers/parameterselect.js
@@ -0,0 +1,275 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http: *www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+'use strict';
+
+/**
+ * @ngdoc function
+ * @name ocwUiApp.controller:ParameterSelectCtrl
+ * @description
+ * # ParameterSelectCtrl
+ * Controller of the ocwUiApp
+ */
+angular.module('ocwUiApp')
+.controller('ParameterSelectCtrl', ['$rootScope', '$scope', '$http', '$timeout',
+ 'selectedDatasetInformation', 'regionSelectParams', 'evaluationSettings',
+ function($rootScope, $scope, $http, $timeout, selectedDatasetInformation, regionSelectParams, evaluationSettings) {
+ $scope.datasets = selectedDatasetInformation.getDatasets();
+
+ // The min/max lat/lon values from the selected datasets
+ $scope.latMin = -90;
+ $scope.latMax = 90;
+ $scope.lonMin = -180;
+ $scope.lonMax = 180;
+ $scope.start = "1900-01-01 00:00:00";
+ $scope.end = "2030-01-01 00:00:00";
+
+ // The min/max lat/lon values that are displayed
+ $scope.displayParams = regionSelectParams.getParameters();
+
+ $scope.runningEval = false;
+
+ // Flag for toggling re-grid controls based on whether or not the user has selected a grid
+ // base from the selected datasets. By default we have no datasets so we don't need to show
+ // the controls!
+ $scope.areInUserRegridState = false;
+
+ // Initialization for the lat/lon grid step sliders
+ // TODO There has to be a better way of dealing with this. Perhaps a directive??
+ $scope.latSliderVal = 0;
+ $scope.lonSliderVal = 0;
+
+ // Settings for jQuery datepicker directives!
+ $scope.datepickerSettings = {
+ changeMonth: true,
+ changeYear: true,
+ };
+
+ $scope.shouldDisableControls = function() {
+ return (selectedDatasetInformation.getDatasetCount() < 2);
+ }
+
+ $scope.shouldDisableEvaluateButton = function() {
+ return ($scope.shouldDisableControls() || $scope.runningEval);
+ }
+
+ $scope.shouldDisableResultsView = function() {
+ var res = false;
+
+ if ($rootScope.evalResults == "")
+ res = true;
+
+ return res;
+ }
+
+ $scope.runEvaluation = function() {
+ $scope.runningEval = true;
+
+ var data = {}
+ var settings = evaluationSettings.getSettings()
+
+ // Set dataset information
+
+ // Grab the reference dataset information
+ var ref_ds = settings.spatialSelect;
+
+ if (ref_ds == null) {
+ ref_ds = $scope.datasets[0];
+ }
+
+ data['reference_dataset'] = null;
+ data['target_datasets'] = [];
+
+ // Parse all the dataset information and generate the necessary objects for the backend
+ for (var i = 0; i < $scope.datasets.length; i++) {
+ var dataset = {}
+ dataset['dataset_info'] = {}
+
+ if ($scope.datasets[i].isObs == 0) {
+ dataset['data_source_id'] = 1;
+ dataset['dataset_info']['dataset_id'] = $scope.datasets[i]['id'];
+ dataset['dataset_info']['var_name'] = $scope.datasets[i]['param'];
+ dataset['dataset_info']['lat_name'] = $scope.datasets[i]['lat'];
+ dataset['dataset_info']['lon_name'] = $scope.datasets[i]['lon'];
+ dataset['dataset_info']['time_name'] = $scope.datasets[i]['time'];
+ dataset['dataset_info']['name'] = $scope.datasets[i]['name'];
+ } else {
+ dataset['data_source_id'] = 2;
+ dataset['dataset_info']['dataset_id'] = $scope.datasets[i]['datasetId'];
+ dataset['dataset_info']['parameter_id'] = $scope.datasets[i]['param'];
+ dataset['dataset_info']['name'] = $scope.datasets[i]['name'];
+ }
+
+ if ($scope.datasets[i].id === ref_ds.id) {
+ data['reference_dataset'] = dataset;
+ } else {
+ data['target_datasets'].push(dataset);
+ }
+ }
+
+ // TODO: These should be use customizable
+ // Set the spatial rebin grid steps
+ data['spatial_rebin_lat_step'] = 1;
+ data['spatial_rebin_lon_step'] = 1;
+
+ // Determine the temporal resolution to use when doing a temporal rebin. The
+ // value is used to determine the timedelta in days to use.
+ var temporal_res = settings.temporal.selected;
+
+ if (temporal_res == 'daily') {
+ data['temporal_resolution'] = 1;
+ } else if (temporal_res == 'monthly') {
+ data['temporal_resolution'] = 30;
+ } else if (temporal_res == 'yearly') {
+ data['temporal_resolution'] = 365;
+ } else if (temporal_res == 'full') {
+ data['temporal_resolution'] = 999;
+ } else {
+ // Default to monthly just in case
+ data['temporal_resolution'] = 30;
+ }
+
+ // Load the Metrics for the evaluation
+ data['metrics'] = []
+ var metrics = settings.metrics
+ for (var i = 0; i < metrics.length; i++) {
+ var metric = metrics[i];
+
+ if (metric.select) {
+ data['metrics'].push(metric.name)
+ }
+ }
+
+ // Set the bound values for the evaluation
+ data['start_time'] = $scope.displayParams.start + " 00:00:00",
+ data['end_time'] = $scope.displayParams.end + " 00:00:00",
+ data['lat_min'] = $scope.displayParams.latMin,
+ data['lat_max'] = $scope.displayParams.latMax,
+ data['lon_min'] = $scope.displayParams.lonMin,
+ data['lon_max'] = $scope.displayParams.lonMax,
+
+ $http.post($rootScope.baseURL + '/processing/run_evaluation/', data).
+ success(function(data) {
+ var evalWorkDir = data['eval_work_dir'];
+
+ $scope.runningEval = false;
+
+ $timeout(function() {
+ if (evalWorkDir !== undefined) {
+ window.location = "#/results/" + evalWorkDir;
+ } else {
+ window.location = "#/results";
+ }
+ }, 100);
+
+ }).error(function() {
+ $scope.runningEval = false;
+ });
+ };
+
+ // Check the Parameter selection boxes after the user has changed input to ensure that valid
+ // values were entered
+ $scope.checkParameters = function() {
+ if (parseFloat($scope.displayParams.latMin) < parseFloat($scope.latMin))
+ $scope.displayParams.latMin = $scope.latMin;
+
+ if (parseFloat($scope.displayParams.latMax) > parseFloat($scope.latMax))
+ $scope.displayParams.latMax = $scope.latMax;
+
+ if (parseFloat($scope.displayParams.lonMin) < parseFloat($scope.lonMin))
+ $scope.displayParams.lonMin = $scope.lonMin;
+
+ if (parseFloat($scope.displayParams.lonMax) > parseFloat($scope.lonMax))
+ $scope.displayParams.lonMax = $scope.lonMax;
+
+ if ($scope.displayParams.start < $scope.start)
+ $scope.displayParams.start = $scope.start;
+
+ if ($scope.displayParams.end > $scope.end)
+ $scope.displayParams.end = $scope.end;
+
+ $scope.displayParams.latMin = $scope.truncateFloat($scope.displayParams.latMin);
+ $scope.displayParams.latMax = $scope.truncateFloat($scope.displayParams.latMax);
+ $scope.displayParams.lonMin = $scope.truncateFloat($scope.displayParams.lonMin);
+ $scope.displayParams.lonMax = $scope.truncateFloat($scope.displayParams.lonMax);
+
+ $scope.$apply();
+ $rootScope.$broadcast('redrawOverlays', []);
+ }
+
+ $scope.unwatchDatasets = $scope.$watch('datasets',
+ function() {
+ var numDatasets = $scope.datasets.length;
+ $scope.displayParams.areValid = false;
+ $scope.areInUserRegridState = false;
+
+ if (numDatasets) {
+ var latMin = -90,
+ latMax = 90,
+ lonMin = -180,
+ lonMax = 180,
+ start = "1900-01-01 00:00:00",
+ end = "2030-01-01 00:00:00",
+ datasetRegrid = false;
+ // Get the valid lat/lon range in the selected datasets.
+ for (var i = 0; i < numDatasets; i++) {
+ var curDataset = $scope.datasets[i];
+
+ latMin = (curDataset['latlonVals']['latMin'] > latMin) ? curDataset['latlonVals']['latMin'] : latMin;
+ latMax = (curDataset['latlonVals']['latMax'] < latMax) ? curDataset['latlonVals']['latMax'] : latMax;
+ lonMin = (curDataset['latlonVals']['lonMin'] > lonMin) ? curDataset['latlonVals']['lonMin'] : lonMin;
+ lonMax = (curDataset['latlonVals']['lonMax'] < lonMax) ? curDataset['latlonVals']['lonMax'] : lonMax;
+ start = (curDataset['timeVals']['start'] > start) ? curDataset['timeVals']['start'] : start;
+ end = (curDataset['timeVals']['end'] < end) ? curDataset['timeVals']['end'] : end;
+
+ datasetRegrid = datasetRegrid || curDataset.regrid;
+
+ }
+
+ $scope.areInUserRegridState = !datasetRegrid
+ }
+
+ // Update the display parameters with the new valid overlap that we've found!
+ $scope.displayParams.latMin = $scope.truncateFloat(latMin);
+ $scope.displayParams.latMax = $scope.truncateFloat(latMax);
+ $scope.displayParams.lonMin = $scope.truncateFloat(lonMin);
+ $scope.displayParams.lonMax = $scope.truncateFloat(lonMax);
+ $scope.displayParams.start = (typeof start == 'undefined') ? "" : start.split(" ")[0];
+ $scope.displayParams.end = (typeof end == 'undefined') ? "" : end.split(" ")[0];
+
+ // Update the local store values!
+ $scope.latMin = latMin;
+ $scope.latMax = latMax;
+ $scope.lonMin = lonMin;
+ $scope.lonMax = lonMax;
+ $scope.start = (typeof start == 'undefined') ? "" : start.split(" ")[0];
+ $scope.end = (typeof end == 'undefined') ? "" : end.split(" ")[0];
+
+ $scope.displayParams.areValid = true;
+ $rootScope.$broadcast('redrawOverlays', []);
+ }, true);
+
+ $scope.truncateFloat = function(floatVal) {
+ if (floatVal > 0) {
+ return Math.floor(floatVal);
+ } else {
+ return Math.ceil(floatVal);
+ }
+ };
+ }]);
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/scripts/controllers/rcmedselection.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/scripts/controllers/rcmedselection.js b/ocw-ui/frontend/app/scripts/controllers/rcmedselection.js
new file mode 100644
index 0000000..a3b3801
--- /dev/null
+++ b/ocw-ui/frontend/app/scripts/controllers/rcmedselection.js
@@ -0,0 +1,144 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http: *www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+'use strict';
+
+/**
+ * @ngdoc function
+ * @name ocwUiApp.controller:RcmedSelectionCtrl
+ * @description
+ * # RcmedSelectionCtrl
+ * Controller of the ocwUiApp
+ */
+angular.module('ocwUiApp')
+ .controller('RcmedSelectionCtrl', ['$rootScope', '$scope', '$http', '$timeout', 'selectedDatasetInformation',
+ function($rootScope, $scope, $http, $timeout, selectedDatasetInformation) {
+ // Grab a copy of the datasets so we can display a count to the user!
+ $scope.datasetCount = selectedDatasetInformation.getDatasets();
+ $scope.fileAdded = false;
+
+ $scope.getObservations = function() {
+ $http.jsonp($rootScope.baseURL + '/rcmed/datasets/?callback=JSON_CALLBACK').
+ success(function(data) {
+ $scope.availableObs = data;
+ $scope.availableObs.splice(0, 0, {longname: 'Please select an option'});
+ $scope.datasetSelection = $scope.availableObs[0];
+ }).
+ error(function(data) {
+ $scope.availableObs = ["Unable to query RCMED"]
+ });
+ };
+
+ $scope.getObservationBounds = function() {
+ $scope.observationBounds = {};
+
+ $http.get($rootScope.baseURL + '/rcmed/parameters/bounds/')
+ .success(function(data) {
+ $scope.observationBounds = data;
+ $scope.observationBounds['default'] = {
+ 'start': '1900-01-01 00:00:00',
+ 'end': '2050-01-01 00:00:00',
+ 'latMin': -90,
+ 'latMax': 89,
+ 'lonMin': -180,
+ 'lonMax': 179,
+ };
+ })
+ .error(function(data) {
+ $scope.observationBounds['default'] = {
+ 'start': '1900-01-01 00:00:00',
+ 'end': '2050-01-01 00:00:00',
+ 'latMin': -90,
+ 'latMax': 89,
+ 'lonMin': -180,
+ 'lonMax': 179,
+ };
+ });
+ };
+
+ $scope.getBoundsByParameterId = function(parameterId) {
+ if (parameterId in $scope.observationBounds) {
+ return $scope.observationBounds[parameterId];
+ } else {
+ return $scope.observationBounds['default'];
+ }
+ };
+
+ $scope.dataSelectUpdated = function() {
+ var urlString = $rootScope.baseURL + '/rcmed/parameters/?dataset=' +
+ $scope.datasetSelection["shortname"] +
+ "&callback=JSON_CALLBACK";
+ $http.jsonp(urlString)
+ .success(function(data) {
+ $scope.retrievedObsParams = data;
+ if ($scope.retrievedObsParams.length > 1)
+ $scope.retrievedObsParams.splice(0, 0, {shortname: 'Please select a parameter'});
+ $scope.parameterSelection = $scope.retrievedObsParams[0];
+ });
+ };
+
+ $scope.addObservation = function() {
+ var newDataset = {};
+
+ newDataset['isObs'] = 1;
+ // Save the dataset id (the important part) and name (for display purposes)
+ newDataset['datasetId'] = $scope.datasetSelection['dataset_id'];
+ newDataset['name'] = $scope.datasetSelection['longname'];
+ // Save the parameter id (the important part) and name (for display purposes)
+ newDataset['id'] = $scope.parameterSelection['parameter_id'];
+ newDataset['param'] = $scope.parameterSelection['parameter_id'];
+ newDataset['paramName'] = $scope.parameterSelection['longname'];
+
+ var bounds = $scope.getBoundsByParameterId(newDataset['id']);
+ newDataset['latlonVals'] = {
+ 'latMin': bounds['lat_min'],
+ 'latMax': bounds['lat_max'],
+ 'lonMin': bounds['lon_min'],
+ 'lonMax': bounds['lon_max'],
+ };
+ newDataset['timeVals'] = {
+ 'start': bounds['start_date'],
+ 'end': bounds['end_date'],
+ };
+
+ // Set some defaults for lat/lon/time variable names. This just helps
+ // us display stuff later.
+ newDataset['lat'] = "N/A";
+ newDataset['lon'] = "N/A";
+ newDataset['time'] = "N/A";
+
+ selectedDatasetInformation.addDataset(newDataset);
+
+ // Clear the user selections by requery-ing RCMED. This is really hacky, but it works for now...
+ $scope.availableObs = [];
+ $scope.retrievedObsParams = [];
+ $scope.getObservations();
+
+ // Display a confirmation message for a little bit
+ $scope.fileAdded = true;
+ $timeout(function() {
+ $scope.fileAdded = false;
+ }, 2000);
+ };
+
+ // Grab the available observations from RCMED
+ $scope.getObservations();
+ $scope.getObservationBounds();
+ }
+ ]);
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/scripts/controllers/result.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/scripts/controllers/result.js b/ocw-ui/frontend/app/scripts/controllers/result.js
new file mode 100644
index 0000000..39b94b9
--- /dev/null
+++ b/ocw-ui/frontend/app/scripts/controllers/result.js
@@ -0,0 +1,47 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http: *www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+'use strict';
+
+/**
+ * @ngdoc function
+ * @name ocwUiApp.controller:ResultCtrl
+ * @description
+ * # ResultCtrl
+ * Controller of the ocwUiApp
+ */
+angular.module('ocwUiApp')
+.controller('ResultCtrl', ['$rootScope', '$scope', '$http',
+function($rootScope, $scope, $http) {
+
+ $scope.results = [];
+
+ // Get all evaluation directories
+ $http.jsonp($rootScope.baseURL + '/dir/results/?callback=JSON_CALLBACK')
+ .success(function(data) {
+ data = data['listing']
+
+ var cacheDirIndex = data.indexOf("/cache");
+ if (cacheDirIndex > -1) {
+ data.split(cacheDirIndex, 1)
+ }
+
+ $scope.results = data.sort().reverse();
+ });
+}]);
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/scripts/controllers/resultdetail.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/scripts/controllers/resultdetail.js b/ocw-ui/frontend/app/scripts/controllers/resultdetail.js
new file mode 100644
index 0000000..952516c
--- /dev/null
+++ b/ocw-ui/frontend/app/scripts/controllers/resultdetail.js
@@ -0,0 +1,46 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http: *www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+'use strict';
+
+/**
+ * @ngdoc function
+ * @name ocwUiApp.controller:ResultDetailCtrl
+ * @description
+ * # ResultDetailCtrl
+ * Controller of the ocwUiApp
+ */
+angular.module('ocwUiApp')
+.controller('ResultDetailCtrl', ['$rootScope', '$scope', '$http', '$stateParams',
+function($rootScope, $scope, $http, $stateParams) {
+ $scope.result = $stateParams.resultId;
+
+ $http.jsonp($rootScope.baseURL + '/dir/results/' + $scope.result + '?callback=JSON_CALLBACK')
+ .success(function(data) {
+ data = data['listing'];
+
+ if (data.length < 1) {
+ $scope.figures = null;
+ $scope.alertMessage = "No results found.";
+ $scope.alertClass = "alert alert-danger";
+ } else {
+ $scope.figures = data;
+ }
+ });
+}]);
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/scripts/controllers/settings.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/scripts/controllers/settings.js b/ocw-ui/frontend/app/scripts/controllers/settings.js
new file mode 100644
index 0000000..ca62fd8
--- /dev/null
+++ b/ocw-ui/frontend/app/scripts/controllers/settings.js
@@ -0,0 +1,34 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http: *www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+'use strict';
+
+/**
+ * @ngdoc function
+ * @name ocwUiApp.controller:SettingsCtrl
+ * @description
+ * # SettingsCtrl
+ * Controller of the ocwUiApp
+ */
+angular.module('ocwUiApp')
+.controller('SettingsCtrl', ['$scope', 'evaluationSettings', 'selectedDatasetInformation',
+function($scope, evaluationSettings, selectedDatasetInformation) {
+ $scope.settings = evaluationSettings.getSettings();
+ $scope.datasets = selectedDatasetInformation.getDatasets();
+}]);
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/scripts/controllers/timeline.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/scripts/controllers/timeline.js b/ocw-ui/frontend/app/scripts/controllers/timeline.js
new file mode 100644
index 0000000..2546ede
--- /dev/null
+++ b/ocw-ui/frontend/app/scripts/controllers/timeline.js
@@ -0,0 +1,103 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http: *www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+'use strict';
+
+/**
+ * @ngdoc function
+ * @name ocwUiApp.controller:TimelineCtrl
+ * @description
+ * # TimelineCtrl
+ * Controller of the ocwUiApp
+ */
+angular.module('ocwUiApp')
+.controller('TimelineCtrl', ['$rootScope', '$scope', 'selectedDatasetInformation', 'regionSelectParams',
+function($rootScope, $scope, selectedDatasetInformation, regionSelectParams) {
+ $scope.datasets = selectedDatasetInformation.getDatasets();
+ $scope.regionParams = regionSelectParams.getParameters();
+
+ $scope.updateTimeline = function() {
+ // Clear timeline data if it exists
+ if ("timeline" in $rootScope) {
+ $rootScope.timeline.deleteAllItems();
+ }
+
+ // Don't process if no datasets have been added
+ if ($scope.datasets.length == 0 || !("timeline" in $rootScope))
+ return;
+
+ // Create DataTable to add data to timeline
+ var data = new google.visualization.DataTable();
+ data.addColumn('datetime', 'start');
+ data.addColumn('datetime', 'end');
+ data.addColumn('string', 'content');
+
+ // Loop through datasets and find the overlapping start/end time range
+ var start = $scope.datasets[0].timeVals.start;
+ var end = $scope.datasets[0].timeVals.end;
+ for (var i = 0; i < $scope.datasets.length; i++) {
+ var possibleNewStart = $scope.datasets[i].timeVals.start;
+ var possibleNewEnd = $scope.datasets[i].timeVals.end;
+
+ start = (possibleNewStart > start) ? possibleNewStart : start;
+ end = (possibleNewEnd < end) ? possibleNewEnd : end;
+ }
+
+ // Set the timeline extent to the overlapping time range
+ //
+ // NOTE: The month value substring is expected to be 0-based (hence the -1)
+ $rootScope.timeline.setVisibleChartRange(new Date(start.substr(0, 4), start.substr(5, 2) - 1, start.substr(8, 2)),
+ new Date(end.substr(0, 4), end.substr(5, 2) - 1, end.substr(8, 2)));
+
+ // Add user selected bounds to timeline
+ if ($scope.regionParams.areValid) {
+
+ var userStart = $scope.regionParams.start;
+ var userEnd = $scope.regionParams.end;
+
+ // Add color to user selected bounds
+ var style = 'background-color: #000000; border: 2px solid;';
+ var ocwBar = '<div class="ocw-bar timeline-event-range" style="' + style + '"></div>';
+
+ // Add row to DataTable: object with start and end date
+ // note: subtract one from month since indexes from 0 to 11
+ data.addRow([new Date(userStart.substr(0,4), userStart.substr(5,2)-1, userStart.substr(8,2)),
+ new Date(userEnd.substr(0,4), userEnd.substr(5,2)-1, userEnd.substr(8,2)),
+ ocwBar ]);
+ }
+
+ var options = {
+ "width": "100%",
+ "showCurrentTime": false,
+ "moveable": false,
+ "zoomable": false,
+ };
+
+ // Draw timeline with data (DataTable) and options (a name-value map)
+ $rootScope.timeline.draw(data, options);
+ };
+
+ $scope.$on('redrawOverlays', function(event, parameters) {
+ $scope.updateTimeline();
+ });
+
+ $scope.$watch('datasets', function() {
+ $scope.updateTimeline();
+ }, true);
+}]);
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/scripts/controllers/worldmap.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/scripts/controllers/worldmap.js b/ocw-ui/frontend/app/scripts/controllers/worldmap.js
new file mode 100644
index 0000000..0d28d6c
--- /dev/null
+++ b/ocw-ui/frontend/app/scripts/controllers/worldmap.js
@@ -0,0 +1,104 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http: *www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+'use strict';
+
+/**
+ * @ngdoc function
+ * @name ocwUiApp.controller:WorldMapCtrl
+ * @description
+ * # WorldMapCtrl
+ * Controller of the ocwUiApp
+ */
+angular.module('ocwUiApp')
+.controller('WorldMapCtrl', ['$rootScope', '$scope', 'selectedDatasetInformation', 'regionSelectParams',
+function($rootScope, $scope, selectedDatasetInformation, regionSelectParams) {
+ $scope.datasets = selectedDatasetInformation.getDatasets();
+ $scope.regionParams = regionSelectParams.getParameters();
+
+ $scope.updateMap = function() {
+ // Clear Group of layers from map if it exists
+ if ("rectangleGroup" in $rootScope) {
+ $rootScope.rectangleGroup.clearLayers();
+ }
+
+ // Don't process if we don't have any datasets added or if the map doesn't exist!!
+ if ($scope.datasets.length == 0 || !("map" in $rootScope))
+ return;
+
+ // Create a group that we'll draw overlays to
+ $rootScope.rectangleGroup = L.layerGroup();
+ // Add rectangle Group to map
+ $rootScope.rectangleGroup.addTo($rootScope.map);
+
+ // Calculate the overlap region and set the map to show the new overlap
+ var latMin = -90,
+ latMax = 90,
+ lonMin = -180,
+ lonMax = 180;
+
+ // Get the valid lat/lon range in the selected datasets.
+ for (var i = 0; i < selectedDatasetInformation.getDatasetCount(); i++) {
+ var curDataset = $scope.datasets[i];
+
+ latMin = (curDataset['latlonVals']['latMin'] > latMin) ? curDataset['latlonVals']['latMin'] : latMin;
+ latMax = (curDataset['latlonVals']['latMax'] < latMax) ? curDataset['latlonVals']['latMax'] : latMax;
+ lonMin = (curDataset['latlonVals']['lonMin'] > lonMin) ? curDataset['latlonVals']['lonMin'] : lonMin;
+ lonMax = (curDataset['latlonVals']['lonMax'] < lonMax) ? curDataset['latlonVals']['lonMax'] : lonMax;
+ }
+
+ var overlapBounds = [[latMax, lonMin], [latMin, lonMax]];
+ $rootScope.map.fitBounds(overlapBounds, {padding: [0, 0]});
+
+ // Draw border around overlap region
+ var overlapBorder = L.rectangle(overlapBounds, {
+ color: '#000000',
+ opacity: 1.0,
+ fill: false,
+ weight: 2,
+ dashArray: "10 10",
+ });
+
+ $rootScope.rectangleGroup.addLayer(overlapBorder);
+
+ // Draw user selected region
+ if ($scope.regionParams.areValid) {
+
+ var bounds = [[$scope.regionParams.latMax, $scope.regionParams.lonMin],
+ [$scope.regionParams.latMin, $scope.regionParams.lonMax]];
+
+ var polygon = L.rectangle(bounds, {
+ color: '#000000',
+ opacity: .3,
+ stroke: false,
+ fill: true,
+ });
+
+ $rootScope.rectangleGroup.addLayer(polygon);
+ }
+ };
+
+ $scope.$on('redrawOverlays', function(event, parameters) {
+ $scope.updateMap();
+ });
+
+ $scope.$watch('datasets', function() {
+ $scope.updateMap();
+ }, true);
+}]);
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/scripts/directives/bootstrapmodal.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/scripts/directives/bootstrapmodal.js b/ocw-ui/frontend/app/scripts/directives/bootstrapmodal.js
new file mode 100644
index 0000000..26d0a46
--- /dev/null
+++ b/ocw-ui/frontend/app/scripts/directives/bootstrapmodal.js
@@ -0,0 +1,79 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http: *www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+'use strict';
+
+/**
+ * @ngdoc directive
+ * @name ocwUiApp.directive:bootstrapModal
+ * @description
+ * # bootstrapModal
+ */
+angular.module('ocwUiApp')
+.directive('bootstrapModal', function($timeout) {
+ var link = function(scope, elem, attrs) {
+ var escapeEvent;
+ var openModal;
+ var closeModal;
+
+ escapeEvent = function(e) {
+ if (e.which == 27)
+ closeModal();
+ }
+
+ openModal = function(event, toggleBackground, toggleKeyboardEscape) {
+ // Grab the current modal tag based on the modalId attribute in the bootstrapModal tag
+ var modal = $('#' + attrs.modalId);
+
+ // Make all the modal's children of class "close" call the appropriate function for closing!
+ $('.close', modal).bind('click', closeModal);
+
+ modal.modal({
+ show: true,
+ backdrop: toggleBackground,
+ keyboard: toggleKeyboardEscape,
+ });
+ };
+
+ closeModal = function(event) {
+ $('#' + attrs.modalId).modal('hide');
+
+ };
+
+ // We need to bind the close and open modal events so outside elements can trigger the modal.
+ // This has to wait until the template has been fully inserted, so just wait a bit of time
+ // before we set them. I'm sure there's a better way of handling this...
+ $timeout(function() {
+ $('#' + attrs.modalId).
+ bind('modalOpen', openModal).
+ bind('modalClose', closeModal);
+ }, 100);
+ };
+
+ return {
+ link: link,
+ replace: true,
+ restrict: 'E',
+ scope: {
+ modalId: '@'
+ },
+ template: '<div id="{{modalId}}" class="modal hide fade" tabindex="-1"><div ng-transclude></div></div>',
+ transclude: true
+ };
+});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/scripts/directives/bootstrapmodalopen.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/scripts/directives/bootstrapmodalopen.js b/ocw-ui/frontend/app/scripts/directives/bootstrapmodalopen.js
new file mode 100644
index 0000000..dca4005
--- /dev/null
+++ b/ocw-ui/frontend/app/scripts/directives/bootstrapmodalopen.js
@@ -0,0 +1,43 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http: *www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+'use strict';
+
+/**
+ * @ngdoc directive
+ * @name ocwUiApp.directive:bootstrapModalOpen
+ * @description
+ * # bootstrapModalOpen
+ */
+angular.module('ocwUiApp')
+.directive('bootstrapModalOpen', function() {
+ return {
+ restrict: 'A',
+ link: function(scope, elem, attrs) {
+ // Default to showing the background if the user didn't specify a value for this.
+ var hasBackground = (attrs.background === undefined ? true : (attrs.background == "true"));
+ // Enable keyboard closing of modal with escape key.
+ var hasKeyboardEscape = (attrs.keyboard === undefined ? true : (attrs.keyboard == "true"));
+
+ $(elem).bind('click', function() {
+ $('#' + attrs.bootstrapModalOpen).trigger('modalOpen', [hasBackground, hasKeyboardEscape]);
+ });
+ }
+ };
+});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/scripts/directives/leafletmap.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/scripts/directives/leafletmap.js b/ocw-ui/frontend/app/scripts/directives/leafletmap.js
new file mode 100644
index 0000000..9b0a6eb
--- /dev/null
+++ b/ocw-ui/frontend/app/scripts/directives/leafletmap.js
@@ -0,0 +1,46 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http: *www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+'use strict';
+
+/**
+ * @ngdoc directive
+ * @name ocwUiApp.directive:leafletMap
+ * @description
+ * # leafletMap
+ */
+angular.module('ocwUiApp')
+.directive('leafletMap', function($rootScope) {
+ return {
+ restrict: 'E',
+ replace: true,
+ template: '<div></div>',
+ link: function(scope, element, attrs) {
+ $rootScope.map = L.map(attrs.id, {
+ center: [40, 0],
+ zoom: 2,
+ scrollWheelZoom: false,
+ attributionControl: false,
+ worldCopyJump: true,
+ });
+
+ L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {}).addTo($rootScope.map);
+ }
+ };
+});
[16/28] CLIMATE-512 - Replace frontend with new Yeoman/Grunt/Bower
frontend
Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/js/lib/angular/angular.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/js/lib/angular/angular.js b/ocw-ui/frontend/app/js/lib/angular/angular.js
deleted file mode 100755
index 68b33c7..0000000
--- a/ocw-ui/frontend/app/js/lib/angular/angular.js
+++ /dev/null
@@ -1,14733 +0,0 @@
-/**
- * @license AngularJS v1.0.5
- * (c) 2010-2012 Google, Inc. http://angularjs.org
- * License: MIT
- */
-(function(window, document, undefined) {
-'use strict';
-
-////////////////////////////////////
-
-/**
- * @ngdoc function
- * @name angular.lowercase
- * @function
- *
- * @description Converts the specified string to lowercase.
- * @param {string} string String to be converted to lowercase.
- * @returns {string} Lowercased string.
- */
-var lowercase = function(string){return isString(string) ? string.toLowerCase() : string;};
-
-
-/**
- * @ngdoc function
- * @name angular.uppercase
- * @function
- *
- * @description Converts the specified string to uppercase.
- * @param {string} string String to be converted to uppercase.
- * @returns {string} Uppercased string.
- */
-var uppercase = function(string){return isString(string) ? string.toUpperCase() : string;};
-
-
-var manualLowercase = function(s) {
- return isString(s)
- ? s.replace(/[A-Z]/g, function(ch) {return fromCharCode(ch.charCodeAt(0) | 32);})
- : s;
-};
-var manualUppercase = function(s) {
- return isString(s)
- ? s.replace(/[a-z]/g, function(ch) {return fromCharCode(ch.charCodeAt(0) & ~32);})
- : s;
-};
-
-
-// String#toLowerCase and String#toUpperCase don't produce correct results in browsers with Turkish
-// locale, for this reason we need to detect this case and redefine lowercase/uppercase methods
-// with correct but slower alternatives.
-if ('i' !== 'I'.toLowerCase()) {
- lowercase = manualLowercase;
- uppercase = manualUppercase;
-}
-
-function fromCharCode(code) {return String.fromCharCode(code);}
-
-
-var /** holds major version number for IE or NaN for real browsers */
- msie = int((/msie (\d+)/.exec(lowercase(navigator.userAgent)) || [])[1]),
- jqLite, // delay binding since jQuery could be loaded after us.
- jQuery, // delay binding
- slice = [].slice,
- push = [].push,
- toString = Object.prototype.toString,
-
- /** @name angular */
- angular = window.angular || (window.angular = {}),
- angularModule,
- nodeName_,
- uid = ['0', '0', '0'];
-
-/**
- * @ngdoc function
- * @name angular.forEach
- * @function
- *
- * @description
- * Invokes the `iterator` function once for each item in `obj` collection, which can be either an
- * object or an array. The `iterator` function is invoked with `iterator(value, key)`, where `value`
- * is the value of an object property or an array element and `key` is the object property key or
- * array element index. Specifying a `context` for the function is optional.
- *
- * Note: this function was previously known as `angular.foreach`.
- *
- <pre>
- var values = {name: 'misko', gender: 'male'};
- var log = [];
- angular.forEach(values, function(value, key){
- this.push(key + ': ' + value);
- }, log);
- expect(log).toEqual(['name: misko', 'gender:male']);
- </pre>
- *
- * @param {Object|Array} obj Object to iterate over.
- * @param {Function} iterator Iterator function.
- * @param {Object=} context Object to become context (`this`) for the iterator function.
- * @returns {Object|Array} Reference to `obj`.
- */
-
-
-/**
- * @private
- * @param {*} obj
- * @return {boolean} Returns true if `obj` is an array or array-like object (NodeList, Arguments, ...)
- */
-function isArrayLike(obj) {
- if (!obj || (typeof obj.length !== 'number')) return false;
-
- // We have on object which has length property. Should we treat it as array?
- if (typeof obj.hasOwnProperty != 'function' &&
- typeof obj.constructor != 'function') {
- // This is here for IE8: it is a bogus object treat it as array;
- return true;
- } else {
- return obj instanceof JQLite || // JQLite
- (jQuery && obj instanceof jQuery) || // jQuery
- toString.call(obj) !== '[object Object]' || // some browser native object
- typeof obj.callee === 'function'; // arguments (on IE8 looks like regular obj)
- }
-}
-
-
-function forEach(obj, iterator, context) {
- var key;
- if (obj) {
- if (isFunction(obj)){
- for (key in obj) {
- if (key != 'prototype' && key != 'length' && key != 'name' && obj.hasOwnProperty(key)) {
- iterator.call(context, obj[key], key);
- }
- }
- } else if (obj.forEach && obj.forEach !== forEach) {
- obj.forEach(iterator, context);
- } else if (isArrayLike(obj)) {
- for (key = 0; key < obj.length; key++)
- iterator.call(context, obj[key], key);
- } else {
- for (key in obj) {
- if (obj.hasOwnProperty(key)) {
- iterator.call(context, obj[key], key);
- }
- }
- }
- }
- return obj;
-}
-
-function sortedKeys(obj) {
- var keys = [];
- for (var key in obj) {
- if (obj.hasOwnProperty(key)) {
- keys.push(key);
- }
- }
- return keys.sort();
-}
-
-function forEachSorted(obj, iterator, context) {
- var keys = sortedKeys(obj);
- for ( var i = 0; i < keys.length; i++) {
- iterator.call(context, obj[keys[i]], keys[i]);
- }
- return keys;
-}
-
-
-/**
- * when using forEach the params are value, key, but it is often useful to have key, value.
- * @param {function(string, *)} iteratorFn
- * @returns {function(*, string)}
- */
-function reverseParams(iteratorFn) {
- return function(value, key) { iteratorFn(key, value) };
-}
-
-/**
- * A consistent way of creating unique IDs in angular. The ID is a sequence of alpha numeric
- * characters such as '012ABC'. The reason why we are not using simply a number counter is that
- * the number string gets longer over time, and it can also overflow, where as the nextId
- * will grow much slower, it is a string, and it will never overflow.
- *
- * @returns an unique alpha-numeric string
- */
-function nextUid() {
- var index = uid.length;
- var digit;
-
- while(index) {
- index--;
- digit = uid[index].charCodeAt(0);
- if (digit == 57 /*'9'*/) {
- uid[index] = 'A';
- return uid.join('');
- }
- if (digit == 90 /*'Z'*/) {
- uid[index] = '0';
- } else {
- uid[index] = String.fromCharCode(digit + 1);
- return uid.join('');
- }
- }
- uid.unshift('0');
- return uid.join('');
-}
-
-/**
- * @ngdoc function
- * @name angular.extend
- * @function
- *
- * @description
- * Extends the destination object `dst` by copying all of the properties from the `src` object(s)
- * to `dst`. You can specify multiple `src` objects.
- *
- * @param {Object} dst Destination object.
- * @param {...Object} src Source object(s).
- */
-function extend(dst) {
- forEach(arguments, function(obj){
- if (obj !== dst) {
- forEach(obj, function(value, key){
- dst[key] = value;
- });
- }
- });
- return dst;
-}
-
-function int(str) {
- return parseInt(str, 10);
-}
-
-
-function inherit(parent, extra) {
- return extend(new (extend(function() {}, {prototype:parent}))(), extra);
-}
-
-
-/**
- * @ngdoc function
- * @name angular.noop
- * @function
- *
- * @description
- * A function that performs no operations. This function can be useful when writing code in the
- * functional style.
- <pre>
- function foo(callback) {
- var result = calculateResult();
- (callback || angular.noop)(result);
- }
- </pre>
- */
-function noop() {}
-noop.$inject = [];
-
-
-/**
- * @ngdoc function
- * @name angular.identity
- * @function
- *
- * @description
- * A function that returns its first argument. This function is useful when writing code in the
- * functional style.
- *
- <pre>
- function transformer(transformationFn, value) {
- return (transformationFn || identity)(value);
- };
- </pre>
- */
-function identity($) {return $;}
-identity.$inject = [];
-
-
-function valueFn(value) {return function() {return value;};}
-
-/**
- * @ngdoc function
- * @name angular.isUndefined
- * @function
- *
- * @description
- * Determines if a reference is undefined.
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is undefined.
- */
-function isUndefined(value){return typeof value == 'undefined';}
-
-
-/**
- * @ngdoc function
- * @name angular.isDefined
- * @function
- *
- * @description
- * Determines if a reference is defined.
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is defined.
- */
-function isDefined(value){return typeof value != 'undefined';}
-
-
-/**
- * @ngdoc function
- * @name angular.isObject
- * @function
- *
- * @description
- * Determines if a reference is an `Object`. Unlike `typeof` in JavaScript, `null`s are not
- * considered to be objects.
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is an `Object` but not `null`.
- */
-function isObject(value){return value != null && typeof value == 'object';}
-
-
-/**
- * @ngdoc function
- * @name angular.isString
- * @function
- *
- * @description
- * Determines if a reference is a `String`.
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is a `String`.
- */
-function isString(value){return typeof value == 'string';}
-
-
-/**
- * @ngdoc function
- * @name angular.isNumber
- * @function
- *
- * @description
- * Determines if a reference is a `Number`.
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is a `Number`.
- */
-function isNumber(value){return typeof value == 'number';}
-
-
-/**
- * @ngdoc function
- * @name angular.isDate
- * @function
- *
- * @description
- * Determines if a value is a date.
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is a `Date`.
- */
-function isDate(value){
- return toString.apply(value) == '[object Date]';
-}
-
-
-/**
- * @ngdoc function
- * @name angular.isArray
- * @function
- *
- * @description
- * Determines if a reference is an `Array`.
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is an `Array`.
- */
-function isArray(value) {
- return toString.apply(value) == '[object Array]';
-}
-
-
-/**
- * @ngdoc function
- * @name angular.isFunction
- * @function
- *
- * @description
- * Determines if a reference is a `Function`.
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is a `Function`.
- */
-function isFunction(value){return typeof value == 'function';}
-
-
-/**
- * Checks if `obj` is a window object.
- *
- * @private
- * @param {*} obj Object to check
- * @returns {boolean} True if `obj` is a window obj.
- */
-function isWindow(obj) {
- return obj && obj.document && obj.location && obj.alert && obj.setInterval;
-}
-
-
-function isScope(obj) {
- return obj && obj.$evalAsync && obj.$watch;
-}
-
-
-function isFile(obj) {
- return toString.apply(obj) === '[object File]';
-}
-
-
-function isBoolean(value) {
- return typeof value == 'boolean';
-}
-
-
-function trim(value) {
- return isString(value) ? value.replace(/^\s*/, '').replace(/\s*$/, '') : value;
-}
-
-/**
- * @ngdoc function
- * @name angular.isElement
- * @function
- *
- * @description
- * Determines if a reference is a DOM element (or wrapped jQuery element).
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is a DOM element (or wrapped jQuery element).
- */
-function isElement(node) {
- return node &&
- (node.nodeName // we are a direct element
- || (node.bind && node.find)); // we have a bind and find method part of jQuery API
-}
-
-/**
- * @param str 'key1,key2,...'
- * @returns {object} in the form of {key1:true, key2:true, ...}
- */
-function makeMap(str){
- var obj = {}, items = str.split(","), i;
- for ( i = 0; i < items.length; i++ )
- obj[ items[i] ] = true;
- return obj;
-}
-
-
-if (msie < 9) {
- nodeName_ = function(element) {
- element = element.nodeName ? element : element[0];
- return (element.scopeName && element.scopeName != 'HTML')
- ? uppercase(element.scopeName + ':' + element.nodeName) : element.nodeName;
- };
-} else {
- nodeName_ = function(element) {
- return element.nodeName ? element.nodeName : element[0].nodeName;
- };
-}
-
-
-function map(obj, iterator, context) {
- var results = [];
- forEach(obj, function(value, index, list) {
- results.push(iterator.call(context, value, index, list));
- });
- return results;
-}
-
-
-/**
- * @description
- * Determines the number of elements in an array, the number of properties an object has, or
- * the length of a string.
- *
- * Note: This function is used to augment the Object type in Angular expressions. See
- * {@link angular.Object} for more information about Angular arrays.
- *
- * @param {Object|Array|string} obj Object, array, or string to inspect.
- * @param {boolean} [ownPropsOnly=false] Count only "own" properties in an object
- * @returns {number} The size of `obj` or `0` if `obj` is neither an object nor an array.
- */
-function size(obj, ownPropsOnly) {
- var size = 0, key;
-
- if (isArray(obj) || isString(obj)) {
- return obj.length;
- } else if (isObject(obj)){
- for (key in obj)
- if (!ownPropsOnly || obj.hasOwnProperty(key))
- size++;
- }
-
- return size;
-}
-
-
-function includes(array, obj) {
- return indexOf(array, obj) != -1;
-}
-
-function indexOf(array, obj) {
- if (array.indexOf) return array.indexOf(obj);
-
- for ( var i = 0; i < array.length; i++) {
- if (obj === array[i]) return i;
- }
- return -1;
-}
-
-function arrayRemove(array, value) {
- var index = indexOf(array, value);
- if (index >=0)
- array.splice(index, 1);
- return value;
-}
-
-function isLeafNode (node) {
- if (node) {
- switch (node.nodeName) {
- case "OPTION":
- case "PRE":
- case "TITLE":
- return true;
- }
- }
- return false;
-}
-
-/**
- * @ngdoc function
- * @name angular.copy
- * @function
- *
- * @description
- * Creates a deep copy of `source`, which should be an object or an array.
- *
- * * If no destination is supplied, a copy of the object or array is created.
- * * If a destination is provided, all of its elements (for array) or properties (for objects)
- * are deleted and then all elements/properties from the source are copied to it.
- * * If `source` is not an object or array, `source` is returned.
- *
- * Note: this function is used to augment the Object type in Angular expressions. See
- * {@link ng.$filter} for more information about Angular arrays.
- *
- * @param {*} source The source that will be used to make a copy.
- * Can be any type, including primitives, `null`, and `undefined`.
- * @param {(Object|Array)=} destination Destination into which the source is copied. If
- * provided, must be of the same type as `source`.
- * @returns {*} The copy or updated `destination`, if `destination` was specified.
- */
-function copy(source, destination){
- if (isWindow(source) || isScope(source)) throw Error("Can't copy Window or Scope");
- if (!destination) {
- destination = source;
- if (source) {
- if (isArray(source)) {
- destination = copy(source, []);
- } else if (isDate(source)) {
- destination = new Date(source.getTime());
- } else if (isObject(source)) {
- destination = copy(source, {});
- }
- }
- } else {
- if (source === destination) throw Error("Can't copy equivalent objects or arrays");
- if (isArray(source)) {
- destination.length = 0;
- for ( var i = 0; i < source.length; i++) {
- destination.push(copy(source[i]));
- }
- } else {
- forEach(destination, function(value, key){
- delete destination[key];
- });
- for ( var key in source) {
- destination[key] = copy(source[key]);
- }
- }
- }
- return destination;
-}
-
-/**
- * Create a shallow copy of an object
- */
-function shallowCopy(src, dst) {
- dst = dst || {};
-
- for(var key in src) {
- if (src.hasOwnProperty(key) && key.substr(0, 2) !== '$$') {
- dst[key] = src[key];
- }
- }
-
- return dst;
-}
-
-
-/**
- * @ngdoc function
- * @name angular.equals
- * @function
- *
- * @description
- * Determines if two objects or two values are equivalent. Supports value types, arrays and
- * objects.
- *
- * Two objects or values are considered equivalent if at least one of the following is true:
- *
- * * Both objects or values pass `===` comparison.
- * * Both objects or values are of the same type and all of their properties pass `===` comparison.
- * * Both values are NaN. (In JavasScript, NaN == NaN => false. But we consider two NaN as equal)
- *
- * During a property comparision, properties of `function` type and properties with names
- * that begin with `$` are ignored.
- *
- * Scope and DOMWindow objects are being compared only be identify (`===`).
- *
- * @param {*} o1 Object or value to compare.
- * @param {*} o2 Object or value to compare.
- * @returns {boolean} True if arguments are equal.
- */
-function equals(o1, o2) {
- if (o1 === o2) return true;
- if (o1 === null || o2 === null) return false;
- if (o1 !== o1 && o2 !== o2) return true; // NaN === NaN
- var t1 = typeof o1, t2 = typeof o2, length, key, keySet;
- if (t1 == t2) {
- if (t1 == 'object') {
- if (isArray(o1)) {
- if ((length = o1.length) == o2.length) {
- for(key=0; key<length; key++) {
- if (!equals(o1[key], o2[key])) return false;
- }
- return true;
- }
- } else if (isDate(o1)) {
- return isDate(o2) && o1.getTime() == o2.getTime();
- } else {
- if (isScope(o1) || isScope(o2) || isWindow(o1) || isWindow(o2)) return false;
- keySet = {};
- for(key in o1) {
- if (key.charAt(0) === '$' || isFunction(o1[key])) continue;
- if (!equals(o1[key], o2[key])) return false;
- keySet[key] = true;
- }
- for(key in o2) {
- if (!keySet[key] &&
- key.charAt(0) !== '$' &&
- o2[key] !== undefined &&
- !isFunction(o2[key])) return false;
- }
- return true;
- }
- }
- }
- return false;
-}
-
-
-function concat(array1, array2, index) {
- return array1.concat(slice.call(array2, index));
-}
-
-function sliceArgs(args, startIndex) {
- return slice.call(args, startIndex || 0);
-}
-
-
-/**
- * @ngdoc function
- * @name angular.bind
- * @function
- *
- * @description
- * Returns a function which calls function `fn` bound to `self` (`self` becomes the `this` for
- * `fn`). You can supply optional `args` that are are prebound to the function. This feature is also
- * known as [function currying](http://en.wikipedia.org/wiki/Currying).
- *
- * @param {Object} self Context which `fn` should be evaluated in.
- * @param {function()} fn Function to be bound.
- * @param {...*} args Optional arguments to be prebound to the `fn` function call.
- * @returns {function()} Function that wraps the `fn` with all the specified bindings.
- */
-function bind(self, fn) {
- var curryArgs = arguments.length > 2 ? sliceArgs(arguments, 2) : [];
- if (isFunction(fn) && !(fn instanceof RegExp)) {
- return curryArgs.length
- ? function() {
- return arguments.length
- ? fn.apply(self, curryArgs.concat(slice.call(arguments, 0)))
- : fn.apply(self, curryArgs);
- }
- : function() {
- return arguments.length
- ? fn.apply(self, arguments)
- : fn.call(self);
- };
- } else {
- // in IE, native methods are not functions so they cannot be bound (note: they don't need to be)
- return fn;
- }
-}
-
-
-function toJsonReplacer(key, value) {
- var val = value;
-
- if (/^\$+/.test(key)) {
- val = undefined;
- } else if (isWindow(value)) {
- val = '$WINDOW';
- } else if (value && document === value) {
- val = '$DOCUMENT';
- } else if (isScope(value)) {
- val = '$SCOPE';
- }
-
- return val;
-}
-
-
-/**
- * @ngdoc function
- * @name angular.toJson
- * @function
- *
- * @description
- * Serializes input into a JSON-formatted string.
- *
- * @param {Object|Array|Date|string|number} obj Input to be serialized into JSON.
- * @param {boolean=} pretty If set to true, the JSON output will contain newlines and whitespace.
- * @returns {string} Jsonified string representing `obj`.
- */
-function toJson(obj, pretty) {
- return JSON.stringify(obj, toJsonReplacer, pretty ? ' ' : null);
-}
-
-
-/**
- * @ngdoc function
- * @name angular.fromJson
- * @function
- *
- * @description
- * Deserializes a JSON string.
- *
- * @param {string} json JSON string to deserialize.
- * @returns {Object|Array|Date|string|number} Deserialized thingy.
- */
-function fromJson(json) {
- return isString(json)
- ? JSON.parse(json)
- : json;
-}
-
-
-function toBoolean(value) {
- if (value && value.length !== 0) {
- var v = lowercase("" + value);
- value = !(v == 'f' || v == '0' || v == 'false' || v == 'no' || v == 'n' || v == '[]');
- } else {
- value = false;
- }
- return value;
-}
-
-/**
- * @returns {string} Returns the string representation of the element.
- */
-function startingTag(element) {
- element = jqLite(element).clone();
- try {
- // turns out IE does not let you set .html() on elements which
- // are not allowed to have children. So we just ignore it.
- element.html('');
- } catch(e) {}
- // As Per DOM Standards
- var TEXT_NODE = 3;
- var elemHtml = jqLite('<div>').append(element).html();
- try {
- return element[0].nodeType === TEXT_NODE ? lowercase(elemHtml) :
- elemHtml.
- match(/^(<[^>]+>)/)[1].
- replace(/^<([\w\-]+)/, function(match, nodeName) { return '<' + lowercase(nodeName); });
- } catch(e) {
- return lowercase(elemHtml);
- }
-
-}
-
-
-/////////////////////////////////////////////////
-
-/**
- * Parses an escaped url query string into key-value pairs.
- * @returns Object.<(string|boolean)>
- */
-function parseKeyValue(/**string*/keyValue) {
- var obj = {}, key_value, key;
- forEach((keyValue || "").split('&'), function(keyValue){
- if (keyValue) {
- key_value = keyValue.split('=');
- key = decodeURIComponent(key_value[0]);
- obj[key] = isDefined(key_value[1]) ? decodeURIComponent(key_value[1]) : true;
- }
- });
- return obj;
-}
-
-function toKeyValue(obj) {
- var parts = [];
- forEach(obj, function(value, key) {
- parts.push(encodeUriQuery(key, true) + (value === true ? '' : '=' + encodeUriQuery(value, true)));
- });
- return parts.length ? parts.join('&') : '';
-}
-
-
-/**
- * We need our custom method because encodeURIComponent is too agressive and doesn't follow
- * http://www.ietf.org/rfc/rfc3986.txt with regards to the character set (pchar) allowed in path
- * segments:
- * segment = *pchar
- * pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
- * pct-encoded = "%" HEXDIG HEXDIG
- * unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
- * sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
- * / "*" / "+" / "," / ";" / "="
- */
-function encodeUriSegment(val) {
- return encodeUriQuery(val, true).
- replace(/%26/gi, '&').
- replace(/%3D/gi, '=').
- replace(/%2B/gi, '+');
-}
-
-
-/**
- * This method is intended for encoding *key* or *value* parts of query component. We need a custom
- * method becuase encodeURIComponent is too agressive and encodes stuff that doesn't have to be
- * encoded per http://tools.ietf.org/html/rfc3986:
- * query = *( pchar / "/" / "?" )
- * pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
- * unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
- * pct-encoded = "%" HEXDIG HEXDIG
- * sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
- * / "*" / "+" / "," / ";" / "="
- */
-function encodeUriQuery(val, pctEncodeSpaces) {
- return encodeURIComponent(val).
- replace(/%40/gi, '@').
- replace(/%3A/gi, ':').
- replace(/%24/g, '$').
- replace(/%2C/gi, ',').
- replace((pctEncodeSpaces ? null : /%20/g), '+');
-}
-
-
-/**
- * @ngdoc directive
- * @name ng.directive:ngApp
- *
- * @element ANY
- * @param {angular.Module} ngApp an optional application
- * {@link angular.module module} name to load.
- *
- * @description
- *
- * Use this directive to auto-bootstrap on application. Only
- * one directive can be used per HTML document. The directive
- * designates the root of the application and is typically placed
- * at the root of the page.
- *
- * In the example below if the `ngApp` directive would not be placed
- * on the `html` element then the document would not be compiled
- * and the `{{ 1+2 }}` would not be resolved to `3`.
- *
- * `ngApp` is the easiest way to bootstrap an application.
- *
- <doc:example>
- <doc:source>
- I can add: 1 + 2 = {{ 1+2 }}
- </doc:source>
- </doc:example>
- *
- */
-function angularInit(element, bootstrap) {
- var elements = [element],
- appElement,
- module,
- names = ['ng:app', 'ng-app', 'x-ng-app', 'data-ng-app'],
- NG_APP_CLASS_REGEXP = /\sng[:\-]app(:\s*([\w\d_]+);?)?\s/;
-
- function append(element) {
- element && elements.push(element);
- }
-
- forEach(names, function(name) {
- names[name] = true;
- append(document.getElementById(name));
- name = name.replace(':', '\\:');
- if (element.querySelectorAll) {
- forEach(element.querySelectorAll('.' + name), append);
- forEach(element.querySelectorAll('.' + name + '\\:'), append);
- forEach(element.querySelectorAll('[' + name + ']'), append);
- }
- });
-
- forEach(elements, function(element) {
- if (!appElement) {
- var className = ' ' + element.className + ' ';
- var match = NG_APP_CLASS_REGEXP.exec(className);
- if (match) {
- appElement = element;
- module = (match[2] || '').replace(/\s+/g, ',');
- } else {
- forEach(element.attributes, function(attr) {
- if (!appElement && names[attr.name]) {
- appElement = element;
- module = attr.value;
- }
- });
- }
- }
- });
- if (appElement) {
- bootstrap(appElement, module ? [module] : []);
- }
-}
-
-/**
- * @ngdoc function
- * @name angular.bootstrap
- * @description
- * Use this function to manually start up angular application.
- *
- * See: {@link guide/bootstrap Bootstrap}
- *
- * @param {Element} element DOM element which is the root of angular application.
- * @param {Array<String|Function>=} modules an array of module declarations. See: {@link angular.module modules}
- * @returns {AUTO.$injector} Returns the newly created injector for this app.
- */
-function bootstrap(element, modules) {
- element = jqLite(element);
- modules = modules || [];
- modules.unshift(['$provide', function($provide) {
- $provide.value('$rootElement', element);
- }]);
- modules.unshift('ng');
- var injector = createInjector(modules);
- injector.invoke(
- ['$rootScope', '$rootElement', '$compile', '$injector', function(scope, element, compile, injector){
- scope.$apply(function() {
- element.data('$injector', injector);
- compile(element)(scope);
- });
- }]
- );
- return injector;
-}
-
-var SNAKE_CASE_REGEXP = /[A-Z]/g;
-function snake_case(name, separator){
- separator = separator || '_';
- return name.replace(SNAKE_CASE_REGEXP, function(letter, pos) {
- return (pos ? separator : '') + letter.toLowerCase();
- });
-}
-
-function bindJQuery() {
- // bind to jQuery if present;
- jQuery = window.jQuery;
- // reset to jQuery or default to us.
- if (jQuery) {
- jqLite = jQuery;
- extend(jQuery.fn, {
- scope: JQLitePrototype.scope,
- controller: JQLitePrototype.controller,
- injector: JQLitePrototype.injector,
- inheritedData: JQLitePrototype.inheritedData
- });
- JQLitePatchJQueryRemove('remove', true);
- JQLitePatchJQueryRemove('empty');
- JQLitePatchJQueryRemove('html');
- } else {
- jqLite = JQLite;
- }
- angular.element = jqLite;
-}
-
-/**
- * throw error of the argument is falsy.
- */
-function assertArg(arg, name, reason) {
- if (!arg) {
- throw new Error("Argument '" + (name || '?') + "' is " + (reason || "required"));
- }
- return arg;
-}
-
-function assertArgFn(arg, name, acceptArrayAnnotation) {
- if (acceptArrayAnnotation && isArray(arg)) {
- arg = arg[arg.length - 1];
- }
-
- assertArg(isFunction(arg), name, 'not a function, got ' +
- (arg && typeof arg == 'object' ? arg.constructor.name || 'Object' : typeof arg));
- return arg;
-}
-
-/**
- * @ngdoc interface
- * @name angular.Module
- * @description
- *
- * Interface for configuring angular {@link angular.module modules}.
- */
-
-function setupModuleLoader(window) {
-
- function ensure(obj, name, factory) {
- return obj[name] || (obj[name] = factory());
- }
-
- return ensure(ensure(window, 'angular', Object), 'module', function() {
- /** @type {Object.<string, angular.Module>} */
- var modules = {};
-
- /**
- * @ngdoc function
- * @name angular.module
- * @description
- *
- * The `angular.module` is a global place for creating and registering Angular modules. All
- * modules (angular core or 3rd party) that should be available to an application must be
- * registered using this mechanism.
- *
- *
- * # Module
- *
- * A module is a collocation of services, directives, filters, and configuration information. Module
- * is used to configure the {@link AUTO.$injector $injector}.
- *
- * <pre>
- * // Create a new module
- * var myModule = angular.module('myModule', []);
- *
- * // register a new service
- * myModule.value('appName', 'MyCoolApp');
- *
- * // configure existing services inside initialization blocks.
- * myModule.config(function($locationProvider) {
- * // Configure existing providers
- * $locationProvider.hashPrefix('!');
- * });
- * </pre>
- *
- * Then you can create an injector and load your modules like this:
- *
- * <pre>
- * var injector = angular.injector(['ng', 'MyModule'])
- * </pre>
- *
- * However it's more likely that you'll just use
- * {@link ng.directive:ngApp ngApp} or
- * {@link angular.bootstrap} to simplify this process for you.
- *
- * @param {!string} name The name of the module to create or retrieve.
- * @param {Array.<string>=} requires If specified then new module is being created. If unspecified then the
- * the module is being retrieved for further configuration.
- * @param {Function} configFn Optional configuration function for the module. Same as
- * {@link angular.Module#config Module#config()}.
- * @returns {module} new module with the {@link angular.Module} api.
- */
- return function module(name, requires, configFn) {
- if (requires && modules.hasOwnProperty(name)) {
- modules[name] = null;
- }
- return ensure(modules, name, function() {
- if (!requires) {
- throw Error('No module: ' + name);
- }
-
- /** @type {!Array.<Array.<*>>} */
- var invokeQueue = [];
-
- /** @type {!Array.<Function>} */
- var runBlocks = [];
-
- var config = invokeLater('$injector', 'invoke');
-
- /** @type {angular.Module} */
- var moduleInstance = {
- // Private state
- _invokeQueue: invokeQueue,
- _runBlocks: runBlocks,
-
- /**
- * @ngdoc property
- * @name angular.Module#requires
- * @propertyOf angular.Module
- * @returns {Array.<string>} List of module names which must be loaded before this module.
- * @description
- * Holds the list of modules which the injector will load before the current module is loaded.
- */
- requires: requires,
-
- /**
- * @ngdoc property
- * @name angular.Module#name
- * @propertyOf angular.Module
- * @returns {string} Name of the module.
- * @description
- */
- name: name,
-
-
- /**
- * @ngdoc method
- * @name angular.Module#provider
- * @methodOf angular.Module
- * @param {string} name service name
- * @param {Function} providerType Construction function for creating new instance of the service.
- * @description
- * See {@link AUTO.$provide#provider $provide.provider()}.
- */
- provider: invokeLater('$provide', 'provider'),
-
- /**
- * @ngdoc method
- * @name angular.Module#factory
- * @methodOf angular.Module
- * @param {string} name service name
- * @param {Function} providerFunction Function for creating new instance of the service.
- * @description
- * See {@link AUTO.$provide#factory $provide.factory()}.
- */
- factory: invokeLater('$provide', 'factory'),
-
- /**
- * @ngdoc method
- * @name angular.Module#service
- * @methodOf angular.Module
- * @param {string} name service name
- * @param {Function} constructor A constructor function that will be instantiated.
- * @description
- * See {@link AUTO.$provide#service $provide.service()}.
- */
- service: invokeLater('$provide', 'service'),
-
- /**
- * @ngdoc method
- * @name angular.Module#value
- * @methodOf angular.Module
- * @param {string} name service name
- * @param {*} object Service instance object.
- * @description
- * See {@link AUTO.$provide#value $provide.value()}.
- */
- value: invokeLater('$provide', 'value'),
-
- /**
- * @ngdoc method
- * @name angular.Module#constant
- * @methodOf angular.Module
- * @param {string} name constant name
- * @param {*} object Constant value.
- * @description
- * Because the constant are fixed, they get applied before other provide methods.
- * See {@link AUTO.$provide#constant $provide.constant()}.
- */
- constant: invokeLater('$provide', 'constant', 'unshift'),
-
- /**
- * @ngdoc method
- * @name angular.Module#filter
- * @methodOf angular.Module
- * @param {string} name Filter name.
- * @param {Function} filterFactory Factory function for creating new instance of filter.
- * @description
- * See {@link ng.$filterProvider#register $filterProvider.register()}.
- */
- filter: invokeLater('$filterProvider', 'register'),
-
- /**
- * @ngdoc method
- * @name angular.Module#controller
- * @methodOf angular.Module
- * @param {string} name Controller name.
- * @param {Function} constructor Controller constructor function.
- * @description
- * See {@link ng.$controllerProvider#register $controllerProvider.register()}.
- */
- controller: invokeLater('$controllerProvider', 'register'),
-
- /**
- * @ngdoc method
- * @name angular.Module#directive
- * @methodOf angular.Module
- * @param {string} name directive name
- * @param {Function} directiveFactory Factory function for creating new instance of
- * directives.
- * @description
- * See {@link ng.$compileProvider#directive $compileProvider.directive()}.
- */
- directive: invokeLater('$compileProvider', 'directive'),
-
- /**
- * @ngdoc method
- * @name angular.Module#config
- * @methodOf angular.Module
- * @param {Function} configFn Execute this function on module load. Useful for service
- * configuration.
- * @description
- * Use this method to register work which needs to be performed on module loading.
- */
- config: config,
-
- /**
- * @ngdoc method
- * @name angular.Module#run
- * @methodOf angular.Module
- * @param {Function} initializationFn Execute this function after injector creation.
- * Useful for application initialization.
- * @description
- * Use this method to register work which should be performed when the injector is done
- * loading all modules.
- */
- run: function(block) {
- runBlocks.push(block);
- return this;
- }
- };
-
- if (configFn) {
- config(configFn);
- }
-
- return moduleInstance;
-
- /**
- * @param {string} provider
- * @param {string} method
- * @param {String=} insertMethod
- * @returns {angular.Module}
- */
- function invokeLater(provider, method, insertMethod) {
- return function() {
- invokeQueue[insertMethod || 'push']([provider, method, arguments]);
- return moduleInstance;
- }
- }
- });
- };
- });
-
-}
-
-/**
- * @ngdoc property
- * @name angular.version
- * @description
- * An object that contains information about the current AngularJS version. This object has the
- * following properties:
- *
- * - `full` – `{string}` – Full version string, such as "0.9.18".
- * - `major` – `{number}` – Major version number, such as "0".
- * - `minor` – `{number}` – Minor version number, such as "9".
- * - `dot` – `{number}` – Dot version number, such as "18".
- * - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat".
- */
-var version = {
- full: '1.0.5', // all of these placeholder strings will be replaced by rake's
- major: 1, // compile task
- minor: 0,
- dot: 5,
- codeName: 'flatulent-propulsion'
-};
-
-
-function publishExternalAPI(angular){
- extend(angular, {
- 'bootstrap': bootstrap,
- 'copy': copy,
- 'extend': extend,
- 'equals': equals,
- 'element': jqLite,
- 'forEach': forEach,
- 'injector': createInjector,
- 'noop':noop,
- 'bind':bind,
- 'toJson': toJson,
- 'fromJson': fromJson,
- 'identity':identity,
- 'isUndefined': isUndefined,
- 'isDefined': isDefined,
- 'isString': isString,
- 'isFunction': isFunction,
- 'isObject': isObject,
- 'isNumber': isNumber,
- 'isElement': isElement,
- 'isArray': isArray,
- 'version': version,
- 'isDate': isDate,
- 'lowercase': lowercase,
- 'uppercase': uppercase,
- 'callbacks': {counter: 0}
- });
-
- angularModule = setupModuleLoader(window);
- try {
- angularModule('ngLocale');
- } catch (e) {
- angularModule('ngLocale', []).provider('$locale', $LocaleProvider);
- }
-
- angularModule('ng', ['ngLocale'], ['$provide',
- function ngModule($provide) {
- $provide.provider('$compile', $CompileProvider).
- directive({
- a: htmlAnchorDirective,
- input: inputDirective,
- textarea: inputDirective,
- form: formDirective,
- script: scriptDirective,
- select: selectDirective,
- style: styleDirective,
- option: optionDirective,
- ngBind: ngBindDirective,
- ngBindHtmlUnsafe: ngBindHtmlUnsafeDirective,
- ngBindTemplate: ngBindTemplateDirective,
- ngClass: ngClassDirective,
- ngClassEven: ngClassEvenDirective,
- ngClassOdd: ngClassOddDirective,
- ngCsp: ngCspDirective,
- ngCloak: ngCloakDirective,
- ngController: ngControllerDirective,
- ngForm: ngFormDirective,
- ngHide: ngHideDirective,
- ngInclude: ngIncludeDirective,
- ngInit: ngInitDirective,
- ngNonBindable: ngNonBindableDirective,
- ngPluralize: ngPluralizeDirective,
- ngRepeat: ngRepeatDirective,
- ngShow: ngShowDirective,
- ngSubmit: ngSubmitDirective,
- ngStyle: ngStyleDirective,
- ngSwitch: ngSwitchDirective,
- ngSwitchWhen: ngSwitchWhenDirective,
- ngSwitchDefault: ngSwitchDefaultDirective,
- ngOptions: ngOptionsDirective,
- ngView: ngViewDirective,
- ngTransclude: ngTranscludeDirective,
- ngModel: ngModelDirective,
- ngList: ngListDirective,
- ngChange: ngChangeDirective,
- required: requiredDirective,
- ngRequired: requiredDirective,
- ngValue: ngValueDirective
- }).
- directive(ngAttributeAliasDirectives).
- directive(ngEventDirectives);
- $provide.provider({
- $anchorScroll: $AnchorScrollProvider,
- $browser: $BrowserProvider,
- $cacheFactory: $CacheFactoryProvider,
- $controller: $ControllerProvider,
- $document: $DocumentProvider,
- $exceptionHandler: $ExceptionHandlerProvider,
- $filter: $FilterProvider,
- $interpolate: $InterpolateProvider,
- $http: $HttpProvider,
- $httpBackend: $HttpBackendProvider,
- $location: $LocationProvider,
- $log: $LogProvider,
- $parse: $ParseProvider,
- $route: $RouteProvider,
- $routeParams: $RouteParamsProvider,
- $rootScope: $RootScopeProvider,
- $q: $QProvider,
- $sniffer: $SnifferProvider,
- $templateCache: $TemplateCacheProvider,
- $timeout: $TimeoutProvider,
- $window: $WindowProvider
- });
- }
- ]);
-}
-
-//////////////////////////////////
-//JQLite
-//////////////////////////////////
-
-/**
- * @ngdoc function
- * @name angular.element
- * @function
- *
- * @description
- * Wraps a raw DOM element or HTML string as a [jQuery](http://jquery.com) element.
- * `angular.element` can be either an alias for [jQuery](http://api.jquery.com/jQuery/) function, if
- * jQuery is available, or a function that wraps the element or string in Angular's jQuery lite
- * implementation (commonly referred to as jqLite).
- *
- * Real jQuery always takes precedence over jqLite, provided it was loaded before `DOMContentLoaded`
- * event fired.
- *
- * jqLite is a tiny, API-compatible subset of jQuery that allows
- * Angular to manipulate the DOM. jqLite implements only the most commonly needed functionality
- * within a very small footprint, so only a subset of the jQuery API - methods, arguments and
- * invocation styles - are supported.
- *
- * Note: All element references in Angular are always wrapped with jQuery or jqLite; they are never
- * raw DOM references.
- *
- * ## Angular's jQuery lite provides the following methods:
- *
- * - [addClass()](http://api.jquery.com/addClass/)
- * - [after()](http://api.jquery.com/after/)
- * - [append()](http://api.jquery.com/append/)
- * - [attr()](http://api.jquery.com/attr/)
- * - [bind()](http://api.jquery.com/bind/)
- * - [children()](http://api.jquery.com/children/)
- * - [clone()](http://api.jquery.com/clone/)
- * - [contents()](http://api.jquery.com/contents/)
- * - [css()](http://api.jquery.com/css/)
- * - [data()](http://api.jquery.com/data/)
- * - [eq()](http://api.jquery.com/eq/)
- * - [find()](http://api.jquery.com/find/) - Limited to lookups by tag name.
- * - [hasClass()](http://api.jquery.com/hasClass/)
- * - [html()](http://api.jquery.com/html/)
- * - [next()](http://api.jquery.com/next/)
- * - [parent()](http://api.jquery.com/parent/)
- * - [prepend()](http://api.jquery.com/prepend/)
- * - [prop()](http://api.jquery.com/prop/)
- * - [ready()](http://api.jquery.com/ready/)
- * - [remove()](http://api.jquery.com/remove/)
- * - [removeAttr()](http://api.jquery.com/removeAttr/)
- * - [removeClass()](http://api.jquery.com/removeClass/)
- * - [removeData()](http://api.jquery.com/removeData/)
- * - [replaceWith()](http://api.jquery.com/replaceWith/)
- * - [text()](http://api.jquery.com/text/)
- * - [toggleClass()](http://api.jquery.com/toggleClass/)
- * - [triggerHandler()](http://api.jquery.com/triggerHandler/) - Doesn't pass native event objects to handlers.
- * - [unbind()](http://api.jquery.com/unbind/)
- * - [val()](http://api.jquery.com/val/)
- * - [wrap()](http://api.jquery.com/wrap/)
- *
- * ## In addtion to the above, Angular provides additional methods to both jQuery and jQuery lite:
- *
- * - `controller(name)` - retrieves the controller of the current element or its parent. By default
- * retrieves controller associated with the `ngController` directive. If `name` is provided as
- * camelCase directive name, then the controller for this directive will be retrieved (e.g.
- * `'ngModel'`).
- * - `injector()` - retrieves the injector of the current element or its parent.
- * - `scope()` - retrieves the {@link api/ng.$rootScope.Scope scope} of the current
- * element or its parent.
- * - `inheritedData()` - same as `data()`, but walks up the DOM until a value is found or the top
- * parent element is reached.
- *
- * @param {string|DOMElement} element HTML string or DOMElement to be wrapped into jQuery.
- * @returns {Object} jQuery object.
- */
-
-var jqCache = JQLite.cache = {},
- jqName = JQLite.expando = 'ng-' + new Date().getTime(),
- jqId = 1,
- addEventListenerFn = (window.document.addEventListener
- ? function(element, type, fn) {element.addEventListener(type, fn, false);}
- : function(element, type, fn) {element.attachEvent('on' + type, fn);}),
- removeEventListenerFn = (window.document.removeEventListener
- ? function(element, type, fn) {element.removeEventListener(type, fn, false); }
- : function(element, type, fn) {element.detachEvent('on' + type, fn); });
-
-function jqNextId() { return ++jqId; }
-
-
-var SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
-var MOZ_HACK_REGEXP = /^moz([A-Z])/;
-
-/**
- * Converts snake_case to camelCase.
- * Also there is special case for Moz prefix starting with upper case letter.
- * @param name Name to normalize
- */
-function camelCase(name) {
- return name.
- replace(SPECIAL_CHARS_REGEXP, function(_, separator, letter, offset) {
- return offset ? letter.toUpperCase() : letter;
- }).
- replace(MOZ_HACK_REGEXP, 'Moz$1');
-}
-
-/////////////////////////////////////////////
-// jQuery mutation patch
-//
-// In conjunction with bindJQuery intercepts all jQuery's DOM destruction apis and fires a
-// $destroy event on all DOM nodes being removed.
-//
-/////////////////////////////////////////////
-
-function JQLitePatchJQueryRemove(name, dispatchThis) {
- var originalJqFn = jQuery.fn[name];
- originalJqFn = originalJqFn.$original || originalJqFn;
- removePatch.$original = originalJqFn;
- jQuery.fn[name] = removePatch;
-
- function removePatch() {
- var list = [this],
- fireEvent = dispatchThis,
- set, setIndex, setLength,
- element, childIndex, childLength, children,
- fns, events;
-
- while(list.length) {
- set = list.shift();
- for(setIndex = 0, setLength = set.length; setIndex < setLength; setIndex++) {
- element = jqLite(set[setIndex]);
- if (fireEvent) {
- element.triggerHandler('$destroy');
- } else {
- fireEvent = !fireEvent;
- }
- for(childIndex = 0, childLength = (children = element.children()).length;
- childIndex < childLength;
- childIndex++) {
- list.push(jQuery(children[childIndex]));
- }
- }
- }
- return originalJqFn.apply(this, arguments);
- }
-}
-
-/////////////////////////////////////////////
-function JQLite(element) {
- if (element instanceof JQLite) {
- return element;
- }
- if (!(this instanceof JQLite)) {
- if (isString(element) && element.charAt(0) != '<') {
- throw Error('selectors not implemented');
- }
- return new JQLite(element);
- }
-
- if (isString(element)) {
- var div = document.createElement('div');
- // Read about the NoScope elements here:
- // http://msdn.microsoft.com/en-us/library/ms533897(VS.85).aspx
- div.innerHTML = '<div> </div>' + element; // IE insanity to make NoScope elements work!
- div.removeChild(div.firstChild); // remove the superfluous div
- JQLiteAddNodes(this, div.childNodes);
- this.remove(); // detach the elements from the temporary DOM div.
- } else {
- JQLiteAddNodes(this, element);
- }
-}
-
-function JQLiteClone(element) {
- return element.cloneNode(true);
-}
-
-function JQLiteDealoc(element){
- JQLiteRemoveData(element);
- for ( var i = 0, children = element.childNodes || []; i < children.length; i++) {
- JQLiteDealoc(children[i]);
- }
-}
-
-function JQLiteUnbind(element, type, fn) {
- var events = JQLiteExpandoStore(element, 'events'),
- handle = JQLiteExpandoStore(element, 'handle');
-
- if (!handle) return; //no listeners registered
-
- if (isUndefined(type)) {
- forEach(events, function(eventHandler, type) {
- removeEventListenerFn(element, type, eventHandler);
- delete events[type];
- });
- } else {
- if (isUndefined(fn)) {
- removeEventListenerFn(element, type, events[type]);
- delete events[type];
- } else {
- arrayRemove(events[type], fn);
- }
- }
-}
-
-function JQLiteRemoveData(element) {
- var expandoId = element[jqName],
- expandoStore = jqCache[expandoId];
-
- if (expandoStore) {
- if (expandoStore.handle) {
- expandoStore.events.$destroy && expandoStore.handle({}, '$destroy');
- JQLiteUnbind(element);
- }
- delete jqCache[expandoId];
- element[jqName] = undefined; // ie does not allow deletion of attributes on elements.
- }
-}
-
-function JQLiteExpandoStore(element, key, value) {
- var expandoId = element[jqName],
- expandoStore = jqCache[expandoId || -1];
-
- if (isDefined(value)) {
- if (!expandoStore) {
- element[jqName] = expandoId = jqNextId();
- expandoStore = jqCache[expandoId] = {};
- }
- expandoStore[key] = value;
- } else {
- return expandoStore && expandoStore[key];
- }
-}
-
-function JQLiteData(element, key, value) {
- var data = JQLiteExpandoStore(element, 'data'),
- isSetter = isDefined(value),
- keyDefined = !isSetter && isDefined(key),
- isSimpleGetter = keyDefined && !isObject(key);
-
- if (!data && !isSimpleGetter) {
- JQLiteExpandoStore(element, 'data', data = {});
- }
-
- if (isSetter) {
- data[key] = value;
- } else {
- if (keyDefined) {
- if (isSimpleGetter) {
- // don't create data in this case.
- return data && data[key];
- } else {
- extend(data, key);
- }
- } else {
- return data;
- }
- }
-}
-
-function JQLiteHasClass(element, selector) {
- return ((" " + element.className + " ").replace(/[\n\t]/g, " ").
- indexOf( " " + selector + " " ) > -1);
-}
-
-function JQLiteRemoveClass(element, cssClasses) {
- if (cssClasses) {
- forEach(cssClasses.split(' '), function(cssClass) {
- element.className = trim(
- (" " + element.className + " ")
- .replace(/[\n\t]/g, " ")
- .replace(" " + trim(cssClass) + " ", " ")
- );
- });
- }
-}
-
-function JQLiteAddClass(element, cssClasses) {
- if (cssClasses) {
- forEach(cssClasses.split(' '), function(cssClass) {
- if (!JQLiteHasClass(element, cssClass)) {
- element.className = trim(element.className + ' ' + trim(cssClass));
- }
- });
- }
-}
-
-function JQLiteAddNodes(root, elements) {
- if (elements) {
- elements = (!elements.nodeName && isDefined(elements.length) && !isWindow(elements))
- ? elements
- : [ elements ];
- for(var i=0; i < elements.length; i++) {
- root.push(elements[i]);
- }
- }
-}
-
-function JQLiteController(element, name) {
- return JQLiteInheritedData(element, '$' + (name || 'ngController' ) + 'Controller');
-}
-
-function JQLiteInheritedData(element, name, value) {
- element = jqLite(element);
-
- // if element is the document object work with the html element instead
- // this makes $(document).scope() possible
- if(element[0].nodeType == 9) {
- element = element.find('html');
- }
-
- while (element.length) {
- if (value = element.data(name)) return value;
- element = element.parent();
- }
-}
-
-//////////////////////////////////////////
-// Functions which are declared directly.
-//////////////////////////////////////////
-var JQLitePrototype = JQLite.prototype = {
- ready: function(fn) {
- var fired = false;
-
- function trigger() {
- if (fired) return;
- fired = true;
- fn();
- }
-
- this.bind('DOMContentLoaded', trigger); // works for modern browsers and IE9
- // we can not use jqLite since we are not done loading and jQuery could be loaded later.
- JQLite(window).bind('load', trigger); // fallback to window.onload for others
- },
- toString: function() {
- var value = [];
- forEach(this, function(e){ value.push('' + e);});
- return '[' + value.join(', ') + ']';
- },
-
- eq: function(index) {
- return (index >= 0) ? jqLite(this[index]) : jqLite(this[this.length + index]);
- },
-
- length: 0,
- push: push,
- sort: [].sort,
- splice: [].splice
-};
-
-//////////////////////////////////////////
-// Functions iterating getter/setters.
-// these functions return self on setter and
-// value on get.
-//////////////////////////////////////////
-var BOOLEAN_ATTR = {};
-forEach('multiple,selected,checked,disabled,readOnly,required'.split(','), function(value) {
- BOOLEAN_ATTR[lowercase(value)] = value;
-});
-var BOOLEAN_ELEMENTS = {};
-forEach('input,select,option,textarea,button,form'.split(','), function(value) {
- BOOLEAN_ELEMENTS[uppercase(value)] = true;
-});
-
-function getBooleanAttrName(element, name) {
- // check dom last since we will most likely fail on name
- var booleanAttr = BOOLEAN_ATTR[name.toLowerCase()];
-
- // booleanAttr is here twice to minimize DOM access
- return booleanAttr && BOOLEAN_ELEMENTS[element.nodeName] && booleanAttr;
-}
-
-forEach({
- data: JQLiteData,
- inheritedData: JQLiteInheritedData,
-
- scope: function(element) {
- return JQLiteInheritedData(element, '$scope');
- },
-
- controller: JQLiteController ,
-
- injector: function(element) {
- return JQLiteInheritedData(element, '$injector');
- },
-
- removeAttr: function(element,name) {
- element.removeAttribute(name);
- },
-
- hasClass: JQLiteHasClass,
-
- css: function(element, name, value) {
- name = camelCase(name);
-
- if (isDefined(value)) {
- element.style[name] = value;
- } else {
- var val;
-
- if (msie <= 8) {
- // this is some IE specific weirdness that jQuery 1.6.4 does not sure why
- val = element.currentStyle && element.currentStyle[name];
- if (val === '') val = 'auto';
- }
-
- val = val || element.style[name];
-
- if (msie <= 8) {
- // jquery weirdness :-/
- val = (val === '') ? undefined : val;
- }
-
- return val;
- }
- },
-
- attr: function(element, name, value){
- var lowercasedName = lowercase(name);
- if (BOOLEAN_ATTR[lowercasedName]) {
- if (isDefined(value)) {
- if (!!value) {
- element[name] = true;
- element.setAttribute(name, lowercasedName);
- } else {
- element[name] = false;
- element.removeAttribute(lowercasedName);
- }
- } else {
- return (element[name] ||
- (element.attributes.getNamedItem(name)|| noop).specified)
- ? lowercasedName
- : undefined;
- }
- } else if (isDefined(value)) {
- element.setAttribute(name, value);
- } else if (element.getAttribute) {
- // the extra argument "2" is to get the right thing for a.href in IE, see jQuery code
- // some elements (e.g. Document) don't have get attribute, so return undefined
- var ret = element.getAttribute(name, 2);
- // normalize non-existing attributes to undefined (as jQuery)
- return ret === null ? undefined : ret;
- }
- },
-
- prop: function(element, name, value) {
- if (isDefined(value)) {
- element[name] = value;
- } else {
- return element[name];
- }
- },
-
- text: extend((msie < 9)
- ? function(element, value) {
- if (element.nodeType == 1 /** Element */) {
- if (isUndefined(value))
- return element.innerText;
- element.innerText = value;
- } else {
- if (isUndefined(value))
- return element.nodeValue;
- element.nodeValue = value;
- }
- }
- : function(element, value) {
- if (isUndefined(value)) {
- return element.textContent;
- }
- element.textContent = value;
- }, {$dv:''}),
-
- val: function(element, value) {
- if (isUndefined(value)) {
- return element.value;
- }
- element.value = value;
- },
-
- html: function(element, value) {
- if (isUndefined(value)) {
- return element.innerHTML;
- }
- for (var i = 0, childNodes = element.childNodes; i < childNodes.length; i++) {
- JQLiteDealoc(childNodes[i]);
- }
- element.innerHTML = value;
- }
-}, function(fn, name){
- /**
- * Properties: writes return selection, reads return first value
- */
- JQLite.prototype[name] = function(arg1, arg2) {
- var i, key;
-
- // JQLiteHasClass has only two arguments, but is a getter-only fn, so we need to special-case it
- // in a way that survives minification.
- if (((fn.length == 2 && (fn !== JQLiteHasClass && fn !== JQLiteController)) ? arg1 : arg2) === undefined) {
- if (isObject(arg1)) {
-
- // we are a write, but the object properties are the key/values
- for(i=0; i < this.length; i++) {
- if (fn === JQLiteData) {
- // data() takes the whole object in jQuery
- fn(this[i], arg1);
- } else {
- for (key in arg1) {
- fn(this[i], key, arg1[key]);
- }
- }
- }
- // return self for chaining
- return this;
- } else {
- // we are a read, so read the first child.
- if (this.length)
- return fn(this[0], arg1, arg2);
- }
- } else {
- // we are a write, so apply to all children
- for(i=0; i < this.length; i++) {
- fn(this[i], arg1, arg2);
- }
- // return self for chaining
- return this;
- }
- return fn.$dv;
- };
-});
-
-function createEventHandler(element, events) {
- var eventHandler = function (event, type) {
- if (!event.preventDefault) {
- event.preventDefault = function() {
- event.returnValue = false; //ie
- };
- }
-
- if (!event.stopPropagation) {
- event.stopPropagation = function() {
- event.cancelBubble = true; //ie
- };
- }
-
- if (!event.target) {
- event.target = event.srcElement || document;
- }
-
- if (isUndefined(event.defaultPrevented)) {
- var prevent = event.preventDefault;
- event.preventDefault = function() {
- event.defaultPrevented = true;
- prevent.call(event);
- };
- event.defaultPrevented = false;
- }
-
- event.isDefaultPrevented = function() {
- return event.defaultPrevented;
- };
-
- forEach(events[type || event.type], function(fn) {
- fn.call(element, event);
- });
-
- // Remove monkey-patched methods (IE),
- // as they would cause memory leaks in IE8.
- if (msie <= 8) {
- // IE7/8 does not allow to delete property on native object
- event.preventDefault = null;
- event.stopPropagation = null;
- event.isDefaultPrevented = null;
- } else {
- // It shouldn't affect normal browsers (native methods are defined on prototype).
- delete event.preventDefault;
- delete event.stopPropagation;
- delete event.isDefaultPrevented;
- }
- };
- eventHandler.elem = element;
- return eventHandler;
-}
-
-//////////////////////////////////////////
-// Functions iterating traversal.
-// These functions chain results into a single
-// selector.
-//////////////////////////////////////////
-forEach({
- removeData: JQLiteRemoveData,
-
- dealoc: JQLiteDealoc,
-
- bind: function bindFn(element, type, fn){
- var events = JQLiteExpandoStore(element, 'events'),
- handle = JQLiteExpandoStore(element, 'handle');
-
- if (!events) JQLiteExpandoStore(element, 'events', events = {});
- if (!handle) JQLiteExpandoStore(element, 'handle', handle = createEventHandler(element, events));
-
- forEach(type.split(' '), function(type){
- var eventFns = events[type];
-
- if (!eventFns) {
- if (type == 'mouseenter' || type == 'mouseleave') {
- var counter = 0;
-
- events.mouseenter = [];
- events.mouseleave = [];
-
- bindFn(element, 'mouseover', function(event) {
- counter++;
- if (counter == 1) {
- handle(event, 'mouseenter');
- }
- });
- bindFn(element, 'mouseout', function(event) {
- counter --;
- if (counter == 0) {
- handle(event, 'mouseleave');
- }
- });
- } else {
- addEventListenerFn(element, type, handle);
- events[type] = [];
- }
- eventFns = events[type]
- }
- eventFns.push(fn);
- });
- },
-
- unbind: JQLiteUnbind,
-
- replaceWith: function(element, replaceNode) {
- var index, parent = element.parentNode;
- JQLiteDealoc(element);
- forEach(new JQLite(replaceNode), function(node){
- if (index) {
- parent.insertBefore(node, index.nextSibling);
- } else {
- parent.replaceChild(node, element);
- }
- index = node;
- });
- },
-
- children: function(element) {
- var children = [];
- forEach(element.childNodes, function(element){
- if (element.nodeType === 1)
- children.push(element);
- });
- return children;
- },
-
- contents: function(element) {
- return element.childNodes || [];
- },
-
- append: function(element, node) {
- forEach(new JQLite(node), function(child){
- if (element.nodeType === 1)
- element.appendChild(child);
- });
- },
-
- prepend: function(element, node) {
- if (element.nodeType === 1) {
- var index = element.firstChild;
- forEach(new JQLite(node), function(child){
- if (index) {
- element.insertBefore(child, index);
- } else {
- element.appendChild(child);
- index = child;
- }
- });
- }
- },
-
- wrap: function(element, wrapNode) {
- wrapNode = jqLite(wrapNode)[0];
- var parent = element.parentNode;
- if (parent) {
- parent.replaceChild(wrapNode, element);
- }
- wrapNode.appendChild(element);
- },
-
- remove: function(element) {
- JQLiteDealoc(element);
- var parent = element.parentNode;
- if (parent) parent.removeChild(element);
- },
-
- after: function(element, newElement) {
- var index = element, parent = element.parentNode;
- forEach(new JQLite(newElement), function(node){
- parent.insertBefore(node, index.nextSibling);
- index = node;
- });
- },
-
- addClass: JQLiteAddClass,
- removeClass: JQLiteRemoveClass,
-
- toggleClass: function(element, selector, condition) {
- if (isUndefined(condition)) {
- condition = !JQLiteHasClass(element, selector);
- }
- (condition ? JQLiteAddClass : JQLiteRemoveClass)(element, selector);
- },
-
- parent: function(element) {
- var parent = element.parentNode;
- return parent && parent.nodeType !== 11 ? parent : null;
- },
-
- next: function(element) {
- if (element.nextElementSibling) {
- return element.nextElementSibling;
- }
-
- // IE8 doesn't have nextElementSibling
- var elm = element.nextSibling;
- while (elm != null && elm.nodeType !== 1) {
- elm = elm.nextSibling;
- }
- return elm;
- },
-
- find: function(element, selector) {
- return element.getElementsByTagName(selector);
- },
-
- clone: JQLiteClone,
-
- triggerHandler: function(element, eventName) {
- var eventFns = (JQLiteExpandoStore(element, 'events') || {})[eventName];
-
- forEach(eventFns, function(fn) {
- fn.call(element, null);
- });
- }
-}, function(fn, name){
- /**
- * chaining functions
- */
- JQLite.prototype[name] = function(arg1, arg2) {
- var value;
- for(var i=0; i < this.length; i++) {
- if (value == undefined) {
- value = fn(this[i], arg1, arg2);
- if (value !== undefined) {
- // any function which returns a value needs to be wrapped
- value = jqLite(value);
- }
- } else {
- JQLiteAddNodes(value, fn(this[i], arg1, arg2));
- }
- }
- return value == undefined ? this : value;
- };
-});
-
-/**
- * Computes a hash of an 'obj'.
- * Hash of a:
- * string is string
- * number is number as string
- * object is either result of calling $$hashKey function on the object or uniquely generated id,
- * that is also assigned to the $$hashKey property of the object.
- *
- * @param obj
- * @returns {string} hash string such that the same input will have the same hash string.
- * The resulting string key is in 'type:hashKey' format.
- */
-function hashKey(obj) {
- var objType = typeof obj,
- key;
-
- if (objType == 'object' && obj !== null) {
- if (typeof (key = obj.$$hashKey) == 'function') {
- // must invoke on object to keep the right this
- key = obj.$$hashKey();
- } else if (key === undefined) {
- key = obj.$$hashKey = nextUid();
- }
- } else {
- key = obj;
- }
-
- return objType + ':' + key;
-}
-
-/**
- * HashMap which can use objects as keys
- */
-function HashMap(array){
- forEach(array, this.put, this);
-}
-HashMap.prototype = {
- /**
- * Store key value pair
- * @param key key to store can be any type
- * @param value value to store can be any type
- */
- put: function(key, value) {
- this[hashKey(key)] = value;
- },
-
- /**
- * @param key
- * @returns the value for the key
- */
- get: function(key) {
- return this[hashKey(key)];
- },
-
- /**
- * Remove the key/value pair
- * @param key
- */
- remove: function(key) {
- var value = this[key = hashKey(key)];
- delete this[key];
- return value;
- }
-};
-
-/**
- * A map where multiple values can be added to the same key such that they form a queue.
- * @returns {HashQueueMap}
- */
-function HashQueueMap() {}
-HashQueueMap.prototype = {
- /**
- * Same as array push, but using an array as the value for the hash
- */
- push: function(key, value) {
- var array = this[key = hashKey(key)];
- if (!array) {
- this[key] = [value];
- } else {
- array.push(value);
- }
- },
-
- /**
- * Same as array shift, but using an array as the value for the hash
- */
- shift: function(key) {
- var array = this[key = hashKey(key)];
- if (array) {
- if (array.length == 1) {
- delete this[key];
- return array[0];
- } else {
- return array.shift();
- }
- }
- },
-
- /**
- * return the first item without deleting it
- */
- peek: function(key) {
- var array = this[hashKey(key)];
- if (array) {
- return array[0];
- }
- }
-};
-
-/**
- * @ngdoc function
- * @name angular.injector
- * @function
- *
- * @description
- * Creates an injector function that can be used for retrieving services as well as for
- * dependency injection (see {@link guide/di dependency injection}).
- *
-
- * @param {Array.<string|Function>} modules A list of module functions or their aliases. See
- * {@link angular.module}. The `ng` module must be explicitly added.
- * @returns {function()} Injector function. See {@link AUTO.$injector $injector}.
- *
- * @example
- * Typical usage
- * <pre>
- * // create an injector
- * var $injector = angular.injector(['ng']);
- *
- * // use the injector to kick off your application
- * // use the type inference to auto inject arguments, or use implicit injection
- * $injector.invoke(function($rootScope, $compile, $document){
- * $compile($document)($rootScope);
- * $rootScope.$digest();
- * });
- * </pre>
- */
-
-
-/**
- * @ngdoc overview
- * @name AUTO
- * @description
- *
- * Implicit module which gets automatically added to each {@link AUTO.$injector $injector}.
- */
-
-var FN_ARGS = /^function\s*[^\(]*\(\s*([^\)]*)\)/m;
-var FN_ARG_SPLIT = /,/;
-var FN_ARG = /^\s*(_?)(\S+?)\1\s*$/;
-var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg;
-function annotate(fn) {
- var $inject,
- fnText,
- argDecl,
- last;
-
- if (typeof fn == 'function') {
- if (!($inject = fn.$inject)) {
- $inject = [];
- fnText = fn.toString().replace(STRIP_COMMENTS, '');
- argDecl = fnText.match(FN_ARGS);
- forEach(argDecl[1].split(FN_ARG_SPLIT), function(arg){
- arg.replace(FN_ARG, function(all, underscore, name){
- $inject.push(name);
- });
- });
- fn.$inject = $inject;
- }
- } else if (isArray(fn)) {
- last = fn.length - 1;
- assertArgFn(fn[last], 'fn')
- $inject = fn.slice(0, last);
- } else {
- assertArgFn(fn, 'fn', true);
- }
- return $inject;
-}
-
-///////////////////////////////////////
-
-/**
- * @ngdoc object
- * @name AUTO.$injector
- * @function
- *
- * @description
- *
- * `$injector` is used to retrieve object instances as defined by
- * {@link AUTO.$provide provider}, instantiate types, invoke methods,
- * and load modules.
- *
- * The following always holds true:
- *
- * <pre>
- * var $injector = angular.injector();
- * expect($injector.get('$injector')).toBe($injector);
- * expect($injector.invoke(function($injector){
- * return $injector;
- * }).toBe($injector);
- * </pre>
- *
- * # Injection Function Annotation
- *
- * JavaScript does not have annotations, and annotations are needed for dependency injection. The
- * following ways are all valid way of annotating function with injection arguments and are equivalent.
- *
- * <pre>
- * // inferred (only works if code not minified/obfuscated)
- * $inject.invoke(function(serviceA){});
- *
- * // annotated
- * function explicit(serviceA) {};
- * explicit.$inject = ['serviceA'];
- * $inject.invoke(explicit);
- *
- * // inline
- * $inject.invoke(['serviceA', function(serviceA){}]);
- * </pre>
- *
- * ## Inference
- *
- * In JavaScript calling `toString()` on a function returns the function definition. The definition can then be
- * parsed and the function arguments can be extracted. *NOTE:* This does not work with minification, and obfuscation
- * tools since these tools change the argument names.
- *
- * ## `$inject` Annotation
- * By adding a `$inject` property onto a function the injection parameters can be specified.
- *
- * ## Inline
- * As an array of injection names, where the last item in the array is the function to call.
- */
-
-/**
- * @ngdoc method
- * @name AUTO.$injector#get
- * @methodOf AUTO.$injector
- *
- * @description
- * Return an instance of the service.
- *
- * @param {string} name The name of the instance to retrieve.
- * @return {*} The instance.
- */
-
-/**
- * @ngdoc method
- * @name AUTO.$injector#invoke
- * @methodOf AUTO.$injector
- *
- * @description
- * Invoke the method and supply the method arguments from the `$injector`.
- *
- * @param {!function} fn The function to invoke. The function arguments come form the function annotation.
- * @param {Object=} self The `this` for the invoked method.
- * @param {Object=} locals Optional object. If preset then any argument names are read from this object first, before
- * the `$injector` is consulted.
- * @returns {*} the value returned by the invoked `fn` function.
- */
-
-/**
- * @ngdoc method
- * @name AUTO.$injector#instantiate
- * @methodOf AUTO.$injector
- * @description
- * Create a new instance of JS type. The method takes a constructor function invokes the new operator and supplies
- * all of the arguments to the constructor function as specified by the constructor annotation.
- *
- * @param {function} Type Annotated constructor function.
- * @param {Object=} locals Optional object. If preset then any argument names are read from this object first, before
- * the `$injector` is consulted.
- * @returns {Object} new instance of `Type`.
- */
-
-/**
- * @ngdoc method
- * @name AUTO.$injector#annotate
- * @methodOf AUTO.$injector
- *
- * @description
- * Returns an array of service names which the function is requesting for injection. This API is used by the injector
- * to determine which services need to be injected into the function when the function is invoked. There are three
- * ways in which the function can be annotated with the needed dependencies.
- *
- * # Argument names
- *
- * The simplest form is to extract the dependencies from the arguments of the function. This is done by converting
- * the function into a string using `toString()` method and extracting the argument names.
- * <pre>
- * // Given
- * function MyController($scope, $route) {
- * // ...
- * }
- *
- * // Then
- * expect(injector.annotate(MyController)).toEqual(['$scope', '$route']);
- * </pre>
- *
- * This method does not work with code minfication / obfuscation. For this reason the following annotation strategies
- * are supported.
- *
- * # The `$inject` property
- *
- * If a function has an `$inject` property and its value is an array of strings, then the strings represent names of
- * services to be injected into the function.
- * <pre>
- * // Given
- * var MyController = function(obfuscatedScope, obfuscatedRoute) {
- * // ...
- * }
- * // Define function dependencies
- * MyController.$inject = ['$scope', '$route'];
- *
- * // Then
- * expect(injector.annotate(MyController)).toEqual(['$scope', '$route']);
- * </pre>
- *
- * # The array notation
- *
- * It is often desirable to inline Injected functions and that's when setting the `$inject` property is very
- * inconvenient. In these situations using the array notation to specify the dependencies in a way that survives
- * minification is a better choice:
- *
- * <pre>
- * // We wish to write this (not minification / obfuscation safe)
- * injector.invoke(function($compile, $rootScope) {
- * // ...
- * });
- *
- * // We are forced to write break inlining
- * var tmpFn = function(obfuscatedCompile, obfuscatedRootScope) {
- * // ...
- * };
- * tmpFn.$inject = ['$compile', '$rootScope'];
- * injector.invoke(tempFn);
- *
- * // To better support inline function the inline annotation is supported
- * injector.invoke(['$compile', '$rootScope', function(obfCompile, obfRootScope) {
- * // ...
- * }]);
- *
- * // Therefore
- * expect(injector.annotate(
- * ['$compile', '$rootScope', function(obfus_$compile, obfus_$rootScope) {}])
- * ).toEqual(['$compile', '$rootScope']);
- * </pre>
- *
- * @param {function|Array.<string|Function>} fn Function for which dependent service names need to be retrieved as described
- * above.
- *
- * @returns {Array.<string>} The names of the services which the function requires.
- */
-
-
-
-
-/**
- * @ngdoc object
- * @name AUTO.$provide
- *
- * @description
- *
- * Use `$provide` to register new providers with the `$injector`. The providers are the factories for the instance.
- * The providers share the same name as the instance they create with the `Provider` suffixed to them.
- *
- * A provider is an object with a `$get()` method. The injector calls the `$get` method to create a new instance of
- * a service. The Provider can have additional methods which would allow for configuration of the provider.
- *
- * <pre>
- * function GreetProvider() {
- * var salutation = 'Hello';
- *
- * this.salutation = function(text) {
- * salutation = text;
- * };
- *
- * this.$get = function() {
- * return function (name) {
- * return salutation + ' ' + name + '!';
- * };
- * };
- * }
- *
- * describe('Greeter', function(){
- *
- * beforeEach(module(function($provide) {
- * $provide.provider('greet', GreetProvider);
- * });
- *
- * it('should greet', inject(function(greet) {
- * expect(greet('angular')).toEqual('Hello angular!');
- * }));
- *
- * it('should allow configuration of salutation', function() {
- * module(function(greetProvider) {
- * greetProvider.salutation('Ahoj');
- * });
- * inject(function(greet) {
- * expect(greet('angular')).toEqual('Ahoj angular!');
- * });
- * )};
- *
- * });
- * </pre>
- */
-
-/**
- * @ngdoc method
- * @name AUTO.$provide#provider
- * @methodOf AUTO.$provide
- * @description
- *
- * Register a provider for a service. The providers can be retrieved and can have additional configuration methods.
- *
- * @param {string} name The name of the instance. NOTE: the provider will be available under `name + 'Provider'` key.
- * @param {(Object|function())} provider If the provider is:
- *
- * - `Object`: then it should have a `$get` method. The `$get` method will be invoked using
- * {@link AUTO.$injector#invoke $injector.invoke()} when an instance needs to be created.
- * - `Constructor`: a new instance of the provider will be created using
- * {@link AUTO.$injector#instantiate $injector.instantiate()}, then treated as `object`.
- *
- * @returns {Object} registered provider instance
- */
-
-/**
- * @ngdoc method
- * @name AUTO.$provide#factory
- * @methodOf AUTO.$provide
- * @description
- *
- * A short hand for configuring services if only `$get` method is required.
- *
- * @param {string} name The name of the instance.
- * @param {function()} $getFn The $getFn for the instance creation. Internally this is a short hand for
- * `$provide.provider(name, {$get: $getFn})`.
- * @returns {Object} registered provider instance
- */
-
-
-/**
- * @ngdoc method
- * @name AUTO.$provide#service
- * @methodOf AUTO.$provide
- * @description
- *
- * A short hand for registering service of given class.
- *
- * @param {string} name The name of the instance.
- * @param {Function} constructor A class (constructor function) that will be instantiated.
- * @returns {Object} registered provider instance
- */
-
-
-/**
- * @ngdoc method
- * @name AUTO.$provide#value
- * @methodOf AUTO.$provide
- * @description
- *
- * A short hand for configuring services if the `$get` method is a constant.
- *
- * @param {string} name The name of the instance.
- * @param {*} value The value.
- * @returns {Object} registered provider instance
- */
-
-
-/**
- * @ngdoc method
- * @name AUTO.$provide#constant
- * @methodOf AUTO.$provide
- * @description
- *
- * A constant value, but unlike {@link AUTO.$provide#value value} it can be injected
- * into configuration function (other modules) and it is not interceptable by
- * {@link AUTO.$provide#decorator decorator}.
- *
- * @param {string} name The name of the constant.
- * @param {*} value The constant value.
- * @returns {Object} registered instance
- */
-
-
-/**
- * @ngdoc method
- * @name AUTO.$provide#decorator
- * @methodOf AUTO.$provide
- * @description
- *
- * Decoration of service, allows the decorator to intercept the service instance creation. The
- * returned instance may be the original instance, or a new instance which delegates to the
- * original instance.
- *
- * @param {string} name The name of the service to decorate.
- * @param {function()} decorator This function will be invoked when the service needs to be
- * instanciated. The function is called using the {@link AUTO.$injector#invoke
- * injector.invoke} method and is therefore fully injectable. Local injection arguments:
- *
- * * `$delegate` - The original service instance, which can be monkey patched, configured,
- * decorated or delegated to.
- */
-
-
-function createInjector(modulesToLoad) {
- var INSTANTIATING = {},
- providerSuffix = 'Provider',
- path = [],
- loadedModules = new HashMap(),
- providerCache = {
- $provide: {
- provider: supportObject(provider),
- factory: supportObject(factory),
- service: supportObject(service),
- value: supportObject(value),
- constant: supportObject(constant),
- decorator: decorator
- }
- },
- providerInjector = createInternalInjector(providerCache, function() {
- throw Error("Unknown provider: " + path.join(' <- '));
- }),
- instanceCache = {},
- instanceInjector = (instanceCache.$injector =
- createInternalInjector(instanceCache, function(servicename) {
- var provider = providerInjector.get(servicename + providerSuffix);
- return instanceInjector.invoke(provider.$get, provider);
- }));
-
-
- forEach(loadModules(modulesToLoad), function(fn) { instanceInjector.invoke(fn || noop); });
-
- return instanceInjector;
-
- ////////////////////////////////////
- // $provider
- ////////////////////////////////////
-
- function supportObject(delegate) {
- return function(key, value) {
- if (isObject(key)) {
- forEach(key, reverseParams(delegate));
- } else {
- return delegate(key, value);
- }
- }
- }
-
- function provider(name, provider_) {
- if (isFunction(provider_) || isArray(provider_)) {
- provider_ = providerInjector.instantiate(provider_);
- }
- if (!provider_.$get) {
- throw Error('Provider ' + name + ' must define $get factory method.');
- }
- return providerCache[name + providerSuffix] = provider_;
- }
-
- function factory(name, factoryFn) { return provider(name, { $get: factoryFn }); }
-
- function service(name, constructor) {
- return factory(name, ['$injector', function($injector) {
- return $injector.instantiate(constructor);
- }]);
- }
-
- function value(name, value) { return factory(name, valueFn(value)); }
-
- function constant(name, value) {
- providerCache[name] = value;
- instanceCache[name] = value;
- }
-
- function decorator(serviceName, decorFn) {
- var origProvider = providerInjector.get(serviceName + providerSuffix),
- orig$get = origProvider.$get;
-
- origProvider.$get = function() {
- var origInstance = instanceInjector.invoke(orig$get, origProvider);
- return instanceInjector.invoke(decorFn, null, {$delegate: origInstance});
- };
- }
-
- ////////////////////////////////////
- // Module Loading
- ////////////////////////////////////
- function loadModules(modulesToLoad){
- var runBlocks = [];
- forEach(modulesToLoad, function(module) {
- if (loadedModules.get(module)) return;
- loadedModules.put(module, true);
- if (isString(module)) {
- var moduleFn = angularModule(module);
- runBlocks = runBlocks.concat(loadModules(moduleFn.requires)).concat(moduleFn._runBlocks);
-
- try {
- for(var invokeQueue = moduleFn._invokeQueue, i = 0, ii = invokeQueue.length; i < ii; i++) {
- var invokeArgs = invokeQueue[i],
- provider = invokeArgs[0] == '$injector'
- ? providerInjector
- : providerInjector.get(invokeArgs[0]);
-
- provider[invokeArgs[1]].apply(provider, invokeArgs[2]);
- }
- } catch (e) {
- if (e.message) e.message += ' from ' + module;
- throw e;
- }
- } else if (isFunction(module)) {
- try {
- runBlocks.push(providerInjector.invoke(module));
- } catch (e) {
- if (e.message) e.message += ' from ' + module;
- throw e;
- }
- } else if (isArray(module)) {
- try {
- runBlocks.push(providerInjector.invoke(module));
- } catch (e) {
- if (e.message) e.message += ' from ' + String(module[module.length - 1]);
- throw e;
- }
- } else {
- assertArgFn(module, 'module');
- }
- });
- return runBlocks;
- }
-
- ////////////////////////////////////
- // internal Injector
- ////////////////////////////////////
-
- function createInternalInjector(cache, factory) {
-
- function getService(serviceName) {
- if (typeof serviceName !== 'string') {
- throw Error('Service name expected');
- }
- if (cache.hasOwnProperty(serviceName)) {
- if (cache[serviceName] === INSTANTIATING) {
- throw Error('Circular dependency: ' + path.join(' <- '));
- }
- return cache[serviceName];
- } else {
- try {
- path.unshift(serviceName);
- cache[serviceName] = INSTANTIATING;
- return cache[serviceName] = factory(serviceName);
- } finally {
- path.shift();
- }
- }
- }
-
- function invoke(fn, self, locals){
- var args = [],
- $inject = annotate(fn),
- length, i,
- key;
-
- for(i = 0, length = $inject.length; i < length; i++) {
- key = $inject[i];
- args.push(
- locals && locals.hasOwnProperty(key)
- ? locals[key]
- : getService(key)
- );
- }
- if (!fn.$inject) {
- // this means that we must be an array.
- fn = fn[length];
- }
-
-
- // Performance optimization: http://jsperf.com/apply-vs-call-vs-invoke
- switch (self ? -1 : args.length) {
- case 0: return fn();
- case 1: return fn(args[0]);
- case 2: return fn(args[0], args[1]);
- case 3: return fn(args[0], args[1], args[2]);
- case 4: return fn(args[0], args[1], args[2], args[3]);
- case 5: return fn(args[0], args[1], args[2], args[3], args[4]);
- case 6: return fn(args[0], args[1], args[2], args[3], args[4], args[5]);
- case 7: return fn(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
- case 8: return fn(args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7]);
- case 9: return fn(args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7], args[8]);
- case 10: return fn(args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7], args[8], args[9]);
- default: return fn.apply(self, args);
- }
- }
-
- function instantiate(Type, locals) {
- var Constructor = function() {},
- instance, returnedValue;
-
- Constructor.prototype = (isArray(Type) ? Type[Type.length - 1] : Type).prototype;
- instance = new Constructor();
- returnedValue = invoke(Type, instance, locals);
-
- return isObject(returnedValue) ? returnedValue : instance;
- }
-
- return {
- invoke: invoke,
- instantiate: instantiate,
- get: getService,
- annotate: annotate
- };
- }
-}
-/**
- * @ngdoc function
- * @name ng.$anchorScroll
- * @requires $window
- * @requires $location
- * @requires $rootScope
- *
- * @description
- * When called, it checks current value of `$location.hash()` and scroll to related element,
- * according to rules specified in
- * {@link http://dev.w3.org/html5/spec/Overview.html#the-indicated-part-of-the-document Html5 spec}.
- *
- * It also watches the `$location.hash()` and scroll whenever it changes to match any anchor.
- * This can be disabled by calling `$anchorScrollProvider.disableAutoScrolling()`.
- */
-function $AnchorScrollProvider() {
-
- var autoScrollingEnabled = true;
-
- this.disableAutoScrolling = function() {
- autoScrollingEnabled = false;
- };
-
- this.$get = ['$window', '$location', '$rootScope', function($window, $location, $rootScope) {
- var document = $window.document;
-
- // helper function to get first anchor from a NodeList
- // can't use filter.filter, as it accepts only instances of Array
- // and IE can't convert NodeList to an array using [].slice
- // TODO(vojta): use filter if we change it to accept lists as well
- function getFirstAnchor(list) {
- var result = null;
- forEach(list, function(element) {
- if (!result && lowercase(element.nodeName) === 'a') result = element;
- });
- return result;
- }
-
- function scroll() {
- var hash = $location.hash(), elm;
-
- // empty hash, scroll to the top of the page
- if (!hash) $window.scrollTo(0, 0);
-
- // element with given id
- else if ((elm = document.getElementById(hash))) elm.scrollIntoView();
-
- // first anchor with given name :-D
- else if ((elm = getFirstAnchor(document.getElementsByName(hash)))) el
<TRUNCATED>
[23/28] CLIMATE-512 - Replace frontend with new Yeoman/Grunt/Bower
frontend
Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/css/lib/bootstrap.min.css
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/css/lib/bootstrap.min.css b/ocw-ui/frontend/app/css/lib/bootstrap.min.css
deleted file mode 100644
index c10c7f4..0000000
--- a/ocw-ui/frontend/app/css/lib/bootstrap.min.css
+++ /dev/null
@@ -1,9 +0,0 @@
-/*!
- * Bootstrap v2.3.1
- *
- * Copyright 2012 Twitter, Inc
- * Licensed under the Apache License v2.0
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Designed and built with all the love in the world @twitter by @mdo and @fat.
- */.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;line-height:0;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}a:hover,a:active{outline:0}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{width:auto\9;height:auto;max-width:100%;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic}#map_canvas img,.google-maps img{max-widt
h:none}button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle}button,input{*overflow:visible;line-height:normal}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}button,html input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button}label,select,button,input[type="button"],input[type="reset"],input[type="submit"],input[type="radio"],input[type="checkbox"]{cursor:pointer}input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none}textarea{overflow:auto;vertical-align:top}@media print{*{color:#000!important;text-shadow:none!important;background:transparent!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title)
")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}@page{margin:.5cm}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}}body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:20px;color:#333;background-color:#fff}a{color:#08c;text-decoration:none}a:hover,a:focus{color:#005580;text-decoration:underline}.img-rounded{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.img-polaroid{padding:4px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.1);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.1);box-shadow:0 1px 3px rgba(0,0,0,0.1)}.img-circle{-webkit-border-radius:500px;-moz-border-radius:500px;border-radius:500px}.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;line-hei
ght:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:20px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.span12{width:940px}.span11{width:860px}.span10{width:780px}.span9{width:700px}.span8{width:620px}.span7{width:540px}.span6{width:460px}.span5{width:380px}.span4{width:300px}.span3{width:220px}.span2{width:140px}.span1{width:60px}.offset12{margin-left:980px}.offset11{margin-left:900px}.offset10{margin-left:820px}.offset9{margin-left:740px}.offset8{margin-left:660px}.offset7{margin-left:580px}.offset6{margin-left:500px}.offset5{margin-left:420px}.offset4{margin-left:340px}.offset3{margin-left:260px}.offset2{margin-left:180px}.offset1{margin-left:100px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.127
659574468085%;*margin-left:2.074468085106383%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.127659574468085%}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.48936170212765%;*width:91.43617021276594%}.row-fluid .span10{width:82.97872340425532%;*width:82.92553191489361%}.row-fluid .span9{width:74.46808510638297%;*width:74.41489361702126%}.row-fluid .span8{width:65.95744680851064%;*width:65.90425531914893%}.row-fluid .span7{width:57.44680851063829%;*width:57.39361702127659%}.row-fluid .span6{width:48.93617021276595%;*width:48.88297872340425%}.row-fluid .span5{width:40.42553191489362%;*width:40.37234042553192%}.row-fluid .span4{width:31.914893617021278%;*width:31.861702127659576%}.row-fluid .span3{width:23.404255319148934%;*width:23.351063829787233%}.row-fluid .span2{width:14.893617021276595%;*wid
th:14.840425531914894%}.row-fluid .span1{width:6.382978723404255%;*width:6.329787234042553%}.row-fluid .offset12{margin-left:104.25531914893617%;*margin-left:104.14893617021275%}.row-fluid .offset12:first-child{margin-left:102.12765957446808%;*margin-left:102.02127659574467%}.row-fluid .offset11{margin-left:95.74468085106382%;*margin-left:95.6382978723404%}.row-fluid .offset11:first-child{margin-left:93.61702127659574%;*margin-left:93.51063829787232%}.row-fluid .offset10{margin-left:87.23404255319149%;*margin-left:87.12765957446807%}.row-fluid .offset10:first-child{margin-left:85.1063829787234%;*margin-left:84.99999999999999%}.row-fluid .offset9{margin-left:78.72340425531914%;*margin-left:78.61702127659572%}.row-fluid .offset9:first-child{margin-left:76.59574468085106%;*margin-left:76.48936170212764%}.row-fluid .offset8{margin-left:70.2127659574468%;*margin-left:70.10638297872339%}.row-fluid .offset8:first-child{margin-left:68.08510638297872%;*margin-left:67.9787234042553%}.row-flui
d .offset7{margin-left:61.70212765957446%;*margin-left:61.59574468085106%}.row-fluid .offset7:first-child{margin-left:59.574468085106375%;*margin-left:59.46808510638297%}.row-fluid .offset6{margin-left:53.191489361702125%;*margin-left:53.085106382978715%}.row-fluid .offset6:first-child{margin-left:51.063829787234035%;*margin-left:50.95744680851063%}.row-fluid .offset5{margin-left:44.68085106382979%;*margin-left:44.57446808510638%}.row-fluid .offset5:first-child{margin-left:42.5531914893617%;*margin-left:42.4468085106383%}.row-fluid .offset4{margin-left:36.170212765957444%;*margin-left:36.06382978723405%}.row-fluid .offset4:first-child{margin-left:34.04255319148936%;*margin-left:33.93617021276596%}.row-fluid .offset3{margin-left:27.659574468085104%;*margin-left:27.5531914893617%}.row-fluid .offset3:first-child{margin-left:25.53191489361702%;*margin-left:25.425531914893618%}.row-fluid .offset2{margin-left:19.148936170212764%;*margin-left:19.04255319148936%}.row-fluid .offset2:first-ch
ild{margin-left:17.02127659574468%;*margin-left:16.914893617021278%}.row-fluid .offset1{margin-left:10.638297872340425%;*margin-left:10.53191489361702%}.row-fluid .offset1:first-child{margin-left:8.51063829787234%;*margin-left:8.404255319148938%}[class*="span"].hide,.row-fluid [class*="span"].hide{display:none}[class*="span"].pull-right,.row-fluid [class*="span"].pull-right{float:right}.container{margin-right:auto;margin-left:auto;*zoom:1}.container:before,.container:after{display:table;line-height:0;content:""}.container:after{clear:both}.container-fluid{padding-right:20px;padding-left:20px;*zoom:1}.container-fluid:before,.container-fluid:after{display:table;line-height:0;content:""}.container-fluid:after{clear:both}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:21px;font-weight:200;line-height:30px}small{font-size:85%}strong{font-weight:bold}em{font-style:italic}cite{font-style:normal}.muted{color:#999}a.muted:hover,a.muted:focus{color:#808080}.text-warning{color:#c09853}a.t
ext-warning:hover,a.text-warning:focus{color:#a47e3c}.text-error{color:#b94a48}a.text-error:hover,a.text-error:focus{color:#953b39}.text-info{color:#3a87ad}a.text-info:hover,a.text-info:focus{color:#2d6987}.text-success{color:#468847}a.text-success:hover,a.text-success:focus{color:#356635}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}h1,h2,h3,h4,h5,h6{margin:10px 0;font-family:inherit;font-weight:bold;line-height:20px;color:inherit;text-rendering:optimizelegibility}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:normal;line-height:1;color:#999}h1,h2,h3{line-height:40px}h1{font-size:38.5px}h2{font-size:31.5px}h3{font-size:24.5px}h4{font-size:17.5px}h5{font-size:14px}h6{font-size:11.9px}h1 small{font-size:24.5px}h2 small{font-size:17.5px}h3 small{font-size:14px}h4 small{font-size:14px}.page-header{padding-bottom:9px;margin:20px 0 30px;border-bottom:1px solid #eee}ul,ol{padding:0;margin:0 0 10px 25px}ul ul,ul ol,ol ol,ol ul{mar
gin-bottom:0}li{line-height:20px}ul.unstyled,ol.unstyled{margin-left:0;list-style:none}ul.inline,ol.inline{margin-left:0;list-style:none}ul.inline>li,ol.inline>li{display:inline-block;*display:inline;padding-right:5px;padding-left:5px;*zoom:1}dl{margin-bottom:20px}dt,dd{line-height:20px}dt{font-weight:bold}dd{margin-left:10px}.dl-horizontal{*zoom:1}.dl-horizontal:before,.dl-horizontal:after{display:table;line-height:0;content:""}.dl-horizontal:after{clear:both}.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}hr{margin:20px 0;border:0;border-top:1px solid #eee;border-bottom:1px solid #fff}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #999}abbr.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:0 0 0 15px;margin:0 0 20px;border-left:5px solid #eee}blockquote p{margin-bottom:0;font-size:17.5px;font-weight:300;line-height:1.25}b
lockquote small{display:block;line-height:20px;color:#999}blockquote small:before{content:'\2014 \00A0'}blockquote.pull-right{float:right;padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0}blockquote.pull-right p,blockquote.pull-right small{text-align:right}blockquote.pull-right small:before{content:''}blockquote.pull-right small:after{content:'\00A0 \2014'}q:before,q:after,blockquote:before,blockquote:after{content:""}address{display:block;margin-bottom:20px;font-style:normal;line-height:20px}code,pre{padding:0 3px 2px;font-family:Monaco,Menlo,Consolas,"Courier New",monospace;font-size:12px;color:#333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}code{padding:2px 4px;color:#d14;white-space:nowrap;background-color:#f7f7f9;border:1px solid #e1e1e8}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:20px;word-break:break-all;word-wrap:break-word;white-space:pre;white-space:pre-wrap;background-color:#f5f5f5;border:1px
solid #ccc;border:1px solid rgba(0,0,0,0.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}pre.prettyprint{margin-bottom:20px}pre code{padding:0;color:inherit;white-space:pre;white-space:pre-wrap;background-color:transparent;border:0}.pre-scrollable{max-height:340px;overflow-y:scroll}form{margin:0 0 20px}fieldset{padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:40px;color:#333;border:0;border-bottom:1px solid #e5e5e5}legend small{font-size:15px;color:#999}label,input,button,select,textarea{font-size:14px;font-weight:normal;line-height:20px}input,button,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}label{display:block;margin-bottom:5px}select,textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type=
"url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{display:inline-block;height:20px;padding:4px 6px;margin-bottom:10px;font-size:14px;line-height:20px;color:#555;vertical-align:middle;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}input,textarea,.uneditable-input{width:206px}textarea{height:auto}textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{background-color:#fff;border:1px solid #ccc;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border linear .2s,box-shadow linear .2s;-moz-transition:border linear .2s,box-shadow linear .2s;-o-transition:border lin
ear .2s,box-shadow linear .2s;transition:border linear .2s,box-shadow linear .2s}textarea:focus,input[type="text"]:focus,input[type="password"]:focus,input[type="datetime"]:focus,input[type="datetime-local"]:focus,input[type="date"]:focus,input[type="month"]:focus,input[type="time"]:focus,input[type="week"]:focus,input[type="number"]:focus,input[type="email"]:focus,input[type="url"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="color"]:focus,.uneditable-input:focus{border-color:rgba(82,168,236,0.8);outline:0;outline:thin dotted \9;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6)}input[type="radio"],input[type="checkbox"]{margin:4px 0 0;margin-top:1px \9;*margin-top:0;line-height:normal}input[type="file"],input[type="image"],input[type="submit"],input[type="reset"],input[type="b
utton"],input[type="radio"],input[type="checkbox"]{width:auto}select,input[type="file"]{height:30px;*margin-top:4px;line-height:30px}select{width:220px;background-color:#fff;border:1px solid #ccc}select[multiple],select[size]{height:auto}select:focus,input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.uneditable-input,.uneditable-textarea{color:#999;cursor:not-allowed;background-color:#fcfcfc;border-color:#ccc;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);box-shadow:inset 0 1px 2px rgba(0,0,0,0.025)}.uneditable-input{overflow:hidden;white-space:nowrap}.uneditable-textarea{width:auto;height:auto}input:-moz-placeholder,textarea:-moz-placeholder{color:#999}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#999}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#999}.radio,.chec
kbox{min-height:20px;padding-left:20px}.radio input[type="radio"],.checkbox input[type="checkbox"]{float:left;margin-left:-20px}.controls>.radio:first-child,.controls>.checkbox:first-child{padding-top:5px}.radio.inline,.checkbox.inline{display:inline-block;padding-top:5px;margin-bottom:0;vertical-align:middle}.radio.inline+.radio.inline,.checkbox.inline+.checkbox.inline{margin-left:10px}.input-mini{width:60px}.input-small{width:90px}.input-medium{width:150px}.input-large{width:210px}.input-xlarge{width:270px}.input-xxlarge{width:530px}input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"]{float:none;margin-left:0}.input-append input[class*="span"],.input-append .uneditable-input[class*="span"],.input-prepend input[class*="span"],.input-prepend .uneditable-input[class*="span"],.row-fluid input[clas
s*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"],.row-fluid .input-prepend [class*="span"],.row-fluid .input-append [class*="span"]{display:inline-block}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:20px}input.span12,textarea.span12,.uneditable-input.span12{width:926px}input.span11,textarea.span11,.uneditable-input.span11{width:846px}input.span10,textarea.span10,.uneditable-input.span10{width:766px}input.span9,textarea.span9,.uneditable-input.span9{width:686px}input.span8,textarea.span8,.uneditable-input.span8{width:606px}input.span7,textarea.span7,.uneditable-input.span7{width:526px}input.span6,textarea.span6,.uneditable-input.span6{width:446px}input.span5,textarea.span5,.uneditable-input.span5{width:366px}input.span4,textarea.span4,.uneditable-input.span4{width:286px}input.span3,textarea.span3,.uneditable-input.span3{width:206px}input.span2,textarea.
span2,.uneditable-input.span2{width:126px}input.span1,textarea.span1,.uneditable-input.span1{width:46px}.controls-row{*zoom:1}.controls-row:before,.controls-row:after{display:table;line-height:0;content:""}.controls-row:after{clear:both}.controls-row [class*="span"],.row-fluid .controls-row [class*="span"]{float:left}.controls-row .checkbox[class*="span"],.controls-row .radio[class*="span"]{padding-top:5px}input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{cursor:not-allowed;background-color:#eee}input[type="radio"][disabled],input[type="checkbox"][disabled],input[type="radio"][readonly],input[type="checkbox"][readonly]{background-color:transparent}.control-group.warning .control-label,.control-group.warning .help-block,.control-group.warning .help-inline{color:#c09853}.control-group.warning .checkbox,.control-group.warning .radio,.control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09
853}.control-group.warning input,.control-group.warning select,.control-group.warning textarea{border-color:#c09853;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.warning input:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e}.control-group.warning .input-prepend .add-on,.control-group.warning .input-append .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853}.control-group.error .control-label,.control-group.error .help-block,.control-group.error .help-inline{color:#b94a48}.control-group.error .checkbox,.control-group.error .radio,.control-group.error input,.control-group.error select,.control-group.error text
area{color:#b94a48}.control-group.error input,.control-group.error select,.control-group.error textarea{border-color:#b94a48;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.error input:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392}.control-group.error .input-prepend .add-on,.control-group.error .input-append .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48}.control-group.success .control-label,.control-group.success .help-block,.control-group.success .help-inline{color:#468847}.control-group.success .checkbox,.control-group.success .radio,.control-group.success input,.control-group.success select,.control-gro
up.success textarea{color:#468847}.control-group.success input,.control-group.success select,.control-group.success textarea{border-color:#468847;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.success input:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b}.control-group.success .input-prepend .add-on,.control-group.success .input-append .add-on{color:#468847;background-color:#dff0d8;border-color:#468847}.control-group.info .control-label,.control-group.info .help-block,.control-group.info .help-inline{color:#3a87ad}.control-group.info .checkbox,.control-group.info .radio,.control-group.info input,.control-group.info select,.c
ontrol-group.info textarea{color:#3a87ad}.control-group.info input,.control-group.info select,.control-group.info textarea{border-color:#3a87ad;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.info input:focus,.control-group.info select:focus,.control-group.info textarea:focus{border-color:#2d6987;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3}.control-group.info .input-prepend .add-on,.control-group.info .input-append .add-on{color:#3a87ad;background-color:#d9edf7;border-color:#3a87ad}input:focus:invalid,textarea:focus:invalid,select:focus:invalid{color:#b94a48;border-color:#ee5f5b}input:focus:invalid:focus,textarea:focus:invalid:focus,select:focus:invalid:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-b
ox-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7}.form-actions{padding:19px 20px 20px;margin-top:20px;margin-bottom:20px;background-color:#f5f5f5;border-top:1px solid #e5e5e5;*zoom:1}.form-actions:before,.form-actions:after{display:table;line-height:0;content:""}.form-actions:after{clear:both}.help-block,.help-inline{color:#595959}.help-block{display:block;margin-bottom:10px}.help-inline{display:inline-block;*display:inline;padding-left:5px;vertical-align:middle;*zoom:1}.input-append,.input-prepend{display:inline-block;margin-bottom:10px;font-size:0;white-space:nowrap;vertical-align:middle}.input-append input,.input-prepend input,.input-append select,.input-prepend select,.input-append .uneditable-input,.input-prepend .uneditable-input,.input-append .dropdown-menu,.input-prepend .dropdown-menu,.input-append .popover,.input-prepend .popover{font-size:14px}.input-append input,.input-prepend input,.input-append select,.input-prepend select,.input-append .uneditable-input,.input-pre
pend .uneditable-input{position:relative;margin-bottom:0;*margin-left:0;vertical-align:top;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-append input:focus,.input-prepend input:focus,.input-append select:focus,.input-prepend select:focus,.input-append .uneditable-input:focus,.input-prepend .uneditable-input:focus{z-index:2}.input-append .add-on,.input-prepend .add-on{display:inline-block;width:auto;height:20px;min-width:16px;padding:4px 5px;font-size:14px;font-weight:normal;line-height:20px;text-align:center;text-shadow:0 1px 0 #fff;background-color:#eee;border:1px solid #ccc}.input-append .add-on,.input-prepend .add-on,.input-append .btn,.input-prepend .btn,.input-append .btn-group>.dropdown-toggle,.input-prepend .btn-group>.dropdown-toggle{vertical-align:top;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-append .active,.input-prepend .active{background-color:#a9dba9;border-color:#46a546}.input-prepend .add-on
,.input-prepend .btn{margin-right:-1px}.input-prepend .add-on:first-child,.input-prepend .btn:first-child{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-append input,.input-append select,.input-append .uneditable-input{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-append input+.btn-group .btn:last-child,.input-append select+.btn-group .btn:last-child,.input-append .uneditable-input+.btn-group .btn:last-child{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-append .add-on,.input-append .btn,.input-append .btn-group{margin-left:-1px}.input-append .add-on:last-child,.input-append .btn:last-child,.input-append .btn-group:last-child>.dropdown-toggle{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append input,.input-prepend.input-append select,.input-prepend.input-append .une
ditable-input{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-prepend.input-append input+.btn-group .btn,.input-prepend.input-append select+.btn-group .btn,.input-prepend.input-append .uneditable-input+.btn-group .btn{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append .add-on:first-child,.input-prepend.input-append .btn:first-child{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-prepend.input-append .add-on:last-child,.input-prepend.input-append .btn:last-child{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append .btn-group:first-child{margin-left:0}input.search-query{padding-right:14px;padding-right:4px \9;padding-left:14px;padding-left:4px \9;margin-bottom:0;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.form-search .input
-append .search-query,.form-search .input-prepend .search-query{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.form-search .input-append .search-query{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px}.form-search .input-append .btn{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0}.form-search .input-prepend .search-query{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0}.form-search .input-prepend .btn{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px}.form-search input,.form-inline input,.form-horizontal input,.form-search textarea,.form-inline textarea,.form-horizontal textarea,.form-search select,.form-inline select,.form-horizontal select,.form-search .help-inline,.form-inline .help-inline,.form-horizontal .help-inline,.form-search .uneditable-input,.form-inline .uneditable-inp
ut,.form-horizontal .uneditable-input,.form-search .input-prepend,.form-inline .input-prepend,.form-horizontal .input-prepend,.form-search .input-append,.form-inline .input-append,.form-horizontal .input-append{display:inline-block;*display:inline;margin-bottom:0;vertical-align:middle;*zoom:1}.form-search .hide,.form-inline .hide,.form-horizontal .hide{display:none}.form-search label,.form-inline label,.form-search .btn-group,.form-inline .btn-group{display:inline-block}.form-search .input-append,.form-inline .input-append,.form-search .input-prepend,.form-inline .input-prepend{margin-bottom:0}.form-search .radio,.form-search .checkbox,.form-inline .radio,.form-inline .checkbox{padding-left:0;margin-bottom:0;vertical-align:middle}.form-search .radio input[type="radio"],.form-search .checkbox input[type="checkbox"],.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{float:left;margin-right:3px;margin-left:0}.control-group{margin-bottom:10px}legend+.c
ontrol-group{margin-top:20px;-webkit-margin-top-collapse:separate}.form-horizontal .control-group{margin-bottom:20px;*zoom:1}.form-horizontal .control-group:before,.form-horizontal .control-group:after{display:table;line-height:0;content:""}.form-horizontal .control-group:after{clear:both}.form-horizontal .control-label{float:left;width:160px;padding-top:5px;text-align:right}.form-horizontal .controls{*display:inline-block;*padding-left:20px;margin-left:180px;*margin-left:0}.form-horizontal .controls:first-child{*padding-left:180px}.form-horizontal .help-block{margin-bottom:0}.form-horizontal input+.help-block,.form-horizontal select+.help-block,.form-horizontal textarea+.help-block,.form-horizontal .uneditable-input+.help-block,.form-horizontal .input-prepend+.help-block,.form-horizontal .input-append+.help-block{margin-top:10px}.form-horizontal .form-actions{padding-left:180px}table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0}.table{width:
100%;margin-bottom:20px}.table th,.table td{padding:8px;line-height:20px;text-align:left;vertical-align:top;border-top:1px solid #ddd}.table th{font-weight:bold}.table thead th{vertical-align:bottom}.table caption+thead tr:first-child th,.table caption+thead tr:first-child td,.table colgroup+thead tr:first-child th,.table colgroup+thead tr:first-child td,.table thead:first-child tr:first-child th,.table thead:first-child tr:first-child td{border-top:0}.table tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed th,.table-condensed td{padding:4px 5px}.table-bordered{border:1px solid #ddd;border-collapse:separate;*border-collapse:collapse;border-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.table-bordered th,.table-bordered td{border-left:1px solid #ddd}.table-bordered caption+thead tr:first-child th,.table-bordered caption+tbody tr:first-child th,.table-bordered caption+tbody tr:first-child td,.table-bordered colgroup+
thead tr:first-child th,.table-bordered colgroup+tbody tr:first-child th,.table-bordered colgroup+tbody tr:first-child td,.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0}.table-bordered thead:first-child tr:first-child>th:first-child,.table-bordered tbody:first-child tr:first-child>td:first-child,.table-bordered tbody:first-child tr:first-child>th:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px}.table-bordered thead:first-child tr:first-child>th:last-child,.table-bordered tbody:first-child tr:first-child>td:last-child,.table-bordered tbody:first-child tr:first-child>th:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px}.table-bordered thead:last-child tr:last-child>th:first-child,.table-bordered tbody:last-child tr:last-child>td:first-child,.table-borde
red tbody:last-child tr:last-child>th:first-child,.table-bordered tfoot:last-child tr:last-child>td:first-child,.table-bordered tfoot:last-child tr:last-child>th:first-child{-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px}.table-bordered thead:last-child tr:last-child>th:last-child,.table-bordered tbody:last-child tr:last-child>td:last-child,.table-bordered tbody:last-child tr:last-child>th:last-child,.table-bordered tfoot:last-child tr:last-child>td:last-child,.table-bordered tfoot:last-child tr:last-child>th:last-child{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px}.table-bordered tfoot+tbody:last-child tr:last-child td:first-child{-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;-moz-border-radius-bottomleft:0}.table-bordered tfoot+tbody:last-child tr:last-child td:last-child{-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0;-moz-border-ra
dius-bottomright:0}.table-bordered caption+thead tr:first-child th:first-child,.table-bordered caption+tbody tr:first-child td:first-child,.table-bordered colgroup+thead tr:first-child th:first-child,.table-bordered colgroup+tbody tr:first-child td:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px}.table-bordered caption+thead tr:first-child th:last-child,.table-bordered caption+tbody tr:first-child td:last-child,.table-bordered colgroup+thead tr:first-child th:last-child,.table-bordered colgroup+tbody tr:first-child td:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px}.table-striped tbody>tr:nth-child(odd)>td,.table-striped tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover tbody tr:hover>td,.table-hover tbody tr:hover>th{background-color:#f5f5f5}table td[class*="span"],table th[class*="span"],.row-fluid table td[class*="span"],.row-fluid table th[class*="sp
an"]{display:table-cell;float:none;margin-left:0}.table td.span1,.table th.span1{float:none;width:44px;margin-left:0}.table td.span2,.table th.span2{float:none;width:124px;margin-left:0}.table td.span3,.table th.span3{float:none;width:204px;margin-left:0}.table td.span4,.table th.span4{float:none;width:284px;margin-left:0}.table td.span5,.table th.span5{float:none;width:364px;margin-left:0}.table td.span6,.table th.span6{float:none;width:444px;margin-left:0}.table td.span7,.table th.span7{float:none;width:524px;margin-left:0}.table td.span8,.table th.span8{float:none;width:604px;margin-left:0}.table td.span9,.table th.span9{float:none;width:684px;margin-left:0}.table td.span10,.table th.span10{float:none;width:764px;margin-left:0}.table td.span11,.table th.span11{float:none;width:844px;margin-left:0}.table td.span12,.table th.span12{float:none;width:924px;margin-left:0}.table tbody tr.success>td{background-color:#dff0d8}.table tbody tr.error>td{background-color:#f2dede}.table tbody
tr.warning>td{background-color:#fcf8e3}.table tbody tr.info>td{background-color:#d9edf7}.table-hover tbody tr.success:hover>td{background-color:#d0e9c6}.table-hover tbody tr.error:hover>td{background-color:#ebcccc}.table-hover tbody tr.warning:hover>td{background-color:#faf2cc}.table-hover tbody tr.info:hover>td{background-color:#c4e3f3}[class^="icon-"],[class*=" icon-"]{display:inline-block;width:14px;height:14px;margin-top:1px;*margin-right:.3em;line-height:14px;vertical-align:text-top;background-image:url("../img/glyphicons-halflings.png");background-position:14px 14px;background-repeat:no-repeat}.icon-white,.nav-pills>.active>a>[class^="icon-"],.nav-pills>.active>a>[class*=" icon-"],.nav-list>.active>a>[class^="icon-"],.nav-list>.active>a>[class*=" icon-"],.navbar-inverse .nav>.active>a>[class^="icon-"],.navbar-inverse .nav>.active>a>[class*=" icon-"],.dropdown-menu>li>a:hover>[class^="icon-"],.dropdown-menu>li>a:focus>[class^="icon-"],.dropdown-menu>li>a:hover>[class*=" icon-"]
,.dropdown-menu>li>a:focus>[class*=" icon-"],.dropdown-menu>.active>a>[class^="icon-"],.dropdown-menu>.active>a>[class*=" icon-"],.dropdown-submenu:hover>a>[class^="icon-"],.dropdown-submenu:focus>a>[class^="icon-"],.dropdown-submenu:hover>a>[class*=" icon-"],.dropdown-submenu:focus>a>[class*=" icon-"]{background-image:url("../img/glyphicons-halflings-white.png")}.icon-glass{background-position:0 0}.icon-music{background-position:-24px 0}.icon-search{background-position:-48px 0}.icon-envelope{background-position:-72px 0}.icon-heart{background-position:-96px 0}.icon-star{background-position:-120px 0}.icon-star-empty{background-position:-144px 0}.icon-user{background-position:-168px 0}.icon-film{background-position:-192px 0}.icon-th-large{background-position:-216px 0}.icon-th{background-position:-240px 0}.icon-th-list{background-position:-264px 0}.icon-ok{background-position:-288px 0}.icon-remove{background-position:-312px 0}.icon-zoom-in{background-position:-336px 0}.icon-zoom-out{ba
ckground-position:-360px 0}.icon-off{background-position:-384px 0}.icon-signal{background-position:-408px 0}.icon-cog{background-position:-432px 0}.icon-trash{background-position:-456px 0}.icon-home{background-position:0 -24px}.icon-file{background-position:-24px -24px}.icon-time{background-position:-48px -24px}.icon-road{background-position:-72px -24px}.icon-download-alt{background-position:-96px -24px}.icon-download{background-position:-120px -24px}.icon-upload{background-position:-144px -24px}.icon-inbox{background-position:-168px -24px}.icon-play-circle{background-position:-192px -24px}.icon-repeat{background-position:-216px -24px}.icon-refresh{background-position:-240px -24px}.icon-list-alt{background-position:-264px -24px}.icon-lock{background-position:-287px -24px}.icon-flag{background-position:-312px -24px}.icon-headphones{background-position:-336px -24px}.icon-volume-off{background-position:-360px -24px}.icon-volume-down{background-position:-384px -24px}.icon-volume-up{back
ground-position:-408px -24px}.icon-qrcode{background-position:-432px -24px}.icon-barcode{background-position:-456px -24px}.icon-tag{background-position:0 -48px}.icon-tags{background-position:-25px -48px}.icon-book{background-position:-48px -48px}.icon-bookmark{background-position:-72px -48px}.icon-print{background-position:-96px -48px}.icon-camera{background-position:-120px -48px}.icon-font{background-position:-144px -48px}.icon-bold{background-position:-167px -48px}.icon-italic{background-position:-192px -48px}.icon-text-height{background-position:-216px -48px}.icon-text-width{background-position:-240px -48px}.icon-align-left{background-position:-264px -48px}.icon-align-center{background-position:-288px -48px}.icon-align-right{background-position:-312px -48px}.icon-align-justify{background-position:-336px -48px}.icon-list{background-position:-360px -48px}.icon-indent-left{background-position:-384px -48px}.icon-indent-right{background-position:-408px -48px}.icon-facetime-video{backg
round-position:-432px -48px}.icon-picture{background-position:-456px -48px}.icon-pencil{background-position:0 -72px}.icon-map-marker{background-position:-24px -72px}.icon-adjust{background-position:-48px -72px}.icon-tint{background-position:-72px -72px}.icon-edit{background-position:-96px -72px}.icon-share{background-position:-120px -72px}.icon-check{background-position:-144px -72px}.icon-move{background-position:-168px -72px}.icon-step-backward{background-position:-192px -72px}.icon-fast-backward{background-position:-216px -72px}.icon-backward{background-position:-240px -72px}.icon-play{background-position:-264px -72px}.icon-pause{background-position:-288px -72px}.icon-stop{background-position:-312px -72px}.icon-forward{background-position:-336px -72px}.icon-fast-forward{background-position:-360px -72px}.icon-step-forward{background-position:-384px -72px}.icon-eject{background-position:-408px -72px}.icon-chevron-left{background-position:-432px -72px}.icon-chevron-right{background-p
osition:-456px -72px}.icon-plus-sign{background-position:0 -96px}.icon-minus-sign{background-position:-24px -96px}.icon-remove-sign{background-position:-48px -96px}.icon-ok-sign{background-position:-72px -96px}.icon-question-sign{background-position:-96px -96px}.icon-info-sign{background-position:-120px -96px}.icon-screenshot{background-position:-144px -96px}.icon-remove-circle{background-position:-168px -96px}.icon-ok-circle{background-position:-192px -96px}.icon-ban-circle{background-position:-216px -96px}.icon-arrow-left{background-position:-240px -96px}.icon-arrow-right{background-position:-264px -96px}.icon-arrow-up{background-position:-289px -96px}.icon-arrow-down{background-position:-312px -96px}.icon-share-alt{background-position:-336px -96px}.icon-resize-full{background-position:-360px -96px}.icon-resize-small{background-position:-384px -96px}.icon-plus{background-position:-408px -96px}.icon-minus{background-position:-433px -96px}.icon-asterisk{background-position:-456px -9
6px}.icon-exclamation-sign{background-position:0 -120px}.icon-gift{background-position:-24px -120px}.icon-leaf{background-position:-48px -120px}.icon-fire{background-position:-72px -120px}.icon-eye-open{background-position:-96px -120px}.icon-eye-close{background-position:-120px -120px}.icon-warning-sign{background-position:-144px -120px}.icon-plane{background-position:-168px -120px}.icon-calendar{background-position:-192px -120px}.icon-random{width:16px;background-position:-216px -120px}.icon-comment{background-position:-240px -120px}.icon-magnet{background-position:-264px -120px}.icon-chevron-up{background-position:-288px -120px}.icon-chevron-down{background-position:-313px -119px}.icon-retweet{background-position:-336px -120px}.icon-shopping-cart{background-position:-360px -120px}.icon-folder-close{width:16px;background-position:-384px -120px}.icon-folder-open{width:16px;background-position:-408px -120px}.icon-resize-vertical{background-position:-432px -119px}.icon-resize-horizont
al{background-position:-456px -118px}.icon-hdd{background-position:0 -144px}.icon-bullhorn{background-position:-24px -144px}.icon-bell{background-position:-48px -144px}.icon-certificate{background-position:-72px -144px}.icon-thumbs-up{background-position:-96px -144px}.icon-thumbs-down{background-position:-120px -144px}.icon-hand-right{background-position:-144px -144px}.icon-hand-left{background-position:-168px -144px}.icon-hand-up{background-position:-192px -144px}.icon-hand-down{background-position:-216px -144px}.icon-circle-arrow-right{background-position:-240px -144px}.icon-circle-arrow-left{background-position:-264px -144px}.icon-circle-arrow-up{background-position:-288px -144px}.icon-circle-arrow-down{background-position:-312px -144px}.icon-globe{background-position:-336px -144px}.icon-wrench{background-position:-360px -144px}.icon-tasks{background-position:-384px -144px}.icon-filter{background-position:-408px -144px}.icon-briefcase{background-position:-432px -144px}.icon-fulls
creen{background-position:-456px -144px}.dropup,.dropdown{position:relative}.dropdown-toggle{*margin-bottom:-3px}.dropdown-toggle:active,.open .dropdown-toggle{outline:0}.caret{display:inline-block;width:0;height:0;vertical-align:top;border-top:4px solid #000;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.dropdown .caret{margin-top:8px;margin-left:2px}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);*border-right-width:2px;*border-bottom-width:2px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.drop
down-menu .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:normal;line-height:20px;color:#333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus,.dropdown-submenu:hover>a,.dropdown-submenu:focus>a{color:#fff;text-decoration:none;background-color:#0081c2;background-image:-moz-linear-gradient(top,#08c,#0077b3);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:-o-linear-gradient(top,#08c,#0077b3);background-image:linear-gradient(to bottom,#08c,#0077b3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0077b3',GradientType=0)}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#fff;text-decoration:non
e;background-color:#0081c2;background-image:-moz-linear-gradient(top,#08c,#0077b3);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:-o-linear-gradient(top,#08c,#0077b3);background-image:linear-gradient(to bottom,#08c,#0077b3);background-repeat:repeat-x;outline:0;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0077b3',GradientType=0)}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#999}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;cursor:default;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open{*z-index:1000}.open>.dropdown-menu{display:block}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid #00
0;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}.dropdown-submenu{position:relative}.dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:-6px;margin-left:-1px;-webkit-border-radius:0 6px 6px 6px;-moz-border-radius:0 6px 6px 6px;border-radius:0 6px 6px 6px}.dropdown-submenu:hover>.dropdown-menu{display:block}.dropup .dropdown-submenu>.dropdown-menu{top:auto;bottom:0;margin-top:0;margin-bottom:-2px;-webkit-border-radius:5px 5px 5px 0;-moz-border-radius:5px 5px 5px 0;border-radius:5px 5px 5px 0}.dropdown-submenu>a:after{display:block;float:right;width:0;height:0;margin-top:5px;margin-right:-10px;border-color:transparent;border-left-color:#ccc;border-style:solid;border-width:5px 0 5px 5px;content:" "}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown-submenu.pull-left{float:none}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:10px;-webkit-border-radius:6px 0 6px 6px;-moz-borde
r-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.dropdown .dropdown-menu .nav-header{padding-right:20px;padding-left:20px}.typeahead{z-index:1051;margin-top:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);box-shadow:inset 0 1px 1px rgba(0,0,0,0.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,0.15)}.well-large{padding:24px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.well-small{padding:9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.fade{opacity:0;-webkit-transition:opacity .15s linear;-moz-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{position:relative
;height:0;overflow:hidden;-webkit-transition:height .35s ease;-moz-transition:height .35s ease;-o-transition:height .35s ease;transition:height .35s ease}.collapse.in{height:auto}.close{float:right;font-size:20px;font-weight:bold;line-height:20px;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;opacity:.4;filter:alpha(opacity=40)}button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.btn{display:inline-block;*display:inline;padding:4px 12px;margin-bottom:0;*margin-left:.3em;font-size:14px;line-height:20px;color:#333;text-align:center;text-shadow:0 1px 1px rgba(255,255,255,0.75);vertical-align:middle;cursor:pointer;background-color:#f5f5f5;*background-color:#e6e6e6;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e
6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-repeat:repeat-x;border:1px solid #ccc;*border:0;border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);border-bottom-color:#b3b3b3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffe6e6e6',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);*zoom:1;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05)}.btn:hover,.btn:focus,.btn:active,.btn.active,.btn.disabled,.btn[disabled]{color:#333;background-color:#e6e6e6;*background-color:#d9d9d9}.btn:active,.btn.active{background-color:#ccc \9}.btn:first-child{*ma
rgin-left:0}.btn:hover,.btn:focus{color:#333;text-decoration:none;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear}.btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.btn.disabled,.btn[disabled]{cursor:default;background-image:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-large{padding:11px 19px;font-size:17.5px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.btn-large [class^="icon-"],.btn-large [class*=" icon-"]{margi
n-top:4px}.btn-small{padding:2px 10px;font-size:11.9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-small [class^="icon-"],.btn-small [class*=" icon-"]{margin-top:0}.btn-mini [class^="icon-"],.btn-mini [class*=" icon-"]{margin-top:-1px}.btn-mini{padding:0 6px;font-size:10.5px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-block{display:block;width:100%;padding-right:0;padding-left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.btn-block+.btn-block{margin-top:5px}input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block{width:100%}.btn-primary.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active,.btn-inverse.active{color:rgba(255,255,255,0.75)}.btn-primary{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#006dcc;*background-color:#04c;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-webkit-gradien
t(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-repeat:repeat-x;border-color:#04c #04c #002a80;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0044cc',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.btn-primary[disabled]{color:#fff;background-color:#04c;*background-color:#003bb3}.btn-primary:active,.btn-primary.active{background-color:#039 \9}.btn-warning{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#faa732;*background-color:#f89406;background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f8940
6));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406);background-repeat:repeat-x;border-color:#f89406 #f89406 #ad6704;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450',endColorstr='#fff89406',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.btn-warning.disabled,.btn-warning[disabled]{color:#fff;background-color:#f89406;*background-color:#df8505}.btn-warning:active,.btn-warning.active{background-color:#c67605 \9}.btn-danger{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#da4f49;*background-color:#bd362f;background-image:-moz-linear-gradient(top,#ee5f5b,#bd362f);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#bd362f));back
ground-image:-webkit-linear-gradient(top,#ee5f5b,#bd362f);background-image:-o-linear-gradient(top,#ee5f5b,#bd362f);background-image:linear-gradient(to bottom,#ee5f5b,#bd362f);background-repeat:repeat-x;border-color:#bd362f #bd362f #802420;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b',endColorstr='#ffbd362f',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.btn-danger.disabled,.btn-danger[disabled]{color:#fff;background-color:#bd362f;*background-color:#a9302a}.btn-danger:active,.btn-danger.active{background-color:#942a25 \9}.btn-success{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#5bb75b;*background-color:#51a351;background-image:-moz-linear-gradient(top,#62c462,#51a351);background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#51a351));background-image:-w
ebkit-linear-gradient(top,#62c462,#51a351);background-image:-o-linear-gradient(top,#62c462,#51a351);background-image:linear-gradient(to bottom,#62c462,#51a351);background-repeat:repeat-x;border-color:#51a351 #51a351 #387038;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462',endColorstr='#ff51a351',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.btn-success.disabled,.btn-success[disabled]{color:#fff;background-color:#51a351;*background-color:#499249}.btn-success:active,.btn-success.active{background-color:#408140 \9}.btn-info{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#49afcd;*background-color:#2f96b4;background-image:-moz-linear-gradient(top,#5bc0de,#2f96b4);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#2f96b4));background-image:-webkit-line
ar-gradient(top,#5bc0de,#2f96b4);background-image:-o-linear-gradient(top,#5bc0de,#2f96b4);background-image:linear-gradient(to bottom,#5bc0de,#2f96b4);background-repeat:repeat-x;border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de',endColorstr='#ff2f96b4',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.btn-info.disabled,.btn-info[disabled]{color:#fff;background-color:#2f96b4;*background-color:#2a85a0}.btn-info:active,.btn-info.active{background-color:#24748c \9}.btn-inverse{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#363636;*background-color:#222;background-image:-moz-linear-gradient(top,#444,#222);background-image:-webkit-gradient(linear,0 0,0 100%,from(#444),to(#222));background-image:-webkit-linear-gradient(top,#444,#222);background-image:-o
-linear-gradient(top,#444,#222);background-image:linear-gradient(to bottom,#444,#222);background-repeat:repeat-x;border-color:#222 #222 #000;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444',endColorstr='#ff222222',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-inverse:hover,.btn-inverse:focus,.btn-inverse:active,.btn-inverse.active,.btn-inverse.disabled,.btn-inverse[disabled]{color:#fff;background-color:#222;*background-color:#151515}.btn-inverse:active,.btn-inverse.active{background-color:#080808 \9}button.btn,input[type="submit"].btn{*padding-top:3px;*padding-bottom:3px}button.btn::-moz-focus-inner,input[type="submit"].btn::-moz-focus-inner{padding:0;border:0}button.btn.btn-large,input[type="submit"].btn.btn-large{*padding-top:7px;*padding-bottom:7px}button.btn.btn-small,input[type="submit"].btn.btn-small{*padding-top:3px;*padding-bottom:3px}button.btn.bt
n-mini,input[type="submit"].btn.btn-mini{*padding-top:1px;*padding-bottom:1px}.btn-link,.btn-link:active,.btn-link[disabled]{background-color:transparent;background-image:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-link{color:#08c;cursor:pointer;border-color:transparent;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-link:hover,.btn-link:focus{color:#005580;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,.btn-link[disabled]:focus{color:#333;text-decoration:none}.btn-group{position:relative;display:inline-block;*display:inline;*margin-left:.3em;font-size:0;white-space:nowrap;vertical-align:middle;*zoom:1}.btn-group:first-child{*margin-left:0}.btn-group+.btn-group{margin-left:5px}.btn-toolbar{margin-top:10px;margin-bottom:10px;font-size:0}.btn-toolbar>.btn+.btn,.btn-toolbar>.btn-group+.btn,.btn-toolbar>.btn+.btn-group{margin-left:5px}.btn-group>.btn{position:relative;-webkit-border-radius:0;-moz-border-radiu
s:0;border-radius:0}.btn-group>.btn+.btn{margin-left:-1px}.btn-group>.btn,.btn-group>.dropdown-menu,.btn-group>.popover{font-size:14px}.btn-group>.btn-mini{font-size:10.5px}.btn-group>.btn-small{font-size:11.9px}.btn-group>.btn-large{font-size:17.5px}.btn-group>.btn:first-child{margin-left:0;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-moz-border-radius-topleft:4px}.btn-group>.btn:last-child,.btn-group>.dropdown-toggle{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:4px}.btn-group>.btn.large:first-child{margin-left:0;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-moz-border-radius-topleft:6px}.btn-group
>.btn.large:last-child,.btn-group>.large.dropdown-toggle{-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px;-moz-border-radius-topright:6px;-moz-border-radius-bottomright:6px}.btn-group>.btn:hover,.btn-group>.btn:focus,.btn-group>.btn:active,.btn-group>.btn.active{z-index:2}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{*padding-top:5px;padding-right:8px;*padding-bottom:5px;padding-left:8px;-webkit-box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05)}.btn-group>.btn-mini+.dropdown-toggle{*padding-top:2px;padding-right:5px;*padding-bottom:2px;padding-left:5
px}.btn-group>.btn-small+.dropdown-toggle{*padding-top:5px;*padding-bottom:4px}.btn-group>.btn-large+.dropdown-toggle{*padding-top:7px;padding-right:12px;*padding-bottom:7px;padding-left:12px}.btn-group.open .dropdown-toggle{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.btn-group.open .btn.dropdown-toggle{background-color:#e6e6e6}.btn-group.open .btn-primary.dropdown-toggle{background-color:#04c}.btn-group.open .btn-warning.dropdown-toggle{background-color:#f89406}.btn-group.open .btn-danger.dropdown-toggle{background-color:#bd362f}.btn-group.open .btn-success.dropdown-toggle{background-color:#51a351}.btn-group.open .btn-info.dropdown-toggle{background-color:#2f96b4}.btn-group.open .btn-inverse.dropdown-toggle{background-color:#222}.btn .caret{margin-top:8px;margin-left:0}.btn-large
.caret{margin-top:6px}.btn-large .caret{border-top-width:5px;border-right-width:5px;border-left-width:5px}.btn-mini .caret,.btn-small .caret{margin-top:8px}.dropup .btn-large .caret{border-bottom-width:5px}.btn-primary .caret,.btn-warning .caret,.btn-danger .caret,.btn-info .caret,.btn-success .caret,.btn-inverse .caret{border-top-color:#fff;border-bottom-color:#fff}.btn-group-vertical{display:inline-block;*display:inline;*zoom:1}.btn-group-vertical>.btn{display:block;float:none;max-width:100%;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group-vertical>.btn+.btn{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:first-child{-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.btn-group-vertical>.btn:last-child{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.btn-group-vertical>.btn-large:first-child{-webkit-border-radius:6px 6px 0 0;-moz-border-radius:6px 6px 0 0;border-radius:
6px 6px 0 0}.btn-group-vertical>.btn-large:last-child{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.alert{padding:8px 35px 8px 14px;margin-bottom:20px;text-shadow:0 1px 0 rgba(255,255,255,0.5);background-color:#fcf8e3;border:1px solid #fbeed5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.alert,.alert h4{color:#c09853}.alert h4{margin:0}.alert .close{position:relative;top:-2px;right:-21px;line-height:20px}.alert-success{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.alert-success h4{color:#468847}.alert-danger,.alert-error{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.alert-danger h4,.alert-error h4{color:#b94a48}.alert-info{color:#3a87ad;background-color:#d9edf7;border-color:#bce8f1}.alert-info h4{color:#3a87ad}.alert-block{padding-top:14px;padding-bottom:14px}.alert-block>p,.alert-block>ul{margin-bottom:0}.alert-block p+p{margin-top:5px}.nav{margin-bottom:20px;margin-left:0;list-style:n
one}.nav>li>a{display:block}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eee}.nav>li>a>img{max-width:none}.nav>.pull-right{float:right}.nav-header{display:block;padding:3px 15px;font-size:11px;font-weight:bold;line-height:20px;color:#999;text-shadow:0 1px 0 rgba(255,255,255,0.5);text-transform:uppercase}.nav li+.nav-header{margin-top:9px}.nav-list{padding-right:15px;padding-left:15px;margin-bottom:0}.nav-list>li>a,.nav-list .nav-header{margin-right:-15px;margin-left:-15px;text-shadow:0 1px 0 rgba(255,255,255,0.5)}.nav-list>li>a{padding:3px 15px}.nav-list>.active>a,.nav-list>.active>a:hover,.nav-list>.active>a:focus{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.2);background-color:#08c}.nav-list [class^="icon-"],.nav-list [class*=" icon-"]{margin-right:2px}.nav-list .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.nav-tabs,.nav-pills{*zoom:1}.nav-tabs:before,.nav-pills:bef
ore,.nav-tabs:after,.nav-pills:after{display:table;line-height:0;content:""}.nav-tabs:after,.nav-pills:after{clear:both}.nav-tabs>li,.nav-pills>li{float:left}.nav-tabs>li>a,.nav-pills>li>a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{margin-bottom:-1px}.nav-tabs>li>a{padding-top:8px;padding-bottom:8px;line-height:20px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover,.nav-tabs>li>a:focus{border-color:#eee #eee #ddd}.nav-tabs>.active>a,.nav-tabs>.active>a:hover,.nav-tabs>.active>a:focus{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-pills>li>a{padding-top:8px;padding-bottom:8px;margin-top:2px;margin-bottom:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.nav-pills>.active>a,.nav-pills>.active>a:hover,.nav-pills>.active>a:focus{color:#ff
f;background-color:#08c}.nav-stacked>li{float:none}.nav-stacked>li>a{margin-right:0}.nav-tabs.nav-stacked{border-bottom:0}.nav-tabs.nav-stacked>li>a{border:1px solid #ddd;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.nav-tabs.nav-stacked>li:first-child>a{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-topleft:4px}.nav-tabs.nav-stacked>li:last-child>a{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomright:4px;-moz-border-radius-bottomleft:4px}.nav-tabs.nav-stacked>li>a:hover,.nav-tabs.nav-stacked>li>a:focus{z-index:2;border-color:#ddd}.nav-pills.nav-stacked>li>a{margin-bottom:3px}.nav-pills.nav-stacked>li:last-child>a{margin-bottom:1px}.nav-tabs .dropdown-menu{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;borde
r-radius:0 0 6px 6px}.nav-pills .dropdown-menu{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.nav .dropdown-toggle .caret{margin-top:6px;border-top-color:#08c;border-bottom-color:#08c}.nav .dropdown-toggle:hover .caret,.nav .dropdown-toggle:focus .caret{border-top-color:#005580;border-bottom-color:#005580}.nav-tabs .dropdown-toggle .caret{margin-top:8px}.nav .active .dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.nav-tabs .active .dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.nav>.dropdown.active>a:hover,.nav>.dropdown.active>a:focus{cursor:pointer}.nav-tabs .open .dropdown-toggle,.nav-pills .open .dropdown-toggle,.nav>li.dropdown.open.active>a:hover,.nav>li.dropdown.open.active>a:focus{color:#fff;background-color:#999;border-color:#999}.nav li.dropdown.open .caret,.nav li.dropdown.open.active .caret,.nav li.dropdown.open a:hover .caret,.nav li.dropdown.open a:focus .caret{border-top-color:#fff;border-bottom-color
:#fff;opacity:1;filter:alpha(opacity=100)}.tabs-stacked .open>a:hover,.tabs-stacked .open>a:focus{border-color:#999}.tabbable{*zoom:1}.tabbable:before,.tabbable:after{display:table;line-height:0;content:""}.tabbable:after{clear:both}.tab-content{overflow:auto}.tabs-below>.nav-tabs,.tabs-right>.nav-tabs,.tabs-left>.nav-tabs{border-bottom:0}.tab-content>.tab-pane,.pill-content>.pill-pane{display:none}.tab-content>.active,.pill-content>.active{display:block}.tabs-below>.nav-tabs{border-top:1px solid #ddd}.tabs-below>.nav-tabs>li{margin-top:-1px;margin-bottom:0}.tabs-below>.nav-tabs>li>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.tabs-below>.nav-tabs>li>a:hover,.tabs-below>.nav-tabs>li>a:focus{border-top-color:#ddd;border-bottom-color:transparent}.tabs-below>.nav-tabs>.active>a,.tabs-below>.nav-tabs>.active>a:hover,.tabs-below>.nav-tabs>.active>a:focus{border-color:transparent #ddd #ddd #ddd}.tabs-left>.nav-tabs>li,.tabs-right>.nav-tabs>l
i{float:none}.tabs-left>.nav-tabs>li>a,.tabs-right>.nav-tabs>li>a{min-width:74px;margin-right:0;margin-bottom:3px}.tabs-left>.nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd}.tabs-left>.nav-tabs>li>a{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.tabs-left>.nav-tabs>li>a:hover,.tabs-left>.nav-tabs>li>a:focus{border-color:#eee #ddd #eee #eee}.tabs-left>.nav-tabs .active>a,.tabs-left>.nav-tabs .active>a:hover,.tabs-left>.nav-tabs .active>a:focus{border-color:#ddd transparent #ddd #ddd;*border-right-color:#fff}.tabs-right>.nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd}.tabs-right>.nav-tabs>li>a{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.tabs-right>.nav-tabs>li>a:hover,.tabs-right>.nav-tabs>li>a:focus{border-color:#eee #eee #eee #ddd}.tabs-right>.nav-tabs .active>a,.tabs-right>.nav-tabs .active>a:hover,.tabs-right>.nav-tabs
.active>a:focus{border-color:#ddd #ddd #ddd transparent;*border-left-color:#fff}.nav>.disabled>a{color:#999}.nav>.disabled>a:hover,.nav>.disabled>a:focus{text-decoration:none;cursor:default;background-color:transparent}.navbar{*position:relative;*z-index:2;margin-bottom:20px;overflow:visible}.navbar-inner{min-height:40px;padding-right:20px;padding-left:20px;background-color:#fafafa;background-image:-moz-linear-gradient(top,#fff,#f2f2f2);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#f2f2f2));background-image:-webkit-linear-gradient(top,#fff,#f2f2f2);background-image:-o-linear-gradient(top,#fff,#f2f2f2);background-image:linear-gradient(to bottom,#fff,#f2f2f2);background-repeat:repeat-x;border:1px solid #d4d4d4;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#fff2f2f2',GradientType=0);*zoom:1;-webkit-box-shadow:0 1px 4px rgba(0,0,0,0.065);-moz-box-shadow:0 1
px 4px rgba(0,0,0,0.065);box-shadow:0 1px 4px rgba(0,0,0,0.065)}.navbar-inner:before,.navbar-inner:after{display:table;line-height:0;content:""}.navbar-inner:after{clear:both}.navbar .container{width:auto}.nav-collapse.collapse{height:auto;overflow:visible}.navbar .brand{display:block;float:left;padding:10px 20px 10px;margin-left:-20px;font-size:20px;font-weight:200;color:#777;text-shadow:0 1px 0 #fff}.navbar .brand:hover,.navbar .brand:focus{text-decoration:none}.navbar-text{margin-bottom:0;line-height:40px;color:#777}.navbar-link{color:#777}.navbar-link:hover,.navbar-link:focus{color:#333}.navbar .divider-vertical{height:40px;margin:0 9px;border-right:1px solid #fff;border-left:1px solid #f2f2f2}.navbar .btn,.navbar .btn-group{margin-top:5px}.navbar .btn-group .btn,.navbar .input-prepend .btn,.navbar .input-append .btn,.navbar .input-prepend .btn-group,.navbar .input-append .btn-group{margin-top:0}.navbar-form{margin-bottom:0;*zoom:1}.navbar-form:before,.navbar-form:after{display:
table;line-height:0;content:""}.navbar-form:after{clear:both}.navbar-form input,.navbar-form select,.navbar-form .radio,.navbar-form .checkbox{margin-top:5px}.navbar-form input,.navbar-form select,.navbar-form .btn{display:inline-block;margin-bottom:0}.navbar-form input[type="image"],.navbar-form input[type="checkbox"],.navbar-form input[type="radio"]{margin-top:3px}.navbar-form .input-append,.navbar-form .input-prepend{margin-top:5px;white-space:nowrap}.navbar-form .input-append input,.navbar-form .input-prepend input{margin-top:0}.navbar-search{position:relative;float:left;margin-top:5px;margin-bottom:0}.navbar-search .search-query{padding:4px 14px;margin-bottom:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:1;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.navbar-static-top{position:static;margin-bottom:0}.navbar-static-top .navbar-inner{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.na
vbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030;margin-bottom:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{border-width:0 0 1px}.navbar-fixed-bottom .navbar-inner{border-width:1px 0 0}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding-right:0;padding-left:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.navbar-fixed-top{top:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{-webkit-box-shadow:0 1px 10px rgba(0,0,0,0.1);-moz-box-shadow:0 1px 10px rgba(0,0,0,0.1);box-shadow:0 1px 10px rgba(0,0,0,0.1)}.navbar-fixed-bottom{bottom:0}.navbar-fixed-bottom .navbar-inner{-webkit-box-shadow:0 -1px 10px rgba(0,0,0,0.1);-moz-box-shadow:0 -1px 10px rgba(0,0,0,0.1);box-shadow:0 -1px 10px rgba(0,0,0,0.1)}.navbar .nav{position:relative;left:0;display:block;float:left;margin:0 10px 0 0}.navba
r .nav.pull-right{float:right;margin-right:0}.navbar .nav>li{float:left}.navbar .nav>li>a{float:none;padding:10px 15px 10px;color:#777;text-decoration:none;text-shadow:0 1px 0 #fff}.navbar .nav .dropdown-toggle .caret{margin-top:8px}.navbar .nav>li>a:focus,.navbar .nav>li>a:hover{color:#333;text-decoration:none;background-color:transparent}.navbar .nav>.active>a,.navbar .nav>.active>a:hover,.navbar .nav>.active>a:focus{color:#555;text-decoration:none;background-color:#e5e5e5;-webkit-box-shadow:inset 0 3px 8px rgba(0,0,0,0.125);-moz-box-shadow:inset 0 3px 8px rgba(0,0,0,0.125);box-shadow:inset 0 3px 8px rgba(0,0,0,0.125)}.navbar .btn-navbar{display:none;float:right;padding:7px 10px;margin-right:5px;margin-left:5px;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#ededed;*background-color:#e5e5e5;background-image:-moz-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f2f2f2),to(#e5e5e5));background-image:-webkit-linear-grad
ient(top,#f2f2f2,#e5e5e5);background-image:-o-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:linear-gradient(to bottom,#f2f2f2,#e5e5e5);background-repeat:repeat-x;border-color:#e5e5e5 #e5e5e5 #bfbfbf;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2',endColorstr='#ffe5e5e5',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075)}.navbar .btn-navbar:hover,.navbar .btn-navbar:focus,.navbar .btn-navbar:active,.navbar .btn-navbar.active,.navbar .btn-navbar.disabled,.navbar .btn-navbar[disabled]{color:#fff;background-color:#e5e5e5;*background-color:#d9d9d9}.navbar .btn-navbar:active,.navbar .btn-navbar.active{background-color
:#ccc \9}.navbar .btn-navbar .icon-bar{display:block;width:18px;height:2px;background-color:#f5f5f5;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,0.25);-moz-box-shadow:0 1px 0 rgba(0,0,0,0.25);box-shadow:0 1px 0 rgba(0,0,0,0.25)}.btn-navbar .icon-bar+.icon-bar{margin-top:3px}.navbar .nav>li>.dropdown-menu:before{position:absolute;top:-7px;left:9px;display:inline-block;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-left:7px solid transparent;border-bottom-color:rgba(0,0,0,0.2);content:''}.navbar .nav>li>.dropdown-menu:after{position:absolute;top:-6px;left:10px;display:inline-block;border-right:6px solid transparent;border-bottom:6px solid #fff;border-left:6px solid transparent;content:''}.navbar-fixed-bottom .nav>li>.dropdown-menu:before{top:auto;bottom:-7px;border-top:7px solid #ccc;border-bottom:0;border-top-color:rgba(0,0,0,0.2)}.navbar-fixed-bottom .nav>li>.dropdown-menu:after{top:auto;bottom:-6px;
border-top:6px solid #fff;border-bottom:0}.navbar .nav li.dropdown>a:hover .caret,.navbar .nav li.dropdown>a:focus .caret{border-top-color:#333;border-bottom-color:#333}.navbar .nav li.dropdown.open>.dropdown-toggle,.navbar .nav li.dropdown.active>.dropdown-toggle,.navbar .nav li.dropdown.open.active>.dropdown-toggle{color:#555;background-color:#e5e5e5}.navbar .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#777;border-bottom-color:#777}.navbar .nav li.dropdown.open>.dropdown-toggle .caret,.navbar .nav li.dropdown.active>.dropdown-toggle .caret,.navbar .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.navbar .pull-right>li>.dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right{right:0;left:auto}.navbar .pull-right>li>.dropdown-menu:before,.navbar .nav>li>.dropdown-menu.pull-right:before{right:12px;left:auto}.navbar .pull-right>li>.dropdown-menu:after,.navbar .nav>li>.dropdown-menu.pull-right:after{right:13px;left:auto}.n
avbar .pull-right>li>.dropdown-menu .dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right .dropdown-menu{right:100%;left:auto;margin-right:-1px;margin-left:0;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.navbar-inverse .navbar-inner{background-color:#1b1b1b;background-image:-moz-linear-gradient(top,#222,#111);background-image:-webkit-gradient(linear,0 0,0 100%,from(#222),to(#111));background-image:-webkit-linear-gradient(top,#222,#111);background-image:-o-linear-gradient(top,#222,#111);background-image:linear-gradient(to bottom,#222,#111);background-repeat:repeat-x;border-color:#252525;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222',endColorstr='#ff111111',GradientType=0)}.navbar-inverse .brand,.navbar-inverse .nav>li>a{color:#999;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.navbar-inverse .brand:hover,.navbar-inverse .nav>li>a:hover,.navbar-inverse .brand:focus,.navbar-inverse .nav>li>a:focus{color:#fff}.n
avbar-inverse .brand{color:#999}.navbar-inverse .navbar-text{color:#999}.navbar-inverse .nav>li>a:focus,.navbar-inverse .nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .nav .active>a,.navbar-inverse .nav .active>a:hover,.navbar-inverse .nav .active>a:focus{color:#fff;background-color:#111}.navbar-inverse .navbar-link{color:#999}.navbar-inverse .navbar-link:hover,.navbar-inverse .navbar-link:focus{color:#fff}.navbar-inverse .divider-vertical{border-right-color:#222;border-left-color:#111}.navbar-inverse .nav li.dropdown.open>.dropdown-toggle,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle{color:#fff;background-color:#111}.navbar-inverse .nav li.dropdown>a:hover .caret,.navbar-inverse .nav li.dropdown>a:focus .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#999;border-bottom-color:#999}.navbar-inverse .nav li.dro
pdown.open>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .navbar-search .search-query{color:#fff;background-color:#515151;border-color:#111;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}.navbar-inverse .navbar-search .search-query:-moz-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:-ms-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:focus,.navbar-inverse .navbar-search .search-query.focused{padding:5px 15px;color:#333;te
xt-shadow:0 1px 0 #fff;background-color:#fff;border:0;outline:0;-webkit-box-shadow:0 0 3px rgba(0,0,0,0.15);-moz-box-shadow:0 0 3px rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.15)}.navbar-inverse .btn-navbar{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#0e0e0e;*background-color:#040404;background-image:-moz-linear-gradient(top,#151515,#040404);background-image:-webkit-gradient(linear,0 0,0 100%,from(#151515),to(#040404));background-image:-webkit-linear-gradient(top,#151515,#040404);background-image:-o-linear-gradient(top,#151515,#040404);background-image:linear-gradient(to bottom,#151515,#040404);background-repeat:repeat-x;border-color:#040404 #040404 #000;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515',endColorstr='#ff040404',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.navbar-inverse .btn-navbar:hover,.navbar-inverse .btn-navbar:f
ocus,.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active,.navbar-inverse .btn-navbar.disabled,.navbar-inverse .btn-navbar[disabled]{color:#fff;background-color:#040404;*background-color:#000}.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active{background-color:#000 \9}.breadcrumb{padding:8px 15px;margin:0 0 20px;list-style:none;background-color:#f5f5f5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.breadcrumb>li{display:inline-block;*display:inline;text-shadow:0 1px 0 #fff;*zoom:1}.breadcrumb>li>.divider{padding:0 5px;color:#ccc}.breadcrumb>.active{color:#999}.pagination{margin:20px 0}.pagination ul{display:inline-block;*display:inline;margin-bottom:0;margin-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;*zoom:1;-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:0 1px 2px rgba(0,0,0,0.05);box-shadow:0 1px 2px rgba(0,0,0,0.05)}.pagination ul>li{display:inline}.pagination ul>li>a,.pagination
ul>li>span{float:left;padding:4px 12px;line-height:20px;text-decoration:none;background-color:#fff;border:1px solid #ddd;border-left-width:0}.pagination ul>li>a:hover,.pagination ul>li>a:focus,.pagination ul>.active>a,.pagination ul>.active>span{background-color:#f5f5f5}.pagination ul>.active>a,.pagination ul>.active>span{color:#999;cursor:default}.pagination ul>.disabled>span,.pagination ul>.disabled>a,.pagination ul>.disabled>a:hover,.pagination ul>.disabled>a:focus{color:#999;cursor:default;background-color:transparent}.pagination ul>li:first-child>a,.pagination ul>li:first-child>span{border-left-width:1px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-moz-border-radius-topleft:4px}.pagination ul>li:last-child>a,.pagination ul>li:last-child>span{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;border-bottom-rig
ht-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:4px}.pagination-centered{text-align:center}.pagination-right{text-align:right}.pagination-large ul>li>a,.pagination-large ul>li>span{padding:11px 19px;font-size:17.5px}.pagination-large ul>li:first-child>a,.pagination-large ul>li:first-child>span{-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-moz-border-radius-topleft:6px}.pagination-large ul>li:last-child>a,.pagination-large ul>li:last-child>span{-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px;-moz-border-radius-topright:6px;-moz-border-radius-bottomright:6px}.pagination-mini ul>li:first-child>a,.pagination-small ul>li:first-child>a,.pagination-mini ul>li:first-child>span,.pagination-small ul>li:first-child>span{-webkit-border-bottom-left-radius:3px;border
-bottom-left-radius:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-moz-border-radius-bottomleft:3px;-moz-border-radius-topleft:3px}.pagination-mini ul>li:last-child>a,.pagination-small ul>li:last-child>a,.pagination-mini ul>li:last-child>span,.pagination-small ul>li:last-child>span{-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:3px}.pagination-small ul>li>a,.pagination-small ul>li>span{padding:2px 10px;font-size:11.9px}.pagination-mini ul>li>a,.pagination-mini ul>li>span{padding:0 6px;font-size:10.5px}.pager{margin:20px 0;text-align:center;list-style:none;*zoom:1}.pager:before,.pager:after{display:table;line-height:0;content:""}.pager:after{clear:both}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;-webkit-border-radius:15px;-moz-b
order-radius:15px;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#f5f5f5}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#999;cursor:default;background-color:#fff}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop,.modal-backdrop.fade.in{opacity:.8;filter:alpha(opacity=80)}.modal{position:fixed;top:10%;left:50%;z-index:1050;width:560px;margin-left:-280px;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,0.3);*border:1px solid #999;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;outline:0;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.3);box-shadow:0 3px 7px rgba(0,0,0,0.3);-webkit-background-clip:padding-box;-moz-background-cli
p:padding-box;background-clip:padding-box}.modal.fade{top:-25%;-webkit-transition:opacity .3s linear,top .3s ease-out;-moz-transition:opacity .3s linear,top .3s ease-out;-o-transition:opacity .3s linear,top .3s ease-out;transition:opacity .3s linear,top .3s ease-out}.modal.fade.in{top:10%}.modal-header{padding:9px 15px;border-bottom:1px solid #eee}.modal-header .close{margin-top:2px}.modal-header h3{margin:0;line-height:30px}.modal-body{position:relative;max-height:400px;padding:15px;overflow-y:auto}.modal-form{margin-bottom:0}.modal-footer{padding:14px 15px 15px;margin-bottom:0;text-align:right;background-color:#f5f5f5;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;*zoom:1;-webkit-box-shadow:inset 0 1px 0 #fff;-moz-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff}.modal-footer:before,.modal-footer:after{display:table;line-height:0;content:""}.modal-footer:after{clear:both}.modal-footer .btn+.btn{margin
-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.tooltip{position:absolute;z-index:1030;display:block;font-size:11px;line-height:1.4;opacity:0;filter:alpha(opacity=0);visibility:visible}.tooltip.in{opacity:.8;filter:alpha(opacity=80)}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-color:#000;border-width:5px 5px 0}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-right-color:#000;border-width:5px 5px 5px 0}.tooltip.
left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-left-color:#000;border-width:5px 0 5px 5px}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-bottom-color:#000;border-width:0 5px 5px}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;max-width:276px;padding:1px;text-align:left;white-space:normal;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;font-weight:normal;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;-webkit-border-r
adius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0}.popover-title:empty{displa
<TRUNCATED>
[07/28] CLIMATE-512 - Replace frontend with new Yeoman/Grunt/Bower
frontend
Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/js/lib/timeline/timeline.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/js/lib/timeline/timeline.js b/ocw-ui/frontend/app/js/lib/timeline/timeline.js
deleted file mode 100644
index 0e009a2..0000000
--- a/ocw-ui/frontend/app/js/lib/timeline/timeline.js
+++ /dev/null
@@ -1,6381 +0,0 @@
-/**
- * @file timeline.js
- *
- * @brief
- * The Timeline is an interactive visualization chart to visualize events in
- * time, having a start and end date.
- * You can freely move and zoom in the timeline by dragging
- * and scrolling in the Timeline. Items are optionally dragable. The time
- * scale on the axis is adjusted automatically, and supports scales ranging
- * from milliseconds to years.
- *
- * Timeline is part of the CHAP Links library.
- *
- * Timeline is tested on Firefox 3.6, Safari 5.0, Chrome 6.0, Opera 10.6, and
- * Internet Explorer 6+.
- *
- * @license
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- *
- * Copyright (c) 2011-2013 Almende B.V.
- *
- * @author Jos de Jong, <jo...@almende.org>
- * @date 2013-04-18
- * @version 2.4.2
- */
-
-/*
- * i18n mods by github user iktuz (https://gist.github.com/iktuz/3749287/)
- * added to v2.4.1 with da_DK language by @bjarkebech
- */
-
-/*
- * TODO
- *
- * Add zooming with pinching on Android
- *
- * Bug: when an item contains a javascript onclick or a link, this does not work
- * when the item is not selected (when the item is being selected,
- * it is redrawn, which cancels any onclick or link action)
- * Bug: when an item contains an image without size, or a css max-width, it is not sized correctly
- * Bug: neglect items when they have no valid start/end, instead of throwing an error
- * Bug: Pinching on ipad does not work very well, sometimes the page will zoom when pinching vertically
- * Bug: cannot set max width for an item, like div.timeline-event-content {white-space: normal; max-width: 100px;}
- * Bug on IE in Quirks mode. When you have groups, and delete an item, the groups become invisible
- */
-
-/**
- * Declare a unique namespace for CHAP's Common Hybrid Visualisation Library,
- * "links"
- */
-if (typeof links === 'undefined') {
- links = {};
- // important: do not use var, as "var links = {};" will overwrite
- // the existing links variable value with undefined in IE8, IE7.
-}
-
-
-/**
- * Ensure the variable google exists
- */
-if (typeof google === 'undefined') {
- google = undefined;
- // important: do not use var, as "var google = undefined;" will overwrite
- // the existing google variable value with undefined in IE8, IE7.
-}
-
-
-
-// Internet Explorer 8 and older does not support Array.indexOf,
-// so we define it here in that case
-// http://soledadpenades.com/2007/05/17/arrayindexof-in-internet-explorer/
-if(!Array.prototype.indexOf) {
- Array.prototype.indexOf = function(obj){
- for(var i = 0; i < this.length; i++){
- if(this[i] == obj){
- return i;
- }
- }
- return -1;
- }
-}
-
-// Internet Explorer 8 and older does not support Array.forEach,
-// so we define it here in that case
-// https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/forEach
-if (!Array.prototype.forEach) {
- Array.prototype.forEach = function(fn, scope) {
- for(var i = 0, len = this.length; i < len; ++i) {
- fn.call(scope || this, this[i], i, this);
- }
- }
-}
-
-
-/**
- * @constructor links.Timeline
- * The timeline is a visualization chart to visualize events in time.
- *
- * The timeline is developed in javascript as a Google Visualization Chart.
- *
- * @param {Element} container The DOM element in which the Timeline will
- * be created. Normally a div element.
- */
-links.Timeline = function(container) {
- if (!container) {
- // this call was probably only for inheritance, no constructor-code is required
- return;
- }
-
- // create variables and set default values
- this.dom = {};
- this.conversion = {};
- this.eventParams = {}; // stores parameters for mouse events
- this.groups = [];
- this.groupIndexes = {};
- this.items = [];
- this.renderQueue = {
- show: [], // Items made visible but not yet added to DOM
- hide: [], // Items currently visible but not yet removed from DOM
- update: [] // Items with changed data but not yet adjusted DOM
- };
- this.renderedItems = []; // Items currently rendered in the DOM
- this.clusterGenerator = new links.Timeline.ClusterGenerator(this);
- this.currentClusters = [];
- this.selection = undefined; // stores index and item which is currently selected
-
- this.listeners = {}; // event listener callbacks
-
- // Initialize sizes.
- // Needed for IE (which gives an error when you try to set an undefined
- // value in a style)
- this.size = {
- 'actualHeight': 0,
- 'axis': {
- 'characterMajorHeight': 0,
- 'characterMajorWidth': 0,
- 'characterMinorHeight': 0,
- 'characterMinorWidth': 0,
- 'height': 0,
- 'labelMajorTop': 0,
- 'labelMinorTop': 0,
- 'line': 0,
- 'lineMajorWidth': 0,
- 'lineMinorHeight': 0,
- 'lineMinorTop': 0,
- 'lineMinorWidth': 0,
- 'top': 0
- },
- 'contentHeight': 0,
- 'contentLeft': 0,
- 'contentWidth': 0,
- 'frameHeight': 0,
- 'frameWidth': 0,
- 'groupsLeft': 0,
- 'groupsWidth': 0,
- 'items': {
- 'top': 0
- }
- };
-
- this.dom.container = container;
-
- this.options = {
- 'width': "100%",
- 'height': "auto",
- 'minHeight': 0, // minimal height in pixels
- 'autoHeight': true,
-
- 'eventMargin': 10, // minimal margin between events
- 'eventMarginAxis': 20, // minimal margin between events and the axis
- 'dragAreaWidth': 10, // pixels
-
- 'min': undefined,
- 'max': undefined,
- 'zoomMin': 10, // milliseconds
- 'zoomMax': 1000 * 60 * 60 * 24 * 365 * 10000, // milliseconds
-
- 'moveable': true,
- 'zoomable': true,
- 'selectable': true,
- 'editable': false,
- 'snapEvents': true,
- 'groupChangeable': true,
-
- 'showCurrentTime': true, // show a red bar displaying the current time
- 'showCustomTime': false, // show a blue, draggable bar displaying a custom time
- 'showMajorLabels': true,
- 'showMinorLabels': true,
- 'showNavigation': false,
- 'showButtonNew': false,
- 'groupsOnRight': false,
- 'axisOnTop': false,
- 'stackEvents': true,
- 'animate': true,
- 'animateZoom': true,
- 'cluster': false,
- 'style': 'box',
- 'customStackOrder': false, //a function(a,b) for determining stackorder amongst a group of items. Essentially a comparator, -ve value for "a before b" and vice versa
-
- // i18n: Timeline only has built-in English text per default. Include timeline-locales.js to support more localized text.
- 'locale': 'en',
- 'MONTHS': new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"),
- 'MONTHS_SHORT': new Array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"),
- 'DAYS': new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"),
- 'DAYS_SHORT': new Array("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"),
- 'ZOOM_IN': "Zoom in",
- 'ZOOM_OUT': "Zoom out",
- 'MOVE_LEFT': "Move left",
- 'MOVE_RIGHT': "Move right",
- 'NEW': "New",
- 'CREATE_NEW_EVENT': "Create new event"
- };
-
- this.clientTimeOffset = 0; // difference between client time and the time
- // set via Timeline.setCurrentTime()
- var dom = this.dom;
-
- // remove all elements from the container element.
- while (dom.container.hasChildNodes()) {
- dom.container.removeChild(dom.container.firstChild);
- }
-
- // create a step for drawing the axis
- this.step = new links.Timeline.StepDate();
-
- // add standard item types
- this.itemTypes = {
- box: links.Timeline.ItemBox,
- range: links.Timeline.ItemRange,
- dot: links.Timeline.ItemDot
- };
-
- // initialize data
- this.data = [];
- this.firstDraw = true;
-
- // date interval must be initialized
- this.setVisibleChartRange(undefined, undefined, false);
-
- // render for the first time
- this.render();
-
- // fire the ready event
- var me = this;
- setTimeout(function () {
- me.trigger('ready');
- }, 0);
-};
-
-
-/**
- * Main drawing logic. This is the function that needs to be called
- * in the html page, to draw the timeline.
- *
- * A data table with the events must be provided, and an options table.
- *
- * @param {google.visualization.DataTable} data
- * The data containing the events for the timeline.
- * Object DataTable is defined in
- * google.visualization.DataTable
- * @param {Object} options A name/value map containing settings for the
- * timeline. Optional.
- */
-links.Timeline.prototype.draw = function(data, options) {
- this.setOptions(options);
-
- // read the data
- this.setData(data);
-
- // set timer range. this will also redraw the timeline
- if (options && (options.start || options.end)) {
- this.setVisibleChartRange(options.start, options.end);
- }
- else if (this.firstDraw) {
- this.setVisibleChartRangeAuto();
- }
-
- this.firstDraw = false;
-};
-
-
-/**
- * Set options for the timeline.
- * Timeline must be redrawn afterwards
- * @param {Object} options A name/value map containing settings for the
- * timeline. Optional.
- */
-links.Timeline.prototype.setOptions = function(options) {
- if (options) {
- // retrieve parameter values
- for (var i in options) {
- if (options.hasOwnProperty(i)) {
- this.options[i] = options[i];
- }
- }
-
- // prepare i18n dependent on set locale
- if (typeof links.locales !== 'undefined' && this.options.locale !== 'en') {
- var localeOpts = links.locales[this.options.locale];
- if(localeOpts) {
- for (var l in localeOpts) {
- if (localeOpts.hasOwnProperty(l)) {
- this.options[l] = localeOpts[l];
- }
- }
- }
- }
-
- // check for deprecated options
- if (options.showButtonAdd != undefined) {
- this.options.showButtonNew = options.showButtonAdd;
- console.log('WARNING: Option showButtonAdd is deprecated. Use showButtonNew instead');
- }
- if (options.intervalMin != undefined) {
- this.options.zoomMin = options.intervalMin;
- console.log('WARNING: Option intervalMin is deprecated. Use zoomMin instead');
- }
- if (options.intervalMax != undefined) {
- this.options.zoomMax = options.intervalMax;
- console.log('WARNING: Option intervalMax is deprecated. Use zoomMax instead');
- }
-
- if (options.scale && options.step) {
- this.step.setScale(options.scale, options.step);
- }
- }
-
- // validate options
- this.options.autoHeight = (this.options.height === "auto");
-};
-
-/**
- * Add new type of items
- * @param {String} typeName Name of new type
- * @param {links.Timeline.Item} typeFactory Constructor of items
- */
-links.Timeline.prototype.addItemType = function (typeName, typeFactory) {
- this.itemTypes[typeName] = typeFactory;
-};
-
-/**
- * Retrieve a map with the column indexes of the columns by column name.
- * For example, the method returns the map
- * {
- * start: 0,
- * end: 1,
- * content: 2,
- * group: undefined,
- * className: undefined
- * editable: undefined
- * }
- * @param {google.visualization.DataTable} dataTable
- * @type {Object} map
- */
-links.Timeline.mapColumnIds = function (dataTable) {
- var cols = {},
- colMax = dataTable.getNumberOfColumns(),
- allUndefined = true;
-
- // loop over the columns, and map the column id's to the column indexes
- for (var col = 0; col < colMax; col++) {
- var id = dataTable.getColumnId(col) || dataTable.getColumnLabel(col);
- cols[id] = col;
- if (id == 'start' || id == 'end' || id == 'content' ||
- id == 'group' || id == 'className' || id == 'editable') {
- allUndefined = false;
- }
- }
-
- // if no labels or ids are defined,
- // use the default mapping for start, end, content
- if (allUndefined) {
- cols.start = 0;
- cols.end = 1;
- cols.content = 2;
- }
-
- return cols;
-};
-
-/**
- * Set data for the timeline
- * @param {google.visualization.DataTable | Array} data
- */
-links.Timeline.prototype.setData = function(data) {
- // unselect any previously selected item
- this.unselectItem();
-
- if (!data) {
- data = [];
- }
-
- // clear all data
- this.stackCancelAnimation();
- this.clearItems();
- this.data = data;
- var items = this.items;
- this.deleteGroups();
-
- if (google && google.visualization &&
- data instanceof google.visualization.DataTable) {
- // map the datatable columns
- var cols = links.Timeline.mapColumnIds(data);
-
- // read DataTable
- for (var row = 0, rows = data.getNumberOfRows(); row < rows; row++) {
- items.push(this.createItem({
- 'start': ((cols.start != undefined) ? data.getValue(row, cols.start) : undefined),
- 'end': ((cols.end != undefined) ? data.getValue(row, cols.end) : undefined),
- 'content': ((cols.content != undefined) ? data.getValue(row, cols.content) : undefined),
- 'group': ((cols.group != undefined) ? data.getValue(row, cols.group) : undefined),
- 'className': ((cols.className != undefined) ? data.getValue(row, cols.className) : undefined),
- 'editable': ((cols.editable != undefined) ? data.getValue(row, cols.editable) : undefined)
- }));
- }
- }
- else if (links.Timeline.isArray(data)) {
- // read JSON array
- for (var row = 0, rows = data.length; row < rows; row++) {
- var itemData = data[row];
- var item = this.createItem(itemData);
- items.push(item);
- }
- }
- else {
- throw "Unknown data type. DataTable or Array expected.";
- }
-
- // prepare data for clustering, by filtering and sorting by type
- if (this.options.cluster) {
- this.clusterGenerator.setData(this.items);
- }
-
- this.render({
- animate: false
- });
-};
-
-/**
- * Return the original data table.
- * @return {google.visualization.DataTable | Array} data
- */
-links.Timeline.prototype.getData = function () {
- return this.data;
-};
-
-
-/**
- * Update the original data with changed start, end or group.
- *
- * @param {Number} index
- * @param {Object} values An object containing some of the following parameters:
- * {Date} start,
- * {Date} end,
- * {String} content,
- * {String} group
- */
-links.Timeline.prototype.updateData = function (index, values) {
- var data = this.data,
- prop;
-
- if (google && google.visualization &&
- data instanceof google.visualization.DataTable) {
- // update the original google DataTable
- var missingRows = (index + 1) - data.getNumberOfRows();
- if (missingRows > 0) {
- data.addRows(missingRows);
- }
-
- // map the column id's by name
- var cols = links.Timeline.mapColumnIds(data);
-
- // merge all fields from the provided data into the current data
- for (prop in values) {
- if (values.hasOwnProperty(prop)) {
- var col = cols[prop];
- if (col == undefined) {
- // create new column
- var value = values[prop];
- var valueType = 'string';
- if (typeof(value) == 'number') {valueType = 'number';}
- else if (typeof(value) == 'boolean') {valueType = 'boolean';}
- else if (value instanceof Date) {valueType = 'datetime';}
- col = data.addColumn(valueType, prop);
- }
- data.setValue(index, col, values[prop]);
-
- // TODO: correctly serialize the start and end Date to the desired type (Date, String, or Number)
- }
- }
- }
- else if (links.Timeline.isArray(data)) {
- // update the original JSON table
- var row = data[index];
- if (row == undefined) {
- row = {};
- data[index] = row;
- }
-
- // merge all fields from the provided data into the current data
- for (prop in values) {
- if (values.hasOwnProperty(prop)) {
- row[prop] = values[prop];
-
- // TODO: correctly serialize the start and end Date to the desired type (Date, String, or Number)
- }
- }
- }
- else {
- throw "Cannot update data, unknown type of data";
- }
-};
-
-/**
- * Find the item index from a given HTML element
- * If no item index is found, undefined is returned
- * @param {Element} element
- * @return {Number | undefined} index
- */
-links.Timeline.prototype.getItemIndex = function(element) {
- var e = element,
- dom = this.dom,
- frame = dom.items.frame,
- items = this.items,
- index = undefined;
-
- // try to find the frame where the items are located in
- while (e.parentNode && e.parentNode !== frame) {
- e = e.parentNode;
- }
-
- if (e.parentNode === frame) {
- // yes! we have found the parent element of all items
- // retrieve its id from the array with items
- for (var i = 0, iMax = items.length; i < iMax; i++) {
- if (items[i].dom === e) {
- index = i;
- break;
- }
- }
- }
-
- return index;
-};
-
-/**
- * Set a new size for the timeline
- * @param {string} width Width in pixels or percentage (for example "800px"
- * or "50%")
- * @param {string} height Height in pixels or percentage (for example "400px"
- * or "30%")
- */
-links.Timeline.prototype.setSize = function(width, height) {
- if (width) {
- this.options.width = width;
- this.dom.frame.style.width = width;
- }
- if (height) {
- this.options.height = height;
- this.options.autoHeight = (this.options.height === "auto");
- if (height !== "auto" ) {
- this.dom.frame.style.height = height;
- }
- }
-
- this.render({
- animate: false
- });
-};
-
-
-/**
- * Set a new value for the visible range int the timeline.
- * Set start undefined to include everything from the earliest date to end.
- * Set end undefined to include everything from start to the last date.
- * Example usage:
- * myTimeline.setVisibleChartRange(new Date("2010-08-22"),
- * new Date("2010-09-13"));
- * @param {Date} start The start date for the timeline. optional
- * @param {Date} end The end date for the timeline. optional
- * @param {boolean} redraw Optional. If true (default) the Timeline is
- * directly redrawn
- */
-links.Timeline.prototype.setVisibleChartRange = function(start, end, redraw) {
- var range = {};
- if (!start || !end) {
- // retrieve the date range of the items
- range = this.getDataRange(true);
- }
-
- if (!start) {
- if (end) {
- if (range.min && range.min.valueOf() < end.valueOf()) {
- // start of the data
- start = range.min;
- }
- else {
- // 7 days before the end
- start = new Date(end.valueOf());
- start.setDate(start.getDate() - 7);
- }
- }
- else {
- // default of 3 days ago
- start = new Date();
- start.setDate(start.getDate() - 3);
- }
- }
-
- if (!end) {
- if (range.max) {
- // end of the data
- end = range.max;
- }
- else {
- // 7 days after start
- end = new Date(start.valueOf());
- end.setDate(end.getDate() + 7);
- }
- }
-
- // prevent start Date <= end Date
- if (end <= start) {
- end = new Date(start.valueOf());
- end.setDate(end.getDate() + 7);
- }
-
- // limit to the allowed range (don't let this do by applyRange,
- // because that method will try to maintain the interval (end-start)
- var min = this.options.min ? this.options.min : undefined; // date
- if (min != undefined && start.valueOf() < min.valueOf()) {
- start = new Date(min.valueOf()); // date
- }
- var max = this.options.max ? this.options.max : undefined; // date
- if (max != undefined && end.valueOf() > max.valueOf()) {
- end = new Date(max.valueOf()); // date
- }
-
- this.applyRange(start, end);
-
- if (redraw == undefined || redraw == true) {
- this.render({
- animate: false
- }); // TODO: optimize, no reflow needed
- }
- else {
- this.recalcConversion();
- }
-};
-
-
-/**
- * Change the visible chart range such that all items become visible
- */
-links.Timeline.prototype.setVisibleChartRangeAuto = function() {
- var range = this.getDataRange(true);
- this.setVisibleChartRange(range.min, range.max);
-};
-
-/**
- * Adjust the visible range such that the current time is located in the center
- * of the timeline
- */
-links.Timeline.prototype.setVisibleChartRangeNow = function() {
- var now = new Date();
-
- var diff = (this.end.valueOf() - this.start.valueOf());
-
- var startNew = new Date(now.valueOf() - diff/2);
- var endNew = new Date(startNew.valueOf() + diff);
- this.setVisibleChartRange(startNew, endNew);
-};
-
-
-/**
- * Retrieve the current visible range in the timeline.
- * @return {Object} An object with start and end properties
- */
-links.Timeline.prototype.getVisibleChartRange = function() {
- return {
- 'start': new Date(this.start.valueOf()),
- 'end': new Date(this.end.valueOf())
- };
-};
-
-/**
- * Get the date range of the items.
- * @param {boolean} [withMargin] If true, 5% of whitespace is added to the
- * left and right of the range. Default is false.
- * @return {Object} range An object with parameters min and max.
- * - {Date} min is the lowest start date of the items
- * - {Date} max is the highest start or end date of the items
- * If no data is available, the values of min and max
- * will be undefined
- */
-links.Timeline.prototype.getDataRange = function (withMargin) {
- var items = this.items,
- min = undefined, // number
- max = undefined; // number
-
- if (items) {
- for (var i = 0, iMax = items.length; i < iMax; i++) {
- var item = items[i],
- start = item.start != undefined ? item.start.valueOf() : undefined,
- end = item.end != undefined ? item.end.valueOf() : start;
-
- if (min != undefined && start != undefined) {
- min = Math.min(min.valueOf(), start.valueOf());
- }
- else {
- min = start;
- }
-
- if (max != undefined && end != undefined) {
- max = Math.max(max, end);
- }
- else {
- max = end;
- }
- }
- }
-
- if (min && max && withMargin) {
- // zoom out 5% such that you have a little white space on the left and right
- var diff = (max - min);
- min = min - diff * 0.05;
- max = max + diff * 0.05;
- }
-
- return {
- 'min': min != undefined ? new Date(min) : undefined,
- 'max': max != undefined ? new Date(max) : undefined
- };
-};
-
-/**
- * Re-render (reflow and repaint) all components of the Timeline: frame, axis,
- * items, ...
- * @param {Object} [options] Available options:
- * {boolean} renderTimesLeft Number of times the
- * render may be repeated
- * 5 times by default.
- * {boolean} animate takes options.animate
- * as default value
- */
-links.Timeline.prototype.render = function(options) {
- var frameResized = this.reflowFrame();
- var axisResized = this.reflowAxis();
- var groupsResized = this.reflowGroups();
- var itemsResized = this.reflowItems();
- var resized = (frameResized || axisResized || groupsResized || itemsResized);
-
- // TODO: only stackEvents/filterItems when resized or changed. (gives a bootstrap issue).
- // if (resized) {
- var animate = this.options.animate;
- if (options && options.animate != undefined) {
- animate = options.animate;
- }
-
- this.recalcConversion();
- this.clusterItems();
- this.filterItems();
- this.stackItems(animate);
-
- this.recalcItems();
-
- // TODO: only repaint when resized or when filterItems or stackItems gave a change?
- var needsReflow = this.repaint();
-
- // re-render once when needed (prevent endless re-render loop)
- if (needsReflow) {
- var renderTimesLeft = options ? options.renderTimesLeft : undefined;
- if (renderTimesLeft == undefined) {
- renderTimesLeft = 5;
- }
- if (renderTimesLeft > 0) {
- this.render({
- 'animate': options ? options.animate: undefined,
- 'renderTimesLeft': (renderTimesLeft - 1)
- });
- }
- }
-};
-
-/**
- * Repaint all components of the Timeline
- * @return {boolean} needsReflow Returns true if the DOM is changed such that
- * a reflow is needed.
- */
-links.Timeline.prototype.repaint = function() {
- var frameNeedsReflow = this.repaintFrame();
- var axisNeedsReflow = this.repaintAxis();
- var groupsNeedsReflow = this.repaintGroups();
- var itemsNeedsReflow = this.repaintItems();
- this.repaintCurrentTime();
- this.repaintCustomTime();
-
- return (frameNeedsReflow || axisNeedsReflow || groupsNeedsReflow || itemsNeedsReflow);
-};
-
-/**
- * Reflow the timeline frame
- * @return {boolean} resized Returns true if any of the frame elements
- * have been resized.
- */
-links.Timeline.prototype.reflowFrame = function() {
- var dom = this.dom,
- options = this.options,
- size = this.size,
- resized = false;
-
- // Note: IE7 has issues with giving frame.clientWidth, therefore I use offsetWidth instead
- var frameWidth = dom.frame ? dom.frame.offsetWidth : 0,
- frameHeight = dom.frame ? dom.frame.clientHeight : 0;
-
- resized = resized || (size.frameWidth !== frameWidth);
- resized = resized || (size.frameHeight !== frameHeight);
- size.frameWidth = frameWidth;
- size.frameHeight = frameHeight;
-
- return resized;
-};
-
-/**
- * repaint the Timeline frame
- * @return {boolean} needsReflow Returns true if the DOM is changed such that
- * a reflow is needed.
- */
-links.Timeline.prototype.repaintFrame = function() {
- var needsReflow = false,
- dom = this.dom,
- options = this.options,
- size = this.size;
-
- // main frame
- if (!dom.frame) {
- dom.frame = document.createElement("DIV");
- dom.frame.className = "timeline-frame";
- dom.frame.style.position = "relative";
- dom.frame.style.overflow = "hidden";
- dom.container.appendChild(dom.frame);
- needsReflow = true;
- }
-
- var height = options.autoHeight ?
- (size.actualHeight + "px") :
- (options.height || "100%");
- var width = options.width || "100%";
- needsReflow = needsReflow || (dom.frame.style.height != height);
- needsReflow = needsReflow || (dom.frame.style.width != width);
- dom.frame.style.height = height;
- dom.frame.style.width = width;
-
- // contents
- if (!dom.content) {
- // create content box where the axis and items will be created
- dom.content = document.createElement("DIV");
- dom.content.style.position = "relative";
- dom.content.style.overflow = "hidden";
- dom.frame.appendChild(dom.content);
-
- var timelines = document.createElement("DIV");
- timelines.style.position = "absolute";
- timelines.style.left = "0px";
- timelines.style.top = "0px";
- timelines.style.height = "100%";
- timelines.style.width = "0px";
- dom.content.appendChild(timelines);
- dom.contentTimelines = timelines;
-
- var params = this.eventParams,
- me = this;
- if (!params.onMouseDown) {
- params.onMouseDown = function (event) {me.onMouseDown(event);};
- links.Timeline.addEventListener(dom.content, "mousedown", params.onMouseDown);
- }
- if (!params.onTouchStart) {
- params.onTouchStart = function (event) {me.onTouchStart(event);};
- links.Timeline.addEventListener(dom.content, "touchstart", params.onTouchStart);
- }
- if (!params.onMouseWheel) {
- params.onMouseWheel = function (event) {me.onMouseWheel(event);};
- links.Timeline.addEventListener(dom.content, "mousewheel", params.onMouseWheel);
- }
- if (!params.onDblClick) {
- params.onDblClick = function (event) {me.onDblClick(event);};
- links.Timeline.addEventListener(dom.content, "dblclick", params.onDblClick);
- }
-
- needsReflow = true;
- }
- dom.content.style.left = size.contentLeft + "px";
- dom.content.style.top = "0px";
- dom.content.style.width = size.contentWidth + "px";
- dom.content.style.height = size.frameHeight + "px";
-
- this.repaintNavigation();
-
- return needsReflow;
-};
-
-/**
- * Reflow the timeline axis. Calculate its height, width, positioning, etc...
- * @return {boolean} resized returns true if the axis is resized
- */
-links.Timeline.prototype.reflowAxis = function() {
- var resized = false,
- dom = this.dom,
- options = this.options,
- size = this.size,
- axisDom = dom.axis;
-
- var characterMinorWidth = (axisDom && axisDom.characterMinor) ? axisDom.characterMinor.clientWidth : 0,
- characterMinorHeight = (axisDom && axisDom.characterMinor) ? axisDom.characterMinor.clientHeight : 0,
- characterMajorWidth = (axisDom && axisDom.characterMajor) ? axisDom.characterMajor.clientWidth : 0,
- characterMajorHeight = (axisDom && axisDom.characterMajor) ? axisDom.characterMajor.clientHeight : 0,
- axisHeight = (options.showMinorLabels ? characterMinorHeight : 0) +
- (options.showMajorLabels ? characterMajorHeight : 0);
-
- var axisTop = options.axisOnTop ? 0 : size.frameHeight - axisHeight,
- axisLine = options.axisOnTop ? axisHeight : axisTop;
-
- resized = resized || (size.axis.top !== axisTop);
- resized = resized || (size.axis.line !== axisLine);
- resized = resized || (size.axis.height !== axisHeight);
- size.axis.top = axisTop;
- size.axis.line = axisLine;
- size.axis.height = axisHeight;
- size.axis.labelMajorTop = options.axisOnTop ? 0 : axisLine +
- (options.showMinorLabels ? characterMinorHeight : 0);
- size.axis.labelMinorTop = options.axisOnTop ?
- (options.showMajorLabels ? characterMajorHeight : 0) :
- axisLine;
- size.axis.lineMinorTop = options.axisOnTop ? size.axis.labelMinorTop : 0;
- size.axis.lineMinorHeight = options.showMajorLabels ?
- size.frameHeight - characterMajorHeight:
- size.frameHeight;
- if (axisDom && axisDom.minorLines && axisDom.minorLines.length) {
- size.axis.lineMinorWidth = axisDom.minorLines[0].offsetWidth;
- }
- else {
- size.axis.lineMinorWidth = 1;
- }
- if (axisDom && axisDom.majorLines && axisDom.majorLines.length) {
- size.axis.lineMajorWidth = axisDom.majorLines[0].offsetWidth;
- }
- else {
- size.axis.lineMajorWidth = 1;
- }
-
- resized = resized || (size.axis.characterMinorWidth !== characterMinorWidth);
- resized = resized || (size.axis.characterMinorHeight !== characterMinorHeight);
- resized = resized || (size.axis.characterMajorWidth !== characterMajorWidth);
- resized = resized || (size.axis.characterMajorHeight !== characterMajorHeight);
- size.axis.characterMinorWidth = characterMinorWidth;
- size.axis.characterMinorHeight = characterMinorHeight;
- size.axis.characterMajorWidth = characterMajorWidth;
- size.axis.characterMajorHeight = characterMajorHeight;
-
- var contentHeight = Math.max(size.frameHeight - axisHeight, 0);
- size.contentLeft = options.groupsOnRight ? 0 : size.groupsWidth;
- size.contentWidth = Math.max(size.frameWidth - size.groupsWidth, 0);
- size.contentHeight = contentHeight;
-
- return resized;
-};
-
-/**
- * Redraw the timeline axis with minor and major labels
- * @return {boolean} needsReflow Returns true if the DOM is changed such
- * that a reflow is needed.
- */
-links.Timeline.prototype.repaintAxis = function() {
- var needsReflow = false,
- dom = this.dom,
- options = this.options,
- size = this.size,
- step = this.step;
-
- var axis = dom.axis;
- if (!axis) {
- axis = {};
- dom.axis = axis;
- }
- if (!size.axis.properties) {
- size.axis.properties = {};
- }
- if (!axis.minorTexts) {
- axis.minorTexts = [];
- }
- if (!axis.minorLines) {
- axis.minorLines = [];
- }
- if (!axis.majorTexts) {
- axis.majorTexts = [];
- }
- if (!axis.majorLines) {
- axis.majorLines = [];
- }
-
- if (!axis.frame) {
- axis.frame = document.createElement("DIV");
- axis.frame.style.position = "absolute";
- axis.frame.style.left = "0px";
- axis.frame.style.top = "0px";
- dom.content.appendChild(axis.frame);
- }
-
- // take axis offline
- dom.content.removeChild(axis.frame);
-
- axis.frame.style.width = (size.contentWidth) + "px";
- axis.frame.style.height = (size.axis.height) + "px";
-
- // the drawn axis is more wide than the actual visual part, such that
- // the axis can be dragged without having to redraw it each time again.
- var start = this.screenToTime(0);
- var end = this.screenToTime(size.contentWidth);
-
- // calculate minimum step (in milliseconds) based on character size
- if (size.axis.characterMinorWidth) {
- this.minimumStep = this.screenToTime(size.axis.characterMinorWidth * 6) -
- this.screenToTime(0);
-
- step.setRange(start, end, this.minimumStep);
- }
-
- var charsNeedsReflow = this.repaintAxisCharacters();
- needsReflow = needsReflow || charsNeedsReflow;
-
- // The current labels on the axis will be re-used (much better performance),
- // therefore, the repaintAxis method uses the mechanism with
- // repaintAxisStartOverwriting, repaintAxisEndOverwriting, and
- // this.size.axis.properties is used.
- this.repaintAxisStartOverwriting();
-
- step.start();
- var xFirstMajorLabel = undefined;
- var max = 0;
- while (!step.end() && max < 1000) {
- max++;
- var cur = step.getCurrent(),
- x = this.timeToScreen(cur),
- isMajor = step.isMajor();
-
- if (options.showMinorLabels) {
- this.repaintAxisMinorText(x, step.getLabelMinor(options));
- }
-
- if (isMajor && options.showMajorLabels) {
- if (x > 0) {
- if (xFirstMajorLabel == undefined) {
- xFirstMajorLabel = x;
- }
- this.repaintAxisMajorText(x, step.getLabelMajor(options));
- }
- this.repaintAxisMajorLine(x);
- }
- else {
- this.repaintAxisMinorLine(x);
- }
-
- step.next();
- }
-
- // create a major label on the left when needed
- if (options.showMajorLabels) {
- var leftTime = this.screenToTime(0),
- leftText = this.step.getLabelMajor(options, leftTime),
- width = leftText.length * size.axis.characterMajorWidth + 10; // upper bound estimation
-
- if (xFirstMajorLabel == undefined || width < xFirstMajorLabel) {
- this.repaintAxisMajorText(0, leftText, leftTime);
- }
- }
-
- // cleanup left over labels
- this.repaintAxisEndOverwriting();
-
- this.repaintAxisHorizontal();
-
- // put axis online
- dom.content.insertBefore(axis.frame, dom.content.firstChild);
-
- return needsReflow;
-};
-
-/**
- * Create characters used to determine the size of text on the axis
- * @return {boolean} needsReflow Returns true if the DOM is changed such that
- * a reflow is needed.
- */
-links.Timeline.prototype.repaintAxisCharacters = function () {
- // calculate the width and height of a single character
- // this is used to calculate the step size, and also the positioning of the
- // axis
- var needsReflow = false,
- dom = this.dom,
- axis = dom.axis,
- text;
-
- if (!axis.characterMinor) {
- text = document.createTextNode("0");
- var characterMinor = document.createElement("DIV");
- characterMinor.className = "timeline-axis-text timeline-axis-text-minor";
- characterMinor.appendChild(text);
- characterMinor.style.position = "absolute";
- characterMinor.style.visibility = "hidden";
- characterMinor.style.paddingLeft = "0px";
- characterMinor.style.paddingRight = "0px";
- axis.frame.appendChild(characterMinor);
-
- axis.characterMinor = characterMinor;
- needsReflow = true;
- }
-
- if (!axis.characterMajor) {
- text = document.createTextNode("0");
- var characterMajor = document.createElement("DIV");
- characterMajor.className = "timeline-axis-text timeline-axis-text-major";
- characterMajor.appendChild(text);
- characterMajor.style.position = "absolute";
- characterMajor.style.visibility = "hidden";
- characterMajor.style.paddingLeft = "0px";
- characterMajor.style.paddingRight = "0px";
- axis.frame.appendChild(characterMajor);
-
- axis.characterMajor = characterMajor;
- needsReflow = true;
- }
-
- return needsReflow;
-};
-
-/**
- * Initialize redraw of the axis. All existing labels and lines will be
- * overwritten and reused.
- */
-links.Timeline.prototype.repaintAxisStartOverwriting = function () {
- var properties = this.size.axis.properties;
-
- properties.minorTextNum = 0;
- properties.minorLineNum = 0;
- properties.majorTextNum = 0;
- properties.majorLineNum = 0;
-};
-
-/**
- * End of overwriting HTML DOM elements of the axis.
- * remaining elements will be removed
- */
-links.Timeline.prototype.repaintAxisEndOverwriting = function () {
- var dom = this.dom,
- props = this.size.axis.properties,
- frame = this.dom.axis.frame,
- num;
-
- // remove leftovers
- var minorTexts = dom.axis.minorTexts;
- num = props.minorTextNum;
- while (minorTexts.length > num) {
- var minorText = minorTexts[num];
- frame.removeChild(minorText);
- minorTexts.splice(num, 1);
- }
-
- var minorLines = dom.axis.minorLines;
- num = props.minorLineNum;
- while (minorLines.length > num) {
- var minorLine = minorLines[num];
- frame.removeChild(minorLine);
- minorLines.splice(num, 1);
- }
-
- var majorTexts = dom.axis.majorTexts;
- num = props.majorTextNum;
- while (majorTexts.length > num) {
- var majorText = majorTexts[num];
- frame.removeChild(majorText);
- majorTexts.splice(num, 1);
- }
-
- var majorLines = dom.axis.majorLines;
- num = props.majorLineNum;
- while (majorLines.length > num) {
- var majorLine = majorLines[num];
- frame.removeChild(majorLine);
- majorLines.splice(num, 1);
- }
-};
-
-/**
- * Repaint the horizontal line and background of the axis
- */
-links.Timeline.prototype.repaintAxisHorizontal = function() {
- var axis = this.dom.axis,
- size = this.size,
- options = this.options;
-
- // line behind all axis elements (possibly having a background color)
- var hasAxis = (options.showMinorLabels || options.showMajorLabels);
- if (hasAxis) {
- if (!axis.backgroundLine) {
- // create the axis line background (for a background color or so)
- var backgroundLine = document.createElement("DIV");
- backgroundLine.className = "timeline-axis";
- backgroundLine.style.position = "absolute";
- backgroundLine.style.left = "0px";
- backgroundLine.style.width = "100%";
- backgroundLine.style.border = "none";
- axis.frame.insertBefore(backgroundLine, axis.frame.firstChild);
-
- axis.backgroundLine = backgroundLine;
- }
-
- if (axis.backgroundLine) {
- axis.backgroundLine.style.top = size.axis.top + "px";
- axis.backgroundLine.style.height = size.axis.height + "px";
- }
- }
- else {
- if (axis.backgroundLine) {
- axis.frame.removeChild(axis.backgroundLine);
- delete axis.backgroundLine;
- }
- }
-
- // line before all axis elements
- if (hasAxis) {
- if (axis.line) {
- // put this line at the end of all childs
- var line = axis.frame.removeChild(axis.line);
- axis.frame.appendChild(line);
- }
- else {
- // make the axis line
- var line = document.createElement("DIV");
- line.className = "timeline-axis";
- line.style.position = "absolute";
- line.style.left = "0px";
- line.style.width = "100%";
- line.style.height = "0px";
- axis.frame.appendChild(line);
-
- axis.line = line;
- }
-
- axis.line.style.top = size.axis.line + "px";
- }
- else {
- if (axis.line && axis.line.parentElement) {
- axis.frame.removeChild(axis.line);
- delete axis.line;
- }
- }
-};
-
-/**
- * Create a minor label for the axis at position x
- * @param {Number} x
- * @param {String} text
- */
-links.Timeline.prototype.repaintAxisMinorText = function (x, text) {
- var size = this.size,
- dom = this.dom,
- props = size.axis.properties,
- frame = dom.axis.frame,
- minorTexts = dom.axis.minorTexts,
- index = props.minorTextNum,
- label;
-
- if (index < minorTexts.length) {
- label = minorTexts[index]
- }
- else {
- // create new label
- var content = document.createTextNode("");
- label = document.createElement("DIV");
- label.appendChild(content);
- label.className = "timeline-axis-text timeline-axis-text-minor";
- label.style.position = "absolute";
-
- frame.appendChild(label);
-
- minorTexts.push(label);
- }
-
- label.childNodes[0].nodeValue = text;
- label.style.left = x + "px";
- label.style.top = size.axis.labelMinorTop + "px";
- //label.title = title; // TODO: this is a heavy operation
-
- props.minorTextNum++;
-};
-
-/**
- * Create a minor line for the axis at position x
- * @param {Number} x
- */
-links.Timeline.prototype.repaintAxisMinorLine = function (x) {
- var axis = this.size.axis,
- dom = this.dom,
- props = axis.properties,
- frame = dom.axis.frame,
- minorLines = dom.axis.minorLines,
- index = props.minorLineNum,
- line;
-
- if (index < minorLines.length) {
- line = minorLines[index];
- }
- else {
- // create vertical line
- line = document.createElement("DIV");
- line.className = "timeline-axis-grid timeline-axis-grid-minor";
- line.style.position = "absolute";
- line.style.width = "0px";
-
- frame.appendChild(line);
- minorLines.push(line);
- }
-
- line.style.top = axis.lineMinorTop + "px";
- line.style.height = axis.lineMinorHeight + "px";
- line.style.left = (x - axis.lineMinorWidth/2) + "px";
-
- props.minorLineNum++;
-};
-
-/**
- * Create a Major label for the axis at position x
- * @param {Number} x
- * @param {String} text
- */
-links.Timeline.prototype.repaintAxisMajorText = function (x, text) {
- var size = this.size,
- props = size.axis.properties,
- frame = this.dom.axis.frame,
- majorTexts = this.dom.axis.majorTexts,
- index = props.majorTextNum,
- label;
-
- if (index < majorTexts.length) {
- label = majorTexts[index];
- }
- else {
- // create label
- var content = document.createTextNode(text);
- label = document.createElement("DIV");
- label.className = "timeline-axis-text timeline-axis-text-major";
- label.appendChild(content);
- label.style.position = "absolute";
- label.style.top = "0px";
-
- frame.appendChild(label);
- majorTexts.push(label);
- }
-
- label.childNodes[0].nodeValue = text;
- label.style.top = size.axis.labelMajorTop + "px";
- label.style.left = x + "px";
- //label.title = title; // TODO: this is a heavy operation
-
- props.majorTextNum ++;
-};
-
-/**
- * Create a Major line for the axis at position x
- * @param {Number} x
- */
-links.Timeline.prototype.repaintAxisMajorLine = function (x) {
- var size = this.size,
- props = size.axis.properties,
- axis = this.size.axis,
- frame = this.dom.axis.frame,
- majorLines = this.dom.axis.majorLines,
- index = props.majorLineNum,
- line;
-
- if (index < majorLines.length) {
- line = majorLines[index];
- }
- else {
- // create vertical line
- line = document.createElement("DIV");
- line.className = "timeline-axis-grid timeline-axis-grid-major";
- line.style.position = "absolute";
- line.style.top = "0px";
- line.style.width = "0px";
-
- frame.appendChild(line);
- majorLines.push(line);
- }
-
- line.style.left = (x - axis.lineMajorWidth/2) + "px";
- line.style.height = size.frameHeight + "px";
-
- props.majorLineNum ++;
-};
-
-/**
- * Reflow all items, retrieve their actual size
- * @return {boolean} resized returns true if any of the items is resized
- */
-links.Timeline.prototype.reflowItems = function() {
- var resized = false,
- i,
- iMax,
- group,
- groups = this.groups,
- renderedItems = this.renderedItems;
-
- if (groups) { // TODO: need to check if labels exists?
- // loop through all groups to reset the items height
- groups.forEach(function (group) {
- group.itemsHeight = 0;
- });
- }
-
- // loop through the width and height of all visible items
- for (i = 0, iMax = renderedItems.length; i < iMax; i++) {
- var item = renderedItems[i],
- domItem = item.dom;
- group = item.group;
-
- if (domItem) {
- // TODO: move updating width and height into item.reflow
- var width = domItem ? domItem.clientWidth : 0;
- var height = domItem ? domItem.clientHeight : 0;
- resized = resized || (item.width != width);
- resized = resized || (item.height != height);
- item.width = width;
- item.height = height;
- //item.borderWidth = (domItem.offsetWidth - domItem.clientWidth - 2) / 2; // TODO: borderWidth
- item.reflow();
- }
-
- if (group) {
- group.itemsHeight = group.itemsHeight ?
- Math.max(group.itemsHeight, item.height) :
- item.height;
- }
- }
-
- return resized;
-};
-
-/**
- * Recalculate item properties:
- * - the height of each group.
- * - the actualHeight, from the stacked items or the sum of the group heights
- * @return {boolean} resized returns true if any of the items properties is
- * changed
- */
-links.Timeline.prototype.recalcItems = function () {
- var resized = false,
- i,
- iMax,
- item,
- finalItem,
- finalItems,
- group,
- groups = this.groups,
- size = this.size,
- options = this.options,
- renderedItems = this.renderedItems;
-
- var actualHeight = 0;
- if (groups.length == 0) {
- // calculate actual height of the timeline when there are no groups
- // but stacked items
- if (options.autoHeight || options.cluster) {
- var min = 0,
- max = 0;
-
- if (this.stack && this.stack.finalItems) {
- // adjust the offset of all finalItems when the actualHeight has been changed
- finalItems = this.stack.finalItems;
- finalItem = finalItems[0];
- if (finalItem && finalItem.top) {
- min = finalItem.top;
- max = finalItem.top + finalItem.height;
- }
- for (i = 1, iMax = finalItems.length; i < iMax; i++) {
- finalItem = finalItems[i];
- min = Math.min(min, finalItem.top);
- max = Math.max(max, finalItem.top + finalItem.height);
- }
- }
- else {
- item = renderedItems[0];
- if (item && item.top) {
- min = item.top;
- max = item.top + item.height;
- }
- for (i = 1, iMax = renderedItems.length; i < iMax; i++) {
- item = renderedItems[i];
- if (item.top) {
- min = Math.min(min, item.top);
- max = Math.max(max, (item.top + item.height));
- }
- }
- }
-
- actualHeight = (max - min) + 2 * options.eventMarginAxis + size.axis.height;
- if (actualHeight < options.minHeight) {
- actualHeight = options.minHeight;
- }
-
- if (size.actualHeight != actualHeight && options.autoHeight && !options.axisOnTop) {
- // adjust the offset of all items when the actualHeight has been changed
- var diff = actualHeight - size.actualHeight;
- if (this.stack && this.stack.finalItems) {
- finalItems = this.stack.finalItems;
- for (i = 0, iMax = finalItems.length; i < iMax; i++) {
- finalItems[i].top += diff;
- finalItems[i].item.top += diff;
- }
- }
- else {
- for (i = 0, iMax = renderedItems.length; i < iMax; i++) {
- renderedItems[i].top += diff;
- }
- }
- }
- }
- }
- else {
- // loop through all groups to get the height of each group, and the
- // total height
- actualHeight = size.axis.height + 2 * options.eventMarginAxis;
- for (i = 0, iMax = groups.length; i < iMax; i++) {
- group = groups[i];
-
- var groupHeight = Math.max(group.labelHeight || 0, group.itemsHeight || 0);
- resized = resized || (groupHeight != group.height);
- group.height = groupHeight;
-
- actualHeight += groups[i].height + options.eventMargin;
- }
-
- // calculate top positions of the group labels and lines
- var eventMargin = options.eventMargin,
- top = options.axisOnTop ?
- options.eventMarginAxis + eventMargin/2 :
- size.contentHeight - options.eventMarginAxis + eventMargin/ 2,
- axisHeight = size.axis.height;
-
- for (i = 0, iMax = groups.length; i < iMax; i++) {
- group = groups[i];
- if (options.axisOnTop) {
- group.top = top + axisHeight;
- group.labelTop = top + axisHeight + (group.height - group.labelHeight) / 2;
- group.lineTop = top + axisHeight + group.height + eventMargin/2;
- top += group.height + eventMargin;
- }
- else {
- top -= group.height + eventMargin;
- group.top = top;
- group.labelTop = top + (group.height - group.labelHeight) / 2;
- group.lineTop = top - eventMargin/2;
- }
- }
-
- // calculate top position of the visible items
- for (i = 0, iMax = renderedItems.length; i < iMax; i++) {
- item = renderedItems[i];
- group = item.group;
-
- if (group) {
- item.top = group.top;
- }
- }
-
- resized = true;
- }
-
- if (actualHeight < options.minHeight) {
- actualHeight = options.minHeight;
- }
- resized = resized || (actualHeight != size.actualHeight);
- size.actualHeight = actualHeight;
-
- return resized;
-};
-
-/**
- * This method clears the (internal) array this.items in a safe way: neatly
- * cleaning up the DOM, and accompanying arrays this.renderedItems and
- * the created clusters.
- */
-links.Timeline.prototype.clearItems = function() {
- // add all visible items to the list to be hidden
- var hideItems = this.renderQueue.hide;
- this.renderedItems.forEach(function (item) {
- hideItems.push(item);
- });
-
- // clear the cluster generator
- this.clusterGenerator.clear();
-
- // actually clear the items
- this.items = [];
-};
-
-/**
- * Repaint all items
- * @return {boolean} needsReflow Returns true if the DOM is changed such that
- * a reflow is needed.
- */
-links.Timeline.prototype.repaintItems = function() {
- var i, iMax, item, index;
-
- var needsReflow = false,
- dom = this.dom,
- size = this.size,
- timeline = this,
- renderedItems = this.renderedItems;
-
- if (!dom.items) {
- dom.items = {};
- }
-
- // draw the frame containing the items
- var frame = dom.items.frame;
- if (!frame) {
- frame = document.createElement("DIV");
- frame.style.position = "relative";
- dom.content.appendChild(frame);
- dom.items.frame = frame;
- }
-
- frame.style.left = "0px";
- frame.style.top = size.items.top + "px";
- frame.style.height = "0px";
-
- // Take frame offline (for faster manipulation of the DOM)
- dom.content.removeChild(frame);
-
- // process the render queue with changes
- var queue = this.renderQueue;
- var newImageUrls = [];
- needsReflow = needsReflow ||
- (queue.show.length > 0) ||
- (queue.update.length > 0) ||
- (queue.hide.length > 0); // TODO: reflow needed on hide of items?
-
- while (item = queue.show.shift()) {
- item.showDOM(frame);
- item.getImageUrls(newImageUrls);
- renderedItems.push(item);
- }
- while (item = queue.update.shift()) {
- item.updateDOM(frame);
- item.getImageUrls(newImageUrls);
- index = this.renderedItems.indexOf(item);
- if (index == -1) {
- renderedItems.push(item);
- }
- }
- while (item = queue.hide.shift()) {
- item.hideDOM(frame);
- index = this.renderedItems.indexOf(item);
- if (index != -1) {
- renderedItems.splice(index, 1);
- }
- }
-
- // reposition all visible items
- renderedItems.forEach(function (item) {
- item.updatePosition(timeline);
- });
-
- // redraw the delete button and dragareas of the selected item (if any)
- this.repaintDeleteButton();
- this.repaintDragAreas();
-
- // put frame online again
- dom.content.appendChild(frame);
-
- if (newImageUrls.length) {
- // retrieve all image sources from the items, and set a callback once
- // all images are retrieved
- var callback = function () {
- timeline.render();
- };
- var sendCallbackWhenAlreadyLoaded = false;
- links.imageloader.loadAll(newImageUrls, callback, sendCallbackWhenAlreadyLoaded);
- }
-
- return needsReflow;
-};
-
-/**
- * Reflow the size of the groups
- * @return {boolean} resized Returns true if any of the frame elements
- * have been resized.
- */
-links.Timeline.prototype.reflowGroups = function() {
- var resized = false,
- options = this.options,
- size = this.size,
- dom = this.dom;
-
- // calculate the groups width and height
- // TODO: only update when data is changed! -> use an updateSeq
- var groupsWidth = 0;
-
- // loop through all groups to get the labels width and height
- var groups = this.groups;
- var labels = this.dom.groups ? this.dom.groups.labels : [];
- for (var i = 0, iMax = groups.length; i < iMax; i++) {
- var group = groups[i];
- var label = labels[i];
- group.labelWidth = label ? label.clientWidth : 0;
- group.labelHeight = label ? label.clientHeight : 0;
- group.width = group.labelWidth; // TODO: group.width is redundant with labelWidth
-
- groupsWidth = Math.max(groupsWidth, group.width);
- }
-
- // limit groupsWidth to the groups width in the options
- if (options.groupsWidth !== undefined) {
- groupsWidth = dom.groups.frame ? dom.groups.frame.clientWidth : 0;
- }
-
- // compensate for the border width. TODO: calculate the real border width
- groupsWidth += 1;
-
- var groupsLeft = options.groupsOnRight ? size.frameWidth - groupsWidth : 0;
- resized = resized || (size.groupsWidth !== groupsWidth);
- resized = resized || (size.groupsLeft !== groupsLeft);
- size.groupsWidth = groupsWidth;
- size.groupsLeft = groupsLeft;
-
- return resized;
-};
-
-/**
- * Redraw the group labels
- */
-links.Timeline.prototype.repaintGroups = function() {
- var dom = this.dom,
- timeline = this,
- options = this.options,
- size = this.size,
- groups = this.groups;
-
- if (dom.groups === undefined) {
- dom.groups = {};
- }
-
- var labels = dom.groups.labels;
- if (!labels) {
- labels = [];
- dom.groups.labels = labels;
- }
- var labelLines = dom.groups.labelLines;
- if (!labelLines) {
- labelLines = [];
- dom.groups.labelLines = labelLines;
- }
- var itemLines = dom.groups.itemLines;
- if (!itemLines) {
- itemLines = [];
- dom.groups.itemLines = itemLines;
- }
-
- // create the frame for holding the groups
- var frame = dom.groups.frame;
- if (!frame) {
- frame = document.createElement("DIV");
- frame.className = "timeline-groups-axis";
- frame.style.position = "absolute";
- frame.style.overflow = "hidden";
- frame.style.top = "0px";
- frame.style.height = "100%";
-
- dom.frame.appendChild(frame);
- dom.groups.frame = frame;
- }
-
- frame.style.left = size.groupsLeft + "px";
- frame.style.width = (options.groupsWidth !== undefined) ?
- options.groupsWidth :
- size.groupsWidth + "px";
-
- // hide groups axis when there are no groups
- if (groups.length == 0) {
- frame.style.display = 'none';
- }
- else {
- frame.style.display = '';
- }
-
- // TODO: only create/update groups when data is changed.
-
- // create the items
- var current = labels.length,
- needed = groups.length;
-
- // overwrite existing group labels
- for (var i = 0, iMax = Math.min(current, needed); i < iMax; i++) {
- var group = groups[i];
- var label = labels[i];
- label.innerHTML = this.getGroupName(group);
- label.style.display = '';
- }
-
- // append new items when needed
- for (var i = current; i < needed; i++) {
- var group = groups[i];
-
- // create text label
- var label = document.createElement("DIV");
- label.className = "timeline-groups-text";
- label.style.position = "absolute";
- if (options.groupsWidth === undefined) {
- label.style.whiteSpace = "nowrap";
- }
- label.innerHTML = this.getGroupName(group);
- frame.appendChild(label);
- labels[i] = label;
-
- // create the grid line between the group labels
- var labelLine = document.createElement("DIV");
- labelLine.className = "timeline-axis-grid timeline-axis-grid-minor";
- labelLine.style.position = "absolute";
- labelLine.style.left = "0px";
- labelLine.style.width = "100%";
- labelLine.style.height = "0px";
- labelLine.style.borderTopStyle = "solid";
- frame.appendChild(labelLine);
- labelLines[i] = labelLine;
-
- // create the grid line between the items
- var itemLine = document.createElement("DIV");
- itemLine.className = "timeline-axis-grid timeline-axis-grid-minor";
- itemLine.style.position = "absolute";
- itemLine.style.left = "0px";
- itemLine.style.width = "100%";
- itemLine.style.height = "0px";
- itemLine.style.borderTopStyle = "solid";
- dom.content.insertBefore(itemLine, dom.content.firstChild);
- itemLines[i] = itemLine;
- }
-
- // remove redundant items from the DOM when needed
- for (var i = needed; i < current; i++) {
- var label = labels[i],
- labelLine = labelLines[i],
- itemLine = itemLines[i];
-
- frame.removeChild(label);
- frame.removeChild(labelLine);
- dom.content.removeChild(itemLine);
- }
- labels.splice(needed, current - needed);
- labelLines.splice(needed, current - needed);
- itemLines.splice(needed, current - needed);
-
- frame.style.borderStyle = options.groupsOnRight ?
- "none none none solid" :
- "none solid none none";
-
- // position the groups
- for (var i = 0, iMax = groups.length; i < iMax; i++) {
- var group = groups[i],
- label = labels[i],
- labelLine = labelLines[i],
- itemLine = itemLines[i];
-
- label.style.top = group.labelTop + "px";
- labelLine.style.top = group.lineTop + "px";
- itemLine.style.top = group.lineTop + "px";
- itemLine.style.width = size.contentWidth + "px";
- }
-
- if (!dom.groups.background) {
- // create the axis grid line background
- var background = document.createElement("DIV");
- background.className = "timeline-axis";
- background.style.position = "absolute";
- background.style.left = "0px";
- background.style.width = "100%";
- background.style.border = "none";
-
- frame.appendChild(background);
- dom.groups.background = background;
- }
- dom.groups.background.style.top = size.axis.top + 'px';
- dom.groups.background.style.height = size.axis.height + 'px';
-
- if (!dom.groups.line) {
- // create the axis grid line
- var line = document.createElement("DIV");
- line.className = "timeline-axis";
- line.style.position = "absolute";
- line.style.left = "0px";
- line.style.width = "100%";
- line.style.height = "0px";
-
- frame.appendChild(line);
- dom.groups.line = line;
- }
- dom.groups.line.style.top = size.axis.line + 'px';
-
- // create a callback when there are images which are not yet loaded
- // TODO: more efficiently load images in the groups
- if (dom.groups.frame && groups.length) {
- var imageUrls = [];
- links.imageloader.filterImageUrls(dom.groups.frame, imageUrls);
- if (imageUrls.length) {
- // retrieve all image sources from the items, and set a callback once
- // all images are retrieved
- var callback = function () {
- timeline.render();
- };
- var sendCallbackWhenAlreadyLoaded = false;
- links.imageloader.loadAll(imageUrls, callback, sendCallbackWhenAlreadyLoaded);
- }
- }
-};
-
-
-/**
- * Redraw the current time bar
- */
-links.Timeline.prototype.repaintCurrentTime = function() {
- var options = this.options,
- dom = this.dom,
- size = this.size;
-
- if (!options.showCurrentTime) {
- if (dom.currentTime) {
- dom.contentTimelines.removeChild(dom.currentTime);
- delete dom.currentTime;
- }
-
- return;
- }
-
- if (!dom.currentTime) {
- // create the current time bar
- var currentTime = document.createElement("DIV");
- currentTime.className = "timeline-currenttime";
- currentTime.style.position = "absolute";
- currentTime.style.top = "0px";
- currentTime.style.height = "100%";
-
- dom.contentTimelines.appendChild(currentTime);
- dom.currentTime = currentTime;
- }
-
- var now = new Date();
- var nowOffset = new Date(now.valueOf() + this.clientTimeOffset);
- var x = this.timeToScreen(nowOffset);
-
- var visible = (x > -size.contentWidth && x < 2 * size.contentWidth);
- dom.currentTime.style.display = visible ? '' : 'none';
- dom.currentTime.style.left = x + "px";
- dom.currentTime.title = "Current time: " + nowOffset;
-
- // start a timer to adjust for the new time
- if (this.currentTimeTimer != undefined) {
- clearTimeout(this.currentTimeTimer);
- delete this.currentTimeTimer;
- }
- var timeline = this;
- var onTimeout = function() {
- timeline.repaintCurrentTime();
- };
- // the time equal to the width of one pixel, divided by 2 for more smoothness
- var interval = 1 / this.conversion.factor / 2;
- if (interval < 30) interval = 30;
- this.currentTimeTimer = setTimeout(onTimeout, interval);
-};
-
-/**
- * Redraw the custom time bar
- */
-links.Timeline.prototype.repaintCustomTime = function() {
- var options = this.options,
- dom = this.dom,
- size = this.size;
-
- if (!options.showCustomTime) {
- if (dom.customTime) {
- dom.contentTimelines.removeChild(dom.customTime);
- delete dom.customTime;
- }
-
- return;
- }
-
- if (!dom.customTime) {
- var customTime = document.createElement("DIV");
- customTime.className = "timeline-customtime";
- customTime.style.position = "absolute";
- customTime.style.top = "0px";
- customTime.style.height = "100%";
-
- var drag = document.createElement("DIV");
- drag.style.position = "relative";
- drag.style.top = "0px";
- drag.style.left = "-10px";
- drag.style.height = "100%";
- drag.style.width = "20px";
- customTime.appendChild(drag);
-
- dom.contentTimelines.appendChild(customTime);
- dom.customTime = customTime;
-
- // initialize parameter
- this.customTime = new Date();
- }
-
- var x = this.timeToScreen(this.customTime),
- visible = (x > -size.contentWidth && x < 2 * size.contentWidth);
- dom.customTime.style.display = visible ? '' : 'none';
- dom.customTime.style.left = x + "px";
- dom.customTime.title = "Time: " + this.customTime;
-};
-
-
-/**
- * Redraw the delete button, on the top right of the currently selected item
- * if there is no item selected, the button is hidden.
- */
-links.Timeline.prototype.repaintDeleteButton = function () {
- var timeline = this,
- dom = this.dom,
- frame = dom.items.frame;
-
- var deleteButton = dom.items.deleteButton;
- if (!deleteButton) {
- // create a delete button
- deleteButton = document.createElement("DIV");
- deleteButton.className = "timeline-navigation-delete";
- deleteButton.style.position = "absolute";
-
- frame.appendChild(deleteButton);
- dom.items.deleteButton = deleteButton;
- }
-
- var index = this.selection ? this.selection.index : -1,
- item = this.selection ? this.items[index] : undefined;
- if (item && item.rendered && this.isEditable(item)) {
- var right = item.getRight(this),
- top = item.top;
-
- deleteButton.style.left = right + 'px';
- deleteButton.style.top = top + 'px';
- deleteButton.style.display = '';
- frame.removeChild(deleteButton);
- frame.appendChild(deleteButton);
- }
- else {
- deleteButton.style.display = 'none';
- }
-};
-
-
-/**
- * Redraw the drag areas. When an item (ranges only) is selected,
- * it gets a drag area on the left and right side, to change its width
- */
-links.Timeline.prototype.repaintDragAreas = function () {
- var timeline = this,
- options = this.options,
- dom = this.dom,
- frame = this.dom.items.frame;
-
- // create left drag area
- var dragLeft = dom.items.dragLeft;
- if (!dragLeft) {
- dragLeft = document.createElement("DIV");
- dragLeft.className="timeline-event-range-drag-left";
- dragLeft.style.position = "absolute";
-
- frame.appendChild(dragLeft);
- dom.items.dragLeft = dragLeft;
- }
-
- // create right drag area
- var dragRight = dom.items.dragRight;
- if (!dragRight) {
- dragRight = document.createElement("DIV");
- dragRight.className="timeline-event-range-drag-right";
- dragRight.style.position = "absolute";
-
- frame.appendChild(dragRight);
- dom.items.dragRight = dragRight;
- }
-
- // reposition left and right drag area
- var index = this.selection ? this.selection.index : -1,
- item = this.selection ? this.items[index] : undefined;
- if (item && item.rendered && this.isEditable(item) &&
- (item instanceof links.Timeline.ItemRange)) {
- var left = this.timeToScreen(item.start),
- right = this.timeToScreen(item.end),
- top = item.top,
- height = item.height;
-
- dragLeft.style.left = left + 'px';
- dragLeft.style.top = top + 'px';
- dragLeft.style.width = options.dragAreaWidth + "px";
- dragLeft.style.height = height + 'px';
- dragLeft.style.display = '';
- frame.removeChild(dragLeft);
- frame.appendChild(dragLeft);
-
- dragRight.style.left = (right - options.dragAreaWidth) + 'px';
- dragRight.style.top = top + 'px';
- dragRight.style.width = options.dragAreaWidth + "px";
- dragRight.style.height = height + 'px';
- dragRight.style.display = '';
- frame.removeChild(dragRight);
- frame.appendChild(dragRight);
- }
- else {
- dragLeft.style.display = 'none';
- dragRight.style.display = 'none';
- }
-};
-
-/**
- * Create the navigation buttons for zooming and moving
- */
-links.Timeline.prototype.repaintNavigation = function () {
- var timeline = this,
- options = this.options,
- dom = this.dom,
- frame = dom.frame,
- navBar = dom.navBar;
-
- if (!navBar) {
- var showButtonNew = options.showButtonNew && options.editable;
- var showNavigation = options.showNavigation && (options.zoomable || options.moveable);
- if (showNavigation || showButtonNew) {
- // create a navigation bar containing the navigation buttons
- navBar = document.createElement("DIV");
- navBar.style.position = "absolute";
- navBar.className = "timeline-navigation";
- if (options.groupsOnRight) {
- navBar.style.left = '10px';
- }
- else {
- navBar.style.right = '10px';
- }
- if (options.axisOnTop) {
- navBar.style.bottom = '10px';
- }
- else {
- navBar.style.top = '10px';
- }
- dom.navBar = navBar;
- frame.appendChild(navBar);
- }
-
- if (showButtonNew) {
- // create a new in button
- navBar.addButton = document.createElement("DIV");
- navBar.addButton.className = "timeline-navigation-new";
-
- navBar.addButton.title = options.CREATE_NEW_EVENT;
- var onAdd = function(event) {
- links.Timeline.preventDefault(event);
- links.Timeline.stopPropagation(event);
-
- // create a new event at the center of the frame
- var w = timeline.size.contentWidth;
- var x = w / 2;
- var xstart = timeline.screenToTime(x - w / 10); // subtract 10% of timeline width
- var xend = timeline.screenToTime(x + w / 10); // add 10% of timeline width
- if (options.snapEvents) {
- timeline.step.snap(xstart);
- timeline.step.snap(xend);
- }
-
- var content = options.NEW;
- var group = timeline.groups.length ? timeline.groups[0].content : undefined;
- var preventRender = true;
- timeline.addItem({
- 'start': xstart,
- 'end': xend,
- 'content': content,
- 'group': group
- }, preventRender);
- var index = (timeline.items.length - 1);
- timeline.selectItem(index);
-
- timeline.applyAdd = true;
-
- // fire an add event.
- // Note that the change can be canceled from within an event listener if
- // this listener calls the method cancelAdd().
- timeline.trigger('add');
-
- if (timeline.applyAdd) {
- // render and select the item
- timeline.render({animate: false});
- timeline.selectItem(index);
- }
- else {
- // undo an add
- timeline.deleteItem(index);
- }
- };
- links.Timeline.addEventListener(navBar.addButton, "mousedown", onAdd);
- navBar.appendChild(navBar.addButton);
- }
-
- if (showButtonNew && showNavigation) {
- // create a separator line
- navBar.addButton.style.borderRightWidth = "1px";
- navBar.addButton.style.borderRightStyle = "solid";
- }
-
- if (showNavigation) {
- if (options.zoomable) {
- // create a zoom in button
- navBar.zoomInButton = document.createElement("DIV");
- navBar.zoomInButton.className = "timeline-navigation-zoom-in";
- navBar.zoomInButton.title = this.options.ZOOM_IN;
- var onZoomIn = function(event) {
- links.Timeline.preventDefault(event);
- links.Timeline.stopPropagation(event);
- timeline.zoom(0.4);
- timeline.trigger("rangechange");
- timeline.trigger("rangechanged");
- };
- links.Timeline.addEventListener(navBar.zoomInButton, "mousedown", onZoomIn);
- navBar.appendChild(navBar.zoomInButton);
-
- // create a zoom out button
- navBar.zoomOutButton = document.createElement("DIV");
- navBar.zoomOutButton.className = "timeline-navigation-zoom-out";
- navBar.zoomOutButton.title = this.options.ZOOM_OUT;
- var onZoomOut = function(event) {
- links.Timeline.preventDefault(event);
- links.Timeline.stopPropagation(event);
- timeline.zoom(-0.4);
- timeline.trigger("rangechange");
- timeline.trigger("rangechanged");
- };
- links.Timeline.addEventListener(navBar.zoomOutButton, "mousedown", onZoomOut);
- navBar.appendChild(navBar.zoomOutButton);
- }
-
- if (options.moveable) {
- // create a move left button
- navBar.moveLeftButton = document.createElement("DIV");
- navBar.moveLeftButton.className = "timeline-navigation-move-left";
- navBar.moveLeftButton.title = this.options.MOVE_LEFT;
- var onMoveLeft = function(event) {
- links.Timeline.preventDefault(event);
- links.Timeline.stopPropagation(event);
- timeline.move(-0.2);
- timeline.trigger("rangechange");
- timeline.trigger("rangechanged");
- };
- links.Timeline.addEventListener(navBar.moveLeftButton, "mousedown", onMoveLeft);
- navBar.appendChild(navBar.moveLeftButton);
-
- // create a move right button
- navBar.moveRightButton = document.createElement("DIV");
- navBar.moveRightButton.className = "timeline-navigation-move-right";
- navBar.moveRightButton.title = this.options.MOVE_RIGHT;
- var onMoveRight = function(event) {
- links.Timeline.preventDefault(event);
- links.Timeline.stopPropagation(event);
- timeline.move(0.2);
- timeline.trigger("rangechange");
- timeline.trigger("rangechanged");
- };
- links.Timeline.addEventListener(navBar.moveRightButton, "mousedown", onMoveRight);
- navBar.appendChild(navBar.moveRightButton);
- }
- }
- }
-};
-
-
-/**
- * Set current time. This function can be used to set the time in the client
- * timeline equal with the time on a server.
- * @param {Date} time
- */
-links.Timeline.prototype.setCurrentTime = function(time) {
- var now = new Date();
- this.clientTimeOffset = (time.valueOf() - now.valueOf());
-
- this.repaintCurrentTime();
-};
-
-/**
- * Get current time. The time can have an offset from the real time, when
- * the current time has been changed via the method setCurrentTime.
- * @return {Date} time
- */
-links.Timeline.prototype.getCurrentTime = function() {
- var now = new Date();
- return new Date(now.valueOf() + this.clientTimeOffset);
-};
-
-
-/**
- * Set custom time.
- * The custom time bar can be used to display events in past or future.
- * @param {Date} time
- */
-links.Timeline.prototype.setCustomTime = function(time) {
- this.customTime = new Date(time.valueOf());
- this.repaintCustomTime();
-};
-
-/**
- * Retrieve the current custom time.
- * @return {Date} customTime
- */
-links.Timeline.prototype.getCustomTime = function() {
- return new Date(this.customTime.valueOf());
-};
-
-/**
- * Set a custom scale. Autoscaling will be disabled.
- * For example setScale(SCALE.MINUTES, 5) will result
- * in minor steps of 5 minutes, and major steps of an hour.
- *
- * @param {links.Timeline.StepDate.SCALE} scale
- * A scale. Choose from SCALE.MILLISECOND,
- * SCALE.SECOND, SCALE.MINUTE, SCALE.HOUR,
- * SCALE.WEEKDAY, SCALE.DAY, SCALE.MONTH,
- * SCALE.YEAR.
- * @param {int} step A step size, by default 1. Choose for
- * example 1, 2, 5, or 10.
- */
-links.Timeline.prototype.setScale = function(scale, step) {
- this.step.setScale(scale, step);
- this.render(); // TODO: optimize: only reflow/repaint axis
-};
-
-/**
- * Enable or disable autoscaling
- * @param {boolean} enable If true or not defined, autoscaling is enabled.
- * If false, autoscaling is disabled.
- */
-links.Timeline.prototype.setAutoScale = function(enable) {
- this.step.setAutoScale(enable);
- this.render(); // TODO: optimize: only reflow/repaint axis
-};
-
-/**
- * Redraw the timeline
- * Reloads the (linked) data table and redraws the timeline when resized.
- * See also the method checkResize
- */
-links.Timeline.prototype.redraw = function() {
- this.setData(this.data);
-};
-
-
-/**
- * Check if the timeline is resized, and if so, redraw the timeline.
- * Useful when the webpage is resized.
- */
-links.Timeline.prototype.checkResize = function() {
- // TODO: re-implement the method checkResize, or better, make it redundant as this.render will be smarter
- this.render();
-};
-
-/**
- * Check whether a given item is editable
- * @param {links.Timeline.Item} item
- * @return {boolean} editable
- */
-links.Timeline.prototype.isEditable = function (item) {
- if (item) {
- if (item.editable != undefined) {
- return item.editable;
- }
- else {
- return this.options.editable;
- }
- }
- return false;
-};
-
-/**
- * Calculate the factor and offset to convert a position on screen to the
- * corresponding date and vice versa.
- * After the method calcConversionFactor is executed once, the methods screenToTime and
- * timeToScreen can be used.
- */
-links.Timeline.prototype.recalcConversion = function() {
- this.conversion.offset = this.start.valueOf();
- this.conversion.factor = this.size.contentWidth /
- (this.end.valueOf() - this.start.valueOf());
-};
-
-
-/**
- * Convert a position on screen (pixels) to a datetime
- * Before this method can be used, the method calcConversionFactor must be
- * executed once.
- * @param {int} x Position on the screen in pixels
- * @return {Date} time The datetime the corresponds with given position x
- */
-links.Timeline.prototype.screenToTime = function(x) {
- var conversion = this.conversion;
- return new Date(x / conversion.factor + conversion.offset);
-};
-
-/**
- * Convert a datetime (Date object) into a position on the screen
- * Before this method can be used, the method calcConversionFactor must be
- * executed once.
- * @param {Date} time A date
- * @return {int} x The position on the screen in pixels which corresponds
- * with the given date.
- */
-links.Timeline.prototype.timeToScreen = function(time) {
- var conversion = this.conversion;
- return (time.valueOf() - conversion.offset) * conversion.factor;
-};
-
-
-
-/**
- * Event handler for touchstart event on mobile devices
- */
-links.Timeline.prototype.onTouchStart = function(event) {
- var params = this.eventParams,
- me = this;
-
- if (params.touchDown) {
- // if already moving, return
- return;
- }
-
- params.touchDown = true;
- params.zoomed = false;
-
- this.onMouseDown(event);
-
- if (!params.onTouchMove) {
- params.onTouchMove = function (event) {me.onTouchMove(event);};
- links.Timeline.addEventListener(document, "touchmove", params.onTouchMove);
- }
- if (!params.onTouchEnd) {
- params.onTouchEnd = function (event) {me.onTouchEnd(event);};
- links.Timeline.addEventListener(document, "touchend", params.onTouchEnd);
- }
-
- /* TODO
- // check for double tap event
- var delta = 500; // ms
- var doubleTapStart = (new Date()).valueOf();
- var target = links.Timeline.getTarget(event);
- var doubleTapItem = this.getItemIndex(target);
- if (params.doubleTapStart &&
- (doubleTapStart - params.doubleTapStart) < delta &&
- doubleTapItem == params.doubleTapItem) {
- delete params.doubleTapStart;
- delete params.doubleTapItem;
- me.onDblClick(event);
- params.touchDown = false;
- }
- params.doubleTapStart = doubleTapStart;
- params.doubleTapItem = doubleTapItem;
- */
- // store timing for double taps
- var target = links.Timeline.getTarget(event);
- var item = this.getItemIndex(target);
- params.doubleTapStartPrev = params.doubleTapStart;
- params.doubleTapStart = (new Date()).valueOf();
- params.doubleTapItemPrev = params.doubleTapItem;
- params.doubleTapItem = item;
-
- links.Timeline.preventDefault(event);
-};
-
-/**
- * Event handler for touchmove event on mobile devices
- */
-links.Timeline.prototype.onTouchMove = function(event) {
- var params = this.eventParams;
-
- if (event.scale && event.scale !== 1) {
- params.zoomed = true;
- }
-
- if (!params.zoomed) {
- // move
- this.onMouseMove(event);
- }
- else {
- if (this.options.zoomable) {
- // pinch
- // TODO: pinch only supported on iPhone/iPad. Create something manually for Android?
- params.zoomed = true;
-
- var scale = event.scale,
- oldWidth = (params.end.valueOf() - params.start.valueOf()),
- newWidth = oldWidth / scale,
- diff = newWidth - oldWidth,
- start = new Date(parseInt(params.start.valueOf() - diff/2)),
- end = new Date(parseInt(params.end.valueOf() + diff/2));
-
- // TODO: determine zoom-around-date from touch positions?
-
- this.setVisibleChartRange(start, end);
- this.trigger("rangechange");
- }
- }
-
- links.Timeline.preventDefault(event);
-};
-
-/**
- * Event handler for touchend event on mobile devices
- */
-links.Timeline.prototype.onTouchEnd = function(event) {
- var params = this.eventParams;
- var me = this;
- params.touchDown = false;
-
- if (params.zoomed) {
- this.trigger("rangechanged");
- }
-
- if (params.onTouchMove) {
- links.Timeline.removeEventListener(document, "touchmove", params.onTouchMove);
- delete params.onTouchMove;
-
- }
- if (params.onTouchEnd) {
- links.Timeline.removeEventListener(document, "touchend", params.onTouchEnd);
- delete params.onTouchEnd;
- }
-
- this.onMouseUp(event);
-
- // check for double tap event
- var delta = 500; // ms
- var doubleTapEnd = (new Date()).valueOf();
- var target = links.Timeline.getTarget(event);
- var doubleTapItem = this.getItemIndex(target);
- if (params.doubleTapStartPrev &&
- (doubleTapEnd - params.doubleTapStartPrev) < delta &&
- params.doubleTapItem == params.doubleTapItemPrev) {
- params.touchDown = true;
- me.onDblClick(event);
- params.touchDown = false;
- }
-
- links.Timeline.preventDefault(event);
-};
-
-
-/**
- * Start a moving operation inside the provided parent element
- * @param {Event} event The event that occurred (required for
- * retrieving the mouse position)
- */
-links.Timeline.prototype.onMouseDown = function(event) {
- event = event || window.event;
-
- var params = this.eventParams,
- options = this.options,
- dom = this.dom;
-
- // only react on left mouse button down
- var leftButtonDown = event.which ? (event.which == 1) : (event.button == 1);
- if (!leftButtonDown && !params.touchDown) {
- return;
- }
-
- // get mouse position
- params.mouseX = links.Timeline.getPageX(event);
- params.mouseY = links.Ti
<TRUNCATED>
[12/28] CLIMATE-512 - Replace frontend with new Yeoman/Grunt/Bower
frontend
Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/js/lib/jquery/jquery-1.10.1.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/js/lib/jquery/jquery-1.10.1.js b/ocw-ui/frontend/app/js/lib/jquery/jquery-1.10.1.js
deleted file mode 100644
index 6f8c967..0000000
--- a/ocw-ui/frontend/app/js/lib/jquery/jquery-1.10.1.js
+++ /dev/null
@@ -1,9807 +0,0 @@
-/*!
- * jQuery JavaScript Library v1.10.1
- * http://jquery.com/
- *
- * Includes Sizzle.js
- * http://sizzlejs.com/
- *
- * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors
- * Released under the MIT license
- * http://jquery.org/license
- *
- * Date: 2013-05-30T21:49Z
- */
-(function( window, undefined ) {
-
-// Can't do this because several apps including ASP.NET trace
-// the stack via arguments.caller.callee and Firefox dies if
-// you try to trace through "use strict" call chains. (#13335)
-// Support: Firefox 18+
-//"use strict";
-var
- // The deferred used on DOM ready
- readyList,
-
- // A central reference to the root jQuery(document)
- rootjQuery,
-
- // Support: IE<10
- // For `typeof xmlNode.method` instead of `xmlNode.method !== undefined`
- core_strundefined = typeof undefined,
-
- // Use the correct document accordingly with window argument (sandbox)
- location = window.location,
- document = window.document,
- docElem = document.documentElement,
-
- // Map over jQuery in case of overwrite
- _jQuery = window.jQuery,
-
- // Map over the $ in case of overwrite
- _$ = window.$,
-
- // [[Class]] -> type pairs
- class2type = {},
-
- // List of deleted data cache ids, so we can reuse them
- core_deletedIds = [],
-
- core_version = "1.10.1",
-
- // Save a reference to some core methods
- core_concat = core_deletedIds.concat,
- core_push = core_deletedIds.push,
- core_slice = core_deletedIds.slice,
- core_indexOf = core_deletedIds.indexOf,
- core_toString = class2type.toString,
- core_hasOwn = class2type.hasOwnProperty,
- core_trim = core_version.trim,
-
- // Define a local copy of jQuery
- jQuery = function( selector, context ) {
- // The jQuery object is actually just the init constructor 'enhanced'
- return new jQuery.fn.init( selector, context, rootjQuery );
- },
-
- // Used for matching numbers
- core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,
-
- // Used for splitting on whitespace
- core_rnotwhite = /\S+/g,
-
- // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE)
- rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
-
- // A simple way to check for HTML strings
- // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
- // Strict HTML recognition (#11290: must start with <)
- rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
-
- // Match a standalone tag
- rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
-
- // JSON RegExp
- rvalidchars = /^[\],:{}\s]*$/,
- rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
- rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,
- rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,
-
- // Matches dashed string for camelizing
- rmsPrefix = /^-ms-/,
- rdashAlpha = /-([\da-z])/gi,
-
- // Used by jQuery.camelCase as callback to replace()
- fcamelCase = function( all, letter ) {
- return letter.toUpperCase();
- },
-
- // The ready event handler
- completed = function( event ) {
-
- // readyState === "complete" is good enough for us to call the dom ready in oldIE
- if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) {
- detach();
- jQuery.ready();
- }
- },
- // Clean-up method for dom ready events
- detach = function() {
- if ( document.addEventListener ) {
- document.removeEventListener( "DOMContentLoaded", completed, false );
- window.removeEventListener( "load", completed, false );
-
- } else {
- document.detachEvent( "onreadystatechange", completed );
- window.detachEvent( "onload", completed );
- }
- };
-
-jQuery.fn = jQuery.prototype = {
- // The current version of jQuery being used
- jquery: core_version,
-
- constructor: jQuery,
- init: function( selector, context, rootjQuery ) {
- var match, elem;
-
- // HANDLE: $(""), $(null), $(undefined), $(false)
- if ( !selector ) {
- return this;
- }
-
- // Handle HTML strings
- if ( typeof selector === "string" ) {
- if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
- // Assume that strings that start and end with <> are HTML and skip the regex check
- match = [ null, selector, null ];
-
- } else {
- match = rquickExpr.exec( selector );
- }
-
- // Match html or make sure no context is specified for #id
- if ( match && (match[1] || !context) ) {
-
- // HANDLE: $(html) -> $(array)
- if ( match[1] ) {
- context = context instanceof jQuery ? context[0] : context;
-
- // scripts is true for back-compat
- jQuery.merge( this, jQuery.parseHTML(
- match[1],
- context && context.nodeType ? context.ownerDocument || context : document,
- true
- ) );
-
- // HANDLE: $(html, props)
- if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {
- for ( match in context ) {
- // Properties of context are called as methods if possible
- if ( jQuery.isFunction( this[ match ] ) ) {
- this[ match ]( context[ match ] );
-
- // ...and otherwise set as attributes
- } else {
- this.attr( match, context[ match ] );
- }
- }
- }
-
- return this;
-
- // HANDLE: $(#id)
- } else {
- elem = document.getElementById( match[2] );
-
- // Check parentNode to catch when Blackberry 4.6 returns
- // nodes that are no longer in the document #6963
- if ( elem && elem.parentNode ) {
- // Handle the case where IE and Opera return items
- // by name instead of ID
- if ( elem.id !== match[2] ) {
- return rootjQuery.find( selector );
- }
-
- // Otherwise, we inject the element directly into the jQuery object
- this.length = 1;
- this[0] = elem;
- }
-
- this.context = document;
- this.selector = selector;
- return this;
- }
-
- // HANDLE: $(expr, $(...))
- } else if ( !context || context.jquery ) {
- return ( context || rootjQuery ).find( selector );
-
- // HANDLE: $(expr, context)
- // (which is just equivalent to: $(context).find(expr)
- } else {
- return this.constructor( context ).find( selector );
- }
-
- // HANDLE: $(DOMElement)
- } else if ( selector.nodeType ) {
- this.context = this[0] = selector;
- this.length = 1;
- return this;
-
- // HANDLE: $(function)
- // Shortcut for document ready
- } else if ( jQuery.isFunction( selector ) ) {
- return rootjQuery.ready( selector );
- }
-
- if ( selector.selector !== undefined ) {
- this.selector = selector.selector;
- this.context = selector.context;
- }
-
- return jQuery.makeArray( selector, this );
- },
-
- // Start with an empty selector
- selector: "",
-
- // The default length of a jQuery object is 0
- length: 0,
-
- toArray: function() {
- return core_slice.call( this );
- },
-
- // Get the Nth element in the matched element set OR
- // Get the whole matched element set as a clean array
- get: function( num ) {
- return num == null ?
-
- // Return a 'clean' array
- this.toArray() :
-
- // Return just the object
- ( num < 0 ? this[ this.length + num ] : this[ num ] );
- },
-
- // Take an array of elements and push it onto the stack
- // (returning the new matched element set)
- pushStack: function( elems ) {
-
- // Build a new jQuery matched element set
- var ret = jQuery.merge( this.constructor(), elems );
-
- // Add the old object onto the stack (as a reference)
- ret.prevObject = this;
- ret.context = this.context;
-
- // Return the newly-formed element set
- return ret;
- },
-
- // Execute a callback for every element in the matched set.
- // (You can seed the arguments with an array of args, but this is
- // only used internally.)
- each: function( callback, args ) {
- return jQuery.each( this, callback, args );
- },
-
- ready: function( fn ) {
- // Add the callback
- jQuery.ready.promise().done( fn );
-
- return this;
- },
-
- slice: function() {
- return this.pushStack( core_slice.apply( this, arguments ) );
- },
-
- first: function() {
- return this.eq( 0 );
- },
-
- last: function() {
- return this.eq( -1 );
- },
-
- eq: function( i ) {
- var len = this.length,
- j = +i + ( i < 0 ? len : 0 );
- return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] );
- },
-
- map: function( callback ) {
- return this.pushStack( jQuery.map(this, function( elem, i ) {
- return callback.call( elem, i, elem );
- }));
- },
-
- end: function() {
- return this.prevObject || this.constructor(null);
- },
-
- // For internal use only.
- // Behaves like an Array's method, not like a jQuery method.
- push: core_push,
- sort: [].sort,
- splice: [].splice
-};
-
-// Give the init function the jQuery prototype for later instantiation
-jQuery.fn.init.prototype = jQuery.fn;
-
-jQuery.extend = jQuery.fn.extend = function() {
- var src, copyIsArray, copy, name, options, clone,
- target = arguments[0] || {},
- i = 1,
- length = arguments.length,
- deep = false;
-
- // Handle a deep copy situation
- if ( typeof target === "boolean" ) {
- deep = target;
- target = arguments[1] || {};
- // skip the boolean and the target
- i = 2;
- }
-
- // Handle case when target is a string or something (possible in deep copy)
- if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
- target = {};
- }
-
- // extend jQuery itself if only one argument is passed
- if ( length === i ) {
- target = this;
- --i;
- }
-
- for ( ; i < length; i++ ) {
- // Only deal with non-null/undefined values
- if ( (options = arguments[ i ]) != null ) {
- // Extend the base object
- for ( name in options ) {
- src = target[ name ];
- copy = options[ name ];
-
- // Prevent never-ending loop
- if ( target === copy ) {
- continue;
- }
-
- // Recurse if we're merging plain objects or arrays
- if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
- if ( copyIsArray ) {
- copyIsArray = false;
- clone = src && jQuery.isArray(src) ? src : [];
-
- } else {
- clone = src && jQuery.isPlainObject(src) ? src : {};
- }
-
- // Never move original objects, clone them
- target[ name ] = jQuery.extend( deep, clone, copy );
-
- // Don't bring in undefined values
- } else if ( copy !== undefined ) {
- target[ name ] = copy;
- }
- }
- }
- }
-
- // Return the modified object
- return target;
-};
-
-jQuery.extend({
- // Unique for each copy of jQuery on the page
- // Non-digits removed to match rinlinejQuery
- expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ),
-
- noConflict: function( deep ) {
- if ( window.$ === jQuery ) {
- window.$ = _$;
- }
-
- if ( deep && window.jQuery === jQuery ) {
- window.jQuery = _jQuery;
- }
-
- return jQuery;
- },
-
- // Is the DOM ready to be used? Set to true once it occurs.
- isReady: false,
-
- // A counter to track how many items to wait for before
- // the ready event fires. See #6781
- readyWait: 1,
-
- // Hold (or release) the ready event
- holdReady: function( hold ) {
- if ( hold ) {
- jQuery.readyWait++;
- } else {
- jQuery.ready( true );
- }
- },
-
- // Handle when the DOM is ready
- ready: function( wait ) {
-
- // Abort if there are pending holds or we're already ready
- if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
- return;
- }
-
- // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
- if ( !document.body ) {
- return setTimeout( jQuery.ready );
- }
-
- // Remember that the DOM is ready
- jQuery.isReady = true;
-
- // If a normal DOM Ready event fired, decrement, and wait if need be
- if ( wait !== true && --jQuery.readyWait > 0 ) {
- return;
- }
-
- // If there are functions bound, to execute
- readyList.resolveWith( document, [ jQuery ] );
-
- // Trigger any bound ready events
- if ( jQuery.fn.trigger ) {
- jQuery( document ).trigger("ready").off("ready");
- }
- },
-
- // See test/unit/core.js for details concerning isFunction.
- // Since version 1.3, DOM methods and functions like alert
- // aren't supported. They return false on IE (#2968).
- isFunction: function( obj ) {
- return jQuery.type(obj) === "function";
- },
-
- isArray: Array.isArray || function( obj ) {
- return jQuery.type(obj) === "array";
- },
-
- isWindow: function( obj ) {
- /* jshint eqeqeq: false */
- return obj != null && obj == obj.window;
- },
-
- isNumeric: function( obj ) {
- return !isNaN( parseFloat(obj) ) && isFinite( obj );
- },
-
- type: function( obj ) {
- if ( obj == null ) {
- return String( obj );
- }
- return typeof obj === "object" || typeof obj === "function" ?
- class2type[ core_toString.call(obj) ] || "object" :
- typeof obj;
- },
-
- isPlainObject: function( obj ) {
- var key;
-
- // Must be an Object.
- // Because of IE, we also have to check the presence of the constructor property.
- // Make sure that DOM nodes and window objects don't pass through, as well
- if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
- return false;
- }
-
- try {
- // Not own constructor property must be Object
- if ( obj.constructor &&
- !core_hasOwn.call(obj, "constructor") &&
- !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
- return false;
- }
- } catch ( e ) {
- // IE8,9 Will throw exceptions on certain host objects #9897
- return false;
- }
-
- // Support: IE<9
- // Handle iteration over inherited properties before own properties.
- if ( jQuery.support.ownLast ) {
- for ( key in obj ) {
- return core_hasOwn.call( obj, key );
- }
- }
-
- // Own properties are enumerated firstly, so to speed up,
- // if last one is own, then all properties are own.
- for ( key in obj ) {}
-
- return key === undefined || core_hasOwn.call( obj, key );
- },
-
- isEmptyObject: function( obj ) {
- var name;
- for ( name in obj ) {
- return false;
- }
- return true;
- },
-
- error: function( msg ) {
- throw new Error( msg );
- },
-
- // data: string of html
- // context (optional): If specified, the fragment will be created in this context, defaults to document
- // keepScripts (optional): If true, will include scripts passed in the html string
- parseHTML: function( data, context, keepScripts ) {
- if ( !data || typeof data !== "string" ) {
- return null;
- }
- if ( typeof context === "boolean" ) {
- keepScripts = context;
- context = false;
- }
- context = context || document;
-
- var parsed = rsingleTag.exec( data ),
- scripts = !keepScripts && [];
-
- // Single tag
- if ( parsed ) {
- return [ context.createElement( parsed[1] ) ];
- }
-
- parsed = jQuery.buildFragment( [ data ], context, scripts );
- if ( scripts ) {
- jQuery( scripts ).remove();
- }
- return jQuery.merge( [], parsed.childNodes );
- },
-
- parseJSON: function( data ) {
- // Attempt to parse using the native JSON parser first
- if ( window.JSON && window.JSON.parse ) {
- return window.JSON.parse( data );
- }
-
- if ( data === null ) {
- return data;
- }
-
- if ( typeof data === "string" ) {
-
- // Make sure leading/trailing whitespace is removed (IE can't handle it)
- data = jQuery.trim( data );
-
- if ( data ) {
- // Make sure the incoming data is actual JSON
- // Logic borrowed from http://json.org/json2.js
- if ( rvalidchars.test( data.replace( rvalidescape, "@" )
- .replace( rvalidtokens, "]" )
- .replace( rvalidbraces, "")) ) {
-
- return ( new Function( "return " + data ) )();
- }
- }
- }
-
- jQuery.error( "Invalid JSON: " + data );
- },
-
- // Cross-browser xml parsing
- parseXML: function( data ) {
- var xml, tmp;
- if ( !data || typeof data !== "string" ) {
- return null;
- }
- try {
- if ( window.DOMParser ) { // Standard
- tmp = new DOMParser();
- xml = tmp.parseFromString( data , "text/xml" );
- } else { // IE
- xml = new ActiveXObject( "Microsoft.XMLDOM" );
- xml.async = "false";
- xml.loadXML( data );
- }
- } catch( e ) {
- xml = undefined;
- }
- if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
- jQuery.error( "Invalid XML: " + data );
- }
- return xml;
- },
-
- noop: function() {},
-
- // Evaluates a script in a global context
- // Workarounds based on findings by Jim Driscoll
- // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
- globalEval: function( data ) {
- if ( data && jQuery.trim( data ) ) {
- // We use execScript on Internet Explorer
- // We use an anonymous function so that context is window
- // rather than jQuery in Firefox
- ( window.execScript || function( data ) {
- window[ "eval" ].call( window, data );
- } )( data );
- }
- },
-
- // Convert dashed to camelCase; used by the css and data modules
- // Microsoft forgot to hump their vendor prefix (#9572)
- camelCase: function( string ) {
- return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
- },
-
- nodeName: function( elem, name ) {
- return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
- },
-
- // args is for internal usage only
- each: function( obj, callback, args ) {
- var value,
- i = 0,
- length = obj.length,
- isArray = isArraylike( obj );
-
- if ( args ) {
- if ( isArray ) {
- for ( ; i < length; i++ ) {
- value = callback.apply( obj[ i ], args );
-
- if ( value === false ) {
- break;
- }
- }
- } else {
- for ( i in obj ) {
- value = callback.apply( obj[ i ], args );
-
- if ( value === false ) {
- break;
- }
- }
- }
-
- // A special, fast, case for the most common use of each
- } else {
- if ( isArray ) {
- for ( ; i < length; i++ ) {
- value = callback.call( obj[ i ], i, obj[ i ] );
-
- if ( value === false ) {
- break;
- }
- }
- } else {
- for ( i in obj ) {
- value = callback.call( obj[ i ], i, obj[ i ] );
-
- if ( value === false ) {
- break;
- }
- }
- }
- }
-
- return obj;
- },
-
- // Use native String.trim function wherever possible
- trim: core_trim && !core_trim.call("\uFEFF\xA0") ?
- function( text ) {
- return text == null ?
- "" :
- core_trim.call( text );
- } :
-
- // Otherwise use our own trimming functionality
- function( text ) {
- return text == null ?
- "" :
- ( text + "" ).replace( rtrim, "" );
- },
-
- // results is for internal usage only
- makeArray: function( arr, results ) {
- var ret = results || [];
-
- if ( arr != null ) {
- if ( isArraylike( Object(arr) ) ) {
- jQuery.merge( ret,
- typeof arr === "string" ?
- [ arr ] : arr
- );
- } else {
- core_push.call( ret, arr );
- }
- }
-
- return ret;
- },
-
- inArray: function( elem, arr, i ) {
- var len;
-
- if ( arr ) {
- if ( core_indexOf ) {
- return core_indexOf.call( arr, elem, i );
- }
-
- len = arr.length;
- i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
-
- for ( ; i < len; i++ ) {
- // Skip accessing in sparse arrays
- if ( i in arr && arr[ i ] === elem ) {
- return i;
- }
- }
- }
-
- return -1;
- },
-
- merge: function( first, second ) {
- var l = second.length,
- i = first.length,
- j = 0;
-
- if ( typeof l === "number" ) {
- for ( ; j < l; j++ ) {
- first[ i++ ] = second[ j ];
- }
- } else {
- while ( second[j] !== undefined ) {
- first[ i++ ] = second[ j++ ];
- }
- }
-
- first.length = i;
-
- return first;
- },
-
- grep: function( elems, callback, inv ) {
- var retVal,
- ret = [],
- i = 0,
- length = elems.length;
- inv = !!inv;
-
- // Go through the array, only saving the items
- // that pass the validator function
- for ( ; i < length; i++ ) {
- retVal = !!callback( elems[ i ], i );
- if ( inv !== retVal ) {
- ret.push( elems[ i ] );
- }
- }
-
- return ret;
- },
-
- // arg is for internal usage only
- map: function( elems, callback, arg ) {
- var value,
- i = 0,
- length = elems.length,
- isArray = isArraylike( elems ),
- ret = [];
-
- // Go through the array, translating each of the items to their
- if ( isArray ) {
- for ( ; i < length; i++ ) {
- value = callback( elems[ i ], i, arg );
-
- if ( value != null ) {
- ret[ ret.length ] = value;
- }
- }
-
- // Go through every key on the object,
- } else {
- for ( i in elems ) {
- value = callback( elems[ i ], i, arg );
-
- if ( value != null ) {
- ret[ ret.length ] = value;
- }
- }
- }
-
- // Flatten any nested arrays
- return core_concat.apply( [], ret );
- },
-
- // A global GUID counter for objects
- guid: 1,
-
- // Bind a function to a context, optionally partially applying any
- // arguments.
- proxy: function( fn, context ) {
- var args, proxy, tmp;
-
- if ( typeof context === "string" ) {
- tmp = fn[ context ];
- context = fn;
- fn = tmp;
- }
-
- // Quick check to determine if target is callable, in the spec
- // this throws a TypeError, but we will just return undefined.
- if ( !jQuery.isFunction( fn ) ) {
- return undefined;
- }
-
- // Simulated bind
- args = core_slice.call( arguments, 2 );
- proxy = function() {
- return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) );
- };
-
- // Set the guid of unique handler to the same of original handler, so it can be removed
- proxy.guid = fn.guid = fn.guid || jQuery.guid++;
-
- return proxy;
- },
-
- // Multifunctional method to get and set values of a collection
- // The value/s can optionally be executed if it's a function
- access: function( elems, fn, key, value, chainable, emptyGet, raw ) {
- var i = 0,
- length = elems.length,
- bulk = key == null;
-
- // Sets many values
- if ( jQuery.type( key ) === "object" ) {
- chainable = true;
- for ( i in key ) {
- jQuery.access( elems, fn, i, key[i], true, emptyGet, raw );
- }
-
- // Sets one value
- } else if ( value !== undefined ) {
- chainable = true;
-
- if ( !jQuery.isFunction( value ) ) {
- raw = true;
- }
-
- if ( bulk ) {
- // Bulk operations run against the entire set
- if ( raw ) {
- fn.call( elems, value );
- fn = null;
-
- // ...except when executing function values
- } else {
- bulk = fn;
- fn = function( elem, key, value ) {
- return bulk.call( jQuery( elem ), value );
- };
- }
- }
-
- if ( fn ) {
- for ( ; i < length; i++ ) {
- fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );
- }
- }
- }
-
- return chainable ?
- elems :
-
- // Gets
- bulk ?
- fn.call( elems ) :
- length ? fn( elems[0], key ) : emptyGet;
- },
-
- now: function() {
- return ( new Date() ).getTime();
- },
-
- // A method for quickly swapping in/out CSS properties to get correct calculations.
- // Note: this method belongs to the css module but it's needed here for the support module.
- // If support gets modularized, this method should be moved back to the css module.
- swap: function( elem, options, callback, args ) {
- var ret, name,
- old = {};
-
- // Remember the old values, and insert the new ones
- for ( name in options ) {
- old[ name ] = elem.style[ name ];
- elem.style[ name ] = options[ name ];
- }
-
- ret = callback.apply( elem, args || [] );
-
- // Revert the old values
- for ( name in options ) {
- elem.style[ name ] = old[ name ];
- }
-
- return ret;
- }
-});
-
-jQuery.ready.promise = function( obj ) {
- if ( !readyList ) {
-
- readyList = jQuery.Deferred();
-
- // Catch cases where $(document).ready() is called after the browser event has already occurred.
- // we once tried to use readyState "interactive" here, but it caused issues like the one
- // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
- if ( document.readyState === "complete" ) {
- // Handle it asynchronously to allow scripts the opportunity to delay ready
- setTimeout( jQuery.ready );
-
- // Standards-based browsers support DOMContentLoaded
- } else if ( document.addEventListener ) {
- // Use the handy event callback
- document.addEventListener( "DOMContentLoaded", completed, false );
-
- // A fallback to window.onload, that will always work
- window.addEventListener( "load", completed, false );
-
- // If IE event model is used
- } else {
- // Ensure firing before onload, maybe late but safe also for iframes
- document.attachEvent( "onreadystatechange", completed );
-
- // A fallback to window.onload, that will always work
- window.attachEvent( "onload", completed );
-
- // If IE and not a frame
- // continually check to see if the document is ready
- var top = false;
-
- try {
- top = window.frameElement == null && document.documentElement;
- } catch(e) {}
-
- if ( top && top.doScroll ) {
- (function doScrollCheck() {
- if ( !jQuery.isReady ) {
-
- try {
- // Use the trick by Diego Perini
- // http://javascript.nwbox.com/IEContentLoaded/
- top.doScroll("left");
- } catch(e) {
- return setTimeout( doScrollCheck, 50 );
- }
-
- // detach all dom ready events
- detach();
-
- // and execute any waiting functions
- jQuery.ready();
- }
- })();
- }
- }
- }
- return readyList.promise( obj );
-};
-
-// Populate the class2type map
-jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) {
- class2type[ "[object " + name + "]" ] = name.toLowerCase();
-});
-
-function isArraylike( obj ) {
- var length = obj.length,
- type = jQuery.type( obj );
-
- if ( jQuery.isWindow( obj ) ) {
- return false;
- }
-
- if ( obj.nodeType === 1 && length ) {
- return true;
- }
-
- return type === "array" || type !== "function" &&
- ( length === 0 ||
- typeof length === "number" && length > 0 && ( length - 1 ) in obj );
-}
-
-// All jQuery objects should point back to these
-rootjQuery = jQuery(document);
-/*!
- * Sizzle CSS Selector Engine v1.9.4-pre
- * http://sizzlejs.com/
- *
- * Copyright 2013 jQuery Foundation, Inc. and other contributors
- * Released under the MIT license
- * http://jquery.org/license
- *
- * Date: 2013-05-27
- */
-(function( window, undefined ) {
-
-var i,
- support,
- cachedruns,
- Expr,
- getText,
- isXML,
- compile,
- outermostContext,
- sortInput,
-
- // Local document vars
- setDocument,
- document,
- docElem,
- documentIsHTML,
- rbuggyQSA,
- rbuggyMatches,
- matches,
- contains,
-
- // Instance-specific data
- expando = "sizzle" + -(new Date()),
- preferredDoc = window.document,
- dirruns = 0,
- done = 0,
- classCache = createCache(),
- tokenCache = createCache(),
- compilerCache = createCache(),
- hasDuplicate = false,
- sortOrder = function() { return 0; },
-
- // General-purpose constants
- strundefined = typeof undefined,
- MAX_NEGATIVE = 1 << 31,
-
- // Instance methods
- hasOwn = ({}).hasOwnProperty,
- arr = [],
- pop = arr.pop,
- push_native = arr.push,
- push = arr.push,
- slice = arr.slice,
- // Use a stripped-down indexOf if we can't use a native one
- indexOf = arr.indexOf || function( elem ) {
- var i = 0,
- len = this.length;
- for ( ; i < len; i++ ) {
- if ( this[i] === elem ) {
- return i;
- }
- }
- return -1;
- },
-
- booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
-
- // Regular expressions
-
- // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace
- whitespace = "[\\x20\\t\\r\\n\\f]",
- // http://www.w3.org/TR/css3-syntax/#characters
- characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
-
- // Loosely modeled on CSS identifier characters
- // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors
- // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
- identifier = characterEncoding.replace( "w", "w#" ),
-
- // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors
- attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace +
- "*(?:([*^$|!~]?=)" + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]",
-
- // Prefer arguments quoted,
- // then not containing pseudos/brackets,
- // then attribute selectors/non-parenthetical expressions,
- // then anything else
- // These preferences are here to reduce the number of selectors
- // needing tokenize in the PSEUDO preFilter
- pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)",
-
- // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
- rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
-
- rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
- rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
-
- rsibling = new RegExp( whitespace + "*[+~]" ),
- rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*)" + whitespace + "*\\]", "g" ),
-
- rpseudo = new RegExp( pseudos ),
- ridentifier = new RegExp( "^" + identifier + "$" ),
-
- matchExpr = {
- "ID": new RegExp( "^#(" + characterEncoding + ")" ),
- "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ),
- "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),
- "ATTR": new RegExp( "^" + attributes ),
- "PSEUDO": new RegExp( "^" + pseudos ),
- "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
- "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
- "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
- "bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
- // For use in libraries implementing .is()
- // We use this for POS matching in `select`
- "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
- whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
- },
-
- rnative = /^[^{]+\{\s*\[native \w/,
-
- // Easily-parseable/retrievable ID or TAG or CLASS selectors
- rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
-
- rinputs = /^(?:input|select|textarea|button)$/i,
- rheader = /^h\d$/i,
-
- rescape = /'|\\/g,
-
- // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
- runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
- funescape = function( _, escaped, escapedWhitespace ) {
- var high = "0x" + escaped - 0x10000;
- // NaN means non-codepoint
- // Support: Firefox
- // Workaround erroneous numeric interpretation of +"0x"
- return high !== high || escapedWhitespace ?
- escaped :
- // BMP codepoint
- high < 0 ?
- String.fromCharCode( high + 0x10000 ) :
- // Supplemental Plane codepoint (surrogate pair)
- String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
- };
-
-// Optimize for push.apply( _, NodeList )
-try {
- push.apply(
- (arr = slice.call( preferredDoc.childNodes )),
- preferredDoc.childNodes
- );
- // Support: Android<4.0
- // Detect silently failing push.apply
- arr[ preferredDoc.childNodes.length ].nodeType;
-} catch ( e ) {
- push = { apply: arr.length ?
-
- // Leverage slice if possible
- function( target, els ) {
- push_native.apply( target, slice.call(els) );
- } :
-
- // Support: IE<9
- // Otherwise append directly
- function( target, els ) {
- var j = target.length,
- i = 0;
- // Can't trust NodeList.length
- while ( (target[j++] = els[i++]) ) {}
- target.length = j - 1;
- }
- };
-}
-
-function Sizzle( selector, context, results, seed ) {
- var match, elem, m, nodeType,
- // QSA vars
- i, groups, old, nid, newContext, newSelector;
-
- if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
- setDocument( context );
- }
-
- context = context || document;
- results = results || [];
-
- if ( !selector || typeof selector !== "string" ) {
- return results;
- }
-
- if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) {
- return [];
- }
-
- if ( documentIsHTML && !seed ) {
-
- // Shortcuts
- if ( (match = rquickExpr.exec( selector )) ) {
- // Speed-up: Sizzle("#ID")
- if ( (m = match[1]) ) {
- if ( nodeType === 9 ) {
- elem = context.getElementById( m );
- // Check parentNode to catch when Blackberry 4.6 returns
- // nodes that are no longer in the document #6963
- if ( elem && elem.parentNode ) {
- // Handle the case where IE, Opera, and Webkit return items
- // by name instead of ID
- if ( elem.id === m ) {
- results.push( elem );
- return results;
- }
- } else {
- return results;
- }
- } else {
- // Context is not a document
- if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
- contains( context, elem ) && elem.id === m ) {
- results.push( elem );
- return results;
- }
- }
-
- // Speed-up: Sizzle("TAG")
- } else if ( match[2] ) {
- push.apply( results, context.getElementsByTagName( selector ) );
- return results;
-
- // Speed-up: Sizzle(".CLASS")
- } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) {
- push.apply( results, context.getElementsByClassName( m ) );
- return results;
- }
- }
-
- // QSA path
- if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
- nid = old = expando;
- newContext = context;
- newSelector = nodeType === 9 && selector;
-
- // qSA works strangely on Element-rooted queries
- // We can work around this by specifying an extra ID on the root
- // and working up from there (Thanks to Andrew Dupont for the technique)
- // IE 8 doesn't work on object elements
- if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
- groups = tokenize( selector );
-
- if ( (old = context.getAttribute("id")) ) {
- nid = old.replace( rescape, "\\$&" );
- } else {
- context.setAttribute( "id", nid );
- }
- nid = "[id='" + nid + "'] ";
-
- i = groups.length;
- while ( i-- ) {
- groups[i] = nid + toSelector( groups[i] );
- }
- newContext = rsibling.test( selector ) && context.parentNode || context;
- newSelector = groups.join(",");
- }
-
- if ( newSelector ) {
- try {
- push.apply( results,
- newContext.querySelectorAll( newSelector )
- );
- return results;
- } catch(qsaError) {
- } finally {
- if ( !old ) {
- context.removeAttribute("id");
- }
- }
- }
- }
- }
-
- // All others
- return select( selector.replace( rtrim, "$1" ), context, results, seed );
-}
-
-/**
- * For feature detection
- * @param {Function} fn The function to test for native support
- */
-function isNative( fn ) {
- return rnative.test( fn + "" );
-}
-
-/**
- * Create key-value caches of limited size
- * @returns {Function(string, Object)} Returns the Object data after storing it on itself with
- * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
- * deleting the oldest entry
- */
-function createCache() {
- var keys = [];
-
- function cache( key, value ) {
- // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
- if ( keys.push( key += " " ) > Expr.cacheLength ) {
- // Only keep the most recent entries
- delete cache[ keys.shift() ];
- }
- return (cache[ key ] = value);
- }
- return cache;
-}
-
-/**
- * Mark a function for special use by Sizzle
- * @param {Function} fn The function to mark
- */
-function markFunction( fn ) {
- fn[ expando ] = true;
- return fn;
-}
-
-/**
- * Support testing using an element
- * @param {Function} fn Passed the created div and expects a boolean result
- */
-function assert( fn ) {
- var div = document.createElement("div");
-
- try {
- return !!fn( div );
- } catch (e) {
- return false;
- } finally {
- // Remove from its parent by default
- if ( div.parentNode ) {
- div.parentNode.removeChild( div );
- }
- // release memory in IE
- div = null;
- }
-}
-
-/**
- * Adds the same handler for all of the specified attrs
- * @param {String} attrs Pipe-separated list of attributes
- * @param {Function} handler The method that will be applied if the test fails
- * @param {Boolean} test The result of a test. If true, null will be set as the handler in leiu of the specified handler
- */
-function addHandle( attrs, handler, test ) {
- attrs = attrs.split("|");
- var current,
- i = attrs.length,
- setHandle = test ? null : handler;
-
- while ( i-- ) {
- // Don't override a user's handler
- if ( !(current = Expr.attrHandle[ attrs[i] ]) || current === handler ) {
- Expr.attrHandle[ attrs[i] ] = setHandle;
- }
- }
-}
-
-/**
- * Fetches boolean attributes by node
- * @param {Element} elem
- * @param {String} name
- */
-function boolHandler( elem, name ) {
- // XML does not need to be checked as this will not be assigned for XML documents
- var val = elem.getAttributeNode( name );
- return val && val.specified ?
- val.value :
- elem[ name ] === true ? name.toLowerCase() : null;
-}
-
-/**
- * Fetches attributes without interpolation
- * http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
- * @param {Element} elem
- * @param {String} name
- */
-function interpolationHandler( elem, name ) {
- // XML does not need to be checked as this will not be assigned for XML documents
- return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
-}
-
-/**
- * Uses defaultValue to retrieve value in IE6/7
- * @param {Element} elem
- * @param {String} name
- */
-function valueHandler( elem ) {
- // Ignore the value *property* on inputs by using defaultValue
- // Fallback to Sizzle.attr by returning undefined where appropriate
- // XML does not need to be checked as this will not be assigned for XML documents
- if ( elem.nodeName.toLowerCase() === "input" ) {
- return elem.defaultValue;
- }
-}
-
-/**
- * Checks document order of two siblings
- * @param {Element} a
- * @param {Element} b
- * @returns Returns -1 if a precedes b, 1 if a follows b
- */
-function siblingCheck( a, b ) {
- var cur = b && a,
- diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
- ( ~b.sourceIndex || MAX_NEGATIVE ) -
- ( ~a.sourceIndex || MAX_NEGATIVE );
-
- // Use IE sourceIndex if available on both nodes
- if ( diff ) {
- return diff;
- }
-
- // Check if b follows a
- if ( cur ) {
- while ( (cur = cur.nextSibling) ) {
- if ( cur === b ) {
- return -1;
- }
- }
- }
-
- return a ? 1 : -1;
-}
-
-/**
- * Returns a function to use in pseudos for input types
- * @param {String} type
- */
-function createInputPseudo( type ) {
- return function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return name === "input" && elem.type === type;
- };
-}
-
-/**
- * Returns a function to use in pseudos for buttons
- * @param {String} type
- */
-function createButtonPseudo( type ) {
- return function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return (name === "input" || name === "button") && elem.type === type;
- };
-}
-
-/**
- * Returns a function to use in pseudos for positionals
- * @param {Function} fn
- */
-function createPositionalPseudo( fn ) {
- return markFunction(function( argument ) {
- argument = +argument;
- return markFunction(function( seed, matches ) {
- var j,
- matchIndexes = fn( [], seed.length, argument ),
- i = matchIndexes.length;
-
- // Match elements found at the specified indexes
- while ( i-- ) {
- if ( seed[ (j = matchIndexes[i]) ] ) {
- seed[j] = !(matches[j] = seed[j]);
- }
- }
- });
- });
-}
-
-/**
- * Detect xml
- * @param {Element|Object} elem An element or a document
- */
-isXML = Sizzle.isXML = function( elem ) {
- // documentElement is verified for cases where it doesn't yet exist
- // (such as loading iframes in IE - #4833)
- var documentElement = elem && (elem.ownerDocument || elem).documentElement;
- return documentElement ? documentElement.nodeName !== "HTML" : false;
-};
-
-// Expose support vars for convenience
-support = Sizzle.support = {};
-
-/**
- * Sets document-related variables once based on the current document
- * @param {Element|Object} [doc] An element or document object to use to set the document
- * @returns {Object} Returns the current document
- */
-setDocument = Sizzle.setDocument = function( node ) {
- var doc = node ? node.ownerDocument || node : preferredDoc,
- parent = doc.parentWindow;
-
- // If no document and documentElement is available, return
- if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
- return document;
- }
-
- // Set our document
- document = doc;
- docElem = doc.documentElement;
-
- // Support tests
- documentIsHTML = !isXML( doc );
-
- // Support: IE>8
- // If iframe document is assigned to "document" variable and if iframe has been reloaded,
- // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936
- if ( parent && parent.frameElement ) {
- parent.attachEvent( "onbeforeunload", function() {
- setDocument();
- });
- }
-
- /* Attributes
- ---------------------------------------------------------------------- */
-
- // Support: IE<8
- // Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans)
- support.attributes = assert(function( div ) {
-
- // Support: IE<8
- // Prevent attribute/property "interpolation"
- div.innerHTML = "<a href='#'></a>";
- addHandle( "type|href|height|width", interpolationHandler, div.firstChild.getAttribute("href") === "#" );
-
- // Support: IE<9
- // Use getAttributeNode to fetch booleans when getAttribute lies
- addHandle( booleans, boolHandler, div.getAttribute("disabled") == null );
-
- div.className = "i";
- return !div.getAttribute("className");
- });
-
- // Support: IE<9
- // Retrieving value should defer to defaultValue
- support.input = assert(function( div ) {
- div.innerHTML = "<input>";
- div.firstChild.setAttribute( "value", "" );
- return div.firstChild.getAttribute( "value" ) === "";
- });
-
- // IE6/7 still return empty string for value,
- // but are actually retrieving the property
- addHandle( "value", valueHandler, support.attributes && support.input );
-
- /* getElement(s)By*
- ---------------------------------------------------------------------- */
-
- // Check if getElementsByTagName("*") returns only elements
- support.getElementsByTagName = assert(function( div ) {
- div.appendChild( doc.createComment("") );
- return !div.getElementsByTagName("*").length;
- });
-
- // Check if getElementsByClassName can be trusted
- support.getElementsByClassName = assert(function( div ) {
- div.innerHTML = "<div class='a'></div><div class='a i'></div>";
-
- // Support: Safari<4
- // Catch class over-caching
- div.firstChild.className = "i";
- // Support: Opera<10
- // Catch gEBCN failure to find non-leading classes
- return div.getElementsByClassName("i").length === 2;
- });
-
- // Support: IE<10
- // Check if getElementById returns elements by name
- // The broken getElementById methods don't pick up programatically-set names,
- // so use a roundabout getElementsByName test
- support.getById = assert(function( div ) {
- docElem.appendChild( div ).id = expando;
- return !doc.getElementsByName || !doc.getElementsByName( expando ).length;
- });
-
- // ID find and filter
- if ( support.getById ) {
- Expr.find["ID"] = function( id, context ) {
- if ( typeof context.getElementById !== strundefined && documentIsHTML ) {
- var m = context.getElementById( id );
- // Check parentNode to catch when Blackberry 4.6 returns
- // nodes that are no longer in the document #6963
- return m && m.parentNode ? [m] : [];
- }
- };
- Expr.filter["ID"] = function( id ) {
- var attrId = id.replace( runescape, funescape );
- return function( elem ) {
- return elem.getAttribute("id") === attrId;
- };
- };
- } else {
- // Support: IE6/7
- // getElementById is not reliable as a find shortcut
- delete Expr.find["ID"];
-
- Expr.filter["ID"] = function( id ) {
- var attrId = id.replace( runescape, funescape );
- return function( elem ) {
- var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id");
- return node && node.value === attrId;
- };
- };
- }
-
- // Tag
- Expr.find["TAG"] = support.getElementsByTagName ?
- function( tag, context ) {
- if ( typeof context.getElementsByTagName !== strundefined ) {
- return context.getElementsByTagName( tag );
- }
- } :
- function( tag, context ) {
- var elem,
- tmp = [],
- i = 0,
- results = context.getElementsByTagName( tag );
-
- // Filter out possible comments
- if ( tag === "*" ) {
- while ( (elem = results[i++]) ) {
- if ( elem.nodeType === 1 ) {
- tmp.push( elem );
- }
- }
-
- return tmp;
- }
- return results;
- };
-
- // Class
- Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
- if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) {
- return context.getElementsByClassName( className );
- }
- };
-
- /* QSA/matchesSelector
- ---------------------------------------------------------------------- */
-
- // QSA and matchesSelector support
-
- // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
- rbuggyMatches = [];
-
- // qSa(:focus) reports false when true (Chrome 21)
- // We allow this because of a bug in IE8/9 that throws an error
- // whenever `document.activeElement` is accessed on an iframe
- // So, we allow :focus to pass through QSA all the time to avoid the IE error
- // See http://bugs.jquery.com/ticket/13378
- rbuggyQSA = [];
-
- if ( (support.qsa = isNative(doc.querySelectorAll)) ) {
- // Build QSA regex
- // Regex strategy adopted from Diego Perini
- assert(function( div ) {
- // Select is set to empty string on purpose
- // This is to test IE's treatment of not explicitly
- // setting a boolean content attribute,
- // since its presence should be enough
- // http://bugs.jquery.com/ticket/12359
- div.innerHTML = "<select><option selected=''></option></select>";
-
- // Support: IE8
- // Boolean attributes and "value" are not treated correctly
- if ( !div.querySelectorAll("[selected]").length ) {
- rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
- }
-
- // Webkit/Opera - :checked should return selected option elements
- // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
- // IE8 throws error here and will not see later tests
- if ( !div.querySelectorAll(":checked").length ) {
- rbuggyQSA.push(":checked");
- }
- });
-
- assert(function( div ) {
-
- // Support: Opera 10-12/IE8
- // ^= $= *= and empty values
- // Should not select anything
- // Support: Windows 8 Native Apps
- // The type attribute is restricted during .innerHTML assignment
- var input = doc.createElement("input");
- input.setAttribute( "type", "hidden" );
- div.appendChild( input ).setAttribute( "t", "" );
-
- if ( div.querySelectorAll("[t^='']").length ) {
- rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
- }
-
- // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
- // IE8 throws error here and will not see later tests
- if ( !div.querySelectorAll(":enabled").length ) {
- rbuggyQSA.push( ":enabled", ":disabled" );
- }
-
- // Opera 10-11 does not throw on post-comma invalid pseudos
- div.querySelectorAll("*,:x");
- rbuggyQSA.push(",.*:");
- });
- }
-
- if ( (support.matchesSelector = isNative( (matches = docElem.webkitMatchesSelector ||
- docElem.mozMatchesSelector ||
- docElem.oMatchesSelector ||
- docElem.msMatchesSelector) )) ) {
-
- assert(function( div ) {
- // Check to see if it's possible to do matchesSelector
- // on a disconnected node (IE 9)
- support.disconnectedMatch = matches.call( div, "div" );
-
- // This should fail with an exception
- // Gecko does not error, returns false instead
- matches.call( div, "[s!='']:x" );
- rbuggyMatches.push( "!=", pseudos );
- });
- }
-
- rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
- rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
-
- /* Contains
- ---------------------------------------------------------------------- */
-
- // Element contains another
- // Purposefully does not implement inclusive descendent
- // As in, an element does not contain itself
- contains = isNative(docElem.contains) || docElem.compareDocumentPosition ?
- function( a, b ) {
- var adown = a.nodeType === 9 ? a.documentElement : a,
- bup = b && b.parentNode;
- return a === bup || !!( bup && bup.nodeType === 1 && (
- adown.contains ?
- adown.contains( bup ) :
- a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
- ));
- } :
- function( a, b ) {
- if ( b ) {
- while ( (b = b.parentNode) ) {
- if ( b === a ) {
- return true;
- }
- }
- }
- return false;
- };
-
- /* Sorting
- ---------------------------------------------------------------------- */
-
- // Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
- // Detached nodes confoundingly follow *each other*
- support.sortDetached = assert(function( div1 ) {
- // Should return 1, but returns 4 (following)
- return div1.compareDocumentPosition( doc.createElement("div") ) & 1;
- });
-
- // Document order sorting
- sortOrder = docElem.compareDocumentPosition ?
- function( a, b ) {
-
- // Flag for duplicate removal
- if ( a === b ) {
- hasDuplicate = true;
- return 0;
- }
-
- var compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b );
-
- if ( compare ) {
- // Disconnected nodes
- if ( compare & 1 ||
- (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
-
- // Choose the first element that is related to our preferred document
- if ( a === doc || contains(preferredDoc, a) ) {
- return -1;
- }
- if ( b === doc || contains(preferredDoc, b) ) {
- return 1;
- }
-
- // Maintain original order
- return sortInput ?
- ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
- 0;
- }
-
- return compare & 4 ? -1 : 1;
- }
-
- // Not directly comparable, sort on existence of method
- return a.compareDocumentPosition ? -1 : 1;
- } :
- function( a, b ) {
- var cur,
- i = 0,
- aup = a.parentNode,
- bup = b.parentNode,
- ap = [ a ],
- bp = [ b ];
-
- // Exit early if the nodes are identical
- if ( a === b ) {
- hasDuplicate = true;
- return 0;
-
- // Parentless nodes are either documents or disconnected
- } else if ( !aup || !bup ) {
- return a === doc ? -1 :
- b === doc ? 1 :
- aup ? -1 :
- bup ? 1 :
- sortInput ?
- ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
- 0;
-
- // If the nodes are siblings, we can do a quick check
- } else if ( aup === bup ) {
- return siblingCheck( a, b );
- }
-
- // Otherwise we need full lists of their ancestors for comparison
- cur = a;
- while ( (cur = cur.parentNode) ) {
- ap.unshift( cur );
- }
- cur = b;
- while ( (cur = cur.parentNode) ) {
- bp.unshift( cur );
- }
-
- // Walk down the tree looking for a discrepancy
- while ( ap[i] === bp[i] ) {
- i++;
- }
-
- return i ?
- // Do a sibling check if the nodes have a common ancestor
- siblingCheck( ap[i], bp[i] ) :
-
- // Otherwise nodes in our document sort first
- ap[i] === preferredDoc ? -1 :
- bp[i] === preferredDoc ? 1 :
- 0;
- };
-
- return doc;
-};
-
-Sizzle.matches = function( expr, elements ) {
- return Sizzle( expr, null, null, elements );
-};
-
-Sizzle.matchesSelector = function( elem, expr ) {
- // Set document vars if needed
- if ( ( elem.ownerDocument || elem ) !== document ) {
- setDocument( elem );
- }
-
- // Make sure that attribute selectors are quoted
- expr = expr.replace( rattributeQuotes, "='$1']" );
-
- if ( support.matchesSelector && documentIsHTML &&
- ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
- ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
-
- try {
- var ret = matches.call( elem, expr );
-
- // IE 9's matchesSelector returns false on disconnected nodes
- if ( ret || support.disconnectedMatch ||
- // As well, disconnected nodes are said to be in a document
- // fragment in IE 9
- elem.document && elem.document.nodeType !== 11 ) {
- return ret;
- }
- } catch(e) {}
- }
-
- return Sizzle( expr, document, null, [elem] ).length > 0;
-};
-
-Sizzle.contains = function( context, elem ) {
- // Set document vars if needed
- if ( ( context.ownerDocument || context ) !== document ) {
- setDocument( context );
- }
- return contains( context, elem );
-};
-
-Sizzle.attr = function( elem, name ) {
- // Set document vars if needed
- if ( ( elem.ownerDocument || elem ) !== document ) {
- setDocument( elem );
- }
-
- var fn = Expr.attrHandle[ name.toLowerCase() ],
- // Don't get fooled by Object.prototype properties (jQuery #13807)
- val = ( fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
- fn( elem, name, !documentIsHTML ) :
- undefined );
-
- return val === undefined ?
- support.attributes || !documentIsHTML ?
- elem.getAttribute( name ) :
- (val = elem.getAttributeNode(name)) && val.specified ?
- val.value :
- null :
- val;
-};
-
-Sizzle.error = function( msg ) {
- throw new Error( "Syntax error, unrecognized expression: " + msg );
-};
-
-/**
- * Document sorting and removing duplicates
- * @param {ArrayLike} results
- */
-Sizzle.uniqueSort = function( results ) {
- var elem,
- duplicates = [],
- j = 0,
- i = 0;
-
- // Unless we *know* we can detect duplicates, assume their presence
- hasDuplicate = !support.detectDuplicates;
- sortInput = !support.sortStable && results.slice( 0 );
- results.sort( sortOrder );
-
- if ( hasDuplicate ) {
- while ( (elem = results[i++]) ) {
- if ( elem === results[ i ] ) {
- j = duplicates.push( i );
- }
- }
- while ( j-- ) {
- results.splice( duplicates[ j ], 1 );
- }
- }
-
- return results;
-};
-
-/**
- * Utility function for retrieving the text value of an array of DOM nodes
- * @param {Array|Element} elem
- */
-getText = Sizzle.getText = function( elem ) {
- var node,
- ret = "",
- i = 0,
- nodeType = elem.nodeType;
-
- if ( !nodeType ) {
- // If no nodeType, this is expected to be an array
- for ( ; (node = elem[i]); i++ ) {
- // Do not traverse comment nodes
- ret += getText( node );
- }
- } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
- // Use textContent for elements
- // innerText usage removed for consistency of new lines (see #11153)
- if ( typeof elem.textContent === "string" ) {
- return elem.textContent;
- } else {
- // Traverse its children
- for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
- ret += getText( elem );
- }
- }
- } else if ( nodeType === 3 || nodeType === 4 ) {
- return elem.nodeValue;
- }
- // Do not include comment or processing instruction nodes
-
- return ret;
-};
-
-Expr = Sizzle.selectors = {
-
- // Can be adjusted by the user
- cacheLength: 50,
-
- createPseudo: markFunction,
-
- match: matchExpr,
-
- attrHandle: {},
-
- find: {},
-
- relative: {
- ">": { dir: "parentNode", first: true },
- " ": { dir: "parentNode" },
- "+": { dir: "previousSibling", first: true },
- "~": { dir: "previousSibling" }
- },
-
- preFilter: {
- "ATTR": function( match ) {
- match[1] = match[1].replace( runescape, funescape );
-
- // Move the given value to match[3] whether quoted or unquoted
- match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape );
-
- if ( match[2] === "~=" ) {
- match[3] = " " + match[3] + " ";
- }
-
- return match.slice( 0, 4 );
- },
-
- "CHILD": function( match ) {
- /* matches from matchExpr["CHILD"]
- 1 type (only|nth|...)
- 2 what (child|of-type)
- 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
- 4 xn-component of xn+y argument ([+-]?\d*n|)
- 5 sign of xn-component
- 6 x of xn-component
- 7 sign of y-component
- 8 y of y-component
- */
- match[1] = match[1].toLowerCase();
-
- if ( match[1].slice( 0, 3 ) === "nth" ) {
- // nth-* requires argument
- if ( !match[3] ) {
- Sizzle.error( match[0] );
- }
-
- // numeric x and y parameters for Expr.filter.CHILD
- // remember that false/true cast respectively to 0/1
- match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
- match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
-
- // other types prohibit arguments
- } else if ( match[3] ) {
- Sizzle.error( match[0] );
- }
-
- return match;
- },
-
- "PSEUDO": function( match ) {
- var excess,
- unquoted = !match[5] && match[2];
-
- if ( matchExpr["CHILD"].test( match[0] ) ) {
- return null;
- }
-
- // Accept quoted arguments as-is
- if ( match[3] && match[4] !== undefined ) {
- match[2] = match[4];
-
- // Strip excess characters from unquoted arguments
- } else if ( unquoted && rpseudo.test( unquoted ) &&
- // Get excess from tokenize (recursively)
- (excess = tokenize( unquoted, true )) &&
- // advance to the next closing parenthesis
- (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
-
- // excess is a negative index
- match[0] = match[0].slice( 0, excess );
- match[2] = unquoted.slice( 0, excess );
- }
-
- // Return only captures needed by the pseudo filter method (type and argument)
- return match.slice( 0, 3 );
- }
- },
-
- filter: {
-
- "TAG": function( nodeNameSelector ) {
- var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
- return nodeNameSelector === "*" ?
- function() { return true; } :
- function( elem ) {
- return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
- };
- },
-
- "CLASS": function( className ) {
- var pattern = classCache[ className + " " ];
-
- return pattern ||
- (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
- classCache( className, function( elem ) {
- return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" );
- });
- },
-
- "ATTR": function( name, operator, check ) {
- return function( elem ) {
- var result = Sizzle.attr( elem, name );
-
- if ( result == null ) {
- return operator === "!=";
- }
- if ( !operator ) {
- return true;
- }
-
- result += "";
-
- return operator === "=" ? result === check :
- operator === "!=" ? result !== check :
- operator === "^=" ? check && result.indexOf( check ) === 0 :
- operator === "*=" ? check && result.indexOf( check ) > -1 :
- operator === "$=" ? check && result.slice( -check.length ) === check :
- operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 :
- operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
- false;
- };
- },
-
- "CHILD": function( type, what, argument, first, last ) {
- var simple = type.slice( 0, 3 ) !== "nth",
- forward = type.slice( -4 ) !== "last",
- ofType = what === "of-type";
-
- return first === 1 && last === 0 ?
-
- // Shortcut for :nth-*(n)
- function( elem ) {
- return !!elem.parentNode;
- } :
-
- function( elem, context, xml ) {
- var cache, outerCache, node, diff, nodeIndex, start,
- dir = simple !== forward ? "nextSibling" : "previousSibling",
- parent = elem.parentNode,
- name = ofType && elem.nodeName.toLowerCase(),
- useCache = !xml && !ofType;
-
- if ( parent ) {
-
- // :(first|last|only)-(child|of-type)
- if ( simple ) {
- while ( dir ) {
- node = elem;
- while ( (node = node[ dir ]) ) {
- if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {
- return false;
- }
- }
- // Reverse direction for :only-* (if we haven't yet done so)
- start = dir = type === "only" && !start && "nextSibling";
- }
- return true;
- }
-
- start = [ forward ? parent.firstChild : parent.lastChild ];
-
- // non-xml :nth-child(...) stores cache data on `parent`
- if ( forward && useCache ) {
- // Seek `elem` from a previously-cached index
- outerCache = parent[ expando ] || (parent[ expando ] = {});
- cache = outerCache[ type ] || [];
- nodeIndex = cache[0] === dirruns && cache[1];
- diff = cache[0] === dirruns && cache[2];
- node = nodeIndex && parent.childNodes[ nodeIndex ];
-
- while ( (node = ++nodeIndex && node && node[ dir ] ||
-
- // Fallback to seeking `elem` from the start
- (diff = nodeIndex = 0) || start.pop()) ) {
-
- // When found, cache indexes on `parent` and break
- if ( node.nodeType === 1 && ++diff && node === elem ) {
- outerCache[ type ] = [ dirruns, nodeIndex, diff ];
- break;
- }
- }
-
- // Use previously-cached element index if available
- } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {
- diff = cache[1];
-
- // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)
- } else {
- // Use the same loop as above to seek `elem` from the start
- while ( (node = ++nodeIndex && node && node[ dir ] ||
- (diff = nodeIndex = 0) || start.pop()) ) {
-
- if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {
- // Cache the index of each encountered element
- if ( useCache ) {
- (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];
- }
-
- if ( node === elem ) {
- break;
- }
- }
- }
- }
-
- // Incorporate the offset, then check against cycle size
- diff -= last;
- return diff === first || ( diff % first === 0 && diff / first >= 0 );
- }
- };
- },
-
- "PSEUDO": function( pseudo, argument ) {
- // pseudo-class names are case-insensitive
- // http://www.w3.org/TR/selectors/#pseudo-classes
- // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
- // Remember that setFilters inherits from pseudos
- var args,
- fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
- Sizzle.error( "unsupported pseudo: " + pseudo );
-
- // The user may use createPseudo to indicate that
- // arguments are needed to create the filter function
- // just as Sizzle does
- if ( fn[ expando ] ) {
- return fn( argument );
- }
-
- // But maintain support for old signatures
- if ( fn.length > 1 ) {
- args = [ pseudo, pseudo, "", argument ];
- return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
- markFunction(function( seed, matches ) {
- var idx,
- matched = fn( seed, argument ),
- i = matched.length;
- while ( i-- ) {
- idx = indexOf.call( seed, matched[i] );
- seed[ idx ] = !( matches[ idx ] = matched[i] );
- }
- }) :
- function( elem ) {
- return fn( elem, 0, args );
- };
- }
-
- return fn;
- }
- },
-
- pseudos: {
- // Potentially complex pseudos
- "not": markFunction(function( selector ) {
- // Trim the selector passed to compile
- // to avoid treating leading and trailing
- // spaces as combinators
- var input = [],
- results = [],
- matcher = compile( selector.replace( rtrim, "$1" ) );
-
- return matcher[ expando ] ?
- markFunction(function( seed, matches, context, xml ) {
- var elem,
- unmatched = matcher( seed, null, xml, [] ),
- i = seed.length;
-
- // Match elements unmatched by `matcher`
- while ( i-- ) {
- if ( (elem = unmatched[i]) ) {
- seed[i] = !(matches[i] = elem);
- }
- }
- }) :
- function( elem, context, xml ) {
- input[0] = elem;
- matcher( input, null, xml, results );
- return !results.pop();
- };
- }),
-
- "has": markFunction(function( selector ) {
- return function( elem ) {
- return Sizzle( selector, elem ).length > 0;
- };
- }),
-
- "contains": markFunction(function( text ) {
- return function( elem ) {
- return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
- };
- }),
-
- // "Whether an element is represented by a :lang() selector
- // is based solely on the element's language value
- // being equal to the identifier C,
- // or beginning with the identifier C immediately followed by "-".
- // The matching of C against the element's language value is performed case-insensitively.
- // The identifier C does not have to be a valid language name."
- // http://www.w3.org/TR/selectors/#lang-pseudo
- "lang": markFunction( function( lang ) {
- // lang value must be a valid identifier
- if ( !ridentifier.test(lang || "") ) {
- Sizzle.error( "unsupported lang: " + lang );
- }
- lang = lang.replace( runescape, funescape ).toLowerCase();
- return function( elem ) {
- var elemLang;
- do {
- if ( (elemLang = documentIsHTML ?
- elem.lang :
- elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {
-
- elemLang = elemLang.toLowerCase();
- return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
- }
- } while ( (elem = elem.parentNode) && elem.nodeType === 1 );
- return false;
- };
- }),
-
- // Miscellaneous
- "target": function( elem ) {
- var hash = window.location && window.location.hash;
- return hash && hash.slice( 1 ) === elem.id;
- },
-
- "root": function( elem ) {
- return elem === docElem;
- },
-
- "focus": function( elem ) {
- return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
- },
-
- // Boolean properties
- "enabled": function( elem ) {
- return elem.disabled === false;
- },
-
- "disabled": function( elem ) {
- return elem.disabled === true;
- },
-
- "checked": function( elem ) {
- // In CSS3, :checked should return both checked and selected elements
- // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
- var nodeName = elem.nodeName.toLowerCase();
- return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
- },
-
- "selected": function( elem ) {
- // Accessing this property makes selected-by-default
- // options in Safari work properly
- if ( elem.parentNode ) {
- elem.parentNode.selectedIndex;
- }
-
- return elem.selected === true;
- },
-
- // Contents
- "empty": function( elem ) {
- // http://www.w3.org/TR/selectors/#empty-pseudo
- // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)),
- // not comment, processing instructions, or others
- // Thanks to Diego Perini for the nodeName shortcut
- // Greater than "@" means alpha characters (specifically not starting with "#" or "?")
- for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
- if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) {
- return false;
- }
- }
- return true;
- },
-
- "parent": function( elem ) {
- return !Expr.pseudos["empty"]( elem );
- },
-
- // Element/input types
- "header": function( elem ) {
- return rheader.test( elem.nodeName );
- },
-
- "input": function( elem ) {
- return rinputs.test( elem.nodeName );
- },
-
- "button": function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return name === "input" && elem.type === "button" || name === "button";
- },
-
- "text": function( elem ) {
- var attr;
- // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
- // use getAttribute instead to test this case
- return elem.nodeName.toLowerCase() === "input" &&
- elem.type === "text" &&
- ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type );
- },
-
- // Position-in-collection
- "first": createPositionalPseudo(function() {
- return [ 0 ];
- }),
-
- "last": createPositionalPseudo(function( matchIndexes, length ) {
- return [ length - 1 ];
- }),
-
- "eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
- return [ argument < 0 ? argument + length : argument ];
- }),
-
- "even": createPositionalPseudo(function( matchIndexes, length ) {
- var i = 0;
- for ( ; i < length; i += 2 ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- }),
-
- "odd": createPositionalPseudo(function( matchIndexes, length ) {
- var i = 1;
- for ( ; i < length; i += 2 ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- }),
-
- "lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
- var i = argument < 0 ? argument + length : argument;
- for ( ; --i >= 0; ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- }),
-
- "gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
- var i = argument < 0 ? argument + length : argument;
- for ( ; ++i < length; ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- })
- }
-};
-
-// Add button/input type pseudos
-for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
- Expr.pseudos[ i ] = createInputPseudo( i );
-}
-for ( i in { submit: true, reset: true } ) {
- Expr.pseudos[ i ] = createButtonPseudo( i );
-}
-
-function tokenize( selector, parseOnly ) {
- var matched, match, tokens, type,
- soFar, groups, preFilters,
- cached = tokenCache[ selector + " " ];
-
- if ( cached ) {
- return parseOnly ? 0 : cached.slice( 0 );
- }
-
- soFar = selector;
- groups = [];
- preFilters = Expr.preFilter;
-
- while ( soFar ) {
-
- // Comma and first run
- if ( !matched || (match = rcomma.exec( soFar )) ) {
- if ( match ) {
- // Don't consume trailing commas as valid
- soFar = soFar.slice( match[0].length ) || soFar;
- }
- groups.push( tokens = [] );
- }
-
- matched = false;
-
- // Combinators
- if ( (match = rcombinators.exec( soFar )) ) {
- matched = match.shift();
- tokens.push({
- value: matched,
- // Cast descendant combinators to space
- type: match[0].replace( rtrim, " " )
- });
- soFar = soFar.slice( matched.length );
- }
-
- // Filters
- for ( type in Expr.filter ) {
- if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
- (match = preFilters[ type ]( match ))) ) {
- matched = match.shift();
- tokens.push({
- value: matched,
- type: type,
- matches: match
- });
- soFar = soFar.slice( matched.length );
- }
- }
-
- if ( !matched ) {
- break;
- }
- }
-
- // Return the length of the invalid excess
- // if we're just parsing
- // Otherwise, throw an error or return tokens
- return parseOnly ?
- soFar.length :
- soFar ?
- Sizzle.error( selector ) :
- // Cache the tokens
- tokenCache( selector, groups ).slice( 0 );
-}
-
-function toSelector( tokens ) {
- var i = 0,
- len = tokens.length,
- selector = "";
- for ( ; i < len; i++ ) {
- selector += tokens[i].value;
- }
- return selector;
-}
-
-function addCombinator( matcher, combinator, base ) {
- var dir = combinator.dir,
- checkNonElements = base && dir === "parentNode",
- doneName = done++;
-
- return combinator.first ?
- // Check against closest ancestor/preceding element
- function( elem, context, xml ) {
- while ( (elem = elem[ dir ]) ) {
- if ( elem.nodeType === 1 || checkNonElements ) {
- return matcher( elem, context, xml );
- }
- }
- } :
-
- // Check against all ancestor/preceding elements
- function( elem, context, xml ) {
- var data, cache, outerCache,
- dirkey = dirruns + " " + doneName;
-
- // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
- if ( xml ) {
- while ( (elem = elem[ dir ]) ) {
- if ( elem.nodeType === 1 || checkNonElements ) {
- if ( matcher( elem, context, xml ) ) {
- return true;
- }
- }
- }
- } else {
- while ( (elem = elem[ dir ]) ) {
- if ( elem.nodeType === 1 || checkNonElements ) {
- outerCache = elem[ expando ] || (elem[ expando ] = {});
- if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) {
- if ( (data = cache[1]) === true || data === cachedruns ) {
- return data === true;
- }
- } else {
- cache = outerCache[ dir ] = [ dirkey ];
- cache[1] = matcher( elem, context, xml ) || cachedruns;
- if ( cache[1] === true ) {
- return true;
- }
- }
- }
- }
- }
- };
-}
-
-function elementMatcher( matchers ) {
- return matchers.length > 1 ?
- function( elem, context, xml ) {
- var i = matchers.length;
- while ( i-- ) {
- if ( !matchers[i]( elem, context, xml ) ) {
- return false;
- }
- }
- return true;
- } :
- matchers[0];
-}
-
-function condense( unmatched, map, filter, context, xml ) {
- var elem,
- newUnmatched = [],
- i = 0,
- len = unmatched.length,
- mapped = map != null;
-
- for ( ; i < len; i++ ) {
- if ( (elem = unmatched[i]) ) {
- if ( !filter || filter( elem, context, xml ) ) {
- newUnmatched.push( elem );
- if ( mapped ) {
- map.push( i );
- }
- }
- }
- }
-
- return newUnmatched;
-}
-
-function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
- if ( postFilter && !postFilter[ expando ] ) {
- postFilter = setMatcher( postFilter );
- }
- if ( postFinder && !postFinder[ expando ] ) {
- postFinder = setMatcher( postFinder, postSelector );
- }
- return markFunction(function( seed, results, context, xml ) {
- var temp, i, elem,
- preMap = [],
- postMap = [],
- preexisting = results.length,
-
- // Get initial elements from seed or context
- elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
-
- // Prefilter to get matcher input, preserving a map for seed-results synchronization
- matcherIn = preFilter && ( seed || !selector ) ?
- condense( elems, preMap, preFilter, context, xml ) :
- elems,
-
- matcherOut = matcher ?
- // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
- postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
-
- // ...intermediate processing is necessary
- [] :
-
- // ...otherwise use results directly
- results :
- matcherIn;
-
- // Find primary matches
- if ( matcher ) {
- matcher( matcherIn, matcherOut, context, xml );
- }
-
- // Apply postFilter
- if ( postFilter ) {
- temp = condense( matcherOut, postMap );
- postFilter( temp, [], context, xml );
-
- // Un-match failing elements by moving them back to matcherIn
- i = temp.length;
- while ( i-- ) {
- if ( (elem = temp[i]) ) {
- matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
- }
- }
- }
-
- if ( seed ) {
- if ( postFinder || preFilter ) {
- if ( postFinder ) {
- // Get the final matcherOut by condensing this intermediate into postFinder contexts
- temp = [];
- i = matcherOut.length;
- while ( i-- ) {
- if ( (elem = matcherOut[i]) ) {
- // Restore matcherIn since elem is not yet a final match
- temp.push( (matcherIn[i] = elem) );
- }
- }
- postFinder( null, (matcherOut = []), temp, xml );
- }
-
- // Move matched elements from seed to results to keep them synchronized
- i = matcherOut.length;
- while ( i-- ) {
- if ( (elem = matcherOut[i]) &&
- (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) {
-
- seed[temp] = !(results[temp] = elem);
- }
- }
- }
-
- // Add elements to results, through postFinder if defined
- } else {
- matcherOut = condense(
- matcherOut === results ?
- matcherOut.splice( preexisting, matcherOut.length ) :
- matcherOut
- );
- if ( postFinder ) {
- postFinder( null, results, matcherOut, xml );
- } else {
- push.apply( results, matcherOut );
- }
- }
- });
-}
-
-function matcherFromTokens( tokens ) {
- var checkContext, matcher, j,
- len = tokens.length,
- leadingRelative = Expr.relative[ tokens[0].type ],
- implicitRelative = leadingRelative || Expr.relative[" "],
- i = leadingRelative ? 1 : 0,
-
- // The foundational matcher ensures that elements are reachable from top-level context(s)
- matchContext = addCombinator( function( elem ) {
- return elem === checkContext;
- }, implicitRelative, true ),
- matchAnyContext = addCombinator( function( elem ) {
- return indexOf.call( checkContext, elem ) > -1;
- }, implicitRelative, true ),
- matchers = [ function( elem, context, xml ) {
- return ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
- (checkContext = context).nodeType ?
- matchContext( elem, context, xml ) :
- matchAnyContext( elem, context, xml ) );
- } ];
-
- for ( ; i < len; i++ ) {
- if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
- matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
- } else {
- matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
-
- // Return special upon seeing a positional matcher
- if ( matcher[ expando ] ) {
- // Find the next relative operator (if any) for proper handling
- j = ++i;
- for ( ; j < len; j++ ) {
- if ( Expr.relative[ tokens[j].type ] ) {
- break;
- }
- }
- return setMatcher(
- i > 1 && elementMatcher( matchers ),
- i > 1 && toSelector(
- // If the preceding token was a descendant combinator, insert an implicit any-element `*`
- tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
- ).replace( rtrim, "$1" ),
- matcher,
- i < j && matcherFromTokens( tokens.slice( i, j ) ),
- j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
- j < len && toSelector( tokens )
- );
- }
- matchers.push( matcher );
- }
- }
-
- return elementMatcher( matchers );
-}
-
-function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
- // A counter to specify which element is currently being matched
- var matcherCachedRuns = 0,
- bySet = setMatchers.length > 0,
- byElement = elementMatchers.length > 0,
- superMatcher = function( seed, context, xml, results, expandContext ) {
- var elem, j, matcher,
- setMatched = [],
- matchedCount = 0,
- i = "0",
- unmatched = seed && [],
- outermost = expandContext != null,
- contextBackup = outermostContext,
- // We must always have either seed elements or context
- elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ),
- // Use integer dirruns iff this is the outermost matcher
- dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1);
-
- if ( outermost ) {
- outermostContext = context !== document && context;
- cachedruns = matcherCachedRuns;
- }
-
- // Add elements passing elementMatchers directly to results
- // Keep `i` a string if there are no elements so `matchedCount` will be "00" below
- for ( ; (elem = elems[i]) != null; i++ ) {
- if ( byElement && elem ) {
- j = 0;
- while ( (matcher = elementMatchers[j++]) ) {
- if ( matcher( elem, context, xml ) ) {
- results.push( elem );
- break;
- }
- }
- if ( outermost ) {
- dirruns = dirrunsUnique;
- cachedruns = ++matcherCachedRuns;
- }
- }
-
- // Track unmatched elements for set filters
- if ( bySet ) {
- // They will have gone through all possible matchers
- if ( (elem = !matcher && elem) ) {
- matchedCount--;
- }
-
- // Lengthen the array for every element, matched or not
- if ( seed ) {
- unmatched.push( elem );
- }
- }
- }
-
- // Apply set filters to unmatched elements
- matchedCount += i;
- if ( bySet && i !== matchedCount ) {
- j = 0;
- while ( (matcher = setMatchers[j++]) ) {
- matcher( unmatched, setMatched, context, xml );
- }
-
- if ( seed ) {
- // Reintegrate element matches to eliminate the need for sorting
- if ( matchedCount > 0 ) {
- while ( i-- ) {
- if ( !(unmatched[i] || setMatched[i]) ) {
- setMatched[i] = pop.call( results );
- }
- }
- }
-
- // Discard index placeholder values to get only actual matches
- setMatched = condense( setMatched );
- }
-
- // Add matches to results
- push.apply( results, setMatched );
-
- // Seedless set matches succeeding multiple successful matchers stipulate sorting
- if ( outermost && !seed && setMatched.length > 0 &&
- ( matchedCount + setMatchers.length ) > 1 ) {
-
- Sizzle.uniqueSort( results );
- }
- }
-
- // Override manipulation of globals by nested matchers
- if ( outermost ) {
- dirruns = dirrunsUnique;
- outermostContext = contextBackup;
- }
-
- return unmatched;
- };
-
- return bySet ?
- markFunction( superMatcher ) :
- superMatcher;
-}
-
-compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) {
- var i,
- setMatchers = [],
- elementMatchers = [],
- cached = compilerCache[ selector + " " ];
-
- if ( !cached ) {
- // Generate a function of recursive functions that can be used to check each element
- if ( !group ) {
- group = tokenize( selector );
- }
- i = group.length;
- while ( i-- ) {
- cached = matcherFromTokens( group[i] );
- if ( cached[ expando ] ) {
- setMatchers.push( cached );
- } else {
- elementMatchers.push( cached );
- }
- }
-
- // Cache the compiled function
- cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
- }
- return cached;
-};
-
-function multipleContexts( selector, contexts, results ) {
- var i = 0,
- len = contexts.length;
- for ( ; i < len; i++ ) {
- Sizzle( selector, contexts[i], results );
- }
- return results;
-}
-
-function select( selector, context, results, seed ) {
- var i, tokens, token, type, find,
- match = tokenize( selector );
-
- if ( !seed ) {
- // Try to minimize operations if there is only one group
- if ( match.length === 1 ) {
-
- // Take a shortcut and set the context if the root selector is an ID
- tokens = match[0] = match[0].slice( 0 );
- if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
- support.getById && context.nodeType === 9 && documentIsHTML &&
- Expr.relative[ tokens[1].type ] ) {
-
- context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
- if ( !context ) {
- return results;
- }
- selector = selector.slice( tokens.shift().value.length );
- }
-
- // Fetch a seed set for right-to-left matching
- i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
- while ( i-- ) {
- token = tokens[i];
-
- // Abort if we hit a combinator
- if ( Expr.relative[ (type = token.type) ] ) {
- break;
- }
- if ( (find = Expr.find[ type ]) ) {
- // Search, expanding context for leading sibling combinators
- if ( (seed = find(
- token.matches[0].replace( runescape, funescape ),
- rsibling.test( tokens[0].type ) && context.parentNode || context
- )) ) {
-
- // If seed is empty or no tokens remain, we can return early
- tokens.splice( i, 1 );
- selector = seed.length && toSelector( tokens );
- if ( !selector ) {
- push.apply( results, seed );
- return results;
- }
-
- break;
- }
- }
- }
- }
- }
-
- // Compile and execute a filtering function
- // Provide `match` to avoid retokenization if we modified the selector above
- compile( selector, match )(
- seed,
- context,
- !documentIsHTML,
- results,
- rsibling.test( selector )
- );
- return results;
-}
-
-// Deprecated
-Expr.pseudos["nth"] = Expr.pseudos["eq"];
-
-// Easy API for creating new setFilters
-function setFilters() {}
-setFilters.prototype = Expr.filters = Expr.pseudos;
-Expr.setFilters = new setFilters();
-
-// One-time assignments
-
-// Sort stability
-support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
-
-// Initialize against the default document
-setDocument();
-
-// Support: Chrome<<14
-// Always assume duplicates if they aren't passed to the comparison function
-[0, 0].sort( sortOrder );
-support.detectDuplicates = hasDuplicate;
-
-jQuery.find = Sizzle;
-jQuery.expr = Sizzle.selectors;
-jQuery.expr[":"] = jQuery.expr.pseudos;
-jQuery.unique = Sizzle.uniqueSort;
-jQuery.text = Sizzle.getText;
-jQuery.isXMLDoc = Sizzle.isXML;
-jQuery.contains = Sizzle.contains;
-
-
-})( window );
-// String to Object options format cache
-var optionsCache = {};
-
-// Convert String-formatted options into Object-formatted ones and store in cache
-function createOptions( options ) {
- var object = optionsCache[ options ] = {};
- jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) {
- object[ flag ] = true;
- });
- return object;
-}
-
-/*
- * Create a callback list using the following parameters:
- *
- * options: an optional list of space-separated options that will change how
- * the callback list behaves or a more traditional option object
- *
- * By default a callback list will act like an event callback list and can be
- * "fired" multiple times.
- *
- * Possible options:
- *
- * once: will ensure the callback list can only be fired once (like a Deferred)
- *
- * memory: will keep track of previous values and will call any callback added
- * after the list has been fired right away with the latest "memorized"
- * values (like a Deferred)
- *
- * unique: will ensure a callback can only be added once (no duplicate in the list)
- *
- * stopOnFalse: interrupt callings when a callback returns false
- *
- */
-jQuery.Callbacks = function( options ) {
-
- // Convert options from String-formatted to Object-formatted if needed
- // (we check in cache first)
- options = typeof options === "string" ?
- ( optionsCache[ options ] || createOptions( options ) ) :
- jQuery.extend( {}, options );
-
- var // Flag to know if list is currently firing
- firing,
- // Last fire value (for non-forgettable lists)
- memory,
- // Flag to know if list was already fired
- fired,
- // End of the loop when firing
- firingLength,
- // Index of currently firing callback (modified by remove if needed)
- firingIndex,
- // First callback to fire (used internally by add and fireWith)
- firingStart,
- // Actual callback list
- list = [],
- // Stack of fire calls for repeatable lists
- stack = !options.once && [],
- // Fire callbacks
- fire = function( data ) {
- memory = options.memory && data;
- fired = true;
- firingIndex = firingStart || 0;
- firingStart = 0;
- firingLength = list.length;
- firing = true;
- for ( ; list && firingIndex < firingLength; firingIndex++ ) {
- if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {
- memory = false; // To prevent further calls using add
- break;
- }
- }
- firing = false;
- if ( list ) {
- if ( stack ) {
- if ( stack.length ) {
- fire( stack.shift() );
- }
- } else if ( memory ) {
- list = [];
- } else {
- self.disable();
- }
- }
- },
- // Actual Callbacks object
- self = {
- // Add a callback or a collection of callbacks to the list
- add: function() {
- if ( list ) {
- // First, we save the current length
- var start = list.length;
- (function add( args ) {
- jQuery.each( args, function( _, arg ) {
- var type = jQuery.type( arg );
- if ( type === "function" ) {
- if ( !options.unique || !self.has( arg ) ) {
- list.push( arg );
- }
- } else if ( arg && arg.length && type !== "string" ) {
- // Inspect recursively
- add( arg );
- }
- });
- })( arguments );
- // Do we need to add the callbacks to the
- // current firing batch?
- if ( firing ) {
- firingLength = list.length;
- // With memory, if we're not firing then
- // we should call right away
- } else if ( memory ) {
- firingStart = start;
- fire( memory );
- }
- }
- return this;
- },
- // Remove a callback from the list
- remove: function() {
- if ( list ) {
- jQuery.each( arguments, function( _, arg ) {
- var index;
- while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
<TRUNCATED>
[17/28] CLIMATE-512 - Replace frontend with new Yeoman/Grunt/Bower
frontend
Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/js/lib/angular/angular-resource.min.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/js/lib/angular/angular-resource.min.js b/ocw-ui/frontend/app/js/lib/angular/angular-resource.min.js
deleted file mode 100755
index f37559c..0000000
--- a/ocw-ui/frontend/app/js/lib/angular/angular-resource.min.js
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- AngularJS v1.0.5
- (c) 2010-2012 Google, Inc. http://angularjs.org
- License: MIT
-*/
-(function(C,d,w){'use strict';d.module("ngResource",["ng"]).factory("$resource",["$http","$parse",function(x,y){function s(b,e){return encodeURIComponent(b).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(e?null:/%20/g,"+")}function t(b,e){this.template=b+="#";this.defaults=e||{};var a=this.urlParams={};h(b.split(/\W/),function(f){f&&RegExp("(^|[^\\\\]):"+f+"\\W").test(b)&&(a[f]=!0)});this.template=b.replace(/\\:/g,":")}function u(b,e,a){function f(m,a){var b=
-{},a=o({},e,a);h(a,function(a,z){var c;a.charAt&&a.charAt(0)=="@"?(c=a.substr(1),c=y(c)(m)):c=a;b[z]=c});return b}function g(a){v(a||{},this)}var k=new t(b),a=o({},A,a);h(a,function(a,b){a.method=d.uppercase(a.method);var e=a.method=="POST"||a.method=="PUT"||a.method=="PATCH";g[b]=function(b,c,d,B){var j={},i,l=p,q=null;switch(arguments.length){case 4:q=B,l=d;case 3:case 2:if(r(c)){if(r(b)){l=b;q=c;break}l=c;q=d}else{j=b;i=c;l=d;break}case 1:r(b)?l=b:e?i=b:j=b;break;case 0:break;default:throw"Expected between 0-4 arguments [params, data, success, error], got "+
-arguments.length+" arguments.";}var n=this instanceof g?this:a.isArray?[]:new g(i);x({method:a.method,url:k.url(o({},f(i,a.params||{}),j)),data:i}).then(function(b){var c=b.data;if(c)a.isArray?(n.length=0,h(c,function(a){n.push(new g(a))})):v(c,n);(l||p)(n,b.headers)},q);return n};g.prototype["$"+b]=function(a,d,h){var m=f(this),j=p,i;switch(arguments.length){case 3:m=a;j=d;i=h;break;case 2:case 1:r(a)?(j=a,i=d):(m=a,j=d||p);case 0:break;default:throw"Expected between 1-3 arguments [params, success, error], got "+
-arguments.length+" arguments.";}g[b].call(this,m,e?this:w,j,i)}});g.bind=function(d){return u(b,o({},e,d),a)};return g}var A={get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},"delete":{method:"DELETE"}},p=d.noop,h=d.forEach,o=d.extend,v=d.copy,r=d.isFunction;t.prototype={url:function(b){var e=this,a=this.template,f,g,b=b||{};h(this.urlParams,function(h,c){f=b.hasOwnProperty(c)?b[c]:e.defaults[c];d.isDefined(f)&&f!==null?(g=s(f,!0).replace(/%26/gi,"&").replace(/%3D/gi,
-"=").replace(/%2B/gi,"+"),a=a.replace(RegExp(":"+c+"(\\W)","g"),g+"$1")):a=a.replace(RegExp("(/?):"+c+"(\\W)","g"),function(a,b,c){return c.charAt(0)=="/"?c:b+c})});var a=a.replace(/\/?#$/,""),k=[];h(b,function(a,b){e.urlParams[b]||k.push(s(b)+"="+s(a))});k.sort();a=a.replace(/\/*$/,"");return a+(k.length?"?"+k.join("&"):"")}};return u}])})(window,window.angular);
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/js/lib/angular/angular-sanitize.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/js/lib/angular/angular-sanitize.js b/ocw-ui/frontend/app/js/lib/angular/angular-sanitize.js
deleted file mode 100755
index 39e72bf..0000000
--- a/ocw-ui/frontend/app/js/lib/angular/angular-sanitize.js
+++ /dev/null
@@ -1,535 +0,0 @@
-/**
- * @license AngularJS v1.0.5
- * (c) 2010-2012 Google, Inc. http://angularjs.org
- * License: MIT
- */
-(function(window, angular, undefined) {
-'use strict';
-
-/**
- * @ngdoc overview
- * @name ngSanitize
- * @description
- */
-
-/*
- * HTML Parser By Misko Hevery (misko@hevery.com)
- * based on: HTML Parser By John Resig (ejohn.org)
- * Original code by Erik Arvidsson, Mozilla Public License
- * http://erik.eae.net/simplehtmlparser/simplehtmlparser.js
- *
- * // Use like so:
- * htmlParser(htmlString, {
- * start: function(tag, attrs, unary) {},
- * end: function(tag) {},
- * chars: function(text) {},
- * comment: function(text) {}
- * });
- *
- */
-
-
-/**
- * @ngdoc service
- * @name ngSanitize.$sanitize
- * @function
- *
- * @description
- * The input is sanitized by parsing the html into tokens. All safe tokens (from a whitelist) are
- * then serialized back to properly escaped html string. This means that no unsafe input can make
- * it into the returned string, however, since our parser is more strict than a typical browser
- * parser, it's possible that some obscure input, which would be recognized as valid HTML by a
- * browser, won't make it through the sanitizer.
- *
- * @param {string} html Html input.
- * @returns {string} Sanitized html.
- *
- * @example
- <doc:example module="ngSanitize">
- <doc:source>
- <script>
- function Ctrl($scope) {
- $scope.snippet =
- '<p style="color:blue">an html\n' +
- '<em onmouseover="this.textContent=\'PWN3D!\'">click here</em>\n' +
- 'snippet</p>';
- }
- </script>
- <div ng-controller="Ctrl">
- Snippet: <textarea ng-model="snippet" cols="60" rows="3"></textarea>
- <table>
- <tr>
- <td>Filter</td>
- <td>Source</td>
- <td>Rendered</td>
- </tr>
- <tr id="html-filter">
- <td>html filter</td>
- <td>
- <pre><div ng-bind-html="snippet"><br/></div></pre>
- </td>
- <td>
- <div ng-bind-html="snippet"></div>
- </td>
- </tr>
- <tr id="escaped-html">
- <td>no filter</td>
- <td><pre><div ng-bind="snippet"><br/></div></pre></td>
- <td><div ng-bind="snippet"></div></td>
- </tr>
- <tr id="html-unsafe-filter">
- <td>unsafe html filter</td>
- <td><pre><div ng-bind-html-unsafe="snippet"><br/></div></pre></td>
- <td><div ng-bind-html-unsafe="snippet"></div></td>
- </tr>
- </table>
- </div>
- </doc:source>
- <doc:scenario>
- it('should sanitize the html snippet ', function() {
- expect(using('#html-filter').element('div').html()).
- toBe('<p>an html\n<em>click here</em>\nsnippet</p>');
- });
-
- it('should escape snippet without any filter', function() {
- expect(using('#escaped-html').element('div').html()).
- toBe("<p style=\"color:blue\">an html\n" +
- "<em onmouseover=\"this.textContent='PWN3D!'\">click here</em>\n" +
- "snippet</p>");
- });
-
- it('should inline raw snippet if filtered as unsafe', function() {
- expect(using('#html-unsafe-filter').element("div").html()).
- toBe("<p style=\"color:blue\">an html\n" +
- "<em onmouseover=\"this.textContent='PWN3D!'\">click here</em>\n" +
- "snippet</p>");
- });
-
- it('should update', function() {
- input('snippet').enter('new <b>text</b>');
- expect(using('#html-filter').binding('snippet')).toBe('new <b>text</b>');
- expect(using('#escaped-html').element('div').html()).toBe("new <b>text</b>");
- expect(using('#html-unsafe-filter').binding("snippet")).toBe('new <b>text</b>');
- });
- </doc:scenario>
- </doc:example>
- */
-var $sanitize = function(html) {
- var buf = [];
- htmlParser(html, htmlSanitizeWriter(buf));
- return buf.join('');
-};
-
-
-// Regular Expressions for parsing tags and attributes
-var START_TAG_REGEXP = /^<\s*([\w:-]+)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*>/,
- END_TAG_REGEXP = /^<\s*\/\s*([\w:-]+)[^>]*>/,
- ATTR_REGEXP = /([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,
- BEGIN_TAG_REGEXP = /^</,
- BEGING_END_TAGE_REGEXP = /^<\s*\//,
- COMMENT_REGEXP = /<!--(.*?)-->/g,
- CDATA_REGEXP = /<!\[CDATA\[(.*?)]]>/g,
- URI_REGEXP = /^((ftp|https?):\/\/|mailto:|#)/,
- NON_ALPHANUMERIC_REGEXP = /([^\#-~| |!])/g; // Match everything outside of normal chars and " (quote character)
-
-
-// Good source of info about elements and attributes
-// http://dev.w3.org/html5/spec/Overview.html#semantics
-// http://simon.html5.org/html-elements
-
-// Safe Void Elements - HTML5
-// http://dev.w3.org/html5/spec/Overview.html#void-elements
-var voidElements = makeMap("area,br,col,hr,img,wbr");
-
-// Elements that you can, intentionally, leave open (and which close themselves)
-// http://dev.w3.org/html5/spec/Overview.html#optional-tags
-var optionalEndTagBlockElements = makeMap("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),
- optionalEndTagInlineElements = makeMap("rp,rt"),
- optionalEndTagElements = angular.extend({}, optionalEndTagInlineElements, optionalEndTagBlockElements);
-
-// Safe Block Elements - HTML5
-var blockElements = angular.extend({}, optionalEndTagBlockElements, makeMap("address,article,aside," +
- "blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6," +
- "header,hgroup,hr,ins,map,menu,nav,ol,pre,script,section,table,ul"));
-
-// Inline Elements - HTML5
-var inlineElements = angular.extend({}, optionalEndTagInlineElements, makeMap("a,abbr,acronym,b,bdi,bdo," +
- "big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small," +
- "span,strike,strong,sub,sup,time,tt,u,var"));
-
-
-// Special Elements (can contain anything)
-var specialElements = makeMap("script,style");
-
-var validElements = angular.extend({}, voidElements, blockElements, inlineElements, optionalEndTagElements);
-
-//Attributes that have href and hence need to be sanitized
-var uriAttrs = makeMap("background,cite,href,longdesc,src,usemap");
-var validAttrs = angular.extend({}, uriAttrs, makeMap(
- 'abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,'+
- 'color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,'+
- 'ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,'+
- 'scope,scrolling,shape,span,start,summary,target,title,type,'+
- 'valign,value,vspace,width'));
-
-function makeMap(str) {
- var obj = {}, items = str.split(','), i;
- for (i = 0; i < items.length; i++) obj[items[i]] = true;
- return obj;
-}
-
-
-/**
- * @example
- * htmlParser(htmlString, {
- * start: function(tag, attrs, unary) {},
- * end: function(tag) {},
- * chars: function(text) {},
- * comment: function(text) {}
- * });
- *
- * @param {string} html string
- * @param {object} handler
- */
-function htmlParser( html, handler ) {
- var index, chars, match, stack = [], last = html;
- stack.last = function() { return stack[ stack.length - 1 ]; };
-
- while ( html ) {
- chars = true;
-
- // Make sure we're not in a script or style element
- if ( !stack.last() || !specialElements[ stack.last() ] ) {
-
- // Comment
- if ( html.indexOf("<!--") === 0 ) {
- index = html.indexOf("-->");
-
- if ( index >= 0 ) {
- if (handler.comment) handler.comment( html.substring( 4, index ) );
- html = html.substring( index + 3 );
- chars = false;
- }
-
- // end tag
- } else if ( BEGING_END_TAGE_REGEXP.test(html) ) {
- match = html.match( END_TAG_REGEXP );
-
- if ( match ) {
- html = html.substring( match[0].length );
- match[0].replace( END_TAG_REGEXP, parseEndTag );
- chars = false;
- }
-
- // start tag
- } else if ( BEGIN_TAG_REGEXP.test(html) ) {
- match = html.match( START_TAG_REGEXP );
-
- if ( match ) {
- html = html.substring( match[0].length );
- match[0].replace( START_TAG_REGEXP, parseStartTag );
- chars = false;
- }
- }
-
- if ( chars ) {
- index = html.indexOf("<");
-
- var text = index < 0 ? html : html.substring( 0, index );
- html = index < 0 ? "" : html.substring( index );
-
- if (handler.chars) handler.chars( decodeEntities(text) );
- }
-
- } else {
- html = html.replace(new RegExp("(.*)<\\s*\\/\\s*" + stack.last() + "[^>]*>", 'i'), function(all, text){
- text = text.
- replace(COMMENT_REGEXP, "$1").
- replace(CDATA_REGEXP, "$1");
-
- if (handler.chars) handler.chars( decodeEntities(text) );
-
- return "";
- });
-
- parseEndTag( "", stack.last() );
- }
-
- if ( html == last ) {
- throw "Parse Error: " + html;
- }
- last = html;
- }
-
- // Clean up any remaining tags
- parseEndTag();
-
- function parseStartTag( tag, tagName, rest, unary ) {
- tagName = angular.lowercase(tagName);
- if ( blockElements[ tagName ] ) {
- while ( stack.last() && inlineElements[ stack.last() ] ) {
- parseEndTag( "", stack.last() );
- }
- }
-
- if ( optionalEndTagElements[ tagName ] && stack.last() == tagName ) {
- parseEndTag( "", tagName );
- }
-
- unary = voidElements[ tagName ] || !!unary;
-
- if ( !unary )
- stack.push( tagName );
-
- var attrs = {};
-
- rest.replace(ATTR_REGEXP, function(match, name, doubleQuotedValue, singleQoutedValue, unqoutedValue) {
- var value = doubleQuotedValue
- || singleQoutedValue
- || unqoutedValue
- || '';
-
- attrs[name] = decodeEntities(value);
- });
- if (handler.start) handler.start( tagName, attrs, unary );
- }
-
- function parseEndTag( tag, tagName ) {
- var pos = 0, i;
- tagName = angular.lowercase(tagName);
- if ( tagName )
- // Find the closest opened tag of the same type
- for ( pos = stack.length - 1; pos >= 0; pos-- )
- if ( stack[ pos ] == tagName )
- break;
-
- if ( pos >= 0 ) {
- // Close all the open elements, up the stack
- for ( i = stack.length - 1; i >= pos; i-- )
- if (handler.end) handler.end( stack[ i ] );
-
- // Remove the open elements from the stack
- stack.length = pos;
- }
- }
-}
-
-/**
- * decodes all entities into regular string
- * @param value
- * @returns {string} A string with decoded entities.
- */
-var hiddenPre=document.createElement("pre");
-function decodeEntities(value) {
- hiddenPre.innerHTML=value.replace(/</g,"<");
- return hiddenPre.innerText || hiddenPre.textContent || '';
-}
-
-/**
- * Escapes all potentially dangerous characters, so that the
- * resulting string can be safely inserted into attribute or
- * element text.
- * @param value
- * @returns escaped text
- */
-function encodeEntities(value) {
- return value.
- replace(/&/g, '&').
- replace(NON_ALPHANUMERIC_REGEXP, function(value){
- return '&#' + value.charCodeAt(0) + ';';
- }).
- replace(/</g, '<').
- replace(/>/g, '>');
-}
-
-/**
- * create an HTML/XML writer which writes to buffer
- * @param {Array} buf use buf.jain('') to get out sanitized html string
- * @returns {object} in the form of {
- * start: function(tag, attrs, unary) {},
- * end: function(tag) {},
- * chars: function(text) {},
- * comment: function(text) {}
- * }
- */
-function htmlSanitizeWriter(buf){
- var ignore = false;
- var out = angular.bind(buf, buf.push);
- return {
- start: function(tag, attrs, unary){
- tag = angular.lowercase(tag);
- if (!ignore && specialElements[tag]) {
- ignore = tag;
- }
- if (!ignore && validElements[tag] == true) {
- out('<');
- out(tag);
- angular.forEach(attrs, function(value, key){
- var lkey=angular.lowercase(key);
- if (validAttrs[lkey]==true && (uriAttrs[lkey]!==true || value.match(URI_REGEXP))) {
- out(' ');
- out(key);
- out('="');
- out(encodeEntities(value));
- out('"');
- }
- });
- out(unary ? '/>' : '>');
- }
- },
- end: function(tag){
- tag = angular.lowercase(tag);
- if (!ignore && validElements[tag] == true) {
- out('</');
- out(tag);
- out('>');
- }
- if (tag == ignore) {
- ignore = false;
- }
- },
- chars: function(chars){
- if (!ignore) {
- out(encodeEntities(chars));
- }
- }
- };
-}
-
-
-// define ngSanitize module and register $sanitize service
-angular.module('ngSanitize', []).value('$sanitize', $sanitize);
-
-/**
- * @ngdoc directive
- * @name ngSanitize.directive:ngBindHtml
- *
- * @description
- * Creates a binding that will sanitize the result of evaluating the `expression` with the
- * {@link ngSanitize.$sanitize $sanitize} service and innerHTML the result into the current element.
- *
- * See {@link ngSanitize.$sanitize $sanitize} docs for examples.
- *
- * @element ANY
- * @param {expression} ngBindHtml {@link guide/expression Expression} to evaluate.
- */
-angular.module('ngSanitize').directive('ngBindHtml', ['$sanitize', function($sanitize) {
- return function(scope, element, attr) {
- element.addClass('ng-binding').data('$binding', attr.ngBindHtml);
- scope.$watch(attr.ngBindHtml, function ngBindHtmlWatchAction(value) {
- value = $sanitize(value);
- element.html(value || '');
- });
- };
-}]);
-/**
- * @ngdoc filter
- * @name ngSanitize.filter:linky
- * @function
- *
- * @description
- * Finds links in text input and turns them into html links. Supports http/https/ftp/mailto and
- * plain email address links.
- *
- * @param {string} text Input text.
- * @returns {string} Html-linkified text.
- *
- * @usage
- <span ng-bind-html="linky_expression | linky"></span>
- *
- * @example
- <doc:example module="ngSanitize">
- <doc:source>
- <script>
- function Ctrl($scope) {
- $scope.snippet =
- 'Pretty text with some links:\n'+
- 'http://angularjs.org/,\n'+
- 'mailto:us@somewhere.org,\n'+
- 'another@somewhere.org,\n'+
- 'and one more: ftp://127.0.0.1/.';
- }
- </script>
- <div ng-controller="Ctrl">
- Snippet: <textarea ng-model="snippet" cols="60" rows="3"></textarea>
- <table>
- <tr>
- <td>Filter</td>
- <td>Source</td>
- <td>Rendered</td>
- </tr>
- <tr id="linky-filter">
- <td>linky filter</td>
- <td>
- <pre><div ng-bind-html="snippet | linky"><br></div></pre>
- </td>
- <td>
- <div ng-bind-html="snippet | linky"></div>
- </td>
- </tr>
- <tr id="escaped-html">
- <td>no filter</td>
- <td><pre><div ng-bind="snippet"><br></div></pre></td>
- <td><div ng-bind="snippet"></div></td>
- </tr>
- </table>
- </doc:source>
- <doc:scenario>
- it('should linkify the snippet with urls', function() {
- expect(using('#linky-filter').binding('snippet | linky')).
- toBe('Pretty text with some links: ' +
- '<a href="http://angularjs.org/">http://angularjs.org/</a>, ' +
- '<a href="mailto:us@somewhere.org">us@somewhere.org</a>, ' +
- '<a href="mailto:another@somewhere.org">another@somewhere.org</a>, ' +
- 'and one more: <a href="ftp://127.0.0.1/">ftp://127.0.0.1/</a>.');
- });
-
- it ('should not linkify snippet without the linky filter', function() {
- expect(using('#escaped-html').binding('snippet')).
- toBe("Pretty text with some links:\n" +
- "http://angularjs.org/,\n" +
- "mailto:us@somewhere.org,\n" +
- "another@somewhere.org,\n" +
- "and one more: ftp://127.0.0.1/.");
- });
-
- it('should update', function() {
- input('snippet').enter('new http://link.');
- expect(using('#linky-filter').binding('snippet | linky')).
- toBe('new <a href="http://link">http://link</a>.');
- expect(using('#escaped-html').binding('snippet')).toBe('new http://link.');
- });
- </doc:scenario>
- </doc:example>
- */
-angular.module('ngSanitize').filter('linky', function() {
- var LINKY_URL_REGEXP = /((ftp|https?):\/\/|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s\.\;\,\(\)\{\}\<\>]/,
- MAILTO_REGEXP = /^mailto:/;
-
- return function(text) {
- if (!text) return text;
- var match;
- var raw = text;
- var html = [];
- // TODO(vojta): use $sanitize instead
- var writer = htmlSanitizeWriter(html);
- var url;
- var i;
- while ((match = raw.match(LINKY_URL_REGEXP))) {
- // We can not end in these as they are sometimes found at the end of the sentence
- url = match[0];
- // if we did not match ftp/http/mailto then assume mailto
- if (match[2] == match[3]) url = 'mailto:' + url;
- i = match.index;
- writer.chars(raw.substr(0, i));
- writer.start('a', {href:url});
- writer.chars(match[0].replace(MAILTO_REGEXP, ''));
- writer.end('a');
- raw = raw.substring(i + match[0].length);
- }
- writer.chars(raw);
- return html.join('');
- };
-});
-
-})(window, window.angular);
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/js/lib/angular/angular-sanitize.min.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/js/lib/angular/angular-sanitize.min.js b/ocw-ui/frontend/app/js/lib/angular/angular-sanitize.min.js
deleted file mode 100755
index 212a90a..0000000
--- a/ocw-ui/frontend/app/js/lib/angular/angular-sanitize.min.js
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- AngularJS v1.0.5
- (c) 2010-2012 Google, Inc. http://angularjs.org
- License: MIT
-*/
-(function(I,g){'use strict';function i(a){var d={},a=a.split(","),b;for(b=0;b<a.length;b++)d[a[b]]=!0;return d}function z(a,d){function b(a,b,c,h){b=g.lowercase(b);if(m[b])for(;f.last()&&n[f.last()];)e("",f.last());o[b]&&f.last()==b&&e("",b);(h=p[b]||!!h)||f.push(b);var j={};c.replace(A,function(a,b,d,e,c){j[b]=k(d||e||c||"")});d.start&&d.start(b,j,h)}function e(a,b){var e=0,c;if(b=g.lowercase(b))for(e=f.length-1;e>=0;e--)if(f[e]==b)break;if(e>=0){for(c=f.length-1;c>=e;c--)d.end&&d.end(f[c]);f.length=
-e}}var c,h,f=[],j=a;for(f.last=function(){return f[f.length-1]};a;){h=!0;if(!f.last()||!q[f.last()]){if(a.indexOf("<\!--")===0)c=a.indexOf("--\>"),c>=0&&(d.comment&&d.comment(a.substring(4,c)),a=a.substring(c+3),h=!1);else if(B.test(a)){if(c=a.match(r))a=a.substring(c[0].length),c[0].replace(r,e),h=!1}else if(C.test(a)&&(c=a.match(s)))a=a.substring(c[0].length),c[0].replace(s,b),h=!1;h&&(c=a.indexOf("<"),h=c<0?a:a.substring(0,c),a=c<0?"":a.substring(c),d.chars&&d.chars(k(h)))}else a=a.replace(RegExp("(.*)<\\s*\\/\\s*"+
-f.last()+"[^>]*>","i"),function(b,a){a=a.replace(D,"$1").replace(E,"$1");d.chars&&d.chars(k(a));return""}),e("",f.last());if(a==j)throw"Parse Error: "+a;j=a}e()}function k(a){l.innerHTML=a.replace(/</g,"<");return l.innerText||l.textContent||""}function t(a){return a.replace(/&/g,"&").replace(F,function(a){return"&#"+a.charCodeAt(0)+";"}).replace(/</g,"<").replace(/>/g,">")}function u(a){var d=!1,b=g.bind(a,a.push);return{start:function(a,c,h){a=g.lowercase(a);!d&&q[a]&&(d=a);!d&&v[a]==
-!0&&(b("<"),b(a),g.forEach(c,function(a,c){var e=g.lowercase(c);if(G[e]==!0&&(w[e]!==!0||a.match(H)))b(" "),b(c),b('="'),b(t(a)),b('"')}),b(h?"/>":">"))},end:function(a){a=g.lowercase(a);!d&&v[a]==!0&&(b("</"),b(a),b(">"));a==d&&(d=!1)},chars:function(a){d||b(t(a))}}}var s=/^<\s*([\w:-]+)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*>/,r=/^<\s*\/\s*([\w:-]+)[^>]*>/,A=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,C=/^</,B=/^<\s*\//,D=/<\!--(.*?)--\>/g,
-E=/<!\[CDATA\[(.*?)]]\>/g,H=/^((ftp|https?):\/\/|mailto:|#)/,F=/([^\#-~| |!])/g,p=i("area,br,col,hr,img,wbr"),x=i("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),y=i("rp,rt"),o=g.extend({},y,x),m=g.extend({},x,i("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,script,section,table,ul")),n=g.extend({},y,i("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),
-q=i("script,style"),v=g.extend({},p,m,n,o),w=i("background,cite,href,longdesc,src,usemap"),G=g.extend({},w,i("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,span,start,summary,target,title,type,valign,value,vspace,width")),l=document.createElement("pre");g.module("ngSanitize",[]).value("$sanitize",function(a){var d=[];
-z(a,u(d));return d.join("")});g.module("ngSanitize").directive("ngBindHtml",["$sanitize",function(a){return function(d,b,e){b.addClass("ng-binding").data("$binding",e.ngBindHtml);d.$watch(e.ngBindHtml,function(c){c=a(c);b.html(c||"")})}}]);g.module("ngSanitize").filter("linky",function(){var a=/((ftp|https?):\/\/|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s\.\;\,\(\)\{\}\<\>]/,d=/^mailto:/;return function(b){if(!b)return b;for(var e=b,c=[],h=u(c),f,g;b=e.match(a);)f=b[0],b[2]==b[3]&&(f="mailto:"+f),g=b.index,
-h.chars(e.substr(0,g)),h.start("a",{href:f}),h.chars(b[0].replace(d,"")),h.end("a"),e=e.substring(g+b[0].length);h.chars(e);return c.join("")}})})(window,window.angular);
[25/28] CLIMATE-512 - Replace frontend with new Yeoman/Grunt/Bower
frontend
Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/app/views/resultslist.html
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/app/views/resultslist.html b/ocw-ui/frontend-new/app/views/resultslist.html
deleted file mode 100644
index f4664c6..0000000
--- a/ocw-ui/frontend-new/app/views/resultslist.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<h4>Select one of your previous runs. If none are displayed, please return
- to the main page and start one!</h4>
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/app/views/selectobservation.html
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/app/views/selectobservation.html b/ocw-ui/frontend-new/app/views/selectobservation.html
deleted file mode 100644
index fd10ff8..0000000
--- a/ocw-ui/frontend-new/app/views/selectobservation.html
+++ /dev/null
@@ -1,80 +0,0 @@
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<div ng-controller="ObservationSelectCtrl">
- <div class="row">
- <div class="col-md-12">
- <div class="row">
- <!--<form class="form-inline" autocomplete="off">-->
- <form class="form" autocomplete="off">
- <div class="form-group">
- <div class="col-md-9">
- <input id="observationFileInput" predictive-file-browser-input ng-model="filePathInput" type="text" class="form-control" autocomplete="off" placeholder="Navigate to a .nc file. Start by typing '/'" />
- </div>
- <div class="col-md-2">
- <button class="btn" ng-click="uploadLocalFile()" ng-disabled="shouldDisableLoadButton()">
- <div ng-hide="loadingFile">Parse File</div>
- <div ng-show="loadingFile"><i class="icon-spinner icon-spin"></i></div>
- </button>
- </div>
- </div>
- </form>
- </div>
- <hr />
- <div class="row top3">
- <div class="col-md-5 text-center">
- Evaluation Variable
- </div>
- <div class="col-md-6">
- <select class="form-control" ng-model="paramSelect" ng-options="param for param in params"></select>
- </div>
- </div>
- <div class="row top3">
- <div class="col-md-5 text-center">
- Latitude Variable
- </div>
- <div class="col-md-6">
- <select class="form-control" ng-model="latsSelect" ng-options="lat for lat in lats"></select>
- </div>
- </div>
- <div class="row top3">
- <div class="col-md-5 text-center">
- Longitude Variable
- </div>
- <div class="col-md-6">
- <select class="form-control" ng-model="lonsSelect" ng-options="lon for lon in lons"></select>
- </div>
- </div>
- <div class="row top3">
- <div class="col-md-5 text-center">
- Date/Time Variable
- </div>
- <div class="col-md-6">
- <select class="form-control" ng-model="timeSelect" ng-options="time for time in times"></select>
- </div>
- </div>
- </div>
- </div>
- <div class="row top3">
- <div class="col-md-3 col-md-offset-1">
- <button class="btn btn-primary btn-block" ng-click="addDataSet()">Add Dataset</button>
- </div>
- <div class="pull-left small-alert" ng-show="fileAdded">Successfully added dataset...</div>
- </div>
-</div>
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/app/views/selectrcmed.html
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/app/views/selectrcmed.html b/ocw-ui/frontend-new/app/views/selectrcmed.html
deleted file mode 100644
index 6b09f48..0000000
--- a/ocw-ui/frontend-new/app/views/selectrcmed.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<div ng-controller="RcmedSelectionCtrl">
- <div class="row">
- <div class="col-md-10 col-md-offset-1">
- <div class="row top3">Select the RCMED dataset that you would like use.</div>
- <div class="row top3">
- <select ng-change="dataSelectUpdated()" class="form-control" ng-model="datasetSelection" ng-options="obs as obs.longname for obs in availableObs"></select>
- </div>
- <div class="row top3">Select the dataset parameter that you would like to test.</div>
- <div class="row top3">
- <select class="form-control" ng-model="parameterSelection" ng-options="param as param.shortname for param in retrievedObsParams"></select>
- </div>
-
- <div class="row top3">
- <div class="col-md-3">
- <button class="btn btn-primary btn-block-left" ng-click="addObservation()">Add Observation</button>
- </div>
- <div class="pull-left small-alert" ng-show="fileAdded">Successfully added dataset...</div>
- </div>
- </div>
- </div>
-</div>
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/bower.json
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/bower.json b/ocw-ui/frontend-new/bower.json
deleted file mode 100644
index d288a19..0000000
--- a/ocw-ui/frontend-new/bower.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- "name": "ocw-ui",
- "version": "0.0.0",
- "dependencies": {
- "angular": "1.2.16",
- "json3": "~3.3.1",
- "es5-shim": "~3.1.0",
- "bootstrap": "~3.2.0",
- "angular-resource": "1.2.16",
- "angular-cookies": "1.2.16",
- "angular-animate": "1.2.16",
- "angular-route": "1.2.16",
- "angular-ui-router": "angular-ui/ui-router#~0.2.10",
- "leaflet": "~0.7.3",
- "chap-links-timeline": "~2.6.1",
- "components-font-awesome": "~4.1.0",
- "angular-bootstrap": "~0.11.0",
- "angular-ui-date": "~0.0.3"
- },
- "devDependencies": {
- "angular-mocks": "1.2.16",
- "angular-scenario": "1.2.16"
- },
- "appPath": "app"
-}
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/package.json
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/package.json b/ocw-ui/frontend-new/package.json
deleted file mode 100644
index be2f597..0000000
--- a/ocw-ui/frontend-new/package.json
+++ /dev/null
@@ -1,40 +0,0 @@
-{
- "name": "ocwui",
- "version": "0.0.0",
- "dependencies": {},
- "devDependencies": {
- "grunt": "^0.4.1",
- "grunt-autoprefixer": "^0.7.3",
- "grunt-concurrent": "^0.5.0",
- "grunt-contrib-clean": "^0.5.0",
- "grunt-contrib-concat": "^0.4.0",
- "grunt-contrib-connect": "^0.7.1",
- "grunt-contrib-copy": "^0.5.0",
- "grunt-contrib-cssmin": "^0.9.0",
- "grunt-contrib-htmlmin": "^0.3.0",
- "grunt-contrib-imagemin": "^0.7.0",
- "grunt-contrib-jshint": "^0.10.0",
- "grunt-contrib-uglify": "^0.4.0",
- "grunt-contrib-watch": "^0.6.1",
- "grunt-filerev": "^0.2.1",
- "grunt-google-cdn": "^0.4.0",
- "grunt-karma": "^0.8.3",
- "grunt-newer": "^0.7.0",
- "grunt-ngmin": "^0.0.3",
- "grunt-svgmin": "^0.4.0",
- "grunt-usemin": "^2.1.1",
- "grunt-wiredep": "^1.8.0",
- "jshint-stylish": "^0.2.0",
- "karma": "^0.12.17",
- "karma-jasmine": "^0.1.5",
- "karma-phantomjs-launcher": "^0.1.4",
- "load-grunt-tasks": "^0.4.0",
- "time-grunt": "^0.3.1"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "scripts": {
- "test": "grunt test"
- }
-}
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/test/.jshintrc
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/test/.jshintrc b/ocw-ui/frontend-new/test/.jshintrc
deleted file mode 100644
index b1be025..0000000
--- a/ocw-ui/frontend-new/test/.jshintrc
+++ /dev/null
@@ -1,36 +0,0 @@
-{
- "node": true,
- "browser": true,
- "esnext": true,
- "bitwise": true,
- "camelcase": true,
- "curly": true,
- "eqeqeq": true,
- "immed": true,
- "indent": 2,
- "latedef": true,
- "newcap": true,
- "noarg": true,
- "quotmark": "single",
- "regexp": true,
- "undef": true,
- "unused": true,
- "strict": true,
- "trailing": true,
- "smarttabs": true,
- "globals": {
- "after": false,
- "afterEach": false,
- "angular": false,
- "before": false,
- "beforeEach": false,
- "browser": false,
- "describe": false,
- "expect": false,
- "inject": false,
- "it": false,
- "jasmine": false,
- "spyOn": false
- }
-}
-
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/test/karma.conf.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/test/karma.conf.js b/ocw-ui/frontend-new/test/karma.conf.js
deleted file mode 100644
index 744d927..0000000
--- a/ocw-ui/frontend-new/test/karma.conf.js
+++ /dev/null
@@ -1,86 +0,0 @@
-// Karma configuration
-// http://karma-runner.github.io/0.12/config/configuration-file.html
-// Generated on 2014-07-15 using
-// generator-karma 0.8.3
-
-module.exports = function(config) {
- 'use strict';
-
- config.set({
- // enable / disable watching file and executing tests whenever any file changes
- autoWatch: true,
-
- // base path, that will be used to resolve files and exclude
- basePath: '../',
-
- // testing framework to use (jasmine/mocha/qunit/...)
- frameworks: ['jasmine'],
-
- // list of files / patterns to load in the browser
- files: [
- 'bower_components/angular/angular.js',
- 'bower_components/angular-mocks/angular-mocks.js',
- 'bower_components/angular-animate/angular-animate.js',
- 'bower_components/angular-cookies/angular-cookies.js',
- 'bower_components/angular-resource/angular-resource.js',
- 'bower_components/angular-route/angular-route.js',
- 'bower_components/angular-animate/angular-animate.js',
- 'bower_components/angular-bootstrap/ui-bootstrap.js',
- // For some reason this causes the tests to completely fail to run
- // if it is uncommented.
- //'bower_components/angular-scenario/angular-scenario.js',
- 'bower_components/angular-ui-date/src/date.js',
- 'bower_components/angular-ui-router/release/angular-ui-router.js',
- 'bower_components/chap-links-timeline/timeline.js',
- 'bower_components/jquery/dist/jquery.js',
- 'bower_components/jquery-ui/jquery-ui.js',
- 'bower_components/leaflet/dist/leaflet.js',
- 'app/scripts/**/*.js',
- 'test/mock/**/*.js',
- 'test/spec/**/*.js'
- ],
-
- // list of files / patterns to exclude
- exclude: [],
-
- // web server port
- port: 8080,
-
- // Start these browsers, currently available:
- // - Chrome
- // - ChromeCanary
- // - Firefox
- // - Opera
- // - Safari (only Mac)
- // - PhantomJS
- // - IE (only Windows)
- browsers: [
- 'PhantomJS',
- //'Chrome'
- ],
-
- // Which plugins to enable
- plugins: [
- 'karma-phantomjs-launcher',
- 'karma-chrome-launcher',
- 'karma-jasmine'
- ],
-
- // Continuous Integration mode
- // if true, it capture browsers, run tests and exit
- singleRun: false,
-
- colors: true,
-
- // level of logging
- // possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG
- logLevel: config.LOG_INFO,
-
- // Uncomment the following lines if you are using grunt's server to run the tests
- // proxies: {
- // '/': 'http://localhost:9000/'
- // },
- // URL root prevent conflicts with the site root
- // urlRoot: '_karma_'
- });
-};
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/test/spec/controllers/datasetdisplay.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/test/spec/controllers/datasetdisplay.js b/ocw-ui/frontend-new/test/spec/controllers/datasetdisplay.js
deleted file mode 100644
index 15a4a02..0000000
--- a/ocw-ui/frontend-new/test/spec/controllers/datasetdisplay.js
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict';
-
-describe('Controller: DatasetDisplayCtrl', function () {
-
- // load the controller's module
- beforeEach(module('ocwUiApp'));
-
- var DatasetdisplayctrlCtrl,
- scope;
-
- // Initialize the controller and a mock scope
- beforeEach(inject(function ($controller, $rootScope) {
- scope = $rootScope.$new();
- DatasetdisplayctrlCtrl = $controller('DatasetDisplayCtrl', {
- $scope: scope
- });
- }));
-
- it('should initialize the removeDataset function', function() {
- scope.datasets.push(1);
- scope.datasets.push(2);
-
- expect(scope.datasets[0]).toBe(1);
-
- scope.removeDataset(0);
-
- expect(scope.datasets[0]).toBe(2);
- });
-
- it('should initialize the removeDataset function', function() {
- scope.datasets.push(1);
- scope.datasets.push(2);
-
- expect(scope.datasets[0]).toBe(1);
-
- scope.removeDataset(0);
-
- expect(scope.datasets[0]).toBe(2);
- });
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/test/spec/controllers/datasetselect.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/test/spec/controllers/datasetselect.js b/ocw-ui/frontend-new/test/spec/controllers/datasetselect.js
deleted file mode 100644
index abaeb43..0000000
--- a/ocw-ui/frontend-new/test/spec/controllers/datasetselect.js
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict';
-
-describe('Controller: DatasetSelectCtrl', function () {
-
- // load the controller's module
- beforeEach(module('ocwUiApp'));
-
- var DatasetselectCtrl,
- scope;
-
- // Initialize the controller and a mock scope
- beforeEach(inject(function ($controller, $rootScope) {
- scope = $rootScope.$new();
- DatasetselectCtrl = $controller('DatasetSelectCtrl', {
- $scope: scope
- });
- }));
-
- it('should initialize the disable clear button function', function() {
- inject(function(selectedDatasetInformation) {
- expect(scope.shouldDisableClearButton()).toBe(true);
- selectedDatasetInformation.addDataset({});
- expect(scope.shouldDisableClearButton()).toBe(false);
- });
- });
-
- it('should initialize the clear datasets function', function() {
- inject(function(selectedDatasetInformation) {
- selectedDatasetInformation.addDataset({});
- expect(selectedDatasetInformation.getDatasetCount()).toBe(1);
- scope.clearDatasets();
- expect(selectedDatasetInformation.getDatasetCount()).toBe(0);
- });
- });
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/test/spec/controllers/main.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/test/spec/controllers/main.js b/ocw-ui/frontend-new/test/spec/controllers/main.js
deleted file mode 100644
index dad1469..0000000
--- a/ocw-ui/frontend-new/test/spec/controllers/main.js
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict';
-
-describe('Controller: MainCtrl', function () {
-
- // load the controller's module
- beforeEach(module('ocwUiApp'));
-
- var MainCtrl,
- scope;
-
- // Initialize the controller and a mock scope
- beforeEach(inject(function ($controller, $rootScope) {
- scope = $rootScope.$new();
- MainCtrl = $controller('MainCtrl', {
- $scope: scope
- });
- }));
-
- it('should attach a list of awesomeThings to the scope', function () {
- expect(scope.awesomeThings.length).toBe(3);
- });
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/test/spec/controllers/observationselect.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/test/spec/controllers/observationselect.js b/ocw-ui/frontend-new/test/spec/controllers/observationselect.js
deleted file mode 100644
index f544e22..0000000
--- a/ocw-ui/frontend-new/test/spec/controllers/observationselect.js
+++ /dev/null
@@ -1,122 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict';
-
-describe('Controller: ObservationSelectCtrl', function () {
-
- // load the controller's module
- beforeEach(module('ocwUiApp'));
-
- var ObservationselectCtrl,
- scope;
-
- // Initialize the controller and a mock scope
- beforeEach(inject(function ($controller, $rootScope) {
- scope = $rootScope.$new();
- ObservationselectCtrl = $controller('ObservationSelectCtrl', {
- $scope: scope
- });
- }));
-
- it('should grab the default set of selected datasets from the service', function() {
- expect(typeof scope.datasetCount).toBe('object');
- expect(Object.keys(scope.datasetCount).length).toBe(0);
- });
-
- it('should initialize option arrays and default to the first element', function() {
- expect(scope.params.length).toBe(1);
- expect(scope.lats.length).toBe(1);
- expect(scope.lons.length).toBe(1);
- expect(scope.times.length).toBe(1);
-
- expect(scope.params[0]).toEqual("Please select a file above");
- expect(scope.lats[0]).toEqual("Please select a file above");
- expect(scope.lons[0]).toEqual("Please select a file above");
- expect(scope.times[0]).toEqual("Please select a file above");
- });
-
- it('should initialize scope attributes properly', function() {
- inject(function($httpBackend, $rootScope, $controller) {
- $rootScope.baseURL = "http://localhost:8082"
- $httpBackend.expectJSONP($rootScope.baseURL + '/dir/path_leader/?callback=JSON_CALLBACK').
- respond(200, {'leader': '/usr/local/ocw'});
- $httpBackend.whenGET('views/main.html').respond(200);
- $httpBackend.flush();
-
- expect(scope.pathLeader).toEqual('/usr/local/ocw');
- expect(scope.loadingFile).toBe(false);
- expect(scope.fileAdded).toBe(false);
- expect(typeof scope.latLonVals).toEqual('object');
- expect(scope.latLonVals.length).toBe(0);
- expect(typeof scope.timeVals).toEqual('object');
- expect(scope.timeVals.length).toEqual(0);
- expect(typeof scope.localSelectForm).toEqual('object');
- expect(Object.keys(scope.localSelectForm).length).toEqual(0);
- });
- });
-
- it('should initialize the uploadLocalFile function', function() {
- inject(function($httpBackend, $rootScope, $controller) {
- $rootScope.baseURL = "http://localhost:8082"
- $httpBackend.expectJSONP($rootScope.baseURL + '/dir/path_leader/?callback=JSON_CALLBACK').
- respond(200, {'leader': null});
- $httpBackend.whenGET('views/main.html').respond(200);
-
- $httpBackend.expectJSONP($rootScope.baseURL + '/lfme/list_vars/undefined?callback=JSON_CALLBACK').
- respond(200, {"variables": ["lat", "lon", "prec", "time" ]});
- $httpBackend.expectJSONP($rootScope.baseURL + '/lfme/list_latlon/undefined?callback=JSON_CALLBACK').
- respond(200, {'latMax': '75.25', 'success': 1, 'lat_name': 'lat', 'lonMax': '-29.75', 'lonMin': '-159.75', 'lon_name': 'lon', 'latMin': '15.25'});
- $httpBackend.expectJSONP($rootScope.baseURL + '/lfme/list_time/undefined?callback=JSON_CALLBACK').
- respond(200, {"start_time": "1980-01-01 00:00:00", "time_name": "time", "success": 1, "end_time": "2004-12-01 00:00:00"});
-
- scope.uploadLocalFile();
- $httpBackend.flush();
-
- expect(scope.latsSelect).toEqual("lat");
- expect(scope.lonsSelect).toEqual("lon");
- expect(scope.timeSelect).toEqual("time");
- expect(scope.paramSelect).toEqual("prec");
-
- // Simulate failure on one of the backend calls. Should
- $httpBackend.expectJSONP($rootScope.baseURL + '/lfme/list_vars/undefined?callback=JSON_CALLBACK').
- respond(200, {});
- $httpBackend.expectJSONP($rootScope.baseURL + '/lfme/list_latlon/undefined?callback=JSON_CALLBACK').
- respond(404, {});
- $httpBackend.expectJSONP($rootScope.baseURL + '/lfme/list_time/undefined?callback=JSON_CALLBACK').
- respond(200, {});
-
- scope.uploadLocalFile();
- $httpBackend.flush();
-
- expect(scope.paramSelect).toEqual("Unable to load variable(s)");
- expect(scope.params.length).toEqual(1);
- expect(scope.latsSelect).toEqual("Unable to load variable(s)");
- expect(scope.lats.length).toEqual(1);
- expect(scope.lonsSelect).toEqual("Unable to load variable(s)");
- expect(scope.lons.length).toEqual(1);
- expect(scope.timeSelect).toEqual("Unable to load variable(s)");
- expect(scope.times.length).toEqual(1);
- });
- });
-
- it('should initialize the addDatasets function', function() {
- expect(typeof(scope.addDataSet)).toBe("function");
- });
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/test/spec/controllers/parameterselect.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/test/spec/controllers/parameterselect.js b/ocw-ui/frontend-new/test/spec/controllers/parameterselect.js
deleted file mode 100644
index aa4cbd8..0000000
--- a/ocw-ui/frontend-new/test/spec/controllers/parameterselect.js
+++ /dev/null
@@ -1,136 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict';
-
-describe('Controller: ParameterSelectCtrl', function () {
-
- // load the controller's module
- beforeEach(module('ocwUiApp'));
-
- var ParameterselectCtrl,
- scope;
-
- // Initialize the controller and a mock scope
- beforeEach(inject(function ($controller, $rootScope) {
- scope = $rootScope.$new();
- ParameterselectCtrl = $controller('ParameterSelectCtrl', {
- $scope: scope
- });
- }));
-
- it('should initialize spatial and temporal range default values properly', function() {
- expect(scope.latMin).toBe(-90);
- expect(scope.latMax).toBe(90);
- expect(scope.lonMin).toBe(-180);
- expect(scope.lonMax).toBe(180);
- expect(scope.start).toBe("1900-01-01 00:00:00");
- expect(scope.end).toBe("2030-01-01 00:00:00");
- });
-
- it('should grab the default set of selected datasets from the service', function() {
- // We should get an object with no keys since the user hasn't selected any
- // datasets by default. Object.keys returns an array of all the user defined
- // keys in the object.
- expect(typeof scope.datasets).toBe('object');
- expect(Object.keys(scope.datasets).length).toBe(0);
- });
-
- it('should grab the default region select param object from the regionSelectParams service', function() {
- // The default display values aren't going to be changing any time soon. This test
- // is a bit of a duplicate since this is really testing functionality of the service.
- // Can't hurt to make sure that we're getting results though!
- expect(typeof scope.displayParams).toBe('object');
- expect(Object.keys(scope.displayParams).length).toBe(7);
- });
-
- it('should initialize misc. values properly', function() {
- expect(scope.runningEval).toBe(false);
- expect(scope.areInUserRegridState).toBe(false);
- expect(scope.latSliderVal).toBe(0);
- expect(scope.lonSliderVal).toBe(0);
- });
-
- it('should set the default datepicker settings', function() {
- // This tests the default values that get passed to the datepicker objects that we
- // initialize with a directive.
- expect(Object.keys(scope.datepickerSettings).length).toBe(2);
- expect(scope.datepickerSettings.changeMonth).toBe(true);
- expect(scope.datepickerSettings.changeYear).toBe(true);
- });
-
- it('should initialize the control disable function', function() {
- // Add to dummy values to datasets to make sure the disable function
- // triggers properly.
- scope.datasets.push(1);
- scope.datasets.push(2);
- expect(scope.shouldDisableControls()).toBe(false);
- });
-
- it('should initialize the disable evaluation button function', function() {
- expect(scope.shouldDisableEvaluateButton()).toBe(true);
- scope.datasets.push(1);
- expect(scope.shouldDisableEvaluateButton()).toBe(true);
- scope.datasets.push(2);
- expect(scope.shouldDisableEvaluateButton()).toBe(false);
- scope.runningEval = true;
- expect(scope.shouldDisableEvaluateButton()).toBe(true);
- });
-
- it('should initialize the disable results view function', function() {
- inject(function($rootScope) {
- expect(scope.shouldDisableResultsView()).toBe(true);
-
- // Set evalResults to something other than the default value
- $rootScope.evalResults = "this is not an empty string";
-
- expect(scope.shouldDisableResultsView()).toBe(false);
- });
- });
-
- /*
- * TODO: $scope.$apply() in the controller is breaking this test. Need to
- * find a way to deal with that or rethink how we handle this test.
- *
- */
- /*
- it('should initialize the check parameters function', function() {
- // Set the displayParams values to be "out of bounds" values so checkParams
- // adjusts them properly.
- scope.displayParams.latMin = "-95";
- scope.displayParams.latMax = "95";
- scope.displayParams.lonMin = "-185";
- scope.displayParams.lonMax = "185";
- scope.displayParams.start = "1980-00-00 00:00:00";
- scope.displayParams.end = "2031-01-01 00:00:00";
-
- // If we don't remove the watch on datasets we end up with displayParam values
- // all being undefined (but only during testing, which is odd...)
- scope.unwatchDatasets();
- scope.checkParameters();
-
- expect(scope.displayParams.latMin).toBe(-90);
- expect(scope.displayParams.latMax).toBe(90);
- expect(scope.displayParams.lonMin).toBe(-180);
- expect(scope.displayParams.lonMax).toBe(180);
- expect(scope.displayParams.start).toBe('1980-01-01 00:00:00');
- expect(scope.displayParams.end).toBe('2030-01-01 00:00:00');
- });
- */
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/test/spec/controllers/rcmedselection.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/test/spec/controllers/rcmedselection.js b/ocw-ui/frontend-new/test/spec/controllers/rcmedselection.js
deleted file mode 100644
index 97011c7..0000000
--- a/ocw-ui/frontend-new/test/spec/controllers/rcmedselection.js
+++ /dev/null
@@ -1,145 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict';
-
-describe('Controller: RcmedSelectionCtrl', function () {
-
- // load the controller's module
- beforeEach(module('ocwUiApp'));
-
- var RcmedselectionCtrl,
- scope;
-
- // Initialize the controller and a mock scope
- beforeEach(inject(function ($controller, $rootScope) {
- scope = $rootScope.$new();
- RcmedselectionCtrl = $controller('RcmedSelectionCtrl', {
- $scope: scope
- });
- }));
-
- it('should automatically query RCMED on initialization', function() {
- inject(function($rootScope, $httpBackend) {
- $httpBackend.expectJSONP($rootScope.baseURL + '/rcmed/datasets/?callback=JSON_CALLBACK').
- respond(200, [{longname: 1}, {longname: 2}]);
- $httpBackend.expectGET($rootScope.baseURL + '/rcmed/parameters/bounds/').respond(503)
- $httpBackend.expectGET('views/main.html').respond(200);
- $httpBackend.flush();
-
- expect(scope.availableObs.length).toBe(3);
- expect(scope.availableObs[0]).toEqual({longname: "Please select an option"});
- expect(scope.availableObs[1]).toEqual({longname: 1});
- });
- });
-
- it('should initialize the getObservations function', function() {
- inject(function($rootScope, $httpBackend) {
- $httpBackend.expectJSONP($rootScope.baseURL + '/rcmed/datasets/?callback=JSON_CALLBACK').
- respond(200, [{longname: 1}, {longname: 2}]);
- $httpBackend.expectGET($rootScope.baseURL + '/rcmed/parameters/bounds/').respond(503)
- $httpBackend.expectGET('views/main.html').respond(200);
- $httpBackend.flush();
-
- expect(scope.availableObs.length).toBe(3);
- expect(scope.availableObs[0]).toEqual({longname: "Please select an option"});
- expect(scope.availableObs[1]).toEqual({longname: 1});
-
- // Set up a failed query
- $httpBackend.expectJSONP($rootScope.baseURL + '/rcmed/datasets/?callback=JSON_CALLBACK').
- respond(404);
- scope.getObservations();
- $httpBackend.flush();
-
- expect(scope.availableObs.length).toBe(1);
- expect(scope.availableObs[0]).toEqual('Unable to query RCMED');
- });
- });
-
- it('should initialize dataSelectUpdated function', function() {
- inject(function($rootScope, $controller, $httpBackend) {
- $httpBackend.expectJSONP($rootScope.baseURL + '/rcmed/datasets/?callback=JSON_CALLBACK').
- respond(200, [{longname: 1}, {longname: 2}]);
- $httpBackend.expectGET($rootScope.baseURL + '/rcmed/parameters/bounds/').respond(503)
- $httpBackend.expectGET('views/main.html').respond(200);
- $httpBackend.flush();
-
- // Add the test dataset to our scope
- scope.datasetSelection = {shortname: 'TRMM'}
-
- // Test return with only single parameter
- $httpBackend.expectJSONP($rootScope.baseURL + '/rcmed/parameters/?dataset=' +
- scope.datasetSelection['shortname'] +
- '&callback=JSON_CALLBACK').
- respond(200, ['pcp']);
- scope.dataSelectUpdated();
- $httpBackend.flush();
-
- expect(scope.parameterSelection).toEqual('pcp');
-
- // Test return with multiple parameters
- $httpBackend.expectJSONP($rootScope.baseURL + '/rcmed/parameters/?dataset=' +
- scope.datasetSelection['shortname'] +
- '&callback=JSON_CALLBACK').
- respond(200, ['pcp', 'pcp2']);
- scope.dataSelectUpdated();
- $httpBackend.flush();
-
- expect(scope.parameterSelection).toEqual({shortname: 'Please select a parameter'});
- });
- });
-
- it('should initialze the addObservation function', function() {
- inject(function($rootScope, $controller, $httpBackend) {
- $httpBackend.expectJSONP($rootScope.baseURL + '/rcmed/datasets/?callback=JSON_CALLBACK').
- respond(200, [{longname: 1}, {longname: 2}]);
- $httpBackend.expectGET($rootScope.baseURL + '/rcmed/parameters/bounds/').respond(503)
- $httpBackend.expectGET('views/main.html').respond(200);
- $httpBackend.flush();
-
- scope.datasetSelection = {
- "dataset_id" : "3",
- "shortname" : "TRMM",
- "longname" : "Tropical Rainfall Measuring Mission Dataset",
- "source" : "Readme for the Tropical Rainfall Measuring Mission (TRMM) Data Set"
- };
-
- scope.parameterSelection = {
- "parameter_id":"36",
- "shortname":"pcp",
- "datasetshortname":"TRMM",
- "longname":"TRMM v.6 Monthly Precipitation",
- "units":"mm\/day"
- };
-
- // addObservations does a refresh of the selections with a re-query of the backend
- // so we need to catch that call!
- $httpBackend.expectJSONP($rootScope.baseURL + '/rcmed/datasets/?callback=JSON_CALLBACK').
- respond(200, [{longname: 1}, {longname: 2}]);
-
- scope.addObservation();
- $httpBackend.flush();
-
- expect(scope.datasetCount.length).toBe(1);
- // The selection observation should be reset so we shouldn't have
- // any selected observation parameters.
- expect(scope.retrievedObsParams).toEqual([]);
- });
- });
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/test/spec/controllers/result.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/test/spec/controllers/result.js b/ocw-ui/frontend-new/test/spec/controllers/result.js
deleted file mode 100644
index 495a473..0000000
--- a/ocw-ui/frontend-new/test/spec/controllers/result.js
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict';
-
-describe('Controller: ResultCtrl', function () {
-
- // load the controller's module
- beforeEach(module('ocwUiApp'));
-
- var ResultCtrl,
- scope;
-
- // Initialize the controller and a mock scope
- beforeEach(inject(function ($controller, $rootScope) {
- scope = $rootScope.$new();
- ResultCtrl = $controller('ResultCtrl', {
- $scope: scope
- });
- }));
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/test/spec/controllers/resultdetail.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/test/spec/controllers/resultdetail.js b/ocw-ui/frontend-new/test/spec/controllers/resultdetail.js
deleted file mode 100644
index a29e508..0000000
--- a/ocw-ui/frontend-new/test/spec/controllers/resultdetail.js
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict';
-
-describe('Controller: ResultdetailCtrl', function () {
-
- // load the controller's module
- beforeEach(module('ocwUiApp'));
-
- var ResultdetailCtrl,
- scope;
-
- // Initialize the controller and a mock scope
- beforeEach(inject(function ($controller, $rootScope) {
- scope = $rootScope.$new();
- ResultdetailCtrl = $controller('ResultdetailCtrl', {
- $scope: scope
- });
- }));
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/test/spec/controllers/settings.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/test/spec/controllers/settings.js b/ocw-ui/frontend-new/test/spec/controllers/settings.js
deleted file mode 100644
index e45accd..0000000
--- a/ocw-ui/frontend-new/test/spec/controllers/settings.js
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict';
-
-describe('Controller: SettingsCtrl', function () {
-
- // load the controller's module
- beforeEach(module('ocwUiApp'));
-
- var SettingsCtrl,
- scope;
-
- // Initialize the controller and a mock scope
- beforeEach(inject(function ($controller, $rootScope) {
- scope = $rootScope.$new();
- SettingsCtrl = $controller('SettingsCtrl', {
- $scope: scope
- });
- }));
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/test/spec/controllers/timeline.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/test/spec/controllers/timeline.js b/ocw-ui/frontend-new/test/spec/controllers/timeline.js
deleted file mode 100644
index 1f3580f..0000000
--- a/ocw-ui/frontend-new/test/spec/controllers/timeline.js
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict';
-
-describe('Controller: TimelineCtrl', function () {
-
- // load the controller's module
- beforeEach(module('ocwUiApp'));
-
- var TimelineCtrl,
- scope;
-
- // Initialize the controller and a mock scope
- beforeEach(inject(function ($controller, $rootScope) {
- scope = $rootScope.$new();
- TimelineCtrl = $controller('TimelineCtrl', {
- $scope: scope
- });
- }));
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/test/spec/controllers/worldmap.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/test/spec/controllers/worldmap.js b/ocw-ui/frontend-new/test/spec/controllers/worldmap.js
deleted file mode 100644
index 76c702b..0000000
--- a/ocw-ui/frontend-new/test/spec/controllers/worldmap.js
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict';
-
-describe('Controller: WorldMapCtrl', function () {
-
- // load the controller's module
- beforeEach(module('ocwUiApp'));
-
- var WorldmapCtrl,
- scope;
-
- // Initialize the controller and a mock scope
- beforeEach(inject(function ($controller, $rootScope) {
- scope = $rootScope.$new();
- WorldmapCtrl = $controller('WorldMapCtrl', {
- $scope: scope
- });
- }));
-
- it('should initialize the updateMap function', function() {
- inject(function($rootScope, $controller) {
- var scope = $rootScope.$new();
- var ctrl = $controller("WorldMapCtrl", {$scope: scope});
-
- // Set the important attributes for a fake dataset
- scope.datasets.push({shouldDisplay: true, latlonVals: {latMin: 0, latMax: 0, lonMin: 0, lonMax: 0}});
- // Don't try to add the user defined region since we don't have one
- scope.regionParams.areValid = false;
- // We need to fake the map object. The only thing we care about is faking the "addLayer" function
- // and the "fitBounds" functions which our map controllers makes use of.
- $rootScope.map = {addLayer: function(){}, fitBounds: function(){}};
- $rootScope.fillColors = ['#ff0000'];
-
- expect("rectangleGroup" in $rootScope).toBe(false);
- scope.updateMap();
- expect("rectangleGroup" in $rootScope).toBe(true);
- });
- });
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/test/spec/directives/bootstrapmodal.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/test/spec/directives/bootstrapmodal.js b/ocw-ui/frontend-new/test/spec/directives/bootstrapmodal.js
deleted file mode 100644
index 465f65e..0000000
--- a/ocw-ui/frontend-new/test/spec/directives/bootstrapmodal.js
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict';
-
-describe('Directive: bootstrapModal', function () {
-
- // load the directive's module
- beforeEach(module('ocwUiApp'));
-
- var element,
- scope;
-
- beforeEach(inject(function ($rootScope) {
- scope = $rootScope.$new();
- }));
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/test/spec/directives/bootstrapmodalopen.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/test/spec/directives/bootstrapmodalopen.js b/ocw-ui/frontend-new/test/spec/directives/bootstrapmodalopen.js
deleted file mode 100644
index 699210c..0000000
--- a/ocw-ui/frontend-new/test/spec/directives/bootstrapmodalopen.js
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict';
-
-describe('Directive: bootstrapModalOpen', function () {
-
- // load the directive's module
- beforeEach(module('ocwUiApp'));
-
- var element,
- scope;
-
- beforeEach(inject(function ($rootScope) {
- scope = $rootScope.$new();
- }));
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/test/spec/directives/leafletmap.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/test/spec/directives/leafletmap.js b/ocw-ui/frontend-new/test/spec/directives/leafletmap.js
deleted file mode 100644
index 85ccc6d..0000000
--- a/ocw-ui/frontend-new/test/spec/directives/leafletmap.js
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict';
-
-describe('Directive: leafletMap', function () {
-
- // load the directive's module
- beforeEach(module('ocwUiApp'));
-
- var element,
- scope;
-
- beforeEach(inject(function ($rootScope) {
- scope = $rootScope.$new();
- }));
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/test/spec/directives/onblur.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/test/spec/directives/onblur.js b/ocw-ui/frontend-new/test/spec/directives/onblur.js
deleted file mode 100644
index 7e8b83a..0000000
--- a/ocw-ui/frontend-new/test/spec/directives/onblur.js
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict';
-
-describe('Directive: onBlur', function () {
-
- // load the directive's module
- beforeEach(module('ocwUiApp'));
-
- var element,
- scope;
-
- beforeEach(inject(function ($rootScope) {
- scope = $rootScope.$new();
- }));
-
- it('should call the supplied function on the blur event', function() {
- inject(function($compile) {
- // Set a scope variable to make sure that on-blur calls
- // the function that we pass to it.
- scope.bogusFunction = function() {
- scope.test = "hi"
- }
-
- var element = angular.element('<input on-blur="bogusFunction();" />')
- element = $compile(element)(scope)
-
- expect(scope.test).toNotBe('hi');
- element.triggerHandler('blur');
- expect(scope.test).toBe('hi');
- });
- });
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/test/spec/directives/predictivefilebrowserinput.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/test/spec/directives/predictivefilebrowserinput.js b/ocw-ui/frontend-new/test/spec/directives/predictivefilebrowserinput.js
deleted file mode 100644
index 162b361..0000000
--- a/ocw-ui/frontend-new/test/spec/directives/predictivefilebrowserinput.js
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict';
-
-describe('Directive: predictiveFileBrowserInput', function () {
-
- // load the directive's module
- beforeEach(module('ocwUiApp'));
-
- var element,
- scope;
-
- beforeEach(inject(function ($rootScope) {
- scope = $rootScope.$new();
- }));
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/test/spec/directives/previewmap.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/test/spec/directives/previewmap.js b/ocw-ui/frontend-new/test/spec/directives/previewmap.js
deleted file mode 100644
index 2a831c6..0000000
--- a/ocw-ui/frontend-new/test/spec/directives/previewmap.js
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict';
-
-describe('Directive: previewMap', function () {
-
- // load the directive's module
- beforeEach(module('ocwUiApp'));
-
- var element,
- scope;
-
- beforeEach(inject(function ($rootScope) {
- scope = $rootScope.$new();
- }));
-
- it('should set the proper class', function() {
- inject(function($compile, $rootScope) {
- $rootScope.dataset = {latlonVals: {latMax: 90, lonMax: 90, latMin: -90, lonMin: -90}, name: "TRMM"};
-
- var element = $compile('<div preview-map="dataset"></div>')($rootScope);
-
- expect(element.hasClass("preview-map")).toBeTruthy();
- });
- });
-
- it('should set the id of the template to the name of the dataset', function() {
- inject(function($compile, $rootScope) {
- $rootScope.dataset = {latlonVals: {latMax: 90, lonMax: 90, latMin: -90, lonMin: -90}, name: "TRMM"};
-
- var element = $compile('<div preview-map="dataset"></div>')($rootScope);
-
- expect(element.attr('id')).toEqual("{{dataset.name}}");
- });
- });
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/test/spec/directives/timeline.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/test/spec/directives/timeline.js b/ocw-ui/frontend-new/test/spec/directives/timeline.js
deleted file mode 100644
index 06c72e1..0000000
--- a/ocw-ui/frontend-new/test/spec/directives/timeline.js
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict';
-
-describe('Directive: timeline', function () {
-
- // load the directive's module
- beforeEach(module('ocwUiApp'));
-
- var element,
- scope;
-
- beforeEach(inject(function ($rootScope) {
- scope = $rootScope.$new();
- }));
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/test/spec/filters/isodatetomiddleendian.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/test/spec/filters/isodatetomiddleendian.js b/ocw-ui/frontend-new/test/spec/filters/isodatetomiddleendian.js
deleted file mode 100644
index 966b333..0000000
--- a/ocw-ui/frontend-new/test/spec/filters/isodatetomiddleendian.js
+++ /dev/null
@@ -1,76 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict';
-
-describe('Filter: ISODateToMiddleEndian', function () {
-
- // load the filter's module
- beforeEach(module('ocwUiApp'));
-
- // initialize a new instance of the filter before each test
- var ISODateToMiddleEndian;
- beforeEach(inject(function ($filter) {
- ISODateToMiddleEndian = $filter('ISODateToMiddleEndian');
- }));
-
- describe('ISODateToMiddleEndian', function() {
- it('should replace the ISO Date/Time stamp', function() {
- inject(function($filter) {
- var filter = $filter('ISODateToMiddleEndian');
- expect(filter('2012-01-02T00:00:00')).toEqual('01/02/2012');
- });
- });
-
- it('should replace the modified ISO Date/Time stamp', function() {
- inject(function($filter) {
- var filter = $filter('ISODateToMiddleEndian');
- expect(filter('2012-01-02 00:00:00')).toEqual('01/02/2012');
- });
- });
-
- it('should replace the ISO Date stamp', function() {
- inject(function($filter) {
- var filter = $filter('ISODateToMiddleEndian');
- expect(filter('2012-01-02')).toEqual('01/02/2012');
- });
- });
-
- it('should replace leading and trailing whitespace', function() {
- inject(function($filter) {
- var filter = $filter('ISODateToMiddleEndian');
- expect(filter(' 2012-01-02T00:00:00 ')).toEqual('01/02/2012');
- });
- });
-
- it('should do nothing when the date format has the incorrect number of hyphens', function() {
- inject(function($filter) {
- var filter = $filter('ISODateToMiddleEndian');
- expect(filter('2012-234T234')).toEqual('2012-234T234')
- });
- });
-
- it('should do nothing when the date format has no hyphens', function() {
- inject(function($filter) {
- var filter = $filter('ISODateToMiddleEndian');
- expect(filter('2012234T234')).toEqual('2012234T234')
- });
- });
- });
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/test/spec/services/evaluationsettings.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/test/spec/services/evaluationsettings.js b/ocw-ui/frontend-new/test/spec/services/evaluationsettings.js
deleted file mode 100644
index 01fa63b..0000000
--- a/ocw-ui/frontend-new/test/spec/services/evaluationsettings.js
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict';
-
-describe('Service: evaluationSettings', function () {
-
- // load the service's module
- beforeEach(module('ocwUiApp'));
-
- // instantiate service
- var evaluationSettings;
- beforeEach(inject(function (_evaluationSettings_) {
- evaluationSettings = _evaluationSettings_;
- }));
-
- it('should initialize the evaluationSettings service', function() {
- inject(function(evaluationSettings) {
- expect(evaluationSettings).not.toEqual(null);
- });
- });
-
- it('should provide a getSettings function', function() {
- inject(function(evaluationSettings) {
- expect(evaluationSettings.getSettings()).not.toEqual(null);
- })
- })
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/test/spec/services/regionselectparams.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/test/spec/services/regionselectparams.js b/ocw-ui/frontend-new/test/spec/services/regionselectparams.js
deleted file mode 100644
index 34cfe54..0000000
--- a/ocw-ui/frontend-new/test/spec/services/regionselectparams.js
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict';
-
-describe('Service: regionSelectParams', function () {
-
- // load the service's module
- beforeEach(module('ocwUiApp'));
-
- // instantiate service
- var regionSelectParams;
- beforeEach(inject(function (_regionSelectParams_) {
- regionSelectParams = _regionSelectParams_;
- }));
-
- it('should initialize the regionSelectParams service', function() {
- inject(function(regionSelectParams) {
- expect(regionSelectParams).not.toEqual(null);
- });
- });
-
- it('should provide the getParameters function', function() {
- inject(function(regionSelectParams) {
- expect(regionSelectParams.getParameters()).not.toEqual(null);
- });
- });
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/test/spec/services/selecteddatasetinformation.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/test/spec/services/selecteddatasetinformation.js b/ocw-ui/frontend-new/test/spec/services/selecteddatasetinformation.js
deleted file mode 100644
index 60c1ac2..0000000
--- a/ocw-ui/frontend-new/test/spec/services/selecteddatasetinformation.js
+++ /dev/null
@@ -1,92 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict';
-
-describe('Service: selectedDatasetInformation', function () {
-
- // load the service's module
- beforeEach(module('ocwUiApp'));
-
- // instantiate service
- var selectedDatasetInformation;
- beforeEach(inject(function (_selectedDatasetInformation_) {
- selectedDatasetInformation = _selectedDatasetInformation_;
- }));
-
- it('should initialize the selectedDatasetInformation service', function() {
- inject(function(selectedDatasetInformation) {
- expect(selectedDatasetInformation).not.toEqual(null);
- });
- });
-
- it('should provide the getDatasets function', function() {
- inject(function(selectedDatasetInformation) {
- expect(selectedDatasetInformation.getDatasets()).not.toEqual(null);
- });
- });
-
- it('should provide the getDatasetCount function', function() {
- inject(function(selectedDatasetInformation) {
- expect(selectedDatasetInformation.getDatasetCount()).toEqual(0);
- });
- });
-
- it('should provide the addDataset function', function() {
- inject(function(selectedDatasetInformation) {
- selectedDatasetInformation.addDataset({});
- expect(selectedDatasetInformation.getDatasetCount()).toEqual(1);
- });
- });
-
- it('should set the shouldDisplay attribute when adding a dataset', function() {
- inject(function(selectedDatasetInformation) {
- selectedDatasetInformation.addDataset({});
- expect(selectedDatasetInformation.getDatasets()[0].shouldDisplay).toBe(false);
- });
- });
-
- it('should set the regrid attribute when adding a dataset', function() {
- inject(function(selectedDatasetInformation) {
- selectedDatasetInformation.addDataset({});
- expect(selectedDatasetInformation.getDatasets()[0].regrid).toBe(false);
- });
- });
-
- it('should provide the removeDataset function', function() {
- inject(function(selectedDatasetInformation) {
- selectedDatasetInformation.addDataset(1);
- selectedDatasetInformation.addDataset(2);
-
- expect(selectedDatasetInformation.getDatasets()[0]).toEqual(1);
- selectedDatasetInformation.removeDataset(0);
- expect(selectedDatasetInformation.getDatasets()[0]).toEqual(2);
- });
- });
-
- it('should provide the clearDatasets function', function() {
- inject(function(selectedDatasetInformation) {
- selectedDatasetInformation.addDataset({});
- expect(selectedDatasetInformation.getDatasetCount()).toEqual(1);
-
- selectedDatasetInformation.clearDatasets();
- expect(selectedDatasetInformation.getDatasetCount()).toEqual(0);
- });
- });
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/.bowerrc
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/.bowerrc b/ocw-ui/frontend/.bowerrc
new file mode 100644
index 0000000..69fad35
--- /dev/null
+++ b/ocw-ui/frontend/.bowerrc
@@ -0,0 +1,3 @@
+{
+ "directory": "bower_components"
+}
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/.editorconfig
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/.editorconfig b/ocw-ui/frontend/.editorconfig
new file mode 100644
index 0000000..c2cdfb8
--- /dev/null
+++ b/ocw-ui/frontend/.editorconfig
@@ -0,0 +1,21 @@
+# EditorConfig helps developers define and maintain consistent
+# coding styles between different editors and IDEs
+# editorconfig.org
+
+root = true
+
+
+[*]
+
+# Change these settings to your own preference
+indent_style = space
+indent_size = 2
+
+# We recommend you to keep these unchanged
+end_of_line = lf
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
+
+[*.md]
+trim_trailing_whitespace = false
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/.gitattributes
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/.gitattributes b/ocw-ui/frontend/.gitattributes
new file mode 100644
index 0000000..2125666
--- /dev/null
+++ b/ocw-ui/frontend/.gitattributes
@@ -0,0 +1 @@
+* text=auto
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/.gitignore
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/.gitignore b/ocw-ui/frontend/.gitignore
new file mode 100644
index 0000000..a22a458
--- /dev/null
+++ b/ocw-ui/frontend/.gitignore
@@ -0,0 +1,5 @@
+node_modules
+dist
+.tmp
+.sass-cache
+bower_components
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/.jshintrc
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/.jshintrc b/ocw-ui/frontend/.jshintrc
new file mode 100644
index 0000000..40377ba
--- /dev/null
+++ b/ocw-ui/frontend/.jshintrc
@@ -0,0 +1,24 @@
+{
+ "node": true,
+ "browser": true,
+ "esnext": true,
+ "bitwise": true,
+ "camelcase": true,
+ "curly": true,
+ "eqeqeq": true,
+ "immed": true,
+ "indent": 2,
+ "latedef": true,
+ "newcap": true,
+ "noarg": true,
+ "quotmark": "single",
+ "regexp": true,
+ "undef": true,
+ "unused": true,
+ "strict": true,
+ "trailing": true,
+ "smarttabs": true,
+ "globals": {
+ "angular": false
+ }
+}
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/.travis.yml
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/.travis.yml b/ocw-ui/frontend/.travis.yml
new file mode 100644
index 0000000..a80b6e0
--- /dev/null
+++ b/ocw-ui/frontend/.travis.yml
@@ -0,0 +1,6 @@
+language: node_js
+node_js:
+ - '0.10'
+before_script:
+ - 'npm install -g bower grunt-cli'
+ - 'bower install'
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/Gruntfile.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/Gruntfile.js b/ocw-ui/frontend/Gruntfile.js
new file mode 100644
index 0000000..0efb4ae
--- /dev/null
+++ b/ocw-ui/frontend/Gruntfile.js
@@ -0,0 +1,412 @@
+// Generated on 2014-07-15 using generator-angular 0.9.5
+'use strict';
+
+// # Globbing
+// for performance reasons we're only matching one level down:
+// 'test/spec/{,*/}*.js'
+// use this if you want to recursively match all subfolders:
+// 'test/spec/**/*.js'
+
+module.exports = function (grunt) {
+
+ // Load grunt tasks automatically
+ require('load-grunt-tasks')(grunt);
+
+ // Time how long tasks take. Can help when optimizing build times
+ require('time-grunt')(grunt);
+
+ // Configurable paths for the application
+ var appConfig = {
+ app: require('./bower.json').appPath || 'app',
+ dist: 'dist'
+ };
+
+ // Define the configuration for all the tasks
+ grunt.initConfig({
+
+ // Project settings
+ yeoman: appConfig,
+
+ // Watches files for changes and runs tasks based on the changed files
+ watch: {
+ bower: {
+ files: ['bower.json'],
+ tasks: ['wiredep']
+ },
+ js: {
+ files: ['<%= yeoman.app %>/scripts/{,*/}*.js'],
+ tasks: ['newer:jshint:all'],
+ options: {
+ livereload: '<%= connect.options.livereload %>'
+ }
+ },
+ jsTest: {
+ files: ['test/spec/{,*/}*.js'],
+ tasks: ['newer:jshint:test', 'karma']
+ },
+ styles: {
+ files: ['<%= yeoman.app %>/styles/{,*/}*.css'],
+ tasks: ['newer:copy:styles', 'autoprefixer']
+ },
+ gruntfile: {
+ files: ['Gruntfile.js']
+ },
+ livereload: {
+ options: {
+ livereload: '<%= connect.options.livereload %>'
+ },
+ files: [
+ '<%= yeoman.app %>/{,*/}*.html',
+ '.tmp/styles/{,*/}*.css',
+ '<%= yeoman.app %>/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}'
+ ]
+ }
+ },
+
+ // The actual grunt server settings
+ connect: {
+ options: {
+ port: 9000,
+ // Change this to '0.0.0.0' to access the server from outside.
+ hostname: 'localhost',
+ livereload: 35729
+ },
+ livereload: {
+ options: {
+ open: true,
+ middleware: function (connect) {
+ return [
+ connect.static('.tmp'),
+ connect().use(
+ '/bower_components',
+ connect.static('./bower_components')
+ ),
+ connect.static(appConfig.app)
+ ];
+ }
+ }
+ },
+ test: {
+ options: {
+ port: 9001,
+ middleware: function (connect) {
+ return [
+ connect.static('.tmp'),
+ connect.static('test'),
+ connect().use(
+ '/bower_components',
+ connect.static('./bower_components')
+ ),
+ connect.static(appConfig.app)
+ ];
+ }
+ }
+ },
+ dist: {
+ options: {
+ open: true,
+ base: '<%= yeoman.dist %>'
+ }
+ }
+ },
+
+ // Make sure code styles are up to par and there are no obvious mistakes
+ jshint: {
+ options: {
+ jshintrc: '.jshintrc',
+ reporter: require('jshint-stylish')
+ },
+ all: {
+ src: [
+ 'Gruntfile.js',
+ '<%= yeoman.app %>/scripts/{,*/}*.js'
+ ]
+ },
+ test: {
+ options: {
+ jshintrc: 'test/.jshintrc'
+ },
+ src: ['test/spec/{,*/}*.js']
+ }
+ },
+
+ // Empties folders to start fresh
+ clean: {
+ dist: {
+ files: [{
+ dot: true,
+ src: [
+ '.tmp',
+ '<%= yeoman.dist %>/{,*/}*',
+ '!<%= yeoman.dist %>/.git*'
+ ]
+ }]
+ },
+ server: '.tmp'
+ },
+
+ // Add vendor prefixed styles
+ autoprefixer: {
+ options: {
+ browsers: ['last 1 version']
+ },
+ dist: {
+ files: [{
+ expand: true,
+ cwd: '.tmp/styles/',
+ src: '{,*/}*.css',
+ dest: '.tmp/styles/'
+ }]
+ }
+ },
+
+ // Automatically inject Bower components into the app
+ wiredep: {
+ options: {
+ cwd: '<%= yeoman.app %>'
+ },
+ app: {
+ src: ['<%= yeoman.app %>/index.html'],
+ ignorePath: /\.\.\//
+ }
+ },
+
+ // Renames files for browser caching purposes
+ filerev: {
+ dist: {
+ src: [
+ '<%= yeoman.dist %>/scripts/{,*/}*.js',
+ '<%= yeoman.dist %>/styles/{,*/}*.css',
+ '<%= yeoman.dist %>/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}',
+ '<%= yeoman.dist %>/styles/fonts/*'
+ ]
+ }
+ },
+
+ // Reads HTML for usemin blocks to enable smart builds that automatically
+ // concat, minify and revision files. Creates configurations in memory so
+ // additional tasks can operate on them
+ useminPrepare: {
+ html: '<%= yeoman.app %>/index.html',
+ options: {
+ dest: '<%= yeoman.dist %>',
+ flow: {
+ html: {
+ steps: {
+ js: ['concat', 'uglifyjs'],
+ css: ['cssmin']
+ },
+ post: {}
+ }
+ }
+ }
+ },
+
+ // Performs rewrites based on filerev and the useminPrepare configuration
+ usemin: {
+ html: ['<%= yeoman.dist %>/{,*/}*.html'],
+ css: ['<%= yeoman.dist %>/styles/{,*/}*.css'],
+ options: {
+ assetsDirs: ['<%= yeoman.dist %>','<%= yeoman.dist %>/images']
+ }
+ },
+
+ // The following *-min tasks will produce minified files in the dist folder
+ // By default, your `index.html`'s <!-- Usemin block --> will take care of
+ // minification. These next options are pre-configured if you do not wish
+ // to use the Usemin blocks.
+ // cssmin: {
+ // dist: {
+ // files: {
+ // '<%= yeoman.dist %>/styles/main.css': [
+ // '.tmp/styles/{,*/}*.css'
+ // ]
+ // }
+ // }
+ // },
+ // uglify: {
+ // dist: {
+ // files: {
+ // '<%= yeoman.dist %>/scripts/scripts.js': [
+ // '<%= yeoman.dist %>/scripts/scripts.js'
+ // ]
+ // }
+ // }
+ // },
+ // concat: {
+ // dist: {}
+ // },
+
+ imagemin: {
+ dist: {
+ files: [{
+ expand: true,
+ cwd: '<%= yeoman.app %>/images',
+ src: '{,*/}*.{png,jpg,jpeg,gif}',
+ dest: '<%= yeoman.dist %>/images'
+ }]
+ }
+ },
+
+ svgmin: {
+ dist: {
+ files: [{
+ expand: true,
+ cwd: '<%= yeoman.app %>/images',
+ src: '{,*/}*.svg',
+ dest: '<%= yeoman.dist %>/images'
+ }]
+ }
+ },
+
+ htmlmin: {
+ dist: {
+ options: {
+ collapseWhitespace: true,
+ conservativeCollapse: true,
+ collapseBooleanAttributes: true,
+ removeCommentsFromCDATA: true,
+ removeOptionalTags: true
+ },
+ files: [{
+ expand: true,
+ cwd: '<%= yeoman.dist %>',
+ src: ['*.html', 'views/{,*/}*.html'],
+ dest: '<%= yeoman.dist %>'
+ }]
+ }
+ },
+
+ // ngmin tries to make the code safe for minification automatically by
+ // using the Angular long form for dependency injection. It doesn't work on
+ // things like resolve or inject so those have to be done manually.
+ ngmin: {
+ dist: {
+ files: [{
+ expand: true,
+ cwd: '.tmp/concat/scripts',
+ src: '*.js',
+ dest: '.tmp/concat/scripts'
+ }]
+ }
+ },
+
+ // Replace Google CDN references
+ cdnify: {
+ dist: {
+ html: ['<%= yeoman.dist %>/*.html']
+ }
+ },
+
+ // Copies remaining files to places other tasks can use
+ copy: {
+ dist: {
+ files: [{
+ expand: true,
+ dot: true,
+ cwd: '<%= yeoman.app %>',
+ dest: '<%= yeoman.dist %>',
+ src: [
+ '*.{ico,png,txt}',
+ '.htaccess',
+ '*.html',
+ 'views/{,*/}*.html',
+ 'images/{,*/}*.{webp}',
+ 'fonts/*'
+ ]
+ }, {
+ expand: true,
+ cwd: '.tmp/images',
+ dest: '<%= yeoman.dist %>/images',
+ src: ['generated/*']
+ }, {
+ expand: true,
+ cwd: 'bower_components/bootstrap/dist',
+ src: 'fonts/*',
+ dest: '<%= yeoman.dist %>'
+ }]
+ },
+ styles: {
+ expand: true,
+ cwd: '<%= yeoman.app %>/styles',
+ dest: '.tmp/styles/',
+ src: '{,*/}*.css'
+ }
+ },
+
+ // Run some tasks in parallel to speed up the build process
+ concurrent: {
+ server: [
+ 'copy:styles'
+ ],
+ test: [
+ 'copy:styles'
+ ],
+ dist: [
+ 'copy:styles',
+ 'imagemin',
+ 'svgmin'
+ ]
+ },
+
+ // Test settings
+ karma: {
+ unit: {
+ configFile: 'test/karma.conf.js',
+ singleRun: true
+ }
+ }
+ });
+
+
+ grunt.registerTask('serve', 'Compile then start a connect web server', function (target) {
+ if (target === 'dist') {
+ return grunt.task.run(['build', 'connect:dist:keepalive']);
+ }
+
+ grunt.task.run([
+ 'clean:server',
+ 'wiredep',
+ 'concurrent:server',
+ 'autoprefixer',
+ 'connect:livereload',
+ 'watch'
+ ]);
+ });
+
+ grunt.registerTask('server', 'DEPRECATED TASK. Use the "serve" task instead', function (target) {
+ grunt.log.warn('The `server` task has been deprecated. Use `grunt serve` to start a server.');
+ grunt.task.run(['serve:' + target]);
+ });
+
+ grunt.registerTask('test', [
+ 'clean:server',
+ 'concurrent:test',
+ 'autoprefixer',
+ 'connect:test',
+ 'karma'
+ ]);
+
+ grunt.registerTask('build', [
+ 'clean:dist',
+ 'wiredep',
+ 'useminPrepare',
+ 'concurrent:dist',
+ 'autoprefixer',
+ 'concat',
+ 'ngmin',
+ 'copy:dist',
+ 'cdnify',
+ 'cssmin',
+ 'uglify',
+ 'filerev',
+ 'usemin',
+ 'htmlmin'
+ ]);
+
+ grunt.registerTask('default', [
+ 'newer:jshint',
+ 'test',
+ 'build'
+ ]);
+};
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/.buildignore
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/.buildignore b/ocw-ui/frontend/app/.buildignore
new file mode 100644
index 0000000..fc98b8e
--- /dev/null
+++ b/ocw-ui/frontend/app/.buildignore
@@ -0,0 +1 @@
+*.coffee
\ No newline at end of file
[03/28] CLIMATE-512 - Replace frontend with new Yeoman/Grunt/Bower
frontend
Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/lib/angular/angular-scenario.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/test/lib/angular/angular-scenario.js b/ocw-ui/frontend/test/lib/angular/angular-scenario.js
deleted file mode 100755
index 538a799..0000000
--- a/ocw-ui/frontend/test/lib/angular/angular-scenario.js
+++ /dev/null
@@ -1,26195 +0,0 @@
-/*!
- * jQuery JavaScript Library v1.7.2
- * http://jquery.com/
- *
- * Copyright 2011, John Resig
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * Includes Sizzle.js
- * http://sizzlejs.com/
- * Copyright 2011, The Dojo Foundation
- * Released under the MIT, BSD, and GPL Licenses.
- *
- * Date: Wed Mar 21 12:46:34 2012 -0700
- */
-(function( window, undefined ) {
-'use strict';
-
-// Use the correct document accordingly with window argument (sandbox)
-var document = window.document,
- navigator = window.navigator,
- location = window.location;
-var jQuery = (function() {
-
-// Define a local copy of jQuery
-var jQuery = function( selector, context ) {
- // The jQuery object is actually just the init constructor 'enhanced'
- return new jQuery.fn.init( selector, context, rootjQuery );
- },
-
- // Map over jQuery in case of overwrite
- _jQuery = window.jQuery,
-
- // Map over the $ in case of overwrite
- _$ = window.$,
-
- // A central reference to the root jQuery(document)
- rootjQuery,
-
- // A simple way to check for HTML strings or ID strings
- // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
- quickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
-
- // Check if a string has a non-whitespace character in it
- rnotwhite = /\S/,
-
- // Used for trimming whitespace
- trimLeft = /^\s+/,
- trimRight = /\s+$/,
-
- // Match a standalone tag
- rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
-
- // JSON RegExp
- rvalidchars = /^[\],:{}\s]*$/,
- rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
- rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
- rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
-
- // Useragent RegExp
- rwebkit = /(webkit)[ \/]([\w.]+)/,
- ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/,
- rmsie = /(msie) ([\w.]+)/,
- rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/,
-
- // Matches dashed string for camelizing
- rdashAlpha = /-([a-z]|[0-9])/ig,
- rmsPrefix = /^-ms-/,
-
- // Used by jQuery.camelCase as callback to replace()
- fcamelCase = function( all, letter ) {
- return ( letter + "" ).toUpperCase();
- },
-
- // Keep a UserAgent string for use with jQuery.browser
- userAgent = navigator.userAgent,
-
- // For matching the engine and version of the browser
- browserMatch,
-
- // The deferred used on DOM ready
- readyList,
-
- // The ready event handler
- DOMContentLoaded,
-
- // Save a reference to some core methods
- toString = Object.prototype.toString,
- hasOwn = Object.prototype.hasOwnProperty,
- push = Array.prototype.push,
- slice = Array.prototype.slice,
- trim = String.prototype.trim,
- indexOf = Array.prototype.indexOf,
-
- // [[Class]] -> type pairs
- class2type = {};
-
-jQuery.fn = jQuery.prototype = {
- constructor: jQuery,
- init: function( selector, context, rootjQuery ) {
- var match, elem, ret, doc;
-
- // Handle $(""), $(null), or $(undefined)
- if ( !selector ) {
- return this;
- }
-
- // Handle $(DOMElement)
- if ( selector.nodeType ) {
- this.context = this[0] = selector;
- this.length = 1;
- return this;
- }
-
- // The body element only exists once, optimize finding it
- if ( selector === "body" && !context && document.body ) {
- this.context = document;
- this[0] = document.body;
- this.selector = selector;
- this.length = 1;
- return this;
- }
-
- // Handle HTML strings
- if ( typeof selector === "string" ) {
- // Are we dealing with HTML string or an ID?
- if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
- // Assume that strings that start and end with <> are HTML and skip the regex check
- match = [ null, selector, null ];
-
- } else {
- match = quickExpr.exec( selector );
- }
-
- // Verify a match, and that no context was specified for #id
- if ( match && (match[1] || !context) ) {
-
- // HANDLE: $(html) -> $(array)
- if ( match[1] ) {
- context = context instanceof jQuery ? context[0] : context;
- doc = ( context ? context.ownerDocument || context : document );
-
- // If a single string is passed in and it's a single tag
- // just do a createElement and skip the rest
- ret = rsingleTag.exec( selector );
-
- if ( ret ) {
- if ( jQuery.isPlainObject( context ) ) {
- selector = [ document.createElement( ret[1] ) ];
- jQuery.fn.attr.call( selector, context, true );
-
- } else {
- selector = [ doc.createElement( ret[1] ) ];
- }
-
- } else {
- ret = jQuery.buildFragment( [ match[1] ], [ doc ] );
- selector = ( ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment ).childNodes;
- }
-
- return jQuery.merge( this, selector );
-
- // HANDLE: $("#id")
- } else {
- elem = document.getElementById( match[2] );
-
- // Check parentNode to catch when Blackberry 4.6 returns
- // nodes that are no longer in the document #6963
- if ( elem && elem.parentNode ) {
- // Handle the case where IE and Opera return items
- // by name instead of ID
- if ( elem.id !== match[2] ) {
- return rootjQuery.find( selector );
- }
-
- // Otherwise, we inject the element directly into the jQuery object
- this.length = 1;
- this[0] = elem;
- }
-
- this.context = document;
- this.selector = selector;
- return this;
- }
-
- // HANDLE: $(expr, $(...))
- } else if ( !context || context.jquery ) {
- return ( context || rootjQuery ).find( selector );
-
- // HANDLE: $(expr, context)
- // (which is just equivalent to: $(context).find(expr)
- } else {
- return this.constructor( context ).find( selector );
- }
-
- // HANDLE: $(function)
- // Shortcut for document ready
- } else if ( jQuery.isFunction( selector ) ) {
- return rootjQuery.ready( selector );
- }
-
- if ( selector.selector !== undefined ) {
- this.selector = selector.selector;
- this.context = selector.context;
- }
-
- return jQuery.makeArray( selector, this );
- },
-
- // Start with an empty selector
- selector: "",
-
- // The current version of jQuery being used
- jquery: "1.7.2",
-
- // The default length of a jQuery object is 0
- length: 0,
-
- // The number of elements contained in the matched element set
- size: function() {
- return this.length;
- },
-
- toArray: function() {
- return slice.call( this, 0 );
- },
-
- // Get the Nth element in the matched element set OR
- // Get the whole matched element set as a clean array
- get: function( num ) {
- return num == null ?
-
- // Return a 'clean' array
- this.toArray() :
-
- // Return just the object
- ( num < 0 ? this[ this.length + num ] : this[ num ] );
- },
-
- // Take an array of elements and push it onto the stack
- // (returning the new matched element set)
- pushStack: function( elems, name, selector ) {
- // Build a new jQuery matched element set
- var ret = this.constructor();
-
- if ( jQuery.isArray( elems ) ) {
- push.apply( ret, elems );
-
- } else {
- jQuery.merge( ret, elems );
- }
-
- // Add the old object onto the stack (as a reference)
- ret.prevObject = this;
-
- ret.context = this.context;
-
- if ( name === "find" ) {
- ret.selector = this.selector + ( this.selector ? " " : "" ) + selector;
- } else if ( name ) {
- ret.selector = this.selector + "." + name + "(" + selector + ")";
- }
-
- // Return the newly-formed element set
- return ret;
- },
-
- // Execute a callback for every element in the matched set.
- // (You can seed the arguments with an array of args, but this is
- // only used internally.)
- each: function( callback, args ) {
- return jQuery.each( this, callback, args );
- },
-
- ready: function( fn ) {
- // Attach the listeners
- jQuery.bindReady();
-
- // Add the callback
- readyList.add( fn );
-
- return this;
- },
-
- eq: function( i ) {
- i = +i;
- return i === -1 ?
- this.slice( i ) :
- this.slice( i, i + 1 );
- },
-
- first: function() {
- return this.eq( 0 );
- },
-
- last: function() {
- return this.eq( -1 );
- },
-
- slice: function() {
- return this.pushStack( slice.apply( this, arguments ),
- "slice", slice.call(arguments).join(",") );
- },
-
- map: function( callback ) {
- return this.pushStack( jQuery.map(this, function( elem, i ) {
- return callback.call( elem, i, elem );
- }));
- },
-
- end: function() {
- return this.prevObject || this.constructor(null);
- },
-
- // For internal use only.
- // Behaves like an Array's method, not like a jQuery method.
- push: push,
- sort: [].sort,
- splice: [].splice
-};
-
-// Give the init function the jQuery prototype for later instantiation
-jQuery.fn.init.prototype = jQuery.fn;
-
-jQuery.extend = jQuery.fn.extend = function() {
- var options, name, src, copy, copyIsArray, clone,
- target = arguments[0] || {},
- i = 1,
- length = arguments.length,
- deep = false;
-
- // Handle a deep copy situation
- if ( typeof target === "boolean" ) {
- deep = target;
- target = arguments[1] || {};
- // skip the boolean and the target
- i = 2;
- }
-
- // Handle case when target is a string or something (possible in deep copy)
- if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
- target = {};
- }
-
- // extend jQuery itself if only one argument is passed
- if ( length === i ) {
- target = this;
- --i;
- }
-
- for ( ; i < length; i++ ) {
- // Only deal with non-null/undefined values
- if ( (options = arguments[ i ]) != null ) {
- // Extend the base object
- for ( name in options ) {
- src = target[ name ];
- copy = options[ name ];
-
- // Prevent never-ending loop
- if ( target === copy ) {
- continue;
- }
-
- // Recurse if we're merging plain objects or arrays
- if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
- if ( copyIsArray ) {
- copyIsArray = false;
- clone = src && jQuery.isArray(src) ? src : [];
-
- } else {
- clone = src && jQuery.isPlainObject(src) ? src : {};
- }
-
- // Never move original objects, clone them
- target[ name ] = jQuery.extend( deep, clone, copy );
-
- // Don't bring in undefined values
- } else if ( copy !== undefined ) {
- target[ name ] = copy;
- }
- }
- }
- }
-
- // Return the modified object
- return target;
-};
-
-jQuery.extend({
- noConflict: function( deep ) {
- if ( window.$ === jQuery ) {
- window.$ = _$;
- }
-
- if ( deep && window.jQuery === jQuery ) {
- window.jQuery = _jQuery;
- }
-
- return jQuery;
- },
-
- // Is the DOM ready to be used? Set to true once it occurs.
- isReady: false,
-
- // A counter to track how many items to wait for before
- // the ready event fires. See #6781
- readyWait: 1,
-
- // Hold (or release) the ready event
- holdReady: function( hold ) {
- if ( hold ) {
- jQuery.readyWait++;
- } else {
- jQuery.ready( true );
- }
- },
-
- // Handle when the DOM is ready
- ready: function( wait ) {
- // Either a released hold or an DOMready/load event and not yet ready
- if ( (wait === true && !--jQuery.readyWait) || (wait !== true && !jQuery.isReady) ) {
- // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
- if ( !document.body ) {
- return setTimeout( jQuery.ready, 1 );
- }
-
- // Remember that the DOM is ready
- jQuery.isReady = true;
-
- // If a normal DOM Ready event fired, decrement, and wait if need be
- if ( wait !== true && --jQuery.readyWait > 0 ) {
- return;
- }
-
- // If there are functions bound, to execute
- readyList.fireWith( document, [ jQuery ] );
-
- // Trigger any bound ready events
- if ( jQuery.fn.trigger ) {
- jQuery( document ).trigger( "ready" ).off( "ready" );
- }
- }
- },
-
- bindReady: function() {
- if ( readyList ) {
- return;
- }
-
- readyList = jQuery.Callbacks( "once memory" );
-
- // Catch cases where $(document).ready() is called after the
- // browser event has already occurred.
- if ( document.readyState === "complete" ) {
- // Handle it asynchronously to allow scripts the opportunity to delay ready
- return setTimeout( jQuery.ready, 1 );
- }
-
- // Mozilla, Opera and webkit nightlies currently support this event
- if ( document.addEventListener ) {
- // Use the handy event callback
- document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
-
- // A fallback to window.onload, that will always work
- window.addEventListener( "load", jQuery.ready, false );
-
- // If IE event model is used
- } else if ( document.attachEvent ) {
- // ensure firing before onload,
- // maybe late but safe also for iframes
- document.attachEvent( "onreadystatechange", DOMContentLoaded );
-
- // A fallback to window.onload, that will always work
- window.attachEvent( "onload", jQuery.ready );
-
- // If IE and not a frame
- // continually check to see if the document is ready
- var toplevel = false;
-
- try {
- toplevel = window.frameElement == null;
- } catch(e) {}
-
- if ( document.documentElement.doScroll && toplevel ) {
- doScrollCheck();
- }
- }
- },
-
- // See test/unit/core.js for details concerning isFunction.
- // Since version 1.3, DOM methods and functions like alert
- // aren't supported. They return false on IE (#2968).
- isFunction: function( obj ) {
- return jQuery.type(obj) === "function";
- },
-
- isArray: Array.isArray || function( obj ) {
- return jQuery.type(obj) === "array";
- },
-
- isWindow: function( obj ) {
- return obj != null && obj == obj.window;
- },
-
- isNumeric: function( obj ) {
- return !isNaN( parseFloat(obj) ) && isFinite( obj );
- },
-
- type: function( obj ) {
- return obj == null ?
- String( obj ) :
- class2type[ toString.call(obj) ] || "object";
- },
-
- isPlainObject: function( obj ) {
- // Must be an Object.
- // Because of IE, we also have to check the presence of the constructor property.
- // Make sure that DOM nodes and window objects don't pass through, as well
- if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
- return false;
- }
-
- try {
- // Not own constructor property must be Object
- if ( obj.constructor &&
- !hasOwn.call(obj, "constructor") &&
- !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
- return false;
- }
- } catch ( e ) {
- // IE8,9 Will throw exceptions on certain host objects #9897
- return false;
- }
-
- // Own properties are enumerated firstly, so to speed up,
- // if last one is own, then all properties are own.
-
- var key;
- for ( key in obj ) {}
-
- return key === undefined || hasOwn.call( obj, key );
- },
-
- isEmptyObject: function( obj ) {
- for ( var name in obj ) {
- return false;
- }
- return true;
- },
-
- error: function( msg ) {
- throw new Error( msg );
- },
-
- parseJSON: function( data ) {
- if ( typeof data !== "string" || !data ) {
- return null;
- }
-
- // Make sure leading/trailing whitespace is removed (IE can't handle it)
- data = jQuery.trim( data );
-
- // Attempt to parse using the native JSON parser first
- if ( window.JSON && window.JSON.parse ) {
- return window.JSON.parse( data );
- }
-
- // Make sure the incoming data is actual JSON
- // Logic borrowed from http://json.org/json2.js
- if ( rvalidchars.test( data.replace( rvalidescape, "@" )
- .replace( rvalidtokens, "]" )
- .replace( rvalidbraces, "")) ) {
-
- return ( new Function( "return " + data ) )();
-
- }
- jQuery.error( "Invalid JSON: " + data );
- },
-
- // Cross-browser xml parsing
- parseXML: function( data ) {
- if ( typeof data !== "string" || !data ) {
- return null;
- }
- var xml, tmp;
- try {
- if ( window.DOMParser ) { // Standard
- tmp = new DOMParser();
- xml = tmp.parseFromString( data , "text/xml" );
- } else { // IE
- xml = new ActiveXObject( "Microsoft.XMLDOM" );
- xml.async = "false";
- xml.loadXML( data );
- }
- } catch( e ) {
- xml = undefined;
- }
- if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
- jQuery.error( "Invalid XML: " + data );
- }
- return xml;
- },
-
- noop: function() {},
-
- // Evaluates a script in a global context
- // Workarounds based on findings by Jim Driscoll
- // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
- globalEval: function( data ) {
- if ( data && rnotwhite.test( data ) ) {
- // We use execScript on Internet Explorer
- // We use an anonymous function so that context is window
- // rather than jQuery in Firefox
- ( window.execScript || function( data ) {
- window[ "eval" ].call( window, data );
- } )( data );
- }
- },
-
- // Convert dashed to camelCase; used by the css and data modules
- // Microsoft forgot to hump their vendor prefix (#9572)
- camelCase: function( string ) {
- return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
- },
-
- nodeName: function( elem, name ) {
- return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase();
- },
-
- // args is for internal usage only
- each: function( object, callback, args ) {
- var name, i = 0,
- length = object.length,
- isObj = length === undefined || jQuery.isFunction( object );
-
- if ( args ) {
- if ( isObj ) {
- for ( name in object ) {
- if ( callback.apply( object[ name ], args ) === false ) {
- break;
- }
- }
- } else {
- for ( ; i < length; ) {
- if ( callback.apply( object[ i++ ], args ) === false ) {
- break;
- }
- }
- }
-
- // A special, fast, case for the most common use of each
- } else {
- if ( isObj ) {
- for ( name in object ) {
- if ( callback.call( object[ name ], name, object[ name ] ) === false ) {
- break;
- }
- }
- } else {
- for ( ; i < length; ) {
- if ( callback.call( object[ i ], i, object[ i++ ] ) === false ) {
- break;
- }
- }
- }
- }
-
- return object;
- },
-
- // Use native String.trim function wherever possible
- trim: trim ?
- function( text ) {
- return text == null ?
- "" :
- trim.call( text );
- } :
-
- // Otherwise use our own trimming functionality
- function( text ) {
- return text == null ?
- "" :
- text.toString().replace( trimLeft, "" ).replace( trimRight, "" );
- },
-
- // results is for internal usage only
- makeArray: function( array, results ) {
- var ret = results || [];
-
- if ( array != null ) {
- // The window, strings (and functions) also have 'length'
- // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
- var type = jQuery.type( array );
-
- if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) {
- push.call( ret, array );
- } else {
- jQuery.merge( ret, array );
- }
- }
-
- return ret;
- },
-
- inArray: function( elem, array, i ) {
- var len;
-
- if ( array ) {
- if ( indexOf ) {
- return indexOf.call( array, elem, i );
- }
-
- len = array.length;
- i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
-
- for ( ; i < len; i++ ) {
- // Skip accessing in sparse arrays
- if ( i in array && array[ i ] === elem ) {
- return i;
- }
- }
- }
-
- return -1;
- },
-
- merge: function( first, second ) {
- var i = first.length,
- j = 0;
-
- if ( typeof second.length === "number" ) {
- for ( var l = second.length; j < l; j++ ) {
- first[ i++ ] = second[ j ];
- }
-
- } else {
- while ( second[j] !== undefined ) {
- first[ i++ ] = second[ j++ ];
- }
- }
-
- first.length = i;
-
- return first;
- },
-
- grep: function( elems, callback, inv ) {
- var ret = [], retVal;
- inv = !!inv;
-
- // Go through the array, only saving the items
- // that pass the validator function
- for ( var i = 0, length = elems.length; i < length; i++ ) {
- retVal = !!callback( elems[ i ], i );
- if ( inv !== retVal ) {
- ret.push( elems[ i ] );
- }
- }
-
- return ret;
- },
-
- // arg is for internal usage only
- map: function( elems, callback, arg ) {
- var value, key, ret = [],
- i = 0,
- length = elems.length,
- // jquery objects are treated as arrays
- isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ;
-
- // Go through the array, translating each of the items to their
- if ( isArray ) {
- for ( ; i < length; i++ ) {
- value = callback( elems[ i ], i, arg );
-
- if ( value != null ) {
- ret[ ret.length ] = value;
- }
- }
-
- // Go through every key on the object,
- } else {
- for ( key in elems ) {
- value = callback( elems[ key ], key, arg );
-
- if ( value != null ) {
- ret[ ret.length ] = value;
- }
- }
- }
-
- // Flatten any nested arrays
- return ret.concat.apply( [], ret );
- },
-
- // A global GUID counter for objects
- guid: 1,
-
- // Bind a function to a context, optionally partially applying any
- // arguments.
- proxy: function( fn, context ) {
- if ( typeof context === "string" ) {
- var tmp = fn[ context ];
- context = fn;
- fn = tmp;
- }
-
- // Quick check to determine if target is callable, in the spec
- // this throws a TypeError, but we will just return undefined.
- if ( !jQuery.isFunction( fn ) ) {
- return undefined;
- }
-
- // Simulated bind
- var args = slice.call( arguments, 2 ),
- proxy = function() {
- return fn.apply( context, args.concat( slice.call( arguments ) ) );
- };
-
- // Set the guid of unique handler to the same of original handler, so it can be removed
- proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++;
-
- return proxy;
- },
-
- // Mutifunctional method to get and set values to a collection
- // The value/s can optionally be executed if it's a function
- access: function( elems, fn, key, value, chainable, emptyGet, pass ) {
- var exec,
- bulk = key == null,
- i = 0,
- length = elems.length;
-
- // Sets many values
- if ( key && typeof key === "object" ) {
- for ( i in key ) {
- jQuery.access( elems, fn, i, key[i], 1, emptyGet, value );
- }
- chainable = 1;
-
- // Sets one value
- } else if ( value !== undefined ) {
- // Optionally, function values get executed if exec is true
- exec = pass === undefined && jQuery.isFunction( value );
-
- if ( bulk ) {
- // Bulk operations only iterate when executing function values
- if ( exec ) {
- exec = fn;
- fn = function( elem, key, value ) {
- return exec.call( jQuery( elem ), value );
- };
-
- // Otherwise they run against the entire set
- } else {
- fn.call( elems, value );
- fn = null;
- }
- }
-
- if ( fn ) {
- for (; i < length; i++ ) {
- fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
- }
- }
-
- chainable = 1;
- }
-
- return chainable ?
- elems :
-
- // Gets
- bulk ?
- fn.call( elems ) :
- length ? fn( elems[0], key ) : emptyGet;
- },
-
- now: function() {
- return ( new Date() ).getTime();
- },
-
- // Use of jQuery.browser is frowned upon.
- // More details: http://docs.jquery.com/Utilities/jQuery.browser
- uaMatch: function( ua ) {
- ua = ua.toLowerCase();
-
- var match = rwebkit.exec( ua ) ||
- ropera.exec( ua ) ||
- rmsie.exec( ua ) ||
- ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) ||
- [];
-
- return { browser: match[1] || "", version: match[2] || "0" };
- },
-
- sub: function() {
- function jQuerySub( selector, context ) {
- return new jQuerySub.fn.init( selector, context );
- }
- jQuery.extend( true, jQuerySub, this );
- jQuerySub.superclass = this;
- jQuerySub.fn = jQuerySub.prototype = this();
- jQuerySub.fn.constructor = jQuerySub;
- jQuerySub.sub = this.sub;
- jQuerySub.fn.init = function init( selector, context ) {
- if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) {
- context = jQuerySub( context );
- }
-
- return jQuery.fn.init.call( this, selector, context, rootjQuerySub );
- };
- jQuerySub.fn.init.prototype = jQuerySub.fn;
- var rootjQuerySub = jQuerySub(document);
- return jQuerySub;
- },
-
- browser: {}
-});
-
-// Populate the class2type map
-jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) {
- class2type[ "[object " + name + "]" ] = name.toLowerCase();
-});
-
-browserMatch = jQuery.uaMatch( userAgent );
-if ( browserMatch.browser ) {
- jQuery.browser[ browserMatch.browser ] = true;
- jQuery.browser.version = browserMatch.version;
-}
-
-// Deprecated, use jQuery.browser.webkit instead
-if ( jQuery.browser.webkit ) {
- jQuery.browser.safari = true;
-}
-
-// IE doesn't match non-breaking spaces with \s
-if ( rnotwhite.test( "\xA0" ) ) {
- trimLeft = /^[\s\xA0]+/;
- trimRight = /[\s\xA0]+$/;
-}
-
-// All jQuery objects should point back to these
-rootjQuery = jQuery(document);
-
-// Cleanup functions for the document ready method
-if ( document.addEventListener ) {
- DOMContentLoaded = function() {
- document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false );
- jQuery.ready();
- };
-
-} else if ( document.attachEvent ) {
- DOMContentLoaded = function() {
- // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
- if ( document.readyState === "complete" ) {
- document.detachEvent( "onreadystatechange", DOMContentLoaded );
- jQuery.ready();
- }
- };
-}
-
-// The DOM ready check for Internet Explorer
-function doScrollCheck() {
- if ( jQuery.isReady ) {
- return;
- }
-
- try {
- // If IE is used, use the trick by Diego Perini
- // http://javascript.nwbox.com/IEContentLoaded/
- document.documentElement.doScroll("left");
- } catch(e) {
- setTimeout( doScrollCheck, 1 );
- return;
- }
-
- // and execute any waiting functions
- jQuery.ready();
-}
-
-return jQuery;
-
-})();
-
-
-// String to Object flags format cache
-var flagsCache = {};
-
-// Convert String-formatted flags into Object-formatted ones and store in cache
-function createFlags( flags ) {
- var object = flagsCache[ flags ] = {},
- i, length;
- flags = flags.split( /\s+/ );
- for ( i = 0, length = flags.length; i < length; i++ ) {
- object[ flags[i] ] = true;
- }
- return object;
-}
-
-/*
- * Create a callback list using the following parameters:
- *
- * flags: an optional list of space-separated flags that will change how
- * the callback list behaves
- *
- * By default a callback list will act like an event callback list and can be
- * "fired" multiple times.
- *
- * Possible flags:
- *
- * once: will ensure the callback list can only be fired once (like a Deferred)
- *
- * memory: will keep track of previous values and will call any callback added
- * after the list has been fired right away with the latest "memorized"
- * values (like a Deferred)
- *
- * unique: will ensure a callback can only be added once (no duplicate in the list)
- *
- * stopOnFalse: interrupt callings when a callback returns false
- *
- */
-jQuery.Callbacks = function( flags ) {
-
- // Convert flags from String-formatted to Object-formatted
- // (we check in cache first)
- flags = flags ? ( flagsCache[ flags ] || createFlags( flags ) ) : {};
-
- var // Actual callback list
- list = [],
- // Stack of fire calls for repeatable lists
- stack = [],
- // Last fire value (for non-forgettable lists)
- memory,
- // Flag to know if list was already fired
- fired,
- // Flag to know if list is currently firing
- firing,
- // First callback to fire (used internally by add and fireWith)
- firingStart,
- // End of the loop when firing
- firingLength,
- // Index of currently firing callback (modified by remove if needed)
- firingIndex,
- // Add one or several callbacks to the list
- add = function( args ) {
- var i,
- length,
- elem,
- type,
- actual;
- for ( i = 0, length = args.length; i < length; i++ ) {
- elem = args[ i ];
- type = jQuery.type( elem );
- if ( type === "array" ) {
- // Inspect recursively
- add( elem );
- } else if ( type === "function" ) {
- // Add if not in unique mode and callback is not in
- if ( !flags.unique || !self.has( elem ) ) {
- list.push( elem );
- }
- }
- }
- },
- // Fire callbacks
- fire = function( context, args ) {
- args = args || [];
- memory = !flags.memory || [ context, args ];
- fired = true;
- firing = true;
- firingIndex = firingStart || 0;
- firingStart = 0;
- firingLength = list.length;
- for ( ; list && firingIndex < firingLength; firingIndex++ ) {
- if ( list[ firingIndex ].apply( context, args ) === false && flags.stopOnFalse ) {
- memory = true; // Mark as halted
- break;
- }
- }
- firing = false;
- if ( list ) {
- if ( !flags.once ) {
- if ( stack && stack.length ) {
- memory = stack.shift();
- self.fireWith( memory[ 0 ], memory[ 1 ] );
- }
- } else if ( memory === true ) {
- self.disable();
- } else {
- list = [];
- }
- }
- },
- // Actual Callbacks object
- self = {
- // Add a callback or a collection of callbacks to the list
- add: function() {
- if ( list ) {
- var length = list.length;
- add( arguments );
- // Do we need to add the callbacks to the
- // current firing batch?
- if ( firing ) {
- firingLength = list.length;
- // With memory, if we're not firing then
- // we should call right away, unless previous
- // firing was halted (stopOnFalse)
- } else if ( memory && memory !== true ) {
- firingStart = length;
- fire( memory[ 0 ], memory[ 1 ] );
- }
- }
- return this;
- },
- // Remove a callback from the list
- remove: function() {
- if ( list ) {
- var args = arguments,
- argIndex = 0,
- argLength = args.length;
- for ( ; argIndex < argLength ; argIndex++ ) {
- for ( var i = 0; i < list.length; i++ ) {
- if ( args[ argIndex ] === list[ i ] ) {
- // Handle firingIndex and firingLength
- if ( firing ) {
- if ( i <= firingLength ) {
- firingLength--;
- if ( i <= firingIndex ) {
- firingIndex--;
- }
- }
- }
- // Remove the element
- list.splice( i--, 1 );
- // If we have some unicity property then
- // we only need to do this once
- if ( flags.unique ) {
- break;
- }
- }
- }
- }
- }
- return this;
- },
- // Control if a given callback is in the list
- has: function( fn ) {
- if ( list ) {
- var i = 0,
- length = list.length;
- for ( ; i < length; i++ ) {
- if ( fn === list[ i ] ) {
- return true;
- }
- }
- }
- return false;
- },
- // Remove all callbacks from the list
- empty: function() {
- list = [];
- return this;
- },
- // Have the list do nothing anymore
- disable: function() {
- list = stack = memory = undefined;
- return this;
- },
- // Is it disabled?
- disabled: function() {
- return !list;
- },
- // Lock the list in its current state
- lock: function() {
- stack = undefined;
- if ( !memory || memory === true ) {
- self.disable();
- }
- return this;
- },
- // Is it locked?
- locked: function() {
- return !stack;
- },
- // Call all callbacks with the given context and arguments
- fireWith: function( context, args ) {
- if ( stack ) {
- if ( firing ) {
- if ( !flags.once ) {
- stack.push( [ context, args ] );
- }
- } else if ( !( flags.once && memory ) ) {
- fire( context, args );
- }
- }
- return this;
- },
- // Call all the callbacks with the given arguments
- fire: function() {
- self.fireWith( this, arguments );
- return this;
- },
- // To know if the callbacks have already been called at least once
- fired: function() {
- return !!fired;
- }
- };
-
- return self;
-};
-
-
-
-
-var // Static reference to slice
- sliceDeferred = [].slice;
-
-jQuery.extend({
-
- Deferred: function( func ) {
- var doneList = jQuery.Callbacks( "once memory" ),
- failList = jQuery.Callbacks( "once memory" ),
- progressList = jQuery.Callbacks( "memory" ),
- state = "pending",
- lists = {
- resolve: doneList,
- reject: failList,
- notify: progressList
- },
- promise = {
- done: doneList.add,
- fail: failList.add,
- progress: progressList.add,
-
- state: function() {
- return state;
- },
-
- // Deprecated
- isResolved: doneList.fired,
- isRejected: failList.fired,
-
- then: function( doneCallbacks, failCallbacks, progressCallbacks ) {
- deferred.done( doneCallbacks ).fail( failCallbacks ).progress( progressCallbacks );
- return this;
- },
- always: function() {
- deferred.done.apply( deferred, arguments ).fail.apply( deferred, arguments );
- return this;
- },
- pipe: function( fnDone, fnFail, fnProgress ) {
- return jQuery.Deferred(function( newDefer ) {
- jQuery.each( {
- done: [ fnDone, "resolve" ],
- fail: [ fnFail, "reject" ],
- progress: [ fnProgress, "notify" ]
- }, function( handler, data ) {
- var fn = data[ 0 ],
- action = data[ 1 ],
- returned;
- if ( jQuery.isFunction( fn ) ) {
- deferred[ handler ](function() {
- returned = fn.apply( this, arguments );
- if ( returned && jQuery.isFunction( returned.promise ) ) {
- returned.promise().then( newDefer.resolve, newDefer.reject, newDefer.notify );
- } else {
- newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] );
- }
- });
- } else {
- deferred[ handler ]( newDefer[ action ] );
- }
- });
- }).promise();
- },
- // Get a promise for this deferred
- // If obj is provided, the promise aspect is added to the object
- promise: function( obj ) {
- if ( obj == null ) {
- obj = promise;
- } else {
- for ( var key in promise ) {
- obj[ key ] = promise[ key ];
- }
- }
- return obj;
- }
- },
- deferred = promise.promise({}),
- key;
-
- for ( key in lists ) {
- deferred[ key ] = lists[ key ].fire;
- deferred[ key + "With" ] = lists[ key ].fireWith;
- }
-
- // Handle state
- deferred.done( function() {
- state = "resolved";
- }, failList.disable, progressList.lock ).fail( function() {
- state = "rejected";
- }, doneList.disable, progressList.lock );
-
- // Call given func if any
- if ( func ) {
- func.call( deferred, deferred );
- }
-
- // All done!
- return deferred;
- },
-
- // Deferred helper
- when: function( firstParam ) {
- var args = sliceDeferred.call( arguments, 0 ),
- i = 0,
- length = args.length,
- pValues = new Array( length ),
- count = length,
- pCount = length,
- deferred = length <= 1 && firstParam && jQuery.isFunction( firstParam.promise ) ?
- firstParam :
- jQuery.Deferred(),
- promise = deferred.promise();
- function resolveFunc( i ) {
- return function( value ) {
- args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value;
- if ( !( --count ) ) {
- deferred.resolveWith( deferred, args );
- }
- };
- }
- function progressFunc( i ) {
- return function( value ) {
- pValues[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value;
- deferred.notifyWith( promise, pValues );
- };
- }
- if ( length > 1 ) {
- for ( ; i < length; i++ ) {
- if ( args[ i ] && args[ i ].promise && jQuery.isFunction( args[ i ].promise ) ) {
- args[ i ].promise().then( resolveFunc(i), deferred.reject, progressFunc(i) );
- } else {
- --count;
- }
- }
- if ( !count ) {
- deferred.resolveWith( deferred, args );
- }
- } else if ( deferred !== firstParam ) {
- deferred.resolveWith( deferred, length ? [ firstParam ] : [] );
- }
- return promise;
- }
-});
-
-
-
-
-jQuery.support = (function() {
-
- var support,
- all,
- a,
- select,
- opt,
- input,
- fragment,
- tds,
- events,
- eventName,
- i,
- isSupported,
- div = document.createElement( "div" ),
- documentElement = document.documentElement;
-
- // Preliminary tests
- div.setAttribute("className", "t");
- div.innerHTML = " <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
-
- all = div.getElementsByTagName( "*" );
- a = div.getElementsByTagName( "a" )[ 0 ];
-
- // Can't get basic test support
- if ( !all || !all.length || !a ) {
- return {};
- }
-
- // First batch of supports tests
- select = document.createElement( "select" );
- opt = select.appendChild( document.createElement("option") );
- input = div.getElementsByTagName( "input" )[ 0 ];
-
- support = {
- // IE strips leading whitespace when .innerHTML is used
- leadingWhitespace: ( div.firstChild.nodeType === 3 ),
-
- // Make sure that tbody elements aren't automatically inserted
- // IE will insert them into empty tables
- tbody: !div.getElementsByTagName("tbody").length,
-
- // Make sure that link elements get serialized correctly by innerHTML
- // This requires a wrapper element in IE
- htmlSerialize: !!div.getElementsByTagName("link").length,
-
- // Get the style information from getAttribute
- // (IE uses .cssText instead)
- style: /top/.test( a.getAttribute("style") ),
-
- // Make sure that URLs aren't manipulated
- // (IE normalizes it by default)
- hrefNormalized: ( a.getAttribute("href") === "/a" ),
-
- // Make sure that element opacity exists
- // (IE uses filter instead)
- // Use a regex to work around a WebKit issue. See #5145
- opacity: /^0.55/.test( a.style.opacity ),
-
- // Verify style float existence
- // (IE uses styleFloat instead of cssFloat)
- cssFloat: !!a.style.cssFloat,
-
- // Make sure that if no value is specified for a checkbox
- // that it defaults to "on".
- // (WebKit defaults to "" instead)
- checkOn: ( input.value === "on" ),
-
- // Make sure that a selected-by-default option has a working selected property.
- // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
- optSelected: opt.selected,
-
- // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
- getSetAttribute: div.className !== "t",
-
- // Tests for enctype support on a form(#6743)
- enctype: !!document.createElement("form").enctype,
-
- // Makes sure cloning an html5 element does not cause problems
- // Where outerHTML is undefined, this still works
- html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>",
-
- // Will be defined later
- submitBubbles: true,
- changeBubbles: true,
- focusinBubbles: false,
- deleteExpando: true,
- noCloneEvent: true,
- inlineBlockNeedsLayout: false,
- shrinkWrapBlocks: false,
- reliableMarginRight: true,
- pixelMargin: true
- };
-
- // jQuery.boxModel DEPRECATED in 1.3, use jQuery.support.boxModel instead
- jQuery.boxModel = support.boxModel = (document.compatMode === "CSS1Compat");
-
- // Make sure checked status is properly cloned
- input.checked = true;
- support.noCloneChecked = input.cloneNode( true ).checked;
-
- // Make sure that the options inside disabled selects aren't marked as disabled
- // (WebKit marks them as disabled)
- select.disabled = true;
- support.optDisabled = !opt.disabled;
-
- // Test to see if it's possible to delete an expando from an element
- // Fails in Internet Explorer
- try {
- delete div.test;
- } catch( e ) {
- support.deleteExpando = false;
- }
-
- if ( !div.addEventListener && div.attachEvent && div.fireEvent ) {
- div.attachEvent( "onclick", function() {
- // Cloning a node shouldn't copy over any
- // bound event handlers (IE does this)
- support.noCloneEvent = false;
- });
- div.cloneNode( true ).fireEvent( "onclick" );
- }
-
- // Check if a radio maintains its value
- // after being appended to the DOM
- input = document.createElement("input");
- input.value = "t";
- input.setAttribute("type", "radio");
- support.radioValue = input.value === "t";
-
- input.setAttribute("checked", "checked");
-
- // #11217 - WebKit loses check when the name is after the checked attribute
- input.setAttribute( "name", "t" );
-
- div.appendChild( input );
- fragment = document.createDocumentFragment();
- fragment.appendChild( div.lastChild );
-
- // WebKit doesn't clone checked state correctly in fragments
- support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
-
- // Check if a disconnected checkbox will retain its checked
- // value of true after appended to the DOM (IE6/7)
- support.appendChecked = input.checked;
-
- fragment.removeChild( input );
- fragment.appendChild( div );
-
- // Technique from Juriy Zaytsev
- // http://perfectionkills.com/detecting-event-support-without-browser-sniffing/
- // We only care about the case where non-standard event systems
- // are used, namely in IE. Short-circuiting here helps us to
- // avoid an eval call (in setAttribute) which can cause CSP
- // to go haywire. See: https://developer.mozilla.org/en/Security/CSP
- if ( div.attachEvent ) {
- for ( i in {
- submit: 1,
- change: 1,
- focusin: 1
- }) {
- eventName = "on" + i;
- isSupported = ( eventName in div );
- if ( !isSupported ) {
- div.setAttribute( eventName, "return;" );
- isSupported = ( typeof div[ eventName ] === "function" );
- }
- support[ i + "Bubbles" ] = isSupported;
- }
- }
-
- fragment.removeChild( div );
-
- // Null elements to avoid leaks in IE
- fragment = select = opt = div = input = null;
-
- // Run tests that need a body at doc ready
- jQuery(function() {
- var container, outer, inner, table, td, offsetSupport,
- marginDiv, conMarginTop, style, html, positionTopLeftWidthHeight,
- paddingMarginBorderVisibility, paddingMarginBorder,
- body = document.getElementsByTagName("body")[0];
-
- if ( !body ) {
- // Return for frameset docs that don't have a body
- return;
- }
-
- conMarginTop = 1;
- paddingMarginBorder = "padding:0;margin:0;border:";
- positionTopLeftWidthHeight = "position:absolute;top:0;left:0;width:1px;height:1px;";
- paddingMarginBorderVisibility = paddingMarginBorder + "0;visibility:hidden;";
- style = "style='" + positionTopLeftWidthHeight + paddingMarginBorder + "5px solid #000;";
- html = "<div " + style + "display:block;'><div style='" + paddingMarginBorder + "0;display:block;overflow:hidden;'></div></div>" +
- "<table " + style + "' cellpadding='0' cellspacing='0'>" +
- "<tr><td></td></tr></table>";
-
- container = document.createElement("div");
- container.style.cssText = paddingMarginBorderVisibility + "width:0;height:0;position:static;top:0;margin-top:" + conMarginTop + "px";
- body.insertBefore( container, body.firstChild );
-
- // Construct the test element
- div = document.createElement("div");
- container.appendChild( div );
-
- // Check if table cells still have offsetWidth/Height when they are set
- // to display:none and there are still other visible table cells in a
- // table row; if so, offsetWidth/Height are not reliable for use when
- // determining if an element has been hidden directly using
- // display:none (it is still safe to use offsets if a parent element is
- // hidden; don safety goggles and see bug #4512 for more information).
- // (only IE 8 fails this test)
- div.innerHTML = "<table><tr><td style='" + paddingMarginBorder + "0;display:none'></td><td>t</td></tr></table>";
- tds = div.getElementsByTagName( "td" );
- isSupported = ( tds[ 0 ].offsetHeight === 0 );
-
- tds[ 0 ].style.display = "";
- tds[ 1 ].style.display = "none";
-
- // Check if empty table cells still have offsetWidth/Height
- // (IE <= 8 fail this test)
- support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
-
- // Check if div with explicit width and no margin-right incorrectly
- // gets computed margin-right based on width of container. For more
- // info see bug #3333
- // Fails in WebKit before Feb 2011 nightlies
- // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
- if ( window.getComputedStyle ) {
- div.innerHTML = "";
- marginDiv = document.createElement( "div" );
- marginDiv.style.width = "0";
- marginDiv.style.marginRight = "0";
- div.style.width = "2px";
- div.appendChild( marginDiv );
- support.reliableMarginRight =
- ( parseInt( ( window.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0;
- }
-
- if ( typeof div.style.zoom !== "undefined" ) {
- // Check if natively block-level elements act like inline-block
- // elements when setting their display to 'inline' and giving
- // them layout
- // (IE < 8 does this)
- div.innerHTML = "";
- div.style.width = div.style.padding = "1px";
- div.style.border = 0;
- div.style.overflow = "hidden";
- div.style.display = "inline";
- div.style.zoom = 1;
- support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );
-
- // Check if elements with layout shrink-wrap their children
- // (IE 6 does this)
- div.style.display = "block";
- div.style.overflow = "visible";
- div.innerHTML = "<div style='width:5px;'></div>";
- support.shrinkWrapBlocks = ( div.offsetWidth !== 3 );
- }
-
- div.style.cssText = positionTopLeftWidthHeight + paddingMarginBorderVisibility;
- div.innerHTML = html;
-
- outer = div.firstChild;
- inner = outer.firstChild;
- td = outer.nextSibling.firstChild.firstChild;
-
- offsetSupport = {
- doesNotAddBorder: ( inner.offsetTop !== 5 ),
- doesAddBorderForTableAndCells: ( td.offsetTop === 5 )
- };
-
- inner.style.position = "fixed";
- inner.style.top = "20px";
-
- // safari subtracts parent border width here which is 5px
- offsetSupport.fixedPosition = ( inner.offsetTop === 20 || inner.offsetTop === 15 );
- inner.style.position = inner.style.top = "";
-
- outer.style.overflow = "hidden";
- outer.style.position = "relative";
-
- offsetSupport.subtractsBorderForOverflowNotVisible = ( inner.offsetTop === -5 );
- offsetSupport.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== conMarginTop );
-
- if ( window.getComputedStyle ) {
- div.style.marginTop = "1%";
- support.pixelMargin = ( window.getComputedStyle( div, null ) || { marginTop: 0 } ).marginTop !== "1%";
- }
-
- if ( typeof container.style.zoom !== "undefined" ) {
- container.style.zoom = 1;
- }
-
- body.removeChild( container );
- marginDiv = div = container = null;
-
- jQuery.extend( support, offsetSupport );
- });
-
- return support;
-})();
-
-
-
-
-var rbrace = /^(?:\{.*\}|\[.*\])$/,
- rmultiDash = /([A-Z])/g;
-
-jQuery.extend({
- cache: {},
-
- // Please use with caution
- uuid: 0,
-
- // Unique for each copy of jQuery on the page
- // Non-digits removed to match rinlinejQuery
- expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ),
-
- // The following elements throw uncatchable exceptions if you
- // attempt to add expando properties to them.
- noData: {
- "embed": true,
- // Ban all objects except for Flash (which handle expandos)
- "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
- "applet": true
- },
-
- hasData: function( elem ) {
- elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
- return !!elem && !isEmptyDataObject( elem );
- },
-
- data: function( elem, name, data, pvt /* Internal Use Only */ ) {
- if ( !jQuery.acceptData( elem ) ) {
- return;
- }
-
- var privateCache, thisCache, ret,
- internalKey = jQuery.expando,
- getByName = typeof name === "string",
-
- // We have to handle DOM nodes and JS objects differently because IE6-7
- // can't GC object references properly across the DOM-JS boundary
- isNode = elem.nodeType,
-
- // Only DOM nodes need the global jQuery cache; JS object data is
- // attached directly to the object so GC can occur automatically
- cache = isNode ? jQuery.cache : elem,
-
- // Only defining an ID for JS objects if its cache already exists allows
- // the code to shortcut on the same path as a DOM node with no cache
- id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey,
- isEvents = name === "events";
-
- // Avoid doing any more work than we need to when trying to get data on an
- // object that has no data at all
- if ( (!id || !cache[id] || (!isEvents && !pvt && !cache[id].data)) && getByName && data === undefined ) {
- return;
- }
-
- if ( !id ) {
- // Only DOM nodes need a new unique ID for each element since their data
- // ends up in the global cache
- if ( isNode ) {
- elem[ internalKey ] = id = ++jQuery.uuid;
- } else {
- id = internalKey;
- }
- }
-
- if ( !cache[ id ] ) {
- cache[ id ] = {};
-
- // Avoids exposing jQuery metadata on plain JS objects when the object
- // is serialized using JSON.stringify
- if ( !isNode ) {
- cache[ id ].toJSON = jQuery.noop;
- }
- }
-
- // An object can be passed to jQuery.data instead of a key/value pair; this gets
- // shallow copied over onto the existing cache
- if ( typeof name === "object" || typeof name === "function" ) {
- if ( pvt ) {
- cache[ id ] = jQuery.extend( cache[ id ], name );
- } else {
- cache[ id ].data = jQuery.extend( cache[ id ].data, name );
- }
- }
-
- privateCache = thisCache = cache[ id ];
-
- // jQuery data() is stored in a separate object inside the object's internal data
- // cache in order to avoid key collisions between internal data and user-defined
- // data.
- if ( !pvt ) {
- if ( !thisCache.data ) {
- thisCache.data = {};
- }
-
- thisCache = thisCache.data;
- }
-
- if ( data !== undefined ) {
- thisCache[ jQuery.camelCase( name ) ] = data;
- }
-
- // Users should not attempt to inspect the internal events object using jQuery.data,
- // it is undocumented and subject to change. But does anyone listen? No.
- if ( isEvents && !thisCache[ name ] ) {
- return privateCache.events;
- }
-
- // Check for both converted-to-camel and non-converted data property names
- // If a data property was specified
- if ( getByName ) {
-
- // First Try to find as-is property data
- ret = thisCache[ name ];
-
- // Test for null|undefined property data
- if ( ret == null ) {
-
- // Try to find the camelCased property
- ret = thisCache[ jQuery.camelCase( name ) ];
- }
- } else {
- ret = thisCache;
- }
-
- return ret;
- },
-
- removeData: function( elem, name, pvt /* Internal Use Only */ ) {
- if ( !jQuery.acceptData( elem ) ) {
- return;
- }
-
- var thisCache, i, l,
-
- // Reference to internal data cache key
- internalKey = jQuery.expando,
-
- isNode = elem.nodeType,
-
- // See jQuery.data for more information
- cache = isNode ? jQuery.cache : elem,
-
- // See jQuery.data for more information
- id = isNode ? elem[ internalKey ] : internalKey;
-
- // If there is already no cache entry for this object, there is no
- // purpose in continuing
- if ( !cache[ id ] ) {
- return;
- }
-
- if ( name ) {
-
- thisCache = pvt ? cache[ id ] : cache[ id ].data;
-
- if ( thisCache ) {
-
- // Support array or space separated string names for data keys
- if ( !jQuery.isArray( name ) ) {
-
- // try the string as a key before any manipulation
- if ( name in thisCache ) {
- name = [ name ];
- } else {
-
- // split the camel cased version by spaces unless a key with the spaces exists
- name = jQuery.camelCase( name );
- if ( name in thisCache ) {
- name = [ name ];
- } else {
- name = name.split( " " );
- }
- }
- }
-
- for ( i = 0, l = name.length; i < l; i++ ) {
- delete thisCache[ name[i] ];
- }
-
- // If there is no data left in the cache, we want to continue
- // and let the cache object itself get destroyed
- if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) {
- return;
- }
- }
- }
-
- // See jQuery.data for more information
- if ( !pvt ) {
- delete cache[ id ].data;
-
- // Don't destroy the parent cache unless the internal data object
- // had been the only thing left in it
- if ( !isEmptyDataObject(cache[ id ]) ) {
- return;
- }
- }
-
- // Browsers that fail expando deletion also refuse to delete expandos on
- // the window, but it will allow it on all other JS objects; other browsers
- // don't care
- // Ensure that `cache` is not a window object #10080
- if ( jQuery.support.deleteExpando || !cache.setInterval ) {
- delete cache[ id ];
- } else {
- cache[ id ] = null;
- }
-
- // We destroyed the cache and need to eliminate the expando on the node to avoid
- // false lookups in the cache for entries that no longer exist
- if ( isNode ) {
- // IE does not allow us to delete expando properties from nodes,
- // nor does it have a removeAttribute function on Document nodes;
- // we must handle all of these cases
- if ( jQuery.support.deleteExpando ) {
- delete elem[ internalKey ];
- } else if ( elem.removeAttribute ) {
- elem.removeAttribute( internalKey );
- } else {
- elem[ internalKey ] = null;
- }
- }
- },
-
- // For internal use only.
- _data: function( elem, name, data ) {
- return jQuery.data( elem, name, data, true );
- },
-
- // A method for determining if a DOM node can handle the data expando
- acceptData: function( elem ) {
- if ( elem.nodeName ) {
- var match = jQuery.noData[ elem.nodeName.toLowerCase() ];
-
- if ( match ) {
- return !(match === true || elem.getAttribute("classid") !== match);
- }
- }
-
- return true;
- }
-});
-
-jQuery.fn.extend({
- data: function( key, value ) {
- var parts, part, attr, name, l,
- elem = this[0],
- i = 0,
- data = null;
-
- // Gets all values
- if ( key === undefined ) {
- if ( this.length ) {
- data = jQuery.data( elem );
-
- if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) {
- attr = elem.attributes;
- for ( l = attr.length; i < l; i++ ) {
- name = attr[i].name;
-
- if ( name.indexOf( "data-" ) === 0 ) {
- name = jQuery.camelCase( name.substring(5) );
-
- dataAttr( elem, name, data[ name ] );
- }
- }
- jQuery._data( elem, "parsedAttrs", true );
- }
- }
-
- return data;
- }
-
- // Sets multiple values
- if ( typeof key === "object" ) {
- return this.each(function() {
- jQuery.data( this, key );
- });
- }
-
- parts = key.split( ".", 2 );
- parts[1] = parts[1] ? "." + parts[1] : "";
- part = parts[1] + "!";
-
- return jQuery.access( this, function( value ) {
-
- if ( value === undefined ) {
- data = this.triggerHandler( "getData" + part, [ parts[0] ] );
-
- // Try to fetch any internally stored data first
- if ( data === undefined && elem ) {
- data = jQuery.data( elem, key );
- data = dataAttr( elem, key, data );
- }
-
- return data === undefined && parts[1] ?
- this.data( parts[0] ) :
- data;
- }
-
- parts[1] = value;
- this.each(function() {
- var self = jQuery( this );
-
- self.triggerHandler( "setData" + part, parts );
- jQuery.data( this, key, value );
- self.triggerHandler( "changeData" + part, parts );
- });
- }, null, value, arguments.length > 1, null, false );
- },
-
- removeData: function( key ) {
- return this.each(function() {
- jQuery.removeData( this, key );
- });
- }
-});
-
-function dataAttr( elem, key, data ) {
- // If nothing was found internally, try to fetch any
- // data from the HTML5 data-* attribute
- if ( data === undefined && elem.nodeType === 1 ) {
-
- var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
-
- data = elem.getAttribute( name );
-
- if ( typeof data === "string" ) {
- try {
- data = data === "true" ? true :
- data === "false" ? false :
- data === "null" ? null :
- jQuery.isNumeric( data ) ? +data :
- rbrace.test( data ) ? jQuery.parseJSON( data ) :
- data;
- } catch( e ) {}
-
- // Make sure we set the data so it isn't changed later
- jQuery.data( elem, key, data );
-
- } else {
- data = undefined;
- }
- }
-
- return data;
-}
-
-// checks a cache object for emptiness
-function isEmptyDataObject( obj ) {
- for ( var name in obj ) {
-
- // if the public data object is empty, the private is still empty
- if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) {
- continue;
- }
- if ( name !== "toJSON" ) {
- return false;
- }
- }
-
- return true;
-}
-
-
-
-
-function handleQueueMarkDefer( elem, type, src ) {
- var deferDataKey = type + "defer",
- queueDataKey = type + "queue",
- markDataKey = type + "mark",
- defer = jQuery._data( elem, deferDataKey );
- if ( defer &&
- ( src === "queue" || !jQuery._data(elem, queueDataKey) ) &&
- ( src === "mark" || !jQuery._data(elem, markDataKey) ) ) {
- // Give room for hard-coded callbacks to fire first
- // and eventually mark/queue something else on the element
- setTimeout( function() {
- if ( !jQuery._data( elem, queueDataKey ) &&
- !jQuery._data( elem, markDataKey ) ) {
- jQuery.removeData( elem, deferDataKey, true );
- defer.fire();
- }
- }, 0 );
- }
-}
-
-jQuery.extend({
-
- _mark: function( elem, type ) {
- if ( elem ) {
- type = ( type || "fx" ) + "mark";
- jQuery._data( elem, type, (jQuery._data( elem, type ) || 0) + 1 );
- }
- },
-
- _unmark: function( force, elem, type ) {
- if ( force !== true ) {
- type = elem;
- elem = force;
- force = false;
- }
- if ( elem ) {
- type = type || "fx";
- var key = type + "mark",
- count = force ? 0 : ( (jQuery._data( elem, key ) || 1) - 1 );
- if ( count ) {
- jQuery._data( elem, key, count );
- } else {
- jQuery.removeData( elem, key, true );
- handleQueueMarkDefer( elem, type, "mark" );
- }
- }
- },
-
- queue: function( elem, type, data ) {
- var q;
- if ( elem ) {
- type = ( type || "fx" ) + "queue";
- q = jQuery._data( elem, type );
-
- // Speed up dequeue by getting out quickly if this is just a lookup
- if ( data ) {
- if ( !q || jQuery.isArray(data) ) {
- q = jQuery._data( elem, type, jQuery.makeArray(data) );
- } else {
- q.push( data );
- }
- }
- return q || [];
- }
- },
-
- dequeue: function( elem, type ) {
- type = type || "fx";
-
- var queue = jQuery.queue( elem, type ),
- fn = queue.shift(),
- hooks = {};
-
- // If the fx queue is dequeued, always remove the progress sentinel
- if ( fn === "inprogress" ) {
- fn = queue.shift();
- }
-
- if ( fn ) {
- // Add a progress sentinel to prevent the fx queue from being
- // automatically dequeued
- if ( type === "fx" ) {
- queue.unshift( "inprogress" );
- }
-
- jQuery._data( elem, type + ".run", hooks );
- fn.call( elem, function() {
- jQuery.dequeue( elem, type );
- }, hooks );
- }
-
- if ( !queue.length ) {
- jQuery.removeData( elem, type + "queue " + type + ".run", true );
- handleQueueMarkDefer( elem, type, "queue" );
- }
- }
-});
-
-jQuery.fn.extend({
- queue: function( type, data ) {
- var setter = 2;
-
- if ( typeof type !== "string" ) {
- data = type;
- type = "fx";
- setter--;
- }
-
- if ( arguments.length < setter ) {
- return jQuery.queue( this[0], type );
- }
-
- return data === undefined ?
- this :
- this.each(function() {
- var queue = jQuery.queue( this, type, data );
-
- if ( type === "fx" && queue[0] !== "inprogress" ) {
- jQuery.dequeue( this, type );
- }
- });
- },
- dequeue: function( type ) {
- return this.each(function() {
- jQuery.dequeue( this, type );
- });
- },
- // Based off of the plugin by Clint Helfers, with permission.
- // http://blindsignals.com/index.php/2009/07/jquery-delay/
- delay: function( time, type ) {
- time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
- type = type || "fx";
-
- return this.queue( type, function( next, hooks ) {
- var timeout = setTimeout( next, time );
- hooks.stop = function() {
- clearTimeout( timeout );
- };
- });
- },
- clearQueue: function( type ) {
- return this.queue( type || "fx", [] );
- },
- // Get a promise resolved when queues of a certain type
- // are emptied (fx is the type by default)
- promise: function( type, object ) {
- if ( typeof type !== "string" ) {
- object = type;
- type = undefined;
- }
- type = type || "fx";
- var defer = jQuery.Deferred(),
- elements = this,
- i = elements.length,
- count = 1,
- deferDataKey = type + "defer",
- queueDataKey = type + "queue",
- markDataKey = type + "mark",
- tmp;
- function resolve() {
- if ( !( --count ) ) {
- defer.resolveWith( elements, [ elements ] );
- }
- }
- while( i-- ) {
- if (( tmp = jQuery.data( elements[ i ], deferDataKey, undefined, true ) ||
- ( jQuery.data( elements[ i ], queueDataKey, undefined, true ) ||
- jQuery.data( elements[ i ], markDataKey, undefined, true ) ) &&
- jQuery.data( elements[ i ], deferDataKey, jQuery.Callbacks( "once memory" ), true ) )) {
- count++;
- tmp.add( resolve );
- }
- }
- resolve();
- return defer.promise( object );
- }
-});
-
-
-
-
-var rclass = /[\n\t\r]/g,
- rspace = /\s+/,
- rreturn = /\r/g,
- rtype = /^(?:button|input)$/i,
- rfocusable = /^(?:button|input|object|select|textarea)$/i,
- rclickable = /^a(?:rea)?$/i,
- rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
- getSetAttribute = jQuery.support.getSetAttribute,
- nodeHook, boolHook, fixSpecified;
-
-jQuery.fn.extend({
- attr: function( name, value ) {
- return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 );
- },
-
- removeAttr: function( name ) {
- return this.each(function() {
- jQuery.removeAttr( this, name );
- });
- },
-
- prop: function( name, value ) {
- return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 );
- },
-
- removeProp: function( name ) {
- name = jQuery.propFix[ name ] || name;
- return this.each(function() {
- // try/catch handles cases where IE balks (such as removing a property on window)
- try {
- this[ name ] = undefined;
- delete this[ name ];
- } catch( e ) {}
- });
- },
-
- addClass: function( value ) {
- var classNames, i, l, elem,
- setClass, c, cl;
-
- if ( jQuery.isFunction( value ) ) {
- return this.each(function( j ) {
- jQuery( this ).addClass( value.call(this, j, this.className) );
- });
- }
-
- if ( value && typeof value === "string" ) {
- classNames = value.split( rspace );
-
- for ( i = 0, l = this.length; i < l; i++ ) {
- elem = this[ i ];
-
- if ( elem.nodeType === 1 ) {
- if ( !elem.className && classNames.length === 1 ) {
- elem.className = value;
-
- } else {
- setClass = " " + elem.className + " ";
-
- for ( c = 0, cl = classNames.length; c < cl; c++ ) {
- if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) {
- setClass += classNames[ c ] + " ";
- }
- }
- elem.className = jQuery.trim( setClass );
- }
- }
- }
- }
-
- return this;
- },
-
- removeClass: function( value ) {
- var classNames, i, l, elem, className, c, cl;
-
- if ( jQuery.isFunction( value ) ) {
- return this.each(function( j ) {
- jQuery( this ).removeClass( value.call(this, j, this.className) );
- });
- }
-
- if ( (value && typeof value === "string") || value === undefined ) {
- classNames = ( value || "" ).split( rspace );
-
- for ( i = 0, l = this.length; i < l; i++ ) {
- elem = this[ i ];
-
- if ( elem.nodeType === 1 && elem.className ) {
- if ( value ) {
- className = (" " + elem.className + " ").replace( rclass, " " );
- for ( c = 0, cl = classNames.length; c < cl; c++ ) {
- className = className.replace(" " + classNames[ c ] + " ", " ");
- }
- elem.className = jQuery.trim( className );
-
- } else {
- elem.className = "";
- }
- }
- }
- }
-
- return this;
- },
-
- toggleClass: function( value, stateVal ) {
- var type = typeof value,
- isBool = typeof stateVal === "boolean";
-
- if ( jQuery.isFunction( value ) ) {
- return this.each(function( i ) {
- jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
- });
- }
-
- return this.each(function() {
- if ( type === "string" ) {
- // toggle individual class names
- var className,
- i = 0,
- self = jQuery( this ),
- state = stateVal,
- classNames = value.split( rspace );
-
- while ( (className = classNames[ i++ ]) ) {
- // check each className given, space seperated list
- state = isBool ? state : !self.hasClass( className );
- self[ state ? "addClass" : "removeClass" ]( className );
- }
-
- } else if ( type === "undefined" || type === "boolean" ) {
- if ( this.className ) {
- // store className if set
- jQuery._data( this, "__className__", this.className );
- }
-
- // toggle whole className
- this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
- }
- });
- },
-
- hasClass: function( selector ) {
- var className = " " + selector + " ",
- i = 0,
- l = this.length;
- for ( ; i < l; i++ ) {
- if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) {
- return true;
- }
- }
-
- return false;
- },
-
- val: function( value ) {
- var hooks, ret, isFunction,
- elem = this[0];
-
- if ( !arguments.length ) {
- if ( elem ) {
- hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];
-
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
- return ret;
- }
-
- ret = elem.value;
-
- return typeof ret === "string" ?
- // handle most common string cases
- ret.replace(rreturn, "") :
- // handle cases where value is null/undef or number
- ret == null ? "" : ret;
- }
-
- return;
- }
-
- isFunction = jQuery.isFunction( value );
-
- return this.each(function( i ) {
- var self = jQuery(this), val;
-
- if ( this.nodeType !== 1 ) {
- return;
- }
-
- if ( isFunction ) {
- val = value.call( this, i, self.val() );
- } else {
- val = value;
- }
-
- // Treat null/undefined as ""; convert numbers to string
- if ( val == null ) {
- val = "";
- } else if ( typeof val === "number" ) {
- val += "";
- } else if ( jQuery.isArray( val ) ) {
- val = jQuery.map(val, function ( value ) {
- return value == null ? "" : value + "";
- });
- }
-
- hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
-
- // If set returns undefined, fall back to normal setting
- if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
- this.value = val;
- }
- });
- }
-});
-
-jQuery.extend({
- valHooks: {
- option: {
- get: function( elem ) {
- // attributes.value is undefined in Blackberry 4.7 but
- // uses .value. See #6932
- var val = elem.attributes.value;
- return !val || val.specified ? elem.value : elem.text;
- }
- },
- select: {
- get: function( elem ) {
- var value, i, max, option,
- index = elem.selectedIndex,
- values = [],
- options = elem.options,
- one = elem.type === "select-one";
-
- // Nothing was selected
- if ( index < 0 ) {
- return null;
- }
-
- // Loop through all the selected options
- i = one ? index : 0;
- max = one ? index + 1 : options.length;
- for ( ; i < max; i++ ) {
- option = options[ i ];
-
- // Don't return options that are disabled or in a disabled optgroup
- if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) &&
- (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) {
-
- // Get the specific value for the option
- value = jQuery( option ).val();
-
- // We don't need an array for one selects
- if ( one ) {
- return value;
- }
-
- // Multi-Selects return an array
- values.push( value );
- }
- }
-
- // Fixes Bug #2551 -- select.val() broken in IE after form.reset()
- if ( one && !values.length && options.length ) {
- return jQuery( options[ index ] ).val();
- }
-
- return values;
- },
-
- set: function( elem, value ) {
- var values = jQuery.makeArray( value );
-
- jQuery(elem).find("option").each(function() {
- this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;
- });
-
- if ( !values.length ) {
- elem.selectedIndex = -1;
- }
- return values;
- }
- }
- },
-
- attrFn: {
- val: true,
- css: true,
- html: true,
- text: true,
- data: true,
- width: true,
- height: true,
- offset: true
- },
-
- attr: function( elem, name, value, pass ) {
- var ret, hooks, notxml,
- nType = elem.nodeType;
-
- // don't get/set attributes on text, comment and attribute nodes
- if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
- return;
- }
-
- if ( pass && name in jQuery.attrFn ) {
- return jQuery( elem )[ name ]( value );
- }
-
- // Fallback to prop when attributes are not supported
- if ( typeof elem.getAttribute === "undefined" ) {
- return jQuery.prop( elem, name, value );
- }
-
- notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
-
- // All attributes are lowercase
- // Grab necessary hook if one is defined
- if ( notxml ) {
- name = name.toLowerCase();
- hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook );
- }
-
- if ( value !== undefined ) {
-
- if ( value === null ) {
- jQuery.removeAttr( elem, name );
- return;
-
- } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) {
- return ret;
-
- } else {
- elem.setAttribute( name, "" + value );
- return value;
- }
-
- } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) {
- return ret;
-
- } else {
-
- ret = elem.getAttribute( name );
-
- // Non-existent attributes return null, we normalize to undefined
- return ret === null ?
- undefined :
- ret;
- }
- },
-
- removeAttr: function( elem, value ) {
- var propName, attrNames, name, l, isBool,
- i = 0;
-
- if ( value && elem.nodeType === 1 ) {
- attrNames = value.toLowerCase().split( rspace );
- l = attrNames.length;
-
- for ( ; i < l; i++ ) {
- name = attrNames[ i ];
-
- if ( name ) {
- propName = jQuery.propFix[ name ] || name;
- isBool = rboolean.test( name );
-
- // See #9699 for explanation of this approach (setting first, then removal)
- // Do not do this for boolean attributes (see #10870)
- if ( !isBool ) {
- jQuery.attr( elem, name, "" );
- }
- elem.removeAttribute( getSetAttribute ? name : propName );
-
- // Set corresponding property to false for boolean attributes
- if ( isBool && propName in elem ) {
- elem[ propName ] = false;
- }
- }
- }
- }
- },
-
- attrHooks: {
- type: {
- set: function( elem, value ) {
- // We can't allow the type property to be changed (since it causes problems in IE)
- if ( rtype.test( elem.nodeName ) && elem.parentNode ) {
- jQuery.error( "type property can't be changed" );
- } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
- // Setting the type on a radio button after the value resets the value in IE6-9
- // Reset value to it's default in case type is set after value
- // This is for element creation
- var val = elem.value;
- elem.setAttribute( "type", value );
- if ( val ) {
- elem.value = val;
- }
- return value;
- }
- }
- },
- // Use the value property for back compat
- // Use the nodeHook for button elements in IE6/7 (#1954)
- value: {
- get: function( elem, name ) {
- if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
- return nodeHook.get( elem, name );
- }
- return name in elem ?
- elem.value :
- null;
- },
- set: function( elem, value, name ) {
- if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
- return nodeHook.set( elem, value, name );
- }
- // Does not return so that setAttribute is also used
- elem.value = value;
- }
- }
- },
-
- propFix: {
- tabindex: "tabIndex",
- readonly: "readOnly",
- "for": "htmlFor",
- "class": "className",
- maxlength: "maxLength",
- cellspacing: "cellSpacing",
- cellpadding: "cellPadding",
- rowspan: "rowSpan",
- colspan: "colSpan",
- usemap: "useMap",
- frameborder: "frameBorder",
- contenteditable: "contentEditable"
- },
-
- prop: function( elem, name, value ) {
- var ret, hooks, notxml,
- nType = elem.nodeType;
-
- // don't get/set properties on text, comment and attribute nodes
- if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
- return;
- }
-
- notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
-
- if ( notxml ) {
- // Fix name and attach hooks
- name = jQuery.propFix[ name ] || name;
- hooks = jQuery.propHooks[ name ];
- }
-
- if ( value !== undefined ) {
- if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
- return ret;
-
- } else {
- return ( elem[ name ] = value );
- }
-
- } else {
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
- return ret;
-
- } else {
- return elem[ name ];
- }
- }
- },
-
- propHooks: {
- tabIndex: {
- get: function( elem ) {
- // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
- // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
- var attributeNode = elem.getAttributeNode("tabindex");
-
- return attributeNode && attributeNode.specified ?
- parseInt( attributeNode.value, 10 ) :
- rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
- 0 :
- undefined;
- }
- }
- }
-});
-
-// Add the tabIndex propHook to attrHooks for back-compat (different case is intentional)
-jQuery.attrHooks.tabindex = jQuery.propHooks.tabIndex;
-
-// Hook for boolean attributes
-boolHook = {
- get: function( elem, name ) {
- // Align boolean attributes with corresponding properties
- // Fall back to attribute presence where some booleans are not supported
- var attrNode,
- property = jQuery.prop( elem, name );
- return property === true || typeof property !== "boolean" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ?
- name.toLowerCase() :
- undefined;
- },
- set: function( elem, value, name ) {
- var propName;
- if ( value === false ) {
- // Remove boolean attributes when set to false
- jQuery.removeAttr( elem, name );
- } else {
- // value is true since we know at this point it's type boolean and not false
- // Set boolean attributes to the same name and set the DOM property
- propName = jQuery.propFix[ name ] || name;
- if ( propName in elem ) {
- // Only set the IDL specifically if it already exists on the element
- elem[ propName ] = true;
- }
-
- elem.setAttribute( name, name.toLowerCase() );
- }
- return name;
- }
-};
-
-// IE6/7 do not support getting/setting some attributes with get/setAttribute
-if ( !getSetAttribute ) {
-
- fixSpecified = {
- name: true,
- id: true,
- coords: true
- };
-
- // Use this for any attribute in IE6/7
- // This fixes almost every IE6/7 issue
- nodeHook = jQuery.valHooks.button = {
- get: function( elem, name ) {
- var ret;
- ret = elem.getAttributeNode( name );
- return ret && ( fixSpecified[ name ] ? ret.nodeValue !== "" : ret.specified ) ?
- ret.nodeValue :
- undefined;
- },
- set: function( elem, value, name ) {
- // Set the existing or create a new attribute node
- var ret = elem.getAttributeNode( name );
- if ( !ret ) {
- ret = document.createAttribute( name );
- elem.setAttributeNode( ret );
- }
- return ( ret.nodeValue = value + "" );
- }
- };
-
- // Apply the nodeHook to tabindex
- jQuery.attrHooks.tabindex.set = nodeHook.set;
-
- // Set width and height to auto instead of 0 on empty string( Bug #8150 )
- // This is for removals
- jQuery.each([ "width", "height" ], function( i, name ) {
- jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
- set: function( elem, value ) {
- if ( value === "" ) {
- elem.setAttribute( name, "auto" );
- return value;
- }
- }
- });
- });
-
- // Set contenteditable to false on removals(#10429)
- // Setting to empty string throws an error as an invalid value
- jQuery.attrHooks.contenteditable = {
- get: nodeHook.get,
- set: function( elem, value, name ) {
- if ( value === "" ) {
- value = "false";
- }
- nodeHook.set( elem, value, name );
- }
- };
-}
-
-
-// Some attributes require a special call on IE
-if ( !jQuery.support.hrefNormalized ) {
- jQuery.each([ "href", "src", "width", "height" ], function( i, name ) {
- jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
- get: function( elem ) {
- var ret = elem.getAttribute( name, 2 );
- return ret === null ? undefined : ret;
- }
- });
- });
-}
-
-if ( !jQuery.support.style ) {
- jQuery.attrHooks.style = {
- get: function( elem ) {
- // Return undefined in the case of empty string
- // Normalize to lowercase since IE uppercases css property names
- return elem.style.cssText.toLowerCase() || undefined;
- },
- set: function( elem, value ) {
- return ( elem.style.cssText = "" + value );
- }
- };
-}
-
-// Safari mis-reports the default selected property of an option
-// Accessing the parent's selectedIndex property fixes it
-if ( !jQuery.support.optSelected ) {
- jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, {
- get: function( elem ) {
- var parent = elem.parentNode;
-
- if ( parent ) {
- parent.selectedIndex;
-
- // Make sure that it also works with optgroups, see #5701
- if ( parent.parentNode ) {
- parent.parentNode.selectedIndex;
- }
- }
- return null;
- }
- });
-}
-
-// IE6/7 call enctype encoding
-if ( !jQuery.support.enctype ) {
- jQuery.propFix.enctype = "encoding";
-}
-
-// Radios and checkboxes getter/setter
-if ( !jQuery.support.checkOn ) {
- jQuery.each([ "radio", "checkbox" ], function() {
- jQuery.valHooks[ this ] = {
- get: function( elem ) {
- // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified
- return elem.getAttribute("value") === null ? "on" : elem.value;
- }
- };
- });
-}
-jQuery.each([ "radio", "checkbox" ], function() {
- jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], {
- set: function( elem, value ) {
- if ( jQuery.isArray( value ) ) {
- return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
- }
- }
- });
-});
-
-
-
-
-var rformElems = /^(?:textarea|input|select)$/i,
- rtypenamespace = /^([^\.]*)?(?:\.(.+))?$/,
- rhoverHack = /(?:^|\s)hover(\.\S+)?\b/,
- rkeyEvent = /^key/,
- rmouseEvent = /^(?:mouse|contextmenu)|click/,
- rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
- rquickIs = /^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,
- quickParse = function( selector ) {
- var quick = rquickIs.exec( selector );
- if ( quick ) {
- // 0 1 2 3
- // [ _, tag, id, class ]
- quick[1] = ( quick[1] || "" ).toLowerCase();
- quick[3] = quick[3] && new RegExp( "(?:^|\\s)" + quick[3] + "(?:\\s|$)" );
- }
- return quick;
- },
- quickIs = function( elem, m ) {
- var attrs = elem.attributes || {};
- return (
- (!m[1] || elem.nodeName.toLowerCase() === m[1]) &&
- (!m[2] || (attrs.id || {}).value === m[2]) &&
- (!m[3] || m[3].test( (attrs[ "class" ] || {}).value ))
- );
- },
- hoverHack = function( events ) {
- return jQuery.event.special.hover ? events : events.replace( rhoverHack, "mouseenter$1 mouseleave$1" );
- };
-
-/*
- * Helper functions for managing events -- not part of the public interface.
- * Props to Dean Edwards' addEvent library for many of the ideas.
- */
-jQuery.event = {
-
- add: function( elem, types, handler, data, selector ) {
-
- var elemData, eventHandle, events,
- t, tns, type, namespaces, handleObj,
- handleObjIn, quick, handlers, special;
-
- // Don't attach events to noData or text/comment nodes (allow plain objects tho)
- if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) {
- return;
- }
-
- // Caller can pass in an object of custom data in lieu of the handler
- if ( handler.handler ) {
- handleObjIn = handler;
- handler = handleObjIn.handler;
- selector = handleObjIn.selector;
- }
-
- // Make sure that the handler has a unique ID, used to find/remove it later
- if ( !handler.guid ) {
- handler.guid = jQuery.guid++;
- }
-
- // Init the element's event structure and main handler, if this is the first
- events = elemData.events;
- if ( !events ) {
- elemData.events = events = {};
- }
- eventHandle = elemData.handle;
- if ( !eventHandle ) {
- elemData.handle = eventHandle = function( e ) {
- // Discard the second event of a jQuery.event.trigger() and
- // when an event is called after a page has unloaded
- return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ?
- jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
- undefined;
- };
- // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events
- eventHandle.elem = elem;
- }
-
- // Handle multiple events separated by a space
- // jQuery(...).bind("mouseover mouseout", fn);
- types = jQuery.trim( hoverHack(types) ).split( " " );
- for ( t = 0; t < types.length; t++ ) {
-
- tns = rtypenamespace.exec( types[t] ) || [];
- type = tns[1];
- namespaces = ( tns[2] || "" ).split( "." ).sort();
-
- // If event changes its type, use the special event handlers for the changed type
- special = jQuery.event.special[ type ] || {};
-
- // If selector defined, determine special event api type, otherwise given type
- type = ( selector ? special.delegateType : special.bindType ) || type;
-
- // Update special based on newly reset type
- special = jQuery.event.special[ type ] || {};
-
- // handleObj is passed to all event handlers
- handleObj = jQuery.extend({
- type: type,
- origType: tns[1],
- data: data,
- handler: handler,
- guid: handler.guid,
- selector: selector,
- quick: selector && quickParse( selector ),
- namespace: namespaces.join(".")
- }, handleObjIn );
-
- // Init the event handler queue if we're the first
- handlers = events[ type ];
- if ( !handlers ) {
- handlers = events[ type ] = [];
- handlers.delegateCount = 0;
-
- // Only use addEventListener/attachEvent if the special events handler returns false
- if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
- // Bind the global event handler to the element
- if ( elem.addEventListener ) {
- elem.addEventListener( type, eventHandle, false );
-
- } else if ( elem.attachEvent ) {
- elem.attachEvent( "on" + type, eventHandle );
- }
- }
- }
-
- if ( special.add ) {
- special.add.call( elem, handleObj );
-
- if ( !handleObj.handler.guid ) {
- handleObj.handler.guid = handler.guid;
- }
- }
-
- // Add to the element's handler list, delegates in front
- if ( selector ) {
- handlers.splice( handlers.delegateCount++, 0, handleObj );
- } else {
- handlers.push( handleObj );
- }
-
- // Keep track of which events have ever been used, for event optimization
- jQuery.event.global[ type ] = true;
- }
-
- // Nullify elem to prevent memory leaks in IE
- elem = null;
- },
-
- global: {},
-
- // Detach an event or set of events from an element
- remove: function( elem, types, handler, selector, mappedTypes ) {
-
- var elemData = jQuery.hasData( elem ) && jQuery._data( elem ),
- t, tns, type, origType, namespaces, origCount,
- j, events, special, handle, eventType, handleObj;
-
- if ( !elemData || !(events = elemData.events) ) {
- return;
- }
-
- // Once for each type.namespace in types; type may be omitted
- types = jQuery.trim( hoverHack( types || "" ) ).split(" ");
- for ( t = 0; t < types.length; t++ ) {
- tns = rtypenamespace.exec( types[t] ) || [];
- type = origType = tns[1];
- namespaces = tns[2];
-
- // Unbind all events (on this namespace, if provided) for the element
- if ( !type ) {
- for ( type in events ) {
- jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
- }
- continue;
- }
-
- special = jQuery.event.special[ type ] || {};
- type = ( selector? special.delegateType : special.bindType ) || type;
- eventType = events[ type ] || [];
- origCount = eventType.length;
- namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.)?") + "(\\.|$)") : null;
-
- // Remove matching events
- for ( j = 0; j < eventType.length; j++ ) {
- handleObj = eventType[ j ];
-
- if ( ( mappedTypes || origType === handleObj.origType ) &&
- ( !handler || handler.guid === handleObj.guid ) &&
- ( !namespaces || namespaces.test( handleObj.namespace ) ) &&
- ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
- eventType.splice( j--, 1 );
-
- if ( handleObj.selector ) {
- eventType.delegateCount--;
- }
- if ( special.remove ) {
- special.remove.call( elem, handleObj );
- }
- }
- }
-
- // Remove generic event handler if we removed something and no more handlers exist
- // (avoids potential for endless recursion during removal of special event handlers)
- if ( eventType.length === 0 && origCount !== eventType.length ) {
- if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) {
- jQuery.removeEvent( elem, type, elemData.handle );
- }
-
- delete events[ type ];
- }
- }
-
- // Remove the expando if it's no longer used
- if ( jQuery.isEmptyObject( events ) ) {
- handle = elemData.handle;
- if ( handle ) {
- handle.elem = null;
- }
-
- // removeData also checks for emptiness and clears the expando if empty
- // so use it instead of delete
- jQuery.removeData( elem, [ "events", "handle" ], true );
- }
- },
-
- // Events that are safe to short-circuit if no handlers are attached.
- // Native DOM events should not be added, they may have inline handlers.
- customEvent: {
- "getData": true,
- "setData": true,
- "changeData": true
- },
-
- trigger: function( event, data, elem, onlyHandlers ) {
- // Don't do events on text and comment nodes
- if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) {
- return;
- }
-
- // Event object or event type
- var type = event.type || event,
- namespaces = [],
- cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType;
-
- // focus/blur morphs to focusin/out; ensure we're not firing them right now
- if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
- return;
- }
-
- if ( type.indexOf( "!" ) >= 0 ) {
- // Exclusive events trigger only for the exact event (no namespaces)
- type = type.slice(0, -1);
- exclusive = true;
- }
-
- if ( type.indexOf( "." ) >= 0 ) {
- // Namespaced trigger; create a regexp to match event type in handle()
- namespaces = type.split(".");
- type = namespaces.shift();
- namespaces.sort();
- }
-
- if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) {
- // No jQuery handlers for this event type, and it can't have inline handlers
- return;
- }
-
- // Caller can pass in an Event, Object, or just an event type string
- event = typeof event === "object" ?
- // jQuery.Event object
- event[ jQuery.expando ] ? event :
- // Object literal
- new jQuery.Event( type, event ) :
- // Just the event type (string)
- new jQuery.Event( type );
-
- event.type = type;
- event.isTrigger = true;
- event.exclusive = exclusive;
- event.namespace = namespaces.join( "." );
- event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)") : null;
- ontype = type.indexOf( ":" ) < 0 ? "on" + type : "";
-
- // Handle a global trigger
- if ( !elem ) {
-
- // TODO: Stop taunting the data cache; remove global events and always attach to document
- cache = jQuery.cache;
- for ( i in cache ) {
- if ( cache[ i ].events && cache[ i ].events[ type ] ) {
- jQuery.event.trigger( event, data, cache[ i ].handle.elem, true );
- }
- }
- retu
<TRUNCATED>
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/lib/angular/version.txt
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/test/lib/angular/version.txt b/ocw-ui/frontend/test/lib/angular/version.txt
deleted file mode 100755
index 90a27f9..0000000
--- a/ocw-ui/frontend/test/lib/angular/version.txt
+++ /dev/null
@@ -1 +0,0 @@
-1.0.5
[26/28] CLIMATE-512 - Replace frontend with new Yeoman/Grunt/Bower
frontend
Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/app/scripts/controllers/parameterselect.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/app/scripts/controllers/parameterselect.js b/ocw-ui/frontend-new/app/scripts/controllers/parameterselect.js
deleted file mode 100644
index cad97e0..0000000
--- a/ocw-ui/frontend-new/app/scripts/controllers/parameterselect.js
+++ /dev/null
@@ -1,275 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict';
-
-/**
- * @ngdoc function
- * @name ocwUiApp.controller:ParameterSelectCtrl
- * @description
- * # ParameterSelectCtrl
- * Controller of the ocwUiApp
- */
-angular.module('ocwUiApp')
-.controller('ParameterSelectCtrl', ['$rootScope', '$scope', '$http', '$timeout',
- 'selectedDatasetInformation', 'regionSelectParams', 'evaluationSettings',
- function($rootScope, $scope, $http, $timeout, selectedDatasetInformation, regionSelectParams, evaluationSettings) {
- $scope.datasets = selectedDatasetInformation.getDatasets();
-
- // The min/max lat/lon values from the selected datasets
- $scope.latMin = -90;
- $scope.latMax = 90;
- $scope.lonMin = -180;
- $scope.lonMax = 180;
- $scope.start = "1900-01-01 00:00:00";
- $scope.end = "2030-01-01 00:00:00";
-
- // The min/max lat/lon values that are displayed
- $scope.displayParams = regionSelectParams.getParameters();
-
- $scope.runningEval = false;
-
- // Flag for toggling re-grid controls based on whether or not the user has selected a grid
- // base from the selected datasets. By default we have no datasets so we don't need to show
- // the controls!
- $scope.areInUserRegridState = false;
-
- // Initialization for the lat/lon grid step sliders
- // TODO There has to be a better way of dealing with this. Perhaps a directive??
- $scope.latSliderVal = 0;
- $scope.lonSliderVal = 0;
-
- // Settings for jQuery datepicker directives!
- $scope.datepickerSettings = {
- changeMonth: true,
- changeYear: true,
- };
-
- $scope.shouldDisableControls = function() {
- return (selectedDatasetInformation.getDatasetCount() < 2);
- }
-
- $scope.shouldDisableEvaluateButton = function() {
- return ($scope.shouldDisableControls() || $scope.runningEval);
- }
-
- $scope.shouldDisableResultsView = function() {
- var res = false;
-
- if ($rootScope.evalResults == "")
- res = true;
-
- return res;
- }
-
- $scope.runEvaluation = function() {
- $scope.runningEval = true;
-
- var data = {}
- var settings = evaluationSettings.getSettings()
-
- // Set dataset information
-
- // Grab the reference dataset information
- var ref_ds = settings.spatialSelect;
-
- if (ref_ds == null) {
- ref_ds = $scope.datasets[0];
- }
-
- data['reference_dataset'] = null;
- data['target_datasets'] = [];
-
- // Parse all the dataset information and generate the necessary objects for the backend
- for (var i = 0; i < $scope.datasets.length; i++) {
- var dataset = {}
- dataset['dataset_info'] = {}
-
- if ($scope.datasets[i].isObs == 0) {
- dataset['data_source_id'] = 1;
- dataset['dataset_info']['dataset_id'] = $scope.datasets[i]['id'];
- dataset['dataset_info']['var_name'] = $scope.datasets[i]['param'];
- dataset['dataset_info']['lat_name'] = $scope.datasets[i]['lat'];
- dataset['dataset_info']['lon_name'] = $scope.datasets[i]['lon'];
- dataset['dataset_info']['time_name'] = $scope.datasets[i]['time'];
- dataset['dataset_info']['name'] = $scope.datasets[i]['name'];
- } else {
- dataset['data_source_id'] = 2;
- dataset['dataset_info']['dataset_id'] = $scope.datasets[i]['datasetId'];
- dataset['dataset_info']['parameter_id'] = $scope.datasets[i]['param'];
- dataset['dataset_info']['name'] = $scope.datasets[i]['name'];
- }
-
- if ($scope.datasets[i].id === ref_ds.id) {
- data['reference_dataset'] = dataset;
- } else {
- data['target_datasets'].push(dataset);
- }
- }
-
- // TODO: These should be use customizable
- // Set the spatial rebin grid steps
- data['spatial_rebin_lat_step'] = 1;
- data['spatial_rebin_lon_step'] = 1;
-
- // Determine the temporal resolution to use when doing a temporal rebin. The
- // value is used to determine the timedelta in days to use.
- var temporal_res = settings.temporal.selected;
-
- if (temporal_res == 'daily') {
- data['temporal_resolution'] = 1;
- } else if (temporal_res == 'monthly') {
- data['temporal_resolution'] = 30;
- } else if (temporal_res == 'yearly') {
- data['temporal_resolution'] = 365;
- } else if (temporal_res == 'full') {
- data['temporal_resolution'] = 999;
- } else {
- // Default to monthly just in case
- data['temporal_resolution'] = 30;
- }
-
- // Load the Metrics for the evaluation
- data['metrics'] = []
- var metrics = settings.metrics
- for (var i = 0; i < metrics.length; i++) {
- var metric = metrics[i];
-
- if (metric.select) {
- data['metrics'].push(metric.name)
- }
- }
-
- // Set the bound values for the evaluation
- data['start_time'] = $scope.displayParams.start + " 00:00:00",
- data['end_time'] = $scope.displayParams.end + " 00:00:00",
- data['lat_min'] = $scope.displayParams.latMin,
- data['lat_max'] = $scope.displayParams.latMax,
- data['lon_min'] = $scope.displayParams.lonMin,
- data['lon_max'] = $scope.displayParams.lonMax,
-
- $http.post($rootScope.baseURL + '/processing/run_evaluation/', data).
- success(function(data) {
- var evalWorkDir = data['eval_work_dir'];
-
- $scope.runningEval = false;
-
- $timeout(function() {
- if (evalWorkDir !== undefined) {
- window.location = "#/results/" + evalWorkDir;
- } else {
- window.location = "#/results";
- }
- }, 100);
-
- }).error(function() {
- $scope.runningEval = false;
- });
- };
-
- // Check the Parameter selection boxes after the user has changed input to ensure that valid
- // values were entered
- $scope.checkParameters = function() {
- if (parseFloat($scope.displayParams.latMin) < parseFloat($scope.latMin))
- $scope.displayParams.latMin = $scope.latMin;
-
- if (parseFloat($scope.displayParams.latMax) > parseFloat($scope.latMax))
- $scope.displayParams.latMax = $scope.latMax;
-
- if (parseFloat($scope.displayParams.lonMin) < parseFloat($scope.lonMin))
- $scope.displayParams.lonMin = $scope.lonMin;
-
- if (parseFloat($scope.displayParams.lonMax) > parseFloat($scope.lonMax))
- $scope.displayParams.lonMax = $scope.lonMax;
-
- if ($scope.displayParams.start < $scope.start)
- $scope.displayParams.start = $scope.start;
-
- if ($scope.displayParams.end > $scope.end)
- $scope.displayParams.end = $scope.end;
-
- $scope.displayParams.latMin = $scope.truncateFloat($scope.displayParams.latMin);
- $scope.displayParams.latMax = $scope.truncateFloat($scope.displayParams.latMax);
- $scope.displayParams.lonMin = $scope.truncateFloat($scope.displayParams.lonMin);
- $scope.displayParams.lonMax = $scope.truncateFloat($scope.displayParams.lonMax);
-
- $scope.$apply();
- $rootScope.$broadcast('redrawOverlays', []);
- }
-
- $scope.unwatchDatasets = $scope.$watch('datasets',
- function() {
- var numDatasets = $scope.datasets.length;
- $scope.displayParams.areValid = false;
- $scope.areInUserRegridState = false;
-
- if (numDatasets) {
- var latMin = -90,
- latMax = 90,
- lonMin = -180,
- lonMax = 180,
- start = "1900-01-01 00:00:00",
- end = "2030-01-01 00:00:00",
- datasetRegrid = false;
- // Get the valid lat/lon range in the selected datasets.
- for (var i = 0; i < numDatasets; i++) {
- var curDataset = $scope.datasets[i];
-
- latMin = (curDataset['latlonVals']['latMin'] > latMin) ? curDataset['latlonVals']['latMin'] : latMin;
- latMax = (curDataset['latlonVals']['latMax'] < latMax) ? curDataset['latlonVals']['latMax'] : latMax;
- lonMin = (curDataset['latlonVals']['lonMin'] > lonMin) ? curDataset['latlonVals']['lonMin'] : lonMin;
- lonMax = (curDataset['latlonVals']['lonMax'] < lonMax) ? curDataset['latlonVals']['lonMax'] : lonMax;
- start = (curDataset['timeVals']['start'] > start) ? curDataset['timeVals']['start'] : start;
- end = (curDataset['timeVals']['end'] < end) ? curDataset['timeVals']['end'] : end;
-
- datasetRegrid = datasetRegrid || curDataset.regrid;
-
- }
-
- $scope.areInUserRegridState = !datasetRegrid
- }
-
- // Update the display parameters with the new valid overlap that we've found!
- $scope.displayParams.latMin = $scope.truncateFloat(latMin);
- $scope.displayParams.latMax = $scope.truncateFloat(latMax);
- $scope.displayParams.lonMin = $scope.truncateFloat(lonMin);
- $scope.displayParams.lonMax = $scope.truncateFloat(lonMax);
- $scope.displayParams.start = (typeof start == 'undefined') ? "" : start.split(" ")[0];
- $scope.displayParams.end = (typeof end == 'undefined') ? "" : end.split(" ")[0];
-
- // Update the local store values!
- $scope.latMin = latMin;
- $scope.latMax = latMax;
- $scope.lonMin = lonMin;
- $scope.lonMax = lonMax;
- $scope.start = (typeof start == 'undefined') ? "" : start.split(" ")[0];
- $scope.end = (typeof end == 'undefined') ? "" : end.split(" ")[0];
-
- $scope.displayParams.areValid = true;
- $rootScope.$broadcast('redrawOverlays', []);
- }, true);
-
- $scope.truncateFloat = function(floatVal) {
- if (floatVal > 0) {
- return Math.floor(floatVal);
- } else {
- return Math.ceil(floatVal);
- }
- };
- }]);
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/app/scripts/controllers/rcmedselection.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/app/scripts/controllers/rcmedselection.js b/ocw-ui/frontend-new/app/scripts/controllers/rcmedselection.js
deleted file mode 100644
index a3b3801..0000000
--- a/ocw-ui/frontend-new/app/scripts/controllers/rcmedselection.js
+++ /dev/null
@@ -1,144 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict';
-
-/**
- * @ngdoc function
- * @name ocwUiApp.controller:RcmedSelectionCtrl
- * @description
- * # RcmedSelectionCtrl
- * Controller of the ocwUiApp
- */
-angular.module('ocwUiApp')
- .controller('RcmedSelectionCtrl', ['$rootScope', '$scope', '$http', '$timeout', 'selectedDatasetInformation',
- function($rootScope, $scope, $http, $timeout, selectedDatasetInformation) {
- // Grab a copy of the datasets so we can display a count to the user!
- $scope.datasetCount = selectedDatasetInformation.getDatasets();
- $scope.fileAdded = false;
-
- $scope.getObservations = function() {
- $http.jsonp($rootScope.baseURL + '/rcmed/datasets/?callback=JSON_CALLBACK').
- success(function(data) {
- $scope.availableObs = data;
- $scope.availableObs.splice(0, 0, {longname: 'Please select an option'});
- $scope.datasetSelection = $scope.availableObs[0];
- }).
- error(function(data) {
- $scope.availableObs = ["Unable to query RCMED"]
- });
- };
-
- $scope.getObservationBounds = function() {
- $scope.observationBounds = {};
-
- $http.get($rootScope.baseURL + '/rcmed/parameters/bounds/')
- .success(function(data) {
- $scope.observationBounds = data;
- $scope.observationBounds['default'] = {
- 'start': '1900-01-01 00:00:00',
- 'end': '2050-01-01 00:00:00',
- 'latMin': -90,
- 'latMax': 89,
- 'lonMin': -180,
- 'lonMax': 179,
- };
- })
- .error(function(data) {
- $scope.observationBounds['default'] = {
- 'start': '1900-01-01 00:00:00',
- 'end': '2050-01-01 00:00:00',
- 'latMin': -90,
- 'latMax': 89,
- 'lonMin': -180,
- 'lonMax': 179,
- };
- });
- };
-
- $scope.getBoundsByParameterId = function(parameterId) {
- if (parameterId in $scope.observationBounds) {
- return $scope.observationBounds[parameterId];
- } else {
- return $scope.observationBounds['default'];
- }
- };
-
- $scope.dataSelectUpdated = function() {
- var urlString = $rootScope.baseURL + '/rcmed/parameters/?dataset=' +
- $scope.datasetSelection["shortname"] +
- "&callback=JSON_CALLBACK";
- $http.jsonp(urlString)
- .success(function(data) {
- $scope.retrievedObsParams = data;
- if ($scope.retrievedObsParams.length > 1)
- $scope.retrievedObsParams.splice(0, 0, {shortname: 'Please select a parameter'});
- $scope.parameterSelection = $scope.retrievedObsParams[0];
- });
- };
-
- $scope.addObservation = function() {
- var newDataset = {};
-
- newDataset['isObs'] = 1;
- // Save the dataset id (the important part) and name (for display purposes)
- newDataset['datasetId'] = $scope.datasetSelection['dataset_id'];
- newDataset['name'] = $scope.datasetSelection['longname'];
- // Save the parameter id (the important part) and name (for display purposes)
- newDataset['id'] = $scope.parameterSelection['parameter_id'];
- newDataset['param'] = $scope.parameterSelection['parameter_id'];
- newDataset['paramName'] = $scope.parameterSelection['longname'];
-
- var bounds = $scope.getBoundsByParameterId(newDataset['id']);
- newDataset['latlonVals'] = {
- 'latMin': bounds['lat_min'],
- 'latMax': bounds['lat_max'],
- 'lonMin': bounds['lon_min'],
- 'lonMax': bounds['lon_max'],
- };
- newDataset['timeVals'] = {
- 'start': bounds['start_date'],
- 'end': bounds['end_date'],
- };
-
- // Set some defaults for lat/lon/time variable names. This just helps
- // us display stuff later.
- newDataset['lat'] = "N/A";
- newDataset['lon'] = "N/A";
- newDataset['time'] = "N/A";
-
- selectedDatasetInformation.addDataset(newDataset);
-
- // Clear the user selections by requery-ing RCMED. This is really hacky, but it works for now...
- $scope.availableObs = [];
- $scope.retrievedObsParams = [];
- $scope.getObservations();
-
- // Display a confirmation message for a little bit
- $scope.fileAdded = true;
- $timeout(function() {
- $scope.fileAdded = false;
- }, 2000);
- };
-
- // Grab the available observations from RCMED
- $scope.getObservations();
- $scope.getObservationBounds();
- }
- ]);
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/app/scripts/controllers/result.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/app/scripts/controllers/result.js b/ocw-ui/frontend-new/app/scripts/controllers/result.js
deleted file mode 100644
index 39b94b9..0000000
--- a/ocw-ui/frontend-new/app/scripts/controllers/result.js
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict';
-
-/**
- * @ngdoc function
- * @name ocwUiApp.controller:ResultCtrl
- * @description
- * # ResultCtrl
- * Controller of the ocwUiApp
- */
-angular.module('ocwUiApp')
-.controller('ResultCtrl', ['$rootScope', '$scope', '$http',
-function($rootScope, $scope, $http) {
-
- $scope.results = [];
-
- // Get all evaluation directories
- $http.jsonp($rootScope.baseURL + '/dir/results/?callback=JSON_CALLBACK')
- .success(function(data) {
- data = data['listing']
-
- var cacheDirIndex = data.indexOf("/cache");
- if (cacheDirIndex > -1) {
- data.split(cacheDirIndex, 1)
- }
-
- $scope.results = data.sort().reverse();
- });
-}]);
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/app/scripts/controllers/resultdetail.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/app/scripts/controllers/resultdetail.js b/ocw-ui/frontend-new/app/scripts/controllers/resultdetail.js
deleted file mode 100644
index 952516c..0000000
--- a/ocw-ui/frontend-new/app/scripts/controllers/resultdetail.js
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict';
-
-/**
- * @ngdoc function
- * @name ocwUiApp.controller:ResultDetailCtrl
- * @description
- * # ResultDetailCtrl
- * Controller of the ocwUiApp
- */
-angular.module('ocwUiApp')
-.controller('ResultDetailCtrl', ['$rootScope', '$scope', '$http', '$stateParams',
-function($rootScope, $scope, $http, $stateParams) {
- $scope.result = $stateParams.resultId;
-
- $http.jsonp($rootScope.baseURL + '/dir/results/' + $scope.result + '?callback=JSON_CALLBACK')
- .success(function(data) {
- data = data['listing'];
-
- if (data.length < 1) {
- $scope.figures = null;
- $scope.alertMessage = "No results found.";
- $scope.alertClass = "alert alert-danger";
- } else {
- $scope.figures = data;
- }
- });
-}]);
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/app/scripts/controllers/settings.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/app/scripts/controllers/settings.js b/ocw-ui/frontend-new/app/scripts/controllers/settings.js
deleted file mode 100644
index ca62fd8..0000000
--- a/ocw-ui/frontend-new/app/scripts/controllers/settings.js
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict';
-
-/**
- * @ngdoc function
- * @name ocwUiApp.controller:SettingsCtrl
- * @description
- * # SettingsCtrl
- * Controller of the ocwUiApp
- */
-angular.module('ocwUiApp')
-.controller('SettingsCtrl', ['$scope', 'evaluationSettings', 'selectedDatasetInformation',
-function($scope, evaluationSettings, selectedDatasetInformation) {
- $scope.settings = evaluationSettings.getSettings();
- $scope.datasets = selectedDatasetInformation.getDatasets();
-}]);
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/app/scripts/controllers/timeline.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/app/scripts/controllers/timeline.js b/ocw-ui/frontend-new/app/scripts/controllers/timeline.js
deleted file mode 100644
index 2546ede..0000000
--- a/ocw-ui/frontend-new/app/scripts/controllers/timeline.js
+++ /dev/null
@@ -1,103 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict';
-
-/**
- * @ngdoc function
- * @name ocwUiApp.controller:TimelineCtrl
- * @description
- * # TimelineCtrl
- * Controller of the ocwUiApp
- */
-angular.module('ocwUiApp')
-.controller('TimelineCtrl', ['$rootScope', '$scope', 'selectedDatasetInformation', 'regionSelectParams',
-function($rootScope, $scope, selectedDatasetInformation, regionSelectParams) {
- $scope.datasets = selectedDatasetInformation.getDatasets();
- $scope.regionParams = regionSelectParams.getParameters();
-
- $scope.updateTimeline = function() {
- // Clear timeline data if it exists
- if ("timeline" in $rootScope) {
- $rootScope.timeline.deleteAllItems();
- }
-
- // Don't process if no datasets have been added
- if ($scope.datasets.length == 0 || !("timeline" in $rootScope))
- return;
-
- // Create DataTable to add data to timeline
- var data = new google.visualization.DataTable();
- data.addColumn('datetime', 'start');
- data.addColumn('datetime', 'end');
- data.addColumn('string', 'content');
-
- // Loop through datasets and find the overlapping start/end time range
- var start = $scope.datasets[0].timeVals.start;
- var end = $scope.datasets[0].timeVals.end;
- for (var i = 0; i < $scope.datasets.length; i++) {
- var possibleNewStart = $scope.datasets[i].timeVals.start;
- var possibleNewEnd = $scope.datasets[i].timeVals.end;
-
- start = (possibleNewStart > start) ? possibleNewStart : start;
- end = (possibleNewEnd < end) ? possibleNewEnd : end;
- }
-
- // Set the timeline extent to the overlapping time range
- //
- // NOTE: The month value substring is expected to be 0-based (hence the -1)
- $rootScope.timeline.setVisibleChartRange(new Date(start.substr(0, 4), start.substr(5, 2) - 1, start.substr(8, 2)),
- new Date(end.substr(0, 4), end.substr(5, 2) - 1, end.substr(8, 2)));
-
- // Add user selected bounds to timeline
- if ($scope.regionParams.areValid) {
-
- var userStart = $scope.regionParams.start;
- var userEnd = $scope.regionParams.end;
-
- // Add color to user selected bounds
- var style = 'background-color: #000000; border: 2px solid;';
- var ocwBar = '<div class="ocw-bar timeline-event-range" style="' + style + '"></div>';
-
- // Add row to DataTable: object with start and end date
- // note: subtract one from month since indexes from 0 to 11
- data.addRow([new Date(userStart.substr(0,4), userStart.substr(5,2)-1, userStart.substr(8,2)),
- new Date(userEnd.substr(0,4), userEnd.substr(5,2)-1, userEnd.substr(8,2)),
- ocwBar ]);
- }
-
- var options = {
- "width": "100%",
- "showCurrentTime": false,
- "moveable": false,
- "zoomable": false,
- };
-
- // Draw timeline with data (DataTable) and options (a name-value map)
- $rootScope.timeline.draw(data, options);
- };
-
- $scope.$on('redrawOverlays', function(event, parameters) {
- $scope.updateTimeline();
- });
-
- $scope.$watch('datasets', function() {
- $scope.updateTimeline();
- }, true);
-}]);
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/app/scripts/controllers/worldmap.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/app/scripts/controllers/worldmap.js b/ocw-ui/frontend-new/app/scripts/controllers/worldmap.js
deleted file mode 100644
index 0d28d6c..0000000
--- a/ocw-ui/frontend-new/app/scripts/controllers/worldmap.js
+++ /dev/null
@@ -1,104 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict';
-
-/**
- * @ngdoc function
- * @name ocwUiApp.controller:WorldMapCtrl
- * @description
- * # WorldMapCtrl
- * Controller of the ocwUiApp
- */
-angular.module('ocwUiApp')
-.controller('WorldMapCtrl', ['$rootScope', '$scope', 'selectedDatasetInformation', 'regionSelectParams',
-function($rootScope, $scope, selectedDatasetInformation, regionSelectParams) {
- $scope.datasets = selectedDatasetInformation.getDatasets();
- $scope.regionParams = regionSelectParams.getParameters();
-
- $scope.updateMap = function() {
- // Clear Group of layers from map if it exists
- if ("rectangleGroup" in $rootScope) {
- $rootScope.rectangleGroup.clearLayers();
- }
-
- // Don't process if we don't have any datasets added or if the map doesn't exist!!
- if ($scope.datasets.length == 0 || !("map" in $rootScope))
- return;
-
- // Create a group that we'll draw overlays to
- $rootScope.rectangleGroup = L.layerGroup();
- // Add rectangle Group to map
- $rootScope.rectangleGroup.addTo($rootScope.map);
-
- // Calculate the overlap region and set the map to show the new overlap
- var latMin = -90,
- latMax = 90,
- lonMin = -180,
- lonMax = 180;
-
- // Get the valid lat/lon range in the selected datasets.
- for (var i = 0; i < selectedDatasetInformation.getDatasetCount(); i++) {
- var curDataset = $scope.datasets[i];
-
- latMin = (curDataset['latlonVals']['latMin'] > latMin) ? curDataset['latlonVals']['latMin'] : latMin;
- latMax = (curDataset['latlonVals']['latMax'] < latMax) ? curDataset['latlonVals']['latMax'] : latMax;
- lonMin = (curDataset['latlonVals']['lonMin'] > lonMin) ? curDataset['latlonVals']['lonMin'] : lonMin;
- lonMax = (curDataset['latlonVals']['lonMax'] < lonMax) ? curDataset['latlonVals']['lonMax'] : lonMax;
- }
-
- var overlapBounds = [[latMax, lonMin], [latMin, lonMax]];
- $rootScope.map.fitBounds(overlapBounds, {padding: [0, 0]});
-
- // Draw border around overlap region
- var overlapBorder = L.rectangle(overlapBounds, {
- color: '#000000',
- opacity: 1.0,
- fill: false,
- weight: 2,
- dashArray: "10 10",
- });
-
- $rootScope.rectangleGroup.addLayer(overlapBorder);
-
- // Draw user selected region
- if ($scope.regionParams.areValid) {
-
- var bounds = [[$scope.regionParams.latMax, $scope.regionParams.lonMin],
- [$scope.regionParams.latMin, $scope.regionParams.lonMax]];
-
- var polygon = L.rectangle(bounds, {
- color: '#000000',
- opacity: .3,
- stroke: false,
- fill: true,
- });
-
- $rootScope.rectangleGroup.addLayer(polygon);
- }
- };
-
- $scope.$on('redrawOverlays', function(event, parameters) {
- $scope.updateMap();
- });
-
- $scope.$watch('datasets', function() {
- $scope.updateMap();
- }, true);
-}]);
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/app/scripts/directives/bootstrapmodal.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/app/scripts/directives/bootstrapmodal.js b/ocw-ui/frontend-new/app/scripts/directives/bootstrapmodal.js
deleted file mode 100644
index 26d0a46..0000000
--- a/ocw-ui/frontend-new/app/scripts/directives/bootstrapmodal.js
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict';
-
-/**
- * @ngdoc directive
- * @name ocwUiApp.directive:bootstrapModal
- * @description
- * # bootstrapModal
- */
-angular.module('ocwUiApp')
-.directive('bootstrapModal', function($timeout) {
- var link = function(scope, elem, attrs) {
- var escapeEvent;
- var openModal;
- var closeModal;
-
- escapeEvent = function(e) {
- if (e.which == 27)
- closeModal();
- }
-
- openModal = function(event, toggleBackground, toggleKeyboardEscape) {
- // Grab the current modal tag based on the modalId attribute in the bootstrapModal tag
- var modal = $('#' + attrs.modalId);
-
- // Make all the modal's children of class "close" call the appropriate function for closing!
- $('.close', modal).bind('click', closeModal);
-
- modal.modal({
- show: true,
- backdrop: toggleBackground,
- keyboard: toggleKeyboardEscape,
- });
- };
-
- closeModal = function(event) {
- $('#' + attrs.modalId).modal('hide');
-
- };
-
- // We need to bind the close and open modal events so outside elements can trigger the modal.
- // This has to wait until the template has been fully inserted, so just wait a bit of time
- // before we set them. I'm sure there's a better way of handling this...
- $timeout(function() {
- $('#' + attrs.modalId).
- bind('modalOpen', openModal).
- bind('modalClose', closeModal);
- }, 100);
- };
-
- return {
- link: link,
- replace: true,
- restrict: 'E',
- scope: {
- modalId: '@'
- },
- template: '<div id="{{modalId}}" class="modal hide fade" tabindex="-1"><div ng-transclude></div></div>',
- transclude: true
- };
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/app/scripts/directives/bootstrapmodalopen.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/app/scripts/directives/bootstrapmodalopen.js b/ocw-ui/frontend-new/app/scripts/directives/bootstrapmodalopen.js
deleted file mode 100644
index dca4005..0000000
--- a/ocw-ui/frontend-new/app/scripts/directives/bootstrapmodalopen.js
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict';
-
-/**
- * @ngdoc directive
- * @name ocwUiApp.directive:bootstrapModalOpen
- * @description
- * # bootstrapModalOpen
- */
-angular.module('ocwUiApp')
-.directive('bootstrapModalOpen', function() {
- return {
- restrict: 'A',
- link: function(scope, elem, attrs) {
- // Default to showing the background if the user didn't specify a value for this.
- var hasBackground = (attrs.background === undefined ? true : (attrs.background == "true"));
- // Enable keyboard closing of modal with escape key.
- var hasKeyboardEscape = (attrs.keyboard === undefined ? true : (attrs.keyboard == "true"));
-
- $(elem).bind('click', function() {
- $('#' + attrs.bootstrapModalOpen).trigger('modalOpen', [hasBackground, hasKeyboardEscape]);
- });
- }
- };
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/app/scripts/directives/leafletmap.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/app/scripts/directives/leafletmap.js b/ocw-ui/frontend-new/app/scripts/directives/leafletmap.js
deleted file mode 100644
index 9b0a6eb..0000000
--- a/ocw-ui/frontend-new/app/scripts/directives/leafletmap.js
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict';
-
-/**
- * @ngdoc directive
- * @name ocwUiApp.directive:leafletMap
- * @description
- * # leafletMap
- */
-angular.module('ocwUiApp')
-.directive('leafletMap', function($rootScope) {
- return {
- restrict: 'E',
- replace: true,
- template: '<div></div>',
- link: function(scope, element, attrs) {
- $rootScope.map = L.map(attrs.id, {
- center: [40, 0],
- zoom: 2,
- scrollWheelZoom: false,
- attributionControl: false,
- worldCopyJump: true,
- });
-
- L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {}).addTo($rootScope.map);
- }
- };
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/app/scripts/directives/onblur.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/app/scripts/directives/onblur.js b/ocw-ui/frontend-new/app/scripts/directives/onblur.js
deleted file mode 100644
index 313dbe0..0000000
--- a/ocw-ui/frontend-new/app/scripts/directives/onblur.js
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict';
-
-/**
- * @ngdoc directive
- * @name ocwUiApp.directive:onBlur
- * @description
- * # onBlur
- */
-angular.module('ocwUiApp')
-.directive('onBlur', function() {
- return {
- restrict: 'A',
- link: function($scope, $elem, $attrs) {
- $elem.bind('blur', function() {
- $scope.$eval($attrs.onBlur);
- });
- },
- };
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/app/scripts/directives/predictivefilebrowserinput.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/app/scripts/directives/predictivefilebrowserinput.js b/ocw-ui/frontend-new/app/scripts/directives/predictivefilebrowserinput.js
deleted file mode 100644
index 7142c15..0000000
--- a/ocw-ui/frontend-new/app/scripts/directives/predictivefilebrowserinput.js
+++ /dev/null
@@ -1,316 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict';
-
-/**
- * @ngdoc directive
- * @name ocwUiApp.directive:predictiveFileBrowserInput
- * @description
- * # predictiveFileBrowserInput
- */
-angular.module('ocwUiApp')
-.directive('predictiveFileBrowserInput', function() {
- var link = function($scope, $elem, $attrs) {
- $scope.autocomplete = [];
-
- // Set id to use this directive correctly in multiple places
- $scope.id = 'autoCompletePath'+ $elem.context.id
- /*
- * We need a place to dump our auto-completion options
- */
- $($elem).parent().append('<ul id="' + $scope.id +'"><ul>');
-
- // Handle user clicks on auto-complete path options
- $(document).on('click', '#' +$scope.id+ ' li span', function(e) {
- // Set the input text box's value to that of the user selected path
- var val = $(e.target).text();
- $($elem).val(val);
- // Need to trigger the input box's "input" event so Angular updates the model!
- $elem.trigger('input');
-
- // If the user selected a directory, find more results..
- if (val[val.length - 1] == '/') {
- $scope.fetchFiles($($elem).val());
- // Otherwise, remove the auto-complete options...
- } else {
- $('#' +$scope.id+ ' li').remove();
- }
- });
-
- /*
- * Handle key-down events on the input box
- *
- * We need to ignore <TAB> presses here so we can auto-complete with <TAB>.
- * If we don't ignore here then <TAB> will move the user to the next field
- * in the form and our common-prefix-fill won't work later.
- */
- $($elem).keydown(function(e) {
- var code = e.keyCode || e.which;
- var BACKSPACE = 8,
- TAB = 9;
-
- if (code == TAB)
- return false;
- });
-
- /*
- * Handle key-up events on the input box
- */
- $($elem).keyup(function(e) {
- var code = e.keyCode || e.which;
- var BACKSPACE = 8,
- TAB = 9,
- FORWARD_SLASH = 191;
-
- if (code === FORWARD_SLASH) {
- // Fetch new directory information from the server.
- $scope.fetchFiles($(this).val());
- } else if (code === TAB) {
- // Attempt to auto-fill for the user.
- $scope.handleTabPress();
- } else if (code == BACKSPACE) {
- // Need to properly handle the removal of directory information
- // and the displaying of auto-complete options
- $scope.handleBackSpace();
- } else {
- // Filter auto-complete options based on user input..
- $scope.handleMiscKeyPress();
- }
-
- // This is being used so we can handle backspacing. The user might hold
- // down the backspace key or select a section of text and delete. This allows
- // us to compare the result to its prior state, which makes handling
- // backspaces easier.
- $scope.lastInputContents = $elem.val();
- });
-
- /*
- * Grab additional path information from the web-server
- *
- * Params:
- * path - The path to get a directory listing of.
- */
- // TODO Make this use $HTTP
- $scope.fetchFiles = function(path) {
- $.get($scope.baseURL + '/dir/list/' + path, {},
- function(data) {
- data = data['listing']
- $scope.setNewData(data);
- $scope.updateAutoComplete();
- }, 'json');
- };
-
- /*
- * Grab additional path information from the web-server and filter the
- * results based on the current input text.
- *
- * Params:
- * path - The path to get a directory listing of.
- *
- * This is needed to handle deletion of selected text. It is possible that
- * the user will select text and delete only part of a word. The results
- * need to be filtered based on this partial input.
- */
- // TODO Why isn't this using $http?!?!?! Because I copy and pasted!!!!
- $scope.fetchFilesAndFilter = function(path) {
- $.get($scope.baseURL + '/dir/list/' + path, {},
- function(data) {
- data = data['listing']
- $scope.setNewData(data);
- $scope.filterResults();
- $scope.updateAutoComplete();
- }, 'json');
- };
-
- /*
- * Handle directory data from the server.
- *
- * We store the entire directory information along with the remaining
- * possible options given the users current input. This lets us avoid
- * unnecessary calls to the server for directory information every time
- * the user deletes something.
- */
- $scope.setNewData = function(data) {
- $scope.autocomplete = data.sort();
- $scope.possibleCompletes = $scope.autocomplete;
- };
-
- /*
- * Handle <TAB> presses.
- *
- * Attempt to auto-complete options when the user presses <TAB>.
- */
- $scope.handleTabPress = function() {
- // If there's only one option available there's no points in trying to
- // find a common prefix! Just set the value!
- if ($scope.possibleCompletes.length === 1) {
- $elem.val($scope.possibleCompletes[0]);
-
- // Make sure more options are displayed if a directory was selected.
- $scope.checkForMoreOptions();
- $scope.updateAutoComplete();
- return;
- }
-
- // Find the greatest common prefix amongst the remaining choices and set
- // the input text to it.
- var prefix = $scope.getLargestCommonPrefix($scope.possibleCompletes);
- $elem.val(prefix);
- $scope.updateAutoComplete();
- };
-
- /*
- * Handle Backspacing and option displaying.
- *
- * The auto-complete options needs to be displayed correctly when the user
- * removes directory information.
- */
- $scope.handleBackSpace = function() {
- var curInputVal = $elem.val();
-
- // If the user deletes everything in the input box all we need to do
- // is make sure that the auto-complete options aren't displayed.
- if (curInputVal.length === 0) {
- $('#' +$scope.id+ ' li').remove();
- return;
- }
-
- // Figure out how much text the user removed from the input box.
- var lengthDiff = $scope.lastInputContents.length - curInputVal.length;
- // Grab the removed text.
- var removedText = $scope.lastInputContents.substr(-lengthDiff);
-
- // If the user deleted over a directory we need to fetch information on the
- // previous directory for auto-completion.
- if (removedText.indexOf('/') !== -1) {
- var lastSlashIndex = curInputVal.lastIndexOf('/');
-
- // If the remaining path still contains a directory...
- if (lastSlashIndex !== -1) {
- // Grab the section of the path that points to a valid directory,
- // fetch the listing, and update the results.
- var pathToSearch = curInputVal.slice(0, lastSlashIndex + 1);
- $scope.fetchFilesAndFilter(pathToSearch);
- } else {
- // Delete the old auto-complete information in the case where the user
- // completely removed path information.
- $('#' +$scope.id+ ' li').remove();
- }
- } else {
- // Otherwise, we just need to filter results based on the remaining input.
- $scope.filterResults();
- $scope.updateAutoComplete();
- }
- };
-
- /*
- * Handle all other key presses in the input box
- *
- * Filter the auto-complete options as the user types to ensure that only options
- * which are possible given the current input text are still displayed.
- */
- $scope.handleMiscKeyPress = function() {
- // Safely exit when there are no options available.
- if ($scope.autocomplete === [])
- return;
-
- // Otherwise, filter the results.
- $scope.filterResults();
- $scope.updateAutoComplete();
- };
-
- /*
- * When a path is auto-completed with <TAB> we need to check to see if it points
- * to a directory. If it does, we still need to fetch results!
- */
- $scope.checkForMoreOptions = function() {
- var path = $elem.val();
- if (path[path.length - 1] === '/') {
- $scope.fetchFiles(path);
- }
- };
-
- /*
- * Calculate the greatest common prefix of the passed options.
- *
- * Params:
- * Options - An array of strings in which the greatest common prefix
- * should be found
- *
- * Returns:
- * The greatest common prefix of the strings.
- *
- *
- * Note - For us, there will always be a prefix of at least '/' since this can't
- * possible be called without the users entering a starting directory. As a result,
- * we don't explicitly handle the case where there is 0 length common prefix.
- */
- $scope.getLargestCommonPrefix = function(options) {
- var index = 1;
- var shortestString = options.reduce(function(a, b) { return a.length < b.length ? a : b; });
- var longestString = options.reduce(function(a, b) { return a.length > b.length ? a : b; });
- var substringToCheck = shortestString[0];
-
- while (longestString.indexOf(substringToCheck) !== -1) {
- substringToCheck = shortestString.slice(0, ++index);
- }
-
- return longestString.slice(0, index - 1);
- };
-
- /*
- * Filter the auto-complete options based on the current input.
- */
- $scope.filterResults = function() {
- $scope.possibleCompletes = $scope.autocomplete.filter(function(item, index, array) {
- return (~item.indexOf($($elem).val()));
- });
-
- $scope.possibleCompletes.sort();
- };
-
- /*
- * Update the display of auto-complete options.
- */
- $scope.updateAutoComplete = function() {
- // Remove all the existing options
- $('#' +$scope.id+ ' li').remove();
-
- // We don't need to show anything if the user has completely selected
- // the only existing option available.
- if ($scope.possibleCompletes.length === 1) {
- if ($scope.possibleCompletes[0] === $elem.val()) {
- return;
- }
- }
-
- // Display all the possible completes
- $.each($scope.possibleCompletes, function(i, v) {
- $('#' +$scope.id+ '').append($('<li>').html($('<span>').text(v)));
- });
- };
- };
-
- return {
- link: link,
- scope: true,
- restrict: 'A'
- };
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/app/scripts/directives/previewmap.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/app/scripts/directives/previewmap.js b/ocw-ui/frontend-new/app/scripts/directives/previewmap.js
deleted file mode 100644
index 78aae8c..0000000
--- a/ocw-ui/frontend-new/app/scripts/directives/previewmap.js
+++ /dev/null
@@ -1,76 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict';
-
-/**
- * @ngdoc directive
- * @name ocwUiApp.directive:previewMap
- * @description
- * # previewMap
- */
-angular.module('ocwUiApp')
-.directive('previewMap', function($rootScope) {
- return {
- restrict: 'A',
- scope: {dataset: '=previewMap', index: '=index'},
- template: '<div id="{{dataset.name}}" class="preview-map"></div>',
- replace: true,
- link: function(scope, element, attrs) {
-
- // Any attribute that contains {{}} interpolation will be set to null in the attrs
- // parameter during the link function since the first $digest since the compilation
- // has yet to run to evaluate it! We can't run a $digest in the middle of compilation,
- // so using an $observe (or $watch) is the best way to get the values.
- attrs.$observe('id', function(newId) {
- var map = L.map(attrs.id, {
- zoom: 0,
- scrollWheelZoom: false,
- zoomControl: false,
- attributionControl: false,
- worldCopyJump: true,
- });
-
- L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {}).addTo(map);
-
- // Zoom the map to the dataset bound regions (or at least try our best to do so)
- var datasetBounds = [[scope.dataset.latlonVals.latMax, scope.dataset.latlonVals.lonMin],
- [scope.dataset.latlonVals.latMin, scope.dataset.latlonVals.lonMax]];
- map.fitBounds(datasetBounds, {});
-
- // Draw a colored overlay on the region of the map
- var maplatlon = scope.dataset.latlonVals;
- var bounds = [[maplatlon.latMax, maplatlon.lonMin], [maplatlon.latMin, maplatlon.lonMax]];
-
- var polygon = L.rectangle(bounds,{
- stroke: false,
- fillColor: $rootScope.fillColors[1],
- fillOpacity: 0.6
- });
-
- // Add layer to Group
- var rectangleGroup = L.layerGroup();
- rectangleGroup.addLayer(polygon);
-
- // Add the overlay to the map
- rectangleGroup.addTo(map);
- });
- }
- };
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/app/scripts/directives/timeline.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/app/scripts/directives/timeline.js b/ocw-ui/frontend-new/app/scripts/directives/timeline.js
deleted file mode 100644
index 760a819..0000000
--- a/ocw-ui/frontend-new/app/scripts/directives/timeline.js
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict';
-
-/**
- * @ngdoc directive
- * @name ocwUiApp.directive:timeline
- * @description
- * # timeline
- */
-angular.module('ocwUiApp')
-.directive('timeline', function($rootScope, $window) {
- return {
- restrict: 'C',
- replace: true,
- transclude: true,
- template: '<div id="OCWtimeline"></div>',
- link: function(scope, element, attrs) {
- // Instantiate timeline object.
- $rootScope.timeline = new links.Timeline(document.getElementById('OCWtimeline'));
-
- // Redraw the timeline whenever the window is resized
- angular.element($window).bind('resize', function() {
- $rootScope.timeline.checkResize();
- });
-
- var options = {
- "width": "100%",
- "showCurrentTime": false,
- "moveable": false,
- "zoomable": false
- };
-
- $rootScope.timeline.draw([], options);
- }
- }
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/app/scripts/filters/isodatetomiddleendian.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/app/scripts/filters/isodatetomiddleendian.js b/ocw-ui/frontend-new/app/scripts/filters/isodatetomiddleendian.js
deleted file mode 100644
index 7fcd2a9..0000000
--- a/ocw-ui/frontend-new/app/scripts/filters/isodatetomiddleendian.js
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict';
-
-/**
- * @ngdoc filter
- * @name ocwUiApp.filter:ISODateToMiddleEndian
- * @function
- * @description
- * # ISODateToMiddleEndian
- * Filter in the ocwUiApp.
- */
-angular.module('ocwUiApp')
-.filter('ISODateToMiddleEndian', function() {
- return function(input) {
- var original = input;
-
- // Strip whitespace from the start and end of the string
- input = input.replace(/(^\s+|\s+$)/g, '');
-
- // ISO Standard says time is separated from Date with a 'T'. Our timestamps
- // slightly modify that and use a space. We'll check for both here and prefer
- // to split on a 'T' if it's available.
- if (input.indexOf('T') != -1 || input.indexOf(' ') != -1) {
- input = (input.indexOf('T') != -1) ? input.split('T')[0] : input.split(' ')[0];
- }
-
- // The components of the date should be split with hyphens. If we can't find them
- // then the string is poorly formed.
- if (input.indexOf('-') == -1 || input.split('-').length - 1 != 2) {
- return original;
- }
-
- // At this point the date is probably valid and we should try to convert it!
- var components = input.split('-');
- return (components[1] + "/" + components[2] + "/" + components[0]);
- };
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/app/scripts/services/evaluationsettings.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/app/scripts/services/evaluationsettings.js b/ocw-ui/frontend-new/app/scripts/services/evaluationsettings.js
deleted file mode 100644
index b53842c..0000000
--- a/ocw-ui/frontend-new/app/scripts/services/evaluationsettings.js
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict';
-
-/**
- * @ngdoc service
- * @name ocwUiApp.evaluationSettings
- * @description
- * # evaluationSettings
- * Service in the ocwUiApp.
- */
-angular.module('ocwUiApp')
- .service('evaluationSettings', function($rootScope, $http) {
- $http.get($rootScope.baseURL + '/processing/metrics/').then(function(data) {
- var metrics_data = data['data']['metrics'];
- var metrics = [];
-
- for (var i = 0; i < metrics_data.length; ++i) {
- metrics.push({'name': metrics_data[i], 'select': false});
- }
-
- settings['metrics'] = metrics;
- });
-
- var settings = {
- 'metrics': [],
- 'temporal': {
- 'options': ['daily', 'monthly', 'yearly'],
- 'selected': 'yearly',
- },
- 'spatialSelect': null,
- };
-
- return {
- getSettings: function() {
- return settings;
- }
- };
- });
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/app/scripts/services/regionselectparams.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/app/scripts/services/regionselectparams.js b/ocw-ui/frontend-new/app/scripts/services/regionselectparams.js
deleted file mode 100644
index cb3f4f8..0000000
--- a/ocw-ui/frontend-new/app/scripts/services/regionselectparams.js
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict';
-
-/**
- * @ngdoc service
- * @name ocwUiApp.regionSelectParams
- * @description
- * # regionSelectParams
- * Service in the ocwUiApp.
- */
-angular.module('ocwUiApp')
-.service('regionSelectParams', function() {
- var parameters = {
- "areValid" : true,
- "latMin" : "",
- "latMax" : "",
- "lonMin" : "",
- "lonMax" : "",
- "start" : "",
- "end" : "",
- };
-
- return {
- getParameters: function() {
- return parameters;
- },
- };
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/app/scripts/services/selecteddatasetinformation.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/app/scripts/services/selecteddatasetinformation.js b/ocw-ui/frontend-new/app/scripts/services/selecteddatasetinformation.js
deleted file mode 100644
index 613cfb8..0000000
--- a/ocw-ui/frontend-new/app/scripts/services/selecteddatasetinformation.js
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict';
-
-/**
- * @ngdoc service
- * @name ocwUiApp.selectedDatasetInformation
- * @description
- * # selectedDatasetInformation
- * Service in the ocwUiApp.
- */
-angular.module('ocwUiApp')
-.service('selectedDatasetInformation', function() {
- var datasets = [];
-
- return {
- getDatasets: function() {
- return datasets;
- },
- getDatasetCount: function() {
- return datasets.length;
- },
- // TODO: Define the structure of the objects that are added with addDataset.
- addDataset: function(dataset) {
- // All datasets need a shouldDisplay attribute that is used when rendering
- // the overlays on the map!
- dataset.shouldDisplay = false;
- // The regrid attribute indicates which dataset should be used for spatial regridding
- dataset.regrid = false;
-
- datasets.push(dataset);
- },
- removeDataset: function(index) {
- datasets.splice(index, 1);
- },
- clearDatasets: function() {
- datasets.length = 0;
- },
- };
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/app/styles/main.css
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/app/styles/main.css b/ocw-ui/frontend-new/app/styles/main.css
deleted file mode 100644
index fb42ccd..0000000
--- a/ocw-ui/frontend-new/app/styles/main.css
+++ /dev/null
@@ -1,120 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-body {
-
-}
-
-#header-img {
-
-}
-
-#header-title {
-
-}
-
-#OCW-powered {
-
-}
-
-#main-container {
- margin-top: 20px;
- min-height: 400px;
- height: auto !important;
- height: 400px;
-}
-
-#datasetDiv {
- height: 750px;
- overflow-y: auto;
- overflow-x: hidden;
-}
-
-#ocw-navbar {
- margin-bottom: 0;
-}
-
-#map { height: 500px; }
-
-/* Small preview map that is displayed alongside dataset information */
-.preview-map {
- height: 100px;
- width: 100px;
-}
-
-.small-alert {
- font-size: 12px;
- color: green;
- margin-top: 4px;
- margin-left: 10px;
-}
-
-.colorSquare {
- margin-top: 3px;
- height: 10px;
- width: 10px;
-}
-
-ul { list-style-type: none; }
-
-.no-color-link { color: #000000; }
-.no-color-link:hover { color: #000000; text-decoration: none; }
-.no-color-link:visited { color: #000000; }
-.no-color-link:active { color: #000000; }
-
-/* Remove the grayed out close button in modal headers */
-.modal-header .close { opacity: 1; }
-
-/* Remove the grayed out close button in modal footers */
-.modal-footer .close { opacity: 1; }
-
-/**
- * Timeline
- */
-div#OCWtimeline {
- margin-top: 20px;
- padding-bottom: 20px;
-}
-
-div.timeline-event {
- border: none;
- background: none;
-}
-
-div.timeline-event-content { margin: 0; }
-
-div.ocw-bar { height: 5px; }
-
-/**
- * Results
- */
-#results-sidebar {
- min-height: 400px;
- height: auto !important;
- height: 400px;
-}
-
-#results-sidebar-header { font-size: 14px; }
-
-/* Helpers for vertical offsets */
-.top3 { margin-top: 3%; }
-.top7 { margin-top: 7%; }
-.top14 { margin-top:14%; }
-.top21 { margin-top:21%; }
-.top42 { margin-top:42%; }
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/app/views/main.html
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/app/views/main.html b/ocw-ui/frontend-new/app/views/main.html
deleted file mode 100644
index 2f428e5..0000000
--- a/ocw-ui/frontend-new/app/views/main.html
+++ /dev/null
@@ -1,274 +0,0 @@
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<!-- Modal for evaluation settings -->
-<div class="modal fade" id="evaluationSettingsModal" role="dialog" aria-labelledby="datasetSelectModalLabel" aria-hidden="true">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button class="close" data-dismiss="modal">×</button>
- <h3>Settings</h3>
- </div>
- <div class="modal-body" ng-controller="SettingsCtrl">
- <h4>Select the metrics you would like to run.</h4>
- <div ng-repeat="metric in settings.metrics">
- <label><input type="checkbox" ng-model="metric.select"> {{metric.name}}</label>
- </div>
- <hr />
- <h4>Select how you would like to temporally re-grid the datasets.</h4>
- <select class="form-control" ng-model="settings.temporal.selected" ng-options="opt for opt in settings.temporal.options"></select>
- <hr />
- <h4>Select which dataset to use as the reference.</h4>
- <select class="form-control" ng-model="settings.spatialSelect" ng-options="dataset as dataset.name for dataset in datasets"></select>
- <hr />
- <!-- Temporarily hidden for work on CLIMATE-365.-->
- <div ng-hide=true>
- <h4>Select a file which will define the bounds of subregions.</h4>
- <form class="form-inline" autocomplete="off">
- <input id="subregionFileInput" predictive-file-browser-input ng-model="settings.subregionFile" type="text" class="input-xlarge" autocomplete="off" />
- </form>
- </div>
- <!--End hidden section for CLIMATE-365-->
- </div>
- <div class="modal-footer">
- <button class="btn btn-warning cancel" data-dismiss="modal">Close</button>
- </div>
- </div>
- </div>
-</div>
-<!-- END - Modal for evaluation settings -->
-
-<div class="row">
- <div class="col-md-12">
- <div class="row">
- <!-- Dataset Select and Display Column -->
- <div class="col-md-6">
- <!--Dataset Select Controls-->
- <div ng-controller="DatasetSelectCtrl">
- <div class="row">
- <div class="col-md-1 col-md-offset-10">
- <button class="btn btn-link no-color-link" ng-click="clearDatasets()" ng-disabled="shouldDisableClearButton()">
- <span tooltip-placement="left" tooltip-popup-delay="700" tooltip="Clear Datasets">
- <i class="fa fa-trash-o fa-2x"></i>
- </span>
- </button>
- </div>
- <div class="col-md-1">
- <button class="btn btn-link no-color-link" data-toggle="modal" data-target="#datasetSelect">
- <span tooltip-placement="left" tooltip-popup-delay="700" tooltip="Add Dataset">
- <i class="fa fa-plus fa-2x"></i>
- </span>
- </button>
- </div>
- </div>
- <!-- Modal for dataset selection -->
- <div class="modal fade" id="datasetSelect" role="dialog" aria-labelledby="datasetSelectModalLabel" aria-hidden="true">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <h3>Dataset Select</h3>
- </div>
- <div class="modal-body">
- <tabset>
- <tab ng-repeat="tab in templates" heading="{{tab.title}}" active="tab.active" disabled="tab.disabled">
- <div ng-include src="tab.url"></div>
- </tab>
- <li class="pull-right">Queued Datasets: {{datasetCount.length}}</li>
- </tabset>
- </div>
- <div class="modal-footer">
- <button class="btn btn-warning cancel" data-dismiss="modal">Close</button>
- </div>
- </div>
- </div>
- </div>
- <!-- END - Modal for dataset selection -->
- <div class="row">
- <div class="col-md-12">
- <hr />
- </div>
- </div>
- </div>
- <!--Dataset display-->
- <div ng-controller="DatasetDisplayCtrl" id="datasetDiv">
- <div ng-repeat="dataset in datasets">
- <div class="row">
- <!--Data section-->
- <div class="col-md-8 col-md-offset-1 muted">
- {{dataset.name}}
- </div>
- <div class="col-md-1 col-md-offset-2">
- <span tooltip-placement="left" tooltip-popup-delay="700" tooltip="Remove Dataset">
- <a class="no-color-link" href="#" ng-click="removeDataset($index)">
- <i class="fa fa-remove"></i>
- </a>
- </span>
- </div>
- </div>
- <!--Time Values!-->
- <div class="row">
- <!--Dataset Info Section-->
- <div class="col-md-9">
- <div class="row">
- <div class="col-md-2 col-md-offset-1 text-center">Start:</div>
- <div class="col-md-2">
- <div class="col-md-2 text-center">{{dataset.timeVals.start | ISODateToMiddleEndian}}</div>
- </div>
- <div class="col-md-2 text-center">End:</div>
- <div class="col-md-2">
- <div class="col-md-2 text-center">{{dataset.timeVals.end | ISODateToMiddleEndian}}</div>
- </div>
- </div>
- <!--Lat/Long Values!-->
- <div class="row">
- <div class="col-md-2 col-md-offset-1 text-center">North:</div>
- <div class="col-md-2 text-center">
- {{dataset.latlonVals.latMax | number:2}}
- </div>
- <div class="col-md-2 text-center">West:</div>
- <div class="col-md-2 text-center">
- {{dataset.latlonVals.lonMin | number:2}}
- </div>
- </div>
- <div class="row">
- <div class="col-md-2 col-md-offset-1 text-center">South:</div>
- <div class="col-md-2 text-center">
- {{dataset.latlonVals.latMin | number:2}}
- </div>
- <div class="col-md-2 text-center">East:</div>
- <div class="col-md-2 text-center">
- {{dataset.latlonVals.lonMax | number:2}}
- </div>
- </div>
- </div>
- <!--Preview Map Section-->
- <div class="col-md-3">
- <!--If the dataset is global we show a picture of a globe instead of the actual map-->
- <div ng-hide="dataset.latlonVals.lonMin == -180 && dataset.latlonVals.lonMax == 180 &&
- dataset.latlonVals.latMin == -90 && dataset.latlonVals.latMax == 90"
- preview-map="dataset" index="$index"></div>
- <div ng-show="dataset.latlonVals.lonMin == -180 && dataset.latlonVals.lonMax == 180 &&
- dataset.latlonVals.latMin == -90 && dataset.latlonVals.latMax == 90">
- <img src="img/globe.png" class="preview-map">
- </div>
- </div>
- </div>
- <div class="row">
- <div class="col-md-6 col-md-offset-3"><hr /></div>
- </div>
- </div>
- </div>
- </div>
-
- <!-- Map, Timeline, and Parameter Control Column -->
- <div class="col-md-6">
- <!--Map-->
- <div class="row" ng-controller="WorldMapCtrl">
- <div class="col-md-12">
- <leaflet-map id="map"></leaflet-map>
- </div>
- </div>
-
- <!--Timeline-->
- <div class="row">
- <div class="col-md-12" ng-controller="TimelineCtrl">
- <div class="timeline"></div>
- </div>
- </div>
-
- <div class="row">
- <div class="col-md-12" ng-controller="ParameterSelectCtrl">
- <div class="row top3">
- <div class="col-md-2 text-center">Start Date:</div>
- <div class="col-md-4">
- <form>
- <!--This styling HAD to be done inline. Using a class wouldn't work and for some -->
- <!--reason the input boxes refused to be 100% wide when their span size was set.-->
- <input ng-disabled="shouldDisableControls()" on-blur="checkParameters();" ng-model="displayParams.start" ui-date="datepickerSettings" ui-date-format="yy-mm-dd" type="text" class="col-md-4 text-center" style="width:100%" />
- </form>
- </div>
- <div class="col-md-2 text-center">End Date:</div>
- <div class="col-md-4">
- <form>
- <!--This styling HAD to be done inline. Using a class wouldn't work and for some -->
- <!--reason the input boxes refused to be 100% wide when their span size was set.-->
- <input ng-disabled="shouldDisableControls()" on-blur="checkParameters();" ng-model="displayParams.end" ui-date="datepickerSettings" ui-date-format="yy-mm-dd" type="text" class="col-md-4 text-center" style="width:100%"/>
- </form>
- </div>
- </div>
- <div class="row top3">
- <div class="col-md-2 text-center">North:</div>
- <div class="col-md-4">
- <form action="">
- <input ng-disabled="shouldDisableControls()" ng-model="displayParams.latMax" on-blur="checkParameters();" type="text" class="col-md-4 text-center" style="width:100%"/>
- </form>
- </div>
- <div class="col-md-2 text-center">South:</div>
- <div class="col-md-4">
- <form action="">
- <!--This styling HAD to be done inline. Using a class wouldn't work and for some -->
- <!--reason the input boxes refused to be 100% wide when their span size was set.-->
- <input ng-disabled="shouldDisableControls()" ng-model="displayParams.latMin" on-blur="checkParameters();" type="text" class="col-md-4 text-center" style="width:100%"/>
- </form>
- </div>
- </div>
- <div class="row top3">
- <div class="col-md-2 text-center">East:</div>
- <div class="col-md-4">
- <form>
- <!--This styling HAD to be done inline. Using a class wouldn't work and for some -->
- <!--reason the input boxes refused to be 100% wide when their span size was set.-->
- <input ng-disabled="shouldDisableControls()" ng-model="displayParams.lonMax" on-blur="checkParameters();" type="text" class="col-md-4 text-center" style="width:100%"/>
- </form>
- </div>
- <div class="col-md-2 text-center">West:</div>
- <div class="col-md-4">
- <form>
- <!--This styling HAD to be done inline. Using a class wouldn't work and for some -->
- <!--reason the input boxes refused to be 100% wide when their span size was set.-->
- <input ng-disabled="shouldDisableControls()" ng-model="displayParams.lonMin" on-blur="checkParameters();"; type="text" class="col-md-4 text-center" style="width:100%"/>
- </form>
- </div>
- </div>
- <div class="row top3">
- <div class="col-md-2 col-md-offset-6">
- <!--<button class="btn btn-link no-color-link pull-right" bootstrap-modal-open="evaluationSettings">-->
- <button class="btn btn-link no-color-link pull-right" data-toggle="modal" data-target="#evaluationSettingsModal">
- <span tooltip-placement="left" tooltip-popup-delay="700" tooltip="Settings">
- <span class="fa-stack fa-lg">
- <i class="fa fa-square-o fa-stack-2x"></i>
- <i class="fa fa-cogs fa-stack-1x"></i>
- </span>
- </span>
- </button>
- </div>
- <div class="col-md-4">
- <button ng-click="runEvaluation()" ng-disabled="shouldDisableEvaluateButton()" class="btn btn-block btn-primary">
- <div ng-hide="runningEval">Evaluate</div>
- <div ng-show="runningEval"><i class="fa fa-spinner fa-spin"></i></div>
- </button>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
-</div>
-
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/app/views/modelselect.html
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/app/views/modelselect.html b/ocw-ui/frontend-new/app/views/modelselect.html
deleted file mode 100644
index 9bc128f..0000000
--- a/ocw-ui/frontend-new/app/views/modelselect.html
+++ /dev/null
@@ -1,87 +0,0 @@
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<div class="container">
- <div class="row">
- <div class="span10 offset1 columns">
- <div class="row">
- <div class="span10">
- <center>
- <form id="modelSelectorForm">
- <input type="file" name="modelSelector">
- </form>
- </center>
- </div>
- </div>
- <div class="row">
- <div class="span10 offset2">
- <form class="form-horizontal" id="parameterSelectorForm">
- <div class="control-group">
- <label class="control-label" for="paramSelect">Parameter Value</label>
- <div class="controls">
- <select id="paramSelect">
- <option ng-repeat="param in modelParameters">
- {{param.text}}
- </option>
- </select>
- </div>
- </div>
- <div class="control-group">
- <label class="control-label" for="latSelect">Latitude Variable</label>
- <div class="controls">
- <select id="latSelect">
- <option ng-repeat="lat in latVariables">
- {{lat.text}}
- </option>
- </select>
- </div>
- </div>
- <div class="control-group">
- <label class="control-label" for="lonSelect">Longitude Variable</label>
- <div class"controls">
- <select id="lonSelect">
- <option ng-repeat="lon in lonVariables">
- {{lon.text}}
- </option>
- </select>
- </div>
- </div>
- <div class="control-group">
- <label class="control-label" for="dateTimeSelect">Date/Time Variable</label>
- <div class="controls">
- <select id="dateTimeSelect">
- <option ng-repeat="dateTime in dateTimeVariables">
- {{dateTime.text}}
- </option>
- </select>
- </div>
- </div>
- <div class="control-group">
- <div class="controls">
- <button type="submit" class="btn btn-warn">Cancel</button>
- <button type="submit" class="btn">Add Model</button>
- </div>
- </div>
- </form>
- </div>
- </div>
- </div>
- </div>
-</div>
-
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/app/views/results.html
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/app/views/results.html b/ocw-ui/frontend-new/app/views/results.html
deleted file mode 100644
index 432bba1..0000000
--- a/ocw-ui/frontend-new/app/views/results.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<div class="row">
- <div class="col-md-3">
- <div id="results-sidebar" class="pa-sidebar well well-small">
- <ul class="nav nav-list">
- <li id="results-sidebar-header" class="nav-header">Latest Run Results</li>
- <li ng-repeat="result in results"
- ng-class="{ active: $state.includes('results.detail') && $stateParams.resultId == result }">
- <a href="#/results/{{result.replace('/', '')}}" >{{result}}</a>
- </li>
- </ul>
- <div ui-view="menu"></div>
- </div>
- </div>
- <div class="col-md-9" ui-view ng-animate="{enter:'fade-enter'}"></div>
-</div>
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/app/views/resultsdetail.html
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/app/views/resultsdetail.html b/ocw-ui/frontend-new/app/views/resultsdetail.html
deleted file mode 100644
index 4083ff3..0000000
--- a/ocw-ui/frontend-new/app/views/resultsdetail.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<div>
- <h2>{{result}}</h2>
- <div class="row text-center">
- <div class="{{alertClass}}">{{alertMessage}}</div>
- <ul>
- <li ng-repeat="figure in figures">
- <img class="img-responsive" ng-src="{{baseURL}}/static/eval_results/{{figure}}" alt="" />
- </li>
- </ul>
- </div>
-</div>
[05/28] CLIMATE-512 - Replace frontend with new Yeoman/Grunt/Bower
frontend
Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/scripts/directives/onblur.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/scripts/directives/onblur.js b/ocw-ui/frontend/app/scripts/directives/onblur.js
new file mode 100644
index 0000000..313dbe0
--- /dev/null
+++ b/ocw-ui/frontend/app/scripts/directives/onblur.js
@@ -0,0 +1,38 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http: *www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+'use strict';
+
+/**
+ * @ngdoc directive
+ * @name ocwUiApp.directive:onBlur
+ * @description
+ * # onBlur
+ */
+angular.module('ocwUiApp')
+.directive('onBlur', function() {
+ return {
+ restrict: 'A',
+ link: function($scope, $elem, $attrs) {
+ $elem.bind('blur', function() {
+ $scope.$eval($attrs.onBlur);
+ });
+ },
+ };
+});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/scripts/directives/predictivefilebrowserinput.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/scripts/directives/predictivefilebrowserinput.js b/ocw-ui/frontend/app/scripts/directives/predictivefilebrowserinput.js
new file mode 100644
index 0000000..7142c15
--- /dev/null
+++ b/ocw-ui/frontend/app/scripts/directives/predictivefilebrowserinput.js
@@ -0,0 +1,316 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http: *www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+'use strict';
+
+/**
+ * @ngdoc directive
+ * @name ocwUiApp.directive:predictiveFileBrowserInput
+ * @description
+ * # predictiveFileBrowserInput
+ */
+angular.module('ocwUiApp')
+.directive('predictiveFileBrowserInput', function() {
+ var link = function($scope, $elem, $attrs) {
+ $scope.autocomplete = [];
+
+ // Set id to use this directive correctly in multiple places
+ $scope.id = 'autoCompletePath'+ $elem.context.id
+ /*
+ * We need a place to dump our auto-completion options
+ */
+ $($elem).parent().append('<ul id="' + $scope.id +'"><ul>');
+
+ // Handle user clicks on auto-complete path options
+ $(document).on('click', '#' +$scope.id+ ' li span', function(e) {
+ // Set the input text box's value to that of the user selected path
+ var val = $(e.target).text();
+ $($elem).val(val);
+ // Need to trigger the input box's "input" event so Angular updates the model!
+ $elem.trigger('input');
+
+ // If the user selected a directory, find more results..
+ if (val[val.length - 1] == '/') {
+ $scope.fetchFiles($($elem).val());
+ // Otherwise, remove the auto-complete options...
+ } else {
+ $('#' +$scope.id+ ' li').remove();
+ }
+ });
+
+ /*
+ * Handle key-down events on the input box
+ *
+ * We need to ignore <TAB> presses here so we can auto-complete with <TAB>.
+ * If we don't ignore here then <TAB> will move the user to the next field
+ * in the form and our common-prefix-fill won't work later.
+ */
+ $($elem).keydown(function(e) {
+ var code = e.keyCode || e.which;
+ var BACKSPACE = 8,
+ TAB = 9;
+
+ if (code == TAB)
+ return false;
+ });
+
+ /*
+ * Handle key-up events on the input box
+ */
+ $($elem).keyup(function(e) {
+ var code = e.keyCode || e.which;
+ var BACKSPACE = 8,
+ TAB = 9,
+ FORWARD_SLASH = 191;
+
+ if (code === FORWARD_SLASH) {
+ // Fetch new directory information from the server.
+ $scope.fetchFiles($(this).val());
+ } else if (code === TAB) {
+ // Attempt to auto-fill for the user.
+ $scope.handleTabPress();
+ } else if (code == BACKSPACE) {
+ // Need to properly handle the removal of directory information
+ // and the displaying of auto-complete options
+ $scope.handleBackSpace();
+ } else {
+ // Filter auto-complete options based on user input..
+ $scope.handleMiscKeyPress();
+ }
+
+ // This is being used so we can handle backspacing. The user might hold
+ // down the backspace key or select a section of text and delete. This allows
+ // us to compare the result to its prior state, which makes handling
+ // backspaces easier.
+ $scope.lastInputContents = $elem.val();
+ });
+
+ /*
+ * Grab additional path information from the web-server
+ *
+ * Params:
+ * path - The path to get a directory listing of.
+ */
+ // TODO Make this use $HTTP
+ $scope.fetchFiles = function(path) {
+ $.get($scope.baseURL + '/dir/list/' + path, {},
+ function(data) {
+ data = data['listing']
+ $scope.setNewData(data);
+ $scope.updateAutoComplete();
+ }, 'json');
+ };
+
+ /*
+ * Grab additional path information from the web-server and filter the
+ * results based on the current input text.
+ *
+ * Params:
+ * path - The path to get a directory listing of.
+ *
+ * This is needed to handle deletion of selected text. It is possible that
+ * the user will select text and delete only part of a word. The results
+ * need to be filtered based on this partial input.
+ */
+ // TODO Why isn't this using $http?!?!?! Because I copy and pasted!!!!
+ $scope.fetchFilesAndFilter = function(path) {
+ $.get($scope.baseURL + '/dir/list/' + path, {},
+ function(data) {
+ data = data['listing']
+ $scope.setNewData(data);
+ $scope.filterResults();
+ $scope.updateAutoComplete();
+ }, 'json');
+ };
+
+ /*
+ * Handle directory data from the server.
+ *
+ * We store the entire directory information along with the remaining
+ * possible options given the users current input. This lets us avoid
+ * unnecessary calls to the server for directory information every time
+ * the user deletes something.
+ */
+ $scope.setNewData = function(data) {
+ $scope.autocomplete = data.sort();
+ $scope.possibleCompletes = $scope.autocomplete;
+ };
+
+ /*
+ * Handle <TAB> presses.
+ *
+ * Attempt to auto-complete options when the user presses <TAB>.
+ */
+ $scope.handleTabPress = function() {
+ // If there's only one option available there's no points in trying to
+ // find a common prefix! Just set the value!
+ if ($scope.possibleCompletes.length === 1) {
+ $elem.val($scope.possibleCompletes[0]);
+
+ // Make sure more options are displayed if a directory was selected.
+ $scope.checkForMoreOptions();
+ $scope.updateAutoComplete();
+ return;
+ }
+
+ // Find the greatest common prefix amongst the remaining choices and set
+ // the input text to it.
+ var prefix = $scope.getLargestCommonPrefix($scope.possibleCompletes);
+ $elem.val(prefix);
+ $scope.updateAutoComplete();
+ };
+
+ /*
+ * Handle Backspacing and option displaying.
+ *
+ * The auto-complete options needs to be displayed correctly when the user
+ * removes directory information.
+ */
+ $scope.handleBackSpace = function() {
+ var curInputVal = $elem.val();
+
+ // If the user deletes everything in the input box all we need to do
+ // is make sure that the auto-complete options aren't displayed.
+ if (curInputVal.length === 0) {
+ $('#' +$scope.id+ ' li').remove();
+ return;
+ }
+
+ // Figure out how much text the user removed from the input box.
+ var lengthDiff = $scope.lastInputContents.length - curInputVal.length;
+ // Grab the removed text.
+ var removedText = $scope.lastInputContents.substr(-lengthDiff);
+
+ // If the user deleted over a directory we need to fetch information on the
+ // previous directory for auto-completion.
+ if (removedText.indexOf('/') !== -1) {
+ var lastSlashIndex = curInputVal.lastIndexOf('/');
+
+ // If the remaining path still contains a directory...
+ if (lastSlashIndex !== -1) {
+ // Grab the section of the path that points to a valid directory,
+ // fetch the listing, and update the results.
+ var pathToSearch = curInputVal.slice(0, lastSlashIndex + 1);
+ $scope.fetchFilesAndFilter(pathToSearch);
+ } else {
+ // Delete the old auto-complete information in the case where the user
+ // completely removed path information.
+ $('#' +$scope.id+ ' li').remove();
+ }
+ } else {
+ // Otherwise, we just need to filter results based on the remaining input.
+ $scope.filterResults();
+ $scope.updateAutoComplete();
+ }
+ };
+
+ /*
+ * Handle all other key presses in the input box
+ *
+ * Filter the auto-complete options as the user types to ensure that only options
+ * which are possible given the current input text are still displayed.
+ */
+ $scope.handleMiscKeyPress = function() {
+ // Safely exit when there are no options available.
+ if ($scope.autocomplete === [])
+ return;
+
+ // Otherwise, filter the results.
+ $scope.filterResults();
+ $scope.updateAutoComplete();
+ };
+
+ /*
+ * When a path is auto-completed with <TAB> we need to check to see if it points
+ * to a directory. If it does, we still need to fetch results!
+ */
+ $scope.checkForMoreOptions = function() {
+ var path = $elem.val();
+ if (path[path.length - 1] === '/') {
+ $scope.fetchFiles(path);
+ }
+ };
+
+ /*
+ * Calculate the greatest common prefix of the passed options.
+ *
+ * Params:
+ * Options - An array of strings in which the greatest common prefix
+ * should be found
+ *
+ * Returns:
+ * The greatest common prefix of the strings.
+ *
+ *
+ * Note - For us, there will always be a prefix of at least '/' since this can't
+ * possible be called without the users entering a starting directory. As a result,
+ * we don't explicitly handle the case where there is 0 length common prefix.
+ */
+ $scope.getLargestCommonPrefix = function(options) {
+ var index = 1;
+ var shortestString = options.reduce(function(a, b) { return a.length < b.length ? a : b; });
+ var longestString = options.reduce(function(a, b) { return a.length > b.length ? a : b; });
+ var substringToCheck = shortestString[0];
+
+ while (longestString.indexOf(substringToCheck) !== -1) {
+ substringToCheck = shortestString.slice(0, ++index);
+ }
+
+ return longestString.slice(0, index - 1);
+ };
+
+ /*
+ * Filter the auto-complete options based on the current input.
+ */
+ $scope.filterResults = function() {
+ $scope.possibleCompletes = $scope.autocomplete.filter(function(item, index, array) {
+ return (~item.indexOf($($elem).val()));
+ });
+
+ $scope.possibleCompletes.sort();
+ };
+
+ /*
+ * Update the display of auto-complete options.
+ */
+ $scope.updateAutoComplete = function() {
+ // Remove all the existing options
+ $('#' +$scope.id+ ' li').remove();
+
+ // We don't need to show anything if the user has completely selected
+ // the only existing option available.
+ if ($scope.possibleCompletes.length === 1) {
+ if ($scope.possibleCompletes[0] === $elem.val()) {
+ return;
+ }
+ }
+
+ // Display all the possible completes
+ $.each($scope.possibleCompletes, function(i, v) {
+ $('#' +$scope.id+ '').append($('<li>').html($('<span>').text(v)));
+ });
+ };
+ };
+
+ return {
+ link: link,
+ scope: true,
+ restrict: 'A'
+ };
+});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/scripts/directives/previewmap.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/scripts/directives/previewmap.js b/ocw-ui/frontend/app/scripts/directives/previewmap.js
new file mode 100644
index 0000000..78aae8c
--- /dev/null
+++ b/ocw-ui/frontend/app/scripts/directives/previewmap.js
@@ -0,0 +1,76 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http: *www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+'use strict';
+
+/**
+ * @ngdoc directive
+ * @name ocwUiApp.directive:previewMap
+ * @description
+ * # previewMap
+ */
+angular.module('ocwUiApp')
+.directive('previewMap', function($rootScope) {
+ return {
+ restrict: 'A',
+ scope: {dataset: '=previewMap', index: '=index'},
+ template: '<div id="{{dataset.name}}" class="preview-map"></div>',
+ replace: true,
+ link: function(scope, element, attrs) {
+
+ // Any attribute that contains {{}} interpolation will be set to null in the attrs
+ // parameter during the link function since the first $digest since the compilation
+ // has yet to run to evaluate it! We can't run a $digest in the middle of compilation,
+ // so using an $observe (or $watch) is the best way to get the values.
+ attrs.$observe('id', function(newId) {
+ var map = L.map(attrs.id, {
+ zoom: 0,
+ scrollWheelZoom: false,
+ zoomControl: false,
+ attributionControl: false,
+ worldCopyJump: true,
+ });
+
+ L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {}).addTo(map);
+
+ // Zoom the map to the dataset bound regions (or at least try our best to do so)
+ var datasetBounds = [[scope.dataset.latlonVals.latMax, scope.dataset.latlonVals.lonMin],
+ [scope.dataset.latlonVals.latMin, scope.dataset.latlonVals.lonMax]];
+ map.fitBounds(datasetBounds, {});
+
+ // Draw a colored overlay on the region of the map
+ var maplatlon = scope.dataset.latlonVals;
+ var bounds = [[maplatlon.latMax, maplatlon.lonMin], [maplatlon.latMin, maplatlon.lonMax]];
+
+ var polygon = L.rectangle(bounds,{
+ stroke: false,
+ fillColor: $rootScope.fillColors[1],
+ fillOpacity: 0.6
+ });
+
+ // Add layer to Group
+ var rectangleGroup = L.layerGroup();
+ rectangleGroup.addLayer(polygon);
+
+ // Add the overlay to the map
+ rectangleGroup.addTo(map);
+ });
+ }
+ };
+});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/scripts/directives/timeline.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/scripts/directives/timeline.js b/ocw-ui/frontend/app/scripts/directives/timeline.js
new file mode 100644
index 0000000..760a819
--- /dev/null
+++ b/ocw-ui/frontend/app/scripts/directives/timeline.js
@@ -0,0 +1,54 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http: *www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+'use strict';
+
+/**
+ * @ngdoc directive
+ * @name ocwUiApp.directive:timeline
+ * @description
+ * # timeline
+ */
+angular.module('ocwUiApp')
+.directive('timeline', function($rootScope, $window) {
+ return {
+ restrict: 'C',
+ replace: true,
+ transclude: true,
+ template: '<div id="OCWtimeline"></div>',
+ link: function(scope, element, attrs) {
+ // Instantiate timeline object.
+ $rootScope.timeline = new links.Timeline(document.getElementById('OCWtimeline'));
+
+ // Redraw the timeline whenever the window is resized
+ angular.element($window).bind('resize', function() {
+ $rootScope.timeline.checkResize();
+ });
+
+ var options = {
+ "width": "100%",
+ "showCurrentTime": false,
+ "moveable": false,
+ "zoomable": false
+ };
+
+ $rootScope.timeline.draw([], options);
+ }
+ }
+});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/scripts/filters/isodatetomiddleendian.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/scripts/filters/isodatetomiddleendian.js b/ocw-ui/frontend/app/scripts/filters/isodatetomiddleendian.js
new file mode 100644
index 0000000..7fcd2a9
--- /dev/null
+++ b/ocw-ui/frontend/app/scripts/filters/isodatetomiddleendian.js
@@ -0,0 +1,55 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http: *www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+'use strict';
+
+/**
+ * @ngdoc filter
+ * @name ocwUiApp.filter:ISODateToMiddleEndian
+ * @function
+ * @description
+ * # ISODateToMiddleEndian
+ * Filter in the ocwUiApp.
+ */
+angular.module('ocwUiApp')
+.filter('ISODateToMiddleEndian', function() {
+ return function(input) {
+ var original = input;
+
+ // Strip whitespace from the start and end of the string
+ input = input.replace(/(^\s+|\s+$)/g, '');
+
+ // ISO Standard says time is separated from Date with a 'T'. Our timestamps
+ // slightly modify that and use a space. We'll check for both here and prefer
+ // to split on a 'T' if it's available.
+ if (input.indexOf('T') != -1 || input.indexOf(' ') != -1) {
+ input = (input.indexOf('T') != -1) ? input.split('T')[0] : input.split(' ')[0];
+ }
+
+ // The components of the date should be split with hyphens. If we can't find them
+ // then the string is poorly formed.
+ if (input.indexOf('-') == -1 || input.split('-').length - 1 != 2) {
+ return original;
+ }
+
+ // At this point the date is probably valid and we should try to convert it!
+ var components = input.split('-');
+ return (components[1] + "/" + components[2] + "/" + components[0]);
+ };
+});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/scripts/services/evaluationsettings.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/scripts/services/evaluationsettings.js b/ocw-ui/frontend/app/scripts/services/evaluationsettings.js
new file mode 100644
index 0000000..b53842c
--- /dev/null
+++ b/ocw-ui/frontend/app/scripts/services/evaluationsettings.js
@@ -0,0 +1,56 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http: *www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+'use strict';
+
+/**
+ * @ngdoc service
+ * @name ocwUiApp.evaluationSettings
+ * @description
+ * # evaluationSettings
+ * Service in the ocwUiApp.
+ */
+angular.module('ocwUiApp')
+ .service('evaluationSettings', function($rootScope, $http) {
+ $http.get($rootScope.baseURL + '/processing/metrics/').then(function(data) {
+ var metrics_data = data['data']['metrics'];
+ var metrics = [];
+
+ for (var i = 0; i < metrics_data.length; ++i) {
+ metrics.push({'name': metrics_data[i], 'select': false});
+ }
+
+ settings['metrics'] = metrics;
+ });
+
+ var settings = {
+ 'metrics': [],
+ 'temporal': {
+ 'options': ['daily', 'monthly', 'yearly'],
+ 'selected': 'yearly',
+ },
+ 'spatialSelect': null,
+ };
+
+ return {
+ getSettings: function() {
+ return settings;
+ }
+ };
+ });
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/scripts/services/regionselectparams.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/scripts/services/regionselectparams.js b/ocw-ui/frontend/app/scripts/services/regionselectparams.js
new file mode 100644
index 0000000..cb3f4f8
--- /dev/null
+++ b/ocw-ui/frontend/app/scripts/services/regionselectparams.js
@@ -0,0 +1,46 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http: *www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+'use strict';
+
+/**
+ * @ngdoc service
+ * @name ocwUiApp.regionSelectParams
+ * @description
+ * # regionSelectParams
+ * Service in the ocwUiApp.
+ */
+angular.module('ocwUiApp')
+.service('regionSelectParams', function() {
+ var parameters = {
+ "areValid" : true,
+ "latMin" : "",
+ "latMax" : "",
+ "lonMin" : "",
+ "lonMax" : "",
+ "start" : "",
+ "end" : "",
+ };
+
+ return {
+ getParameters: function() {
+ return parameters;
+ },
+ };
+});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/scripts/services/selecteddatasetinformation.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/scripts/services/selecteddatasetinformation.js b/ocw-ui/frontend/app/scripts/services/selecteddatasetinformation.js
new file mode 100644
index 0000000..613cfb8
--- /dev/null
+++ b/ocw-ui/frontend/app/scripts/services/selecteddatasetinformation.js
@@ -0,0 +1,57 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http: *www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+'use strict';
+
+/**
+ * @ngdoc service
+ * @name ocwUiApp.selectedDatasetInformation
+ * @description
+ * # selectedDatasetInformation
+ * Service in the ocwUiApp.
+ */
+angular.module('ocwUiApp')
+.service('selectedDatasetInformation', function() {
+ var datasets = [];
+
+ return {
+ getDatasets: function() {
+ return datasets;
+ },
+ getDatasetCount: function() {
+ return datasets.length;
+ },
+ // TODO: Define the structure of the objects that are added with addDataset.
+ addDataset: function(dataset) {
+ // All datasets need a shouldDisplay attribute that is used when rendering
+ // the overlays on the map!
+ dataset.shouldDisplay = false;
+ // The regrid attribute indicates which dataset should be used for spatial regridding
+ dataset.regrid = false;
+
+ datasets.push(dataset);
+ },
+ removeDataset: function(index) {
+ datasets.splice(index, 1);
+ },
+ clearDatasets: function() {
+ datasets.length = 0;
+ },
+ };
+});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/styles/main.css
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/styles/main.css b/ocw-ui/frontend/app/styles/main.css
new file mode 100644
index 0000000..fb42ccd
--- /dev/null
+++ b/ocw-ui/frontend/app/styles/main.css
@@ -0,0 +1,120 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http: *www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+body {
+
+}
+
+#header-img {
+
+}
+
+#header-title {
+
+}
+
+#OCW-powered {
+
+}
+
+#main-container {
+ margin-top: 20px;
+ min-height: 400px;
+ height: auto !important;
+ height: 400px;
+}
+
+#datasetDiv {
+ height: 750px;
+ overflow-y: auto;
+ overflow-x: hidden;
+}
+
+#ocw-navbar {
+ margin-bottom: 0;
+}
+
+#map { height: 500px; }
+
+/* Small preview map that is displayed alongside dataset information */
+.preview-map {
+ height: 100px;
+ width: 100px;
+}
+
+.small-alert {
+ font-size: 12px;
+ color: green;
+ margin-top: 4px;
+ margin-left: 10px;
+}
+
+.colorSquare {
+ margin-top: 3px;
+ height: 10px;
+ width: 10px;
+}
+
+ul { list-style-type: none; }
+
+.no-color-link { color: #000000; }
+.no-color-link:hover { color: #000000; text-decoration: none; }
+.no-color-link:visited { color: #000000; }
+.no-color-link:active { color: #000000; }
+
+/* Remove the grayed out close button in modal headers */
+.modal-header .close { opacity: 1; }
+
+/* Remove the grayed out close button in modal footers */
+.modal-footer .close { opacity: 1; }
+
+/**
+ * Timeline
+ */
+div#OCWtimeline {
+ margin-top: 20px;
+ padding-bottom: 20px;
+}
+
+div.timeline-event {
+ border: none;
+ background: none;
+}
+
+div.timeline-event-content { margin: 0; }
+
+div.ocw-bar { height: 5px; }
+
+/**
+ * Results
+ */
+#results-sidebar {
+ min-height: 400px;
+ height: auto !important;
+ height: 400px;
+}
+
+#results-sidebar-header { font-size: 14px; }
+
+/* Helpers for vertical offsets */
+.top3 { margin-top: 3%; }
+.top7 { margin-top: 7%; }
+.top14 { margin-top:14%; }
+.top21 { margin-top:21%; }
+.top42 { margin-top:42%; }
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/views/main.html
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/views/main.html b/ocw-ui/frontend/app/views/main.html
new file mode 100644
index 0000000..2f428e5
--- /dev/null
+++ b/ocw-ui/frontend/app/views/main.html
@@ -0,0 +1,274 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<!-- Modal for evaluation settings -->
+<div class="modal fade" id="evaluationSettingsModal" role="dialog" aria-labelledby="datasetSelectModalLabel" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button class="close" data-dismiss="modal">×</button>
+ <h3>Settings</h3>
+ </div>
+ <div class="modal-body" ng-controller="SettingsCtrl">
+ <h4>Select the metrics you would like to run.</h4>
+ <div ng-repeat="metric in settings.metrics">
+ <label><input type="checkbox" ng-model="metric.select"> {{metric.name}}</label>
+ </div>
+ <hr />
+ <h4>Select how you would like to temporally re-grid the datasets.</h4>
+ <select class="form-control" ng-model="settings.temporal.selected" ng-options="opt for opt in settings.temporal.options"></select>
+ <hr />
+ <h4>Select which dataset to use as the reference.</h4>
+ <select class="form-control" ng-model="settings.spatialSelect" ng-options="dataset as dataset.name for dataset in datasets"></select>
+ <hr />
+ <!-- Temporarily hidden for work on CLIMATE-365.-->
+ <div ng-hide=true>
+ <h4>Select a file which will define the bounds of subregions.</h4>
+ <form class="form-inline" autocomplete="off">
+ <input id="subregionFileInput" predictive-file-browser-input ng-model="settings.subregionFile" type="text" class="input-xlarge" autocomplete="off" />
+ </form>
+ </div>
+ <!--End hidden section for CLIMATE-365-->
+ </div>
+ <div class="modal-footer">
+ <button class="btn btn-warning cancel" data-dismiss="modal">Close</button>
+ </div>
+ </div>
+ </div>
+</div>
+<!-- END - Modal for evaluation settings -->
+
+<div class="row">
+ <div class="col-md-12">
+ <div class="row">
+ <!-- Dataset Select and Display Column -->
+ <div class="col-md-6">
+ <!--Dataset Select Controls-->
+ <div ng-controller="DatasetSelectCtrl">
+ <div class="row">
+ <div class="col-md-1 col-md-offset-10">
+ <button class="btn btn-link no-color-link" ng-click="clearDatasets()" ng-disabled="shouldDisableClearButton()">
+ <span tooltip-placement="left" tooltip-popup-delay="700" tooltip="Clear Datasets">
+ <i class="fa fa-trash-o fa-2x"></i>
+ </span>
+ </button>
+ </div>
+ <div class="col-md-1">
+ <button class="btn btn-link no-color-link" data-toggle="modal" data-target="#datasetSelect">
+ <span tooltip-placement="left" tooltip-popup-delay="700" tooltip="Add Dataset">
+ <i class="fa fa-plus fa-2x"></i>
+ </span>
+ </button>
+ </div>
+ </div>
+ <!-- Modal for dataset selection -->
+ <div class="modal fade" id="datasetSelect" role="dialog" aria-labelledby="datasetSelectModalLabel" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <h3>Dataset Select</h3>
+ </div>
+ <div class="modal-body">
+ <tabset>
+ <tab ng-repeat="tab in templates" heading="{{tab.title}}" active="tab.active" disabled="tab.disabled">
+ <div ng-include src="tab.url"></div>
+ </tab>
+ <li class="pull-right">Queued Datasets: {{datasetCount.length}}</li>
+ </tabset>
+ </div>
+ <div class="modal-footer">
+ <button class="btn btn-warning cancel" data-dismiss="modal">Close</button>
+ </div>
+ </div>
+ </div>
+ </div>
+ <!-- END - Modal for dataset selection -->
+ <div class="row">
+ <div class="col-md-12">
+ <hr />
+ </div>
+ </div>
+ </div>
+ <!--Dataset display-->
+ <div ng-controller="DatasetDisplayCtrl" id="datasetDiv">
+ <div ng-repeat="dataset in datasets">
+ <div class="row">
+ <!--Data section-->
+ <div class="col-md-8 col-md-offset-1 muted">
+ {{dataset.name}}
+ </div>
+ <div class="col-md-1 col-md-offset-2">
+ <span tooltip-placement="left" tooltip-popup-delay="700" tooltip="Remove Dataset">
+ <a class="no-color-link" href="#" ng-click="removeDataset($index)">
+ <i class="fa fa-remove"></i>
+ </a>
+ </span>
+ </div>
+ </div>
+ <!--Time Values!-->
+ <div class="row">
+ <!--Dataset Info Section-->
+ <div class="col-md-9">
+ <div class="row">
+ <div class="col-md-2 col-md-offset-1 text-center">Start:</div>
+ <div class="col-md-2">
+ <div class="col-md-2 text-center">{{dataset.timeVals.start | ISODateToMiddleEndian}}</div>
+ </div>
+ <div class="col-md-2 text-center">End:</div>
+ <div class="col-md-2">
+ <div class="col-md-2 text-center">{{dataset.timeVals.end | ISODateToMiddleEndian}}</div>
+ </div>
+ </div>
+ <!--Lat/Long Values!-->
+ <div class="row">
+ <div class="col-md-2 col-md-offset-1 text-center">North:</div>
+ <div class="col-md-2 text-center">
+ {{dataset.latlonVals.latMax | number:2}}
+ </div>
+ <div class="col-md-2 text-center">West:</div>
+ <div class="col-md-2 text-center">
+ {{dataset.latlonVals.lonMin | number:2}}
+ </div>
+ </div>
+ <div class="row">
+ <div class="col-md-2 col-md-offset-1 text-center">South:</div>
+ <div class="col-md-2 text-center">
+ {{dataset.latlonVals.latMin | number:2}}
+ </div>
+ <div class="col-md-2 text-center">East:</div>
+ <div class="col-md-2 text-center">
+ {{dataset.latlonVals.lonMax | number:2}}
+ </div>
+ </div>
+ </div>
+ <!--Preview Map Section-->
+ <div class="col-md-3">
+ <!--If the dataset is global we show a picture of a globe instead of the actual map-->
+ <div ng-hide="dataset.latlonVals.lonMin == -180 && dataset.latlonVals.lonMax == 180 &&
+ dataset.latlonVals.latMin == -90 && dataset.latlonVals.latMax == 90"
+ preview-map="dataset" index="$index"></div>
+ <div ng-show="dataset.latlonVals.lonMin == -180 && dataset.latlonVals.lonMax == 180 &&
+ dataset.latlonVals.latMin == -90 && dataset.latlonVals.latMax == 90">
+ <img src="img/globe.png" class="preview-map">
+ </div>
+ </div>
+ </div>
+ <div class="row">
+ <div class="col-md-6 col-md-offset-3"><hr /></div>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <!-- Map, Timeline, and Parameter Control Column -->
+ <div class="col-md-6">
+ <!--Map-->
+ <div class="row" ng-controller="WorldMapCtrl">
+ <div class="col-md-12">
+ <leaflet-map id="map"></leaflet-map>
+ </div>
+ </div>
+
+ <!--Timeline-->
+ <div class="row">
+ <div class="col-md-12" ng-controller="TimelineCtrl">
+ <div class="timeline"></div>
+ </div>
+ </div>
+
+ <div class="row">
+ <div class="col-md-12" ng-controller="ParameterSelectCtrl">
+ <div class="row top3">
+ <div class="col-md-2 text-center">Start Date:</div>
+ <div class="col-md-4">
+ <form>
+ <!--This styling HAD to be done inline. Using a class wouldn't work and for some -->
+ <!--reason the input boxes refused to be 100% wide when their span size was set.-->
+ <input ng-disabled="shouldDisableControls()" on-blur="checkParameters();" ng-model="displayParams.start" ui-date="datepickerSettings" ui-date-format="yy-mm-dd" type="text" class="col-md-4 text-center" style="width:100%" />
+ </form>
+ </div>
+ <div class="col-md-2 text-center">End Date:</div>
+ <div class="col-md-4">
+ <form>
+ <!--This styling HAD to be done inline. Using a class wouldn't work and for some -->
+ <!--reason the input boxes refused to be 100% wide when their span size was set.-->
+ <input ng-disabled="shouldDisableControls()" on-blur="checkParameters();" ng-model="displayParams.end" ui-date="datepickerSettings" ui-date-format="yy-mm-dd" type="text" class="col-md-4 text-center" style="width:100%"/>
+ </form>
+ </div>
+ </div>
+ <div class="row top3">
+ <div class="col-md-2 text-center">North:</div>
+ <div class="col-md-4">
+ <form action="">
+ <input ng-disabled="shouldDisableControls()" ng-model="displayParams.latMax" on-blur="checkParameters();" type="text" class="col-md-4 text-center" style="width:100%"/>
+ </form>
+ </div>
+ <div class="col-md-2 text-center">South:</div>
+ <div class="col-md-4">
+ <form action="">
+ <!--This styling HAD to be done inline. Using a class wouldn't work and for some -->
+ <!--reason the input boxes refused to be 100% wide when their span size was set.-->
+ <input ng-disabled="shouldDisableControls()" ng-model="displayParams.latMin" on-blur="checkParameters();" type="text" class="col-md-4 text-center" style="width:100%"/>
+ </form>
+ </div>
+ </div>
+ <div class="row top3">
+ <div class="col-md-2 text-center">East:</div>
+ <div class="col-md-4">
+ <form>
+ <!--This styling HAD to be done inline. Using a class wouldn't work and for some -->
+ <!--reason the input boxes refused to be 100% wide when their span size was set.-->
+ <input ng-disabled="shouldDisableControls()" ng-model="displayParams.lonMax" on-blur="checkParameters();" type="text" class="col-md-4 text-center" style="width:100%"/>
+ </form>
+ </div>
+ <div class="col-md-2 text-center">West:</div>
+ <div class="col-md-4">
+ <form>
+ <!--This styling HAD to be done inline. Using a class wouldn't work and for some -->
+ <!--reason the input boxes refused to be 100% wide when their span size was set.-->
+ <input ng-disabled="shouldDisableControls()" ng-model="displayParams.lonMin" on-blur="checkParameters();"; type="text" class="col-md-4 text-center" style="width:100%"/>
+ </form>
+ </div>
+ </div>
+ <div class="row top3">
+ <div class="col-md-2 col-md-offset-6">
+ <!--<button class="btn btn-link no-color-link pull-right" bootstrap-modal-open="evaluationSettings">-->
+ <button class="btn btn-link no-color-link pull-right" data-toggle="modal" data-target="#evaluationSettingsModal">
+ <span tooltip-placement="left" tooltip-popup-delay="700" tooltip="Settings">
+ <span class="fa-stack fa-lg">
+ <i class="fa fa-square-o fa-stack-2x"></i>
+ <i class="fa fa-cogs fa-stack-1x"></i>
+ </span>
+ </span>
+ </button>
+ </div>
+ <div class="col-md-4">
+ <button ng-click="runEvaluation()" ng-disabled="shouldDisableEvaluateButton()" class="btn btn-block btn-primary">
+ <div ng-hide="runningEval">Evaluate</div>
+ <div ng-show="runningEval"><i class="fa fa-spinner fa-spin"></i></div>
+ </button>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
+
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/views/modelselect.html
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/views/modelselect.html b/ocw-ui/frontend/app/views/modelselect.html
new file mode 100644
index 0000000..9bc128f
--- /dev/null
+++ b/ocw-ui/frontend/app/views/modelselect.html
@@ -0,0 +1,87 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<div class="container">
+ <div class="row">
+ <div class="span10 offset1 columns">
+ <div class="row">
+ <div class="span10">
+ <center>
+ <form id="modelSelectorForm">
+ <input type="file" name="modelSelector">
+ </form>
+ </center>
+ </div>
+ </div>
+ <div class="row">
+ <div class="span10 offset2">
+ <form class="form-horizontal" id="parameterSelectorForm">
+ <div class="control-group">
+ <label class="control-label" for="paramSelect">Parameter Value</label>
+ <div class="controls">
+ <select id="paramSelect">
+ <option ng-repeat="param in modelParameters">
+ {{param.text}}
+ </option>
+ </select>
+ </div>
+ </div>
+ <div class="control-group">
+ <label class="control-label" for="latSelect">Latitude Variable</label>
+ <div class="controls">
+ <select id="latSelect">
+ <option ng-repeat="lat in latVariables">
+ {{lat.text}}
+ </option>
+ </select>
+ </div>
+ </div>
+ <div class="control-group">
+ <label class="control-label" for="lonSelect">Longitude Variable</label>
+ <div class"controls">
+ <select id="lonSelect">
+ <option ng-repeat="lon in lonVariables">
+ {{lon.text}}
+ </option>
+ </select>
+ </div>
+ </div>
+ <div class="control-group">
+ <label class="control-label" for="dateTimeSelect">Date/Time Variable</label>
+ <div class="controls">
+ <select id="dateTimeSelect">
+ <option ng-repeat="dateTime in dateTimeVariables">
+ {{dateTime.text}}
+ </option>
+ </select>
+ </div>
+ </div>
+ <div class="control-group">
+ <div class="controls">
+ <button type="submit" class="btn btn-warn">Cancel</button>
+ <button type="submit" class="btn">Add Model</button>
+ </div>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
+
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/views/results.html
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/views/results.html b/ocw-ui/frontend/app/views/results.html
new file mode 100644
index 0000000..432bba1
--- /dev/null
+++ b/ocw-ui/frontend/app/views/results.html
@@ -0,0 +1,34 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<div class="row">
+ <div class="col-md-3">
+ <div id="results-sidebar" class="pa-sidebar well well-small">
+ <ul class="nav nav-list">
+ <li id="results-sidebar-header" class="nav-header">Latest Run Results</li>
+ <li ng-repeat="result in results"
+ ng-class="{ active: $state.includes('results.detail') && $stateParams.resultId == result }">
+ <a href="#/results/{{result.replace('/', '')}}" >{{result}}</a>
+ </li>
+ </ul>
+ <div ui-view="menu"></div>
+ </div>
+ </div>
+ <div class="col-md-9" ui-view ng-animate="{enter:'fade-enter'}"></div>
+</div>
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/views/resultsdetail.html
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/views/resultsdetail.html b/ocw-ui/frontend/app/views/resultsdetail.html
new file mode 100644
index 0000000..4083ff3
--- /dev/null
+++ b/ocw-ui/frontend/app/views/resultsdetail.html
@@ -0,0 +1,30 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<div>
+ <h2>{{result}}</h2>
+ <div class="row text-center">
+ <div class="{{alertClass}}">{{alertMessage}}</div>
+ <ul>
+ <li ng-repeat="figure in figures">
+ <img class="img-responsive" ng-src="{{baseURL}}/static/eval_results/{{figure}}" alt="" />
+ </li>
+ </ul>
+ </div>
+</div>
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/views/resultslist.html
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/views/resultslist.html b/ocw-ui/frontend/app/views/resultslist.html
new file mode 100644
index 0000000..f4664c6
--- /dev/null
+++ b/ocw-ui/frontend/app/views/resultslist.html
@@ -0,0 +1,21 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<h4>Select one of your previous runs. If none are displayed, please return
+ to the main page and start one!</h4>
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/views/selectobservation.html
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/views/selectobservation.html b/ocw-ui/frontend/app/views/selectobservation.html
new file mode 100644
index 0000000..fd10ff8
--- /dev/null
+++ b/ocw-ui/frontend/app/views/selectobservation.html
@@ -0,0 +1,80 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<div ng-controller="ObservationSelectCtrl">
+ <div class="row">
+ <div class="col-md-12">
+ <div class="row">
+ <!--<form class="form-inline" autocomplete="off">-->
+ <form class="form" autocomplete="off">
+ <div class="form-group">
+ <div class="col-md-9">
+ <input id="observationFileInput" predictive-file-browser-input ng-model="filePathInput" type="text" class="form-control" autocomplete="off" placeholder="Navigate to a .nc file. Start by typing '/'" />
+ </div>
+ <div class="col-md-2">
+ <button class="btn" ng-click="uploadLocalFile()" ng-disabled="shouldDisableLoadButton()">
+ <div ng-hide="loadingFile">Parse File</div>
+ <div ng-show="loadingFile"><i class="icon-spinner icon-spin"></i></div>
+ </button>
+ </div>
+ </div>
+ </form>
+ </div>
+ <hr />
+ <div class="row top3">
+ <div class="col-md-5 text-center">
+ Evaluation Variable
+ </div>
+ <div class="col-md-6">
+ <select class="form-control" ng-model="paramSelect" ng-options="param for param in params"></select>
+ </div>
+ </div>
+ <div class="row top3">
+ <div class="col-md-5 text-center">
+ Latitude Variable
+ </div>
+ <div class="col-md-6">
+ <select class="form-control" ng-model="latsSelect" ng-options="lat for lat in lats"></select>
+ </div>
+ </div>
+ <div class="row top3">
+ <div class="col-md-5 text-center">
+ Longitude Variable
+ </div>
+ <div class="col-md-6">
+ <select class="form-control" ng-model="lonsSelect" ng-options="lon for lon in lons"></select>
+ </div>
+ </div>
+ <div class="row top3">
+ <div class="col-md-5 text-center">
+ Date/Time Variable
+ </div>
+ <div class="col-md-6">
+ <select class="form-control" ng-model="timeSelect" ng-options="time for time in times"></select>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="row top3">
+ <div class="col-md-3 col-md-offset-1">
+ <button class="btn btn-primary btn-block" ng-click="addDataSet()">Add Dataset</button>
+ </div>
+ <div class="pull-left small-alert" ng-show="fileAdded">Successfully added dataset...</div>
+ </div>
+</div>
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/views/selectrcmed.html
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/views/selectrcmed.html b/ocw-ui/frontend/app/views/selectrcmed.html
new file mode 100644
index 0000000..6b09f48
--- /dev/null
+++ b/ocw-ui/frontend/app/views/selectrcmed.html
@@ -0,0 +1,40 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<div ng-controller="RcmedSelectionCtrl">
+ <div class="row">
+ <div class="col-md-10 col-md-offset-1">
+ <div class="row top3">Select the RCMED dataset that you would like use.</div>
+ <div class="row top3">
+ <select ng-change="dataSelectUpdated()" class="form-control" ng-model="datasetSelection" ng-options="obs as obs.longname for obs in availableObs"></select>
+ </div>
+ <div class="row top3">Select the dataset parameter that you would like to test.</div>
+ <div class="row top3">
+ <select class="form-control" ng-model="parameterSelection" ng-options="param as param.shortname for param in retrievedObsParams"></select>
+ </div>
+
+ <div class="row top3">
+ <div class="col-md-3">
+ <button class="btn btn-primary btn-block-left" ng-click="addObservation()">Add Observation</button>
+ </div>
+ <div class="pull-left small-alert" ng-show="fileAdded">Successfully added dataset...</div>
+ </div>
+ </div>
+ </div>
+</div>
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/bower.json
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/bower.json b/ocw-ui/frontend/bower.json
new file mode 100644
index 0000000..d288a19
--- /dev/null
+++ b/ocw-ui/frontend/bower.json
@@ -0,0 +1,25 @@
+{
+ "name": "ocw-ui",
+ "version": "0.0.0",
+ "dependencies": {
+ "angular": "1.2.16",
+ "json3": "~3.3.1",
+ "es5-shim": "~3.1.0",
+ "bootstrap": "~3.2.0",
+ "angular-resource": "1.2.16",
+ "angular-cookies": "1.2.16",
+ "angular-animate": "1.2.16",
+ "angular-route": "1.2.16",
+ "angular-ui-router": "angular-ui/ui-router#~0.2.10",
+ "leaflet": "~0.7.3",
+ "chap-links-timeline": "~2.6.1",
+ "components-font-awesome": "~4.1.0",
+ "angular-bootstrap": "~0.11.0",
+ "angular-ui-date": "~0.0.3"
+ },
+ "devDependencies": {
+ "angular-mocks": "1.2.16",
+ "angular-scenario": "1.2.16"
+ },
+ "appPath": "app"
+}
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/config/karma-e2e.conf.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/config/karma-e2e.conf.js b/ocw-ui/frontend/config/karma-e2e.conf.js
deleted file mode 100755
index 746879e..0000000
--- a/ocw-ui/frontend/config/karma-e2e.conf.js
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
-**/
-basePath = '../';
-
-files = [
- ANGULAR_SCENARIO,
- ANGULAR_SCENARIO_ADAPTER,
- 'test/e2e/**/*.js'
-];
-
-autoWatch = false;
-
-browsers = ['Chrome'];
-
-singleRun = true;
-
-proxies = {
- '/': 'http://localhost:8000/'
-};
-
-junitReporter = {
- outputFile: 'test_out/e2e.xml',
- suite: 'e2e'
-};
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/config/karma.conf.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/config/karma.conf.js b/ocw-ui/frontend/config/karma.conf.js
deleted file mode 100755
index 65b5013..0000000
--- a/ocw-ui/frontend/config/karma.conf.js
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
-**/
-basePath = '../';
-
-files = [
- JASMINE,
- JASMINE_ADAPTER,
- 'app/js/lib/jquery/jquery-1.10.1.js',
- 'app/js/lib/jquery/jquery-ui/jquery-ui-1.10.3.min.js',
- 'app/js/lib/bootstrap/bootstrap.js',
- 'app/js/lib/angular/angular.js',
- 'app/js/lib/angular/angular-*.js',
- 'app/js/lib/angular-ui/*.js',
- 'test/lib/angular/angular-mocks.js',
- 'app/js/lib/jquery/jquery-ui/datepicker-wrapper/date.js',
- 'app/js/lib/leaflet/leaflet-0.5.js',
- 'app/js/app.js',
- 'app/js/controllers/*.js',
- 'app/js/directives/*.js',
- 'app/js/services/*.js',
- 'app/js/filters/*.js',
- 'test/unit/**/*.js'
-];
-
-autoWatch = true;
-
-browsers = ['Chrome'];
-
-junitReporter = {
- outputFile: 'test_out/unit.xml',
- suite: 'unit'
-};
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/package.json
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/package.json b/ocw-ui/frontend/package.json
new file mode 100644
index 0000000..be2f597
--- /dev/null
+++ b/ocw-ui/frontend/package.json
@@ -0,0 +1,40 @@
+{
+ "name": "ocwui",
+ "version": "0.0.0",
+ "dependencies": {},
+ "devDependencies": {
+ "grunt": "^0.4.1",
+ "grunt-autoprefixer": "^0.7.3",
+ "grunt-concurrent": "^0.5.0",
+ "grunt-contrib-clean": "^0.5.0",
+ "grunt-contrib-concat": "^0.4.0",
+ "grunt-contrib-connect": "^0.7.1",
+ "grunt-contrib-copy": "^0.5.0",
+ "grunt-contrib-cssmin": "^0.9.0",
+ "grunt-contrib-htmlmin": "^0.3.0",
+ "grunt-contrib-imagemin": "^0.7.0",
+ "grunt-contrib-jshint": "^0.10.0",
+ "grunt-contrib-uglify": "^0.4.0",
+ "grunt-contrib-watch": "^0.6.1",
+ "grunt-filerev": "^0.2.1",
+ "grunt-google-cdn": "^0.4.0",
+ "grunt-karma": "^0.8.3",
+ "grunt-newer": "^0.7.0",
+ "grunt-ngmin": "^0.0.3",
+ "grunt-svgmin": "^0.4.0",
+ "grunt-usemin": "^2.1.1",
+ "grunt-wiredep": "^1.8.0",
+ "jshint-stylish": "^0.2.0",
+ "karma": "^0.12.17",
+ "karma-jasmine": "^0.1.5",
+ "karma-phantomjs-launcher": "^0.1.4",
+ "load-grunt-tasks": "^0.4.0",
+ "time-grunt": "^0.3.1"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "grunt test"
+ }
+}
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/scripts/e2e-test.sh
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/scripts/e2e-test.sh b/ocw-ui/frontend/scripts/e2e-test.sh
deleted file mode 100755
index dfca333..0000000
--- a/ocw-ui/frontend/scripts/e2e-test.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/bash
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-BASE_DIR=`dirname $0`
-
-echo ""
-echo "Starting Karma Server"
-echo "-------------------------------------------------------------------"
-
-karma start $BASE_DIR/../config/karma-e2e.conf.js $*
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/scripts/test.sh
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/scripts/test.sh b/ocw-ui/frontend/scripts/test.sh
deleted file mode 100755
index 7094550..0000000
--- a/ocw-ui/frontend/scripts/test.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/bash
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-BASE_DIR=`dirname $0`
-
-echo ""
-echo "Starting Karma Server"
-echo "-------------------------------------------------------------------"
-
-karma start $BASE_DIR/../config/karma.conf.js $*
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/scripts/web-server.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/scripts/web-server.js b/ocw-ui/frontend/scripts/web-server.js
deleted file mode 100755
index e137ad2..0000000
--- a/ocw-ui/frontend/scripts/web-server.js
+++ /dev/null
@@ -1,313 +0,0 @@
-#!/usr/bin/env node
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
-**/
-
-var util = require('util'),
- http = require('http'),
- fs = require('fs'),
- url = require('url'),
- events = require('events');
-
-var DEFAULT_PORT = 8000;
-
-function main(argv) {
- new HttpServer({
- 'GET': createServlet(StaticServlet),
- 'HEAD': createServlet(StaticServlet)
- }).start(Number(argv[2]) || DEFAULT_PORT);
-}
-
-function escapeHtml(value) {
- return value.toString().
- replace('<', '<').
- replace('>', '>').
- replace('"', '"');
-}
-
-function createServlet(Class) {
- var servlet = new Class();
- return servlet.handleRequest.bind(servlet);
-}
-
-/**
- * An Http server implementation that uses a map of methods to decide
- * action routing.
- *
- * @param {Object} Map of method => Handler function
- */
-function HttpServer(handlers) {
- this.handlers = handlers;
- this.server = http.createServer(this.handleRequest_.bind(this));
-}
-
-HttpServer.prototype.start = function(port) {
- this.port = port;
- this.server.listen(port);
- util.puts('Http Server running at http://localhost:' + port + '/');
-};
-
-HttpServer.prototype.parseUrl_ = function(urlString) {
- var parsed = url.parse(urlString);
- parsed.pathname = url.resolve('/', parsed.pathname);
- return url.parse(url.format(parsed), true);
-};
-
-HttpServer.prototype.handleRequest_ = function(req, res) {
- var logEntry = req.method + ' ' + req.url;
- if (req.headers['user-agent']) {
- logEntry += ' ' + req.headers['user-agent'];
- }
- util.puts(logEntry);
- req.url = this.parseUrl_(req.url);
- var handler = this.handlers[req.method];
- if (!handler) {
- res.writeHead(501);
- res.end();
- } else {
- handler.call(this, req, res);
- }
-};
-
-/**
- * Handles static content.
- */
-function StaticServlet() {}
-
-StaticServlet.MimeMap = {
- 'txt': 'text/plain',
- 'html': 'text/html',
- 'css': 'text/css',
- 'xml': 'application/xml',
- 'json': 'application/json',
- 'js': 'application/javascript',
- 'jpg': 'image/jpeg',
- 'jpeg': 'image/jpeg',
- 'gif': 'image/gif',
- 'png': 'image/png',
- 'svg': 'image/svg+xml'
-};
-
-StaticServlet.prototype.handleRequest = function(req, res) {
- var self = this;
- var path = ('./' + req.url.pathname).replace('//','/').replace(/%(..)/g, function(match, hex){
- return String.fromCharCode(parseInt(hex, 16));
- });
- var parts = path.split('/');
- if (parts[parts.length-1].charAt(0) === '.')
- return self.sendForbidden_(req, res, path);
- if (~path.indexOf("dirlist"))
- return self.getDirList_(req, res, path);
- fs.stat(path, function(err, stat) {
- if (err)
- return self.sendMissing_(req, res, path);
- if (stat.isDirectory())
- return self.sendDirectory_(req, res, path);
- return self.sendFile_(req, res, path);
- });
-}
-
-StaticServlet.prototype.sendError_ = function(req, res, error) {
- res.writeHead(500, {
- 'Content-Type': 'text/html'
- });
- res.write('<!doctype html>\n');
- res.write('<title>Internal Server Error</title>\n');
- res.write('<h1>Internal Server Error</h1>');
- res.write('<pre>' + escapeHtml(util.inspect(error)) + '</pre>');
- util.puts('500 Internal Server Error');
- util.puts(util.inspect(error));
-};
-
-StaticServlet.prototype.sendMissing_ = function(req, res, path) {
- path = path.substring(1);
- res.writeHead(404, {
- 'Content-Type': 'text/html'
- });
- res.write('<!doctype html>\n');
- res.write('<title>404 Not Found</title>\n');
- res.write('<h1>Not Found</h1>');
- res.write(
- '<p>The requested URL ' +
- escapeHtml(path) +
- ' was not found on this server.</p>'
- );
- res.end();
- util.puts('404 Not Found: ' + path);
-};
-
-StaticServlet.prototype.sendForbidden_ = function(req, res, path) {
- path = path.substring(1);
- res.writeHead(403, {
- 'Content-Type': 'text/html'
- });
- res.write('<!doctype html>\n');
- res.write('<title>403 Forbidden</title>\n');
- res.write('<h1>Forbidden</h1>');
- res.write(
- '<p>You do not have permission to access ' +
- escapeHtml(path) + ' on this server.</p>'
- );
- res.end();
- util.puts('403 Forbidden: ' + path);
-};
-
-StaticServlet.prototype.sendRedirect_ = function(req, res, redirectUrl) {
- res.writeHead(301, {
- 'Content-Type': 'text/html',
- 'Location': redirectUrl
- });
- res.write('<!doctype html>\n');
- res.write('<title>301 Moved Permanently</title>\n');
- res.write('<h1>Moved Permanently</h1>');
- res.write(
- '<p>The document has moved <a href="' +
- redirectUrl +
- '">here</a>.</p>'
- );
- res.end();
- util.puts('301 Moved Permanently: ' + redirectUrl);
-};
-
-StaticServlet.prototype.getDirList_ = function(req, res, path) {
- res.writeHead(200, {
- 'Content-Type': 'json'
- });
-
- // Grab the passed path value
- var pathQuery = url.parse(req.url, true).query.path
- // Using the supplied path, grab directory information
- var dirList = fs.readdirSync(pathQuery);
-
- // Filter out any hidden files or current/previous directory references
- dirList = dirList.filter(function(item, index, array) {
- return (item[0] !== ".");
- });
-
- // Generate the full path names for all the items found when 'ls'-ing
- // the passed directory.
- dirList = dirList.map(function(item, index, array) {
- var temp = item;
-
- // Make sure the path is joined properly. Sometimes there will be a trailing
- // '/' in the path and sometimes there won't. Don't want to end up with '//'.
- if (pathQuery[pathQuery.length - 1] === "/") {
- temp = pathQuery + item;
- } else {
- temp = pathQuery + "/" + item;
- }
-
- // We want the directories that are found to have a trailing '/'. Let's make sure
- // that we do that!
- var ret = temp;
- if (fs.existsSync(temp + "/")) {
- ret = temp + "/";
- }
-
- return ret;
- });
-
- // Sort all the results alphabetically ignoring case.
- dirList = dirList.sort(function(a, b) {
- if (a.toLowerCase() < b.toLowerCase()) return -1;
- if (a.toLowerCase() > b.toLowerCase()) return 1;
- return 0;
- });
-
- res.write(JSON.stringify(dirList));
- res.end();
-}
-
-StaticServlet.prototype.sendFile_ = function(req, res, path) {
- var self = this;
- var file = fs.createReadStream(path);
- res.writeHead(200, {
- 'Content-Type': StaticServlet.
- MimeMap[path.split('.').pop()] || 'text/plain'
- });
- if (req.method === 'HEAD') {
- res.end();
- } else {
- file.on('data', res.write.bind(res));
- file.on('close', function() {
- res.end();
- });
- file.on('error', function(error) {
- self.sendError_(req, res, error);
- });
- }
-};
-
-StaticServlet.prototype.sendDirectory_ = function(req, res, path) {
- var self = this;
- if (path.match(/[^\/]$/)) {
- req.url.pathname += '/';
- var redirectUrl = url.format(url.parse(url.format(req.url)));
- return self.sendRedirect_(req, res, redirectUrl);
- }
- fs.readdir(path, function(err, files) {
- if (err)
- return self.sendError_(req, res, error);
-
- if (!files.length)
- return self.writeDirectoryIndex_(req, res, path, []);
-
- var remaining = files.length;
- files.forEach(function(fileName, index) {
- fs.stat(path + '/' + fileName, function(err, stat) {
- if (err)
- return self.sendError_(req, res, err);
- if (stat.isDirectory()) {
- files[index] = fileName + '/';
- }
- if (!(--remaining))
- return self.writeDirectoryIndex_(req, res, path, files);
- });
- });
- });
-};
-
-StaticServlet.prototype.writeDirectoryIndex_ = function(req, res, path, files) {
- path = path.substring(1);
- res.writeHead(200, {
- 'Content-Type': 'text/html'
- });
- if (req.method === 'HEAD') {
- res.end();
- return;
- }
- res.write('<!doctype html>\n');
- res.write('<title>' + escapeHtml(path) + '</title>\n');
- res.write('<style>\n');
- res.write(' ol { list-style-type: none; font-size: 1.2em; }\n');
- res.write('</style>\n');
- res.write('<h1>Directory: ' + escapeHtml(path) + '</h1>');
- res.write('<ol>');
- files.forEach(function(fileName) {
- if (fileName.charAt(0) !== '.') {
- res.write('<li><a href="' +
- escapeHtml(fileName) + '">' +
- escapeHtml(fileName) + '</a></li>');
- }
- });
- res.write('</ol>');
- res.end();
-};
-
-// Must be last,
-main(process.argv);
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/.jshintrc
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/test/.jshintrc b/ocw-ui/frontend/test/.jshintrc
new file mode 100644
index 0000000..b1be025
--- /dev/null
+++ b/ocw-ui/frontend/test/.jshintrc
@@ -0,0 +1,36 @@
+{
+ "node": true,
+ "browser": true,
+ "esnext": true,
+ "bitwise": true,
+ "camelcase": true,
+ "curly": true,
+ "eqeqeq": true,
+ "immed": true,
+ "indent": 2,
+ "latedef": true,
+ "newcap": true,
+ "noarg": true,
+ "quotmark": "single",
+ "regexp": true,
+ "undef": true,
+ "unused": true,
+ "strict": true,
+ "trailing": true,
+ "smarttabs": true,
+ "globals": {
+ "after": false,
+ "afterEach": false,
+ "angular": false,
+ "before": false,
+ "beforeEach": false,
+ "browser": false,
+ "describe": false,
+ "expect": false,
+ "inject": false,
+ "it": false,
+ "jasmine": false,
+ "spyOn": false
+ }
+}
+
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/e2e/runner.html
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/test/e2e/runner.html b/ocw-ui/frontend/test/e2e/runner.html
deleted file mode 100755
index 73c7733..0000000
--- a/ocw-ui/frontend/test/e2e/runner.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-<!doctype html>
-<html lang="en">
- <head>
- <title>End2end Test Runner</title>
- <script src="../lib/angular/angular-scenario.js" ng-autotest></script>
- <script src="scenarios.js"></script>
- </head>
- <body>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/e2e/scenarios.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/test/e2e/scenarios.js b/ocw-ui/frontend/test/e2e/scenarios.js
deleted file mode 100755
index c7c0e6c..0000000
--- a/ocw-ui/frontend/test/e2e/scenarios.js
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
-**/
-'use strict';
-
-/* http://docs.angularjs.org/guide/dev_guide.e2e-testing */
-
-describe('my app', function() {
-
- beforeEach(function() {
- browser().navigateTo('../../app/index.html');
- });
-
-
- it('should automatically redirect to /view1 when location hash/fragment is empty', function() {
- expect(browser().location().url()).toBe("/view1");
- });
-
-
- describe('view1', function() {
-
- beforeEach(function() {
- browser().navigateTo('#/view1');
- });
-
-
- it('should render view1 when user navigates to /view1', function() {
- expect(element('[ng-view] p:first').text()).
- toMatch(/partial for view 1/);
- });
-
- });
-
-
- describe('view2', function() {
-
- beforeEach(function() {
- browser().navigateTo('#/view2');
- });
-
-
- it('should render view2 when user navigates to /view2', function() {
- expect(element('[ng-view] p:first').text()).
- toMatch(/partial for view 2/);
- });
-
- });
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/karma.conf.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/test/karma.conf.js b/ocw-ui/frontend/test/karma.conf.js
new file mode 100644
index 0000000..744d927
--- /dev/null
+++ b/ocw-ui/frontend/test/karma.conf.js
@@ -0,0 +1,86 @@
+// Karma configuration
+// http://karma-runner.github.io/0.12/config/configuration-file.html
+// Generated on 2014-07-15 using
+// generator-karma 0.8.3
+
+module.exports = function(config) {
+ 'use strict';
+
+ config.set({
+ // enable / disable watching file and executing tests whenever any file changes
+ autoWatch: true,
+
+ // base path, that will be used to resolve files and exclude
+ basePath: '../',
+
+ // testing framework to use (jasmine/mocha/qunit/...)
+ frameworks: ['jasmine'],
+
+ // list of files / patterns to load in the browser
+ files: [
+ 'bower_components/angular/angular.js',
+ 'bower_components/angular-mocks/angular-mocks.js',
+ 'bower_components/angular-animate/angular-animate.js',
+ 'bower_components/angular-cookies/angular-cookies.js',
+ 'bower_components/angular-resource/angular-resource.js',
+ 'bower_components/angular-route/angular-route.js',
+ 'bower_components/angular-animate/angular-animate.js',
+ 'bower_components/angular-bootstrap/ui-bootstrap.js',
+ // For some reason this causes the tests to completely fail to run
+ // if it is uncommented.
+ //'bower_components/angular-scenario/angular-scenario.js',
+ 'bower_components/angular-ui-date/src/date.js',
+ 'bower_components/angular-ui-router/release/angular-ui-router.js',
+ 'bower_components/chap-links-timeline/timeline.js',
+ 'bower_components/jquery/dist/jquery.js',
+ 'bower_components/jquery-ui/jquery-ui.js',
+ 'bower_components/leaflet/dist/leaflet.js',
+ 'app/scripts/**/*.js',
+ 'test/mock/**/*.js',
+ 'test/spec/**/*.js'
+ ],
+
+ // list of files / patterns to exclude
+ exclude: [],
+
+ // web server port
+ port: 8080,
+
+ // Start these browsers, currently available:
+ // - Chrome
+ // - ChromeCanary
+ // - Firefox
+ // - Opera
+ // - Safari (only Mac)
+ // - PhantomJS
+ // - IE (only Windows)
+ browsers: [
+ 'PhantomJS',
+ //'Chrome'
+ ],
+
+ // Which plugins to enable
+ plugins: [
+ 'karma-phantomjs-launcher',
+ 'karma-chrome-launcher',
+ 'karma-jasmine'
+ ],
+
+ // Continuous Integration mode
+ // if true, it capture browsers, run tests and exit
+ singleRun: false,
+
+ colors: true,
+
+ // level of logging
+ // possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG
+ logLevel: config.LOG_INFO,
+
+ // Uncomment the following lines if you are using grunt's server to run the tests
+ // proxies: {
+ // '/': 'http://localhost:9000/'
+ // },
+ // URL root prevent conflicts with the site root
+ // urlRoot: '_karma_'
+ });
+};
[21/28] CLIMATE-512 - Replace frontend with new Yeoman/Grunt/Bower
frontend
Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/font/fontawesome-webfont.svg
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/font/fontawesome-webfont.svg b/ocw-ui/frontend/app/font/fontawesome-webfont.svg
deleted file mode 100755
index 2edb4ec..0000000
--- a/ocw-ui/frontend/app/font/fontawesome-webfont.svg
+++ /dev/null
@@ -1,399 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
-<svg xmlns="http://www.w3.org/2000/svg">
-<metadata></metadata>
-<defs>
-<font id="fontawesomeregular" horiz-adv-x="1536" >
-<font-face units-per-em="1792" ascent="1536" descent="-256" />
-<missing-glyph horiz-adv-x="448" />
-<glyph unicode=" " horiz-adv-x="448" />
-<glyph unicode="	" horiz-adv-x="448" />
-<glyph unicode=" " horiz-adv-x="448" />
-<glyph unicode="¨" horiz-adv-x="1792" />
-<glyph unicode="©" horiz-adv-x="1792" />
-<glyph unicode="®" horiz-adv-x="1792" />
-<glyph unicode="´" horiz-adv-x="1792" />
-<glyph unicode="Æ" horiz-adv-x="1792" />
-<glyph unicode=" " horiz-adv-x="768" />
-<glyph unicode=" " />
-<glyph unicode=" " horiz-adv-x="768" />
-<glyph unicode=" " />
-<glyph unicode=" " horiz-adv-x="512" />
-<glyph unicode=" " horiz-adv-x="384" />
-<glyph unicode=" " horiz-adv-x="256" />
-<glyph unicode=" " horiz-adv-x="256" />
-<glyph unicode=" " horiz-adv-x="192" />
-<glyph unicode=" " horiz-adv-x="307" />
-<glyph unicode=" " horiz-adv-x="85" />
-<glyph unicode=" " horiz-adv-x="307" />
-<glyph unicode=" " horiz-adv-x="384" />
-<glyph unicode="™" horiz-adv-x="1792" />
-<glyph unicode="∞" horiz-adv-x="1792" />
-<glyph unicode="≠" horiz-adv-x="1792" />
-<glyph unicode="" horiz-adv-x="500" d="M0 0z" />
-<glyph unicode="" horiz-adv-x="1792" d="M1699 1350q0 -35 -43 -78l-632 -632v-768h320q26 0 45 -19t19 -45t-19 -45t-45 -19h-896q-26 0 -45 19t-19 45t19 45t45 19h320v768l-632 632q-43 43 -43 78q0 23 18 36.5t38 17.5t43 4h1408q23 0 43 -4t38 -17.5t18 -36.5z" />
-<glyph unicode="" d="M1536 1312v-1120q0 -50 -34 -89t-86 -60.5t-103.5 -32t-96.5 -10.5t-96.5 10.5t-103.5 32t-86 60.5t-34 89t34 89t86 60.5t103.5 32t96.5 10.5q105 0 192 -39v537l-768 -237v-709q0 -50 -34 -89t-86 -60.5t-103.5 -32t-96.5 -10.5t-96.5 10.5t-103.5 32t-86 60.5t-34 89 t34 89t86 60.5t103.5 32t96.5 10.5q105 0 192 -39v967q0 31 19 56.5t49 35.5l832 256q12 4 28 4q40 0 68 -28t28 -68z" />
-<glyph unicode="" horiz-adv-x="1664" d="M1152 704q0 185 -131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5zM1664 -128q0 -52 -38 -90t-90 -38q-54 0 -90 38l-343 342q-179 -124 -399 -124q-143 0 -273.5 55.5t-225 150t-150 225t-55.5 273.5 t55.5 273.5t150 225t225 150t273.5 55.5t273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -220 -124 -399l343 -343q37 -37 37 -90z" />
-<glyph unicode="" horiz-adv-x="1792" d="M1664 32v768q-32 -36 -69 -66q-268 -206 -426 -338q-51 -43 -83 -67t-86.5 -48.5t-102.5 -24.5h-1h-1q-48 0 -102.5 24.5t-86.5 48.5t-83 67q-158 132 -426 338q-37 30 -69 66v-768q0 -13 9.5 -22.5t22.5 -9.5h1472q13 0 22.5 9.5t9.5 22.5zM1664 1083v11v13.5t-0.5 13 t-3 12.5t-5.5 9t-9 7.5t-14 2.5h-1472q-13 0 -22.5 -9.5t-9.5 -22.5q0 -168 147 -284q193 -152 401 -317q6 -5 35 -29.5t46 -37.5t44.5 -31.5t50.5 -27.5t43 -9h1h1q20 0 43 9t50.5 27.5t44.5 31.5t46 37.5t35 29.5q208 165 401 317q54 43 100.5 115.5t46.5 131.5z M1792 1120v-1088q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1472q66 0 113 -47t47 -113z" />
-<glyph unicode="" horiz-adv-x="1792" d="M896 -128q-26 0 -44 18l-624 602q-10 8 -27.5 26t-55.5 65.5t-68 97.5t-53.5 121t-23.5 138q0 220 127 344t351 124q62 0 126.5 -21.5t120 -58t95.5 -68.5t76 -68q36 36 76 68t95.5 68.5t120 58t126.5 21.5q224 0 351 -124t127 -344q0 -221 -229 -450l-623 -600 q-18 -18 -44 -18z" />
-<glyph unicode="" horiz-adv-x="1664" d="M1664 889q0 -22 -26 -48l-363 -354l86 -500q1 -7 1 -20q0 -21 -10.5 -35.5t-30.5 -14.5q-19 0 -40 12l-449 236l-449 -236q-22 -12 -40 -12q-21 0 -31.5 14.5t-10.5 35.5q0 6 2 20l86 500l-364 354q-25 27 -25 48q0 37 56 46l502 73l225 455q19 41 49 41t49 -41l225 -455 l502 -73q56 -9 56 -46z" />
-<glyph unicode="" horiz-adv-x="1664" d="M1137 532l306 297l-422 62l-189 382l-189 -382l-422 -62l306 -297l-73 -421l378 199l377 -199zM1664 889q0 -22 -26 -48l-363 -354l86 -500q1 -7 1 -20q0 -50 -41 -50q-19 0 -40 12l-449 236l-449 -236q-22 -12 -40 -12q-21 0 -31.5 14.5t-10.5 35.5q0 6 2 20l86 500 l-364 354q-25 27 -25 48q0 37 56 46l502 73l225 455q19 41 49 41t49 -41l225 -455l502 -73q56 -9 56 -46z" />
-<glyph unicode="" horiz-adv-x="1408" d="M1408 131q0 -120 -73 -189.5t-194 -69.5h-874q-121 0 -194 69.5t-73 189.5q0 53 3.5 103.5t14 109t26.5 108.5t43 97.5t62 81t85.5 53.5t111.5 20q9 0 42 -21.5t74.5 -48t108 -48t133.5 -21.5t133.5 21.5t108 48t74.5 48t42 21.5q61 0 111.5 -20t85.5 -53.5t62 -81 t43 -97.5t26.5 -108.5t14 -109t3.5 -103.5zM1088 1024q0 -159 -112.5 -271.5t-271.5 -112.5t-271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5t271.5 -112.5t112.5 -271.5z" />
-<glyph unicode="" horiz-adv-x="1920" d="M384 -64v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM384 320v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM384 704v128q0 26 -19 45t-45 19h-128 q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1408 -64v512q0 26 -19 45t-45 19h-768q-26 0 -45 -19t-19 -45v-512q0 -26 19 -45t45 -19h768q26 0 45 19t19 45zM384 1088v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45 t45 -19h128q26 0 45 19t19 45zM1792 -64v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1408 704v512q0 26 -19 45t-45 19h-768q-26 0 -45 -19t-19 -45v-512q0 -26 19 -45t45 -19h768q26 0 45 19t19 45zM1792 320v128 q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1792 704v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t1
9 45zM1792 1088v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19 t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1920 1248v-1344q0 -66 -47 -113t-113 -47h-1600q-66 0 -113 47t-47 113v1344q0 66 47 113t113 47h1600q66 0 113 -47t47 -113z" />
-<glyph unicode="" horiz-adv-x="1664" d="M768 512v-384q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90zM768 1280v-384q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90zM1664 512v-384q0 -52 -38 -90t-90 -38 h-512q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90zM1664 1280v-384q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90z" />
-<glyph unicode="" horiz-adv-x="1792" d="M512 288v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM512 800v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1152 288v-192q0 -40 -28 -68t-68 -28h-320 q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM512 1312v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1152 800v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28 h320q40 0 68 -28t28 -68zM1792 288v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1152 1312v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1792 800v-192 q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1792 1312v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28
t28 -68z" />
-<glyph unicode="" horiz-adv-x="1792" d="M512 288v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM512 800v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1792 288v-192q0 -40 -28 -68t-68 -28h-960 q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h960q40 0 68 -28t28 -68zM512 1312v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1792 800v-192q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v192q0 40 28 68t68 28 h960q40 0 68 -28t28 -68zM1792 1312v-192q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h960q40 0 68 -28t28 -68z" />
-<glyph unicode="" horiz-adv-x="1792" d="M1671 970q0 -40 -28 -68l-724 -724l-136 -136q-28 -28 -68 -28t-68 28l-136 136l-362 362q-28 28 -28 68t28 68l136 136q28 28 68 28t68 -28l294 -295l656 657q28 28 68 28t68 -28l136 -136q28 -28 28 -68z" />
-<glyph unicode="" horiz-adv-x="1408" d="M1298 214q0 -40 -28 -68l-136 -136q-28 -28 -68 -28t-68 28l-294 294l-294 -294q-28 -28 -68 -28t-68 28l-136 136q-28 28 -28 68t28 68l294 294l-294 294q-28 28 -28 68t28 68l136 136q28 28 68 28t68 -28l294 -294l294 294q28 28 68 28t68 -28l136 -136q28 -28 28 -68 t-28 -68l-294 -294l294 -294q28 -28 28 -68z" />
-<glyph unicode="" horiz-adv-x="1664" d="M1024 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-224v-224q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v224h-224q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h224v224q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5v-224h224 q13 0 22.5 -9.5t9.5 -22.5zM1152 704q0 185 -131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5zM1664 -128q0 -53 -37.5 -90.5t-90.5 -37.5q-54 0 -90 38l-343 342q-179 -124 -399 -124q-143 0 -273.5 55.5 t-225 150t-150 225t-55.5 273.5t55.5 273.5t150 225t225 150t273.5 55.5t273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -220 -124 -399l343 -343q37 -37 37 -90z" />
-<glyph unicode="" horiz-adv-x="1664" d="M1024 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-576q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h576q13 0 22.5 -9.5t9.5 -22.5zM1152 704q0 185 -131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5z M1664 -128q0 -53 -37.5 -90.5t-90.5 -37.5q-54 0 -90 38l-343 342q-179 -124 -399 -124q-143 0 -273.5 55.5t-225 150t-150 225t-55.5 273.5t55.5 273.5t150 225t225 150t273.5 55.5t273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -220 -124 -399l343 -343q37 -37 37 -90z " />
-<glyph unicode="" d="M1536 640q0 -156 -61 -298t-164 -245t-245 -164t-298 -61t-298 61t-245 164t-164 245t-61 298q0 182 80.5 343t226.5 270q43 32 95.5 25t83.5 -50q32 -42 24.5 -94.5t-49.5 -84.5q-98 -74 -151.5 -181t-53.5 -228q0 -104 40.5 -198.5t109.5 -163.5t163.5 -109.5 t198.5 -40.5t198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5q0 121 -53.5 228t-151.5 181q-42 32 -49.5 84.5t24.5 94.5q31 43 84 50t95 -25q146 -109 226.5 -270t80.5 -343zM896 1408v-640q0 -52 -38 -90t-90 -38t-90 38t-38 90v640q0 52 38 90t90 38t90 -38t38 -90z" />
-<glyph unicode="" horiz-adv-x="1792" d="M256 96v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM640 224v-320q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v320q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1024 480v-576q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23 v576q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1408 864v-960q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v960q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1792 1376v-1472q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v1472q0 14 9 23t23 9h192q14 0 23 -9t9 -23z" />
-<glyph unicode="" d="M1024 640q0 106 -75 181t-181 75t-181 -75t-75 -181t75 -181t181 -75t181 75t75 181zM1536 749v-222q0 -12 -8 -23t-20 -13l-185 -28q-19 -54 -39 -91q35 -50 107 -138q10 -12 10 -25t-9 -23q-27 -37 -99 -108t-94 -71q-12 0 -26 9l-138 108q-44 -23 -91 -38 q-16 -136 -29 -186q-7 -28 -36 -28h-222q-14 0 -24.5 8.5t-11.5 21.5l-28 184q-49 16 -90 37l-141 -107q-10 -9 -25 -9q-14 0 -25 11q-126 114 -165 168q-7 10 -7 23q0 12 8 23q15 21 51 66.5t54 70.5q-27 50 -41 99l-183 27q-13 2 -21 12.5t-8 23.5v222q0 12 8 23t19 13 l186 28q14 46 39 92q-40 57 -107 138q-10 12 -10 24q0 10 9 23q26 36 98.5 107.5t94.5 71.5q13 0 26 -10l138 -107q44 23 91 38q16 136 29 186q7 28 36 28h222q14 0 24.5 -8.5t11.5 -21.5l28 -184q49 -16 90 -37l142 107q9 9 24 9q13 0 25 -10q129 -119 165 -170q7 -8 7 -22 q0 -12 -8 -23q-15 -21 -51 -66.5t-54 -70.5q26 -50 41 -98l183 -28q13 -2 21 -12.5t8 -23.5z" />
-<glyph unicode="" horiz-adv-x="1408" d="M512 800v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM768 800v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1024 800v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576 q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1152 76v948h-896v-948q0 -22 7 -40.5t14.5 -27t10.5 -8.5h832q3 0 10.5 8.5t14.5 27t7 40.5zM480 1152h448l-48 117q-7 9 -17 11h-317q-10 -2 -17 -11zM1408 1120v-64q0 -14 -9 -23t-23 -9h-96v-948q0 -83 -47 -143.5t-113 -60.5h-832 q-66 0 -113 58.5t-47 141.5v952h-96q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h309l70 167q15 37 54 63t79 26h320q40 0 79 -26t54 -63l70 -167h309q14 0 23 -9t9 -23z" />
-<glyph unicode="" horiz-adv-x="1664" d="M1408 544v-480q0 -26 -19 -45t-45 -19h-384v384h-256v-384h-384q-26 0 -45 19t-19 45v480q0 1 0.5 3t0.5 3l575 474l575 -474q1 -2 1 -6zM1631 613l-62 -74q-8 -9 -21 -11h-3q-13 0 -21 7l-692 577l-692 -577q-12 -8 -24 -7q-13 2 -21 11l-62 74q-8 10 -7 23.5t11 21.5 l719 599q32 26 76 26t76 -26l244 -204v195q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-408l219 -182q10 -8 11 -21.5t-7 -23.5z" />
-<glyph unicode="" horiz-adv-x="1280" d="M128 0h1024v768h-416q-40 0 -68 28t-28 68v416h-512v-1280zM768 896h376q-10 29 -22 41l-313 313q-12 12 -41 22v-376zM1280 864v-896q0 -40 -28 -68t-68 -28h-1088q-40 0 -68 28t-28 68v1344q0 40 28 68t68 28h640q40 0 88 -20t76 -48l312 -312q28 -28 48 -76t20 -88z " />
-<glyph unicode="" d="M896 992v-448q0 -14 -9 -23t-23 -9h-320q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h224v352q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
-<glyph unicode="" horiz-adv-x="1920" d="M1111 540v4l-24 320q-1 13 -11 22.5t-23 9.5h-186q-13 0 -23 -9.5t-11 -22.5l-24 -320v-4q-1 -12 8 -20t21 -8h244q12 0 21 8t8 20zM1870 73q0 -73 -46 -73h-704q13 0 22 9.5t8 22.5l-20 256q-1 13 -11 22.5t-23 9.5h-272q-13 0 -23 -9.5t-11 -22.5l-20 -256 q-1 -13 8 -22.5t22 -9.5h-704q-46 0 -46 73q0 54 26 116l417 1044q8 19 26 33t38 14h339q-13 0 -23 -9.5t-11 -22.5l-15 -192q-1 -14 8 -23t22 -9h166q13 0 22 9t8 23l-15 192q-1 13 -11 22.5t-23 9.5h339q20 0 38 -14t26 -33l417 -1044q26 -62 26 -116z" />
-<glyph unicode="" horiz-adv-x="1664" d="M1280 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1536 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1664 416v-320q0 -40 -28 -68t-68 -28h-1472q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h465l135 -136 q58 -56 136 -56t136 56l136 136h464q40 0 68 -28t28 -68zM1339 985q17 -41 -14 -70l-448 -448q-18 -19 -45 -19t-45 19l-448 448q-31 29 -14 70q17 39 59 39h256v448q0 26 19 45t45 19h256q26 0 45 -19t19 -45v-448h256q42 0 59 -39z" />
-<glyph unicode="" d="M1120 608q0 -12 -10 -24l-319 -319q-11 -9 -23 -9t-23 9l-320 320q-15 16 -7 35q8 20 30 20h192v352q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-352h192q14 0 23 -9t9 -23zM768 1184q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273 t-73 273t-198 198t-273 73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
-<glyph unicode="" d="M1118 660q-8 -20 -30 -20h-192v-352q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v352h-192q-14 0 -23 9t-9 23q0 12 10 24l319 319q11 9 23 9t23 -9l320 -320q15 -16 7 -35zM768 1184q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198 t73 273t-73 273t-198 198t-273 73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
-<glyph unicode="" d="M1023 576h316q-1 3 -2.5 8t-2.5 8l-212 496h-708l-212 -496q-1 -2 -2.5 -8t-2.5 -8h316l95 -192h320zM1536 546v-482q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v482q0 62 25 123l238 552q10 25 36.5 42t52.5 17h832q26 0 52.5 -17t36.5 -42l238 -552 q25 -61 25 -123z" />
-<glyph unicode="" d="M1184 640q0 -37 -32 -55l-544 -320q-15 -9 -32 -9q-16 0 -32 8q-32 19 -32 56v640q0 37 32 56q33 18 64 -1l544 -320q32 -18 32 -55zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
-<glyph unicode="" d="M1536 1280v-448q0 -26 -19 -45t-45 -19h-448q-42 0 -59 40q-17 39 14 69l138 138q-148 137 -349 137q-104 0 -198.5 -40.5t-163.5 -109.5t-109.5 -163.5t-40.5 -198.5t40.5 -198.5t109.5 -163.5t163.5 -109.5t198.5 -40.5q119 0 225 52t179 147q7 10 23 12q14 0 25 -9 l137 -138q9 -8 9.5 -20.5t-7.5 -22.5q-109 -132 -264 -204.5t-327 -72.5q-156 0 -298 61t-245 164t-164 245t-61 298t61 298t164 245t245 164t298 61q147 0 284.5 -55.5t244.5 -156.5l130 129q29 31 70 14q39 -17 39 -59z" />
-<glyph unicode="" d="M1511 480q0 -5 -1 -7q-64 -268 -268 -434.5t-478 -166.5q-146 0 -282.5 55t-243.5 157l-129 -129q-19 -19 -45 -19t-45 19t-19 45v448q0 26 19 45t45 19h448q26 0 45 -19t19 -45t-19 -45l-137 -137q71 -66 161 -102t187 -36q134 0 250 65t186 179q11 17 53 117 q8 23 30 23h192q13 0 22.5 -9.5t9.5 -22.5zM1536 1280v-448q0 -26 -19 -45t-45 -19h-448q-26 0 -45 19t-19 45t19 45l138 138q-148 137 -349 137q-134 0 -250 -65t-186 -179q-11 -17 -53 -117q-8 -23 -30 -23h-199q-13 0 -22.5 9.5t-9.5 22.5v7q65 268 270 434.5t480 166.5 q146 0 284 -55.5t245 -156.5l130 129q19 19 45 19t45 -19t19 -45z" />
-<glyph unicode="" horiz-adv-x="1792" d="M384 352v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 608v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M384 864v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1536 352v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h960q13 0 22.5 -9.5t9.5 -22.5z M1536 608v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h960q13 0 22.5 -9.5t9.5 -22.5zM1536 864v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h960q13 0 22.5 -9.5 t9.5 -22.5zM1664 160v832q0 13 -9.5 22.5t-22.5 9.5h-1472q-13 0 -22.5 -9.5t-9.5 -22.5v-832q0 -13 9.5 -22.5t22.5 -9.5h1472q13 0 22.5 9.5t9.5 22.5zM1792 1248v-1088q0 -66 -47 -113t-113 -47h-1472q-66 0 -1
13 47t-47 113v1088q0 66 47 113t113 47h1472q66 0 113 -47 t47 -113z" />
-<glyph unicode="" horiz-adv-x="1152" d="M320 768h512v192q0 106 -75 181t-181 75t-181 -75t-75 -181v-192zM1152 672v-576q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v576q0 40 28 68t68 28h32v192q0 184 132 316t316 132t316 -132t132 -316v-192h32q40 0 68 -28t28 -68z" />
-<glyph unicode="" horiz-adv-x="1792" d="M320 1280q0 -72 -64 -110v-1266q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v1266q-64 38 -64 110q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1792 1216v-763q0 -25 -12.5 -38.5t-39.5 -27.5q-215 -116 -369 -116q-61 0 -123.5 22t-108.5 48 t-115.5 48t-142.5 22q-192 0 -464 -146q-17 -9 -33 -9q-26 0 -45 19t-19 45v742q0 32 31 55q21 14 79 43q236 120 421 120q107 0 200 -29t219 -88q38 -19 88 -19q54 0 117.5 21t110 47t88 47t54.5 21q26 0 45 -19t19 -45z" />
-<glyph unicode="" horiz-adv-x="1664" d="M1664 650q0 -166 -60 -314l-20 -49l-185 -33q-22 -83 -90.5 -136.5t-156.5 -53.5v-32q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-32q71 0 130 -35.5t93 -95.5l68 12q29 95 29 193q0 148 -88 279t-236.5 209t-315.5 78 t-315.5 -78t-236.5 -209t-88 -279q0 -98 29 -193l68 -12q34 60 93 95.5t130 35.5v32q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v32q-88 0 -156.5 53.5t-90.5 136.5l-185 33l-20 49q-60 148 -60 314q0 151 67 291t179 242.5 t266 163.5t320 61t320 -61t266 -163.5t179 -242.5t67 -291z" />
-<glyph unicode="" horiz-adv-x="768" d="M768 1184v-1088q0 -26 -19 -45t-45 -19t-45 19l-333 333h-262q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h262l333 333q19 19 45 19t45 -19t19 -45z" />
-<glyph unicode="" horiz-adv-x="1152" d="M768 1184v-1088q0 -26 -19 -45t-45 -19t-45 19l-333 333h-262q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h262l333 333q19 19 45 19t45 -19t19 -45zM1152 640q0 -76 -42.5 -141.5t-112.5 -93.5q-10 -5 -25 -5q-26 0 -45 18.5t-19 45.5q0 21 12 35.5t29 25t34 23t29 35.5 t12 57t-12 57t-29 35.5t-34 23t-29 25t-12 35.5q0 27 19 45.5t45 18.5q15 0 25 -5q70 -27 112.5 -93t42.5 -142z" />
-<glyph unicode="" horiz-adv-x="1664" d="M768 1184v-1088q0 -26 -19 -45t-45 -19t-45 19l-333 333h-262q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h262l333 333q19 19 45 19t45 -19t19 -45zM1152 640q0 -76 -42.5 -141.5t-112.5 -93.5q-10 -5 -25 -5q-26 0 -45 18.5t-19 45.5q0 21 12 35.5t29 25t34 23t29 35.5 t12 57t-12 57t-29 35.5t-34 23t-29 25t-12 35.5q0 27 19 45.5t45 18.5q15 0 25 -5q70 -27 112.5 -93t42.5 -142zM1408 640q0 -153 -85 -282.5t-225 -188.5q-13 -5 -25 -5q-27 0 -46 19t-19 45q0 39 39 59q56 29 76 44q74 54 115.5 135.5t41.5 173.5t-41.5 173.5 t-115.5 135.5q-20 15 -76 44q-39 20 -39 59q0 26 19 45t45 19q13 0 26 -5q140 -59 225 -188.5t85 -282.5zM1664 640q0 -230 -127 -422.5t-338 -283.5q-13 -5 -26 -5q-26 0 -45 19t-19 45q0 36 39 59q7 4 22.5 10.5t22.5 10.5q46 25 82 51q123 91 192 227t69 289t-69 289 t-192 227q-36 26 -82 51q-7 4 -22.5 10.5t-22.5 10.5q-39 23 -39 59q0 26 19 45t45 19q13 0 26 -5q211 -91 338 -283.5t127 -422.5z" />
-<glyph unicode="" horiz-adv-x="1408" d="M384 384v-128h-128v128h128zM384 1152v-128h-128v128h128zM1152 1152v-128h-128v128h128zM128 129h384v383h-384v-383zM128 896h384v384h-384v-384zM896 896h384v384h-384v-384zM640 640v-640h-640v640h640zM1152 128v-128h-128v128h128zM1408 128v-128h-128v128h128z M1408 640v-384h-384v128h-128v-384h-128v640h384v-128h128v128h128zM640 1408v-640h-640v640h640zM1408 1408v-640h-640v640h640z" />
-<glyph unicode="" horiz-adv-x="1792" d="M63 0h-63v1408h63v-1408zM126 1h-32v1407h32v-1407zM220 1h-31v1407h31v-1407zM377 1h-31v1407h31v-1407zM534 1h-62v1407h62v-1407zM660 1h-31v1407h31v-1407zM723 1h-31v1407h31v-1407zM786 1h-31v1407h31v-1407zM943 1h-63v1407h63v-1407zM1100 1h-63v1407h63v-1407z M1226 1h-63v1407h63v-1407zM1352 1h-63v1407h63v-1407zM1446 1h-63v1407h63v-1407zM1635 1h-94v1407h94v-1407zM1698 1h-32v1407h32v-1407zM1792 0h-63v1408h63v-1408z" />
-<glyph unicode="" d="M448 1088q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1515 512q0 -53 -37 -90l-491 -492q-39 -37 -91 -37q-53 0 -90 37l-715 716q-38 37 -64.5 101t-26.5 117v416q0 52 38 90t90 38h416q53 0 117 -26.5t102 -64.5 l715 -714q37 -39 37 -91z" />
-<glyph unicode="" horiz-adv-x="1920" d="M448 1088q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1515 512q0 -53 -37 -90l-491 -492q-39 -37 -91 -37q-53 0 -90 37l-715 716q-38 37 -64.5 101t-26.5 117v416q0 52 38 90t90 38h416q53 0 117 -26.5t102 -64.5 l715 -714q37 -39 37 -91zM1899 512q0 -53 -37 -90l-491 -492q-39 -37 -91 -37q-36 0 -59 14t-53 45l470 470q37 37 37 90q0 52 -37 91l-715 714q-38 38 -102 64.5t-117 26.5h224q53 0 117 -26.5t102 -64.5l715 -714q37 -39 37 -91z" />
-<glyph unicode="" horiz-adv-x="1664" d="M1639 1058q40 -57 18 -129l-275 -906q-19 -64 -76.5 -107.5t-122.5 -43.5h-923q-77 0 -148.5 53.5t-99.5 131.5q-24 67 -2 127q0 4 3 27t4 37q1 8 -3 21.5t-3 19.5q2 11 8 21t16.5 23.5t16.5 23.5q23 38 45 91.5t30 91.5q3 10 0.5 30t-0.5 28q3 11 17 28t17 23 q21 36 42 92t25 90q1 9 -2.5 32t0.5 28q4 13 22 30.5t22 22.5q19 26 42.5 84.5t27.5 96.5q1 8 -3 25.5t-2 26.5q2 8 9 18t18 23t17 21q8 12 16.5 30.5t15 35t16 36t19.5 32t26.5 23.5t36 11.5t47.5 -5.5l-1 -3q38 9 51 9h761q74 0 114 -56t18 -130l-274 -906 q-36 -119 -71.5 -153.5t-128.5 -34.5h-869q-27 0 -38 -15q-11 -16 -1 -43q24 -70 144 -70h923q29 0 56 15.5t35 41.5l300 987q7 22 5 57q38 -15 59 -43zM575 1056q-4 -13 2 -22.5t20 -9.5h608q13 0 25.5 9.5t16.5 22.5l21 64q4 13 -2 22.5t-20 9.5h-608q-13 0 -25.5 -9.5 t-16.5 -22.5zM492 800q-4 -13 2 -22.5t20 -9.5h608q13 0 25.5 9.5t16.5 22.5l21 64q4 13 -2 22.5t-20 9.5h-608q-13 0 -25.5 -9.5t-16.5 -22.5z" />
-<glyph unicode="" horiz-adv-x="1280" d="M1164 1408q23 0 44 -9q33 -13 52.5 -41t19.5 -62v-1289q0 -34 -19.5 -62t-52.5 -41q-19 -8 -44 -8q-48 0 -83 32l-441 424l-441 -424q-36 -33 -83 -33q-23 0 -44 9q-33 13 -52.5 41t-19.5 62v1289q0 34 19.5 62t52.5 41q21 9 44 9h1048z" />
-<glyph unicode="" horiz-adv-x="1664" d="M384 0h896v256h-896v-256zM384 640h896v384h-160q-40 0 -68 28t-28 68v160h-640v-640zM1536 576q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1664 576v-416q0 -13 -9.5 -22.5t-22.5 -9.5h-224v-160q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68 v160h-224q-13 0 -22.5 9.5t-9.5 22.5v416q0 79 56.5 135.5t135.5 56.5h64v544q0 40 28 68t68 28h672q40 0 88 -20t76 -48l152 -152q28 -28 48 -76t20 -88v-256h64q79 0 135.5 -56.5t56.5 -135.5z" />
-<glyph unicode="" horiz-adv-x="1920" d="M960 864q119 0 203.5 -84.5t84.5 -203.5t-84.5 -203.5t-203.5 -84.5t-203.5 84.5t-84.5 203.5t84.5 203.5t203.5 84.5zM1664 1280q106 0 181 -75t75 -181v-896q0 -106 -75 -181t-181 -75h-1408q-106 0 -181 75t-75 181v896q0 106 75 181t181 75h224l51 136 q19 49 69.5 84.5t103.5 35.5h512q53 0 103.5 -35.5t69.5 -84.5l51 -136h224zM960 128q185 0 316.5 131.5t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5z" />
-<glyph unicode="" horiz-adv-x="1664" d="M725 977l-170 -450q73 -1 153.5 -2t119 -1.5t52.5 -0.5l29 2q-32 95 -92 241q-53 132 -92 211zM21 -128h-21l2 79q22 7 80 18q89 16 110 31q20 16 48 68l237 616l280 724h75h53l11 -21l205 -480q103 -242 124 -297q39 -102 96 -235q26 -58 65 -164q24 -67 65 -149 q22 -49 35 -57q22 -19 69 -23q47 -6 103 -27q6 -39 6 -57q0 -14 -1 -26q-80 0 -192 8q-93 8 -189 8q-79 0 -135 -2l-200 -11l-58 -2q0 45 4 78l131 28q56 13 68 23q12 12 12 27t-6 32l-47 114l-92 228l-450 2q-29 -65 -104 -274q-23 -64 -23 -84q0 -31 17 -43 q26 -21 103 -32q3 0 13.5 -2t30 -5t40.5 -6q1 -28 1 -58q0 -17 -2 -27q-66 0 -349 20l-48 -8q-81 -14 -167 -14z" />
-<glyph unicode="" horiz-adv-x="1408" d="M555 15q76 -32 140 -32q131 0 216 41t122 113q38 70 38 181q0 114 -41 180q-58 94 -141 126q-80 32 -247 32q-74 0 -101 -10v-144l-1 -173l3 -270q0 -15 12 -44zM541 761q43 -7 109 -7q175 0 264 65t89 224q0 112 -85 187q-84 75 -255 75q-52 0 -130 -13q0 -44 2 -77 q7 -122 6 -279l-1 -98q0 -43 1 -77zM0 -128l2 94q45 9 68 12q77 12 123 31q17 27 21 51q9 66 9 194l-2 497q-5 256 -9 404q-1 87 -11 109q-1 4 -12 12q-18 12 -69 15q-30 2 -114 13l-4 83l260 6l380 13l45 1q5 0 14 0.5t14 0.5q1 0 21.5 -0.5t40.5 -0.5h74q88 0 191 -27 q43 -13 96 -39q57 -29 102 -76q44 -47 65 -104t21 -122q0 -70 -32 -128t-95 -105q-26 -20 -150 -77q177 -41 267 -146q92 -106 92 -236q0 -76 -29 -161q-21 -62 -71 -117q-66 -72 -140 -108q-73 -36 -203 -60q-82 -15 -198 -11l-197 4q-84 2 -298 -11q-33 -3 -272 -11z" />
-<glyph unicode="" horiz-adv-x="1024" d="M0 -126l17 85q4 1 77 20q76 19 116 39q29 37 41 101l27 139l56 268l12 64q8 44 17 84.5t16 67t12.5 46.5t9 30.5t3.5 11.5l29 157l16 63l22 135l8 50v38q-41 22 -144 28q-28 2 -38 4l19 103l317 -14q39 -2 73 -2q66 0 214 9q33 2 68 4.5t36 2.5q-2 -19 -6 -38 q-7 -29 -13 -51q-55 -19 -109 -31q-64 -16 -101 -31q-12 -31 -24 -88q-9 -44 -13 -82q-44 -199 -66 -306l-61 -311l-38 -158l-43 -235l-12 -45q-2 -7 1 -27q64 -15 119 -21q36 -5 66 -10q-1 -29 -7 -58q-7 -31 -9 -41q-18 0 -23 -1q-24 -2 -42 -2q-9 0 -28 3q-19 4 -145 17 l-198 2q-41 1 -174 -11q-74 -7 -98 -9z" />
-<glyph unicode="" horiz-adv-x="1792" d="M81 1407l54 -27q20 -5 211 -5h130l19 3l115 1l215 -1h293l34 -2q14 -1 28 7t21 16l7 8l42 1q15 0 28 -1v-104.5t1 -131.5l1 -100l-1 -58q0 -32 -4 -51q-39 -15 -68 -18q-25 43 -54 128q-8 24 -15.5 62.5t-11.5 65.5t-6 29q-13 15 -27 19q-7 2 -42.5 2t-103.5 -1t-111 -1 q-34 0 -67 -5q-10 -97 -8 -136l1 -152v-332l3 -359l-1 -147q-1 -46 11 -85q49 -25 89 -32q2 0 18 -5t44 -13t43 -12q30 -8 50 -18q5 -45 5 -50q0 -10 -3 -29q-14 -1 -34 -1q-110 0 -187 10q-72 8 -238 8q-88 0 -233 -14q-48 -4 -70 -4q-2 22 -2 26l-1 26v9q21 33 79 49 q139 38 159 50q9 21 12 56q8 192 6 433l-5 428q-1 62 -0.5 118.5t0.5 102.5t-2 57t-6 15q-6 5 -14 6q-38 6 -148 6q-43 0 -100 -13.5t-73 -24.5q-13 -9 -22 -33t-22 -75t-24 -84q-6 -19 -19.5 -32t-20.5 -13q-44 27 -56 44v297v86zM1744 128q33 0 42 -18.5t-11 -44.5 l-126 -162q-20 -26 -49 -26t-49 26l-126 162q-20 26 -11 44.5t42 18.5h80v1024h-80q-33 0 -42 18.5t11 44.5l126 162q20 26 49 26t49 -26l126 -162q20 -26 11 -44.5t-42 -18.5h-80v-1024h80z" />
-<glyph unicode="" d="M81 1407l54 -27q20 -5 211 -5h130l19 3l115 1l446 -1h318l34 -2q14 -1 28 7t21 16l7 8l42 1q15 0 28 -1v-104.5t1 -131.5l1 -100l-1 -58q0 -32 -4 -51q-39 -15 -68 -18q-25 43 -54 128q-8 24 -15.5 62.5t-11.5 65.5t-6 29q-13 15 -27 19q-7 2 -58.5 2t-138.5 -1t-128 -1 q-94 0 -127 -5q-10 -97 -8 -136l1 -152v52l3 -359l-1 -147q-1 -46 11 -85q49 -25 89 -32q2 0 18 -5t44 -13t43 -12q30 -8 50 -18q5 -45 5 -50q0 -10 -3 -29q-14 -1 -34 -1q-110 0 -187 10q-72 8 -238 8q-82 0 -233 -13q-45 -5 -70 -5q-2 22 -2 26l-1 26v9q21 33 79 49 q139 38 159 50q9 21 12 56q6 137 6 433l-5 44q0 265 -2 278q-2 11 -6 15q-6 5 -14 6q-38 6 -148 6q-50 0 -168.5 -14t-132.5 -24q-13 -9 -22 -33t-22 -75t-24 -84q-6 -19 -19.5 -32t-20.5 -13q-44 27 -56 44v297v86zM1505 113q26 -20 26 -49t-26 -49l-162 -126 q-26 -20 -44.5 -11t-18.5 42v80h-1024v-80q0 -33 -18.5 -42t-44.5 11l-162 126q-26 20 -26 49t26 49l162 126q26 20 44.5 11t18.5 -42v-80h1024v80q0 33 18.5 42t44.5 -11z" />
-<glyph unicode="" horiz-adv-x="1792" d="M1792 192v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1408 576v-128q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1280q26 0 45 -19t19 -45zM1664 960v-128q0 -26 -19 -45 t-45 -19h-1536q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1536q26 0 45 -19t19 -45zM1280 1344v-128q0 -26 -19 -45t-45 -19h-1152q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1152q26 0 45 -19t19 -45z" />
-<glyph unicode="" horiz-adv-x="1792" d="M1792 192v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1408 576v-128q0 -26 -19 -45t-45 -19h-896q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h896q26 0 45 -19t19 -45zM1664 960v-128q0 -26 -19 -45t-45 -19 h-1408q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1408q26 0 45 -19t19 -45zM1280 1344v-128q0 -26 -19 -45t-45 -19h-640q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h640q26 0 45 -19t19 -45z" />
-<glyph unicode="" horiz-adv-x="1792" d="M1792 192v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 576v-128q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1280q26 0 45 -19t19 -45zM1792 960v-128q0 -26 -19 -45 t-45 -19h-1536q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1536q26 0 45 -19t19 -45zM1792 1344v-128q0 -26 -19 -45t-45 -19h-1152q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1152q26 0 45 -19t19 -45z" />
-<glyph unicode="" horiz-adv-x="1792" d="M1792 192v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 576v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 960v-128q0 -26 -19 -45 t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 1344v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45z" />
-<glyph unicode="" horiz-adv-x="1792" d="M256 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5t9.5 -22.5zM256 608v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5 t9.5 -22.5zM256 992v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5t9.5 -22.5zM1792 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1344 q13 0 22.5 -9.5t9.5 -22.5zM256 1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5t9.5 -22.5zM1792 608v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5 t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5zM1792 992v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5zM1792 1376v-192q0 -13 -9.5 -22.5t
-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v192 q0 13 9.5 22.5t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5z" />
-<glyph unicode="" horiz-adv-x="1792" d="M384 992v-576q0 -13 -9.5 -22.5t-22.5 -9.5q-14 0 -23 9l-288 288q-9 9 -9 23t9 23l288 288q9 9 23 9q13 0 22.5 -9.5t9.5 -22.5zM1792 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5 t9.5 -22.5zM1792 608v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1088q13 0 22.5 -9.5t9.5 -22.5zM1792 992v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1088 q13 0 22.5 -9.5t9.5 -22.5zM1792 1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5t9.5 -22.5z" />
-<glyph unicode="" horiz-adv-x="1792" d="M352 704q0 -14 -9 -23l-288 -288q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5v576q0 13 9.5 22.5t22.5 9.5q14 0 23 -9l288 -288q9 -9 9 -23zM1792 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5 t9.5 -22.5zM1792 608v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1088q13 0 22.5 -9.5t9.5 -22.5zM1792 992v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1088 q13 0 22.5 -9.5t9.5 -22.5zM1792 1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5t9.5 -22.5z" />
-<glyph unicode="" horiz-adv-x="1792" d="M1792 1184v-1088q0 -42 -39 -59q-13 -5 -25 -5q-27 0 -45 19l-403 403v-166q0 -119 -84.5 -203.5t-203.5 -84.5h-704q-119 0 -203.5 84.5t-84.5 203.5v704q0 119 84.5 203.5t203.5 84.5h704q119 0 203.5 -84.5t84.5 -203.5v-165l403 402q18 19 45 19q12 0 25 -5 q39 -17 39 -59z" />
-<glyph unicode="" horiz-adv-x="1920" d="M640 960q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM1664 576v-448h-1408v192l320 320l160 -160l512 512zM1760 1280h-1600q-13 0 -22.5 -9.5t-9.5 -22.5v-1216q0 -13 9.5 -22.5t22.5 -9.5h1600q13 0 22.5 9.5t9.5 22.5v1216 q0 13 -9.5 22.5t-22.5 9.5zM1920 1248v-1216q0 -66 -47 -113t-113 -47h-1600q-66 0 -113 47t-47 113v1216q0 66 47 113t113 47h1600q66 0 113 -47t47 -113z" />
-<glyph unicode="" d="M363 0l91 91l-235 235l-91 -91v-107h128v-128h107zM886 928q0 22 -22 22q-10 0 -17 -7l-542 -542q-7 -7 -7 -17q0 -22 22 -22q10 0 17 7l542 542q7 7 7 17zM832 1120l416 -416l-832 -832h-416v416zM1515 1024q0 -53 -37 -90l-166 -166l-416 416l166 165q36 38 90 38 q53 0 91 -38l235 -234q37 -39 37 -91z" />
-<glyph unicode="" horiz-adv-x="1024" d="M768 896q0 106 -75 181t-181 75t-181 -75t-75 -181t75 -181t181 -75t181 75t75 181zM1024 896q0 -109 -33 -179l-364 -774q-16 -33 -47.5 -52t-67.5 -19t-67.5 19t-46.5 52l-365 774q-33 70 -33 179q0 212 150 362t362 150t362 -150t150 -362z" />
-<glyph unicode="" d="M768 96v1088q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
-<glyph unicode="" horiz-adv-x="1024" d="M512 384q0 36 -20 69q-1 1 -15.5 22.5t-25.5 38t-25 44t-21 50.5q-4 16 -21 16t-21 -16q-7 -23 -21 -50.5t-25 -44t-25.5 -38t-15.5 -22.5q-20 -33 -20 -69q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1024 512q0 -212 -150 -362t-362 -150t-362 150t-150 362 q0 145 81 275q6 9 62.5 90.5t101 151t99.5 178t83 201.5q9 30 34 47t51 17t51.5 -17t33.5 -47q28 -93 83 -201.5t99.5 -178t101 -151t62.5 -90.5q81 -127 81 -275z" />
-<glyph unicode="" horiz-adv-x="1792" d="M888 352l116 116l-152 152l-116 -116v-56h96v-96h56zM1328 1072q-16 16 -33 -1l-350 -350q-17 -17 -1 -33t33 1l350 350q17 17 1 33zM1408 478v-190q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832 q63 0 117 -25q15 -7 18 -23q3 -17 -9 -29l-49 -49q-14 -14 -32 -8q-23 6 -45 6h-832q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v126q0 13 9 22l64 64q15 15 35 7t20 -29zM1312 1216l288 -288l-672 -672h-288v288zM1756 1084l-92 -92 l-288 288l92 92q28 28 68 28t68 -28l152 -152q28 -28 28 -68t-28 -68z" />
-<glyph unicode="" horiz-adv-x="1664" d="M1408 547v-259q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h255v0q13 0 22.5 -9.5t9.5 -22.5q0 -27 -26 -32q-77 -26 -133 -60q-10 -4 -16 -4h-112q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832 q66 0 113 47t47 113v214q0 19 18 29q28 13 54 37q16 16 35 8q21 -9 21 -29zM1645 1043l-384 -384q-18 -19 -45 -19q-12 0 -25 5q-39 17 -39 59v192h-160q-323 0 -438 -131q-119 -137 -74 -473q3 -23 -20 -34q-8 -2 -12 -2q-16 0 -26 13q-10 14 -21 31t-39.5 68.5t-49.5 99.5 t-38.5 114t-17.5 122q0 49 3.5 91t14 90t28 88t47 81.5t68.5 74t94.5 61.5t124.5 48.5t159.5 30.5t196.5 11h160v192q0 42 39 59q13 5 25 5q26 0 45 -19l384 -384q19 -19 19 -45t-19 -45z" />
-<glyph unicode="" horiz-adv-x="1664" d="M1408 606v-318q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832q63 0 117 -25q15 -7 18 -23q3 -17 -9 -29l-49 -49q-10 -10 -23 -10q-3 0 -9 2q-23 6 -45 6h-832q-66 0 -113 -47t-47 -113v-832 q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v254q0 13 9 22l64 64q10 10 23 10q6 0 12 -3q20 -8 20 -29zM1639 1095l-814 -814q-24 -24 -57 -24t-57 24l-430 430q-24 24 -24 57t24 57l110 110q24 24 57 24t57 -24l263 -263l647 647q24 24 57 24t57 -24l110 -110 q24 -24 24 -57t-24 -57z" />
-<glyph unicode="" horiz-adv-x="1792" d="M1792 640q0 -26 -19 -45l-256 -256q-19 -19 -45 -19t-45 19t-19 45v128h-384v-384h128q26 0 45 -19t19 -45t-19 -45l-256 -256q-19 -19 -45 -19t-45 19l-256 256q-19 19 -19 45t19 45t45 19h128v384h-384v-128q0 -26 -19 -45t-45 -19t-45 19l-256 256q-19 19 -19 45 t19 45l256 256q19 19 45 19t45 -19t19 -45v-128h384v384h-128q-26 0 -45 19t-19 45t19 45l256 256q19 19 45 19t45 -19l256 -256q19 -19 19 -45t-19 -45t-45 -19h-128v-384h384v128q0 26 19 45t45 19t45 -19l256 -256q19 -19 19 -45z" />
-<glyph unicode="" horiz-adv-x="1024" d="M979 1395q19 19 32 13t13 -32v-1472q0 -26 -13 -32t-32 13l-710 710q-9 9 -13 19v-678q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-678q4 11 13 19z" />
-<glyph unicode="" horiz-adv-x="1792" d="M1747 1395q19 19 32 13t13 -32v-1472q0 -26 -13 -32t-32 13l-710 710q-9 9 -13 19v-710q0 -26 -13 -32t-32 13l-710 710q-9 9 -13 19v-678q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-678q4 11 13 19l710 710 q19 19 32 13t13 -32v-710q4 11 13 19z" />
-<glyph unicode="" horiz-adv-x="1664" d="M1619 1395q19 19 32 13t13 -32v-1472q0 -26 -13 -32t-32 13l-710 710q-8 9 -13 19v-710q0 -26 -13 -32t-32 13l-710 710q-19 19 -19 45t19 45l710 710q19 19 32 13t13 -32v-710q5 11 13 19z" />
-<glyph unicode="" horiz-adv-x="1408" d="M1384 609l-1328 -738q-23 -13 -39.5 -3t-16.5 36v1472q0 26 16.5 36t39.5 -3l1328 -738q23 -13 23 -31t-23 -31z" />
-<glyph unicode="" d="M1536 1344v-1408q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h512q26 0 45 -19t19 -45zM640 1344v-1408q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h512q26 0 45 -19t19 -45z" />
-<glyph unicode="" d="M1536 1344v-1408q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h1408q26 0 45 -19t19 -45z" />
-<glyph unicode="" horiz-adv-x="1664" d="M45 -115q-19 -19 -32 -13t-13 32v1472q0 26 13 32t32 -13l710 -710q8 -8 13 -19v710q0 26 13 32t32 -13l710 -710q19 -19 19 -45t-19 -45l-710 -710q-19 -19 -32 -13t-13 32v710q-5 -10 -13 -19z" />
-<glyph unicode="" horiz-adv-x="1792" d="M45 -115q-19 -19 -32 -13t-13 32v1472q0 26 13 32t32 -13l710 -710q8 -8 13 -19v710q0 26 13 32t32 -13l710 -710q8 -8 13 -19v678q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-1408q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v678q-5 -10 -13 -19l-710 -710 q-19 -19 -32 -13t-13 32v710q-5 -10 -13 -19z" />
-<glyph unicode="" horiz-adv-x="1024" d="M45 -115q-19 -19 -32 -13t-13 32v1472q0 26 13 32t32 -13l710 -710q8 -8 13 -19v678q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-1408q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v678q-5 -10 -13 -19z" />
-<glyph unicode="" horiz-adv-x="1538" d="M14 557l710 710q19 19 45 19t45 -19l710 -710q19 -19 13 -32t-32 -13h-1472q-26 0 -32 13t13 32zM1473 0h-1408q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h1408q26 0 45 -19t19 -45v-256q0 -26 -19 -45t-45 -19z" />
-<glyph unicode="" horiz-adv-x="1152" d="M742 -37l-652 651q-37 37 -37 90.5t37 90.5l652 651q37 37 90.5 37t90.5 -37l75 -75q37 -37 37 -90.5t-37 -90.5l-486 -486l486 -485q37 -38 37 -91t-37 -90l-75 -75q-37 -37 -90.5 -37t-90.5 37z" />
-<glyph unicode="" horiz-adv-x="1152" d="M1099 704q0 -52 -37 -91l-652 -651q-37 -37 -90 -37t-90 37l-76 75q-37 39 -37 91q0 53 37 90l486 486l-486 485q-37 39 -37 91q0 53 37 90l76 75q36 38 90 38t90 -38l652 -651q37 -37 37 -90z" />
-<glyph unicode="" d="M1216 576v128q0 26 -19 45t-45 19h-256v256q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-256h-256q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h256v-256q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v256h256q26 0 45 19t19 45zM1536 640q0 -209 -103 -385.5 t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
-<glyph unicode="" d="M1216 576v128q0 26 -19 45t-45 19h-768q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h768q26 0 45 19t19 45zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5 t103 -385.5z" />
-<glyph unicode="" d="M1149 414q0 26 -19 45l-181 181l181 181q19 19 19 45q0 27 -19 46l-90 90q-19 19 -46 19q-26 0 -45 -19l-181 -181l-181 181q-19 19 -45 19q-27 0 -46 -19l-90 -90q-19 -19 -19 -46q0 -26 19 -45l181 -181l-181 -181q-19 -19 -19 -45q0 -27 19 -46l90 -90q19 -19 46 -19 q26 0 45 19l181 181l181 -181q19 -19 45 -19q27 0 46 19l90 90q19 19 19 46zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
-<glyph unicode="" d="M1284 802q0 28 -18 46l-91 90q-19 19 -45 19t-45 -19l-408 -407l-226 226q-19 19 -45 19t-45 -19l-91 -90q-18 -18 -18 -46q0 -27 18 -45l362 -362q19 -19 45 -19q27 0 46 19l543 543q18 18 18 45zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103 t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
-<glyph unicode="" d="M896 160v192q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h192q14 0 23 9t9 23zM1152 832q0 88 -55.5 163t-138.5 116t-170 41q-243 0 -371 -213q-15 -24 8 -42l132 -100q7 -6 19 -6q16 0 25 12q53 68 86 92q34 24 86 24q48 0 85.5 -26t37.5 -59 q0 -38 -20 -61t-68 -45q-63 -28 -115.5 -86.5t-52.5 -125.5v-36q0 -14 9 -23t23 -9h192q14 0 23 9t9 23q0 19 21.5 49.5t54.5 49.5q32 18 49 28.5t46 35t44.5 48t28 60.5t12.5 81zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
-<glyph unicode="" d="M1024 160v160q0 14 -9 23t-23 9h-96v512q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-160q0 -14 9 -23t23 -9h96v-320h-96q-14 0 -23 -9t-9 -23v-160q0 -14 9 -23t23 -9h448q14 0 23 9t9 23zM896 1056v160q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23v-160q0 -14 9 -23 t23 -9h192q14 0 23 9t9 23zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
-<glyph unicode="" d="M1197 512h-109q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h109q-32 108 -112.5 188.5t-188.5 112.5v-109q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v109q-108 -32 -188.5 -112.5t-112.5 -188.5h109q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-109 q32 -108 112.5 -188.5t188.5 -112.5v109q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-109q108 32 188.5 112.5t112.5 188.5zM1536 704v-128q0 -26 -19 -45t-45 -19h-143q-37 -161 -154.5 -278.5t-278.5 -154.5v-143q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v143 q-161 37 -278.5 154.5t-154.5 278.5h-143q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h143q37 161 154.5 278.5t278.5 154.5v143q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-143q161 -37 278.5 -154.5t154.5 -278.5h143q26 0 45 -19t19 -45z" />
-<glyph unicode="" d="M1097 457l-146 -146q-10 -10 -23 -10t-23 10l-137 137l-137 -137q-10 -10 -23 -10t-23 10l-146 146q-10 10 -10 23t10 23l137 137l-137 137q-10 10 -10 23t10 23l146 146q10 10 23 10t23 -10l137 -137l137 137q10 10 23 10t23 -10l146 -146q10 -10 10 -23t-10 -23 l-137 -137l137 -137q10 -10 10 -23t-10 -23zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5 t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
-<glyph unicode="" d="M1171 723l-422 -422q-19 -19 -45 -19t-45 19l-294 294q-19 19 -19 45t19 45l102 102q19 19 45 19t45 -19l147 -147l275 275q19 19 45 19t45 -19l102 -102q19 -19 19 -45t-19 -45zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198 t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
-<glyph unicode="" d="M1312 643q0 161 -87 295l-754 -753q137 -89 297 -89q111 0 211.5 43.5t173.5 116.5t116 174.5t43 212.5zM313 344l755 754q-135 91 -300 91q-148 0 -273 -73t-198 -199t-73 -274q0 -162 89 -299zM1536 643q0 -157 -61 -300t-163.5 -246t-245 -164t-298.5 -61t-298.5 61 t-245 164t-163.5 246t-61 300t61 299.5t163.5 245.5t245 164t298.5 61t298.5 -61t245 -164t163.5 -245.5t61 -299.5z" />
-<glyph unicode="" d="M1536 640v-128q0 -53 -32.5 -90.5t-84.5 -37.5h-704l293 -294q38 -36 38 -90t-38 -90l-75 -76q-37 -37 -90 -37q-52 0 -91 37l-651 652q-37 37 -37 90q0 52 37 91l651 650q38 38 91 38q52 0 90 -38l75 -74q38 -38 38 -91t-38 -91l-293 -293h704q52 0 84.5 -37.5 t32.5 -90.5z" />
-<glyph unicode="" d="M1472 576q0 -54 -37 -91l-651 -651q-39 -37 -91 -37q-51 0 -90 37l-75 75q-38 38 -38 91t38 91l293 293h-704q-52 0 -84.5 37.5t-32.5 90.5v128q0 53 32.5 90.5t84.5 37.5h704l-293 294q-38 36 -38 90t38 90l75 75q38 38 90 38q53 0 91 -38l651 -651q37 -35 37 -90z" />
-<glyph unicode="" horiz-adv-x="1664" d="M1611 565q0 -51 -37 -90l-75 -75q-38 -38 -91 -38q-54 0 -90 38l-294 293v-704q0 -52 -37.5 -84.5t-90.5 -32.5h-128q-53 0 -90.5 32.5t-37.5 84.5v704l-294 -293q-36 -38 -90 -38t-90 38l-75 75q-38 38 -38 90q0 53 38 91l651 651q35 37 90 37q54 0 91 -37l651 -651 q37 -39 37 -91z" />
-<glyph unicode="" horiz-adv-x="1664" d="M1611 704q0 -53 -37 -90l-651 -652q-39 -37 -91 -37q-53 0 -90 37l-651 652q-38 36 -38 90q0 53 38 91l74 75q39 37 91 37q53 0 90 -37l294 -294v704q0 52 38 90t90 38h128q52 0 90 -38t38 -90v-704l294 294q37 37 90 37q52 0 91 -37l75 -75q37 -39 37 -91z" />
-<glyph unicode="" horiz-adv-x="1792" d="M1792 896q0 -26 -19 -45l-512 -512q-19 -19 -45 -19t-45 19t-19 45v256h-224q-98 0 -175.5 -6t-154 -21.5t-133 -42.5t-105.5 -69.5t-80 -101t-48.5 -138.5t-17.5 -181q0 -55 5 -123q0 -6 2.5 -23.5t2.5 -26.5q0 -15 -8.5 -25t-23.5 -10q-16 0 -28 17q-7 9 -13 22 t-13.5 30t-10.5 24q-127 285 -127 451q0 199 53 333q162 403 875 403h224v256q0 26 19 45t45 19t45 -19l512 -512q19 -19 19 -45z" />
-<glyph unicode="" d="M755 480q0 -13 -10 -23l-332 -332l144 -144q19 -19 19 -45t-19 -45t-45 -19h-448q-26 0 -45 19t-19 45v448q0 26 19 45t45 19t45 -19l144 -144l332 332q10 10 23 10t23 -10l114 -114q10 -10 10 -23zM1536 1344v-448q0 -26 -19 -45t-45 -19t-45 19l-144 144l-332 -332 q-10 -10 -23 -10t-23 10l-114 114q-10 10 -10 23t10 23l332 332l-144 144q-19 19 -19 45t19 45t45 19h448q26 0 45 -19t19 -45z" />
-<glyph unicode="" d="M768 576v-448q0 -26 -19 -45t-45 -19t-45 19l-144 144l-332 -332q-10 -10 -23 -10t-23 10l-114 114q-10 10 -10 23t10 23l332 332l-144 144q-19 19 -19 45t19 45t45 19h448q26 0 45 -19t19 -45zM1523 1248q0 -13 -10 -23l-332 -332l144 -144q19 -19 19 -45t-19 -45 t-45 -19h-448q-26 0 -45 19t-19 45v448q0 26 19 45t45 19t45 -19l144 -144l332 332q10 10 23 10t23 -10l114 -114q10 -10 10 -23z" />
-<glyph unicode="" horiz-adv-x="1408" d="M1408 800v-192q0 -40 -28 -68t-68 -28h-416v-416q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v416h-416q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h416v416q0 40 28 68t68 28h192q40 0 68 -28t28 -68v-416h416q40 0 68 -28t28 -68z" />
-<glyph unicode="" horiz-adv-x="1408" d="M1408 800v-192q0 -40 -28 -68t-68 -28h-1216q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h1216q40 0 68 -28t28 -68z" />
-<glyph unicode="" horiz-adv-x="1664" d="M1482 486q46 -26 59.5 -77.5t-12.5 -97.5l-64 -110q-26 -46 -77.5 -59.5t-97.5 12.5l-266 153v-307q0 -52 -38 -90t-90 -38h-128q-52 0 -90 38t-38 90v307l-266 -153q-46 -26 -97.5 -12.5t-77.5 59.5l-64 110q-26 46 -12.5 97.5t59.5 77.5l266 154l-266 154 q-46 26 -59.5 77.5t12.5 97.5l64 110q26 46 77.5 59.5t97.5 -12.5l266 -153v307q0 52 38 90t90 38h128q52 0 90 -38t38 -90v-307l266 153q46 26 97.5 12.5t77.5 -59.5l64 -110q26 -46 12.5 -97.5t-59.5 -77.5l-266 -154z" />
-<glyph unicode="" d="M768 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM896 161v190q0 14 -9 23.5t-22 9.5h-192q-13 0 -23 -10t-10 -23v-190q0 -13 10 -23t23 -10h192 q13 0 22 9.5t9 23.5zM894 505l18 621q0 12 -10 18q-10 8 -24 8h-220q-14 0 -24 -8q-10 -6 -10 -18l17 -621q0 -10 10 -17.5t24 -7.5h185q14 0 23.5 7.5t10.5 17.5z" />
-<glyph unicode="" d="M928 180v56v468v192h-320v-192v-468v-56q0 -25 18 -38.5t46 -13.5h192q28 0 46 13.5t18 38.5zM472 1024h195l-126 161q-26 31 -69 31q-40 0 -68 -28t-28 -68t28 -68t68 -28zM1160 1120q0 40 -28 68t-68 28q-43 0 -69 -31l-125 -161h194q40 0 68 28t28 68zM1536 864v-320 q0 -14 -9 -23t-23 -9h-96v-416q0 -40 -28 -68t-68 -28h-1088q-40 0 -68 28t-28 68v416h-96q-14 0 -23 9t-9 23v320q0 14 9 23t23 9h440q-93 0 -158.5 65.5t-65.5 158.5t65.5 158.5t158.5 65.5q107 0 168 -77l128 -165l128 165q61 77 168 77q93 0 158.5 -65.5t65.5 -158.5 t-65.5 -158.5t-158.5 -65.5h440q14 0 23 -9t9 -23z" />
-<glyph unicode="" horiz-adv-x="1792" d="M1280 832q0 26 -19 45t-45 19q-172 0 -318 -49.5t-259.5 -134t-235.5 -219.5q-19 -21 -19 -45q0 -26 19 -45t45 -19q24 0 45 19q27 24 74 71t67 66q137 124 268.5 176t313.5 52q26 0 45 19t19 45zM1792 1030q0 -95 -20 -193q-46 -224 -184.5 -383t-357.5 -268 q-214 -108 -438 -108q-148 0 -286 47q-15 5 -88 42t-96 37q-16 0 -39.5 -32t-45 -70t-52.5 -70t-60 -32q-30 0 -51 11t-31 24t-27 42q-2 4 -6 11t-5.5 10t-3 9.5t-1.5 13.5q0 35 31 73.5t68 65.5t68 56t31 48q0 4 -14 38t-16 44q-9 51 -9 104q0 115 43.5 220t119 184.5 t170.5 139t204 95.5q55 18 145 25.5t179.5 9t178.5 6t163.5 24t113.5 56.5l29.5 29.5t29.5 28t27 20t36.5 16t43.5 4.5q39 0 70.5 -46t47.5 -112t24 -124t8 -96z" />
-<glyph unicode="" horiz-adv-x="1408" d="M1408 -160v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5zM1152 896q0 -78 -24.5 -144t-64 -112.5t-87.5 -88t-96 -77.5t-87.5 -72t-64 -81.5t-24.5 -96.5q0 -96 67 -224l-4 1l1 -1 q-90 41 -160 83t-138.5 100t-113.5 122.5t-72.5 150.5t-27.5 184q0 78 24.5 144t64 112.5t87.5 88t96 77.5t87.5 72t64 81.5t24.5 96.5q0 94 -66 224l3 -1l-1 1q90 -41 160 -83t138.5 -100t113.5 -122.5t72.5 -150.5t27.5 -184z" />
-<glyph unicode="" horiz-adv-x="1792" d="M1664 576q-152 236 -381 353q61 -104 61 -225q0 -185 -131.5 -316.5t-316.5 -131.5t-316.5 131.5t-131.5 316.5q0 121 61 225q-229 -117 -381 -353q133 -205 333.5 -326.5t434.5 -121.5t434.5 121.5t333.5 326.5zM944 960q0 20 -14 34t-34 14q-125 0 -214.5 -89.5 t-89.5 -214.5q0 -20 14 -34t34 -14t34 14t14 34q0 86 61 147t147 61q20 0 34 14t14 34zM1792 576q0 -34 -20 -69q-140 -230 -376.5 -368.5t-499.5 -138.5t-499.5 139t-376.5 368q-20 35 -20 69t20 69q140 229 376.5 368t499.5 139t499.5 -139t376.5 -368q20 -35 20 -69z" />
-<glyph unicode="" horiz-adv-x="1792" d="M555 201l78 141q-87 63 -136 159t-49 203q0 121 61 225q-229 -117 -381 -353q167 -258 427 -375zM944 960q0 20 -14 34t-34 14q-125 0 -214.5 -89.5t-89.5 -214.5q0 -20 14 -34t34 -14t34 14t14 34q0 86 61 147t147 61q20 0 34 14t14 34zM1307 1151q0 -7 -1 -9 q-105 -188 -315 -566t-316 -567l-49 -89q-10 -16 -28 -16q-12 0 -134 70q-16 10 -16 28q0 12 44 87q-143 65 -263.5 173t-208.5 245q-20 31 -20 69t20 69q153 235 380 371t496 136q89 0 180 -17l54 97q10 16 28 16q5 0 18 -6t31 -15.5t33 -18.5t31.5 -18.5t19.5 -11.5 q16 -10 16 -27zM1344 704q0 -139 -79 -253.5t-209 -164.5l280 502q8 -45 8 -84zM1792 576q0 -35 -20 -69q-39 -64 -109 -145q-150 -172 -347.5 -267t-419.5 -95l74 132q212 18 392.5 137t301.5 307q-115 179 -282 294l63 112q95 -64 182.5 -153t144.5 -184q20 -34 20 -69z " />
-<glyph unicode="" horiz-adv-x="1792" d="M1024 161v190q0 14 -9.5 23.5t-22.5 9.5h-192q-13 0 -22.5 -9.5t-9.5 -23.5v-190q0 -14 9.5 -23.5t22.5 -9.5h192q13 0 22.5 9.5t9.5 23.5zM1022 535l18 459q0 12 -10 19q-13 11 -24 11h-220q-11 0 -24 -11q-10 -7 -10 -21l17 -457q0 -10 10 -16.5t24 -6.5h185 q14 0 23.5 6.5t10.5 16.5zM1008 1469l768 -1408q35 -63 -2 -126q-17 -29 -46.5 -46t-63.5 -17h-1536q-34 0 -63.5 17t-46.5 46q-37 63 -2 126l768 1408q17 31 47 49t65 18t65 -18t47 -49z" />
-<glyph unicode="" horiz-adv-x="1408" d="M1376 1376q44 -52 12 -148t-108 -172l-161 -161l160 -696q5 -19 -12 -33l-128 -96q-7 -6 -19 -6q-4 0 -7 1q-15 3 -21 16l-279 508l-259 -259l53 -194q5 -17 -8 -31l-96 -96q-9 -9 -23 -9h-2q-15 2 -24 13l-189 252l-252 189q-11 7 -13 23q-1 13 9 25l96 97q9 9 23 9 q6 0 8 -1l194 -53l259 259l-508 279q-14 8 -17 24q-2 16 9 27l128 128q14 13 30 8l665 -159l160 160q76 76 172 108t148 -12z" />
-<glyph unicode="" horiz-adv-x="1664" d="M128 -128h288v288h-288v-288zM480 -128h320v288h-320v-288zM128 224h288v320h-288v-320zM480 224h320v320h-320v-320zM128 608h288v288h-288v-288zM864 -128h320v288h-320v-288zM480 608h320v288h-320v-288zM1248 -128h288v288h-288v-288zM864 224h320v320h-320v-320z M512 1088v288q0 13 -9.5 22.5t-22.5 9.5h-64q-13 0 -22.5 -9.5t-9.5 -22.5v-288q0 -13 9.5 -22.5t22.5 -9.5h64q13 0 22.5 9.5t9.5 22.5zM1248 224h288v320h-288v-320zM864 608h320v288h-320v-288zM1248 608h288v288h-288v-288zM1280 1088v288q0 13 -9.5 22.5t-22.5 9.5h-64 q-13 0 -22.5 -9.5t-9.5 -22.5v-288q0 -13 9.5 -22.5t22.5 -9.5h64q13 0 22.5 9.5t9.5 22.5zM1664 1152v-1280q0 -52 -38 -90t-90 -38h-1408q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h128v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h384v96q0 66 47 113t113 47 h64q66 0 113 -47t47 -113v-96h128q52 0 90 -38t38 -90z" />
-<glyph unicode="" horiz-adv-x="1792" d="M666 1055q-60 -92 -137 -273q-22 45 -37 72.5t-40.5 63.5t-51 56.5t-63 35t-81.5 14.5h-224q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h224q250 0 410 -225zM1792 256q0 -14 -9 -23l-320 -320q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5v192q-32 0 -85 -0.5t-81 -1t-73 1 t-71 5t-64 10.5t-63 18.5t-58 28.5t-59 40t-55 53.5t-56 69.5q59 93 136 273q22 -45 37 -72.5t40.5 -63.5t51 -56.5t63 -35t81.5 -14.5h256v192q0 14 9 23t23 9q12 0 24 -10l319 -319q9 -9 9 -23zM1792 1152q0 -14 -9 -23l-320 -320q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5 v192h-256q-48 0 -87 -15t-69 -45t-51 -61.5t-45 -77.5q-32 -62 -78 -171q-29 -66 -49.5 -111t-54 -105t-64 -100t-74 -83t-90 -68.5t-106.5 -42t-128 -16.5h-224q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h224q48 0 87 15t69 45t51 61.5t45 77.5q32 62 78 171q29 66 49.5 111 t54 105t64 100t74 83t90 68.5t106.5 42t128 16.5h256v192q0 14 9 23t23 9q12 0 24 -10l319 -319q9 -9 9 -23z" />
-<glyph unicode="" horiz-adv-x="1792" d="M1792 640q0 -174 -120 -321.5t-326 -233t-450 -85.5q-70 0 -145 8q-198 -175 -460 -242q-49 -14 -114 -22q-17 -2 -30.5 9t-17.5 29v1q-3 4 -0.5 12t2 10t4.5 9.5l6 9t7 8.5t8 9q7 8 31 34.5t34.5 38t31 39.5t32.5 51t27 59t26 76q-157 89 -247.5 220t-90.5 281 q0 130 71 248.5t191 204.5t286 136.5t348 50.5q244 0 450 -85.5t326 -233t120 -321.5z" />
-<glyph unicode="" d="M1536 704v-128q0 -201 -98.5 -362t-274 -251.5t-395.5 -90.5t-395.5 90.5t-274 251.5t-98.5 362v128q0 26 19 45t45 19h384q26 0 45 -19t19 -45v-128q0 -52 23.5 -90t53.5 -57t71 -30t64 -13t44 -2t44 2t64 13t71 30t53.5 57t23.5 90v128q0 26 19 45t45 19h384 q26 0 45 -19t19 -45zM512 1344v-384q0 -26 -19 -45t-45 -19h-384q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h384q26 0 45 -19t19 -45zM1536 1344v-384q0 -26 -19 -45t-45 -19h-384q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h384q26 0 45 -19t19 -45z" />
-<glyph unicode="" horiz-adv-x="1664" d="M1611 320q0 -53 -37 -90l-75 -75q-38 -38 -91 -38q-54 0 -90 38l-486 485l-486 -485q-36 -38 -90 -38t-90 38l-75 75q-38 36 -38 90q0 53 38 91l651 651q37 37 90 37q52 0 91 -37l650 -651q38 -38 38 -91z" />
-<glyph unicode="" horiz-adv-x="1664" d="M1611 832q0 -53 -37 -90l-651 -651q-38 -38 -91 -38q-54 0 -90 38l-651 651q-38 36 -38 90q0 53 38 91l74 75q39 37 91 37q53 0 90 -37l486 -486l486 486q37 37 90 37q52 0 91 -37l75 -75q37 -39 37 -91z" />
-<glyph unicode="" horiz-adv-x="1920" d="M1280 32q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-8 0 -13.5 2t-9 7t-5.5 8t-3 11.5t-1 11.5v13v11v160v416h-192q-26 0 -45 19t-19 45q0 24 15 41l320 384q19 22 49 22t49 -22l320 -384q15 -17 15 -41q0 -26 -19 -45t-45 -19h-192v-384h576q16 0 25 -11l160 -192q7 -11 7 -21 zM1920 448q0 -24 -15 -41l-320 -384q-20 -23 -49 -23t-49 23l-320 384q-15 17 -15 41q0 26 19 45t45 19h192v384h-576q-16 0 -25 12l-160 192q-7 9 -7 20q0 13 9.5 22.5t22.5 9.5h960q8 0 13.5 -2t9 -7t5.5 -8t3 -11.5t1 -11.5v-13v-11v-160v-416h192q26 0 45 -19t19 -45z " />
-<glyph unicode="" horiz-adv-x="1664" d="M640 0q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1536 0q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1664 1088v-512q0 -24 -16 -42.5t-41 -21.5 l-1044 -122q1 -7 4.5 -21.5t6 -26.5t2.5 -22q0 -16 -24 -64h920q26 0 45 -19t19 -45t-19 -45t-45 -19h-1024q-26 0 -45 19t-19 45q0 14 11 39.5t29.5 59.5t20.5 38l-177 823h-204q-26 0 -45 19t-19 45t19 45t45 19h256q16 0 28.5 -6.5t20 -15.5t13 -24.5t7.5 -26.5 t5.5 -29.5t4.5 -25.5h1201q26 0 45 -19t19 -45z" />
-<glyph unicode="" horiz-adv-x="1664" d="M1664 928v-704q0 -92 -66 -158t-158 -66h-1216q-92 0 -158 66t-66 158v960q0 92 66 158t158 66h320q92 0 158 -66t66 -158v-32h672q92 0 158 -66t66 -158z" />
-<glyph unicode="" horiz-adv-x="1920" d="M1879 584q0 -31 -31 -66l-336 -396q-43 -51 -120.5 -86.5t-143.5 -35.5h-1088q-34 0 -60.5 13t-26.5 43q0 31 31 66l336 396q43 51 120.5 86.5t143.5 35.5h1088q34 0 60.5 -13t26.5 -43zM1536 928v-160h-832q-94 0 -197 -47.5t-164 -119.5l-337 -396l-5 -6q0 4 -0.5 12.5 t-0.5 12.5v960q0 92 66 158t158 66h320q92 0 158 -66t66 -158v-32h544q92 0 158 -66t66 -158z" />
-<glyph unicode="" horiz-adv-x="768" d="M704 1216q0 -26 -19 -45t-45 -19h-128v-1024h128q26 0 45 -19t19 -45t-19 -45l-256 -256q-19 -19 -45 -19t-45 19l-256 256q-19 19 -19 45t19 45t45 19h128v1024h-128q-26 0 -45 19t-19 45t19 45l256 256q19 19 45 19t45 -19l256 -256q19 -19 19 -45z" />
-<glyph unicode="" horiz-adv-x="1792" d="M1792 640q0 -26 -19 -45l-256 -256q-19 -19 -45 -19t-45 19t-19 45v128h-1024v-128q0 -26 -19 -45t-45 -19t-45 19l-256 256q-19 19 -19 45t19 45l256 256q19 19 45 19t45 -19t19 -45v-128h1024v128q0 26 19 45t45 19t45 -19l256 -256q19 -19 19 -45z" />
-<glyph unicode="" horiz-adv-x="1920" d="M512 512v-384h-256v384h256zM896 1024v-896h-256v896h256zM1280 768v-640h-256v640h256zM1664 1152v-1024h-256v1024h256zM1792 32v1216q0 13 -9.5 22.5t-22.5 9.5h-1600q-13 0 -22.5 -9.5t-9.5 -22.5v-1216q0 -13 9.5 -22.5t22.5 -9.5h1600q13 0 22.5 9.5t9.5 22.5z M1920 1248v-1216q0 -66 -47 -113t-113 -47h-1600q-66 0 -113 47t-47 113v1216q0 66 47 113t113 47h1600q66 0 113 -47t47 -113z" />
-<glyph unicode="" d="M1280 926q-56 -25 -121 -34q68 40 93 117q-65 -38 -134 -51q-61 66 -153 66q-87 0 -148.5 -61.5t-61.5 -148.5q0 -29 5 -48q-129 7 -242 65t-192 155q-29 -50 -29 -106q0 -114 91 -175q-47 1 -100 26v-2q0 -75 50 -133.5t123 -72.5q-29 -8 -51 -8q-13 0 -39 4 q21 -63 74.5 -104t121.5 -42q-116 -90 -261 -90q-26 0 -50 3q148 -94 322 -94q112 0 210 35.5t168 95t120.5 137t75 162t24.5 168.5q0 18 -1 27q63 45 105 109zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5 t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
-<glyph unicode="" d="M1307 618l23 219h-198v109q0 49 15.5 68.5t71.5 19.5h110v219h-175q-152 0 -218 -72t-66 -213v-131h-131v-219h131v-635h262v635h175zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960 q119 0 203.5 -84.5t84.5 -203.5z" />
-<glyph unicode="" horiz-adv-x="1792" d="M928 704q0 14 -9 23t-23 9q-66 0 -113 -47t-47 -113q0 -14 9 -23t23 -9t23 9t9 23q0 40 28 68t68 28q14 0 23 9t9 23zM1152 574q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75t75 -181zM128 0h1536v128h-1536v-128zM1280 574q0 159 -112.5 271.5 t-271.5 112.5t-271.5 -112.5t-112.5 -271.5t112.5 -271.5t271.5 -112.5t271.5 112.5t112.5 271.5zM256 1216h384v128h-384v-128zM128 1024h1536v118v138h-828l-64 -128h-644v-128zM1792 1280v-1280q0 -53 -37.5 -90.5t-90.5 -37.5h-1536q-53 0 -90.5 37.5t-37.5 90.5v1280 q0 53 37.5 90.5t90.5 37.5h1536q53 0 90.5 -37.5t37.5 -90.5z" />
-<glyph unicode="" horiz-adv-x="1792" d="M832 1024q0 80 -56 136t-136 56t-136 -56t-56 -136q0 -42 19 -83q-41 19 -83 19q-80 0 -136 -56t-56 -136t56 -136t136 -56t136 56t56 136q0 42 -19 83q41 -19 83 -19q80 0 136 56t56 136zM1683 320q0 -17 -49 -66t-66 -49q-9 0 -28.5 16t-36.5 33t-38.5 40t-24.5 26 l-96 -96l220 -220q28 -28 28 -68q0 -42 -39 -81t-81 -39q-40 0 -68 28l-671 671q-176 -131 -365 -131q-163 0 -265.5 102.5t-102.5 265.5q0 160 95 313t248 248t313 95q163 0 265.5 -102.5t102.5 -265.5q0 -189 -131 -365l355 -355l96 96q-3 3 -26 24.5t-40 38.5t-33 36.5 t-16 28.5q0 17 49 66t66 49q13 0 23 -10q6 -6 46 -44.5t82 -79.5t86.5 -86t73 -78t28.5 -41z" />
-<glyph unicode="" horiz-adv-x="1920" d="M896 640q0 106 -75 181t-181 75t-181 -75t-75 -181t75 -181t181 -75t181 75t75 181zM1664 128q0 52 -38 90t-90 38t-90 -38t-38 -90q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1664 1152q0 52 -38 90t-90 38t-90 -38t-38 -90q0 -53 37.5 -90.5t90.5 -37.5 t90.5 37.5t37.5 90.5zM1280 731v-185q0 -10 -7 -19.5t-16 -10.5l-155 -24q-11 -35 -32 -76q34 -48 90 -115q7 -10 7 -20q0 -12 -7 -19q-23 -30 -82.5 -89.5t-78.5 -59.5q-11 0 -21 7l-115 90q-37 -19 -77 -31q-11 -108 -23 -155q-7 -24 -30 -24h-186q-11 0 -20 7.5t-10 17.5 l-23 153q-34 10 -75 31l-118 -89q-7 -7 -20 -7q-11 0 -21 8q-144 133 -144 160q0 9 7 19q10 14 41 53t47 61q-23 44 -35 82l-152 24q-10 1 -17 9.5t-7 19.5v185q0 10 7 19.5t16 10.5l155 24q11 35 32 76q-34 48 -90 115q-7 11 -7 20q0 12 7 20q22 30 82 89t79 59q11 0 21 -7 l115 -90q34 18 77 32q11 108 23 154q7 24 30 24h186q11 0 20 -7.5t10 -17.5l23 -153q34 -10 75 -31l118 89q8 7 20 7q11 0 21 -8q144 -133 144 -160q0 -9 -7 -19q-12 -16 -42 -54t-45 -60q23 -48 34 -82l152
-23q10 -2 17 -10.5t7 -19.5zM1920 198v-140q0 -16 -149 -31 q-12 -27 -30 -52q51 -113 51 -138q0 -4 -4 -7q-122 -71 -124 -71q-8 0 -46 47t-52 68q-20 -2 -30 -2t-30 2q-14 -21 -52 -68t-46 -47q-2 0 -124 71q-4 3 -4 7q0 25 51 138q-18 25 -30 52q-149 15 -149 31v140q0 16 149 31q13 29 30 52q-51 113 -51 138q0 4 4 7q4 2 35 20 t59 34t30 16q8 0 46 -46.5t52 -67.5q20 2 30 2t30 -2q51 71 92 112l6 2q4 0 124 -70q4 -3 4 -7q0 -25 -51 -138q17 -23 30 -52q149 -15 149 -31zM1920 1222v-140q0 -16 -149 -31q-12 -27 -30 -52q51 -113 51 -138q0 -4 -4 -7q-122 -71 -124 -71q-8 0 -46 47t-52 68 q-20 -2 -30 -2t-30 2q-14 -21 -52 -68t-46 -47q-2 0 -124 71q-4 3 -4 7q0 25 51 138q-18 25 -30 52q-149 15 -149 31v140q0 16 149 31q13 29 30 52q-51 113 -51 138q0 4 4 7q4 2 35 20t59 34t30 16q8 0 46 -46.5t52 -67.5q20 2 30 2t30 -2q51 71 92 112l6 2q4 0 124 -70 q4 -3 4 -7q0 -25 -51 -138q17 -23 30 -52q149 -15 149 -31z" />
-<glyph unicode="" horiz-adv-x="1792" d="M1408 768q0 -139 -94 -257t-256.5 -186.5t-353.5 -68.5q-86 0 -176 16q-124 -88 -278 -128q-36 -9 -86 -16h-3q-11 0 -20.5 8t-11.5 21q-1 3 -1 6.5t0.5 6.5t2 6l2.5 5t3.5 5.5t4 5t4.5 5t4 4.5q5 6 23 25t26 29.5t22.5 29t25 38.5t20.5 44q-124 72 -195 177t-71 224 q0 139 94 257t256.5 186.5t353.5 68.5t353.5 -68.5t256.5 -186.5t94 -257zM1792 512q0 -120 -71 -224.5t-195 -176.5q10 -24 20.5 -44t25 -38.5t22.5 -29t26 -29.5t23 -25q1 -1 4 -4.5t4.5 -5t4 -5t3.5 -5.5l2.5 -5t2 -6t0.5 -6.5t-1 -6.5q-3 -14 -13 -22t-22 -7 q-50 7 -86 16q-154 40 -278 128q-90 -16 -176 -16q-271 0 -472 132q58 -4 88 -4q161 0 309 45t264 129q125 92 192 212t67 254q0 77 -23 152q129 -71 204 -178t75 -230z" />
-<glyph unicode="" d="M256 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 768q0 51 -39 89.5t-89 38.5h-352q0 58 48 159.5t48 160.5q0 98 -32 145t-128 47q-26 -26 -38 -85t-30.5 -125.5t-59.5 -109.5q-22 -23 -77 -91q-4 -5 -23 -30t-31.5 -41t-34.5 -42.5 t-40 -44t-38.5 -35.5t-40 -27t-35.5 -9h-32v-640h32q13 0 31.5 -3t33 -6.5t38 -11t35 -11.5t35.5 -12.5t29 -10.5q211 -73 342 -73h121q192 0 192 167q0 26 -5 56q30 16 47.5 52.5t17.5 73.5t-18 69q53 50 53 119q0 25 -10 55.5t-25 47.5q32 1 53.5 47t21.5 81zM1536 769 q0 -89 -49 -163q9 -33 9 -69q0 -77 -38 -144q3 -21 3 -43q0 -101 -60 -178q1 -139 -85 -219.5t-227 -80.5h-36h-93q-96 0 -189.5 22.5t-216.5 65.5q-116 40 -138 40h-288q-53 0 -90.5 37.5t-37.5 90.5v640q0 53 37.5 90.5t90.5 37.5h274q36 24 137 155q58 75 107 128 q24 25 35.5 85.5t30.5 126.5t62 108q39 37 90 37q84 0 151 -32.5t102 -101.5t35 -186q0 -93 -48 -192h176q104 0 180 -76t76 -179z" />
-<glyph unicode="" d="M256 1088q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 512q0 35 -21.5 81t-53.5 47q15 17 25 47.5t10 55.5q0 69 -53 119q18 32 18 69t-17.5 73.5t-47.5 52.5q5 30 5 56q0 85 -49 126t-136 41h-128q-131 0 -342 -73q-5 -2 -29 -10.5 t-35.5 -12.5t-35 -11.5t-38 -11t-33 -6.5t-31.5 -3h-32v-640h32q16 0 35.5 -9t40 -27t38.5 -35.5t40 -44t34.5 -42.5t31.5 -41t23 -30q55 -68 77 -91q41 -43 59.5 -109.5t30.5 -125.5t38 -85q96 0 128 47t32 145q0 59 -48 160.5t-48 159.5h352q50 0 89 38.5t39 89.5z M1536 511q0 -103 -76 -179t-180 -76h-176q48 -99 48 -192q0 -118 -35 -186q-35 -69 -102 -101.5t-151 -32.5q-51 0 -90 37q-34 33 -54 82t-25.5 90.5t-17.5 84.5t-31 64q-48 50 -107 127q-101 131 -137 155h-274q-53 0 -90.5 37.5t-37.5 90.5v640q0 53 37.5 90.5t90.5 37.5 h288q22 0 138 40q128 44 223 66t200 22h112q140 0 226.5 -79t85.5 -216v-5q60 -77 60 -178q0 -22 -3 -43q38 -67 38 -144q0 -36 -9 -69q49 -74 49 -163z" />
-<glyph unicode="" horiz-adv-x="896" d="M832 1504v-1339l-449 -236q-22 -12 -40 -12q-21 0 -31.5 14.5t-10.5 35.5q0 6 2 20l86 500l-364 354q-25 27 -25 48q0 37 56 46l502 73l225 455q19 41 49 41z" />
-<glyph unicode="" horiz-adv-x="1792" d="M1664 940q0 81 -21.5 143t-55 98.5t-81.5 59.5t-94 31t-98 8t-112 -25.5t-110.5 -64t-86.5 -72t-60 -61.5q-18 -22 -49 -22t-49 22q-24 28 -60 61.5t-86.5 72t-110.5 64t-112 25.5t-98 -8t-94 -31t-81.5 -59.5t-55 -98.5t-21.5 -143q0 -168 187 -355l581 -560l580 559 q188 188 188 356zM1792 940q0 -221 -229 -450l-623 -600q-18 -18 -44 -18t-44 18l-624 602q-10 8 -27.5 26t-55.5 65.5t-68 97.5t-53.5 121t-23.5 138q0 220 127 344t351 124q62 0 126.5 -21.5t120 -58t95.5 -68.5t76 -68q36 36 76 68t95.5 68.5t120 58t126.5 21.5 q224 0 351 -124t127 -344z" />
-<glyph unicode="" horiz-adv-x="1664" d="M640 96q0 -4 1 -20t0.5 -26.5t-3 -23.5t-10 -19.5t-20.5 -6.5h-320q-119 0 -203.5 84.5t-84.5 203.5v704q0 119 84.5 203.5t203.5 84.5h320q13 0 22.5 -9.5t9.5 -22.5q0 -4 1 -20t0.5 -26.5t-3 -23.5t-10 -19.5t-20.5 -6.5h-320q-66 0 -113 -47t-47 -113v-704 q0 -66 47 -113t113 -47h288h11h13t11.5 -1t11.5 -3t8 -5.5t7 -9t2 -13.5zM1568 640q0 -26 -19 -45l-544 -544q-19 -19 -45 -19t-45 19t-19 45v288h-448q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h448v288q0 26 19 45t45 19t45 -19l544 -544q19 -19 19 -45z" />
-<glyph unicode="" d="M237 122h231v694h-231v-694zM483 1030q-1 52 -36 86t-93 34t-94.5 -34t-36.5 -86q0 -51 35.5 -85.5t92.5 -34.5h1q59 0 95 34.5t36 85.5zM1068 122h231v398q0 154 -73 233t-193 79q-136 0 -209 -117h2v101h-231q3 -66 0 -694h231v388q0 38 7 56q15 35 45 59.5t74 24.5 q116 0 116 -157v-371zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
-<glyph unicode="" horiz-adv-x="1152" d="M480 672v448q0 14 -9 23t-23 9t-23 -9t-9 -23v-448q0 -14 9 -23t23 -9t23 9t9 23zM1152 320q0 -26 -19 -45t-45 -19h-429l-51 -483q-2 -12 -10.5 -20.5t-20.5 -8.5h-1q-27 0 -32 27l-76 485h-404q-26 0 -45 19t-19 45q0 123 78.5 221.5t177.5 98.5v512q-52 0 -90 38 t-38 90t38 90t90 38h640q52 0 90 -38t38 -90t-38 -90t-90 -38v-512q99 0 177.5 -98.5t78.5 -221.5z" />
-<glyph unicode="" horiz-adv-x="1792" d="M1408 608v-320q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h704q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-704q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v320 q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1792 1472v-512q0 -26 -19 -45t-45 -19t-45 19l-176 176l-652 -652q-10 -10 -23 -10t-23 10l-114 114q-10 10 -10 23t10 23l652 652l-176 176q-19 19 -19 45t19 45t45 19h512q26 0 45 -19t19 -45z" />
-<glyph unicode="" d="M1184 640q0 -26 -19 -45l-544 -544q-19 -19 -45 -19t-45 19t-19 45v288h-448q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h448v288q0 26 19 45t45 19t45 -19l544 -544q19 -19 19 -45zM1536 992v-704q0 -119 -84.5 -203.5t-203.5 -84.5h-320q-13 0 -22.5 9.5t-9.5 22.5 q0 4 -1 20t-0.5 26.5t3 23.5t10 19.5t20.5 6.5h320q66 0 113 47t47 113v704q0 66 -47 113t-113 47h-288h-11h-13t-11.5 1t-11.5 3t-8 5.5t-7 9t-2 13.5q0 4 -1 20t-0.5 26.5t3 23.5t10 19.5t20.5 6.5h320q119 0 203.5 -84.5t84.5 -203.5z" />
-<glyph unicode="" horiz-adv-x="1664" d="M458 653q-74 162 -74 371h-256v-96q0 -78 94.5 -162t235.5 -113zM1536 928v96h-256q0 -209 -74 -371q141 29 235.5 113t94.5 162zM1664 1056v-128q0 -71 -41.5 -143t-112 -130t-173 -97.5t-215.5 -44.5q-42 -54 -95 -95q-38 -34 -52.5 -72.5t-14.5 -89.5q0 -54 30.5 -91 t97.5 -37q75 0 133.5 -45.5t58.5 -114.5v-64q0 -14 -9 -23t-23 -9h-832q-14 0 -23 9t-9 23v64q0 69 58.5 114.5t133.5 45.5q67 0 97.5 37t30.5 91q0 51 -14.5 89.5t-52.5 72.5q-53 41 -95 95q-113 5 -215.5 44.5t-173 97.5t-112 130t-41.5 143v128q0 40 28 68t68 28h288v96 q0 66 47 113t113 47h576q66 0 113 -47t47 -113v-96h288q40 0 68 -28t28 -68z" />
-<glyph unicode="" d="M394 184q-8 -9 -20 3q-13 11 -4 19q8 9 20 -3q12 -11 4 -19zM352 245q9 -12 0 -19q-8 -6 -17 7t0 18q9 7 17 -6zM291 305q-5 -7 -13 -2q-10 5 -7 12q3 5 13 2q10 -5 7 -12zM322 271q-6 -7 -16 3q-9 11 -2 16q6 6 16 -3q9 -11 2 -16zM451 159q-4 -12 -19 -6q-17 4 -13 15 t19 7q16 -5 13 -16zM514 154q0 -11 -16 -11q-17 -2 -17 11q0 11 16 11q17 2 17 -11zM572 164q2 -10 -14 -14t-18 8t14 15q16 2 18 -9zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-224q-16 0 -24.5 1t-19.5 5t-16 14.5t-5 27.5v239q0 97 -52 142q57 6 102.5 18t94 39 t81 66.5t53 105t20.5 150.5q0 121 -79 206q37 91 -8 204q-28 9 -81 -11t-92 -44l-38 -24q-93 26 -192 26t-192 -26q-16 11 -42.5 27t-83.5 38.5t-86 13.5q-44 -113 -7 -204q-79 -85 -79 -206q0 -85 20.5 -150t52.5 -105t80.5 -67t94 -39t102.5 -18q-40 -36 -49 -103 q-21 -10 -45 -15t-57 -5t-65.5 21.5t-55.5 62.5q-19 32 -48.5 52t-49.5 24l-20 3q-21 0 -29 -4.5t-5 -11.5t9 -14t13 -12l7 -5q22 -10 43.5 -38t31.5 -51l10 -23q13 -38 44 -61.5t67 -30t69.5 -7t55.5 3.5l23 4q0 -38 0.5 -103t0.5
-68q0 -22 -11 -33.5t-22 -13t-33 -1.5 h-224q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
-<glyph unicode="" horiz-adv-x="1664" d="M1280 64q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1536 64q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1664 288v-320q0 -40 -28 -68t-68 -28h-1472q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h427q21 -56 70.5 -92 t110.5 -36h256q61 0 110.5 36t70.5 92h427q40 0 68 -28t28 -68zM1339 936q-17 -40 -59 -40h-256v-448q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v448h-256q-42 0 -59 40q-17 39 14 69l448 448q18 19 45 19t45 -19l448 -448q31 -30 14 -69z" />
-<glyph unicode="" d="M1407 710q0 44 -7 113.5t-18 96.5q-12 30 -17 44t-9 36.5t-4 48.5q0 23 5 68.5t5 67.5q0 37 -10 55q-4 1 -13 1q-19 0 -58 -4.5t-59 -4.5q-60 0 -176 24t-175 24q-43 0 -94.5 -11.5t-85 -23.5t-89.5 -34q-137 -54 -202 -103q-96 -73 -159.5 -189.5t-88 -236t-24.5 -248.5 q0 -40 12.5 -120t12.5 -121q0 -23 -11 -66.5t-11 -65.5t12 -36.5t34 -14.5q24 0 72.5 11t73.5 11q57 0 169.5 -15.5t169.5 -15.5q181 0 284 36q129 45 235.5 152.5t166 245.5t59.5 275zM1535 712q0 -165 -70 -327.5t-196 -288t-281 -180.5q-124 -44 -326 -44 q-57 0 -170 14.5t-169 14.5q-24 0 -72.5 -14.5t-73.5 -14.5q-73 0 -123.5 55.5t-50.5 128.5q0 24 11 68t11 67q0 40 -12.5 120.5t-12.5 121.5q0 111 18 217.5t54.5 209.5t100.5 194t150 156q78 59 232 120q194 78 316 78q60 0 175.5 -24t173.5 -24q19 0 57 5t58 5 q81 0 118 -50.5t37 -134.5q0 -23 -5 -68t-5 -68q0 -10 1 -18.5t3 -17t4 -13.5t6.5 -16t6.5 -17q16 -40 25 -118.5t9 -136.5z" />
-<glyph unicode="" horiz-adv-x="1408" d="M1408 296q0 -27 -10 -70.5t-21 -68.5q-21 -50 -122 -106q-94 -51 -186 -51q-27 0 -52.5 3.5t-57.5 12.5t-47.5 14.5t-55.5 20.5t-49 18q-98 35 -175 83q-128 79 -264.5 215.5t-215.5 264.5q-48 77 -83 175q-3 9 -18 49t-20.5 55.5t-14.5 47.5t-12.5 57.5t-3.5 52.5 q0 92 51 186q56 101 106 122q25 11 68.5 21t70.5 10q14 0 21 -3q18 -6 53 -76q11 -19 30 -54t35 -63.5t31 -53.5q3 -4 17.5 -25t21.5 -35.5t7 -28.5q0 -20 -28.5 -50t-62 -55t-62 -53t-28.5 -46q0 -9 5 -22.5t8.5 -20.5t14 -24t11.5 -19q76 -137 174 -235t235 -174 q2 -1 19 -11.5t24 -14t20.5 -8.5t22.5 -5q18 0 46 28.5t53 62t55 62t50 28.5q14 0 28.5 -7t35.5 -21.5t25 -17.5q25 -15 53.5 -31t63.5 -35t54 -30q70 -35 76 -53q3 -7 3 -21z" />
-<glyph unicode="" horiz-adv-x="1408" d="M1120 1280h-832q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v832q0 66 -47 113t-113 47zM1408 1120v-832q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832 q119 0 203.5 -84.5t84.5 -203.5z" />
-<glyph unicode="" horiz-adv-x="1280" d="M1152 1280h-1024v-1242l423 406l89 85l89 -85l423 -406v1242zM1164 1408q23 0 44 -9q33 -13 52.5 -41t19.5 -62v-1289q0 -34 -19.5 -62t-52.5 -41q-19 -8 -44 -8q-48 0 -83 32l-441 424l-441 -424q-36 -33 -83 -33q-23 0 -44 9q-33 13 -52.5 41t-19.5 62v1289 q0 34 19.5 62t52.5 41q21 9 44 9h1048z" />
-<glyph unicode="" d="M1280 343q0 11 -2 16q-3 8 -38.5 29.5t-88.5 49.5l-53 29q-5 3 -19 13t-25 15t-21 5q-18 0 -47 -32.5t-57 -65.5t-44 -33q-7 0 -16.5 3.5t-15.5 6.5t-17 9.5t-14 8.5q-99 55 -170.5 126.5t-126.5 170.5q-2 3 -8.5 14t-9.5 17t-6.5 15.5t-3.5 16.5q0 13 20.5 33.5t45 38.5 t45 39.5t20.5 36.5q0 10 -5 21t-15 25t-13 19q-3 6 -15 28.5t-25 45.5t-26.5 47.5t-25 40.5t-16.5 18t-16 2q-48 0 -101 -22q-46 -21 -80 -94.5t-34 -130.5q0 -16 2.5 -34t5 -30.5t9 -33t10 -29.5t12.5 -33t11 -30q60 -164 216.5 -320.5t320.5 -216.5q6 -2 30 -11t33 -12.5 t29.5 -10t33 -9t30.5 -5t34 -2.5q57 0 130.5 34t94.5 80q22 53 22 101zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
-<glyph unicode="" horiz-adv-x="1664" d="M1620 1128q-67 -98 -162 -167q1 -14 1 -42q0 -130 -38 -259.5t-115.5 -248.5t-184.5 -210.5t-258 -146t-323 -54.5q-271 0 -496 145q35 -4 78 -4q225 0 401 138q-105 2 -188 64.5t-114 159.5q33 -5 61 -5q43 0 85 11q-112 23 -185.5 111.5t-73.5 205.5v4q68 -38 146 -41 q-66 44 -105 115t-39 154q0 88 44 163q121 -149 294.5 -238.5t371.5 -99.5q-8 38 -8 74q0 134 94.5 228.5t228.5 94.5q140 0 236 -102q109 21 205 78q-37 -115 -142 -178q93 10 186 50z" />
-<glyph unicode="" horiz-adv-x="768" d="M511 980h257l-30 -284h-227v-824h-341v824h-170v284h170v171q0 182 86 275.5t283 93.5h227v-284h-142q-39 0 -62.5 -6.5t-34 -23.5t-13.5 -34.5t-3 -49.5v-142z" />
-<glyph unicode="" d="M1536 640q0 -251 -146.5 -451.5t-378.5 -277.5q-27 -5 -39.5 7t-12.5 30v211q0 97 -52 142q57 6 102.5 18t94 39t81 66.5t53 105t20.5 150.5q0 121 -79 206q37 91 -8 204q-28 9 -81 -11t-92 -44l-38 -24q-93 26 -192 26t-192 -26q-16 11 -42.5 27t-83.5 38.5t-86 13.5 q-44 -113 -7 -204q-79 -85 -79 -206q0 -85 20.5 -150t52.5 -105t80.5 -67t94 -39t102.5 -18q-40 -36 -49 -103q-21 -10 -45 -15t-57 -5t-65.5 21.5t-55.5 62.5q-19 32 -48.5 52t-49.5 24l-20 3q-21 0 -29 -4.5t-5 -11.5t9 -14t13 -12l7 -5q22 -10 43.5 -38t31.5 -51l10 -23 q13 -38 44 -61.5t67 -30t69.5 -7t55.5 3.5l23 4q0 -38 0.5 -89t0.5 -54q0 -18 -13 -30t-40 -7q-232 77 -378.5 277.5t-146.5 451.5q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
-<glyph unicode="" horiz-adv-x="1664" d="M1664 960v-256q0 -26 -19 -45t-45 -19h-64q-26 0 -45 19t-19 45v256q0 106 -75 181t-181 75t-181 -75t-75 -181v-192h96q40 0 68 -28t28 -68v-576q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v576q0 40 28 68t68 28h672v192q0 185 131.5 316.5t316.5 131.5 t316.5 -131.5t131.5 -316.5z" />
-<glyph unicode="" horiz-adv-x="1920" d="M1760 1408q66 0 113 -47t47 -113v-1216q0 -66 -47 -113t-113 -47h-1600q-66 0 -113 47t-47 113v1216q0 66 47 113t113 47h1600zM160 1280q-13 0 -22.5 -9.5t-9.5 -22.5v-224h1664v224q0 13 -9.5 22.5t-22.5 9.5h-1600zM1760 0q13 0 22.5 9.5t9.5 22.5v608h-1664v-608 q0 -13 9.5 -22.5t22.5 -9.5h1600zM256 128v128h256v-128h-256zM640 128v128h384v-128h-384z" />
-<glyph unicode="" horiz-adv-x="1408" d="M384 192q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM896 69q2 -28 -17 -48q-18 -21 -47 -21h-135q-25 0 -43 16.5t-20 41.5q-22 229 -184.5 391.5t-391.5 184.5q-25 2 -41.5 20t-16.5 43v135q0 29 21 47q17 17 43 17h5q160 -13 306 -80.5 t259 -181.5q114 -113 181.5 -259t80.5 -306zM1408 67q2 -27 -18 -47q-18 -20 -46 -20h-143q-26 0 -44.5 17.5t-19.5 42.5q-12 215 -101 408.5t-231.5 336t-336 231.5t-408.5 102q-25 1 -42.5 19.5t-17.5 43.5v143q0 28 20 46q18 18 44 18h3q262 -13 501.5 -120t425.5 -294 q187 -186 294 -425.5t120 -501.5z" />
-<glyph unicode="" d="M1040 320q0 -33 -23.5 -56.5t-56.5 -23.5t-56.5 23.5t-23.5 56.5t23.5 56.5t56.5 23.5t56.5 -23.5t23.5 -56.5zM1296 320q0 -33 -23.5 -56.5t-56.5 -23.5t-56.5 23.5t-23.5 56.5t23.5 56.5t56.5 23.5t56.5 -23.5t23.5 -56.5zM1408 160v320q0 13 -9.5 22.5t-22.5 9.5 h-1216q-13 0 -22.5 -9.5t-9.5 -22.5v-320q0 -13 9.5 -22.5t22.5 -9.5h1216q13 0 22.5 9.5t9.5 22.5zM178 640h1180l-157 482q-4 13 -16 21.5t-26 8.5h-782q-14 0 -26 -8.5t-16 -21.5zM1536 480v-320q0 -66 -47 -113t-113 -47h-1216q-66 0 -113 47t-47 113v320q0 25 16 75 l197 606q17 53 63 86t101 33h782q55 0 101 -33t63 -86l197 -606q16 -50 16 -75z" />
-<glyph unicode="" horiz-adv-x="1792" d="M1664 896q53 0 90.5 -37.5t37.5 -90.5t-37.5 -90.5t-90.5 -37.5v-384q0 -52 -38 -90t-90 -38q-417 347 -812 380q-58 -19 -91 -66t-31 -100.5t40 -92.5q-20 -33 -23 -65.5t6 -58t33.5 -55t48 -50t61.5 -50.5q-29 -58 -111.5 -83t-168.5 -11.5t-132 55.5q-7 23 -29.5 87.5 t-32 94.5t-23 89t-15 101t3.5 98.5t22 110.5h-122q-66 0 -113 47t-47 113v192q0 66 47 113t113 47h480q435 0 896 384q52 0 90 -38t38 -90v-384zM1536 292v954q-394 -302 -768 -343v-270q377 -42 768 -341z" />
-<glyph unicode="" horiz-adv-x="1664" d="M848 -160q0 16 -16 16q-59 0 -101.5 42.5t-42.5 101.5q0 16 -16 16t-16 -16q0 -73 51.5 -124.5t124.5 -51.5q16 0 16 16zM183 128h1298q-164 181 -246.5 411.5t-82.5 484.5q0 256 -320 256t-320 -256q0 -254 -82.5 -484.5t-246.5 -411.5zM1664 128q0 -52 -38 -90t-90 -38 h-448q0 -106 -75 -181t-181 -75t-181 75t-75 181h-448q-52 0 -90 38t-38 90q190 161 287 397.5t97 498.5q0 165 96 262t264 117q-8 18 -8 37q0 40 28 68t68 28t68 -28t28 -68q0 -19 -8 -37q168 -20 264 -117t96 -262q0 -262 97 -498.5t287 -397.5z" />
-<glyph unicode="" d="M1376 640l138 -135q30 -28 20 -70q-12 -41 -52 -51l-188 -48l53 -186q12 -41 -19 -70q-29 -31 -70 -19l-186 53l-48 -188q-10 -40 -51 -52q-12 -2 -19 -2q-31 0 -51 22l-135 138l-135 -138q-28 -30 -70 -20q-41 11 -51 52l-48 188l-186 -53q-41 -12 -70 19q-31 29 -19 70 l53 186l-188 48q-40 10 -52 51q-10 42 20 70l138 135l-138 135q-30 28 -20 70q12 41 52 51l188 48l-53 186q-12 41 19 70q29 31 70 19l186 -53l48 188q10 41 51 51q41 12 70 -19l135 -139l135 139q29 30 70 19q41 -10 51 -51l48 -188l186 53q41 12 70 -19q31 -29 19 -70 l-53 -186l188 -48q40 -10 52 -51q10 -42 -20 -70z" />
-<glyph unicode="" horiz-adv-x="1792" d="M256 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1664 768q0 51 -39 89.5t-89 38.5h-576q0 20 15 48.5t33 55t33 68t15 84.5q0 67 -44.5 97.5t-115.5 30.5q-24 0 -90 -139q-24 -44 -37 -65q-40 -64 -112 -145q-71 -81 -101 -106 q-69 -57 -140 -57h-32v-640h32q72 0 167 -32t193.5 -64t179.5 -32q189 0 189 167q0 26 -5 56q30 16 47.5 52.5t17.5 73.5t-18 69q53 50 53 119q0 25 -10 55.5t-25 47.5h331q52 0 90 38t38 90zM1792 769q0 -105 -75.5 -181t-180.5 -76h-169q-4 -62 -37 -119q3 -21 3 -43 q0 -101 -60 -178q1 -139 -85 -219.5t-227 -80.5q-133 0 -322 69q-164 59 -223 59h-288q-53 0 -90.5 37.5t-37.5 90.5v640q0 53 37.5 90.5t90.5 37.5h288q10 0 21.5 4.5t23.5 14t22.5 18t24 22.5t20.5 21.5t19 21.5t14 17q65 74 100 129q13 21 33 62t37 72t40.5 63t55 49.5 t69.5 17.5q125 0 206.5 -67t81.5 -189q0 -68 -22 -128h374q104 0 180 -76t76 -179z" />
-<glyph unicode="" horiz-adv-x="1792" d="M1376 128h32v640h-32q-35 0 -67.5 12t-62.5 37t-50 46t-49 54q-2 3 -3.5 4.5t-4 4.5t-4.5 5q-72 81 -112 145q-14 22 -38 68q-1 3 -10.5 22.5t-18.5 36t-20 35.5t-21.5 30.5t-18.5 11.5q-71 0 -115.5 -30.5t-44.5 -97.5q0 -43 15 -84.5t33 -68t33 -55t15 -48.5h-576 q-50 0 -89 -38.5t-39 -89.5q0 -52 38 -90t90 -38h331q-15 -17 -25 -47.5t-10 -55.5q0 -69 53 -119q-18 -32 -18 -69t17.5 -73.5t47.5 -52.5q-4 -24 -4 -56q0 -85 48.5 -126t135.5 -41q84 0 183 32t194 64t167 32zM1664 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45 t45 -19t45 19t19 45zM1792 768v-640q0 -53 -37.5 -90.5t-90.5 -37.5h-288q-59 0 -223 -59q-190 -69 -317 -69q-142 0 -230 77.5t-87 217.5l1 5q-61 76 -61 178q0 22 3 43q-33 57 -37 119h-169q-105 0 -180.5 76t-75.5 181q0 103 76 179t180 76h374q-22 60 -22 128 q0 122 81.5 189t206.5 67q38 0 69.5 -17.5t55 -49.5t40.5 -63t37 -72t33 -62q35 -55 100 -129q2 -3 14 -17t19 -21.5t20.5 -21.5t24 -22.5t22.5 -18t23.5 -14t21.5 -4.5h288q53 0 90.5 -37.5t37.5 -90.5z" />
-<glyph unicode="" d="M1280 -64q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 700q0 189 -167 189q-26 0 -56 -5q-16 30 -52.5 47.5t-73.5 17.5t-69 -18q-50 53 -119 53q-25 0 -55.5 -10t-47.5 -25v331q0 52 -38 90t-90 38q-51 0 -89.5 -39t-38.5 -89v-576 q-20 0 -48.5 15t-55 33t-68 33t-84.5 15q-67 0 -97.5 -44.5t-30.5 -115.5q0 -24 139 -90q44 -24 65 -37q64 -40 145 -112q81 -71 106 -101q57 -69 57 -140v-32h640v32q0 72 32 167t64 193.5t32 179.5zM1536 705q0 -133 -69 -322q-59 -164 -59 -223v-288q0 -53 -37.5 -90.5 t-90.5 -37.5h-640q-53 0 -90.5 37.5t-37.5 90.5v288q0 10 -4.5 21.5t-14 23.5t-18 22.5t-22.5 24t-21.5 20.5t-21.5 19t-17 14q-74 65 -129 100q-21 13 -62 33t-72 37t-63 40.5t-49.5 55t-17.5 69.5q0 125 67 206.5t189 81.5q68 0 128 -22v374q0 104 76 180t179 76 q105 0 181 -75.5t76 -180.5v-169q62 -4 119 -37q21 3 43 3q101 0 178 -60q139 1 219.5 -85t80.5 -227z" />
-<glyph unicode="" d="M1408 576q0 84 -32 183t-64 194t-32 167v32h-640v-32q0 -35 -12 -67.5t-37 -62.5t-46 -50t-54 -49q-9 -8 -14 -12q-81 -72 -145 -112q-22 -14 -68 -38q-3 -1 -22.5 -10.5t-36 -18.5t-35.5 -20t-30.5 -21.5t-11.5 -18.5q0 -71 30.5 -115.5t97.5 -44.5q43 0 84.5 15t68 33 t55 33t48.5 15v-576q0 -50 38.5 -89t89.5 -39q52 0 90 38t38 90v331q46 -35 103 -35q69 0 119 53q32 -18 69 -18t73.5 17.5t52.5 47.5q24 -4 56 -4q85 0 126 48.5t41 135.5zM1280 1344q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1536 580 q0 -142 -77.5 -230t-217.5 -87l-5 1q-76 -61 -178 -61q-22 0 -43 3q-54 -30 -119 -37v-169q0 -105 -76 -180.5t-181 -75.5q-103 0 -179 76t-76 180v374q-54 -22 -128 -22q-121 0 -188.5 81.5t-67.5 206.5q0 38 17.5 69.5t49.5 55t63 40.5t72 37t62 33q55 35 129 100 q3 2 17 14t21.5 19t21.5 20.5t22.5 24t18 22.5t14 23.5t4.5 21.5v288q0 53 37.5 90.5t90.5 37.5h640q53 0 90.5 -37.5t37.5 -90.5v-288q0 -59 59 -223q69 -190 69 -317z" />
-<glyph unicode="" d="M1280 576v128q0 26 -19 45t-45 19h-502l189 189q19 19 19 45t-19 45l-91 91q-18 18 -45 18t-45 -18l-362 -362l-91 -91q-18 -18 -18 -45t18 -45l91 -91l362 -362q18 -18 45 -18t45 18l91 91q18 18 18 45t-18 45l-189 189h502q26 0 45 19t19 45zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
-<glyph unicode="" d="M1285 640q0 27 -18 45l-91 91l-362 362q-18 18 -45 18t-45 -18l-91 -91q-18 -18 -18 -45t18 -45l189 -189h-502q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h502l-189 -189q-19 -19 -19 -45t19 -45l91 -91q18 -18 45 -18t45 18l362 362l91 91q18 18 18 45zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
-<glyph unicode="" d="M1284 641q0 27 -18 45l-362 362l-91 91q-18 18 -45 18t-45 -18l-91 -91l-362 -362q-18 -18 -18 -45t18 -45l91 -91q18 -18 45 -18t45 18l189 189v-502q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v502l189 -189q19 -19 45 -19t45 19l91 91q18 18 18 45zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
-<glyph unicode="" d="M1284 639q0 27 -18 45l-91 91q-18 18 -45 18t-45 -18l-189 -189v502q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-502l-189 189q-19 19 -45 19t-45 -19l-91 -91q-18 -18 -18 -45t18 -45l362 -362l91 -91q18 -18 45 -18t45 18l91 91l362 362q18 18 18 45zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
-<glyph unicode="" d="M768 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM1042 887q-2 -1 -9.5 -9.5t-13.5 -9.5q2 0 4.5 5t5 11t3.5 7q6 7 22 15q14 6 52 12q34 8 51 -11 q-2 2 9.5 13t14.5 12q3 2 15 4.5t15 7.5l2 22q-12 -1 -17.5 7t-6.5 21q0 -2 -6 -8q0 7 -4.5 8t-11.5 -1t-9 -1q-10 3 -15 7.5t-8 16.5t-4 15q-2 5 -9.5 10.5t-9.5 10.5q-1 2 -2.5 5.5t-3 6.5t-4 5.5t-5.5 2.5t-7 -5t-7.5 -10t-4.5 -5q-3 2 -6 1.5t-4.5 -1t-4.5 -3t-5 -3.5 q-3 -2 -8.5 -3t-8.5 -2q15 5 -1 11q-10 4 -16 3q9 4 7.5 12t-8.5 14h5q-1 4 -8.5 8.5t-17.5 8.5t-13 6q-8 5 -34 9.5t-33 0.5q-5 -6 -4.5 -10.5t4 -14t3.5 -12.5q1 -6 -5.5 -13t-6.5 -12q0 -7 14 -15.5t10 -21.5q-3 -8 -16 -16t-16 -12q-5 -8 -1.5 -18.5t10.5 -16.5 q2 -2 1.5 -4t-3.5 -4.5t-5.5 -4t-6.5 -3.5l-3 -2q-11 -5 -20.5 6t-13.5 26q-7 25 -16 30q-23 8 -29 -1q-5 13 -41 26q-25 9 -58 4q6 1 0 15q-7 15 -19 12q3 6 4 17.5t1 13.5q3 13 12 23q1 1 7 8.5t9.5 13.5t0.5 6q35 -4 50 11q5 5 11.5 17
t10.5 17q9 6 14 5.5t14.5 -5.5 t14.5 -5q14 -1 15.5 11t-7.5 20q12 -1 3 17q-5 7 -8 9q-12 4 -27 -5q-8 -4 2 -8q-1 1 -9.5 -10.5t-16.5 -17.5t-16 5q-1 1 -5.5 13.5t-9.5 13.5q-8 0 -16 -15q3 8 -11 15t-24 8q19 12 -8 27q-7 4 -20.5 5t-19.5 -4q-5 -7 -5.5 -11.5t5 -8t10.5 -5.5t11.5 -4t8.5 -3 q14 -10 8 -14q-2 -1 -8.5 -3.5t-11.5 -4.5t-6 -4q-3 -4 0 -14t-2 -14q-5 5 -9 17.5t-7 16.5q7 -9 -25 -6l-10 1q-4 0 -16 -2t-20.5 -1t-13.5 8q-4 8 0 20q1 4 4 2q-4 3 -11 9.5t-10 8.5q-46 -15 -94 -41q6 -1 12 1q5 2 13 6.5t10 5.5q34 14 42 7l5 5q14 -16 20 -25 q-7 4 -30 1q-20 -6 -22 -12q7 -12 5 -18q-4 3 -11.5 10t-14.5 11t-15 5q-16 0 -22 -1q-146 -80 -235 -222q7 -7 12 -8q4 -1 5 -9t2.5 -11t11.5 3q9 -8 3 -19q1 1 44 -27q19 -17 21 -21q3 -11 -10 -18q-1 2 -9 9t-9 4q-3 -5 0.5 -18.5t10.5 -12.5q-7 0 -9.5 -16t-2.5 -35.5 t-1 -23.5l2 -1q-3 -12 5.5 -34.5t21.5 -19.5q-13 -3 20 -43q6 -8 8 -9q3 -2 12 -7.5t15 -10t10 -10.5q4 -5 10 -22.5t14 -23.5q-2 -6 9.5 -20t10.5 -23q-1 0 -2.5 -1t-2.5 -1q3 -7 15.5 -14t15.5 -13q1 -3 2 -10t3 -11t8 -2q2 20 -24 62q-1
5 25 -17 29q-3 5 -5.5 15.5 t-4.5 14.5q2 0 6 -1.5t8.5 -3.5t7.5 -4t2 -3q-3 -7 2 -17.5t12 -18.5t17 -19t12 -13q6 -6 14 -19.5t0 -13.5q9 0 20 -10t17 -20q5 -8 8 -26t5 -24q2 -7 8.5 -13.5t12.5 -9.5l16 -8t13 -7q5 -2 18.5 -10.5t21.5 -11.5q10 -4 16 -4t14.5 2.5t13.5 3.5q15 2 29 -15t21 -21 q36 -19 55 -11q-2 -1 0.5 -7.5t8 -15.5t9 -14.5t5.5 -8.5q5 -6 18 -15t18 -15q6 4 7 9q-3 -8 7 -20t18 -10q14 3 14 32q-31 -15 -49 18q0 1 -2.5 5.5t-4 8.5t-2.5 8.5t0 7.5t5 3q9 0 10 3.5t-2 12.5t-4 13q-1 8 -11 20t-12 15q-5 -9 -16 -8t-16 9q0 -1 -1.5 -5.5t-1.5 -6.5 q-13 0 -15 1q1 3 2.5 17.5t3.5 22.5q1 4 5.5 12t7.5 14.5t4 12.5t-4.5 9.5t-17.5 2.5q-19 -1 -26 -20q-1 -3 -3 -10.5t-5 -11.5t-9 -7q-7 -3 -24 -2t-24 5q-13 8 -22.5 29t-9.5 37q0 10 2.5 26.5t3 25t-5.5 24.5q3 2 9 9.5t10 10.5q2 1 4.5 1.5t4.5 0t4 1.5t3 6q-1 1 -4 3 q-3 3 -4 3q7 -3 28.5 1.5t27.5 -1.5q15 -11 22 2q0 1 -2.5 9.5t-0.5 13.5q5 -27 29 -9q3 -3 15.5 -5t17.5 -5q3 -2 7 -5.5t5.5 -4.5t5 0.5t8.5 6.5q10 -14 12 -24q11 -40 19 -44q7 -3 11 -2t4.5 9.5t0 14t-1.5 12.5l-1 8v18l-1 8q
-15 3 -18.5 12t1.5 18.5t15 18.5q1 1 8 3.5 t15.5 6.5t12.5 8q21 19 15 35q7 0 11 9q-1 0 -5 3t-7.5 5t-4.5 2q9 5 2 16q5 3 7.5 11t7.5 10q9 -12 21 -2q7 8 1 16q5 7 20.5 10.5t18.5 9.5q7 -2 8 2t1 12t3 12q4 5 15 9t13 5l17 11q3 4 0 4q18 -2 31 11q10 11 -6 20q3 6 -3 9.5t-15 5.5q3 1 11.5 0.5t10.5 1.5 q15 10 -7 16q-17 5 -43 -12zM879 10q206 36 351 189q-3 3 -12.5 4.5t-12.5 3.5q-18 7 -24 8q1 7 -2.5 13t-8 9t-12.5 8t-11 7q-2 2 -7 6t-7 5.5t-7.5 4.5t-8.5 2t-10 -1l-3 -1q-3 -1 -5.5 -2.5t-5.5 -3t-4 -3t0 -2.5q-21 17 -36 22q-5 1 -11 5.5t-10.5 7t-10 1.5t-11.5 -7 q-5 -5 -6 -15t-2 -13q-7 5 0 17.5t2 18.5q-3 6 -10.5 4.5t-12 -4.5t-11.5 -8.5t-9 -6.5t-8.5 -5.5t-8.5 -7.5q-3 -4 -6 -12t-5 -11q-2 4 -11.5 6.5t-9.5 5.5q2 -10 4 -35t5 -38q7 -31 -12 -48q-27 -25 -29 -40q-4 -22 12 -26q0 -7 -8 -20.5t-7 -21.5q0 -6 2 -16z" />
-<glyph unicode="" horiz-adv-x="1664" d="M384 64q0 26 -19 45t-
<TRUNCATED>
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/font/fontawesome-webfont.ttf
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/font/fontawesome-webfont.ttf b/ocw-ui/frontend/app/font/fontawesome-webfont.ttf
deleted file mode 100755
index d365924..0000000
Binary files a/ocw-ui/frontend/app/font/fontawesome-webfont.ttf and /dev/null differ
[20/28] CLIMATE-512 - Replace frontend with new Yeoman/Grunt/Bower
frontend
Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/font/fontawesome-webfont.woff
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/font/fontawesome-webfont.woff b/ocw-ui/frontend/app/font/fontawesome-webfont.woff
deleted file mode 100755
index b9bd17e..0000000
Binary files a/ocw-ui/frontend/app/font/fontawesome-webfont.woff and /dev/null differ
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/img/globe.png
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/img/globe.png b/ocw-ui/frontend/app/img/globe.png
deleted file mode 100644
index 5099b4e..0000000
Binary files a/ocw-ui/frontend/app/img/globe.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/img/glyphicons-halflings-white.png
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/img/glyphicons-halflings-white.png b/ocw-ui/frontend/app/img/glyphicons-halflings-white.png
deleted file mode 100644
index 3bf6484..0000000
Binary files a/ocw-ui/frontend/app/img/glyphicons-halflings-white.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/img/glyphicons-halflings.png
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/img/glyphicons-halflings.png b/ocw-ui/frontend/app/img/glyphicons-halflings.png
deleted file mode 100644
index a996999..0000000
Binary files a/ocw-ui/frontend/app/img/glyphicons-halflings.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/index.html
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/index.html b/ocw-ui/frontend/app/index.html
old mode 100755
new mode 100644
index 95ce8e4..01a6e89
--- a/ocw-ui/frontend/app/index.html
+++ b/ocw-ui/frontend/app/index.html
@@ -7,7 +7,7 @@ to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
+ http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
@@ -18,108 +18,131 @@ under the License.
-->
<!doctype html>
-<html lang="en" ng-app="ocw">
-<head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>OCW UI</title>
- <link rel="stylesheet" href="css/lib/bootstrap.min.css"/>
- <link rel="stylesheet" href="css/lib/bootstrap-responsive.min.css"/>
- <link rel="stylesheet" href="css/lib/font-awesome.min.css"/>
- <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.5/leaflet.css" />
- <link rel="stylesheet" href="css/lib/timeline.css"/>
- <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/themes/ui-lightness/jquery-ui.min.css" type="text/css"/>
- <!--[if lte IE 8]>
- <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.5/leaflet.ie.css" />
- <![endif]-->
- <link rel="stylesheet" href="css/app.css"/>
-</head>
-<body ng-cloak>
+<html class="no-js">
+ <head>
+ <meta charset="utf-8">
+ <title></title>
+ <meta name="description" content="">
+ <meta name="viewport" content="width=device-width">
+ <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
+ <!-- build:css(.) styles/vendor.css -->
+ <!-- bower:css -->
+ <link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css" />
+ <link rel="stylesheet" href="bower_components/leaflet/dist/leaflet.css" />
+ <link rel="stylesheet" href="bower_components/chap-links-timeline/timeline.css" />
+ <link rel="stylesheet" href="bower_components/components-font-awesome/css/font-awesome.css" />
+ <!-- endbower -->
+ <!-- endbuild -->
+ <!-- build:css(.tmp) styles/main.css -->
+ <link rel="stylesheet" href="styles/main.css">
+ <!-- endbuild -->
+ <link rel="stylesheet" href="bower_components/jquery-ui/themes/smoothness/jquery-ui.css" />
+ </head>
+ <body ng-app="ocwUiApp">
+ <!--[if lt IE 7]>
+ <p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
+ <![endif]-->
-<div class="container">
- <div class="row-fluid">
- <div class="span12">
- <!-- Title -->
- <div class="row-fluid">
- <div class="span12">
- <br><br>
- <div id="header">
- <img id="header-img" src=""/>
- <h3 id="header-title">Project Name</h3>
- <h5 id="OCW-powered">Powered by Apache Open Climate Workbench</h5>
+ <div class="container">
+ <div class="row">
+ <div class="navbar navbar-default" id="ocw-navbar" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <a class="navbar-brand brand" href="#">OCW UI</a>
+ </div>
+ <div class="navbar-collapse">
+ <ul class="nav navbar-nav">
+ <li ng-class="{ active: $state.includes('main') }"><a href="#/evalute">Evaluate</a></li>
+ <li ng-class="{ active: $state.includes('results') }"><a href="#/results">Results</a></li>
+ </ul>
+ </div>
+ </div>
</div>
+ <div class="row">
+ <div class="col-md-12">
+ <div id="header">
+ <img id="header-img" src=""/>
+ <h3 id="header-title">Project Name</h3>
+ <h5 id="OCW-powered">Powered by Apache Open Climate Workbench</h5>
+ </div>
+ </div>
</div>
</div>
- <!-- Navigation bar -->
- <div class="row-fluid">
- <div class="navbar navbar-fixed-top">
- <div class="navbar-inner">
- <div class="container">
- <a class="brand" href="#">OCW UI</a>
- <ul class="nav">
- <li ng-class="{ active: $state.includes('main') }"><a href="#">Evaluate</a></li>
- <li ng-class="{ active: $state.includes('results') }"><a href="#/results">Results</a></li>
- </ul>
- </div>
- </div>
- </div>
- </div>
+ <!-- Main Content -->
+ <div id="main-container" class="container" ui-view></div>
</div>
- </div>
- <!-- Main Content -->
- <div id="main-container" class="container" ui-view ng-animate="{enter:'fade-enter'}"></div>
-</div>
- <!--Libraries-->
- <script src="js/lib/jquery/jquery-1.10.1.js"></script>
- <script src="js/lib/jquery/jquery-ui/jquery-ui-1.10.3.min.js"></script>
- <script src="js/lib/angular/angular.min.js"></script>
- <script src="js/lib/angular-ui/angular-ui-0.4-tpls.js"></script>
- <script src="js/lib/jquery/jquery-ui/datepicker-wrapper/date.js"></script>
- <script src="js/lib/bootstrap/bootstrap.js"></script>
- <script src="js/lib/leaflet/leaflet-0.5.js"></script>
- <script src="http://www.google.com/jsapi"></script>
- <script src="js/lib/timeline/timeline.js"></script>
- <script src="js/lib/angular-ui/angular-ui-router.min.js"></script>
- <script src="js/lib/angular-ui/ui-bootstrap-tpls-0.5.0.min.js"></script>
- <!--Timeline refuses to initialize nicely so we're doing this as a workaround-->
- <script type="text/javascript">google.load("visualization", "1");</script>
-
- <!--General-->
- <script src="js/app.js"></script>
+ <!-- Google Analytics: change UA-XXXXX-X to be your site's ID -->
+ <script>
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+ })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+ ga('create', 'UA-XXXXX-X');
+ ga('send', 'pageview');
+ </script>
+
+ <!-- build:js(.) scripts/oldieshim.js -->
+ <!--[if lt IE 9]>
+ <script src="bower_components/es5-shim/es5-shim.js"></script>
+ <script src="bower_components/json3/lib/json3.min.js"></script>
+ <![endif]-->
+ <!-- endbuild -->
- <!--Services-->
- <script src="js/services/SelectedDatasetInformation.js"></script>
- <script src="js/services/RegionSelectParams.js"></script>
- <script src="js/services/EvaluationSettings.js"></script>
+ <!-- Google visualization library needs to be initialized for the timeline -->
+ <!-- Note that the terms of use forbid having a local copy of the code, so we're -->
+ <!-- stuck downloading it this way unfortunately. -->
+ <script type="text/javascript" src="http://www.google.com/jsapi"></script>
+ <script type="text/javascript">google.load("visualization", "1");</script>
- <!--Controllers-->
- <script src="js/controllers/WorldMapCtrl.js"></script>
- <script src="js/controllers/ParameterSelectCtrl.js"></script>
- <script src="js/controllers/DatasetDisplayCtrl.js"></script>
- <script src="js/controllers/ObservationSelectCtrl.js"></script>
- <script src="js/controllers/RcmedSelectionCtrl.js"></script>
- <script src="js/controllers/SettingsCtrl.js"></script>
- <script src="js/controllers/TimelineCtrl.js"></script>
- <script src="js/controllers/DatasetSelectCtrl.js"></script>
- <script src="js/controllers/ResultCtrl.js"></script>
- <script src="js/controllers/ResultDetailCtrl.js"></script>
+ <!-- build:js(.) scripts/vendor.js -->
+ <!-- bower:js -->
+ <script src="bower_components/jquery/dist/jquery.js"></script>
+ <script src="bower_components/angular/angular.js"></script>
+ <script src="bower_components/json3/lib/json3.js"></script>
+ <script src="bower_components/bootstrap/dist/js/bootstrap.js"></script>
+ <script src="bower_components/angular-resource/angular-resource.js"></script>
+ <script src="bower_components/angular-cookies/angular-cookies.js"></script>
+ <script src="bower_components/angular-animate/angular-animate.js"></script>
+ <script src="bower_components/angular-route/angular-route.js"></script>
+ <script src="bower_components/angular-ui-router/release/angular-ui-router.js"></script>
+ <script src="bower_components/leaflet/dist/leaflet.js"></script>
+ <script src="bower_components/leaflet/dist/leaflet-src.js"></script>
+ <script src="bower_components/chap-links-timeline/timeline-min.js"></script>
+ <script src="bower_components/angular-bootstrap/ui-bootstrap-tpls.js"></script>
+ <script src="bower_components/jquery-ui/jquery-ui.js"></script>
+ <script src="bower_components/angular-ui-date/ui-date.js"></script>
+ <!-- endbower -->
+ <!-- endbuild -->
- <!--Directives-->
- <script src="js/directives/LeafletMap.js"></script>
- <script src="js/directives/PreviewMap.js"></script>
- <script src="js/directives/BootstrapModal.js"></script>
- <script src="js/directives/BootstrapModalOpen.js"></script>
- <script src="js/directives/PredictiveFileBrowserInput.js"></script>
- <script src="js/directives/OnBlur.js"></script>
- <script src="js/directives/Timeline.js"></script>
+ <!-- build:js({.tmp,app}) scripts/scripts.js -->
+ <script src="scripts/app.js"></script>
+ <script src="scripts/controllers/main.js"></script>
+ <script src="scripts/controllers/about.js"></script>
+ <script src="scripts/controllers/datasetdisplay.js"></script>
+ <script src="scripts/controllers/datasetselect.js"></script>
+ <script src="scripts/controllers/observationselect.js"></script>
+ <script src="scripts/controllers/parameterselect.js"></script>
+ <script src="scripts/controllers/rcmedselection.js"></script>
+ <script src="scripts/controllers/result.js"></script>
+ <script src="scripts/controllers/resultdetail.js"></script>
+ <script src="scripts/controllers/settings.js"></script>
+ <script src="scripts/controllers/timeline.js"></script>
+ <script src="scripts/controllers/worldmap.js"></script>
+ <script src="scripts/directives/bootstrapmodal.js"></script>
+ <script src="scripts/directives/bootstrapmodalopen.js"></script>
+ <script src="scripts/directives/leafletmap.js"></script>
+ <script src="scripts/directives/onblur.js"></script>
+ <script src="scripts/directives/predictivefilebrowserinput.js"></script>
+ <script src="scripts/directives/previewmap.js"></script>
+ <script src="scripts/directives/timeline.js"></script>
+ <script src="scripts/filters/isodatetomiddleendian.js"></script>
+ <script src="scripts/services/evaluationsettings.js"></script>
+ <script src="scripts/services/regionselectparams.js"></script>
+ <script src="scripts/services/selecteddatasetinformation.js"></script>
+ <!-- endbuild -->
- <!--Filters-->
- <script src="js/filters/ISODateToMiddleEndian.js"></script>
-</body>
-<footer class="container well well-small" style="margin-top: 40px">
- <div class="span4 offset1">
- <h6>Powered by Apache Open Climate Workbench</h6>
- </div>
-</footer>
+ <!-- grunt wiredep wasn't properly linking this. Had to add manually -->
+ <script src="bower_components/angular-ui-date/src/date.js"></script>
+ </body>
</html>
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/js/app.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/js/app.js b/ocw-ui/frontend/app/js/app.js
deleted file mode 100755
index 2645e27..0000000
--- a/ocw-ui/frontend/app/js/app.js
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
-**/
-
-'use strict';
-
-// We're creating a "global" application object. This allows us to keep module
-// names isolated to a single location as well as simplifying future init code.
-var App = App || {};
-
-App.Services = angular.module('ocw.services', []);
-App.Directives = angular.module('ocw.directives', []);
-App.Controllers = angular.module('ocw.controllers', []);
-App.Filters = angular.module('ocw.filters', []);
-
-angular.module('ocw', ['ocw.services', 'ocw.directives', 'ocw.controllers', 'ocw.filters', 'ui.date', 'ui.bootstrap', 'ui.compat', 'ui.state'])
-.config(
- [ '$stateProvider', '$routeProvider', '$urlRouterProvider',
- function ($stateProvider, $routeProvider, $urlRouterProvider) {
- $urlRouterProvider
- .when('/r?id', '/results/:id')
- .otherwise('/');
-
- $routeProvider
- .when('/evaluation/:id', {
- redirectTo: '/results/:id',
- })
- .when('/', {
- redirectTo: '/evaluate',
- });
-
- $stateProvider
- .state('main',{
- url: '/evaluate',
- templateUrl: 'partials/main.html',
- })
- .state('results', {
- url: '/results',
- abstract: true,
- templateUrl: 'partials/results.html',
- controller: 'ResultCtrl'
- })
- .state('results.list', {
- // parent: 'results',
- url: '',
- templateUrl: 'partials/results.list.html',
- })
- .state('results.detail', {
- // parent: 'results',
- url: '/{resultId}',
- views: {
- '': {
- templateUrl: 'partials/results.detail.html',
- controller: 'ResultDetailCtrl'
- },
- 'menu': {
- templateProvider:
- [ '$stateParams',
- function ($stateParams){
- return '<hr><small class="muted">result ID: ' + $stateParams.resultId + '</small>';
- }],
- },
- },
- });
- }])
-.run(
- [ '$rootScope', '$state', '$stateParams',
- function ($rootScope, $state, $stateParams) {
- $rootScope.$state = $state;
- $rootScope.$stateParams = $stateParams;
- $rootScope.evalResults = "";
- $rootScope.fillColors = ['#ff0000', '#00c90d', '#cd0074', '#f3fd00'];
- $rootScope.surroundColors = ['#a60000', '#008209', '#8f004b', '#93a400']
- $rootScope.baseURL = 'http://localhost:8082';
-}]);
-
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/js/controllers/DatasetDisplayCtrl.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/js/controllers/DatasetDisplayCtrl.js b/ocw-ui/frontend/app/js/controllers/DatasetDisplayCtrl.js
deleted file mode 100644
index b98ff3f..0000000
--- a/ocw-ui/frontend/app/js/controllers/DatasetDisplayCtrl.js
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
-**/
-
-// Controller for dataset display
-App.Controllers.controller('DatasetDisplayCtrl', ['$rootScope', '$scope', 'selectedDatasetInformation',
-function($rootScope, $scope, selectedDatasetInformation) {
- $scope.datasets = selectedDatasetInformation.getDatasets();
-
- $scope.removeDataset = function($index) {
- selectedDatasetInformation.removeDataset($index);
- }
-
- $scope.setRegridBase = function(index) {
- for (var i = 0; i < $scope.datasets.length; i++) {
- $scope.datasets[i].regrid = ((i == index) ? $scope.datasets[i].regrid : false);
- }
- }
-}]);
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/js/controllers/DatasetSelectCtrl.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/js/controllers/DatasetSelectCtrl.js b/ocw-ui/frontend/app/js/controllers/DatasetSelectCtrl.js
deleted file mode 100644
index 14c5ea9..0000000
--- a/ocw-ui/frontend/app/js/controllers/DatasetSelectCtrl.js
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
-**/
-
-// Controller for dataset selection/modification
-App.Controllers.controller('DatasetSelectCtrl', ['$scope', 'selectedDatasetInformation',
-function($scope, selectedDatasetInformation) {
-
- // Grab a copy of the datasets so we can display a count to the user!
- $scope.datasetCount = selectedDatasetInformation.getDatasets();
-
- $scope.shouldDisableClearButton = function() {
- return (selectedDatasetInformation.getDatasetCount() == 0);
- }
-
- $scope.clearDatasets = function() {
- selectedDatasetInformation.clearDatasets();
- }
-
- $scope.open = function () {
- $scope.datasetSelect = true;
- }
-
- $scope.close = function () {
- $scope.datasetSelect = false;
- }
-
- $scope.opts = {
- backdropFade: true,
- dialogFade:true
- };
-
- $scope.templates =
- [ { title:'Local File', url: 'partials/selectObservation.html'}
- , { title:'RCMED', url: 'partials/selectRcmed.html'}
- , { title:'ESG', disabled: true } ];
-
- $scope.template = $scope.templates[0];
-
-}]);
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/js/controllers/ObservationSelectCtrl.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/js/controllers/ObservationSelectCtrl.js b/ocw-ui/frontend/app/js/controllers/ObservationSelectCtrl.js
deleted file mode 100644
index cec04bb..0000000
--- a/ocw-ui/frontend/app/js/controllers/ObservationSelectCtrl.js
+++ /dev/null
@@ -1,194 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
-**/
-
-// Controller for observation selection in modal
-App.Controllers.controller('ObservationSelectCtrl', ['$rootScope', '$scope', '$http', '$q', '$timeout', 'selectedDatasetInformation',
-function($rootScope, $scope, $http, $q, $timeout, selectedDatasetInformation) {
- // Grab a copy of the datasets so we can display a count to the user!
- $scope.datasetCount = selectedDatasetInformation.getDatasets();
-
- // Initalize the option arrays and default to the first element
- $scope.params = ["Please select a file above"];
- $scope.paramSelect = $scope.params[0];
- $scope.lats = ["Please select a file above"];
- $scope.latsSelect = $scope.lats[0];
- $scope.lons = ["Please select a file above"];
- $scope.lonsSelect = $scope.lons[0];
- $scope.times = ["Please select a file above"];
- $scope.timeSelect = $scope.times[0];
-
- // Grab the path leader information that the webserver is using to limit directory access.
- $scope.pathLeader = 'False';
- $http.jsonp($rootScope.baseURL + '/dir/path_leader/?callback=JSON_CALLBACK').
- success(function(data) {
- $scope.pathLeader = data.leader;
- });
-
- // Toggle load button view depending on upload state of selected files
- $scope.loadingFile = false;
-
- // Toggle display of a confirmation when loading a dataset
- $scope.fileAdded = false;
-
- $scope.latLonVals = [];
- $scope.timeVals = [];
- $scope.localSelectForm = {};
-
- $scope.uploadLocalFile = function() {
- $scope.loadingFile = true;
-
- // TODO: Need to try to validate the input a bit. At least make sure we're not
- // pointing at a directory perhaps?
-
- // TODO: Two-way binding with ng-model isn't being used here because it fails to update
- // properly with the auto-complete that we're using on the input box. So we're doing
- // it the wrong way temporarily...
- var input = $('#observationFileInput').val();
-
- // If the backend is limiting directory access we need to add that leader to our path
- // so it remains valid!
- if ($scope.pathLeader != 'False') {
- input = $scope.pathLeader + input
- }
-
- // TODO: We're not really handling the case where there is a failure here at all.
- // Should check for fails and allow the user to make changes.
- //
- // Get model variables
- var varsPromise = $http.jsonp($rootScope.baseURL + '/lfme/list_vars/' + input + '?callback=JSON_CALLBACK');
- // Get Lat and Lon variables
- var latlonPromise = $http.jsonp($rootScope.baseURL + '/lfme/list_latlon/' + input + '?callback=JSON_CALLBACK');
- // Get Time variables
- var timesPromise = $http.jsonp($rootScope.baseURL + '/lfme/list_time/' + input + '?callback=JSON_CALLBACK');
-
- $q.all([varsPromise, latlonPromise, timesPromise]).then(
- // Handle success fetches!
- function(arrayOfResults) {
- $scope.loadingFile = false;
-
- // Handle lat/lon results
- var data = arrayOfResults[1].data;
- $scope.lats = [data.lat_name];
- $scope.lons = [data.lon_name];
- $scope.latLonVals = [data.lat_min, data.lat_max, data.lon_min, data.lon_max];
-
- // If there is more than one option for the user, tell them they need to pick one!
- if ($scope.lats.length > 1) $scope.lats.splice(0, 0, "Please select an option");
- if ($scope.lons.length > 1) $scope.lons.splice(0, 0, "Please select an option");
- // Default the display to the first available option.
- $scope.latsSelect = $scope.lats[0];
- $scope.lonsSelect = $scope.lons[0];
-
- // Handle time results
- var data = arrayOfResults[2].data
- $scope.times = [data.time_name];
- $scope.timeVals = [data.start_time, data.end_time];
-
- if ($scope.times.length > 1) $scope.times.splice(0, 0, "Please select an option");
- $scope.timeSelect = $scope.times[0];
-
- // Handle parameter results
- var data = arrayOfResults[0].data.variables;
- $scope.params = (data instanceof Array) ? data : [data];
- $scope.params = $.grep($scope.params,
- function(val) {
- return ($.inArray(val, $scope.lats) != 0 &&
- $.inArray(val, $scope.lons) != 0 &&
- $.inArray(val, $scope.times) != 0);
- });
-
- if ($scope.params.length > 1) $scope.params.splice(0, 0, "Please select an option");
- $scope.paramSelect = $scope.params[0];
- },
- // Uh oh! AT LEAST on of our fetches failed
- function(arrayOfFailure) {
- $scope.loadingFile = false;
-
- $scope.params = ["Unable to load variable(s)"];
- $scope.paramSelect = $scope.params[0];
- $scope.lats = ["Unable to load variable(s)"];
- $scope.latsSelect = $scope.lats[0];
- $scope.lons = ["Unable to load variable(s)"];
- $scope.lonsSelect = $scope.lons[0];
- $scope.times = ["Unable to load variable(s)"];
- $scope.timeSelect = $scope.times[0];
- }
- );
- };
-
- $scope.addDataSet = function() {
- // TODO: Need to verify that all the variables selected are correct!!!
- // TODO: We shouldn't allow different parameters to match the same variables!!
-
- var newDataset = {};
- var input = $('#observationFileInput').val();
-
- // If the backend is limiting directory access we need to add that leader to our path
- // so it remains valid!
- if ($scope.pathLeader != 'False') {
- input = $scope.pathLeader + input
- }
-
- newDataset['isObs'] = 0;
- // Save the model path. Note that the path is effectively the "id" for the model.
- newDataset['id'] = input;
- // Grab the file name later for display purposes.
- var splitFilePath = input.split('/');
- newDataset['name'] = splitFilePath[splitFilePath.length - 1];
- // Save the model parameter variable. We save it twice for consistency and display convenience.
- newDataset['param'] = $scope.paramSelect;
- newDataset['paramName'] = newDataset['param'];
- // Save the lat/lon information
- newDataset['lat'] = $scope.latsSelect;
- newDataset['lon'] = $scope.lonsSelect;
-
- newDataset['latlonVals'] = {"latMin": $scope.latLonVals[0], "latMax": $scope.latLonVals[1],
- "lonMin": $scope.latLonVals[2], "lonMax": $scope.latLonVals[3]};
- // Get the time information
- newDataset['time'] = $scope.timeSelect;
- newDataset['timeVals'] = {"start": $scope.timeVals[0], "end": $scope.timeVals[1]};
-
- selectedDatasetInformation.addDataset(newDataset);
-
- // Reset all the fields!!
- $scope.params = ["Please select a file above"];
- $scope.paramSelect = $scope.params[0];
- $scope.lats = ["Please select a file above"];
- $scope.latsSelect = $scope.lats[0];
- $scope.lons = ["Please select a file above"];
- $scope.lonsSelect = $scope.lons[0];
- $scope.times = ["Please select a file above"];
- $scope.timeSelect = $scope.times[0];
- $scope.latLonVals = [];
- $scope.timeVals = [];
-
- // Clear the input box
- $('#observationFileInput').val("");
-
- // Display a confirmation message for a little bit
- $scope.fileAdded = true;
- $timeout(function() {
- $scope.fileAdded = false;
- }, 2000);
- }
-
- $scope.shouldDisableLoadButton = function() {
- return $scope.loadingFile;
- }
-}]);
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/js/controllers/ParameterSelectCtrl.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/js/controllers/ParameterSelectCtrl.js b/ocw-ui/frontend/app/js/controllers/ParameterSelectCtrl.js
deleted file mode 100644
index d75e9d3..0000000
--- a/ocw-ui/frontend/app/js/controllers/ParameterSelectCtrl.js
+++ /dev/null
@@ -1,296 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
-**/
-
-// Controller for dataset parameter selection/modification
-App.Controllers.controller('ParameterSelectCtrl', ['$rootScope', '$scope', '$http', '$timeout',
- 'selectedDatasetInformation', 'regionSelectParams', 'evaluationSettings',
-function($rootScope, $scope, $http, $timeout, selectedDatasetInformation, regionSelectParams, evaluationSettings) {
- $scope.datasets = selectedDatasetInformation.getDatasets();
-
- // The min/max lat/lon values from the selected datasets
- $scope.latMin = -90;
- $scope.latMax = 90;
- $scope.lonMin = -180;
- $scope.lonMax = 180;
- $scope.start = "1900-01-01 00:00:00";
- $scope.end = "2030-01-01 00:00:00";
-
- // The min/max lat/lon values that are displayed
- $scope.displayParams = regionSelectParams.getParameters();
-
- $scope.runningEval = false;
-
- // Flag for toggling re-grid controls based on whether or not the user has selected a grid
- // base from the selected datasets. By default we have no datasets so we don't need to show
- // the controls!
- $scope.areInUserRegridState = false;
-
- // Initialization for the lat/lon grid step sliders
- // TODO There has to be a better way of dealing with this. Perhaps a directive??
- $scope.latSliderVal = 0;
- $scope.lonSliderVal = 0;
-
- $('#latSlider').slider({
- value: 0,
- step: 0.25,
- min: 0.25,
- max: 180,
- slide: function(event, ui) {
- $scope.updateLatSliderDisplayValue(ui.value);
- },
- });
-
- $('#lonSlider').slider({
- value: 0,
- step: 0.25,
- min: 0.25,
- max: 360,
- slide: function(event, ui) {
- $scope.updateLonSliderDisplayValue(ui.value);
- },
- });
-
- $scope.updateLatSliderDisplayValue = function(value) {
- $scope.latSliderVal = value;
- $scope.$apply();
- };
-
- $scope.updateLonSliderDisplayValue = function(value) {
- $scope.lonSliderVal = value;
- $scope.$apply();
- };
-
- // Settings for jQuery datepicker directives!
- $scope.datepickerSettings = {
- changeMonth: true,
- changeYear: true,
- };
-
- $scope.shouldDisableControls = function() {
- return (selectedDatasetInformation.getDatasetCount() < 2);
- }
-
- $scope.shouldDisableEvaluateButton = function() {
- return ($scope.shouldDisableControls() || $scope.runningEval);
- }
-
- $scope.shouldDisableResultsView = function() {
- var res = false;
-
- if ($rootScope.evalResults == "")
- res = true;
-
- return res;
- }
-
- $scope.runEvaluation = function() {
- $scope.runningEval = true;
-
- var data = {}
- var settings = evaluationSettings.getSettings()
-
- // Set dataset information
-
- // Grab the reference dataset information
- var ref_ds = settings.spatialSelect;
-
- if (ref_ds == null) {
- ref_ds = $scope.datasets[0];
- }
-
- data['reference_dataset'] = null;
- data['target_datasets'] = [];
-
- // Parse all the dataset information and generate the necessary objects for the backend
- for (var i = 0; i < $scope.datasets.length; i++) {
- var dataset = {}
- dataset['dataset_info'] = {}
-
- if ($scope.datasets[i].isObs == 0) {
- dataset['data_source_id'] = 1;
- dataset['dataset_info']['dataset_id'] = $scope.datasets[i]['id'];
- dataset['dataset_info']['var_name'] = $scope.datasets[i]['param'];
- dataset['dataset_info']['lat_name'] = $scope.datasets[i]['lat'];
- dataset['dataset_info']['lon_name'] = $scope.datasets[i]['lon'];
- dataset['dataset_info']['time_name'] = $scope.datasets[i]['time'];
- dataset['dataset_info']['name'] = $scope.datasets[i]['name'];
- } else {
- dataset['data_source_id'] = 2;
- dataset['dataset_info']['dataset_id'] = $scope.datasets[i]['datasetId'];
- dataset['dataset_info']['parameter_id'] = $scope.datasets[i]['param'];
- dataset['dataset_info']['name'] = $scope.datasets[i]['name'];
- }
-
- if ($scope.datasets[i].id === ref_ds.id) {
- data['reference_dataset'] = dataset;
- } else {
- data['target_datasets'].push(dataset);
- }
- }
-
- // TODO: These should be use customizable
- // Set the spatial rebin grid steps
- data['spatial_rebin_lat_step'] = 1;
- data['spatial_rebin_lon_step'] = 1;
-
- // Determine the temporal resolution to use when doing a temporal rebin. The
- // value is used to determine the timedelta in days to use.
- temporal_res = settings.temporal.selected;
-
- if (temporal_res == 'daily') {
- data['temporal_resolution'] = 1;
- } else if (temporal_res == 'monthly') {
- data['temporal_resolution'] = 30;
- } else if (temporal_res == 'yearly') {
- data['temporal_resolution'] = 365;
- } else if (temporal_res == 'full') {
- data['temporal_resolution'] = 999;
- } else {
- // Default to monthly just in case
- data['temporal_resolution'] = 30;
- }
-
- // Load the Metrics for the evaluation
- data['metrics'] = []
- metrics = settings.metrics
- for (var i = 0; i < metrics.length; i++) {
- var metric = metrics[i];
-
- if (metric.select) {
- data['metrics'].push(metric.name)
- }
- }
-
- // Set the bound values for the evaluation
- data['start_time'] = $scope.displayParams.start + " 00:00:00",
- data['end_time'] = $scope.displayParams.end + " 00:00:00",
- data['lat_min'] = $scope.displayParams.latMin,
- data['lat_max'] = $scope.displayParams.latMax,
- data['lon_min'] = $scope.displayParams.lonMin,
- data['lon_max'] = $scope.displayParams.lonMax,
-
- $http.post($rootScope.baseURL + '/processing/run_evaluation/', data).
- success(function(data) {
- var evalWorkDir = data['eval_work_dir'];
-
- $scope.runningEval = false;
-
- $timeout(function() {
- if (evalWorkDir !== undefined) {
- window.location = "#/results/" + evalWorkDir;
- } else {
- window.location = "#/results";
- }
- }, 100);
-
- }).error(function() {
- $scope.runningEval = false;
- });
- };
-
- // Check the Parameter selection boxes after the user has changed input to ensure that valid
- // values were entered
- $scope.checkParameters = function() {
- if (parseFloat($scope.displayParams.latMin) < parseFloat($scope.latMin))
- $scope.displayParams.latMin = $scope.latMin;
-
- if (parseFloat($scope.displayParams.latMax) > parseFloat($scope.latMax))
- $scope.displayParams.latMax = $scope.latMax;
-
- if (parseFloat($scope.displayParams.lonMin) < parseFloat($scope.lonMin))
- $scope.displayParams.lonMin = $scope.lonMin;
-
- if (parseFloat($scope.displayParams.lonMax) > parseFloat($scope.lonMax))
- $scope.displayParams.lonMax = $scope.lonMax;
-
- if ($scope.displayParams.start < $scope.start)
- $scope.displayParams.start = $scope.start;
-
- if ($scope.displayParams.end > $scope.end)
- $scope.displayParams.end = $scope.end;
-
- $scope.displayParams.latMin = $scope.truncateFloat($scope.displayParams.latMin);
- $scope.displayParams.latMax = $scope.truncateFloat($scope.displayParams.latMax);
- $scope.displayParams.lonMin = $scope.truncateFloat($scope.displayParams.lonMin);
- $scope.displayParams.lonMax = $scope.truncateFloat($scope.displayParams.lonMax);
-
- $scope.$apply();
- $rootScope.$broadcast('redrawOverlays', []);
- }
-
- $scope.unwatchDatasets = $scope.$watch('datasets',
- function() {
- var numDatasets = $scope.datasets.length;
- $scope.displayParams.areValid = false;
- $scope.areInUserRegridState = false;
-
- if (numDatasets) {
- var latMin = -90,
- latMax = 90,
- lonMin = -180,
- lonMax = 180,
- start = "1900-01-01 00:00:00",
- end = "2030-01-01 00:00:00",
- datasetRegrid = false;
- // Get the valid lat/lon range in the selected datasets.
- for (var i = 0; i < numDatasets; i++) {
- var curDataset = $scope.datasets[i];
-
- latMin = (curDataset['latlonVals']['latMin'] > latMin) ? curDataset['latlonVals']['latMin'] : latMin;
- latMax = (curDataset['latlonVals']['latMax'] < latMax) ? curDataset['latlonVals']['latMax'] : latMax;
- lonMin = (curDataset['latlonVals']['lonMin'] > lonMin) ? curDataset['latlonVals']['lonMin'] : lonMin;
- lonMax = (curDataset['latlonVals']['lonMax'] < lonMax) ? curDataset['latlonVals']['lonMax'] : lonMax;
- start = (curDataset['timeVals']['start'] > start) ? curDataset['timeVals']['start'] : start;
- end = (curDataset['timeVals']['end'] < end) ? curDataset['timeVals']['end'] : end;
-
- datasetRegrid = datasetRegrid || curDataset.regrid;
-
- }
-
- $scope.areInUserRegridState = !datasetRegrid
- }
-
- // Update the display parameters with the new valid overlap that we've found!
- $scope.displayParams.latMin = $scope.truncateFloat(latMin);
- $scope.displayParams.latMax = $scope.truncateFloat(latMax);
- $scope.displayParams.lonMin = $scope.truncateFloat(lonMin);
- $scope.displayParams.lonMax = $scope.truncateFloat(lonMax);
- $scope.displayParams.start = (typeof start == 'undefined') ? "" : start.split(" ")[0];
- $scope.displayParams.end = (typeof end == 'undefined') ? "" : end.split(" ")[0];
-
- // Update the local store values!
- $scope.latMin = latMin;
- $scope.latMax = latMax;
- $scope.lonMin = lonMin;
- $scope.lonMax = lonMax;
- $scope.start = (typeof start == 'undefined') ? "" : start.split(" ")[0];
- $scope.end = (typeof end == 'undefined') ? "" : end.split(" ")[0];
-
- $scope.displayParams.areValid = true;
- $rootScope.$broadcast('redrawOverlays', []);
- }, true);
-
- $scope.truncateFloat = function(floatVal) {
- if (floatVal > 0) {
- return Math.floor(floatVal);
- } else {
- return Math.ceil(floatVal);
- }
- }
-}]);
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/js/controllers/RcmedSelectionCtrl.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/js/controllers/RcmedSelectionCtrl.js b/ocw-ui/frontend/app/js/controllers/RcmedSelectionCtrl.js
deleted file mode 100644
index 1513d24..0000000
--- a/ocw-ui/frontend/app/js/controllers/RcmedSelectionCtrl.js
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
-**/
-
-App.Controllers.controller('RcmedSelectionCtrl', ['$rootScope', '$scope', '$http', '$timeout', 'selectedDatasetInformation',
-function($rootScope, $scope, $http, $timeout, selectedDatasetInformation) {
- // Grab a copy of the datasets so we can display a count to the user!
- $scope.datasetCount = selectedDatasetInformation.getDatasets();
- $scope.fileAdded = false;
-
- $scope.getObservations = function() {
- $http.jsonp($rootScope.baseURL + '/rcmed/datasets/?callback=JSON_CALLBACK').
- success(function(data) {
- $scope.availableObs = data;
- $scope.availableObs.splice(0, 0, {longname: 'Please select an option'});
- $scope.datasetSelection = $scope.availableObs[0];
- }).
- error(function(data) {
- $scope.availableObs = ["Unable to query RCMED"]
- });
- };
-
- $scope.getObservationBounds = function() {
- $scope.observationBounds = {};
-
- $http.get($rootScope.baseURL + '/rcmed/parameters/bounds/').
- success(function(data) {
- $scope.observationBounds = data;
- $scope.observationBounds['default'] = {
- 'start': '1900-01-01 00:00:00',
- 'end': '2050-01-01 00:00:00',
- 'latMin': -90,
- 'latMax': 89,
- 'lonMin': -180,
- 'lonMax': 179,
- };
- }).
- error(function(data) {
- $scope.observationBounds['default'] = {
- 'start': '1900-01-01 00:00:00',
- 'end': '2050-01-01 00:00:00',
- 'latMin': -90,
- 'latMax': 89,
- 'lonMin': -180,
- 'lonMax': 179,
- };
- });
- };
-
- $scope.getBoundsByParameterId = function(parameterId) {
- if (parameterId in $scope.observationBounds) {
- return $scope.observationBounds[parameterId];
- } else {
- return $scope.observationBounds['default'];
- }
- };
-
- $scope.dataSelectUpdated = function() {
- var urlString = $rootScope.baseURL + '/rcmed/parameters/?dataset=' +
- $scope.datasetSelection["shortname"] +
- "&callback=JSON_CALLBACK";
- $http.jsonp(urlString).
- success(function(data) {
- $scope.retrievedObsParams = data;
- if ($scope.retrievedObsParams.length > 1)
- $scope.retrievedObsParams.splice(0, 0, {shortname: 'Please select a parameter'});
- $scope.parameterSelection = $scope.retrievedObsParams[0];
- });
- };
-
- $scope.addObservation = function() {
- var newDataset = {};
-
- newDataset['isObs'] = 1;
- // Save the dataset id (the important part) and name (for display purposes)
- newDataset['datasetId'] = $scope.datasetSelection['dataset_id'];
- newDataset['name'] = $scope.datasetSelection['longname'];
- // Save the parameter id (the important part) and name (for display purposes)
- newDataset['id'] = $scope.parameterSelection['parameter_id'];
- newDataset['param'] = $scope.parameterSelection['parameter_id'];
- newDataset['paramName'] = $scope.parameterSelection['longname'];
-
- bounds = $scope.getBoundsByParameterId(newDataset['id']);
- newDataset['latlonVals'] = {
- 'latMin': bounds['lat_min'],
- 'latMax': bounds['lat_max'],
- 'lonMin': bounds['lon_min'],
- 'lonMax': bounds['lon_max'],
- };
- newDataset['timeVals'] = {
- 'start': bounds['start_date'],
- 'end': bounds['end_date'],
- };
-
- // Set some defaults for lat/lon/time variable names. This just helps
- // us display stuff later.
- newDataset['lat'] = "N/A";
- newDataset['lon'] = "N/A";
- newDataset['time'] = "N/A";
-
- selectedDatasetInformation.addDataset(newDataset);
-
- // Clear the user selections by requery-ing RCMED. This is really hacky, but it works for now...
- $scope.availableObs = [];
- $scope.retrievedObsParams = [];
- $scope.getObservations();
-
- // Display a confirmation message for a little bit
- $scope.fileAdded = true;
- $timeout(function() {
- $scope.fileAdded = false;
- }, 2000);
- };
-
- // Grab the available observations from RCMED
- $scope.getObservations();
- $scope.getObservationBounds();
-}]);
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/js/controllers/ResultCtrl.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/js/controllers/ResultCtrl.js b/ocw-ui/frontend/app/js/controllers/ResultCtrl.js
deleted file mode 100644
index 0bd7eaf..0000000
--- a/ocw-ui/frontend/app/js/controllers/ResultCtrl.js
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
-**/
-
-// Controller for result page
-App.Controllers.controller('ResultCtrl', ['$rootScope', '$scope', '$http',
-function($rootScope, $scope, $http) {
-
- $scope.results = [];
-
- // Get all evaluation directories
- $http.jsonp($rootScope.baseURL + '/dir/results/?callback=JSON_CALLBACK')
- .success(function(data) {
- data = data['listing']
-
- var cacheDirIndex = data.indexOf("/cache");
- if (cacheDirIndex > -1) {
- data.split(cacheDirIndex, 1)
- }
-
- $scope.results = data.sort().reverse();
- });
-}]);
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/js/controllers/ResultDetailCtrl.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/js/controllers/ResultDetailCtrl.js b/ocw-ui/frontend/app/js/controllers/ResultDetailCtrl.js
deleted file mode 100644
index 30c0d2a..0000000
--- a/ocw-ui/frontend/app/js/controllers/ResultDetailCtrl.js
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
-**/
-
-// Controller for result page
-App.Controllers.controller('ResultDetailCtrl', ['$rootScope', '$scope', '$http', '$stateParams',
-function($rootScope, $scope, $http, $stateParams) {
- $scope.result = $stateParams.resultId;
-
- $http.jsonp($rootScope.baseURL + '/dir/results/' + $scope.result + '?callback=JSON_CALLBACK')
- .success(function(data) {
- data = data['listing'];
-
- if (data.length < 1) {
- $scope.figures = null;
- $scope.alertMessage = "No results found.";
- $scope.alertClass = "alert alert-danger";
- } else {
- $scope.figures = data;
- }
- });
-
-}]);
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/js/controllers/SettingsCtrl.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/js/controllers/SettingsCtrl.js b/ocw-ui/frontend/app/js/controllers/SettingsCtrl.js
deleted file mode 100755
index a32a9cb..0000000
--- a/ocw-ui/frontend/app/js/controllers/SettingsCtrl.js
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
-**/
-
-App.Controllers.controller('SettingsCtrl', ['$scope', 'evaluationSettings', 'selectedDatasetInformation',
-function($scope, evaluationSettings, selectedDatasetInformation) {
- $scope.settings = evaluationSettings.getSettings();
- $scope.datasets = selectedDatasetInformation.getDatasets();
-}]);
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/js/controllers/TimelineCtrl.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/js/controllers/TimelineCtrl.js b/ocw-ui/frontend/app/js/controllers/TimelineCtrl.js
deleted file mode 100644
index 9485aa4..0000000
--- a/ocw-ui/frontend/app/js/controllers/TimelineCtrl.js
+++ /dev/null
@@ -1,92 +0,0 @@
-//
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements.See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License.You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-
-// Controller for the OCW Timeline Widget
-App.Controllers.controller('TimelineCtrl', ['$rootScope', '$scope', 'selectedDatasetInformation', 'regionSelectParams',
-function($rootScope, $scope, selectedDatasetInformation, regionSelectParams) {
- $scope.datasets = selectedDatasetInformation.getDatasets();
- $scope.regionParams = regionSelectParams.getParameters();
-
- $scope.updateTimeline = function() {
- // Clear timeline data if it exists
- if ("timeline" in $rootScope) {
- $rootScope.timeline.deleteAllItems();
- }
-
- // Don't process if no datasets have been added
- if ($scope.datasets.length == 0 || !("timeline" in $rootScope))
- return;
-
- // Create DataTable to add data to timeline
- var data = new google.visualization.DataTable();
- data.addColumn('datetime', 'start');
- data.addColumn('datetime', 'end');
- data.addColumn('string', 'content');
-
- // Loop through datasets and find the overlapping start/end time range
- var start = $scope.datasets[0].timeVals.start;
- var end = $scope.datasets[0].timeVals.end;
- for (var i = 0; i < $scope.datasets.length; i++) {
- var possibleNewStart = $scope.datasets[i].timeVals.start;
- var possibleNewEnd = $scope.datasets[i].timeVals.end;
-
- start = (possibleNewStart > start) ? possibleNewStart : start;
- end = (possibleNewEnd < end) ? possibleNewEnd : end;
- }
-
- // Set the timeline extent to the overlapping time range
- //
- // NOTE: The month value substring is expected to be 0-based (hence the -1)
- $rootScope.timeline.setVisibleChartRange(new Date(start.substr(0, 4), start.substr(5, 2) - 1, start.substr(8, 2)),
- new Date(end.substr(0, 4), end.substr(5, 2) - 1, end.substr(8, 2)));
-
- // Add user selected bounds to timeline
- if ($scope.regionParams.areValid) {
-
- var userStart = $scope.regionParams.start;
- var userEnd = $scope.regionParams.end;
-
- // Add color to user selected bounds
- var style = 'background-color: #000000; border: 2px solid;';
- var ocwBar = '<div class="ocw-bar timeline-event-range" style="' + style + '"></div>';
-
- // Add row to DataTable: object with start and end date
- // note: subtract one from month since indexes from 0 to 11
- data.addRow([new Date(userStart.substr(0,4), userStart.substr(5,2)-1, userStart.substr(8,2)),
- new Date(userEnd.substr(0,4), userEnd.substr(5,2)-1, userEnd.substr(8,2)),
- ocwBar ]);
- }
-
- var options = {
- "width": "100%",
- "showCurrentTime": false,
- "moveable": false,
- "zoomable": false,
- };
-
- // Draw timeline with data (DataTable) and options (a name-value map)
- $rootScope.timeline.draw(data, options);
- };
-
- $scope.$on('redrawOverlays', function(event, parameters) {
- $scope.updateTimeline();
- });
-
- $scope.$watch('datasets', function() {
- $scope.updateTimeline();
- }, true);
-}]);
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/js/controllers/WorldMapCtrl.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/js/controllers/WorldMapCtrl.js b/ocw-ui/frontend/app/js/controllers/WorldMapCtrl.js
deleted file mode 100644
index 3de155c..0000000
--- a/ocw-ui/frontend/app/js/controllers/WorldMapCtrl.js
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
-**/
-
-// Controller for the world map
-App.Controllers.controller('WorldMapCtrl', ['$rootScope', '$scope', 'selectedDatasetInformation', 'regionSelectParams',
-function($rootScope, $scope, selectedDatasetInformation, regionSelectParams) {
- $scope.datasets = selectedDatasetInformation.getDatasets();
- $scope.regionParams = regionSelectParams.getParameters();
-
- $scope.updateMap = function() {
- // Clear Group of layers from map if it exists
- if ("rectangleGroup" in $rootScope) {
- $rootScope.rectangleGroup.clearLayers();
- }
-
- // Don't process if we don't have any datasets added or if the map doesn't exist!!
- if ($scope.datasets.length == 0 || !("map" in $rootScope))
- return;
-
- // Create a group that we'll draw overlays to
- $rootScope.rectangleGroup = L.layerGroup();
- // Add rectangle Group to map
- $rootScope.rectangleGroup.addTo($rootScope.map);
-
- // Calculate the overlap region and set the map to show the new overlap
- var latMin = -90,
- latMax = 90,
- lonMin = -180,
- lonMax = 180;
-
- // Get the valid lat/lon range in the selected datasets.
- for (var i = 0; i < selectedDatasetInformation.getDatasetCount(); i++) {
- var curDataset = $scope.datasets[i];
-
- latMin = (curDataset['latlonVals']['latMin'] > latMin) ? curDataset['latlonVals']['latMin'] : latMin;
- latMax = (curDataset['latlonVals']['latMax'] < latMax) ? curDataset['latlonVals']['latMax'] : latMax;
- lonMin = (curDataset['latlonVals']['lonMin'] > lonMin) ? curDataset['latlonVals']['lonMin'] : lonMin;
- lonMax = (curDataset['latlonVals']['lonMax'] < lonMax) ? curDataset['latlonVals']['lonMax'] : lonMax;
- }
-
- var overlapBounds = [[latMax, lonMin], [latMin, lonMax]];
- $rootScope.map.fitBounds(overlapBounds, {padding: [0, 0]});
-
- // Draw border around overlap region
- var overlapBorder = L.rectangle(overlapBounds, {
- color: '#000000',
- opacity: 1.0,
- fill: false,
- weight: 2,
- dashArray: "10 10",
- });
-
- $rootScope.rectangleGroup.addLayer(overlapBorder);
-
- // Draw user selected region
- if ($scope.regionParams.areValid) {
-
- var bounds = [[$scope.regionParams.latMax, $scope.regionParams.lonMin],
- [$scope.regionParams.latMin, $scope.regionParams.lonMax]];
-
- var polygon = L.rectangle(bounds, {
- color: '#000000',
- opacity: .3,
- stroke: false,
- fill: true,
- });
-
- $rootScope.rectangleGroup.addLayer(polygon);
- }
- };
-
- $scope.$on('redrawOverlays', function(event, parameters) {
- $scope.updateMap();
- });
-
- $scope.$watch('datasets', function() {
- $scope.updateMap();
- }, true);
-}]);
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/js/directives/BootstrapModal.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/js/directives/BootstrapModal.js b/ocw-ui/frontend/app/js/directives/BootstrapModal.js
deleted file mode 100644
index d7c2432..0000000
--- a/ocw-ui/frontend/app/js/directives/BootstrapModal.js
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
-**/
-
-// Directive for inserting bootstrap modals
-App.Directives.directive('bootstrapModal', function($timeout) {
- var link = function(scope, elem, attrs) {
- var escapeEvent;
- var openModal;
- var closeModal;
-
- escapeEvent = function(e) {
- if (e.which == 27)
- closeModal();
- }
-
- openModal = function(event, toggleBackground, toggleKeyboardEscape) {
- // Grab the current modal tag based on the modalId attribute in the bootstrapModal tag
- var modal = $('#' + attrs.modalId);
-
- // Make all the modal's children of class "close" call the appropriate function for closing!
- $('.close', modal).bind('click', closeModal);
-
- modal.modal({
- show: true,
- backdrop: toggleBackground,
- keyboard: toggleKeyboardEscape,
- });
- };
-
- closeModal = function(event) {
- $('#' + attrs.modalId).modal('hide');
-
- };
-
- // We need to bind the close and open modal events so outside elements can trigger the modal.
- // This has to wait until the template has been fully inserted, so just wait a bit of time
- // before we set them. I'm sure there's a better way of handling this...
- $timeout(function() {
- $('#' + attrs.modalId).
- bind('modalOpen', openModal).
- bind('modalClose', closeModal);
- }, 100);
- };
-
- return {
- link: link,
- replace: true,
- restrict: 'E',
- scope: {
- modalId: '@'
- },
- template: '<div id="{{modalId}}" class="modal hide fade" tabindex="-1"><div ng-transclude></div></div>',
- transclude: true
- };
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/js/directives/BootstrapModalOpen.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/js/directives/BootstrapModalOpen.js b/ocw-ui/frontend/app/js/directives/BootstrapModalOpen.js
deleted file mode 100644
index 8acd0e3..0000000
--- a/ocw-ui/frontend/app/js/directives/BootstrapModalOpen.js
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
-**/
-
-// This directive processes bootstrap-modal-open attributes. This lets the user bind
-// the opening of a specific modal to a button/link. It also lets the user specify
-// what features the modal should have. The user can turn off the semi-opaque background
-// by having the background attribute set to 'false'. The user can also turn off the
-// ability to close the modal with ESC by having the keyboard attribute set to 'false'.
-App.Directives.directive('bootstrapModalOpen', function() {
- return {
- restrict: 'A',
- link: function(scope, elem, attrs) {
- // Default to showing the background if the user didn't specify a value for this.
- var hasBackground = (attrs.background === undefined ? true : (attrs.background == "true"));
- // Enable keyboard closing of modal with escape key.
- var hasKeyboardEscape = (attrs.keyboard === undefined ? true : (attrs.keyboard == "true"));
-
- $(elem).bind('click', function() {
- $('#' + attrs.bootstrapModalOpen).trigger('modalOpen', [hasBackground, hasKeyboardEscape]);
- });
- }
- };
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/js/directives/LeafletMap.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/js/directives/LeafletMap.js b/ocw-ui/frontend/app/js/directives/LeafletMap.js
deleted file mode 100644
index 0076179..0000000
--- a/ocw-ui/frontend/app/js/directives/LeafletMap.js
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
-**/
-
-// Directive for dealing with the Leaflet map
-App.Directives.directive('leafletMap', function($rootScope) {
- return {
- restrict: 'E',
- replace: true,
- template: '<div></div>',
- link: function(scope, element, attrs) {
- $rootScope.map = L.map(attrs.id, {
- center: [40, 0],
- zoom: 2,
- scrollWheelZoom: false,
- attributionControl: false,
- worldCopyJump: true,
- });
-
- L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {}).addTo($rootScope.map);
- }
- };
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/js/directives/OnBlur.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/js/directives/OnBlur.js b/ocw-ui/frontend/app/js/directives/OnBlur.js
deleted file mode 100755
index 554ad0c..0000000
--- a/ocw-ui/frontend/app/js/directives/OnBlur.js
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
-**/
-
-// The onBlur directive calls a passed function when a field's "blur" event is called.
-// The function should be passed as part of the "on-blur" attribute and be defined in
-// the containing scope.
-//
-// Consider the test function "testFunc". If you wanted this to run on the blur event
-// for an input box you would use the following:
-// <input type="text" on-blur="testFunc();" />
-App.Directives.directive('onBlur', function() {
- return {
- restrict: 'A',
- link: function($scope, $elem, $attrs) {
- $elem.bind('blur', function() {
- $scope.$eval($attrs.onBlur);
- });
- },
- };
- });
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/js/directives/PredictiveFileBrowserInput.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/js/directives/PredictiveFileBrowserInput.js b/ocw-ui/frontend/app/js/directives/PredictiveFileBrowserInput.js
deleted file mode 100644
index 11bcc6f..0000000
--- a/ocw-ui/frontend/app/js/directives/PredictiveFileBrowserInput.js
+++ /dev/null
@@ -1,308 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
-**/
-
-// Setup a text input that the user will use to input a path to a local file.
-App.Directives.directive('predictiveFileBrowserInput', function() {
- var link = function($scope, $elem, $attrs) {
- $scope.autocomplete = [];
-
- // Set id to use this directive correctly in multiple places
- $scope.id = 'autoCompletePath'+ $elem.context.id
- /*
- * We need a place to dump our auto-completion options
- */
- $($elem).parent().append('<ul id="' + $scope.id +'"><ul>');
-
- // Handle user clicks on auto-complete path options
- $(document).on('click', '#' +$scope.id+ ' li span', function(e) {
- // Set the input text box's value to that of the user selected path
- var val = $(e.target).text();
- $($elem).val(val);
- // Need to trigger the input box's "input" event so Angular updates the model!
- $elem.trigger('input');
-
- // If the user selected a directory, find more results..
- if (val[val.length - 1] == '/') {
- $scope.fetchFiles($($elem).val());
- // Otherwise, remove the auto-complete options...
- } else {
- $('#' +$scope.id+ ' li').remove();
- }
- });
-
- /*
- * Handle key-down events on the input box
- *
- * We need to ignore <TAB> presses here so we can auto-complete with <TAB>.
- * If we don't ignore here then <TAB> will move the user to the next field
- * in the form and our common-prefix-fill won't work later.
- */
- $($elem).keydown(function(e) {
- var code = e.keyCode || e.which;
- var BACKSPACE = 8,
- TAB = 9;
-
- if (code == TAB)
- return false;
- });
-
- /*
- * Handle key-up events on the input box
- */
- $($elem).keyup(function(e) {
- var code = e.keyCode || e.which;
- var BACKSPACE = 8,
- TAB = 9,
- FORWARD_SLASH = 191;
-
- if (code === FORWARD_SLASH) {
- // Fetch new directory information from the server.
- $scope.fetchFiles($(this).val());
- } else if (code === TAB) {
- // Attempt to auto-fill for the user.
- $scope.handleTabPress();
- } else if (code == BACKSPACE) {
- // Need to properly handle the removal of directory information
- // and the displaying of auto-complete options
- $scope.handleBackSpace();
- } else {
- // Filter auto-complete options based on user input..
- $scope.handleMiscKeyPress();
- }
-
- // This is being used so we can handle backspacing. The user might hold
- // down the backspace key or select a section of text and delete. This allows
- // us to compare the result to its prior state, which makes handling
- // backspaces easier.
- $scope.lastInputContents = $elem.val();
- });
-
- /*
- * Grab additional path information from the web-server
- *
- * Params:
- * path - The path to get a directory listing of.
- */
- // TODO Make this use $HTTP
- $scope.fetchFiles = function(path) {
- $.get($scope.baseURL + '/dir/list/' + path, {},
- function(data) {
- data = data['listing']
- $scope.setNewData(data);
- $scope.updateAutoComplete();
- }, 'json');
- };
-
- /*
- * Grab additional path information from the web-server and filter the
- * results based on the current input text.
- *
- * Params:
- * path - The path to get a directory listing of.
- *
- * This is needed to handle deletion of selected text. It is possible that
- * the user will select text and delete only part of a word. The results
- * need to be filtered based on this partial input.
- */
- // TODO Why isn't this using $http?!?!?! Because I copy and pasted!!!!
- $scope.fetchFilesAndFilter = function(path) {
- $.get($scope.baseURL + '/dir/list/' + path, {},
- function(data) {
- data = data['listing']
- $scope.setNewData(data);
- $scope.filterResults();
- $scope.updateAutoComplete();
- }, 'json');
- };
-
- /*
- * Handle directory data from the server.
- *
- * We store the entire directory information along with the remaining
- * possible options given the users current input. This lets us avoid
- * unnecessary calls to the server for directory information every time
- * the user deletes something.
- */
- $scope.setNewData = function(data) {
- $scope.autocomplete = data.sort();
- $scope.possibleCompletes = $scope.autocomplete;
- };
-
- /*
- * Handle <TAB> presses.
- *
- * Attempt to auto-complete options when the user presses <TAB>.
- */
- $scope.handleTabPress = function() {
- // If there's only one option available there's no points in trying to
- // find a common prefix! Just set the value!
- if ($scope.possibleCompletes.length === 1) {
- $elem.val($scope.possibleCompletes[0]);
-
- // Make sure more options are displayed if a directory was selected.
- $scope.checkForMoreOptions();
- $scope.updateAutoComplete();
- return;
- }
-
- // Find the greatest common prefix amongst the remaining choices and set
- // the input text to it.
- var prefix = $scope.getLargestCommonPrefix($scope.possibleCompletes);
- $elem.val(prefix);
- $scope.updateAutoComplete();
- };
-
- /*
- * Handle Backspacing and option displaying.
- *
- * The auto-complete options needs to be displayed correctly when the user
- * removes directory information.
- */
- $scope.handleBackSpace = function() {
- var curInputVal = $elem.val();
-
- // If the user deletes everything in the input box all we need to do
- // is make sure that the auto-complete options aren't displayed.
- if (curInputVal.length === 0) {
- $('#' +$scope.id+ ' li').remove();
- return;
- }
-
- // Figure out how much text the user removed from the input box.
- var lengthDiff = $scope.lastInputContents.length - curInputVal.length;
- // Grab the removed text.
- var removedText = $scope.lastInputContents.substr(-lengthDiff);
-
- // If the user deleted over a directory we need to fetch information on the
- // previous directory for auto-completion.
- if (removedText.indexOf('/') !== -1) {
- var lastSlashIndex = curInputVal.lastIndexOf('/');
-
- // If the remaining path still contains a directory...
- if (lastSlashIndex !== -1) {
- // Grab the section of the path that points to a valid directory,
- // fetch the listing, and update the results.
- var pathToSearch = curInputVal.slice(0, lastSlashIndex + 1);
- $scope.fetchFilesAndFilter(pathToSearch);
- } else {
- // Delete the old auto-complete information in the case where the user
- // completely removed path information.
- $('#' +$scope.id+ ' li').remove();
- }
- } else {
- // Otherwise, we just need to filter results based on the remaining input.
- $scope.filterResults();
- $scope.updateAutoComplete();
- }
- };
-
- /*
- * Handle all other key presses in the input box
- *
- * Filter the auto-complete options as the user types to ensure that only options
- * which are possible given the current input text are still displayed.
- */
- $scope.handleMiscKeyPress = function() {
- // Safely exit when there are no options available.
- if ($scope.autocomplete === [])
- return;
-
- // Otherwise, filter the results.
- $scope.filterResults();
- $scope.updateAutoComplete();
- };
-
- /*
- * When a path is auto-completed with <TAB> we need to check to see if it points
- * to a directory. If it does, we still need to fetch results!
- */
- $scope.checkForMoreOptions = function() {
- var path = $elem.val();
- if (path[path.length - 1] === '/') {
- $scope.fetchFiles(path);
- }
- };
-
- /*
- * Calculate the greatest common prefix of the passed options.
- *
- * Params:
- * Options - An array of strings in which the greatest common prefix
- * should be found
- *
- * Returns:
- * The greatest common prefix of the strings.
- *
- *
- * Note - For us, there will always be a prefix of at least '/' since this can't
- * possible be called without the users entering a starting directory. As a result,
- * we don't explicitly handle the case where there is 0 length common prefix.
- */
- $scope.getLargestCommonPrefix = function(options) {
- var index = 1;
- var shortestString = options.reduce(function(a, b) { return a.length < b.length ? a : b; });
- var longestString = options.reduce(function(a, b) { return a.length > b.length ? a : b; });
- var substringToCheck = shortestString[0];
-
- while (longestString.indexOf(substringToCheck) !== -1) {
- substringToCheck = shortestString.slice(0, ++index);
- }
-
- return longestString.slice(0, index - 1);
- };
-
- /*
- * Filter the auto-complete options based on the current input.
- */
- $scope.filterResults = function() {
- $scope.possibleCompletes = $scope.autocomplete.filter(function(item, index, array) {
- return (~item.indexOf($($elem).val()));
- });
-
- $scope.possibleCompletes.sort();
- };
-
- /*
- * Update the display of auto-complete options.
- */
- $scope.updateAutoComplete = function() {
- // Remove all the existing options
- $('#' +$scope.id+ ' li').remove();
-
- // We don't need to show anything if the user has completely selected
- // the only existing option available.
- if ($scope.possibleCompletes.length === 1) {
- if ($scope.possibleCompletes[0] === $elem.val()) {
- return;
- }
- }
-
- // Display all the possible completes
- $.each($scope.possibleCompletes, function(i, v) {
- $('#' +$scope.id+ '').append($('<li>').html($('<span>').text(v)));
- });
- };
- };
-
- return {
- link: link,
- scope: true,
- restrict: 'A'
- };
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/js/directives/PreviewMap.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/js/directives/PreviewMap.js b/ocw-ui/frontend/app/js/directives/PreviewMap.js
deleted file mode 100644
index b172fe7..0000000
--- a/ocw-ui/frontend/app/js/directives/PreviewMap.js
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
-**/
-
-App.Directives.directive('previewMap', function($rootScope) {
- return {
- restrict: 'A',
- replace: true,
- scope: {dataset: '=previewMap', index: '=index'},
- template: '<div id="{{dataset.name}}" class="preview-map"></div>',
- replace: true,
- link: function(scope, element, attrs) {
-
- // Any attribute that contains {{}} interpolation will be set to null in the attrs
- // parameter during the link function since the first $digest since the compilation
- // has yet to run to evaluate it! We can't run a $digest in the middle of compilation,
- // so using an $observe (or $watch) is the best way to get the values.
- attrs.$observe('id', function(newId) {
- var map = L.map(attrs.id, {
- zoom: 0,
- scrollWheelZoom: false,
- zoomControl: false,
- attributionControl: false,
- worldCopyJump: true,
- });
-
- L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {}).addTo(map);
-
- // Zoom the map to the dataset bound regions (or at least try our best to do so)
- var datasetBounds = [[scope.dataset.latlonVals.latMax, scope.dataset.latlonVals.lonMin],
- [scope.dataset.latlonVals.latMin, scope.dataset.latlonVals.lonMax]];
- map.fitBounds(datasetBounds, {});
-
- // Draw a colored overlay on the region of the map
- var maplatlon = scope.dataset.latlonVals;
- var bounds = [[maplatlon.latMax, maplatlon.lonMin], [maplatlon.latMin, maplatlon.lonMax]];
-
- var polygon = L.rectangle(bounds,{
- stroke: false,
- fillColor: $rootScope.fillColors[1],
- fillOpacity: 0.6
- });
-
- // Add layer to Group
- var rectangleGroup = L.layerGroup();
- rectangleGroup.addLayer(polygon);
-
- // Add the overlay to the map
- rectangleGroup.addTo(map);
- });
- }
- };
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/js/directives/Timeline.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/js/directives/Timeline.js b/ocw-ui/frontend/app/js/directives/Timeline.js
deleted file mode 100644
index d29f85e..0000000
--- a/ocw-ui/frontend/app/js/directives/Timeline.js
+++ /dev/null
@@ -1,44 +0,0 @@
-//
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements.See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License.You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-
-// Directive for dealing with the Leaflet map
-App.Directives.directive('timeline', function($rootScope, $window) {
- return {
- restrict: 'C',
- replace: true,
- transclude: true,
- template: '<div id="OCWtimeline"></div>',
- link: function(scope, element, attrs) {
- // Instantiate timeline object.
- $rootScope.timeline = new links.Timeline(document.getElementById('OCWtimeline'));
-
- // Redraw the timeline whenever the window is resized
- angular.element($window).bind('resize', function() {
- $rootScope.timeline.checkResize();
- });
-
- var options = {
- "width": "100%",
- "showCurrentTime": false,
- "moveable": false,
- "zoomable": false
- };
-
- $rootScope.timeline.draw([], options);
- }
- }
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/js/filters/ISODateToMiddleEndian.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/js/filters/ISODateToMiddleEndian.js b/ocw-ui/frontend/app/js/filters/ISODateToMiddleEndian.js
deleted file mode 100644
index 50ed37b..0000000
--- a/ocw-ui/frontend/app/js/filters/ISODateToMiddleEndian.js
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
-**/
-
-'use strict';
-
-// Convert a date in ISO format (or slightly modified such that 'T' is replace by ' ') into
-// a 'Middle Endian'/U.S. style date.
-App.Filters.filter('ISODateToMiddleEndian', function() {
- return function(input) {
- var original = input;
-
- // Strip whitespace from the start and end of the string
- input = input.replace(/(^\s+|\s+$)/g, '');
-
- // ISO Standard says time is separated from Date with a 'T'. Our timestamps
- // slightly modify that and use a space. We'll check for both here and prefer
- // to split on a 'T' if it's available.
- if (input.indexOf('T') != -1 || input.indexOf(' ') != -1) {
- input = (input.indexOf('T') != -1) ? input.split('T')[0] : input.split(' ')[0];
- }
-
- // The components of the date should be split with hyphens. If we can't find them
- // then the string is poorly formed.
- if (input.indexOf('-') == -1 || input.split('-').length - 1 != 2) {
- return original;
- }
-
- // At this point the date is probably valid and we should try to convert it!
- var components = input.split('-');
- return (components[1] + "/" + components[2] + "/" + components[0]);
- };
-});
[10/28] CLIMATE-512 - Replace frontend with new Yeoman/Grunt/Bower
frontend
Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/js/lib/jquery/jquery-ui/jquery-ui-1.10.3.min.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/js/lib/jquery/jquery-ui/jquery-ui-1.10.3.min.js b/ocw-ui/frontend/app/js/lib/jquery/jquery-ui/jquery-ui-1.10.3.min.js
deleted file mode 100644
index 82bbb67..0000000
--- a/ocw-ui/frontend/app/js/lib/jquery/jquery-ui/jquery-ui-1.10.3.min.js
+++ /dev/null
@@ -1,12 +0,0 @@
-/*! jQuery UI - v1.10.3 - 2013-05-03
-* http://jqueryui.com
-* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.ui.effect.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js, jquery.ui.menu.js, jquery.ui.position.js, jquery.ui.progressbar.js, jquery.ui.slider.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js
-* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
-(function(t,e){function i(e,i){var n,o,a,r=e.nodeName.toLowerCase();return"area"===r?(n=e.parentNode,o=n.name,e.href&&o&&"map"===n.nodeName.toLowerCase()?(a=t("img[usemap=#"+o+"]")[0],!!a&&s(a)):!1):(/input|select|textarea|button|object/.test(r)?!e.disabled:"a"===r?e.href||i:i)&&s(e)}function s(e){return t.expr.filters.visible(e)&&!t(e).parents().addBack().filter(function(){return"hidden"===t.css(this,"visibility")}).length}var n=0,o=/^ui-id-\d+$/;t.ui=t.ui||{},t.extend(t.ui,{version:"1.10.3",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),t.fn.extend({focus:function(e){return function(i,s){return"number"==typeof i?this.each(function(){var e=this;setTimeout(function(){t(e).focus(),s&&s.call(e)},i)}):e.apply(this,arguments)}}(t.fn.focus),scrollParent:function(){var e;
return e=t.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(t.css(this,"position"))&&/(auto|scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!e.length?t(document):e},zIndex:function(i){if(i!==e)return this.css("zIndex",i);if(this.length)for(var s,n,o=t(this[0]);o.length&&o[0]!==document;){if(s=o.css("position"),("absolute"===s||"relative"===s||"fixed"===s)&&(n=parseInt(o.css("zIndex"),10),!isNaN(n)&&0!==n))return n;o=o.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++n)})},removeUniqueId:function(){return this.each(function(){o.test(this.id)&&t(this).removeAttr("id")})}}),t.extend(t.expr[":"],{data:t.
expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,s){return!!t.data(e,s[3])},focusable:function(e){return i(e,!isNaN(t.attr(e,"tabindex")))},tabbable:function(e){var s=t.attr(e,"tabindex"),n=isNaN(s);return(n||s>=0)&&i(e,!n)}}),t("<a>").outerWidth(1).jquery||t.each(["Width","Height"],function(i,s){function n(e,i,s,n){return t.each(o,function(){i-=parseFloat(t.css(e,"padding"+this))||0,s&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),n&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var o="Width"===s?["Left","Right"]:["Top","Bottom"],a=s.toLowerCase(),r={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+s]=function(i){return i===e?r["inner"+s].call(this):this.each(function(){t(this).css(a,n(this,i)+"px")})},t.fn["outer"+s]=function(e,i){return"number"!=typeof e?r["outer"+s].call(this,e):this.each(function(){t(this).css(a,n(this,e,!0,i)+"px")})}}),t.f
n.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(t.fn.removeData=function(e){return function(i){return arguments.length?e.call(this,t.camelCase(i)):e.call(this)}}(t.fn.removeData)),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),t.support.selectstart="onselectstart"in document.createElement("div"),t.fn.extend({disableSelection:function(){return this.bind((t.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(t){t.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),t.extend(t.ui,{plugin:{add:function(e,i,s){var n,o=t.ui[e].prototype;for(n in s)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([i,s[n]])},call:function(t,e,i){var s,n=t.plugins[e];if(n&&t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType)for(s=0;n.length>s;s++)t.options[n[s][0]]&&n[s][1].apply(t.element,i)}},hasScrol
l:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",n=!1;return e[s]>0?!0:(e[s]=1,n=e[s]>0,e[s]=0,n)}})})(jQuery),function(t,e){var i=0,s=Array.prototype.slice,n=t.cleanData;t.cleanData=function(e){for(var i,s=0;null!=(i=e[s]);s++)try{t(i).triggerHandler("remove")}catch(o){}n(e)},t.widget=function(i,s,n){var o,a,r,h,l={},c=i.split(".")[0];i=i.split(".")[1],o=c+"-"+i,n||(n=s,s=t.Widget),t.expr[":"][o.toLowerCase()]=function(e){return!!t.data(e,o)},t[c]=t[c]||{},a=t[c][i],r=t[c][i]=function(t,i){return this._createWidget?(arguments.length&&this._createWidget(t,i),e):new r(t,i)},t.extend(r,a,{version:n.version,_proto:t.extend({},n),_childConstructors:[]}),h=new s,h.options=t.widget.extend({},h.options),t.each(n,function(i,n){return t.isFunction(n)?(l[i]=function(){var t=function(){return s.prototype[i].apply(this,arguments)},e=function(t){return s.prototype[i].apply(this,t)};return function(){var i,s=this._super,o=this._superApply;re
turn this._super=t,this._superApply=e,i=n.apply(this,arguments),this._super=s,this._superApply=o,i}}(),e):(l[i]=n,e)}),r.prototype=t.widget.extend(h,{widgetEventPrefix:a?h.widgetEventPrefix:i},l,{constructor:r,namespace:c,widgetName:i,widgetFullName:o}),a?(t.each(a._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,r,i._proto)}),delete a._childConstructors):s._childConstructors.push(r),t.widget.bridge(i,r)},t.widget.extend=function(i){for(var n,o,a=s.call(arguments,1),r=0,h=a.length;h>r;r++)for(n in a[r])o=a[r][n],a[r].hasOwnProperty(n)&&o!==e&&(i[n]=t.isPlainObject(o)?t.isPlainObject(i[n])?t.widget.extend({},i[n],o):t.widget.extend({},o):o);return i},t.widget.bridge=function(i,n){var o=n.prototype.widgetFullName||i;t.fn[i]=function(a){var r="string"==typeof a,h=s.call(arguments,1),l=this;return a=!r&&h.length?t.widget.extend.apply(null,[a].concat(h)):a,r?this.each(function(){var s,n=t.data(this,o);return n?t.isFunction(n[a])&&"_"!==a.charAt(0)?
(s=n[a].apply(n,h),s!==n&&s!==e?(l=s&&s.jquery?l.pushStack(s.get()):s,!1):e):t.error("no such method '"+a+"' for "+i+" widget instance"):t.error("cannot call methods on "+i+" prior to initialization; "+"attempted to call method '"+a+"'")}):this.each(function(){var e=t.data(this,o);e?e.option(a||{})._init():t.data(this,o,new n(a,this))}),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(e,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this.bindings=t(),this.hoverable=t(),this.focusable=t(),s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0
].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:t.noop,widget:function(){return this.element},option:function(i,s){var n,o,a,r=i;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof i)if(r={},n=i.split("."),i=n.shift(),n.length){for(o=r[i]=t.widget.extend({},this.options[i]),a=0;n.length-1>a;a++)o[n[a]]=o[n[a]]||{},o=o[n[a]];if(i=n.pop(),s==
=e)return o[i]===e?null:o[i];o[i]=s}else{if(s===e)return this.options[i]===e?null:this.options[i];r[i]=s}return this._setOptions(r),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return this.options[t]=e,"disabled"===t&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!e).attr("aria-disabled",e),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(i,s,n){var o,a=this;"boolean"!=typeof i&&(n=s,s=i,i=!1),n?(s=o=t(s),this.bindings=this.bindings.add(s)):(n=s,s=this.element,o=this.widget()),t.each(n,function(n,r){function h(){return i||a.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof r?a[r]:r).apply(a,arguments):e}"string"!=typeof r&&(h.guid=r.guid=r.guid||h.guid||t.guid++);var l=n.match(/^(\w+)\s
*(.*)$/),c=l[1]+a.eventNamespace,u=l[2];u?o.delegate(u,c,h):s.bind(c,h)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(e).undelegate(e)},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){t(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e){t(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){t(e.currentTarget).addClass("ui-state-focus")},focusout:function(e){t(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.tri
gger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}})}(jQuery),function(t){var e=!1;t(document).mouseup(function(){e=!1}),t.widget("ui.mouse",{version:"1.10.3",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.bind("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).bind("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImme
diatePropagation(),!1):undefined}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!e){this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var s=this,n=1===i.which,o="string"==typeof this.options.cancel&&i.target.nodeName?t(i.target).closest(this.options.cancel).length:!1;return n&&!o&&this._mouseCapture(i)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){s.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted)?(i.preventDefault(),!0):(!0===t.data(i.target,this.widgetName+".preventClickEvent")&&t.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return s._mouseMove
(t)},this._mouseUpDelegate=function(t){return s._mouseUp(t)},t(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),e=!0,!0)):!0}},_mouseMove:function(e){return t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button?this._mouseUp(e):this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){return t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),!1},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-
t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}(jQuery),function(t){t.widget("ui.draggable",t.ui.mouse,{version:"1.10.3",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"!==this.options.helper||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),thi
s._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(e){var i=this.options;return this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(e),this.handle?(t(i.iframeFix===!0?"iframe":i.iframeFix).each(function(){t("<div class='ui-draggable-iframeFix' style='background: #fff;'></div>").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(t(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offsetParent=this.helper.offsetParent(),this.offsetParentCss
Position=this.offsetParent.css("position"),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.offset.scroll=!1,t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",e)===!1?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_mouseDrag:function(e,i){if("fixed"===this.offsetParentCssPosition&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),!i){var
s=this._uiHash();if(this._trigger("drag",e,s)===!1)return this._mouseUp({}),!1;this.position=s.position}return this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,s=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(s=t.ui.ddmanager.drop(this,e)),this.dropped&&(s=this.dropped,this.dropped=!1),"original"!==this.options.helper||t.contains(this.element[0].ownerDocument,this.element[0])?("invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||this.options.revert===!0||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",e)!==!1&&i._clear()}):this._trigger("stop",e)!==!1&&this._clear(),!1):!1},_mouseUp:function(e){r
eturn t("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(e){return this.options.handle?!!t(e.target).closest(this.element.find(this.options.handle)).length:!0},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return s.parents("body").length||s.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s[0]===this.element[0]||/(fixed|absolute)/.test(s.css("position"))||s.css("position","absolute"),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset
.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.element.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css
("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options;return n.containment?"window"===n.containment?(this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],undefined):"document"===n.containment?(this.containment=[0,0,t(documen
t).width()-this.helperProportions.width-this.margins.left,(t(document).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],undefined):n.containment.constructor===Array?(this.containment=n.containment,undefined):("parent"===n.containment&&(n.containment=this.helper[0].parentNode),i=t(n.containment),s=i[0],s&&(e="hidden"!==i.css("overflow"),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativ
e_container=i),undefined):(this.containment=null,undefined)},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent;return this.offset.scroll||(this.offset.scroll={top:n.scrollTop(),left:n.scrollLeft()}),{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top)*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)*s}},_generatePosition:function(e){var i,s,n,o,a=this.options,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=e.pageX,l=e.pageY;return this.offset.scroll||(this.offset.scroll={top:r.scrollTop(),left:r.scr
ollLeft()}),this.originalPosition&&(this.containment&&(this.relative_container?(s=this.relative_container.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,e.pageX-this.offset.click.left<i[0]&&(h=i[0]+this.offset.click.left),e.pageY-this.offset.click.top<i[1]&&(l=i[1]+this.offset.click.top),e.pageX-this.offset.click.left>i[2]&&(h=i[2]+this.offset.click.left),e.pageY-this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),a.grid&&(n=a.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/a.grid[1])*a.grid[1]:this.originalPageY,l=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-a.grid[1]:n+a.grid[1]:n,o=a.grid[0]?this.originalPageX+Math.round((h-this.originalPageX)/a.grid[0])*a.grid[0]:this.originalPageX,h=i?o-this.offset.click.left>=i[0]||o-this.offset.click.left>i[2]?o:o-this.offset.click.left>=i[0]?o-a.grid[0]:o+a.grid[0]:o)),{top:l-this
.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(e,i,s){return s=s||this._uiHash(),t.ui.plugin.call(this,e,[i,s]),"drag"===e&&(this.positionAbs=this._convertPositionTo("absolute")),t.Widget.prototype._trigger.call(this,e,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i){var s=t(this).data("ui-draggable"),n=s.options,o=t.extend({},i,{item:s.eleme
nt});s.sortables=[],t(n.connectToSortable).each(function(){var i=t.data(this,"ui-sortable");i&&!i.options.disabled&&(s.sortables.push({instance:i,shouldRevert:i.options.revert}),i.refreshPositions(),i._trigger("activate",e,o))})},stop:function(e,i){var s=t(this).data("ui-draggable"),n=t.extend({},i,{item:s.element});t.each(s.sortables,function(){this.instance.isOver?(this.instance.isOver=0,s.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=this.shouldRevert),this.instance._mouseStop(e),this.instance.options.helper=this.instance.options._helper,"original"===s.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",e,n))})},drag:function(e,i){var s=t(this).data("ui-draggable"),n=this;t.each(s.sortables,function(){var o=!1,a=this;this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.off
set.click=s.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(o=!0,t.each(s.sortables,function(){return this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this!==a&&this.instance._intersectsWith(this.instance.containerCache)&&t.contains(a.instance.element[0],this.instance.element[0])&&(o=!1),o})),o?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=t(n).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return i.helper[0]},e.target=this.instance.currentItem[0],this.instance._mouseCapture(e,!0),this.instance._mouseStart(e,!0,!0),this.instance.offset.click.top=s.offset.click.top,this.instance.offset.click.left=s.offset.click.left,this.instance.offset.parent.left-=s.offset.parent.left-this.instance.offset.parent.left,this.insta
nce.offset.parent.top-=s.offset.parent.top-this.instance.offset.parent.top,s._trigger("toSortable",e),s.dropped=this.instance.element,s.currentItem=s.element,this.instance.fromOutside=s),this.instance.currentItem&&this.instance._mouseDrag(e)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",e,this.instance._uiHash(this.instance)),this.instance._mouseStop(e,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),s._trigger("fromSortable",e),s.dropped=!1)})}}),t.ui.plugin.add("draggable","cursor",{start:function(){var e=t("body"),i=t(this).data("ui-draggable").options;e.css("cursor")&&(i._cursor=e.css("cursor")),e.css("cursor",i.cursor)},stop:function(){var e=t(this).data("ui-draggable").options;e._cursor&&t("body").css("cursor",e._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:fu
nction(e,i){var s=t(i.helper),n=t(this).data("ui-draggable").options;s.css("opacity")&&(n._opacity=s.css("opacity")),s.css("opacity",n.opacity)},stop:function(e,i){var s=t(this).data("ui-draggable").options;s._opacity&&t(i.helper).css("opacity",s._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(){var e=t(this).data("ui-draggable");e.scrollParent[0]!==document&&"HTML"!==e.scrollParent[0].tagName&&(e.overflowOffset=e.scrollParent.offset())},drag:function(e){var i=t(this).data("ui-draggable"),s=i.options,n=!1;i.scrollParent[0]!==document&&"HTML"!==i.scrollParent[0].tagName?(s.axis&&"x"===s.axis||(i.overflowOffset.top+i.scrollParent[0].offsetHeight-e.pageY<s.scrollSensitivity?i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop+s.scrollSpeed:e.pageY-i.overflowOffset.top<s.scrollSensitivity&&(i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop-s.scrollSpeed)),s.axis&&"y"===s.axis||(i.overflowOffset.left+i.scrollParent[0].offsetWidth-e.pageX<s.scrollSensitivity
?i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft+s.scrollSpeed:e.pageX-i.overflowOffset.left<s.scrollSensitivity&&(i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft-s.scrollSpeed))):(s.axis&&"x"===s.axis||(e.pageY-t(document).scrollTop()<s.scrollSensitivity?n=t(document).scrollTop(t(document).scrollTop()-s.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<s.scrollSensitivity&&(n=t(document).scrollTop(t(document).scrollTop()+s.scrollSpeed))),s.axis&&"y"===s.axis||(e.pageX-t(document).scrollLeft()<s.scrollSensitivity?n=t(document).scrollLeft(t(document).scrollLeft()-s.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<s.scrollSensitivity&&(n=t(document).scrollLeft(t(document).scrollLeft()+s.scrollSpeed)))),n!==!1&&t.ui.ddmanager&&!s.dropBehaviour&&t.ui.ddmanager.prepareOffsets(i,e)}}),t.ui.plugin.add("draggable","snap",{start:function(){var e=t(this).data("ui-draggable"),i=e.options;e.snapElements=[],t(i.snap.constructor!==String?i.
snap.items||":data(ui-draggable)":i.snap).each(function(){var i=t(this),s=i.offset();this!==e.element[0]&&e.snapElements.push({item:this,width:i.outerWidth(),height:i.outerHeight(),top:s.top,left:s.left})})},drag:function(e,i){var s,n,o,a,r,h,l,c,u,d,p=t(this).data("ui-draggable"),f=p.options,g=f.snapTolerance,m=i.offset.left,v=m+p.helperProportions.width,_=i.offset.top,b=_+p.helperProportions.height;for(u=p.snapElements.length-1;u>=0;u--)r=p.snapElements[u].left,h=r+p.snapElements[u].width,l=p.snapElements[u].top,c=l+p.snapElements[u].height,r-g>v||m>h+g||l-g>b||_>c+g||!t.contains(p.snapElements[u].item.ownerDocument,p.snapElements[u].item)?(p.snapElements[u].snapping&&p.options.snap.release&&p.options.snap.release.call(p.element,e,t.extend(p._uiHash(),{snapItem:p.snapElements[u].item})),p.snapElements[u].snapping=!1):("inner"!==f.snapMode&&(s=g>=Math.abs(l-b),n=g>=Math.abs(c-_),o=g>=Math.abs(r-v),a=g>=Math.abs(h-m),s&&(i.position.top=p._convertPositionTo("relative",{top:l-p.helper
Proportions.height,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:c,left:0}).top-p.margins.top),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r-p.helperProportions.width}).left-p.margins.left),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:h}).left-p.margins.left)),d=s||n||o||a,"outer"!==f.snapMode&&(s=g>=Math.abs(l-_),n=g>=Math.abs(c-b),o=g>=Math.abs(r-m),a=g>=Math.abs(h-v),s&&(i.position.top=p._convertPositionTo("relative",{top:l,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:c-p.helperProportions.height,left:0}).top-p.margins.top),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r}).left-p.margins.left),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:h-p.helperProportions.width}).left-p.margins.left)),!p.snapElements[u].snapping&&(s||n||o||a||d)&&p.options.snap.snap&&p.options.snap.snap.call(p.element,e,t.extend(p._uiHash(),{snapItem:p.snapEl
ements[u].item})),p.snapElements[u].snapping=s||n||o||a||d)}}),t.ui.plugin.add("draggable","stack",{start:function(){var e,i=this.data("ui-draggable").options,s=t.makeArray(t(i.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});s.length&&(e=parseInt(t(s[0]).css("zIndex"),10)||0,t(s).each(function(i){t(this).css("zIndex",e+i)}),this.css("zIndex",e+s.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i){var s=t(i.helper),n=t(this).data("ui-draggable").options;s.css("zIndex")&&(n._zIndex=s.css("zIndex")),s.css("zIndex",n.zIndex)},stop:function(e,i){var s=t(this).data("ui-draggable").options;s._zIndex&&t(i.helper).css("zIndex",s._zIndex)}})}(jQuery),function(t){function e(t,e,i){return t>e&&e+i>t}t.widget("ui.droppable",{version:"1.10.3",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out
:null,over:null},_create:function(){var e=this.options,i=e.accept;this.isover=!1,this.isout=!0,this.accept=t.isFunction(i)?i:function(t){return t.is(i)
-},this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight},t.ui.ddmanager.droppables[e.scope]=t.ui.ddmanager.droppables[e.scope]||[],t.ui.ddmanager.droppables[e.scope].push(this),e.addClasses&&this.element.addClass("ui-droppable")},_destroy:function(){for(var e=0,i=t.ui.ddmanager.droppables[this.options.scope];i.length>e;e++)i[e]===this&&i.splice(e,1);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(e,i){"accept"===e&&(this.accept=t.isFunction(i)?i:function(t){return t.is(i)}),t.Widget.prototype._setOption.apply(this,arguments)},_activate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.ui.ddmanager.current;i&&(i
.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",e,this.ui(i)))},_out:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var s=i||t.ui.ddmanager.current,n=!1;return s&&(s.currentItem||s.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var e=t.data(this,"ui-droppable");return e.options.greedy&&!e.options.disabled&&e.options.scope===s.options.scope&&e.accept.call(e.element[0],s.currentItem||s.element)&&t.ui.intersect(s,t.extend(e,{offset:e.element.offset()}),e.options.tolerance)?(n=!0,!1):undefined}),n?!1:this.accept.call(this.element[0],
s.currentItem||s.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",e,this.ui(s)),this.element):!1):!1},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}}}),t.ui.intersect=function(t,i,s){if(!i.offset)return!1;var n,o,a=(t.positionAbs||t.position.absolute).left,r=a+t.helperProportions.width,h=(t.positionAbs||t.position.absolute).top,l=h+t.helperProportions.height,c=i.offset.left,u=c+i.proportions.width,d=i.offset.top,p=d+i.proportions.height;switch(s){case"fit":return a>=c&&u>=r&&h>=d&&p>=l;case"intersect":return a+t.helperProportions.width/2>c&&u>r-t.helperProportions.width/2&&h+t.helperProportions.height/2>d&&p>l-t.helperProportions.height/2;case"pointer":return n=(t.positionAbs||t.position.absolute).left+(t.clickOffset||t.offset.click).left,o=(t.positionAbs||t.position.absolute).top+(t.
clickOffset||t.offset.click).top,e(o,d,i.proportions.height)&&e(n,c,i.proportions.width);case"touch":return(h>=d&&p>=h||l>=d&&p>=l||d>h&&l>p)&&(a>=c&&u>=a||r>=c&&u>=r||c>a&&r>u);default:return!1}},t.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,i){var s,n,o=t.ui.ddmanager.droppables[e.options.scope]||[],a=i?i.type:null,r=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(s=0;o.length>s;s++)if(!(o[s].options.disabled||e&&!o[s].accept.call(o[s].element[0],e.currentItem||e.element))){for(n=0;r.length>n;n++)if(r[n]===o[s].element[0]){o[s].proportions.height=0;continue t}o[s].visible="none"!==o[s].element.css("display"),o[s].visible&&("mousedown"===a&&o[s]._activate.call(o[s],i),o[s].offset=o[s].element.offset(),o[s].proportions={width:o[s].element[0].offsetWidth,height:o[s].element[0].offsetHeight})}},drop:function(e,i){var s=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.opti
ons.disabled&&this.visible&&t.ui.intersect(e,this,this.options.tolerance)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(e,i){e.element.parentsUntil("body").bind("scroll.droppable",function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)})},drag:function(e,i){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,i),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,o,a=t.ui.intersect(e,this,this.options.tolerance),r=!a&&this.isover?"isout":a&&!this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,o=this.element.parents(":data(ui-droppable)").filter(function(){return t.data(this,"ui-droppable").options.scope===n}),o.length&&(s=t.data(o[0],"ui-droppable"),s.greedyChild="isover"===r)),s&&"isover"==
=r&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),s&&"isout"===r&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(e,i){e.element.parentsUntil("body").unbind("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}}}(jQuery),function(t){function e(t){return parseInt(t,10)||0}function i(t){return!isNaN(parseInt(t,10))}t.widget("ui.resizable",t.ui.mouse,{version:"1.10.3",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_create:function(){var e,i,s,n,o,a=this,r=this.options;if(this.element.addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!r.aspectRatio,aspectRatio:r.aspectRatio,originalElement:this.element,_pro
portionallyResizeElements:[],_helper:r.helper||r.ghost||r.animate?r.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(t("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.data("ui-resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(th
is.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=r.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),e=this.handles.split(","),this.handles={},i=0;e.length>i;i++)s=t.trim(e[i]),o="ui-resizable-"+s,n=t("<div class='ui-resizable-handle "+o+"'></div>"),n.css({zIndex:r.zIndex}),"se"===s&&n.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[s]=".ui-resizable-"+s,this.element.append(n);this._renderAxis=function(e){var i,s,n,o;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String&&(this.handles[i]=t(this.handles[i],this.element).show()),this.elemen
tIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(s=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,o),this._proportionallyResize()),t(this.handles[i]).length},this._renderAxis(this.element),this._handles=t(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){a.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),a.axis=n&&n[1]?n[1]:"se")}),r.autoHide&&(this._handles.hide(),t(this.element).addClass("ui-resizable-autohide").mouseenter(function(){r.disabled||(t(this).removeClass("ui-resizable-autohide"),a._handles.show())}).mouseleave(function(){r.disabled||a.resizing||(t(this).addClass("ui-resizable-autohide"),a._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeC
lass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)s=t(this.handles[i])[0],(s===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(i){var s,n,o,a=this.options,r=this.element.position(),h=this.element;return this.resizing=!0,/absolute/.test(h.css("position"))?h.css({position:"absolute",top:h.css("top"),left:h.css("left")}):h.is(".ui-draggable")&&h.css({position:"absolute",top:r.top,left:r.left}),this._renderProxy(),s=e(this.helper.css("left")),n=e(t
his.helper.css("top")),a.containment&&(s+=t(a.containment).scrollLeft()||0,n+=t(a.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:s,top:n},this.size=this._helper?{width:h.outerWidth(),height:h.outerHeight()}:{width:h.width(),height:h.height()},this.originalSize=this._helper?{width:h.outerWidth(),height:h.outerHeight()}:{width:h.width(),height:h.height()},this.originalPosition={left:s,top:n},this.sizeDiff={width:h.outerWidth()-h.width(),height:h.outerHeight()-h.height()},this.originalMousePosition={left:i.pageX,top:i.pageY},this.aspectRatio="number"==typeof a.aspectRatio?a.aspectRatio:this.originalSize.width/this.originalSize.height||1,o=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===o?this.axis+"-resize":o),h.addClass("ui-resizable-resizing"),this._propagate("start",i),!0},_mouseDrag:function(e){var i,s=this.helper,n={},o=this.originalMousePosition,a=this.axis,r=this.position.top,h=this.position.left,l=this.size.width,c=
this.size.height,u=e.pageX-o.left||0,d=e.pageY-o.top||0,p=this._change[a];return p?(i=p.apply(this,[e,u,d]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),this.position.top!==r&&(n.top=this.position.top+"px"),this.position.left!==h&&(n.left=this.position.left+"px"),this.size.width!==l&&(n.width=this.size.width+"px"),this.size.height!==c&&(n.height=this.size.height+"px"),s.css(n),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(n)||this._trigger("resize",e,this.ui()),!1):!1},_mouseStop:function(e){this.resizing=!1;var i,s,n,o,a,r,h,l=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&t.ui.hasScroll(i[0],"left")?0:c.sizeDiff.height,o=s?0:c.sizeDiff.width,a={width:c.helper.width()-o,height:c.helper.height()-n},r=parseInt(c.element
.css("left"),10)+(c.position.left-c.originalPosition.left)||null,h=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null,l.animate||this.element.css(t.extend(a,{top:h,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(t){var e,s,n,o,a,r=this.options;a={minWidth:i(r.minWidth)?r.minWidth:0,maxWidth:i(r.maxWidth)?r.maxWidth:1/0,minHeight:i(r.minHeight)?r.minHeight:0,maxHeight:i(r.maxHeight)?r.maxHeight:1/0},(this._aspectRatio||t)&&(e=a.minHeight*this.aspectRatio,n=a.minWidth/this.aspectRatio,s=a.maxHeight*this.aspectRatio,o=a.maxWidth/this.aspectRatio,e>a.minWidth&&(a.minWidth=e),n>a.minHeight&&(a.minHeight=n),a.maxWidth>s&&(a.maxWidth=s),a.maxHeight>o&&(a.maxHeight=o)),this._vBoundaries=a},_updateCache:functi
on(t){this.offset=this.helper.offset(),i(t.left)&&(this.position.left=t.left),i(t.top)&&(this.position.top=t.top),i(t.height)&&(this.size.height=t.height),i(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,s=this.size,n=this.axis;return i(t.height)?t.width=t.height*this.aspectRatio:i(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===n&&(t.left=e.left+(s.width-t.width),t.top=null),"nw"===n&&(t.top=e.top+(s.height-t.height),t.left=e.left+(s.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,s=this.axis,n=i(t.width)&&e.maxWidth&&e.maxWidth<t.width,o=i(t.height)&&e.maxHeight&&e.maxHeight<t.height,a=i(t.width)&&e.minWidth&&e.minWidth>t.width,r=i(t.height)&&e.minHeight&&e.minHeight>t.height,h=this.originalPosition.left+this.originalSize.width,l=this.position.top+this.size.height,c=/sw|nw|w/.test(s),u=/nw|ne|n/.test(s);return a&&(t.width=e.minWidth),r&&(t.height=e.minHeight),n&&(t.width=e.maxWidth),o&&(t.height=e.maxHeight),a&&c&&(t.left
=h-e.minWidth),n&&c&&(t.left=h-e.maxWidth),r&&u&&(t.top=l-e.minHeight),o&&u&&(t.top=l-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_proportionallyResize:function(){if(this._proportionallyResizeElements.length){var t,e,i,s,n,o=this.helper||this.element;for(t=0;this._proportionallyResizeElements.length>t;t++){if(n=this._proportionallyResizeElements[t],!this.borderDif)for(this.borderDif=[],i=[n.css("borderTopWidth"),n.css("borderRightWidth"),n.css("borderBottomWidth"),n.css("borderLeftWidth")],s=[n.css("paddingTop"),n.css("paddingRight"),n.css("paddingBottom"),n.css("paddingLeft")],e=0;i.length>e;e++)this.borderDif[e]=(parseInt(i[e],10)||0)+(parseInt(s[e],10)||0);n.css({height:o.height()-this.borderDif[0]-this.borderDif[2]||0,width:o.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("<div styl
e='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,s=this.originalPosition;return{left:s.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,
i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).data("ui-resizable"),s=i.options,n=i._proportionallyResizeElements,o=n.length&&/textarea/i.test(n[0].nodeName),a=o&&t.ui.hasScroll(n[0],"left")?0:i.sizeDiff.height,r=o?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-a},l=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,c=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(h,c&&l?{top:c,left:l}:{}),{duration:s.animateDuration,easing:s.animateEas
ing,step:function(){var s={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var i,s,n,o,a,r,h,l=t(this).data("ui-resizable"),c=l.options,u=l.element,d=c.containment,p=d instanceof t?d.get(0):/parent/.test(d)?u.parent().get(0):d;p&&(l.containerElement=t(p),/document/.test(d)||d===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(i=t(p),s=[],t(["Top","Right","Left","Bottom"]).each(function(t,n){s[t]=e(i.css("padding"+n))}),l.containerOffset=i.offset(),l.containerPosition=i.position(),l.containerSize={height:i.innerHeight()-s[3],width:i.inn
erWidth()-s[1]},n=l.containerOffset,o=l.containerSize.height,a=l.containerSize.width,r=t.ui.hasScroll(p,"left")?p.scrollWidth:a,h=t.ui.hasScroll(p)?p.scrollHeight:o,l.parentData={element:p,left:n.left,top:n.top,width:r,height:h}))},resize:function(e){var i,s,n,o,a=t(this).data("ui-resizable"),r=a.options,h=a.containerOffset,l=a.position,c=a._aspectRatio||e.shiftKey,u={top:0,left:0},d=a.containerElement;d[0]!==document&&/static/.test(d.css("position"))&&(u=h),l.left<(a._helper?h.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-h.left:a.position.left-u.left),c&&(a.size.height=a.size.width/a.aspectRatio),a.position.left=r.helper?h.left:0),l.top<(a._helper?h.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-h.top:a.position.top),c&&(a.size.width=a.size.height*a.aspectRatio),a.position.top=a._helper?h.top:0),a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.top+a.position.top,i=Math.abs((a._helper?a.offset.left-u.left:a.offset.left-u.lef
t)+a.sizeDiff.width),s=Math.abs((a._helper?a.offset.top-u.top:a.offset.top-h.top)+a.sizeDiff.height),n=a.containerElement.get(0)===a.element.parent().get(0),o=/relative|absolute/.test(a.containerElement.css("position")),n&&o&&(i-=a.parentData.left),i+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.width-i,c&&(a.size.height=a.size.width/a.aspectRatio)),s+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-s,c&&(a.size.width=a.size.height*a.aspectRatio))},stop:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.containerOffset,n=e.containerPosition,o=e.containerElement,a=t(e.helper),r=a.offset(),h=a.outerWidth()-e.sizeDiff.width,l=a.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),t.ui.plugin.add("resizable","alsoResize",{start:f
unction(){var e=t(this).data("ui-resizable"),i=e.options,s=function(e){t(e).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseInt(e.width(),10),height:parseInt(e.height(),10),left:parseInt(e.css("left"),10),top:parseInt(e.css("top"),10)})})};"object"!=typeof i.alsoResize||i.alsoResize.parentNode?s(i.alsoResize):i.alsoResize.length?(i.alsoResize=i.alsoResize[0],s(i.alsoResize)):t.each(i.alsoResize,function(t){s(t)})},resize:function(e,i){var s=t(this).data("ui-resizable"),n=s.options,o=s.originalSize,a=s.originalPosition,r={height:s.size.height-o.height||0,width:s.size.width-o.width||0,top:s.position.top-a.top||0,left:s.position.left-a.left||0},h=function(e,s){t(e).each(function(){var e=t(this),n=t(this).data("ui-resizable-alsoresize"),o={},a=s&&s.length?s:e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(a,function(t,e){var i=(n[e]||0)+(r[e]||0);i&&i>=0&&(o[e]=i||null)}),e.css(o)})};"object"!=typeof n.alsoResize
||n.alsoResize.nodeType?h(n.alsoResize):t.each(n.alsoResize,function(t,e){h(t,e)})},stop:function(){t(this).removeData("resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).data("ui-resizable");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).data("ui-resizable");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.size,n=e.originalSize,o=e.originalPosition,a=e.axis,r="number"==typeof i.grid?[i.grid,i.grid]:i.grid,h=r[0]||1,l=r[1]||1,c=Math
.round((s.width-n.width)/h)*h,u=Math.round((s.height-n.height)/l)*l,d=n.width+c,p=n.height+u,f=i.maxWidth&&d>i.maxWidth,g=i.maxHeight&&p>i.maxHeight,m=i.minWidth&&i.minWidth>d,v=i.minHeight&&i.minHeight>p;i.grid=r,m&&(d+=h),v&&(p+=l),f&&(d-=h),g&&(p-=l),/^(se|s|e)$/.test(a)?(e.size.width=d,e.size.height=p):/^(ne)$/.test(a)?(e.size.width=d,e.size.height=p,e.position.top=o.top-u):/^(sw)$/.test(a)?(e.size.width=d,e.size.height=p,e.position.left=o.left-c):(e.size.width=d,e.size.height=p,e.position.top=o.top-u,e.position.left=o.left-c)}})}(jQuery),function(t){t.widget("ui.selectable",t.ui.mouse,{version:"1.10.3",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var e,i=this;this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){e=t(i.options.filter,i.element[0]),e.addClass("ui-selectee"),e.each(function(){var e=t(this),i=e.offset();t
.data(this,"selectable-item",{element:this,$element:e,left:i.left,top:i.top,right:i.left+e.outerWidth(),bottom:i.top+e.outerHeight(),startselected:!1,selected:e.hasClass("ui-selected"),selecting:e.hasClass("ui-selecting"),unselecting:e.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=e.addClass("ui-selectee"),this._mouseInit(),this.helper=t("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(e){var i=this,s=this.options;this.opos=[e.pageX,e.pageY],this.options.disabled||(this.selectees=t(s.filter,this.element[0]),this._trigger("start",e),t(s.appendTo).append(this.helper),this.helper.css({left:e.pageX,top:e.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=t.data(this,"selectable-item");s.startselected=!0,e.metaKey||e
.ctrlKey||(s.$element.removeClass("ui-selected"),s.selected=!1,s.$element.addClass("ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",e,{unselecting:s.element}))}),t(e.target).parents().addBack().each(function(){var s,n=t.data(this,"selectable-item");return n?(s=!e.metaKey&&!e.ctrlKey||!n.$element.hasClass("ui-selected"),n.$element.removeClass(s?"ui-unselecting":"ui-selected").addClass(s?"ui-selecting":"ui-unselecting"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger("selecting",e,{selecting:n.element}):i._trigger("unselecting",e,{unselecting:n.element}),!1):undefined}))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled){var i,s=this,n=this.options,o=this.opos[0],a=this.opos[1],r=e.pageX,h=e.pageY;return o>r&&(i=r,r=o,o=i),a>h&&(i=h,h=a,a=i),this.helper.css({left:o,top:a,width:r-o,height:h-a}),this.selectees.each(function(){var i=t.data(this,"selectable-item"),l=!1;i&&i.element!==s.element[0]&&("touch"===n.tolerance?l=!(i.left>r||o>i.right||i.top>h|
|a>i.bottom):"fit"===n.tolerance&&(l=i.left>o&&r>i.right&&i.top>a&&h>i.bottom),l?(i.selected&&(i.$element.removeClass("ui-selected"),i.selected=!1),i.unselecting&&(i.$element.removeClass("ui-unselecting"),i.unselecting=!1),i.selecting||(i.$element.addClass("ui-selecting"),i.selecting=!0,s._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metaKey||e.ctrlKey)&&i.startselected?(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.$element.addClass("ui-selected"),i.selected=!0):(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.startselected&&(i.$element.addClass("ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",e,{unselecting:i.element}))),i.selected&&(e.metaKey||e.ctrlKey||i.startselected||(i.$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",e,{unselecting:i.element})))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,t(".ui-unselecting",this.element[0])
.each(function(){var s=t.data(this,"selectable-item");s.$element.removeClass("ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",e,{unselected:s.element})}),t(".ui-selecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");s.$element.removeClass("ui-selecting").addClass("ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",e,{selected:s.element})}),this._trigger("stop",e),this.helper.remove(),!1}})}(jQuery),function(t){function e(t,e,i){return t>e&&e+i>t}function i(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))}t.widget("ui.sortable",t.ui.mouse,{version:"1.10.3",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed
:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_create:function(){var t=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?"x"===t.axis||i(this.items[0].item):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_setOption:function(e,i){"disabled"===e?(this.options[e]=i,this.widget().toggleClass("ui-sortable-disabled",!!i)):t.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(e,i){var s=null,n=!1,o=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(e),t(e.target).paren
ts().each(function(){return t.data(this,o.widgetName+"-item")===o?(s=t(this),!1):undefined}),t.data(e.target,o.widgetName+"-item")===o&&(s=t(e.target)),s?!this.options.handle||i||(t(this.options.handle,s).find("*").addBack().each(function(){this===e.target&&(n=!0)}),n)?(this.currentItem=s,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(e,i,s){var n,o,a=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.origi
nalPageX=e.pageX,this.originalPageY=e.pageY,a.cursorAt&&this._adjustOffsetFromHelper(a.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),a.containment&&this._setContainment(),a.cursor&&"auto"!==a.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",a.cursor),this.storedStylesheet=t("<style>*{ cursor: "+a.cursor+" !important; }</style>").appendTo(o)),a.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",a.opacity)),a.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",a.zIndex)),this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)
for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,s,n,o,a=this.options,r=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<a.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+a.scrollSpeed:e.pageY-this.overflowOffset.top<a.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-a.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<a.scrollSensitivi
ty?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+a.scrollSpeed:e.pageX-this.overflowOffset.left<a.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-a.scrollSpeed)):(e.pageY-t(document).scrollTop()<a.scrollSensitivity?r=t(document).scrollTop(t(document).scrollTop()-a.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<a.scrollSensitivity&&(r=t(document).scrollTop(t(document).scrollTop()+a.scrollSpeed)),e.pageX-t(document).scrollLeft()<a.scrollSensitivity?r=t(document).scrollLeft(t(document).scrollLeft()-a.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<a.scrollSensitivity&&(r=t(document).scrollLeft(t(document).scrollLeft()+a.scrollSpeed))),r!==!1&&t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.op
tions.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(s=this.items[i],n=s.item[0],o=this._intersectsWithPointer(s),o&&s.instance===this.currentContainer&&n!==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==n&&!t.contains(this.placeholder[0],n)&&("semi-dynamic"===this.options.type?!t.contains(this.element[0],n):!0)){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;
-this._rearrange(e,s),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,n=this.placeholder.offset(),o=this.options.axis,a={};o&&"x"!==o||(a.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(a.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(a,parseInt(this.options.revert,10)||500,function(){s._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortab
le-helper"):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!s.length&&e.key&&s.pus
h(e.key+"="),s.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each(function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")}),s},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,o=t.left,a=o+t.width,r=t.top,h=r+t.height,l=this.offset.click.top,c=this.offset.click.left,u="x"===this.options.axis||s+l>r&&h>s+l,d="y"===this.options.axis||e+c>o&&a>e+c,p=u&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:e+this.helperProportions.width/2>o&&a>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>r&&h>n-this.helperProportions.height/2},_intersectsWithPointer:function(t){var i="x"===this.options.axis||e(this.positionAbs.top+this.offset.click.top,t.top,t.height),s="y"
===this.options.axis||e(this.positionAbs.left+this.offset.click.left,t.left,t.width),n=i&&s,o=this._getDragVerticalDirection(),a=this._getDragHorizontalDirection();return n?this.floating?a&&"right"===a||"down"===o?2:1:o&&("down"===o?2:1):!1},_intersectsWithSides:function(t){var i=e(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),s=e(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),n=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return this.floating&&o?"right"===o&&s||"left"===o&&!s:n&&("down"===n&&i||"up"===n&&!i)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===
String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){var i,s,n,o,a=[],r=[],h=this._connectWith();if(h&&e)for(i=h.length-1;i>=0;i--)for(n=t(h[i]),s=n.length-1;s>=0;s--)o=t.data(n[s],this.widgetFullName),o&&o!==this&&!o.options.disabled&&r.push([t.isFunction(o.options.items)?o.options.items.call(o.element):t(o.options.items,o.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),o]);for(r.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),i=r.length-1;i>=0;i--)r[i][0].each(function(){a.push(this)});return t(a)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;e.length>i;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i
,s,n,o,a,r,h,l,c=this.items,u=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(n=t(d[i]),s=n.length-1;s>=0;s--)o=t.data(n[s],this.widgetFullName),o&&o!==this&&!o.options.disabled&&(u.push([t.isFunction(o.options.items)?o.options.items.call(o.element[0],e,{item:this.currentItem}):t(o.options.items,o.element),o]),this.containers.push(o));for(i=u.length-1;i>=0;i--)for(a=u[i][1],r=u[i][0],s=0,l=r.length;l>s;s++)h=t(r[s]),h.data(this.widgetName+"-item",a),c.push({item:h,instance:a,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,s,n,o;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?t(this.options.toleranceE
lement,s.item):s.item,e||(s.width=n.outerWidth(),s.height=n.outerHeight()),o=n.offset(),s.left=o.left,s.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)o=this.containers[i].element.offset(),this.containers[i].containerCache.left=o.left,this.containers[i].containerCache.top=o.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){e=e||this;var i,s=e.options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=e.currentItem[0].nodeName.toLowerCase(),n=t("<"+s+">",e.document[0]).addClass(i||e.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===s?e.currentItem.children().each(function(){t("<td> </td>",e.document
[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(n)}):"img"===s&&n.attr("src",e.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(t,n){(!i||s.forcePlaceholderSize)&&(n.height()||n.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(s.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),s.placeholder.update(e,e.placeholder)},_contactContainers:function(s){var n,o,a,r,h,l,c,u,d,p,f=null,g=null;for(n=this.containers.length-1;n>=0;n--)if(!t.contains(this.currentItem[0],this.containers[n].element[0]))if(this._intersectsWith(this.containers[n].containerCache)){if(f&&t.contains(this.containers[n].element[0],f.element[0]))continue;f=this.containers[n],g=n}else this.containers[n].c
ontainerCache.over&&(this.containers[n]._trigger("out",s,this._uiHash(this)),this.containers[n].containerCache.over=0);if(f)if(1===this.containers.length)this.containers[g].containerCache.over||(this.containers[g]._trigger("over",s,this._uiHash(this)),this.containers[g].containerCache.over=1);else{for(a=1e4,r=null,p=f.floating||i(this.currentItem),h=p?"left":"top",l=p?"width":"height",c=this.positionAbs[h]+this.offset.click[h],o=this.items.length-1;o>=0;o--)t.contains(this.containers[g].element[0],this.items[o].item[0])&&this.items[o].item[0]!==this.currentItem[0]&&(!p||e(this.positionAbs.top+this.offset.click.top,this.items[o].top,this.items[o].height))&&(u=this.items[o].item.offset()[h],d=!1,Math.abs(u-c)>Math.abs(u+this.items[o][l]-c)&&(d=!0,u+=this.items[o][l]),a>Math.abs(u-c)&&(a=Math.abs(u-c),r=this.items[o],this.direction=d?"up":"down"));if(!r&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[g])return;r?this._rearrange(s,r,null,!0):this._rearrange(
s,null,this.containers[g].element,!0),this._trigger("change",s,this._uiHash()),this.containers[g]._trigger("change",s,this._uiHash(this)),this.currentContainer=this.containers[g],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[g]._trigger("over",s,this._uiHash(this)),this.containers[g].containerCache.over=1}},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHe
lperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),1
0)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,t("document"===n.containment?document:window).widt
h()-this.helperProportions.width-this.margins.left,(t("document"===n.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(e=t(n.containment)[0],i=t(n.containment).offset(),s="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:func
tion(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:n.scrollLeft())*s}},_generatePosition:function(e){var i,s,n=this.options,o=e.pageX,a=e.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPositio
n&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(a=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(a=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((a-this.originalPageY)/n.grid[1])*n.grid[1],a=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((o-this.originalPageX)/n.grid[0])*n.grid[0],o=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:a-this.offset.click.top-this.offset.relative
.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:r.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:r.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){this.reverting=!1;var i,s=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)("auto"===this._storedCSS[i]||"static"===this._storedCSS[i])&&(this._storedCSS[i]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.sh
ow();for(this.fromOutside&&!e&&s.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||s.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(s.push(function(t){this._trigger("remove",t,this._uiHash())}),s.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),s.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;i>=0;i--)e||s.push(function(t){return function(e){t._trigger("deactivate",e,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over&&(s.push(function(t){return function(e){t._trigger("out",e,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerC
ache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!e){for(this._trigger("beforeStop",t,this._uiHash()),i=0;s.length>i;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!1}if(e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null,!e){for(i=0;s.length>i;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){t.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.pos
ition,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}})}(jQuery),function(t,e){var i="ui-effects-";t.effects={effect:{}},function(t,e){function i(t,e,i){var s=u[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:0>t?0:t>s.max?s.max:t)}function s(i){var s=l(),n=s._rgba=[];return i=i.toLowerCase(),f(h,function(t,o){var a,r=o.re.exec(i),h=r&&o.parse(r),l=o.space||"rgba";return h?(a=s[l](h),s[c[l].cache]=a[c[l].cache],n=s._rgba=a._rgba,!1):e}),n.length?("0,0,0,0"===n.join()&&t.extend(n,o.transparent),s):o[i]}function n(t,e,i){return i=(i+1)%1,1>6*i?t+6*(e-t)*i:1>2*i?e:2>3*i?t+6*(e-t)*(2/3-i):t}var o,a="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,h=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\
)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],l=t.Color=function(e,i,s,n){return new t.Color.fn.parse(e,i,s,n)},c={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},u={"byte":{floor:!0,max:255},percent:{max:1},degrees:{
mod:360,floor:!0}},d=l.support={},p=t("<p>")[0],f=t.each;p.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(c,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),l.fn=t.extend(l.prototype,{parse:function(n,a,r,h){if(n===e)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=t(n).css(a),a=e);var u=this,d=t.type(n),p=this._rgba=[];return a!==e&&(n=[n,a,r,h],d="array"),"string"===d?this.parse(s(n)||o._default):"array"===d?(f(c.rgba.props,function(t,e){p[e.idx]=i(n[e.idx],e)}),this):"object"===d?(n instanceof l?f(c,function(t,e){n[e.cache]&&(u[e.cache]=n[e.cache].slice())}):f(c,function(e,s){var o=s.cache;f(s.props,function(t,e){if(!u[o]&&s.to){if("alpha"===t||null==n[t])return;u[o]=s.to(u._rgba)}u[o][e.idx]=i(n[t],e,!0)}),u[o]&&0>t.inArray(null,u[o].slice(0,3))&&(u[o][3]=1,s.from&&(u._rgba=s.from(u[o])))}),this):e},is:function(t){var i=l(t),s=!0,n=this;return f(c,function(t,o){var a,r=i[o.cache];
return r&&(a=n[o.cache]||o.to&&o.to(n._rgba)||[],f(o.props,function(t,i){return null!=r[i.idx]?s=r[i.idx]===a[i.idx]:e})),s}),s},_space:function(){var t=[],e=this;return f(c,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var s=l(t),n=s._space(),o=c[n],a=0===this.alpha()?l("transparent"):this,r=a[o.cache]||o.to(a._rgba),h=r.slice();return s=s[o.cache],f(o.props,function(t,n){var o=n.idx,a=r[o],l=s[o],c=u[n.type]||{};null!==l&&(null===a?h[o]=l:(c.mod&&(l-a>c.mod/2?a+=c.mod:a-l>c.mod/2&&(a-=c.mod)),h[o]=i((l-a)*e+a,n)))}),this[n](h)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=l(e)._rgba;return l(t.map(i,function(t,e){return(1-s)*n[e]+s*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+"
%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),s=i.pop();return e&&i.push(~~(255*s)),"#"+t.map(i,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),l.fn.parse.prototype=l.fn,c.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,s=t[0]/255,n=t[1]/255,o=t[2]/255,a=t[3],r=Math.max(s,n,o),h=Math.min(s,n,o),l=r-h,c=r+h,u=.5*c;return e=h===r?0:s===r?60*(n-o)/l+360:n===r?60*(o-s)/l+120:60*(s-n)/l+240,i=0===l?0:.5>=u?l/c:l/(2-c),[Math.round(e)%360,i,u,null==a?1:a]},c.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],o=t[3],a=.5>=s?s*(1+i):s+i-s*i,r=2*s-a;return[Math.round(255*n(r,a,e+1/3)),Math.round(255*n(r,a,e)),Math.round(255*n(r,a,e-1/3)),o]},f(c,function(s,n){var o=n.props,a=n.cache,h=n.to,c=n.from;l.fn[s]=function
(s){if(h&&!this[a]&&(this[a]=h(this._rgba)),s===e)return this[a].slice();var n,r=t.type(s),u="array"===r||"object"===r?s:arguments,d=this[a].slice();return f(o,function(t,e){var s=u["object"===r?t:e.idx];null==s&&(s=d[e.idx]),d[e.idx]=i(s,e)}),c?(n=l(c(d)),n[a]=d,n):l(d)},f(o,function(e,i){l.fn[e]||(l.fn[e]=function(n){var o,a=t.type(n),h="alpha"===e?this._hsla?"hsla":"rgba":s,l=this[h](),c=l[i.idx];return"undefined"===a?c:("function"===a&&(n=n.call(this,c),a=t.type(n)),null==n&&i.empty?this:("string"===a&&(o=r.exec(n),o&&(n=c+parseFloat(o[2])*("+"===o[1]?1:-1))),l[i.idx]=n,this[h](l)))})})}),l.hook=function(e){var i=
<TRUNCATED>
[24/28] CLIMATE-512 - Replace frontend with new Yeoman/Grunt/Bower
frontend
Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/.htaccess
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/.htaccess b/ocw-ui/frontend/app/.htaccess
new file mode 100644
index 0000000..cb84cb9
--- /dev/null
+++ b/ocw-ui/frontend/app/.htaccess
@@ -0,0 +1,543 @@
+# Apache Configuration File
+
+# (!) Using `.htaccess` files slows down Apache, therefore, if you have access
+# to the main server config file (usually called `httpd.conf`), you should add
+# this logic there: http://httpd.apache.org/docs/current/howto/htaccess.html.
+
+# ##############################################################################
+# # CROSS-ORIGIN RESOURCE SHARING (CORS) #
+# ##############################################################################
+
+# ------------------------------------------------------------------------------
+# | Cross-domain AJAX requests |
+# ------------------------------------------------------------------------------
+
+# Enable cross-origin AJAX requests.
+# http://code.google.com/p/html5security/wiki/CrossOriginRequestSecurity
+# http://enable-cors.org/
+
+# <IfModule mod_headers.c>
+# Header set Access-Control-Allow-Origin "*"
+# </IfModule>
+
+# ------------------------------------------------------------------------------
+# | CORS-enabled images |
+# ------------------------------------------------------------------------------
+
+# Send the CORS header for images when browsers request it.
+# https://developer.mozilla.org/en/CORS_Enabled_Image
+# http://blog.chromium.org/2011/07/using-cross-domain-images-in-webgl-and.html
+# http://hacks.mozilla.org/2011/11/using-cors-to-load-webgl-textures-from-cross-domain-images/
+
+<IfModule mod_setenvif.c>
+ <IfModule mod_headers.c>
+ <FilesMatch "\.(gif|ico|jpe?g|png|svg|svgz|webp)$">
+ SetEnvIf Origin ":" IS_CORS
+ Header set Access-Control-Allow-Origin "*" env=IS_CORS
+ </FilesMatch>
+ </IfModule>
+</IfModule>
+
+# ------------------------------------------------------------------------------
+# | Web fonts access |
+# ------------------------------------------------------------------------------
+
+# Allow access from all domains for web fonts
+
+<IfModule mod_headers.c>
+ <FilesMatch "\.(eot|font.css|otf|ttc|ttf|woff)$">
+ Header set Access-Control-Allow-Origin "*"
+ </FilesMatch>
+</IfModule>
+
+
+# ##############################################################################
+# # ERRORS #
+# ##############################################################################
+
+# ------------------------------------------------------------------------------
+# | 404 error prevention for non-existing redirected folders |
+# ------------------------------------------------------------------------------
+
+# Prevent Apache from returning a 404 error for a rewrite if a directory
+# with the same name does not exist.
+# http://httpd.apache.org/docs/current/content-negotiation.html#multiviews
+# http://www.webmasterworld.com/apache/3808792.htm
+
+Options -MultiViews
+
+# ------------------------------------------------------------------------------
+# | Custom error messages / pages |
+# ------------------------------------------------------------------------------
+
+# You can customize what Apache returns to the client in case of an error (see
+# http://httpd.apache.org/docs/current/mod/core.html#errordocument), e.g.:
+
+ErrorDocument 404 /404.html
+
+
+# ##############################################################################
+# # INTERNET EXPLORER #
+# ##############################################################################
+
+# ------------------------------------------------------------------------------
+# | Better website experience |
+# ------------------------------------------------------------------------------
+
+# Force IE to render pages in the highest available mode in the various
+# cases when it may not: http://hsivonen.iki.fi/doctype/ie-mode.pdf.
+
+<IfModule mod_headers.c>
+ Header set X-UA-Compatible "IE=edge"
+ # `mod_headers` can't match based on the content-type, however, we only
+ # want to send this header for HTML pages and not for the other resources
+ <FilesMatch "\.(appcache|crx|css|eot|gif|htc|ico|jpe?g|js|m4a|m4v|manifest|mp4|oex|oga|ogg|ogv|otf|pdf|png|safariextz|svg|svgz|ttf|vcf|webapp|webm|webp|woff|xml|xpi)$">
+ Header unset X-UA-Compatible
+ </FilesMatch>
+</IfModule>
+
+# ------------------------------------------------------------------------------
+# | Cookie setting from iframes |
+# ------------------------------------------------------------------------------
+
+# Allow cookies to be set from iframes in IE.
+
+# <IfModule mod_headers.c>
+# Header set P3P "policyref=\"/w3c/p3p.xml\", CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\""
+# </IfModule>
+
+# ------------------------------------------------------------------------------
+# | Screen flicker |
+# ------------------------------------------------------------------------------
+
+# Stop screen flicker in IE on CSS rollovers (this only works in
+# combination with the `ExpiresByType` directives for images from below).
+
+# BrowserMatch "MSIE" brokenvary=1
+# BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1
+# BrowserMatch "Opera" !brokenvary
+# SetEnvIf brokenvary 1 force-no-vary
+
+
+# ##############################################################################
+# # MIME TYPES AND ENCODING #
+# ##############################################################################
+
+# ------------------------------------------------------------------------------
+# | Proper MIME types for all files |
+# ------------------------------------------------------------------------------
+
+<IfModule mod_mime.c>
+
+ # Audio
+ AddType audio/mp4 m4a f4a f4b
+ AddType audio/ogg oga ogg
+
+ # JavaScript
+ # Normalize to standard type (it's sniffed in IE anyways):
+ # http://tools.ietf.org/html/rfc4329#section-7.2
+ AddType application/javascript js jsonp
+ AddType application/json json
+
+ # Video
+ AddType video/mp4 mp4 m4v f4v f4p
+ AddType video/ogg ogv
+ AddType video/webm webm
+ AddType video/x-flv flv
+
+ # Web fonts
+ AddType application/font-woff woff
+ AddType application/vnd.ms-fontobject eot
+
+ # Browsers usually ignore the font MIME types and sniff the content,
+ # however, Chrome shows a warning if other MIME types are used for the
+ # following fonts.
+ AddType application/x-font-ttf ttc ttf
+ AddType font/opentype otf
+
+ # Make SVGZ fonts work on iPad:
+ # https://twitter.com/FontSquirrel/status/14855840545
+ AddType image/svg+xml svg svgz
+ AddEncoding gzip svgz
+
+ # Other
+ AddType application/octet-stream safariextz
+ AddType application/x-chrome-extension crx
+ AddType application/x-opera-extension oex
+ AddType application/x-shockwave-flash swf
+ AddType application/x-web-app-manifest+json webapp
+ AddType application/x-xpinstall xpi
+ AddType application/xml atom rdf rss xml
+ AddType image/webp webp
+ AddType image/x-icon ico
+ AddType text/cache-manifest appcache manifest
+ AddType text/vtt vtt
+ AddType text/x-component htc
+ AddType text/x-vcard vcf
+
+</IfModule>
+
+# ------------------------------------------------------------------------------
+# | UTF-8 encoding |
+# ------------------------------------------------------------------------------
+
+# Use UTF-8 encoding for anything served as `text/html` or `text/plain`.
+AddDefaultCharset utf-8
+
+# Force UTF-8 for certain file formats.
+<IfModule mod_mime.c>
+ AddCharset utf-8 .atom .css .js .json .rss .vtt .webapp .xml
+</IfModule>
+
+
+# ##############################################################################
+# # URL REWRITES #
+# ##############################################################################
+
+# ------------------------------------------------------------------------------
+# | Rewrite engine |
+# ------------------------------------------------------------------------------
+
+# Turning on the rewrite engine and enabling the `FollowSymLinks` option is
+# necessary for the following directives to work.
+
+# If your web host doesn't allow the `FollowSymlinks` option, you may need to
+# comment it out and use `Options +SymLinksIfOwnerMatch` but, be aware of the
+# performance impact: http://httpd.apache.org/docs/current/misc/perf-tuning.html#symlinks
+
+# Also, some cloud hosting services require `RewriteBase` to be set:
+# http://www.rackspace.com/knowledge_center/frequently-asked-question/why-is-mod-rewrite-not-working-on-my-site
+
+<IfModule mod_rewrite.c>
+ Options +FollowSymlinks
+ # Options +SymLinksIfOwnerMatch
+ RewriteEngine On
+ # RewriteBase /
+</IfModule>
+
+# ------------------------------------------------------------------------------
+# | Suppressing / Forcing the "www." at the beginning of URLs |
+# ------------------------------------------------------------------------------
+
+# The same content should never be available under two different URLs especially
+# not with and without "www." at the beginning. This can cause SEO problems
+# (duplicate content), therefore, you should choose one of the alternatives and
+# redirect the other one.
+
+# By default option 1 (no "www.") is activated:
+# http://no-www.org/faq.php?q=class_b
+
+# If you'd prefer to use option 2, just comment out all the lines from option 1
+# and uncomment the ones from option 2.
+
+# IMPORTANT: NEVER USE BOTH RULES AT THE SAME TIME!
+
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+# Option 1: rewrite www.example.com → example.com
+
+<IfModule mod_rewrite.c>
+ RewriteCond %{HTTPS} !=on
+ RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
+ RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]
+</IfModule>
+
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+# Option 2: rewrite example.com → www.example.com
+
+# Be aware that the following might not be a good idea if you use "real"
+# subdomains for certain parts of your website.
+
+# <IfModule mod_rewrite.c>
+# RewriteCond %{HTTPS} !=on
+# RewriteCond %{HTTP_HOST} !^www\..+$ [NC]
+# RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
+# </IfModule>
+
+
+# ##############################################################################
+# # SECURITY #
+# ##############################################################################
+
+# ------------------------------------------------------------------------------
+# | Content Security Policy (CSP) |
+# ------------------------------------------------------------------------------
+
+# You can mitigate the risk of cross-site scripting and other content-injection
+# attacks by setting a Content Security Policy which whitelists trusted sources
+# of content for your site.
+
+# The example header below allows ONLY scripts that are loaded from the current
+# site's origin (no inline scripts, no CDN, etc). This almost certainly won't
+# work as-is for your site!
+
+# To get all the details you'll need to craft a reasonable policy for your site,
+# read: http://html5rocks.com/en/tutorials/security/content-security-policy (or
+# see the specification: http://w3.org/TR/CSP).
+
+# <IfModule mod_headers.c>
+# Header set Content-Security-Policy "script-src 'self'; object-src 'self'"
+# <FilesMatch "\.(appcache|crx|css|eot|gif|htc|ico|jpe?g|js|m4a|m4v|manifest|mp4|oex|oga|ogg|ogv|otf|pdf|png|safariextz|svg|svgz|ttf|vcf|webapp|webm|webp|woff|xml|xpi)$">
+# Header unset Content-Security-Policy
+# </FilesMatch>
+# </IfModule>
+
+# ------------------------------------------------------------------------------
+# | File access |
+# ------------------------------------------------------------------------------
+
+# Block access to directories without a default document.
+# Usually you should leave this uncommented because you shouldn't allow anyone
+# to surf through every directory on your server (which may includes rather
+# private places like the CMS's directories).
+
+<IfModule mod_autoindex.c>
+ Options -Indexes
+</IfModule>
+
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+# Block access to hidden files and directories.
+# This includes directories used by version control systems such as Git and SVN.
+
+<IfModule mod_rewrite.c>
+ RewriteCond %{SCRIPT_FILENAME} -d [OR]
+ RewriteCond %{SCRIPT_FILENAME} -f
+ RewriteRule "(^|/)\." - [F]
+</IfModule>
+
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+# Block access to backup and source files.
+# These files may be left by some text editors and can pose a great security
+# danger when anyone has access to them.
+
+<FilesMatch "(^#.*#|\.(bak|config|dist|fla|inc|ini|log|psd|sh|sql|sw[op])|~)$">
+ Order allow,deny
+ Deny from all
+ Satisfy All
+</FilesMatch>
+
+# ------------------------------------------------------------------------------
+# | Secure Sockets Layer (SSL) |
+# ------------------------------------------------------------------------------
+
+# Rewrite secure requests properly to prevent SSL certificate warnings, e.g.:
+# prevent `https://www.example.com` when your certificate only allows
+# `https://secure.example.com`.
+
+# <IfModule mod_rewrite.c>
+# RewriteCond %{SERVER_PORT} !^443
+# RewriteRule ^ https://example-domain-please-change-me.com%{REQUEST_URI} [R=301,L]
+# </IfModule>
+
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+# Force client-side SSL redirection.
+
+# If a user types "example.com" in his browser, the above rule will redirect him
+# to the secure version of the site. That still leaves a window of opportunity
+# (the initial HTTP connection) for an attacker to downgrade or redirect the
+# request. The following header ensures that browser will ONLY connect to your
+# server via HTTPS, regardless of what the users type in the address bar.
+# http://www.html5rocks.com/en/tutorials/security/transport-layer-security/
+
+# <IfModule mod_headers.c>
+# Header set Strict-Transport-Security max-age=16070400;
+# </IfModule>
+
+# ------------------------------------------------------------------------------
+# | Server software information |
+# ------------------------------------------------------------------------------
+
+# Avoid displaying the exact Apache version number, the description of the
+# generic OS-type and the information about Apache's compiled-in modules.
+
+# ADD THIS DIRECTIVE IN THE `httpd.conf` AS IT WILL NOT WORK IN THE `.htaccess`!
+
+# ServerTokens Prod
+
+
+# ##############################################################################
+# # WEB PERFORMANCE #
+# ##############################################################################
+
+# ------------------------------------------------------------------------------
+# | Compression |
+# ------------------------------------------------------------------------------
+
+<IfModule mod_deflate.c>
+
+ # Force compression for mangled headers.
+ # http://developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping
+ <IfModule mod_setenvif.c>
+ <IfModule mod_headers.c>
+ SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
+ RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
+ </IfModule>
+ </IfModule>
+
+ # Compress all output labeled with one of the following MIME-types
+ # (for Apache versions below 2.3.7, you don't need to enable `mod_filter`
+ # and can remove the `<IfModule mod_filter.c>` and `</IfModule>` lines
+ # as `AddOutputFilterByType` is still in the core directives).
+ <IfModule mod_filter.c>
+ AddOutputFilterByType DEFLATE application/atom+xml \
+ application/javascript \
+ application/json \
+ application/rss+xml \
+ application/vnd.ms-fontobject \
+ application/x-font-ttf \
+ application/x-web-app-manifest+json \
+ application/xhtml+xml \
+ application/xml \
+ font/opentype \
+ image/svg+xml \
+ image/x-icon \
+ text/css \
+ text/html \
+ text/plain \
+ text/x-component \
+ text/xml
+ </IfModule>
+
+</IfModule>
+
+# ------------------------------------------------------------------------------
+# | Content transformations |
+# ------------------------------------------------------------------------------
+
+# Prevent some of the mobile network providers from modifying the content of
+# your site: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.5.
+
+# <IfModule mod_headers.c>
+# Header set Cache-Control "no-transform"
+# </IfModule>
+
+# ------------------------------------------------------------------------------
+# | ETag removal |
+# ------------------------------------------------------------------------------
+
+# Since we're sending far-future expires headers (see below), ETags can
+# be removed: http://developer.yahoo.com/performance/rules.html#etags.
+
+# `FileETag None` is not enough for every server.
+<IfModule mod_headers.c>
+ Header unset ETag
+</IfModule>
+
+FileETag None
+
+# ------------------------------------------------------------------------------
+# | Expires headers (for better cache control) |
+# ------------------------------------------------------------------------------
+
+# The following expires headers are set pretty far in the future. If you don't
+# control versioning with filename-based cache busting, consider lowering the
+# cache time for resources like CSS and JS to something like 1 week.
+
+<IfModule mod_expires.c>
+
+ ExpiresActive on
+ ExpiresDefault "access plus 1 month"
+
+ # CSS
+ ExpiresByType text/css "access plus 1 year"
+
+ # Data interchange
+ ExpiresByType application/json "access plus 0 seconds"
+ ExpiresByType application/xml "access plus 0 seconds"
+ ExpiresByType text/xml "access plus 0 seconds"
+
+ # Favicon (cannot be renamed!)
+ ExpiresByType image/x-icon "access plus 1 week"
+
+ # HTML components (HTCs)
+ ExpiresByType text/x-component "access plus 1 month"
+
+ # HTML
+ ExpiresByType text/html "access plus 0 seconds"
+
+ # JavaScript
+ ExpiresByType application/javascript "access plus 1 year"
+
+ # Manifest files
+ ExpiresByType application/x-web-app-manifest+json "access plus 0 seconds"
+ ExpiresByType text/cache-manifest "access plus 0 seconds"
+
+ # Media
+ ExpiresByType audio/ogg "access plus 1 month"
+ ExpiresByType image/gif "access plus 1 month"
+ ExpiresByType image/jpeg "access plus 1 month"
+ ExpiresByType image/png "access plus 1 month"
+ ExpiresByType video/mp4 "access plus 1 month"
+ ExpiresByType video/ogg "access plus 1 month"
+ ExpiresByType video/webm "access plus 1 month"
+
+ # Web feeds
+ ExpiresByType application/atom+xml "access plus 1 hour"
+ ExpiresByType application/rss+xml "access plus 1 hour"
+
+ # Web fonts
+ ExpiresByType application/font-woff "access plus 1 month"
+ ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
+ ExpiresByType application/x-font-ttf "access plus 1 month"
+ ExpiresByType font/opentype "access plus 1 month"
+ ExpiresByType image/svg+xml "access plus 1 month"
+
+</IfModule>
+
+# ------------------------------------------------------------------------------
+# | Filename-based cache busting |
+# ------------------------------------------------------------------------------
+
+# If you're not using a build process to manage your filename version revving,
+# you might want to consider enabling the following directives to route all
+# requests such as `/css/style.12345.css` to `/css/style.css`.
+
+# To understand why this is important and a better idea than `*.css?v231`, read:
+# http://stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring
+
+# <IfModule mod_rewrite.c>
+# RewriteCond %{REQUEST_FILENAME} !-f
+# RewriteCond %{REQUEST_FILENAME} !-d
+# RewriteRule ^(.+)\.(\d+)\.(js|css|png|jpg|gif)$ $1.$3 [L]
+# </IfModule>
+
+# ------------------------------------------------------------------------------
+# | File concatenation |
+# ------------------------------------------------------------------------------
+
+# Allow concatenation from within specific CSS and JS files, e.g.:
+# Inside of `script.combined.js` you could have
+# <!--#include file="libs/jquery.js" -->
+# <!--#include file="plugins/jquery.idletimer.js" -->
+# and they would be included into this single file.
+
+# <IfModule mod_include.c>
+# <FilesMatch "\.combined\.js$">
+# Options +Includes
+# AddOutputFilterByType INCLUDES application/javascript application/json
+# SetOutputFilter INCLUDES
+# </FilesMatch>
+# <FilesMatch "\.combined\.css$">
+# Options +Includes
+# AddOutputFilterByType INCLUDES text/css
+# SetOutputFilter INCLUDES
+# </FilesMatch>
+# </IfModule>
+
+# ------------------------------------------------------------------------------
+# | Persistent connections |
+# ------------------------------------------------------------------------------
+
+# Allow multiple requests to be sent over the same TCP connection:
+# http://httpd.apache.org/docs/current/en/mod/core.html#keepalive.
+
+# Enable if you serve a lot of static content but, be aware of the
+# possible disadvantages!
+
+# <IfModule mod_headers.c>
+# Header set Connection Keep-Alive
+# </IfModule>
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/404.html
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/404.html b/ocw-ui/frontend/app/404.html
new file mode 100644
index 0000000..b530975
--- /dev/null
+++ b/ocw-ui/frontend/app/404.html
@@ -0,0 +1,175 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>Page Not Found :(</title>
+ <style>
+ ::-moz-selection {
+ background: #b3d4fc;
+ text-shadow: none;
+ }
+
+ ::selection {
+ background: #b3d4fc;
+ text-shadow: none;
+ }
+
+ html {
+ padding: 30px 10px;
+ font-size: 20px;
+ line-height: 1.4;
+ color: #737373;
+ background: #f0f0f0;
+ -webkit-text-size-adjust: 100%;
+ -ms-text-size-adjust: 100%;
+ }
+
+ html,
+ input {
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ }
+
+ body {
+ max-width: 500px;
+ _width: 500px;
+ padding: 30px 20px 50px;
+ border: 1px solid #b3b3b3;
+ border-radius: 4px;
+ margin: 0 auto;
+ box-shadow: 0 1px 10px #a7a7a7, inset 0 1px 0 #fff;
+ background: #fcfcfc;
+ }
+
+ h1 {
+ margin: 0 10px;
+ font-size: 50px;
+ text-align: center;
+ }
+
+ h1 span {
+ color: #bbb;
+ }
+
+ h3 {
+ margin: 1.5em 0 0.5em;
+ }
+
+ p {
+ margin: 1em 0;
+ }
+
+ ul {
+ padding: 0 0 0 40px;
+ margin: 1em 0;
+ }
+
+ .container {
+ max-width: 380px;
+ _width: 380px;
+ margin: 0 auto;
+ }
+
+ /* google search */
+
+ #goog-fixurl ul {
+ list-style: none;
+ padding: 0;
+ margin: 0;
+ }
+
+ #goog-fixurl form {
+ margin: 0;
+ }
+
+ #goog-wm-qt,
+ #goog-wm-sb {
+ border: 1px solid #bbb;
+ font-size: 16px;
+ line-height: normal;
+ vertical-align: top;
+ color: #444;
+ border-radius: 2px;
+ }
+
+ #goog-wm-qt {
+ width: 220px;
+ height: 20px;
+ padding: 5px;
+ margin: 5px 10px 0 0;
+ box-shadow: inset 0 1px 1px #ccc;
+ }
+
+ #goog-wm-sb {
+ display: inline-block;
+ height: 32px;
+ padding: 0 10px;
+ margin: 5px 0 0;
+ white-space: nowrap;
+ cursor: pointer;
+ background-color: #f5f5f5;
+ background-image: -webkit-linear-gradient(rgba(255,255,255,0), #f1f1f1);
+ background-image: -moz-linear-gradient(rgba(255,255,255,0), #f1f1f1);
+ background-image: -ms-linear-gradient(rgba(255,255,255,0), #f1f1f1);
+ background-image: -o-linear-gradient(rgba(255,255,255,0), #f1f1f1);
+ -webkit-appearance: none;
+ -moz-appearance: none;
+ appearance: none;
+ *overflow: visible;
+ *display: inline;
+ *zoom: 1;
+ }
+
+ #goog-wm-sb:hover,
+ #goog-wm-sb:focus {
+ border-color: #aaa;
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
+ background-color: #f8f8f8;
+ }
+
+ #goog-wm-qt:hover,
+ #goog-wm-qt:focus {
+ border-color: #105cb6;
+ outline: 0;
+ color: #222;
+ }
+
+ input::-moz-focus-inner {
+ padding: 0;
+ border: 0;
+ }
+ </style>
+ </head>
+ <body>
+ <div class="container">
+ <h1>Not found <span>:(</span></h1>
+ <p>Sorry, but the page you were trying to view does not exist.</p>
+ <p>It looks like this was the result of either:</p>
+ <ul>
+ <li>a mistyped address</li>
+ <li>an out-of-date link</li>
+ </ul>
+ <script>
+ var GOOG_FIXURL_LANG = (navigator.language || '').slice(0,2),GOOG_FIXURL_SITE = location.host;
+ </script>
+ <script src="//linkhelp.clients.google.com/tbproxy/lh/wm/fixurl.js"></script>
+ </div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/css/app.css
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/css/app.css b/ocw-ui/frontend/app/css/app.css
deleted file mode 100755
index ad5fbe5..0000000
--- a/ocw-ui/frontend/app/css/app.css
+++ /dev/null
@@ -1,108 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-body {
-
-}
-
-#header-img {
-
-}
-
-#header-title {
-
-}
-
-#OCW-powered {
-
-}
-
-#main-container {
- margin-top: 80px;
- min-height: 400px;
- height: auto !important;
- height: 400px;
-}
-
-#datasetDiv {
- height: 750px;
- overflow-y: auto;
- overflow-x: hidden;
-}
-
-#map { height: 500px; }
-
-/* Small preview map that is displayed alongside dataset information */
-.preview-map {
- height: 100px;
- width: 100px;
-}
-
-.small-alert {
- font-size: 12px;
- color: green;
- margin-top: 4px;
- margin-left: 10px;
-}
-
-.colorSquare {
- margin-top: 3px;
- height: 10px;
- width: 10px;
-}
-
-ul { list-style-type: none; }
-
-.no-color-link { color: #000000; }
-.no-color-link:hover { color: #000000; text-decoration: none; }
-.no-color-link:visited { color: #000000; }
-.no-color-link:active { color: #000000; }
-
-/* Remove the grayed out close button in modal headers */
-.modal-header .close { opacity: 1; }
-
-/* Remove the grayed out close button in modal footers */
-.modal-footer .close { opacity: 1; }
-
-/**
- * Timeline
- */
-div#OCWtimeline {
- margin-top: 20px;
- padding-bottom: 20px;
-}
-
-div.timeline-event {
- border: none;
- background: none;
-}
-
-div.timeline-event-content { margin: 0; }
-
-div.ocw-bar { height: 5px; }
-
-/**
- * Results
- */
-#results-sidebar {
- min-height: 400px;
- height: auto !important;
- height: 400px;
-}
-
-#results-sidebar-header { font-size: 14px; }
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/css/lib/bootstrap-responsive.min.css
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/css/lib/bootstrap-responsive.min.css b/ocw-ui/frontend/app/css/lib/bootstrap-responsive.min.css
deleted file mode 100644
index d1b7f4b..0000000
--- a/ocw-ui/frontend/app/css/lib/bootstrap-responsive.min.css
+++ /dev/null
@@ -1,9 +0,0 @@
-/*!
- * Bootstrap Responsive v2.3.1
- *
- * Copyright 2012 Twitter, Inc
- * Licensed under the Apache License v2.0
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Designed and built with all the love in the world @twitter by @mdo and @fat.
- */.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;line-height:0;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}@-ms-viewport{width:device-width}.hidden{display:none;visibility:hidden}.visible-phone{display:none!important}.visible-tablet{display:none!important}.hidden-desktop{display:none!important}.visible-desktop{display:inherit!important}@media(min-width:768px) and (max-width:979px){.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}.visible-tablet{display:inherit!important}.hidden-tablet{display:none!important}}@media(max-width:767px){.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}.visible-phone{display:inherit!important}.hidden-phone{display:none!important}}.visible-print{dis
play:none!important}@media print{.visible-print{display:inherit!important}.hidden-print{display:none!important}}@media(min-width:1200px){.row{margin-left:-30px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:30px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:1170px}.span12{width:1170px}.span11{width:1070px}.span10{width:970px}.span9{width:870px}.span8{width:770px}.span7{width:670px}.span6{width:570px}.span5{width:470px}.span4{width:370px}.span3{width:270px}.span2{width:170px}.span1{width:70px}.offset12{margin-left:1230px}.offset11{margin-left:1130px}.offset10{margin-left:1030px}.offset9{margin-left:930px}.offset8{margin-left:830px}.offset7{margin-left:730px}.offset6{margin-left:630px}.offset5{margin-left:530px}.offset4{margin-left:430px}.offset3{margin-left:330px}.offset2{margin-left:230px}.offset1{margin-left:130px}.row-flui
d{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.564102564102564%;*margin-left:2.5109110747408616%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.564102564102564%}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.45299145299145%;*width:91.39979996362975%}.row-fluid .span10{width:82.90598290598291%;*width:82.8527914166212%}.row-fluid .span9{width:74.35897435897436%;*width:74.30578286961266%}.row-fluid .span8{width:65.81196581196582%;*width:65.75877432260411%}.row-fluid .span7{width:57.26495726495726%;*width:57.21176577559556%}.row-fluid .span6{width:48.717948717948715%;*width:48.664757228587014%}.row-fluid .span5{width:40.17094017094
017%;*width:40.11774868157847%}.row-fluid .span4{width:31.623931623931625%;*width:31.570740134569924%}.row-fluid .span3{width:23.076923076923077%;*width:23.023731587561375%}.row-fluid .span2{width:14.52991452991453%;*width:14.476723040552828%}.row-fluid .span1{width:5.982905982905983%;*width:5.929714493544281%}.row-fluid .offset12{margin-left:105.12820512820512%;*margin-left:105.02182214948171%}.row-fluid .offset12:first-child{margin-left:102.56410256410257%;*margin-left:102.45771958537915%}.row-fluid .offset11{margin-left:96.58119658119658%;*margin-left:96.47481360247316%}.row-fluid .offset11:first-child{margin-left:94.01709401709402%;*margin-left:93.91071103837061%}.row-fluid .offset10{margin-left:88.03418803418803%;*margin-left:87.92780505546462%}.row-fluid .offset10:first-child{margin-left:85.47008547008548%;*margin-left:85.36370249136206%}.row-fluid .offset9{margin-left:79.48717948717949%;*margin-left:79.38079650845607%}.row-fluid .offset9:first-child{margin-left:76.92307692307
693%;*margin-left:76.81669394435352%}.row-fluid .offset8{margin-left:70.94017094017094%;*margin-left:70.83378796144753%}.row-fluid .offset8:first-child{margin-left:68.37606837606839%;*margin-left:68.26968539734497%}.row-fluid .offset7{margin-left:62.393162393162385%;*margin-left:62.28677941443899%}.row-fluid .offset7:first-child{margin-left:59.82905982905982%;*margin-left:59.72267685033642%}.row-fluid .offset6{margin-left:53.84615384615384%;*margin-left:53.739770867430444%}.row-fluid .offset6:first-child{margin-left:51.28205128205128%;*margin-left:51.175668303327875%}.row-fluid .offset5{margin-left:45.299145299145295%;*margin-left:45.1927623204219%}.row-fluid .offset5:first-child{margin-left:42.73504273504273%;*margin-left:42.62865975631933%}.row-fluid .offset4{margin-left:36.75213675213675%;*margin-left:36.645753773413354%}.row-fluid .offset4:first-child{margin-left:34.18803418803419%;*margin-left:34.081651209310785%}.row-fluid .offset3{margin-left:28.205128205128204%;*margin-left:
28.0987452264048%}.row-fluid .offset3:first-child{margin-left:25.641025641025642%;*margin-left:25.53464266230224%}.row-fluid .offset2{margin-left:19.65811965811966%;*margin-left:19.551736679396257%}.row-fluid .offset2:first-child{margin-left:17.094017094017094%;*margin-left:16.98763411529369%}.row-fluid .offset1{margin-left:11.11111111111111%;*margin-left:11.004728132387708%}.row-fluid .offset1:first-child{margin-left:8.547008547008547%;*margin-left:8.440625568285142%}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:30px}input.span12,textarea.span12,.uneditable-input.span12{width:1156px}input.span11,textarea.span11,.uneditable-input.span11{width:1056px}input.span10,textarea.span10,.uneditable-input.span10{width:956px}input.span9,textarea.span9,.uneditable-input.span9{width:856px}input.span8,textarea.span8,.uneditable-input.span8{width:756px}input.span7,textarea.span7,.uneditable-input.span7{width:656px}input.span6,textarea.span
6,.uneditable-input.span6{width:556px}input.span5,textarea.span5,.uneditable-input.span5{width:456px}input.span4,textarea.span4,.uneditable-input.span4{width:356px}input.span3,textarea.span3,.uneditable-input.span3{width:256px}input.span2,textarea.span2,.uneditable-input.span2{width:156px}input.span1,textarea.span1,.uneditable-input.span1{width:56px}.thumbnails{margin-left:-30px}.thumbnails>li{margin-left:30px}.row-fluid .thumbnails{margin-left:0}}@media(min-width:768px) and (max-width:979px){.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:20px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:724px}.span12{width:724px}.span11{width:662px}.span10{width:600px}.span9{width:538px}.span8{width:476px}.span7{width:414px}.span6{width:352px}.span5{width:290px}.span4{width:228px}.span3{width:166px}.span2{width:104px
}.span1{width:42px}.offset12{margin-left:764px}.offset11{margin-left:702px}.offset10{margin-left:640px}.offset9{margin-left:578px}.offset8{margin-left:516px}.offset7{margin-left:454px}.offset6{margin-left:392px}.offset5{margin-left:330px}.offset4{margin-left:268px}.offset3{margin-left:206px}.offset2{margin-left:144px}.offset1{margin-left:82px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.7624309392265194%;*margin-left:2.709239449864817%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.7624309392265194%}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.43646408839778%;*width:91.38327259903608%}.row-fluid .span10{width:82.87
292817679558%;*width:82.81973668743387%}.row-fluid .span9{width:74.30939226519337%;*width:74.25620077583166%}.row-fluid .span8{width:65.74585635359117%;*width:65.69266486422946%}.row-fluid .span7{width:57.18232044198895%;*width:57.12912895262725%}.row-fluid .span6{width:48.61878453038674%;*width:48.56559304102504%}.row-fluid .span5{width:40.05524861878453%;*width:40.00205712942283%}.row-fluid .span4{width:31.491712707182323%;*width:31.43852121782062%}.row-fluid .span3{width:22.92817679558011%;*width:22.87498530621841%}.row-fluid .span2{width:14.3646408839779%;*width:14.311449394616199%}.row-fluid .span1{width:5.801104972375691%;*width:5.747913483013988%}.row-fluid .offset12{margin-left:105.52486187845304%;*margin-left:105.41847889972962%}.row-fluid .offset12:first-child{margin-left:102.76243093922652%;*margin-left:102.6560479605031%}.row-fluid .offset11{margin-left:96.96132596685082%;*margin-left:96.8549429881274%}.row-fluid .offset11:first-child{margin-left:94.1988950276243%;*margi
n-left:94.09251204890089%}.row-fluid .offset10{margin-left:88.39779005524862%;*margin-left:88.2914070765252%}.row-fluid .offset10:first-child{margin-left:85.6353591160221%;*margin-left:85.52897613729868%}.row-fluid .offset9{margin-left:79.8342541436464%;*margin-left:79.72787116492299%}.row-fluid .offset9:first-child{margin-left:77.07182320441989%;*margin-left:76.96544022569647%}.row-fluid .offset8{margin-left:71.2707182320442%;*margin-left:71.16433525332079%}.row-fluid .offset8:first-child{margin-left:68.50828729281768%;*margin-left:68.40190431409427%}.row-fluid .offset7{margin-left:62.70718232044199%;*margin-left:62.600799341718584%}.row-fluid .offset7:first-child{margin-left:59.94475138121547%;*margin-left:59.838368402492065%}.row-fluid .offset6{margin-left:54.14364640883978%;*margin-left:54.037263430116376%}.row-fluid .offset6:first-child{margin-left:51.38121546961326%;*margin-left:51.27483249088986%}.row-fluid .offset5{margin-left:45.58011049723757%;*margin-left:45.4737275185141
7%}.row-fluid .offset5:first-child{margin-left:42.81767955801105%;*margin-left:42.71129657928765%}.row-fluid .offset4{margin-left:37.01657458563536%;*margin-left:36.91019160691196%}.row-fluid .offset4:first-child{margin-left:34.25414364640884%;*margin-left:34.14776066768544%}.row-fluid .offset3{margin-left:28.45303867403315%;*margin-left:28.346655695309746%}.row-fluid .offset3:first-child{margin-left:25.69060773480663%;*margin-left:25.584224756083227%}.row-fluid .offset2{margin-left:19.88950276243094%;*margin-left:19.783119783707537%}.row-fluid .offset2:first-child{margin-left:17.12707182320442%;*margin-left:17.02068884448102%}.row-fluid .offset1{margin-left:11.32596685082873%;*margin-left:11.219583872105325%}.row-fluid .offset1:first-child{margin-left:8.56353591160221%;*margin-left:8.457152932878806%}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:20px}input.span12,textarea.span12,.uneditable-input.span12{width:710px}input.sp
an11,textarea.span11,.uneditable-input.span11{width:648px}input.span10,textarea.span10,.uneditable-input.span10{width:586px}input.span9,textarea.span9,.uneditable-input.span9{width:524px}input.span8,textarea.span8,.uneditable-input.span8{width:462px}input.span7,textarea.span7,.uneditable-input.span7{width:400px}input.span6,textarea.span6,.uneditable-input.span6{width:338px}input.span5,textarea.span5,.uneditable-input.span5{width:276px}input.span4,textarea.span4,.uneditable-input.span4{width:214px}input.span3,textarea.span3,.uneditable-input.span3{width:152px}input.span2,textarea.span2,.uneditable-input.span2{width:90px}input.span1,textarea.span1,.uneditable-input.span1{width:28px}}@media(max-width:767px){body{padding-right:20px;padding-left:20px}.navbar-fixed-top,.navbar-fixed-bottom,.navbar-static-top{margin-right:-20px;margin-left:-20px}.container-fluid{padding:0}.dl-horizontal dt{float:none;width:auto;clear:none;text-align:left}.dl-horizontal dd{margin-left:0}.container{width:aut
o}.row-fluid{width:100%}.row,.thumbnails{margin-left:0}.thumbnails>li{float:none;margin-left:0}[class*="span"],.uneditable-input[class*="span"],.row-fluid [class*="span"]{display:block;float:none;width:100%;margin-left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.span12,.row-fluid .span12{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="offset"]:first-child{margin-left:0}.input-large,.input-xlarge,.input-xxlarge,input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.input-prepend input,.input-append input,.input-prepend input[class*="span"],.input-append input[class*="span"]{display:inline-block;width:auto}.controls-row [class*="span"]+[class*="span"]{margin-left:0}.modal{position:fixed;top:20px;right:20px;left:20px;width:auto;margin:0}.m
odal.fade{top:-100px}.modal.fade.in{top:20px}}@media(max-width:480px){.nav-collapse{-webkit-transform:translate3d(0,0,0)}.page-header h1 small{display:block;line-height:20px}input[type="checkbox"],input[type="radio"]{border:1px solid #ccc}.form-horizontal .control-label{float:none;width:auto;padding-top:0;text-align:left}.form-horizontal .controls{margin-left:0}.form-horizontal .control-list{padding-top:0}.form-horizontal .form-actions{padding-right:10px;padding-left:10px}.media .pull-left,.media .pull-right{display:block;float:none;margin-bottom:10px}.media-object{margin-right:0;margin-left:0}.modal{top:10px;right:10px;left:10px}.modal-header .close{padding:10px;margin:-10px}.carousel-caption{position:static}}@media(max-width:979px){body{padding-top:0}.navbar-fixed-top,.navbar-fixed-bottom{position:static}.navbar-fixed-top{margin-bottom:20px}.navbar-fixed-bottom{margin-top:20px}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding:5px}.navbar .container{width:a
uto;padding:0}.navbar .brand{padding-right:10px;padding-left:10px;margin:0 0 0 -5px}.nav-collapse{clear:both}.nav-collapse .nav{float:none;margin:0 0 10px}.nav-collapse .nav>li{float:none}.nav-collapse .nav>li>a{margin-bottom:2px}.nav-collapse .nav>.divider-vertical{display:none}.nav-collapse .nav .nav-header{color:#777;text-shadow:none}.nav-collapse .nav>li>a,.nav-collapse .dropdown-menu a{padding:9px 15px;font-weight:bold;color:#777;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.nav-collapse .btn{padding:4px 10px 4px;font-weight:normal;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.nav-collapse .dropdown-menu li+li a{margin-bottom:2px}.nav-collapse .nav>li>a:hover,.nav-collapse .nav>li>a:focus,.nav-collapse .dropdown-menu a:hover,.nav-collapse .dropdown-menu a:focus{background-color:#f2f2f2}.navbar-inverse .nav-collapse .nav>li>a,.navbar-inverse .nav-collapse .dropdown-menu a{color:#999}.navbar-inverse .nav-collapse .nav>li>a:hover,.navbar
-inverse .nav-collapse .nav>li>a:focus,.navbar-inverse .nav-collapse .dropdown-menu a:hover,.navbar-inverse .nav-collapse .dropdown-menu a:focus{background-color:#111}.nav-collapse.in .btn-group{padding:0;margin-top:5px}.nav-collapse .dropdown-menu{position:static;top:auto;left:auto;display:none;float:none;max-width:none;padding:0;margin:0 15px;background-color:transparent;border:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.nav-collapse .open>.dropdown-menu{display:block}.nav-collapse .dropdown-menu:before,.nav-collapse .dropdown-menu:after{display:none}.nav-collapse .dropdown-menu .divider{display:none}.nav-collapse .nav>li>.dropdown-menu:before,.nav-collapse .nav>li>.dropdown-menu:after{display:none}.nav-collapse .navbar-form,.nav-collapse .navbar-search{float:none;padding:10px 15px;margin:10px 0;border-top:1px solid #f2f2f2;border-bottom:1px solid #f2f2f2;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,
255,0.1),0 1px 0 rgba(255,255,255,0.1);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1)}.navbar-inverse .nav-collapse .navbar-form,.navbar-inverse .nav-collapse .navbar-search{border-top-color:#111;border-bottom-color:#111}.navbar .nav-collapse .nav.pull-right{float:none;margin-left:0}.nav-collapse,.nav-collapse.collapse{height:0;overflow:hidden}.navbar .btn-navbar{display:block}.navbar-static .navbar-inner{padding-right:10px;padding-left:10px}}@media(min-width:980px){.nav-collapse.collapse{height:auto!important;overflow:visible!important}}
[14/28] CLIMATE-512 - Replace frontend with new Yeoman/Grunt/Bower
frontend
Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/js/lib/bootstrap/bootstrap.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/js/lib/bootstrap/bootstrap.js b/ocw-ui/frontend/app/js/lib/bootstrap/bootstrap.js
deleted file mode 100644
index c298ee4..0000000
--- a/ocw-ui/frontend/app/js/lib/bootstrap/bootstrap.js
+++ /dev/null
@@ -1,2276 +0,0 @@
-/* ===================================================
- * bootstrap-transition.js v2.3.1
- * http://twitter.github.com/bootstrap/javascript.html#transitions
- * ===================================================
- * Copyright 2012 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ========================================================== */
-
-
-!function ($) {
-
- "use strict"; // jshint ;_;
-
-
- /* CSS TRANSITION SUPPORT (http://www.modernizr.com/)
- * ======================================================= */
-
- $(function () {
-
- $.support.transition = (function () {
-
- var transitionEnd = (function () {
-
- var el = document.createElement('bootstrap')
- , transEndEventNames = {
- 'WebkitTransition' : 'webkitTransitionEnd'
- , 'MozTransition' : 'transitionend'
- , 'OTransition' : 'oTransitionEnd otransitionend'
- , 'transition' : 'transitionend'
- }
- , name
-
- for (name in transEndEventNames){
- if (el.style[name] !== undefined) {
- return transEndEventNames[name]
- }
- }
-
- }())
-
- return transitionEnd && {
- end: transitionEnd
- }
-
- })()
-
- })
-
-}(window.jQuery);/* ==========================================================
- * bootstrap-alert.js v2.3.1
- * http://twitter.github.com/bootstrap/javascript.html#alerts
- * ==========================================================
- * Copyright 2012 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ========================================================== */
-
-
-!function ($) {
-
- "use strict"; // jshint ;_;
-
-
- /* ALERT CLASS DEFINITION
- * ====================== */
-
- var dismiss = '[data-dismiss="alert"]'
- , Alert = function (el) {
- $(el).on('click', dismiss, this.close)
- }
-
- Alert.prototype.close = function (e) {
- var $this = $(this)
- , selector = $this.attr('data-target')
- , $parent
-
- if (!selector) {
- selector = $this.attr('href')
- selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
- }
-
- $parent = $(selector)
-
- e && e.preventDefault()
-
- $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
-
- $parent.trigger(e = $.Event('close'))
-
- if (e.isDefaultPrevented()) return
-
- $parent.removeClass('in')
-
- function removeElement() {
- $parent
- .trigger('closed')
- .remove()
- }
-
- $.support.transition && $parent.hasClass('fade') ?
- $parent.on($.support.transition.end, removeElement) :
- removeElement()
- }
-
-
- /* ALERT PLUGIN DEFINITION
- * ======================= */
-
- var old = $.fn.alert
-
- $.fn.alert = function (option) {
- return this.each(function () {
- var $this = $(this)
- , data = $this.data('alert')
- if (!data) $this.data('alert', (data = new Alert(this)))
- if (typeof option == 'string') data[option].call($this)
- })
- }
-
- $.fn.alert.Constructor = Alert
-
-
- /* ALERT NO CONFLICT
- * ================= */
-
- $.fn.alert.noConflict = function () {
- $.fn.alert = old
- return this
- }
-
-
- /* ALERT DATA-API
- * ============== */
-
- $(document).on('click.alert.data-api', dismiss, Alert.prototype.close)
-
-}(window.jQuery);/* ============================================================
- * bootstrap-button.js v2.3.1
- * http://twitter.github.com/bootstrap/javascript.html#buttons
- * ============================================================
- * Copyright 2012 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================================================ */
-
-
-!function ($) {
-
- "use strict"; // jshint ;_;
-
-
- /* BUTTON PUBLIC CLASS DEFINITION
- * ============================== */
-
- var Button = function (element, options) {
- this.$element = $(element)
- this.options = $.extend({}, $.fn.button.defaults, options)
- }
-
- Button.prototype.setState = function (state) {
- var d = 'disabled'
- , $el = this.$element
- , data = $el.data()
- , val = $el.is('input') ? 'val' : 'html'
-
- state = state + 'Text'
- data.resetText || $el.data('resetText', $el[val]())
-
- $el[val](data[state] || this.options[state])
-
- // push to event loop to allow forms to submit
- setTimeout(function () {
- state == 'loadingText' ?
- $el.addClass(d).attr(d, d) :
- $el.removeClass(d).removeAttr(d)
- }, 0)
- }
-
- Button.prototype.toggle = function () {
- var $parent = this.$element.closest('[data-toggle="buttons-radio"]')
-
- $parent && $parent
- .find('.active')
- .removeClass('active')
-
- this.$element.toggleClass('active')
- }
-
-
- /* BUTTON PLUGIN DEFINITION
- * ======================== */
-
- var old = $.fn.button
-
- $.fn.button = function (option) {
- return this.each(function () {
- var $this = $(this)
- , data = $this.data('button')
- , options = typeof option == 'object' && option
- if (!data) $this.data('button', (data = new Button(this, options)))
- if (option == 'toggle') data.toggle()
- else if (option) data.setState(option)
- })
- }
-
- $.fn.button.defaults = {
- loadingText: 'loading...'
- }
-
- $.fn.button.Constructor = Button
-
-
- /* BUTTON NO CONFLICT
- * ================== */
-
- $.fn.button.noConflict = function () {
- $.fn.button = old
- return this
- }
-
-
- /* BUTTON DATA-API
- * =============== */
-
- $(document).on('click.button.data-api', '[data-toggle^=button]', function (e) {
- var $btn = $(e.target)
- if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
- $btn.button('toggle')
- })
-
-}(window.jQuery);/* ==========================================================
- * bootstrap-carousel.js v2.3.1
- * http://twitter.github.com/bootstrap/javascript.html#carousel
- * ==========================================================
- * Copyright 2012 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ========================================================== */
-
-
-!function ($) {
-
- "use strict"; // jshint ;_;
-
-
- /* CAROUSEL CLASS DEFINITION
- * ========================= */
-
- var Carousel = function (element, options) {
- this.$element = $(element)
- this.$indicators = this.$element.find('.carousel-indicators')
- this.options = options
- this.options.pause == 'hover' && this.$element
- .on('mouseenter', $.proxy(this.pause, this))
- .on('mouseleave', $.proxy(this.cycle, this))
- }
-
- Carousel.prototype = {
-
- cycle: function (e) {
- if (!e) this.paused = false
- if (this.interval) clearInterval(this.interval);
- this.options.interval
- && !this.paused
- && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
- return this
- }
-
- , getActiveIndex: function () {
- this.$active = this.$element.find('.item.active')
- this.$items = this.$active.parent().children()
- return this.$items.index(this.$active)
- }
-
- , to: function (pos) {
- var activeIndex = this.getActiveIndex()
- , that = this
-
- if (pos > (this.$items.length - 1) || pos < 0) return
-
- if (this.sliding) {
- return this.$element.one('slid', function () {
- that.to(pos)
- })
- }
-
- if (activeIndex == pos) {
- return this.pause().cycle()
- }
-
- return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]))
- }
-
- , pause: function (e) {
- if (!e) this.paused = true
- if (this.$element.find('.next, .prev').length && $.support.transition.end) {
- this.$element.trigger($.support.transition.end)
- this.cycle(true)
- }
- clearInterval(this.interval)
- this.interval = null
- return this
- }
-
- , next: function () {
- if (this.sliding) return
- return this.slide('next')
- }
-
- , prev: function () {
- if (this.sliding) return
- return this.slide('prev')
- }
-
- , slide: function (type, next) {
- var $active = this.$element.find('.item.active')
- , $next = next || $active[type]()
- , isCycling = this.interval
- , direction = type == 'next' ? 'left' : 'right'
- , fallback = type == 'next' ? 'first' : 'last'
- , that = this
- , e
-
- this.sliding = true
-
- isCycling && this.pause()
-
- $next = $next.length ? $next : this.$element.find('.item')[fallback]()
-
- e = $.Event('slide', {
- relatedTarget: $next[0]
- , direction: direction
- })
-
- if ($next.hasClass('active')) return
-
- if (this.$indicators.length) {
- this.$indicators.find('.active').removeClass('active')
- this.$element.one('slid', function () {
- var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()])
- $nextIndicator && $nextIndicator.addClass('active')
- })
- }
-
- if ($.support.transition && this.$element.hasClass('slide')) {
- this.$element.trigger(e)
- if (e.isDefaultPrevented()) return
- $next.addClass(type)
- $next[0].offsetWidth // force reflow
- $active.addClass(direction)
- $next.addClass(direction)
- this.$element.one($.support.transition.end, function () {
- $next.removeClass([type, direction].join(' ')).addClass('active')
- $active.removeClass(['active', direction].join(' '))
- that.sliding = false
- setTimeout(function () { that.$element.trigger('slid') }, 0)
- })
- } else {
- this.$element.trigger(e)
- if (e.isDefaultPrevented()) return
- $active.removeClass('active')
- $next.addClass('active')
- this.sliding = false
- this.$element.trigger('slid')
- }
-
- isCycling && this.cycle()
-
- return this
- }
-
- }
-
-
- /* CAROUSEL PLUGIN DEFINITION
- * ========================== */
-
- var old = $.fn.carousel
-
- $.fn.carousel = function (option) {
- return this.each(function () {
- var $this = $(this)
- , data = $this.data('carousel')
- , options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option)
- , action = typeof option == 'string' ? option : options.slide
- if (!data) $this.data('carousel', (data = new Carousel(this, options)))
- if (typeof option == 'number') data.to(option)
- else if (action) data[action]()
- else if (options.interval) data.pause().cycle()
- })
- }
-
- $.fn.carousel.defaults = {
- interval: 5000
- , pause: 'hover'
- }
-
- $.fn.carousel.Constructor = Carousel
-
-
- /* CAROUSEL NO CONFLICT
- * ==================== */
-
- $.fn.carousel.noConflict = function () {
- $.fn.carousel = old
- return this
- }
-
- /* CAROUSEL DATA-API
- * ================= */
-
- $(document).on('click.carousel.data-api', '[data-slide], [data-slide-to]', function (e) {
- var $this = $(this), href
- , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
- , options = $.extend({}, $target.data(), $this.data())
- , slideIndex
-
- $target.carousel(options)
-
- if (slideIndex = $this.attr('data-slide-to')) {
- $target.data('carousel').pause().to(slideIndex).cycle()
- }
-
- e.preventDefault()
- })
-
-}(window.jQuery);/* =============================================================
- * bootstrap-collapse.js v2.3.1
- * http://twitter.github.com/bootstrap/javascript.html#collapse
- * =============================================================
- * Copyright 2012 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================================================ */
-
-
-!function ($) {
-
- "use strict"; // jshint ;_;
-
-
- /* COLLAPSE PUBLIC CLASS DEFINITION
- * ================================ */
-
- var Collapse = function (element, options) {
- this.$element = $(element)
- this.options = $.extend({}, $.fn.collapse.defaults, options)
-
- if (this.options.parent) {
- this.$parent = $(this.options.parent)
- }
-
- this.options.toggle && this.toggle()
- }
-
- Collapse.prototype = {
-
- constructor: Collapse
-
- , dimension: function () {
- var hasWidth = this.$element.hasClass('width')
- return hasWidth ? 'width' : 'height'
- }
-
- , show: function () {
- var dimension
- , scroll
- , actives
- , hasData
-
- if (this.transitioning || this.$element.hasClass('in')) return
-
- dimension = this.dimension()
- scroll = $.camelCase(['scroll', dimension].join('-'))
- actives = this.$parent && this.$parent.find('> .accordion-group > .in')
-
- if (actives && actives.length) {
- hasData = actives.data('collapse')
- if (hasData && hasData.transitioning) return
- actives.collapse('hide')
- hasData || actives.data('collapse', null)
- }
-
- this.$element[dimension](0)
- this.transition('addClass', $.Event('show'), 'shown')
- $.support.transition && this.$element[dimension](this.$element[0][scroll])
- }
-
- , hide: function () {
- var dimension
- if (this.transitioning || !this.$element.hasClass('in')) return
- dimension = this.dimension()
- this.reset(this.$element[dimension]())
- this.transition('removeClass', $.Event('hide'), 'hidden')
- this.$element[dimension](0)
- }
-
- , reset: function (size) {
- var dimension = this.dimension()
-
- this.$element
- .removeClass('collapse')
- [dimension](size || 'auto')
- [0].offsetWidth
-
- this.$element[size !== null ? 'addClass' : 'removeClass']('collapse')
-
- return this
- }
-
- , transition: function (method, startEvent, completeEvent) {
- var that = this
- , complete = function () {
- if (startEvent.type == 'show') that.reset()
- that.transitioning = 0
- that.$element.trigger(completeEvent)
- }
-
- this.$element.trigger(startEvent)
-
- if (startEvent.isDefaultPrevented()) return
-
- this.transitioning = 1
-
- this.$element[method]('in')
-
- $.support.transition && this.$element.hasClass('collapse') ?
- this.$element.one($.support.transition.end, complete) :
- complete()
- }
-
- , toggle: function () {
- this[this.$element.hasClass('in') ? 'hide' : 'show']()
- }
-
- }
-
-
- /* COLLAPSE PLUGIN DEFINITION
- * ========================== */
-
- var old = $.fn.collapse
-
- $.fn.collapse = function (option) {
- return this.each(function () {
- var $this = $(this)
- , data = $this.data('collapse')
- , options = $.extend({}, $.fn.collapse.defaults, $this.data(), typeof option == 'object' && option)
- if (!data) $this.data('collapse', (data = new Collapse(this, options)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- $.fn.collapse.defaults = {
- toggle: true
- }
-
- $.fn.collapse.Constructor = Collapse
-
-
- /* COLLAPSE NO CONFLICT
- * ==================== */
-
- $.fn.collapse.noConflict = function () {
- $.fn.collapse = old
- return this
- }
-
-
- /* COLLAPSE DATA-API
- * ================= */
-
- $(document).on('click.collapse.data-api', '[data-toggle=collapse]', function (e) {
- var $this = $(this), href
- , target = $this.attr('data-target')
- || e.preventDefault()
- || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
- , option = $(target).data('collapse') ? 'toggle' : $this.data()
- $this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
- $(target).collapse(option)
- })
-
-}(window.jQuery);/* ============================================================
- * bootstrap-dropdown.js v2.3.1
- * http://twitter.github.com/bootstrap/javascript.html#dropdowns
- * ============================================================
- * Copyright 2012 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================================================ */
-
-
-!function ($) {
-
- "use strict"; // jshint ;_;
-
-
- /* DROPDOWN CLASS DEFINITION
- * ========================= */
-
- var toggle = '[data-toggle=dropdown]'
- , Dropdown = function (element) {
- var $el = $(element).on('click.dropdown.data-api', this.toggle)
- $('html').on('click.dropdown.data-api', function () {
- $el.parent().removeClass('open')
- })
- }
-
- Dropdown.prototype = {
-
- constructor: Dropdown
-
- , toggle: function (e) {
- var $this = $(this)
- , $parent
- , isActive
-
- if ($this.is('.disabled, :disabled')) return
-
- $parent = getParent($this)
-
- isActive = $parent.hasClass('open')
-
- clearMenus()
-
- if (!isActive) {
- $parent.toggleClass('open')
- }
-
- $this.focus()
-
- return false
- }
-
- , keydown: function (e) {
- var $this
- , $items
- , $active
- , $parent
- , isActive
- , index
-
- if (!/(38|40|27)/.test(e.keyCode)) return
-
- $this = $(this)
-
- e.preventDefault()
- e.stopPropagation()
-
- if ($this.is('.disabled, :disabled')) return
-
- $parent = getParent($this)
-
- isActive = $parent.hasClass('open')
-
- if (!isActive || (isActive && e.keyCode == 27)) {
- if (e.which == 27) $parent.find(toggle).focus()
- return $this.click()
- }
-
- $items = $('[role=menu] li:not(.divider):visible a', $parent)
-
- if (!$items.length) return
-
- index = $items.index($items.filter(':focus'))
-
- if (e.keyCode == 38 && index > 0) index-- // up
- if (e.keyCode == 40 && index < $items.length - 1) index++ // down
- if (!~index) index = 0
-
- $items
- .eq(index)
- .focus()
- }
-
- }
-
- function clearMenus() {
- $(toggle).each(function () {
- getParent($(this)).removeClass('open')
- })
- }
-
- function getParent($this) {
- var selector = $this.attr('data-target')
- , $parent
-
- if (!selector) {
- selector = $this.attr('href')
- selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
- }
-
- $parent = selector && $(selector)
-
- if (!$parent || !$parent.length) $parent = $this.parent()
-
- return $parent
- }
-
-
- /* DROPDOWN PLUGIN DEFINITION
- * ========================== */
-
- var old = $.fn.dropdown
-
- $.fn.dropdown = function (option) {
- return this.each(function () {
- var $this = $(this)
- , data = $this.data('dropdown')
- if (!data) $this.data('dropdown', (data = new Dropdown(this)))
- if (typeof option == 'string') data[option].call($this)
- })
- }
-
- $.fn.dropdown.Constructor = Dropdown
-
-
- /* DROPDOWN NO CONFLICT
- * ==================== */
-
- $.fn.dropdown.noConflict = function () {
- $.fn.dropdown = old
- return this
- }
-
-
- /* APPLY TO STANDARD DROPDOWN ELEMENTS
- * =================================== */
-
- $(document)
- .on('click.dropdown.data-api', clearMenus)
- .on('click.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
- .on('click.dropdown-menu', function (e) { e.stopPropagation() })
- .on('click.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
- .on('keydown.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
-
-}(window.jQuery);
-/* =========================================================
- * bootstrap-modal.js v2.3.1
- * http://twitter.github.com/bootstrap/javascript.html#modals
- * =========================================================
- * Copyright 2012 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ========================================================= */
-
-
-!function ($) {
-
- "use strict"; // jshint ;_;
-
-
- /* MODAL CLASS DEFINITION
- * ====================== */
-
- var Modal = function (element, options) {
- this.options = options
- this.$element = $(element)
- .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
- this.options.remote && this.$element.find('.modal-body').load(this.options.remote)
- }
-
- Modal.prototype = {
-
- constructor: Modal
-
- , toggle: function () {
- return this[!this.isShown ? 'show' : 'hide']()
- }
-
- , show: function () {
- var that = this
- , e = $.Event('show')
-
- this.$element.trigger(e)
-
- if (this.isShown || e.isDefaultPrevented()) return
-
- this.isShown = true
-
- this.escape()
-
- this.backdrop(function () {
- var transition = $.support.transition && that.$element.hasClass('fade')
-
- if (!that.$element.parent().length) {
- that.$element.appendTo(document.body) //don't move modals dom position
- }
-
- that.$element.show()
-
- if (transition) {
- that.$element[0].offsetWidth // force reflow
- }
-
- that.$element
- .addClass('in')
- .attr('aria-hidden', false)
-
- that.enforceFocus()
-
- transition ?
- that.$element.one($.support.transition.end, function () { that.$element.focus().trigger('shown') }) :
- that.$element.focus().trigger('shown')
-
- })
- }
-
- , hide: function (e) {
- e && e.preventDefault()
-
- var that = this
-
- e = $.Event('hide')
-
- this.$element.trigger(e)
-
- if (!this.isShown || e.isDefaultPrevented()) return
-
- this.isShown = false
-
- this.escape()
-
- $(document).off('focusin.modal')
-
- this.$element
- .removeClass('in')
- .attr('aria-hidden', true)
-
- $.support.transition && this.$element.hasClass('fade') ?
- this.hideWithTransition() :
- this.hideModal()
- }
-
- , enforceFocus: function () {
- var that = this
- $(document).on('focusin.modal', function (e) {
- if (that.$element[0] !== e.target && !that.$element.has(e.target).length) {
- that.$element.focus()
- }
- })
- }
-
- , escape: function () {
- var that = this
- if (this.isShown && this.options.keyboard) {
- this.$element.on('keyup.dismiss.modal', function ( e ) {
- e.which == 27 && that.hide()
- })
- } else if (!this.isShown) {
- this.$element.off('keyup.dismiss.modal')
- }
- }
-
- , hideWithTransition: function () {
- var that = this
- , timeout = setTimeout(function () {
- that.$element.off($.support.transition.end)
- that.hideModal()
- }, 500)
-
- this.$element.one($.support.transition.end, function () {
- clearTimeout(timeout)
- that.hideModal()
- })
- }
-
- , hideModal: function () {
- var that = this
- this.$element.hide()
- this.backdrop(function () {
- that.removeBackdrop()
- that.$element.trigger('hidden')
- })
- }
-
- , removeBackdrop: function () {
- this.$backdrop && this.$backdrop.remove()
- this.$backdrop = null
- }
-
- , backdrop: function (callback) {
- var that = this
- , animate = this.$element.hasClass('fade') ? 'fade' : ''
-
- if (this.isShown && this.options.backdrop) {
- var doAnimate = $.support.transition && animate
-
- this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
- .appendTo(document.body)
-
- this.$backdrop.click(
- this.options.backdrop == 'static' ?
- $.proxy(this.$element[0].focus, this.$element[0])
- : $.proxy(this.hide, this)
- )
-
- if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
-
- this.$backdrop.addClass('in')
-
- if (!callback) return
-
- doAnimate ?
- this.$backdrop.one($.support.transition.end, callback) :
- callback()
-
- } else if (!this.isShown && this.$backdrop) {
- this.$backdrop.removeClass('in')
-
- $.support.transition && this.$element.hasClass('fade')?
- this.$backdrop.one($.support.transition.end, callback) :
- callback()
-
- } else if (callback) {
- callback()
- }
- }
- }
-
-
- /* MODAL PLUGIN DEFINITION
- * ======================= */
-
- var old = $.fn.modal
-
- $.fn.modal = function (option) {
- return this.each(function () {
- var $this = $(this)
- , data = $this.data('modal')
- , options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option)
- if (!data) $this.data('modal', (data = new Modal(this, options)))
- if (typeof option == 'string') data[option]()
- else if (options.show) data.show()
- })
- }
-
- $.fn.modal.defaults = {
- backdrop: true
- , keyboard: true
- , show: true
- }
-
- $.fn.modal.Constructor = Modal
-
-
- /* MODAL NO CONFLICT
- * ================= */
-
- $.fn.modal.noConflict = function () {
- $.fn.modal = old
- return this
- }
-
-
- /* MODAL DATA-API
- * ============== */
-
- $(document).on('click.modal.data-api', '[data-toggle="modal"]', function (e) {
- var $this = $(this)
- , href = $this.attr('href')
- , $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
- , option = $target.data('modal') ? 'toggle' : $.extend({ remote:!/#/.test(href) && href }, $target.data(), $this.data())
-
- e.preventDefault()
-
- $target
- .modal(option)
- .one('hide', function () {
- $this.focus()
- })
- })
-
-}(window.jQuery);
-/* ===========================================================
- * bootstrap-tooltip.js v2.3.1
- * http://twitter.github.com/bootstrap/javascript.html#tooltips
- * Inspired by the original jQuery.tipsy by Jason Frame
- * ===========================================================
- * Copyright 2012 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ========================================================== */
-
-
-!function ($) {
-
- "use strict"; // jshint ;_;
-
-
- /* TOOLTIP PUBLIC CLASS DEFINITION
- * =============================== */
-
- var Tooltip = function (element, options) {
- this.init('tooltip', element, options)
- }
-
- Tooltip.prototype = {
-
- constructor: Tooltip
-
- , init: function (type, element, options) {
- var eventIn
- , eventOut
- , triggers
- , trigger
- , i
-
- this.type = type
- this.$element = $(element)
- this.options = this.getOptions(options)
- this.enabled = true
-
- triggers = this.options.trigger.split(' ')
-
- for (i = triggers.length; i--;) {
- trigger = triggers[i]
- if (trigger == 'click') {
- this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
- } else if (trigger != 'manual') {
- eventIn = trigger == 'hover' ? 'mouseenter' : 'focus'
- eventOut = trigger == 'hover' ? 'mouseleave' : 'blur'
- this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
- this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
- }
- }
-
- this.options.selector ?
- (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
- this.fixTitle()
- }
-
- , getOptions: function (options) {
- options = $.extend({}, $.fn[this.type].defaults, this.$element.data(), options)
-
- if (options.delay && typeof options.delay == 'number') {
- options.delay = {
- show: options.delay
- , hide: options.delay
- }
- }
-
- return options
- }
-
- , enter: function (e) {
- var defaults = $.fn[this.type].defaults
- , options = {}
- , self
-
- this._options && $.each(this._options, function (key, value) {
- if (defaults[key] != value) options[key] = value
- }, this)
-
- self = $(e.currentTarget)[this.type](options).data(this.type)
-
- if (!self.options.delay || !self.options.delay.show) return self.show()
-
- clearTimeout(this.timeout)
- self.hoverState = 'in'
- this.timeout = setTimeout(function() {
- if (self.hoverState == 'in') self.show()
- }, self.options.delay.show)
- }
-
- , leave: function (e) {
- var self = $(e.currentTarget)[this.type](this._options).data(this.type)
-
- if (this.timeout) clearTimeout(this.timeout)
- if (!self.options.delay || !self.options.delay.hide) return self.hide()
-
- self.hoverState = 'out'
- this.timeout = setTimeout(function() {
- if (self.hoverState == 'out') self.hide()
- }, self.options.delay.hide)
- }
-
- , show: function () {
- var $tip
- , pos
- , actualWidth
- , actualHeight
- , placement
- , tp
- , e = $.Event('show')
-
- if (this.hasContent() && this.enabled) {
- this.$element.trigger(e)
- if (e.isDefaultPrevented()) return
- $tip = this.tip()
- this.setContent()
-
- if (this.options.animation) {
- $tip.addClass('fade')
- }
-
- placement = typeof this.options.placement == 'function' ?
- this.options.placement.call(this, $tip[0], this.$element[0]) :
- this.options.placement
-
- $tip
- .detach()
- .css({ top: 0, left: 0, display: 'block' })
-
- this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
-
- pos = this.getPosition()
-
- actualWidth = $tip[0].offsetWidth
- actualHeight = $tip[0].offsetHeight
-
- switch (placement) {
- case 'bottom':
- tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2}
- break
- case 'top':
- tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2}
- break
- case 'left':
- tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth}
- break
- case 'right':
- tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width}
- break
- }
-
- this.applyPlacement(tp, placement)
- this.$element.trigger('shown')
- }
- }
-
- , applyPlacement: function(offset, placement){
- var $tip = this.tip()
- , width = $tip[0].offsetWidth
- , height = $tip[0].offsetHeight
- , actualWidth
- , actualHeight
- , delta
- , replace
-
- $tip
- .offset(offset)
- .addClass(placement)
- .addClass('in')
-
- actualWidth = $tip[0].offsetWidth
- actualHeight = $tip[0].offsetHeight
-
- if (placement == 'top' && actualHeight != height) {
- offset.top = offset.top + height - actualHeight
- replace = true
- }
-
- if (placement == 'bottom' || placement == 'top') {
- delta = 0
-
- if (offset.left < 0){
- delta = offset.left * -2
- offset.left = 0
- $tip.offset(offset)
- actualWidth = $tip[0].offsetWidth
- actualHeight = $tip[0].offsetHeight
- }
-
- this.replaceArrow(delta - width + actualWidth, actualWidth, 'left')
- } else {
- this.replaceArrow(actualHeight - height, actualHeight, 'top')
- }
-
- if (replace) $tip.offset(offset)
- }
-
- , replaceArrow: function(delta, dimension, position){
- this
- .arrow()
- .css(position, delta ? (50 * (1 - delta / dimension) + "%") : '')
- }
-
- , setContent: function () {
- var $tip = this.tip()
- , title = this.getTitle()
-
- $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
- $tip.removeClass('fade in top bottom left right')
- }
-
- , hide: function () {
- var that = this
- , $tip = this.tip()
- , e = $.Event('hide')
-
- this.$element.trigger(e)
- if (e.isDefaultPrevented()) return
-
- $tip.removeClass('in')
-
- function removeWithAnimation() {
- var timeout = setTimeout(function () {
- $tip.off($.support.transition.end).detach()
- }, 500)
-
- $tip.one($.support.transition.end, function () {
- clearTimeout(timeout)
- $tip.detach()
- })
- }
-
- $.support.transition && this.$tip.hasClass('fade') ?
- removeWithAnimation() :
- $tip.detach()
-
- this.$element.trigger('hidden')
-
- return this
- }
-
- , fixTitle: function () {
- var $e = this.$element
- if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
- $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
- }
- }
-
- , hasContent: function () {
- return this.getTitle()
- }
-
- , getPosition: function () {
- var el = this.$element[0]
- return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : {
- width: el.offsetWidth
- , height: el.offsetHeight
- }, this.$element.offset())
- }
-
- , getTitle: function () {
- var title
- , $e = this.$element
- , o = this.options
-
- title = $e.attr('data-original-title')
- || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
-
- return title
- }
-
- , tip: function () {
- return this.$tip = this.$tip || $(this.options.template)
- }
-
- , arrow: function(){
- return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow")
- }
-
- , validate: function () {
- if (!this.$element[0].parentNode) {
- this.hide()
- this.$element = null
- this.options = null
- }
- }
-
- , enable: function () {
- this.enabled = true
- }
-
- , disable: function () {
- this.enabled = false
- }
-
- , toggleEnabled: function () {
- this.enabled = !this.enabled
- }
-
- , toggle: function (e) {
- var self = e ? $(e.currentTarget)[this.type](this._options).data(this.type) : this
- self.tip().hasClass('in') ? self.hide() : self.show()
- }
-
- , destroy: function () {
- this.hide().$element.off('.' + this.type).removeData(this.type)
- }
-
- }
-
-
- /* TOOLTIP PLUGIN DEFINITION
- * ========================= */
-
- var old = $.fn.tooltip
-
- $.fn.tooltip = function ( option ) {
- return this.each(function () {
- var $this = $(this)
- , data = $this.data('tooltip')
- , options = typeof option == 'object' && option
- if (!data) $this.data('tooltip', (data = new Tooltip(this, options)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- $.fn.tooltip.Constructor = Tooltip
-
- $.fn.tooltip.defaults = {
- animation: true
- , placement: 'top'
- , selector: false
- , template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'
- , trigger: 'hover focus'
- , title: ''
- , delay: 0
- , html: false
- , container: false
- }
-
-
- /* TOOLTIP NO CONFLICT
- * =================== */
-
- $.fn.tooltip.noConflict = function () {
- $.fn.tooltip = old
- return this
- }
-
-}(window.jQuery);
-/* ===========================================================
- * bootstrap-popover.js v2.3.1
- * http://twitter.github.com/bootstrap/javascript.html#popovers
- * ===========================================================
- * Copyright 2012 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * =========================================================== */
-
-
-!function ($) {
-
- "use strict"; // jshint ;_;
-
-
- /* POPOVER PUBLIC CLASS DEFINITION
- * =============================== */
-
- var Popover = function (element, options) {
- this.init('popover', element, options)
- }
-
-
- /* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js
- ========================================== */
-
- Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype, {
-
- constructor: Popover
-
- , setContent: function () {
- var $tip = this.tip()
- , title = this.getTitle()
- , content = this.getContent()
-
- $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
- $tip.find('.popover-content')[this.options.html ? 'html' : 'text'](content)
-
- $tip.removeClass('fade top bottom left right in')
- }
-
- , hasContent: function () {
- return this.getTitle() || this.getContent()
- }
-
- , getContent: function () {
- var content
- , $e = this.$element
- , o = this.options
-
- content = (typeof o.content == 'function' ? o.content.call($e[0]) : o.content)
- || $e.attr('data-content')
-
- return content
- }
-
- , tip: function () {
- if (!this.$tip) {
- this.$tip = $(this.options.template)
- }
- return this.$tip
- }
-
- , destroy: function () {
- this.hide().$element.off('.' + this.type).removeData(this.type)
- }
-
- })
-
-
- /* POPOVER PLUGIN DEFINITION
- * ======================= */
-
- var old = $.fn.popover
-
- $.fn.popover = function (option) {
- return this.each(function () {
- var $this = $(this)
- , data = $this.data('popover')
- , options = typeof option == 'object' && option
- if (!data) $this.data('popover', (data = new Popover(this, options)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- $.fn.popover.Constructor = Popover
-
- $.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, {
- placement: 'right'
- , trigger: 'click'
- , content: ''
- , template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
- })
-
-
- /* POPOVER NO CONFLICT
- * =================== */
-
- $.fn.popover.noConflict = function () {
- $.fn.popover = old
- return this
- }
-
-}(window.jQuery);
-/* =============================================================
- * bootstrap-scrollspy.js v2.3.1
- * http://twitter.github.com/bootstrap/javascript.html#scrollspy
- * =============================================================
- * Copyright 2012 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================================================== */
-
-
-!function ($) {
-
- "use strict"; // jshint ;_;
-
-
- /* SCROLLSPY CLASS DEFINITION
- * ========================== */
-
- function ScrollSpy(element, options) {
- var process = $.proxy(this.process, this)
- , $element = $(element).is('body') ? $(window) : $(element)
- , href
- this.options = $.extend({}, $.fn.scrollspy.defaults, options)
- this.$scrollElement = $element.on('scroll.scroll-spy.data-api', process)
- this.selector = (this.options.target
- || ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
- || '') + ' .nav li > a'
- this.$body = $('body')
- this.refresh()
- this.process()
- }
-
- ScrollSpy.prototype = {
-
- constructor: ScrollSpy
-
- , refresh: function () {
- var self = this
- , $targets
-
- this.offsets = $([])
- this.targets = $([])
-
- $targets = this.$body
- .find(this.selector)
- .map(function () {
- var $el = $(this)
- , href = $el.data('target') || $el.attr('href')
- , $href = /^#\w/.test(href) && $(href)
- return ( $href
- && $href.length
- && [[ $href.position().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href ]] ) || null
- })
- .sort(function (a, b) { return a[0] - b[0] })
- .each(function () {
- self.offsets.push(this[0])
- self.targets.push(this[1])
- })
- }
-
- , process: function () {
- var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
- , scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight
- , maxScroll = scrollHeight - this.$scrollElement.height()
- , offsets = this.offsets
- , targets = this.targets
- , activeTarget = this.activeTarget
- , i
-
- if (scrollTop >= maxScroll) {
- return activeTarget != (i = targets.last()[0])
- && this.activate ( i )
- }
-
- for (i = offsets.length; i--;) {
- activeTarget != targets[i]
- && scrollTop >= offsets[i]
- && (!offsets[i + 1] || scrollTop <= offsets[i + 1])
- && this.activate( targets[i] )
- }
- }
-
- , activate: function (target) {
- var active
- , selector
-
- this.activeTarget = target
-
- $(this.selector)
- .parent('.active')
- .removeClass('active')
-
- selector = this.selector
- + '[data-target="' + target + '"],'
- + this.selector + '[href="' + target + '"]'
-
- active = $(selector)
- .parent('li')
- .addClass('active')
-
- if (active.parent('.dropdown-menu').length) {
- active = active.closest('li.dropdown').addClass('active')
- }
-
- active.trigger('activate')
- }
-
- }
-
-
- /* SCROLLSPY PLUGIN DEFINITION
- * =========================== */
-
- var old = $.fn.scrollspy
-
- $.fn.scrollspy = function (option) {
- return this.each(function () {
- var $this = $(this)
- , data = $this.data('scrollspy')
- , options = typeof option == 'object' && option
- if (!data) $this.data('scrollspy', (data = new ScrollSpy(this, options)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- $.fn.scrollspy.Constructor = ScrollSpy
-
- $.fn.scrollspy.defaults = {
- offset: 10
- }
-
-
- /* SCROLLSPY NO CONFLICT
- * ===================== */
-
- $.fn.scrollspy.noConflict = function () {
- $.fn.scrollspy = old
- return this
- }
-
-
- /* SCROLLSPY DATA-API
- * ================== */
-
- $(window).on('load', function () {
- $('[data-spy="scroll"]').each(function () {
- var $spy = $(this)
- $spy.scrollspy($spy.data())
- })
- })
-
-}(window.jQuery);/* ========================================================
- * bootstrap-tab.js v2.3.1
- * http://twitter.github.com/bootstrap/javascript.html#tabs
- * ========================================================
- * Copyright 2012 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ======================================================== */
-
-
-!function ($) {
-
- "use strict"; // jshint ;_;
-
-
- /* TAB CLASS DEFINITION
- * ==================== */
-
- var Tab = function (element) {
- this.element = $(element)
- }
-
- Tab.prototype = {
-
- constructor: Tab
-
- , show: function () {
- var $this = this.element
- , $ul = $this.closest('ul:not(.dropdown-menu)')
- , selector = $this.attr('data-target')
- , previous
- , $target
- , e
-
- if (!selector) {
- selector = $this.attr('href')
- selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
- }
-
- if ( $this.parent('li').hasClass('active') ) return
-
- previous = $ul.find('.active:last a')[0]
-
- e = $.Event('show', {
- relatedTarget: previous
- })
-
- $this.trigger(e)
-
- if (e.isDefaultPrevented()) return
-
- $target = $(selector)
-
- this.activate($this.parent('li'), $ul)
- this.activate($target, $target.parent(), function () {
- $this.trigger({
- type: 'shown'
- , relatedTarget: previous
- })
- })
- }
-
- , activate: function ( element, container, callback) {
- var $active = container.find('> .active')
- , transition = callback
- && $.support.transition
- && $active.hasClass('fade')
-
- function next() {
- $active
- .removeClass('active')
- .find('> .dropdown-menu > .active')
- .removeClass('active')
-
- element.addClass('active')
-
- if (transition) {
- element[0].offsetWidth // reflow for transition
- element.addClass('in')
- } else {
- element.removeClass('fade')
- }
-
- if ( element.parent('.dropdown-menu') ) {
- element.closest('li.dropdown').addClass('active')
- }
-
- callback && callback()
- }
-
- transition ?
- $active.one($.support.transition.end, next) :
- next()
-
- $active.removeClass('in')
- }
- }
-
-
- /* TAB PLUGIN DEFINITION
- * ===================== */
-
- var old = $.fn.tab
-
- $.fn.tab = function ( option ) {
- return this.each(function () {
- var $this = $(this)
- , data = $this.data('tab')
- if (!data) $this.data('tab', (data = new Tab(this)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- $.fn.tab.Constructor = Tab
-
-
- /* TAB NO CONFLICT
- * =============== */
-
- $.fn.tab.noConflict = function () {
- $.fn.tab = old
- return this
- }
-
-
- /* TAB DATA-API
- * ============ */
-
- $(document).on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
- e.preventDefault()
- $(this).tab('show')
- })
-
-}(window.jQuery);/* =============================================================
- * bootstrap-typeahead.js v2.3.1
- * http://twitter.github.com/bootstrap/javascript.html#typeahead
- * =============================================================
- * Copyright 2012 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================================================ */
-
-
-!function($){
-
- "use strict"; // jshint ;_;
-
-
- /* TYPEAHEAD PUBLIC CLASS DEFINITION
- * ================================= */
-
- var Typeahead = function (element, options) {
- this.$element = $(element)
- this.options = $.extend({}, $.fn.typeahead.defaults, options)
- this.matcher = this.options.matcher || this.matcher
- this.sorter = this.options.sorter || this.sorter
- this.highlighter = this.options.highlighter || this.highlighter
- this.updater = this.options.updater || this.updater
- this.source = this.options.source
- this.$menu = $(this.options.menu)
- this.shown = false
- this.listen()
- }
-
- Typeahead.prototype = {
-
- constructor: Typeahead
-
- , select: function () {
- var val = this.$menu.find('.active').attr('data-value')
- this.$element
- .val(this.updater(val))
- .change()
- return this.hide()
- }
-
- , updater: function (item) {
- return item
- }
-
- , show: function () {
- var pos = $.extend({}, this.$element.position(), {
- height: this.$element[0].offsetHeight
- })
-
- this.$menu
- .insertAfter(this.$element)
- .css({
- top: pos.top + pos.height
- , left: pos.left
- })
- .show()
-
- this.shown = true
- return this
- }
-
- , hide: function () {
- this.$menu.hide()
- this.shown = false
- return this
- }
-
- , lookup: function (event) {
- var items
-
- this.query = this.$element.val()
-
- if (!this.query || this.query.length < this.options.minLength) {
- return this.shown ? this.hide() : this
- }
-
- items = $.isFunction(this.source) ? this.source(this.query, $.proxy(this.process, this)) : this.source
-
- return items ? this.process(items) : this
- }
-
- , process: function (items) {
- var that = this
-
- items = $.grep(items, function (item) {
- return that.matcher(item)
- })
-
- items = this.sorter(items)
-
- if (!items.length) {
- return this.shown ? this.hide() : this
- }
-
- return this.render(items.slice(0, this.options.items)).show()
- }
-
- , matcher: function (item) {
- return ~item.toLowerCase().indexOf(this.query.toLowerCase())
- }
-
- , sorter: function (items) {
- var beginswith = []
- , caseSensitive = []
- , caseInsensitive = []
- , item
-
- while (item = items.shift()) {
- if (!item.toLowerCase().indexOf(this.query.toLowerCase())) beginswith.push(item)
- else if (~item.indexOf(this.query)) caseSensitive.push(item)
- else caseInsensitive.push(item)
- }
-
- return beginswith.concat(caseSensitive, caseInsensitive)
- }
-
- , highlighter: function (item) {
- var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&')
- return item.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) {
- return '<strong>' + match + '</strong>'
- })
- }
-
- , render: function (items) {
- var that = this
-
- items = $(items).map(function (i, item) {
- i = $(that.options.item).attr('data-value', item)
- i.find('a').html(that.highlighter(item))
- return i[0]
- })
-
- items.first().addClass('active')
- this.$menu.html(items)
- return this
- }
-
- , next: function (event) {
- var active = this.$menu.find('.active').removeClass('active')
- , next = active.next()
-
- if (!next.length) {
- next = $(this.$menu.find('li')[0])
- }
-
- next.addClass('active')
- }
-
- , prev: function (event) {
- var active = this.$menu.find('.active').removeClass('active')
- , prev = active.prev()
-
- if (!prev.length) {
- prev = this.$menu.find('li').last()
- }
-
- prev.addClass('active')
- }
-
- , listen: function () {
- this.$element
- .on('focus', $.proxy(this.focus, this))
- .on('blur', $.proxy(this.blur, this))
- .on('keypress', $.proxy(this.keypress, this))
- .on('keyup', $.proxy(this.keyup, this))
-
- if (this.eventSupported('keydown')) {
- this.$element.on('keydown', $.proxy(this.keydown, this))
- }
-
- this.$menu
- .on('click', $.proxy(this.click, this))
- .on('mouseenter', 'li', $.proxy(this.mouseenter, this))
- .on('mouseleave', 'li', $.proxy(this.mouseleave, this))
- }
-
- , eventSupported: function(eventName) {
- var isSupported = eventName in this.$element
- if (!isSupported) {
- this.$element.setAttribute(eventName, 'return;')
- isSupported = typeof this.$element[eventName] === 'function'
- }
- return isSupported
- }
-
- , move: function (e) {
- if (!this.shown) return
-
- switch(e.keyCode) {
- case 9: // tab
- case 13: // enter
- case 27: // escape
- e.preventDefault()
- break
-
- case 38: // up arrow
- e.preventDefault()
- this.prev()
- break
-
- case 40: // down arrow
- e.preventDefault()
- this.next()
- break
- }
-
- e.stopPropagation()
- }
-
- , keydown: function (e) {
- this.suppressKeyPressRepeat = ~$.inArray(e.keyCode, [40,38,9,13,27])
- this.move(e)
- }
-
- , keypress: function (e) {
- if (this.suppressKeyPressRepeat) return
- this.move(e)
- }
-
- , keyup: function (e) {
- switch(e.keyCode) {
- case 40: // down arrow
- case 38: // up arrow
- case 16: // shift
- case 17: // ctrl
- case 18: // alt
- break
-
- case 9: // tab
- case 13: // enter
- if (!this.shown) return
- this.select()
- break
-
- case 27: // escape
- if (!this.shown) return
- this.hide()
- break
-
- default:
- this.lookup()
- }
-
- e.stopPropagation()
- e.preventDefault()
- }
-
- , focus: function (e) {
- this.focused = true
- }
-
- , blur: function (e) {
- this.focused = false
- if (!this.mousedover && this.shown) this.hide()
- }
-
- , click: function (e) {
- e.stopPropagation()
- e.preventDefault()
- this.select()
- this.$element.focus()
- }
-
- , mouseenter: function (e) {
- this.mousedover = true
- this.$menu.find('.active').removeClass('active')
- $(e.currentTarget).addClass('active')
- }
-
- , mouseleave: function (e) {
- this.mousedover = false
- if (!this.focused && this.shown) this.hide()
- }
-
- }
-
-
- /* TYPEAHEAD PLUGIN DEFINITION
- * =========================== */
-
- var old = $.fn.typeahead
-
- $.fn.typeahead = function (option) {
- return this.each(function () {
- var $this = $(this)
- , data = $this.data('typeahead')
- , options = typeof option == 'object' && option
- if (!data) $this.data('typeahead', (data = new Typeahead(this, options)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- $.fn.typeahead.defaults = {
- source: []
- , items: 8
- , menu: '<ul class="typeahead dropdown-menu"></ul>'
- , item: '<li><a href="#"></a></li>'
- , minLength: 1
- }
-
- $.fn.typeahead.Constructor = Typeahead
-
-
- /* TYPEAHEAD NO CONFLICT
- * =================== */
-
- $.fn.typeahead.noConflict = function () {
- $.fn.typeahead = old
- return this
- }
-
-
- /* TYPEAHEAD DATA-API
- * ================== */
-
- $(document).on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) {
- var $this = $(this)
- if ($this.data('typeahead')) return
- $this.typeahead($this.data())
- })
-
-}(window.jQuery);
-/* ==========================================================
- * bootstrap-affix.js v2.3.1
- * http://twitter.github.com/bootstrap/javascript.html#affix
- * ==========================================================
- * Copyright 2012 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ========================================================== */
-
-
-!function ($) {
-
- "use strict"; // jshint ;_;
-
-
- /* AFFIX CLASS DEFINITION
- * ====================== */
-
- var Affix = function (element, options) {
- this.options = $.extend({}, $.fn.affix.defaults, options)
- this.$window = $(window)
- .on('scroll.affix.data-api', $.proxy(this.checkPosition, this))
- .on('click.affix.data-api', $.proxy(function () { setTimeout($.proxy(this.checkPosition, this), 1) }, this))
- this.$element = $(element)
- this.checkPosition()
- }
-
- Affix.prototype.checkPosition = function () {
- if (!this.$element.is(':visible')) return
-
- var scrollHeight = $(document).height()
- , scrollTop = this.$window.scrollTop()
- , position = this.$element.offset()
- , offset = this.options.offset
- , offsetBottom = offset.bottom
- , offsetTop = offset.top
- , reset = 'affix affix-top affix-bottom'
- , affix
-
- if (typeof offset != 'object') offsetBottom = offsetTop = offset
- if (typeof offsetTop == 'function') offsetTop = offset.top()
- if (typeof offsetBottom == 'function') offsetBottom = offset.bottom()
-
- affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ?
- false : offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ?
- 'bottom' : offsetTop != null && scrollTop <= offsetTop ?
- 'top' : false
-
- if (this.affixed === affix) return
-
- this.affixed = affix
- this.unpin = affix == 'bottom' ? position.top - scrollTop : null
-
- this.$element.removeClass(reset).addClass('affix' + (affix ? '-' + affix : ''))
- }
-
-
- /* AFFIX PLUGIN DEFINITION
- * ======================= */
-
- var old = $.fn.affix
-
- $.fn.affix = function (option) {
- return this.each(function () {
- var $this = $(this)
- , data = $this.data('affix')
- , options = typeof option == 'object' && option
- if (!data) $this.data('affix', (data = new Affix(this, options)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- $.fn.affix.Constructor = Affix
-
- $.fn.affix.defaults = {
- offset: 0
- }
-
-
- /* AFFIX NO CONFLICT
- * ================= */
-
- $.fn.affix.noConflict = function () {
- $.fn.affix = old
- return this
- }
-
-
- /* AFFIX DATA-API
- * ============== */
-
- $(window).on('load', function () {
- $('[data-spy="affix"]').each(function () {
- var $spy = $(this)
- , data = $spy.data()
-
- data.offset = data.offset || {}
-
- data.offsetBottom && (data.offset.bottom = data.offsetBottom)
- data.offsetTop && (data.offset.top = data.offsetTop)
-
- $spy.affix(data)
- })
- })
-
-
-}(window.jQuery);
\ No newline at end of file
[11/28] CLIMATE-512 - Replace frontend with new Yeoman/Grunt/Bower
frontend
Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/js/lib/jquery/jquery-ui/datepicker-wrapper/date.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/js/lib/jquery/jquery-ui/datepicker-wrapper/date.js b/ocw-ui/frontend/app/js/lib/jquery/jquery-ui/datepicker-wrapper/date.js
deleted file mode 100755
index ab06ce1..0000000
--- a/ocw-ui/frontend/app/js/lib/jquery/jquery-ui/datepicker-wrapper/date.js
+++ /dev/null
@@ -1,125 +0,0 @@
-/*global angular */
-/*
- jQuery UI Datepicker plugin wrapper
-
- @note If ≤ IE8 make sure you have a polyfill for Date.toISOString()
- @param [ui-date] {object} Options to pass to $.fn.datepicker() merged onto uiDateConfig
- */
-
-angular.module('ui.date', [])
-
-.constant('uiDateConfig', {})
-
-.directive('uiDate', ['uiDateConfig', '$timeout', function (uiDateConfig, $timeout) {
- 'use strict';
- var options;
- options = {};
- angular.extend(options, uiDateConfig);
- return {
- require:'?ngModel',
- link:function (scope, element, attrs, controller) {
- var getOptions = function () {
- return angular.extend({}, uiDateConfig, scope.$eval(attrs.uiDate));
- };
- var initDateWidget = function () {
- var opts = getOptions();
-
- // If we have a controller (i.e. ngModelController) then wire it up
- if (controller) {
- // Override ngModelController's $setViewValue
- // so that we can ensure that a Date object is being pass down the $parsers
- // This is to handle the case where the user types directly into the input box
- var _$setViewValue = controller.$setViewValue;
- var settingValue = false;
- controller.$setViewValue = function () {
- if ( !settingValue ) {
- settingValue = true;
- element.datepicker("setDate", element.datepicker("getDate"));
- _$setViewValue.call(controller, element.datepicker("getDate"));
- $timeout(function() {settingValue = false;});
- }
- };
-
- // Set the view value in a $apply block when users selects
- // (calling directive user's function too if provided)
- var _onSelect = opts.onSelect || angular.noop;
- opts.onSelect = function (value, picker) {
- scope.$apply(function() {
- controller.$setViewValue(value);
- _onSelect(value, picker);
- element.blur();
- });
- };
-
- // Don't show if we are already setting the value in $setViewValue()
- // (calling directive user's function too if provided)
- var _beforeShow = opts.beforeShow || angular.noop;
- opts.beforeShow = function(input, inst) {
- return !settingValue && _beforeShow(input, inst);
- };
-
- // Update the date picker when the model changes
- controller.$render = function () {
- var date = controller.$viewValue;
- if ( angular.isDefined(date) && date !== null && !angular.isDate(date) ) {
- throw new Error('ng-Model value must be a Date object - currently it is a ' + typeof date + ' - use ui-date-format to convert it from a string');
- }
- element.datepicker("setDate", date);
- };
- }
- // If we don't destroy the old one it doesn't update properly when the config changes
- element.datepicker('destroy');
- // Create the new datepicker widget
- element.datepicker(opts);
- if ( controller ) {
- // Force a render to override whatever is in the input text box
- controller.$render();
- }
- };
- // Watch for changes to the directives options
- scope.$watch(getOptions, initDateWidget, true);
- }
- };
-}
-])
-
-.constant('uiDateFormatConfig', '')
-
-.directive('uiDateFormat', ['uiDateFormatConfig', function(uiDateFormatConfig) {
- var directive = {
- require:'ngModel',
- link: function(scope, element, attrs, modelCtrl) {
- var dateFormat = attrs.uiDateFormat || uiDateFormatConfig;
- if ( dateFormat ) {
- // Use the datepicker with the attribute value as the dateFormat string to convert to and from a string
- modelCtrl.$formatters.push(function(value) {
- if (angular.isString(value) ) {
- return jQuery.datepicker.parseDate(dateFormat, value);
- }
- return null;
- });
- modelCtrl.$parsers.push(function(value){
- if (value) {
- return jQuery.datepicker.formatDate(dateFormat, value);
- }
- return null;
- });
- } else {
- // Default to ISO formatting
- modelCtrl.$formatters.push(function(value) {
- if (angular.isString(value) ) {
- return new Date(value);
- }
- return null;
- });
- modelCtrl.$parsers.push(function(value){
- if (value) {
- return value.toISOString();
- }
- return null;
- });
- }
- }
- };
- return directive;
-}]);
[02/28] CLIMATE-512 - Replace frontend with new Yeoman/Grunt/Bower
frontend
Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/spec/controllers/datasetdisplay.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/test/spec/controllers/datasetdisplay.js b/ocw-ui/frontend/test/spec/controllers/datasetdisplay.js
new file mode 100644
index 0000000..15a4a02
--- /dev/null
+++ b/ocw-ui/frontend/test/spec/controllers/datasetdisplay.js
@@ -0,0 +1,59 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http: *www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+'use strict';
+
+describe('Controller: DatasetDisplayCtrl', function () {
+
+ // load the controller's module
+ beforeEach(module('ocwUiApp'));
+
+ var DatasetdisplayctrlCtrl,
+ scope;
+
+ // Initialize the controller and a mock scope
+ beforeEach(inject(function ($controller, $rootScope) {
+ scope = $rootScope.$new();
+ DatasetdisplayctrlCtrl = $controller('DatasetDisplayCtrl', {
+ $scope: scope
+ });
+ }));
+
+ it('should initialize the removeDataset function', function() {
+ scope.datasets.push(1);
+ scope.datasets.push(2);
+
+ expect(scope.datasets[0]).toBe(1);
+
+ scope.removeDataset(0);
+
+ expect(scope.datasets[0]).toBe(2);
+ });
+
+ it('should initialize the removeDataset function', function() {
+ scope.datasets.push(1);
+ scope.datasets.push(2);
+
+ expect(scope.datasets[0]).toBe(1);
+
+ scope.removeDataset(0);
+
+ expect(scope.datasets[0]).toBe(2);
+ });
+});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/spec/controllers/datasetselect.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/test/spec/controllers/datasetselect.js b/ocw-ui/frontend/test/spec/controllers/datasetselect.js
new file mode 100644
index 0000000..abaeb43
--- /dev/null
+++ b/ocw-ui/frontend/test/spec/controllers/datasetselect.js
@@ -0,0 +1,54 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http: *www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+'use strict';
+
+describe('Controller: DatasetSelectCtrl', function () {
+
+ // load the controller's module
+ beforeEach(module('ocwUiApp'));
+
+ var DatasetselectCtrl,
+ scope;
+
+ // Initialize the controller and a mock scope
+ beforeEach(inject(function ($controller, $rootScope) {
+ scope = $rootScope.$new();
+ DatasetselectCtrl = $controller('DatasetSelectCtrl', {
+ $scope: scope
+ });
+ }));
+
+ it('should initialize the disable clear button function', function() {
+ inject(function(selectedDatasetInformation) {
+ expect(scope.shouldDisableClearButton()).toBe(true);
+ selectedDatasetInformation.addDataset({});
+ expect(scope.shouldDisableClearButton()).toBe(false);
+ });
+ });
+
+ it('should initialize the clear datasets function', function() {
+ inject(function(selectedDatasetInformation) {
+ selectedDatasetInformation.addDataset({});
+ expect(selectedDatasetInformation.getDatasetCount()).toBe(1);
+ scope.clearDatasets();
+ expect(selectedDatasetInformation.getDatasetCount()).toBe(0);
+ });
+ });
+});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/spec/controllers/main.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/test/spec/controllers/main.js b/ocw-ui/frontend/test/spec/controllers/main.js
new file mode 100644
index 0000000..dad1469
--- /dev/null
+++ b/ocw-ui/frontend/test/spec/controllers/main.js
@@ -0,0 +1,41 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http: *www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+'use strict';
+
+describe('Controller: MainCtrl', function () {
+
+ // load the controller's module
+ beforeEach(module('ocwUiApp'));
+
+ var MainCtrl,
+ scope;
+
+ // Initialize the controller and a mock scope
+ beforeEach(inject(function ($controller, $rootScope) {
+ scope = $rootScope.$new();
+ MainCtrl = $controller('MainCtrl', {
+ $scope: scope
+ });
+ }));
+
+ it('should attach a list of awesomeThings to the scope', function () {
+ expect(scope.awesomeThings.length).toBe(3);
+ });
+});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/spec/controllers/observationselect.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/test/spec/controllers/observationselect.js b/ocw-ui/frontend/test/spec/controllers/observationselect.js
new file mode 100644
index 0000000..f544e22
--- /dev/null
+++ b/ocw-ui/frontend/test/spec/controllers/observationselect.js
@@ -0,0 +1,122 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http: *www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+'use strict';
+
+describe('Controller: ObservationSelectCtrl', function () {
+
+ // load the controller's module
+ beforeEach(module('ocwUiApp'));
+
+ var ObservationselectCtrl,
+ scope;
+
+ // Initialize the controller and a mock scope
+ beforeEach(inject(function ($controller, $rootScope) {
+ scope = $rootScope.$new();
+ ObservationselectCtrl = $controller('ObservationSelectCtrl', {
+ $scope: scope
+ });
+ }));
+
+ it('should grab the default set of selected datasets from the service', function() {
+ expect(typeof scope.datasetCount).toBe('object');
+ expect(Object.keys(scope.datasetCount).length).toBe(0);
+ });
+
+ it('should initialize option arrays and default to the first element', function() {
+ expect(scope.params.length).toBe(1);
+ expect(scope.lats.length).toBe(1);
+ expect(scope.lons.length).toBe(1);
+ expect(scope.times.length).toBe(1);
+
+ expect(scope.params[0]).toEqual("Please select a file above");
+ expect(scope.lats[0]).toEqual("Please select a file above");
+ expect(scope.lons[0]).toEqual("Please select a file above");
+ expect(scope.times[0]).toEqual("Please select a file above");
+ });
+
+ it('should initialize scope attributes properly', function() {
+ inject(function($httpBackend, $rootScope, $controller) {
+ $rootScope.baseURL = "http://localhost:8082"
+ $httpBackend.expectJSONP($rootScope.baseURL + '/dir/path_leader/?callback=JSON_CALLBACK').
+ respond(200, {'leader': '/usr/local/ocw'});
+ $httpBackend.whenGET('views/main.html').respond(200);
+ $httpBackend.flush();
+
+ expect(scope.pathLeader).toEqual('/usr/local/ocw');
+ expect(scope.loadingFile).toBe(false);
+ expect(scope.fileAdded).toBe(false);
+ expect(typeof scope.latLonVals).toEqual('object');
+ expect(scope.latLonVals.length).toBe(0);
+ expect(typeof scope.timeVals).toEqual('object');
+ expect(scope.timeVals.length).toEqual(0);
+ expect(typeof scope.localSelectForm).toEqual('object');
+ expect(Object.keys(scope.localSelectForm).length).toEqual(0);
+ });
+ });
+
+ it('should initialize the uploadLocalFile function', function() {
+ inject(function($httpBackend, $rootScope, $controller) {
+ $rootScope.baseURL = "http://localhost:8082"
+ $httpBackend.expectJSONP($rootScope.baseURL + '/dir/path_leader/?callback=JSON_CALLBACK').
+ respond(200, {'leader': null});
+ $httpBackend.whenGET('views/main.html').respond(200);
+
+ $httpBackend.expectJSONP($rootScope.baseURL + '/lfme/list_vars/undefined?callback=JSON_CALLBACK').
+ respond(200, {"variables": ["lat", "lon", "prec", "time" ]});
+ $httpBackend.expectJSONP($rootScope.baseURL + '/lfme/list_latlon/undefined?callback=JSON_CALLBACK').
+ respond(200, {'latMax': '75.25', 'success': 1, 'lat_name': 'lat', 'lonMax': '-29.75', 'lonMin': '-159.75', 'lon_name': 'lon', 'latMin': '15.25'});
+ $httpBackend.expectJSONP($rootScope.baseURL + '/lfme/list_time/undefined?callback=JSON_CALLBACK').
+ respond(200, {"start_time": "1980-01-01 00:00:00", "time_name": "time", "success": 1, "end_time": "2004-12-01 00:00:00"});
+
+ scope.uploadLocalFile();
+ $httpBackend.flush();
+
+ expect(scope.latsSelect).toEqual("lat");
+ expect(scope.lonsSelect).toEqual("lon");
+ expect(scope.timeSelect).toEqual("time");
+ expect(scope.paramSelect).toEqual("prec");
+
+ // Simulate failure on one of the backend calls. Should
+ $httpBackend.expectJSONP($rootScope.baseURL + '/lfme/list_vars/undefined?callback=JSON_CALLBACK').
+ respond(200, {});
+ $httpBackend.expectJSONP($rootScope.baseURL + '/lfme/list_latlon/undefined?callback=JSON_CALLBACK').
+ respond(404, {});
+ $httpBackend.expectJSONP($rootScope.baseURL + '/lfme/list_time/undefined?callback=JSON_CALLBACK').
+ respond(200, {});
+
+ scope.uploadLocalFile();
+ $httpBackend.flush();
+
+ expect(scope.paramSelect).toEqual("Unable to load variable(s)");
+ expect(scope.params.length).toEqual(1);
+ expect(scope.latsSelect).toEqual("Unable to load variable(s)");
+ expect(scope.lats.length).toEqual(1);
+ expect(scope.lonsSelect).toEqual("Unable to load variable(s)");
+ expect(scope.lons.length).toEqual(1);
+ expect(scope.timeSelect).toEqual("Unable to load variable(s)");
+ expect(scope.times.length).toEqual(1);
+ });
+ });
+
+ it('should initialize the addDatasets function', function() {
+ expect(typeof(scope.addDataSet)).toBe("function");
+ });
+});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/spec/controllers/parameterselect.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/test/spec/controllers/parameterselect.js b/ocw-ui/frontend/test/spec/controllers/parameterselect.js
new file mode 100644
index 0000000..aa4cbd8
--- /dev/null
+++ b/ocw-ui/frontend/test/spec/controllers/parameterselect.js
@@ -0,0 +1,136 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http: *www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+'use strict';
+
+describe('Controller: ParameterSelectCtrl', function () {
+
+ // load the controller's module
+ beforeEach(module('ocwUiApp'));
+
+ var ParameterselectCtrl,
+ scope;
+
+ // Initialize the controller and a mock scope
+ beforeEach(inject(function ($controller, $rootScope) {
+ scope = $rootScope.$new();
+ ParameterselectCtrl = $controller('ParameterSelectCtrl', {
+ $scope: scope
+ });
+ }));
+
+ it('should initialize spatial and temporal range default values properly', function() {
+ expect(scope.latMin).toBe(-90);
+ expect(scope.latMax).toBe(90);
+ expect(scope.lonMin).toBe(-180);
+ expect(scope.lonMax).toBe(180);
+ expect(scope.start).toBe("1900-01-01 00:00:00");
+ expect(scope.end).toBe("2030-01-01 00:00:00");
+ });
+
+ it('should grab the default set of selected datasets from the service', function() {
+ // We should get an object with no keys since the user hasn't selected any
+ // datasets by default. Object.keys returns an array of all the user defined
+ // keys in the object.
+ expect(typeof scope.datasets).toBe('object');
+ expect(Object.keys(scope.datasets).length).toBe(0);
+ });
+
+ it('should grab the default region select param object from the regionSelectParams service', function() {
+ // The default display values aren't going to be changing any time soon. This test
+ // is a bit of a duplicate since this is really testing functionality of the service.
+ // Can't hurt to make sure that we're getting results though!
+ expect(typeof scope.displayParams).toBe('object');
+ expect(Object.keys(scope.displayParams).length).toBe(7);
+ });
+
+ it('should initialize misc. values properly', function() {
+ expect(scope.runningEval).toBe(false);
+ expect(scope.areInUserRegridState).toBe(false);
+ expect(scope.latSliderVal).toBe(0);
+ expect(scope.lonSliderVal).toBe(0);
+ });
+
+ it('should set the default datepicker settings', function() {
+ // This tests the default values that get passed to the datepicker objects that we
+ // initialize with a directive.
+ expect(Object.keys(scope.datepickerSettings).length).toBe(2);
+ expect(scope.datepickerSettings.changeMonth).toBe(true);
+ expect(scope.datepickerSettings.changeYear).toBe(true);
+ });
+
+ it('should initialize the control disable function', function() {
+ // Add to dummy values to datasets to make sure the disable function
+ // triggers properly.
+ scope.datasets.push(1);
+ scope.datasets.push(2);
+ expect(scope.shouldDisableControls()).toBe(false);
+ });
+
+ it('should initialize the disable evaluation button function', function() {
+ expect(scope.shouldDisableEvaluateButton()).toBe(true);
+ scope.datasets.push(1);
+ expect(scope.shouldDisableEvaluateButton()).toBe(true);
+ scope.datasets.push(2);
+ expect(scope.shouldDisableEvaluateButton()).toBe(false);
+ scope.runningEval = true;
+ expect(scope.shouldDisableEvaluateButton()).toBe(true);
+ });
+
+ it('should initialize the disable results view function', function() {
+ inject(function($rootScope) {
+ expect(scope.shouldDisableResultsView()).toBe(true);
+
+ // Set evalResults to something other than the default value
+ $rootScope.evalResults = "this is not an empty string";
+
+ expect(scope.shouldDisableResultsView()).toBe(false);
+ });
+ });
+
+ /*
+ * TODO: $scope.$apply() in the controller is breaking this test. Need to
+ * find a way to deal with that or rethink how we handle this test.
+ *
+ */
+ /*
+ it('should initialize the check parameters function', function() {
+ // Set the displayParams values to be "out of bounds" values so checkParams
+ // adjusts them properly.
+ scope.displayParams.latMin = "-95";
+ scope.displayParams.latMax = "95";
+ scope.displayParams.lonMin = "-185";
+ scope.displayParams.lonMax = "185";
+ scope.displayParams.start = "1980-00-00 00:00:00";
+ scope.displayParams.end = "2031-01-01 00:00:00";
+
+ // If we don't remove the watch on datasets we end up with displayParam values
+ // all being undefined (but only during testing, which is odd...)
+ scope.unwatchDatasets();
+ scope.checkParameters();
+
+ expect(scope.displayParams.latMin).toBe(-90);
+ expect(scope.displayParams.latMax).toBe(90);
+ expect(scope.displayParams.lonMin).toBe(-180);
+ expect(scope.displayParams.lonMax).toBe(180);
+ expect(scope.displayParams.start).toBe('1980-01-01 00:00:00');
+ expect(scope.displayParams.end).toBe('2030-01-01 00:00:00');
+ });
+ */
+});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/spec/controllers/rcmedselection.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/test/spec/controllers/rcmedselection.js b/ocw-ui/frontend/test/spec/controllers/rcmedselection.js
new file mode 100644
index 0000000..97011c7
--- /dev/null
+++ b/ocw-ui/frontend/test/spec/controllers/rcmedselection.js
@@ -0,0 +1,145 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http: *www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+'use strict';
+
+describe('Controller: RcmedSelectionCtrl', function () {
+
+ // load the controller's module
+ beforeEach(module('ocwUiApp'));
+
+ var RcmedselectionCtrl,
+ scope;
+
+ // Initialize the controller and a mock scope
+ beforeEach(inject(function ($controller, $rootScope) {
+ scope = $rootScope.$new();
+ RcmedselectionCtrl = $controller('RcmedSelectionCtrl', {
+ $scope: scope
+ });
+ }));
+
+ it('should automatically query RCMED on initialization', function() {
+ inject(function($rootScope, $httpBackend) {
+ $httpBackend.expectJSONP($rootScope.baseURL + '/rcmed/datasets/?callback=JSON_CALLBACK').
+ respond(200, [{longname: 1}, {longname: 2}]);
+ $httpBackend.expectGET($rootScope.baseURL + '/rcmed/parameters/bounds/').respond(503)
+ $httpBackend.expectGET('views/main.html').respond(200);
+ $httpBackend.flush();
+
+ expect(scope.availableObs.length).toBe(3);
+ expect(scope.availableObs[0]).toEqual({longname: "Please select an option"});
+ expect(scope.availableObs[1]).toEqual({longname: 1});
+ });
+ });
+
+ it('should initialize the getObservations function', function() {
+ inject(function($rootScope, $httpBackend) {
+ $httpBackend.expectJSONP($rootScope.baseURL + '/rcmed/datasets/?callback=JSON_CALLBACK').
+ respond(200, [{longname: 1}, {longname: 2}]);
+ $httpBackend.expectGET($rootScope.baseURL + '/rcmed/parameters/bounds/').respond(503)
+ $httpBackend.expectGET('views/main.html').respond(200);
+ $httpBackend.flush();
+
+ expect(scope.availableObs.length).toBe(3);
+ expect(scope.availableObs[0]).toEqual({longname: "Please select an option"});
+ expect(scope.availableObs[1]).toEqual({longname: 1});
+
+ // Set up a failed query
+ $httpBackend.expectJSONP($rootScope.baseURL + '/rcmed/datasets/?callback=JSON_CALLBACK').
+ respond(404);
+ scope.getObservations();
+ $httpBackend.flush();
+
+ expect(scope.availableObs.length).toBe(1);
+ expect(scope.availableObs[0]).toEqual('Unable to query RCMED');
+ });
+ });
+
+ it('should initialize dataSelectUpdated function', function() {
+ inject(function($rootScope, $controller, $httpBackend) {
+ $httpBackend.expectJSONP($rootScope.baseURL + '/rcmed/datasets/?callback=JSON_CALLBACK').
+ respond(200, [{longname: 1}, {longname: 2}]);
+ $httpBackend.expectGET($rootScope.baseURL + '/rcmed/parameters/bounds/').respond(503)
+ $httpBackend.expectGET('views/main.html').respond(200);
+ $httpBackend.flush();
+
+ // Add the test dataset to our scope
+ scope.datasetSelection = {shortname: 'TRMM'}
+
+ // Test return with only single parameter
+ $httpBackend.expectJSONP($rootScope.baseURL + '/rcmed/parameters/?dataset=' +
+ scope.datasetSelection['shortname'] +
+ '&callback=JSON_CALLBACK').
+ respond(200, ['pcp']);
+ scope.dataSelectUpdated();
+ $httpBackend.flush();
+
+ expect(scope.parameterSelection).toEqual('pcp');
+
+ // Test return with multiple parameters
+ $httpBackend.expectJSONP($rootScope.baseURL + '/rcmed/parameters/?dataset=' +
+ scope.datasetSelection['shortname'] +
+ '&callback=JSON_CALLBACK').
+ respond(200, ['pcp', 'pcp2']);
+ scope.dataSelectUpdated();
+ $httpBackend.flush();
+
+ expect(scope.parameterSelection).toEqual({shortname: 'Please select a parameter'});
+ });
+ });
+
+ it('should initialze the addObservation function', function() {
+ inject(function($rootScope, $controller, $httpBackend) {
+ $httpBackend.expectJSONP($rootScope.baseURL + '/rcmed/datasets/?callback=JSON_CALLBACK').
+ respond(200, [{longname: 1}, {longname: 2}]);
+ $httpBackend.expectGET($rootScope.baseURL + '/rcmed/parameters/bounds/').respond(503)
+ $httpBackend.expectGET('views/main.html').respond(200);
+ $httpBackend.flush();
+
+ scope.datasetSelection = {
+ "dataset_id" : "3",
+ "shortname" : "TRMM",
+ "longname" : "Tropical Rainfall Measuring Mission Dataset",
+ "source" : "Readme for the Tropical Rainfall Measuring Mission (TRMM) Data Set"
+ };
+
+ scope.parameterSelection = {
+ "parameter_id":"36",
+ "shortname":"pcp",
+ "datasetshortname":"TRMM",
+ "longname":"TRMM v.6 Monthly Precipitation",
+ "units":"mm\/day"
+ };
+
+ // addObservations does a refresh of the selections with a re-query of the backend
+ // so we need to catch that call!
+ $httpBackend.expectJSONP($rootScope.baseURL + '/rcmed/datasets/?callback=JSON_CALLBACK').
+ respond(200, [{longname: 1}, {longname: 2}]);
+
+ scope.addObservation();
+ $httpBackend.flush();
+
+ expect(scope.datasetCount.length).toBe(1);
+ // The selection observation should be reset so we shouldn't have
+ // any selected observation parameters.
+ expect(scope.retrievedObsParams).toEqual([]);
+ });
+ });
+});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/spec/controllers/result.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/test/spec/controllers/result.js b/ocw-ui/frontend/test/spec/controllers/result.js
new file mode 100644
index 0000000..495a473
--- /dev/null
+++ b/ocw-ui/frontend/test/spec/controllers/result.js
@@ -0,0 +1,37 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http: *www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+'use strict';
+
+describe('Controller: ResultCtrl', function () {
+
+ // load the controller's module
+ beforeEach(module('ocwUiApp'));
+
+ var ResultCtrl,
+ scope;
+
+ // Initialize the controller and a mock scope
+ beforeEach(inject(function ($controller, $rootScope) {
+ scope = $rootScope.$new();
+ ResultCtrl = $controller('ResultCtrl', {
+ $scope: scope
+ });
+ }));
+});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/spec/controllers/resultdetail.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/test/spec/controllers/resultdetail.js b/ocw-ui/frontend/test/spec/controllers/resultdetail.js
new file mode 100644
index 0000000..a29e508
--- /dev/null
+++ b/ocw-ui/frontend/test/spec/controllers/resultdetail.js
@@ -0,0 +1,37 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http: *www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+'use strict';
+
+describe('Controller: ResultdetailCtrl', function () {
+
+ // load the controller's module
+ beforeEach(module('ocwUiApp'));
+
+ var ResultdetailCtrl,
+ scope;
+
+ // Initialize the controller and a mock scope
+ beforeEach(inject(function ($controller, $rootScope) {
+ scope = $rootScope.$new();
+ ResultdetailCtrl = $controller('ResultdetailCtrl', {
+ $scope: scope
+ });
+ }));
+});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/spec/controllers/settings.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/test/spec/controllers/settings.js b/ocw-ui/frontend/test/spec/controllers/settings.js
new file mode 100644
index 0000000..e45accd
--- /dev/null
+++ b/ocw-ui/frontend/test/spec/controllers/settings.js
@@ -0,0 +1,37 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http: *www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+'use strict';
+
+describe('Controller: SettingsCtrl', function () {
+
+ // load the controller's module
+ beforeEach(module('ocwUiApp'));
+
+ var SettingsCtrl,
+ scope;
+
+ // Initialize the controller and a mock scope
+ beforeEach(inject(function ($controller, $rootScope) {
+ scope = $rootScope.$new();
+ SettingsCtrl = $controller('SettingsCtrl', {
+ $scope: scope
+ });
+ }));
+});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/spec/controllers/timeline.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/test/spec/controllers/timeline.js b/ocw-ui/frontend/test/spec/controllers/timeline.js
new file mode 100644
index 0000000..1f3580f
--- /dev/null
+++ b/ocw-ui/frontend/test/spec/controllers/timeline.js
@@ -0,0 +1,37 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http: *www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+'use strict';
+
+describe('Controller: TimelineCtrl', function () {
+
+ // load the controller's module
+ beforeEach(module('ocwUiApp'));
+
+ var TimelineCtrl,
+ scope;
+
+ // Initialize the controller and a mock scope
+ beforeEach(inject(function ($controller, $rootScope) {
+ scope = $rootScope.$new();
+ TimelineCtrl = $controller('TimelineCtrl', {
+ $scope: scope
+ });
+ }));
+});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/spec/controllers/worldmap.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/test/spec/controllers/worldmap.js b/ocw-ui/frontend/test/spec/controllers/worldmap.js
new file mode 100644
index 0000000..76c702b
--- /dev/null
+++ b/ocw-ui/frontend/test/spec/controllers/worldmap.js
@@ -0,0 +1,57 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http: *www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+'use strict';
+
+describe('Controller: WorldMapCtrl', function () {
+
+ // load the controller's module
+ beforeEach(module('ocwUiApp'));
+
+ var WorldmapCtrl,
+ scope;
+
+ // Initialize the controller and a mock scope
+ beforeEach(inject(function ($controller, $rootScope) {
+ scope = $rootScope.$new();
+ WorldmapCtrl = $controller('WorldMapCtrl', {
+ $scope: scope
+ });
+ }));
+
+ it('should initialize the updateMap function', function() {
+ inject(function($rootScope, $controller) {
+ var scope = $rootScope.$new();
+ var ctrl = $controller("WorldMapCtrl", {$scope: scope});
+
+ // Set the important attributes for a fake dataset
+ scope.datasets.push({shouldDisplay: true, latlonVals: {latMin: 0, latMax: 0, lonMin: 0, lonMax: 0}});
+ // Don't try to add the user defined region since we don't have one
+ scope.regionParams.areValid = false;
+ // We need to fake the map object. The only thing we care about is faking the "addLayer" function
+ // and the "fitBounds" functions which our map controllers makes use of.
+ $rootScope.map = {addLayer: function(){}, fitBounds: function(){}};
+ $rootScope.fillColors = ['#ff0000'];
+
+ expect("rectangleGroup" in $rootScope).toBe(false);
+ scope.updateMap();
+ expect("rectangleGroup" in $rootScope).toBe(true);
+ });
+ });
+});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/spec/directives/bootstrapmodal.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/test/spec/directives/bootstrapmodal.js b/ocw-ui/frontend/test/spec/directives/bootstrapmodal.js
new file mode 100644
index 0000000..465f65e
--- /dev/null
+++ b/ocw-ui/frontend/test/spec/directives/bootstrapmodal.js
@@ -0,0 +1,33 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http: *www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+'use strict';
+
+describe('Directive: bootstrapModal', function () {
+
+ // load the directive's module
+ beforeEach(module('ocwUiApp'));
+
+ var element,
+ scope;
+
+ beforeEach(inject(function ($rootScope) {
+ scope = $rootScope.$new();
+ }));
+});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/spec/directives/bootstrapmodalopen.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/test/spec/directives/bootstrapmodalopen.js b/ocw-ui/frontend/test/spec/directives/bootstrapmodalopen.js
new file mode 100644
index 0000000..699210c
--- /dev/null
+++ b/ocw-ui/frontend/test/spec/directives/bootstrapmodalopen.js
@@ -0,0 +1,33 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http: *www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+'use strict';
+
+describe('Directive: bootstrapModalOpen', function () {
+
+ // load the directive's module
+ beforeEach(module('ocwUiApp'));
+
+ var element,
+ scope;
+
+ beforeEach(inject(function ($rootScope) {
+ scope = $rootScope.$new();
+ }));
+});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/spec/directives/leafletmap.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/test/spec/directives/leafletmap.js b/ocw-ui/frontend/test/spec/directives/leafletmap.js
new file mode 100644
index 0000000..85ccc6d
--- /dev/null
+++ b/ocw-ui/frontend/test/spec/directives/leafletmap.js
@@ -0,0 +1,33 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http: *www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+'use strict';
+
+describe('Directive: leafletMap', function () {
+
+ // load the directive's module
+ beforeEach(module('ocwUiApp'));
+
+ var element,
+ scope;
+
+ beforeEach(inject(function ($rootScope) {
+ scope = $rootScope.$new();
+ }));
+});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/spec/directives/onblur.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/test/spec/directives/onblur.js b/ocw-ui/frontend/test/spec/directives/onblur.js
new file mode 100644
index 0000000..7e8b83a
--- /dev/null
+++ b/ocw-ui/frontend/test/spec/directives/onblur.js
@@ -0,0 +1,50 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http: *www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+'use strict';
+
+describe('Directive: onBlur', function () {
+
+ // load the directive's module
+ beforeEach(module('ocwUiApp'));
+
+ var element,
+ scope;
+
+ beforeEach(inject(function ($rootScope) {
+ scope = $rootScope.$new();
+ }));
+
+ it('should call the supplied function on the blur event', function() {
+ inject(function($compile) {
+ // Set a scope variable to make sure that on-blur calls
+ // the function that we pass to it.
+ scope.bogusFunction = function() {
+ scope.test = "hi"
+ }
+
+ var element = angular.element('<input on-blur="bogusFunction();" />')
+ element = $compile(element)(scope)
+
+ expect(scope.test).toNotBe('hi');
+ element.triggerHandler('blur');
+ expect(scope.test).toBe('hi');
+ });
+ });
+});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/spec/directives/predictivefilebrowserinput.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/test/spec/directives/predictivefilebrowserinput.js b/ocw-ui/frontend/test/spec/directives/predictivefilebrowserinput.js
new file mode 100644
index 0000000..162b361
--- /dev/null
+++ b/ocw-ui/frontend/test/spec/directives/predictivefilebrowserinput.js
@@ -0,0 +1,33 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http: *www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+'use strict';
+
+describe('Directive: predictiveFileBrowserInput', function () {
+
+ // load the directive's module
+ beforeEach(module('ocwUiApp'));
+
+ var element,
+ scope;
+
+ beforeEach(inject(function ($rootScope) {
+ scope = $rootScope.$new();
+ }));
+});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/spec/directives/previewmap.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/test/spec/directives/previewmap.js b/ocw-ui/frontend/test/spec/directives/previewmap.js
new file mode 100644
index 0000000..2a831c6
--- /dev/null
+++ b/ocw-ui/frontend/test/spec/directives/previewmap.js
@@ -0,0 +1,53 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http: *www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+'use strict';
+
+describe('Directive: previewMap', function () {
+
+ // load the directive's module
+ beforeEach(module('ocwUiApp'));
+
+ var element,
+ scope;
+
+ beforeEach(inject(function ($rootScope) {
+ scope = $rootScope.$new();
+ }));
+
+ it('should set the proper class', function() {
+ inject(function($compile, $rootScope) {
+ $rootScope.dataset = {latlonVals: {latMax: 90, lonMax: 90, latMin: -90, lonMin: -90}, name: "TRMM"};
+
+ var element = $compile('<div preview-map="dataset"></div>')($rootScope);
+
+ expect(element.hasClass("preview-map")).toBeTruthy();
+ });
+ });
+
+ it('should set the id of the template to the name of the dataset', function() {
+ inject(function($compile, $rootScope) {
+ $rootScope.dataset = {latlonVals: {latMax: 90, lonMax: 90, latMin: -90, lonMin: -90}, name: "TRMM"};
+
+ var element = $compile('<div preview-map="dataset"></div>')($rootScope);
+
+ expect(element.attr('id')).toEqual("{{dataset.name}}");
+ });
+ });
+});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/spec/directives/timeline.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/test/spec/directives/timeline.js b/ocw-ui/frontend/test/spec/directives/timeline.js
new file mode 100644
index 0000000..06c72e1
--- /dev/null
+++ b/ocw-ui/frontend/test/spec/directives/timeline.js
@@ -0,0 +1,33 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http: *www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+'use strict';
+
+describe('Directive: timeline', function () {
+
+ // load the directive's module
+ beforeEach(module('ocwUiApp'));
+
+ var element,
+ scope;
+
+ beforeEach(inject(function ($rootScope) {
+ scope = $rootScope.$new();
+ }));
+});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/spec/filters/isodatetomiddleendian.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/test/spec/filters/isodatetomiddleendian.js b/ocw-ui/frontend/test/spec/filters/isodatetomiddleendian.js
new file mode 100644
index 0000000..966b333
--- /dev/null
+++ b/ocw-ui/frontend/test/spec/filters/isodatetomiddleendian.js
@@ -0,0 +1,76 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http: *www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+'use strict';
+
+describe('Filter: ISODateToMiddleEndian', function () {
+
+ // load the filter's module
+ beforeEach(module('ocwUiApp'));
+
+ // initialize a new instance of the filter before each test
+ var ISODateToMiddleEndian;
+ beforeEach(inject(function ($filter) {
+ ISODateToMiddleEndian = $filter('ISODateToMiddleEndian');
+ }));
+
+ describe('ISODateToMiddleEndian', function() {
+ it('should replace the ISO Date/Time stamp', function() {
+ inject(function($filter) {
+ var filter = $filter('ISODateToMiddleEndian');
+ expect(filter('2012-01-02T00:00:00')).toEqual('01/02/2012');
+ });
+ });
+
+ it('should replace the modified ISO Date/Time stamp', function() {
+ inject(function($filter) {
+ var filter = $filter('ISODateToMiddleEndian');
+ expect(filter('2012-01-02 00:00:00')).toEqual('01/02/2012');
+ });
+ });
+
+ it('should replace the ISO Date stamp', function() {
+ inject(function($filter) {
+ var filter = $filter('ISODateToMiddleEndian');
+ expect(filter('2012-01-02')).toEqual('01/02/2012');
+ });
+ });
+
+ it('should replace leading and trailing whitespace', function() {
+ inject(function($filter) {
+ var filter = $filter('ISODateToMiddleEndian');
+ expect(filter(' 2012-01-02T00:00:00 ')).toEqual('01/02/2012');
+ });
+ });
+
+ it('should do nothing when the date format has the incorrect number of hyphens', function() {
+ inject(function($filter) {
+ var filter = $filter('ISODateToMiddleEndian');
+ expect(filter('2012-234T234')).toEqual('2012-234T234')
+ });
+ });
+
+ it('should do nothing when the date format has no hyphens', function() {
+ inject(function($filter) {
+ var filter = $filter('ISODateToMiddleEndian');
+ expect(filter('2012234T234')).toEqual('2012234T234')
+ });
+ });
+ });
+});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/spec/services/evaluationsettings.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/test/spec/services/evaluationsettings.js b/ocw-ui/frontend/test/spec/services/evaluationsettings.js
new file mode 100644
index 0000000..01fa63b
--- /dev/null
+++ b/ocw-ui/frontend/test/spec/services/evaluationsettings.js
@@ -0,0 +1,44 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http: *www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+'use strict';
+
+describe('Service: evaluationSettings', function () {
+
+ // load the service's module
+ beforeEach(module('ocwUiApp'));
+
+ // instantiate service
+ var evaluationSettings;
+ beforeEach(inject(function (_evaluationSettings_) {
+ evaluationSettings = _evaluationSettings_;
+ }));
+
+ it('should initialize the evaluationSettings service', function() {
+ inject(function(evaluationSettings) {
+ expect(evaluationSettings).not.toEqual(null);
+ });
+ });
+
+ it('should provide a getSettings function', function() {
+ inject(function(evaluationSettings) {
+ expect(evaluationSettings.getSettings()).not.toEqual(null);
+ })
+ })
+});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/spec/services/regionselectparams.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/test/spec/services/regionselectparams.js b/ocw-ui/frontend/test/spec/services/regionselectparams.js
new file mode 100644
index 0000000..34cfe54
--- /dev/null
+++ b/ocw-ui/frontend/test/spec/services/regionselectparams.js
@@ -0,0 +1,44 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http: *www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+'use strict';
+
+describe('Service: regionSelectParams', function () {
+
+ // load the service's module
+ beforeEach(module('ocwUiApp'));
+
+ // instantiate service
+ var regionSelectParams;
+ beforeEach(inject(function (_regionSelectParams_) {
+ regionSelectParams = _regionSelectParams_;
+ }));
+
+ it('should initialize the regionSelectParams service', function() {
+ inject(function(regionSelectParams) {
+ expect(regionSelectParams).not.toEqual(null);
+ });
+ });
+
+ it('should provide the getParameters function', function() {
+ inject(function(regionSelectParams) {
+ expect(regionSelectParams.getParameters()).not.toEqual(null);
+ });
+ });
+});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/spec/services/selecteddatasetinformation.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/test/spec/services/selecteddatasetinformation.js b/ocw-ui/frontend/test/spec/services/selecteddatasetinformation.js
new file mode 100644
index 0000000..60c1ac2
--- /dev/null
+++ b/ocw-ui/frontend/test/spec/services/selecteddatasetinformation.js
@@ -0,0 +1,92 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http: *www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+'use strict';
+
+describe('Service: selectedDatasetInformation', function () {
+
+ // load the service's module
+ beforeEach(module('ocwUiApp'));
+
+ // instantiate service
+ var selectedDatasetInformation;
+ beforeEach(inject(function (_selectedDatasetInformation_) {
+ selectedDatasetInformation = _selectedDatasetInformation_;
+ }));
+
+ it('should initialize the selectedDatasetInformation service', function() {
+ inject(function(selectedDatasetInformation) {
+ expect(selectedDatasetInformation).not.toEqual(null);
+ });
+ });
+
+ it('should provide the getDatasets function', function() {
+ inject(function(selectedDatasetInformation) {
+ expect(selectedDatasetInformation.getDatasets()).not.toEqual(null);
+ });
+ });
+
+ it('should provide the getDatasetCount function', function() {
+ inject(function(selectedDatasetInformation) {
+ expect(selectedDatasetInformation.getDatasetCount()).toEqual(0);
+ });
+ });
+
+ it('should provide the addDataset function', function() {
+ inject(function(selectedDatasetInformation) {
+ selectedDatasetInformation.addDataset({});
+ expect(selectedDatasetInformation.getDatasetCount()).toEqual(1);
+ });
+ });
+
+ it('should set the shouldDisplay attribute when adding a dataset', function() {
+ inject(function(selectedDatasetInformation) {
+ selectedDatasetInformation.addDataset({});
+ expect(selectedDatasetInformation.getDatasets()[0].shouldDisplay).toBe(false);
+ });
+ });
+
+ it('should set the regrid attribute when adding a dataset', function() {
+ inject(function(selectedDatasetInformation) {
+ selectedDatasetInformation.addDataset({});
+ expect(selectedDatasetInformation.getDatasets()[0].regrid).toBe(false);
+ });
+ });
+
+ it('should provide the removeDataset function', function() {
+ inject(function(selectedDatasetInformation) {
+ selectedDatasetInformation.addDataset(1);
+ selectedDatasetInformation.addDataset(2);
+
+ expect(selectedDatasetInformation.getDatasets()[0]).toEqual(1);
+ selectedDatasetInformation.removeDataset(0);
+ expect(selectedDatasetInformation.getDatasets()[0]).toEqual(2);
+ });
+ });
+
+ it('should provide the clearDatasets function', function() {
+ inject(function(selectedDatasetInformation) {
+ selectedDatasetInformation.addDataset({});
+ expect(selectedDatasetInformation.getDatasetCount()).toEqual(1);
+
+ selectedDatasetInformation.clearDatasets();
+ expect(selectedDatasetInformation.getDatasetCount()).toEqual(0);
+ });
+ });
+});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/unit/controllers/DatasetDisplayCtrlTest.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/test/unit/controllers/DatasetDisplayCtrlTest.js b/ocw-ui/frontend/test/unit/controllers/DatasetDisplayCtrlTest.js
deleted file mode 100644
index b6fe620..0000000
--- a/ocw-ui/frontend/test/unit/controllers/DatasetDisplayCtrlTest.js
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
-**/
-
-'use strict';
-
-describe('OCW Controllers', function() {
-
- beforeEach(module('ocw.controllers'));
- beforeEach(module('ocw.services'));
-
- describe('DatasetDisplayCtrl', function() {
- it('should initialize the removeDataset function', function() {
- inject(function($rootScope, $controller) {
- var scope = $rootScope.$new();
- var ctrl = $controller("DatasetDisplayCtrl", {$scope: scope});
-
- scope.datasets.push(1);
- scope.datasets.push(2);
-
- expect(scope.datasets[0]).toBe(1);
-
- scope.removeDataset(0);
-
- expect(scope.datasets[0]).toBe(2);
- });
- });
-
- it('should initialize the setRegridBase function', function() {
- inject(function($rootScope, $controller) {
- var scope = $rootScope.$new();
- var ctrl = $controller("DatasetDisplayCtrl", {$scope: scope});
-
- scope.datasets.push({regrid: false});
- scope.datasets.push({regrid: true});
- scope.datasets.push({regrid: true});
- scope.datasets.push({regrid: false});
-
- expect(scope.datasets[1].regrid).toBe(true);
- expect(scope.datasets[2].regrid).toBe(true);
-
- // setRegridBase should set all indices to 'false' if if it's not the passed index
- scope.setRegridBase(2);
-
- expect(scope.datasets[1].regrid).toBe(false);
- expect(scope.datasets[2].regrid).toBe(true);
- });
- });
- });
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/unit/controllers/DatasetSelectCtrlTest.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/test/unit/controllers/DatasetSelectCtrlTest.js b/ocw-ui/frontend/test/unit/controllers/DatasetSelectCtrlTest.js
deleted file mode 100644
index 7091562..0000000
--- a/ocw-ui/frontend/test/unit/controllers/DatasetSelectCtrlTest.js
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
-**/
-
-'use strict';
-
-describe('OCW Controllers', function() {
-
- beforeEach(module('ocw.controllers'));
- beforeEach(module('ocw.services'));
-
- describe('DatasetSelectCtrl', function() {
- it('should initialize the disable clear button function', function() {
- inject(function($rootScope, $controller, selectedDatasetInformation) {
- var scope = $rootScope.$new();
- var ctrl = $controller('DatasetSelectCtrl', {$scope: scope});
-
- expect(scope.shouldDisableClearButton()).toBe(true);
- selectedDatasetInformation.addDataset({});
- expect(scope.shouldDisableClearButton()).toBe(false);
- });
- });
-
- it('should initialize the clear datasets function', function() {
- inject(function($rootScope, $controller, selectedDatasetInformation) {
- var scope = $rootScope.$new();
- var ctrl = $controller('DatasetSelectCtrl', {$rootScope: $rootScope, $scope: scope});
-
- selectedDatasetInformation.addDataset({});
- expect(selectedDatasetInformation.getDatasetCount()).toBe(1);
- scope.clearDatasets();
- expect(selectedDatasetInformation.getDatasetCount()).toBe(0);
- });
- });
- });
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/unit/controllers/ObservationSelectCtrlTest.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/test/unit/controllers/ObservationSelectCtrlTest.js b/ocw-ui/frontend/test/unit/controllers/ObservationSelectCtrlTest.js
deleted file mode 100644
index e076eb0..0000000
--- a/ocw-ui/frontend/test/unit/controllers/ObservationSelectCtrlTest.js
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
-**/
-
-'use strict';
-
-describe('OCW Controllers', function() {
-
- beforeEach(module('ocw.controllers'));
- beforeEach(module('ocw.services'));
-
- describe('ObservationSelectCtrl', function() {
- it('should grab the default set of selected datasets from the service', function() {
- inject(function($httpBackend, $rootScope, $controller) {
- $rootScope.baseURL = "http://localhost:8082"
- $httpBackend.expectJSONP($rootScope.baseURL + '/getPathLeader/?callback=JSON_CALLBACK').
- respond(200, {'leader': '/usr/local/rcmes'});
-
- var scope = $rootScope.$new();
- var ctrl = $controller("ObservationSelectCtrl", {$scope: scope});
- $httpBackend.flush();
-
- expect(typeof scope.datasetCount).toBe('object');
- expect(Object.keys(scope.datasetCount).length).toBe(0);
- });
- });
-
- it('should initialize option arrays and default to the first element', function() {
- inject(function($httpBackend, $rootScope, $controller) {
- $rootScope.baseURL = "http://localhost:8082"
- $httpBackend.expectJSONP($rootScope.baseURL + '/getPathLeader/?callback=JSON_CALLBACK').
- respond(200, {'leader': '/usr/local/rcmes'});
-
- var scope = $rootScope.$new();
- var ctrl = $controller("ObservationSelectCtrl", {$scope: scope});
- $httpBackend.flush();
-
- expect(scope.params.length).toBe(1);
- expect(scope.lats.length).toBe(1);
- expect(scope.lons.length).toBe(1);
- expect(scope.times.length).toBe(1);
-
- expect(scope.params[0]).toEqual("Please select a file above");
- expect(scope.lats[0]).toEqual("Please select a file above");
- expect(scope.lons[0]).toEqual("Please select a file above");
- expect(scope.times[0]).toEqual("Please select a file above");
- });
- });
-
- it('should initialize scope attributes properly', function() {
- inject(function($httpBackend, $rootScope, $controller) {
- $rootScope.baseURL = "http://localhost:8082"
- $httpBackend.expectJSONP($rootScope.baseURL + '/getPathLeader/?callback=JSON_CALLBACK').
- respond(200, {'leader': '/usr/local/rcmes'});
-
- var scope = $rootScope.$new();
- var ctrl = $controller("ObservationSelectCtrl", {$scope: scope});
- $httpBackend.flush();
-
- expect(scope.pathLeader).toEqual('/usr/local/rcmes');
- expect(scope.loadingFile).toBe(false);
- expect(scope.fileAdded).toBe(false);
- expect(typeof scope.latLonVals).toEqual('object');
- expect(scope.latLonVals.length).toBe(0);
- expect(typeof scope.timeVals).toEqual('object');
- expect(scope.timeVals.length).toEqual(0);
- expect(typeof scope.localSelectForm).toEqual('object');
- expect(Object.keys(scope.localSelectForm).length).toEqual(0);
- });
- });
-
- it('should initialize the uploadLocalFile function', function() {
- inject(function($httpBackend, $rootScope, $controller) {
- $rootScope.baseURL = "http://localhost:8082"
- $httpBackend.expectJSONP($rootScope.baseURL + '/getPathLeader/?callback=JSON_CALLBACK').
- respond(200, {'leader': '/usr/local/rcmes'});
-
- var scope = $rootScope.$new();
- var ctrl = $controller("ObservationSelectCtrl", {$scope: scope});
- $httpBackend.flush();
-
- $httpBackend.expectJSONP($rootScope.baseURL + '/list/vars/"/usr/local/rcmesundefined"?callback=JSON_CALLBACK').
- respond(200, {"variables": ["lat", "lon", "prec", "time" ]});
- $httpBackend.expectJSONP($rootScope.baseURL + '/list/latlon/"/usr/local/rcmesundefined"?callback=JSON_CALLBACK').
- respond(200, {'latMax': '75.25', 'success': 1, 'latname': 'lat', 'lonMax': '-29.75', 'lonMin': '-159.75', 'lonname': 'lon', 'latMin': '15.25'});
- $httpBackend.expectJSONP($rootScope.baseURL + '/list/time/"/usr/local/rcmesundefined"?callback=JSON_CALLBACK').
- respond(200, {"start_time": "1980-01-01 00:00:00", "timename": "time", "success": 1, "end_time": "2004-12-01 00:00:00"});
-
- scope.uploadLocalFile();
- $httpBackend.flush();
-
- expect(scope.latsSelect).toEqual("lat");
- expect(scope.lonsSelect).toEqual("lon");
- expect(scope.timeSelect).toEqual("time");
- expect(scope.paramSelect).toEqual("prec");
-
- // Simulate failure on one of the backend calls. Should
- $httpBackend.expectJSONP($rootScope.baseURL + '/list/vars/"/usr/local/rcmesundefined"?callback=JSON_CALLBACK').
- respond(200, {});
- $httpBackend.expectJSONP($rootScope.baseURL + '/list/latlon/"/usr/local/rcmesundefined"?callback=JSON_CALLBACK').
- respond(404, {});
- $httpBackend.expectJSONP($rootScope.baseURL + '/list/time/"/usr/local/rcmesundefined"?callback=JSON_CALLBACK').
- respond(200, {});
-
- scope.uploadLocalFile();
- $httpBackend.flush();
-
- expect(scope.paramSelect).toEqual("Unable to load variable(s)");
- expect(scope.params.length).toEqual(1);
- expect(scope.latsSelect).toEqual("Unable to load variable(s)");
- expect(scope.lats.length).toEqual(1);
- expect(scope.lonsSelect).toEqual("Unable to load variable(s)");
- expect(scope.lons.length).toEqual(1);
- expect(scope.timeSelect).toEqual("Unable to load variable(s)");
- expect(scope.times.length).toEqual(1);
- });
- });
-
- it('should initialize the addDatasets function', function() {
- inject(function($httpBackend, $rootScope, $controller) {
- $rootScope.baseURL = "http://localhost:8082"
- $httpBackend.expectJSONP($rootScope.baseURL + '/getPathLeader/?callback=JSON_CALLBACK').
- respond(200, {'leader': '/usr/local/rcmes'});
-
- var scope = $rootScope.$new();
- var ctrl = $controller("ObservationSelectCtrl", {$scope: scope});
- $httpBackend.flush();
-
- // Add a bunch of bogus data as a dataset
- scope.addDataSet();
-
- expect(scope.datasetCount.length).toBe(1);
- });
- });
- });
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/unit/controllers/ParameterSelectCtrlTest.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/test/unit/controllers/ParameterSelectCtrlTest.js b/ocw-ui/frontend/test/unit/controllers/ParameterSelectCtrlTest.js
deleted file mode 100644
index 6845245..0000000
--- a/ocw-ui/frontend/test/unit/controllers/ParameterSelectCtrlTest.js
+++ /dev/null
@@ -1,269 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
-**/
-
-'use strict';
-
-describe('OCW Controllers', function() {
-
- beforeEach(module('ocw.controllers'));
- beforeEach(module('ocw.services'));
-
-
- describe('ParameterSelectCtrl', function() {
- it('should initialize spatial and temporal range default values properly', function() {
- inject(function($rootScope, $controller) {
- var scope = $rootScope.$new();
- var ctrl = $controller("ParameterSelectCtrl", {$scope: scope});
-
- expect(scope.latMin).toBe(-90);
- expect(scope.latMax).toBe(90);
- expect(scope.lonMin).toBe(-180);
- expect(scope.lonMax).toBe(180);
- expect(scope.start).toBe("1980-01-01 00:00:00");
- expect(scope.end).toBe("2030-01-01 00:00:00");
- });
- });
-
- it('should grab the default set of selected datasets from the service', function() {
- inject(function($rootScope, $controller) {
- var scope = $rootScope.$new();
- var ctrl = $controller("ParameterSelectCtrl", {$scope: scope});
-
- // We should get an object with no keys since the user hasn't selected any
- // datasets by default. Object.keys returns an array of all the user defined
- // keys in the object.
- expect(typeof scope.datasets).toBe('object');
- expect(Object.keys(scope.datasets).length).toBe(0);
- });
- });
-
- it('should grab the default region select param object from the regionSelectParams service', function() {
- inject(function($rootScope, $controller) {
- var scope = $rootScope.$new();
- var ctrl = $controller("ParameterSelectCtrl", {$scope: scope});
-
- // The default display values aren't going to be changing any time soon. This test
- // is a bit of a duplicate since this is really testing functionality of the service.
- // Can't hurt to make sure that we're getting results though!
- expect(typeof scope.displayParams).toBe('object');
- expect(Object.keys(scope.displayParams).length).toBe(7);
- });
- });
-
- it('should initialize misc. values properly', function() {
- inject(function($rootScope, $controller) {
- var scope = $rootScope.$new();
- var ctrl = $controller("ParameterSelectCtrl", {$scope: scope});
-
- expect(scope.runningEval).toBe(false);
- expect(scope.areInUserRegridState).toBe(false);
- expect(scope.latSliderVal).toBe(0);
- expect(scope.lonSliderVal).toBe(0);
- });
- });
-
- it('should set the default datepicker settings', function() {
- inject(function($rootScope, $controller) {
- var scope = $rootScope.$new();
- var ctrl = $controller("ParameterSelectCtrl", {$scope: scope});
-
- // This tests the default values that get passed to the datepicker objects that we
- // initialize with a directive.
- expect(Object.keys(scope.datepickerSettings).length).toBe(2);
- expect(scope.datepickerSettings.changeMonth).toBe(true);
- expect(scope.datepickerSettings.changeYear).toBe(true);
- });
- });
-
- it('should define the slide "slide" callback functions', function() {
- inject(function($rootScope, $controller) {
- var scope = $rootScope.$new();
- var ctrl = $controller("ParameterSelectCtrl", {$scope: scope});
-
- expect(scope.latSliderVal).toBe(0);
- expect(scope.lonSliderVal).toBe(0);
- scope.updateLatSliderDisplayValue(1);
- scope.updateLonSliderDisplayValue(2);
- expect(scope.latSliderVal).toBe(1);
- expect(scope.lonSliderVal).toBe(2);
- });
- });
-
- it('should initialize the control disable function', function() {
- inject(function($rootScope, $controller) {
- var scope = $rootScope.$new();
- var ctrl = $controller("ParameterSelectCtrl", {$scope: scope});
-
- expect(scope.shouldDisableControls()).toBe(true);
- // Add to dummy values to datasets to make sure the disable function
- // triggers properly.
- scope.datasets.push(1);
- scope.datasets.push(2);
- expect(scope.shouldDisableControls()).toBe(false);
- });
- });
-
- it('should initialize the disable evaluation button function', function() {
- inject(function($rootScope, $controller) {
- var scope = $rootScope.$new();
- var ctrl = $controller("ParameterSelectCtrl", {$scope: scope});
-
- expect(scope.shouldDisableEvaluateButton()).toBe(true);
- scope.datasets.push(1);
- expect(scope.shouldDisableEvaluateButton()).toBe(true);
- scope.datasets.push(2);
- expect(scope.shouldDisableEvaluateButton()).toBe(false);
- scope.runningEval = true;
- expect(scope.shouldDisableEvaluateButton()).toBe(true);
- });
- });
-
- it('should initialize the disable results view function', function() {
- inject(function($rootScope, $controller) {
- $rootScope.evalResults = "";
- var scope = $rootScope.$new();
- var ctrl = $controller("ParameterSelectCtrl", {$rootScope: $rootScope, $scope: scope});
-
- expect(scope.shouldDisableResultsView()).toBe(true);
-
- // Set evalResults to something other than the default value
- $rootScope.evalResults = "this is not an empty string";
-
- expect(scope.shouldDisableResultsView()).toBe(false);
- });
- });
-
- it('should initialize the check parameters function', function() {
- inject(function($rootScope, $controller) {
- var scope = $rootScope.$new();
- var ctrl = $controller("ParameterSelectCtrl", {$scope: scope});
-
- // Set the displayParams values to be "out of bounds" values so checkParams
- // adjusts them properly.
- scope.displayParams.latMin = "-95";
- scope.displayParams.latMax = "95";
- scope.displayParams.lonMin = "-185";
- scope.displayParams.lonMax = "185";
- scope.displayParams.start = "1980-00-00 00:00:00";
- scope.displayParams.end = "2031-01-01 00:00:00";
-
- // If we don't remove the watch on datasets we end up with displayParam values
- // all being undefined (but only during testing, which is odd...)
- scope.unwatchDatasets();
- scope.checkParameters();
-
- expect(scope.displayParams.latMin).toBe(-90);
- expect(scope.displayParams.latMax).toBe(90);
- expect(scope.displayParams.lonMin).toBe(-180);
- expect(scope.displayParams.lonMax).toBe(180);
- expect(scope.displayParams.start).toBe('1980-01-01 00:00:00');
- expect(scope.displayParams.end).toBe('2030-01-01 00:00:00');
- });
- });
-
- it('should properly set the results of running an evaluation', function() {
- inject(function($rootScope, $controller, $httpBackend) {
- var scope = $rootScope.$new();
- var ctrl = $controller("ParameterSelectCtrl", {$scope: scope});
-
- // Seed rootScope with a known URL for test queries and holder for eval results
- $rootScope.baseURL = "http://localhost:9876";
- $rootScope.evalResults = {};
-
- // Seed the displayParams so the query is properly formatted
- scope.displayParams.lonMin = -180;
- scope.displayParams.lonMax = 180;
- scope.displayParams.latMin = -90;
- scope.displayParams.latMax = 90;
- scope.displayParams.start = "1980-01-01";
- scope.displayParams.end = "2030-01-01";
-
- // The expected URL string that the frontend generates given this example set
- var urlString = "http://localhost:9876/rcmes/run/?" +
- "callback=JSON_CALLBACK&" +
- "endTime=2030-01-01%2000%3A00%3A00&" +
- "filelist=%2Fusr%2Flocal%2Frcmes%2FmodelsForUI%2Fprec.HRM3.ncep.monavg.nc&" +
- "latMax=90&" +
- "latMin=-90&" +
- "lonMax=180&" +
- "lonMin=-180&" +
- "metricOption=bias&" +
- "modelLatVarName=lat&" +
- "modelLonVarName=lon&" +
- "modelTimeVarName=time&" +
- "modelVarName=prec&" +
- "obsDatasetId=3&" +
- "obsParameterId=36&" +
- "regridOption=model&" +
- "startTime=1980-01-01%2000%3A00%3A00&" +
- "timeRegridOption=monthly";
-
- // Example dataset configuration for the test.
- scope.datasets = [
- {
- "isObs" : 1,
- "id" : "3",
- "name" : "Tropical Rainfall Measuring Mission Dataset",
- "param" : "36",
- "paramName" : "TRMM v.6 Monthly Precipitation",
- "latlonVals" : {"latMin" : -90, "latMax" : 90, "lonMin" : -180, "lonMax" : 180},
- "lat" : "N/A",
- "lon" : "N/A",
- "timeVals" : {"start" : "1998-01-01 00:00:00",
- "end" : "2010-01-01 00:00:00"},
- "time" : "N/A",
- "shouldDisplay" : true,
- "regrid" : false
- },{
- "isObs" : 0,
- "id" : "/usr/local/rcmes/modelsForUI/prec.HRM3.ncep.monavg.nc",
- "name" : "prec.HRM3.ncep.monavg.nc",
- "param" : "prec",
- "paramName" : "prec",
- "lat" : "lat",
- "lon" : "lon",
- "latlonVals" : {"latMin" : "15.25",
- "latMax" : "75.25",
- "lonMin" : "-159.75",
- "lonMax" : "-29.75"},
- "time" : "time",
- "timeVals" : {"start":"1980-01-01 00:00:00",
- "end" : "2004-12-01 00:00:00"},
- "shouldDisplay" : true,
- "regrid" : false
- }
- ];
-
- // Mock return URLs that the frontend will parse
- $httpBackend.expectJSONP(urlString).respond(200,
- {'comparisonPath': '/fake/path1',
- 'modelPath': '/fake/path2',
- 'obsPath': '/fake/path3'});
-
-
- scope.runEvaluation();
- $httpBackend.flush();
-
- expect($rootScope.evalResults.comparisonPath).toBe('path1');
- expect($rootScope.evalResults.modelPath).toBe('path2');
- expect($rootScope.evalResults.obsPath).toBe('path3');
- });
- });
- });
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/unit/controllers/RcmedSelectionCtrlTest.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/test/unit/controllers/RcmedSelectionCtrlTest.js b/ocw-ui/frontend/test/unit/controllers/RcmedSelectionCtrlTest.js
deleted file mode 100644
index 3279ecc..0000000
--- a/ocw-ui/frontend/test/unit/controllers/RcmedSelectionCtrlTest.js
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
-**/
-
-'use strict';
-
-describe('OCW Controllers', function() {
-
- beforeEach(module('ocw.controllers'));
- beforeEach(module('ocw.services'));
-
- describe('RcmedSelectionCtrl', function() {
- it('should automatically query RCMED on initialization', function() {
- inject(function($rootScope, $controller, $httpBackend) {
- $rootScope.baseURL = "http://localhost:8082"
- $httpBackend.expectJSONP($rootScope.baseURL + '/getObsDatasets?callback=JSON_CALLBACK').
- respond(200, [{longname: 1}, {longname: 2}]);
-
- var scope = $rootScope.$new();
- var ctrl = $controller("RcmedSelectionCtrl", {$scope: scope});
- $httpBackend.flush();
-
- expect(scope.availableObs.length).toBe(3);
- expect(scope.availableObs[0]).toEqual({longname: "Please select an option"});
- expect(scope.availableObs[1]).toEqual({longname: 1});
- });
- });
-
- it('should initialize the getObservations function', function() {
- inject(function($rootScope, $controller, $httpBackend) {
- $rootScope.baseURL = "http://localhost:8082"
- $httpBackend.expectJSONP($rootScope.baseURL + '/getObsDatasets?callback=JSON_CALLBACK').
- respond(200, [{longname: 1}, {longname: 2}]);
-
- var scope = $rootScope.$new();
- var ctrl = $controller("RcmedSelectionCtrl", {$scope: scope});
- $httpBackend.flush();
-
- expect(scope.availableObs.length).toBe(3);
- expect(scope.availableObs[0]).toEqual({longname: "Please select an option"});
- expect(scope.availableObs[1]).toEqual({longname: 1});
-
- // Set up a failed query
- $httpBackend.expectJSONP($rootScope.baseURL + '/getObsDatasets?callback=JSON_CALLBACK').
- respond(404);
- scope.getObservations();
- $httpBackend.flush();
-
- expect(scope.availableObs.length).toBe(1);
- expect(scope.availableObs[0]).toEqual('Unable to query RCMED');
-
- });
- });
-
- it('should initialze the getObservationTimeRange function', function() {
- inject(function($rootScope, $controller, $httpBackend) {
- $rootScope.baseURL = "http://localhost:8082"
- $httpBackend.expectJSONP($rootScope.baseURL + '/getObsDatasets?callback=JSON_CALLBACK').
- respond(200, [{longname: 1}, {longname: 2}]);
-
- var scope = $rootScope.$new();
- var ctrl = $controller("RcmedSelectionCtrl", {$scope: scope});
- $httpBackend.flush();
-
- expect(scope.getObservationTimeRange(1)).toEqual({'start' : '1989-01-01 00:00:00',
- 'end' : '2009-12-31 00:00:00'});
- expect(scope.getObservationTimeRange(-1)).toEqual(false);
- });
- });
-
- it('should initialize dataSelectUpdated function', function() {
- inject(function($rootScope, $controller, $httpBackend) {
- $rootScope.baseURL = "http://localhost:8082"
- $httpBackend.expectJSONP($rootScope.baseURL + '/getObsDatasets?callback=JSON_CALLBACK').
- respond(200, [{longname: 1}, {longname: 2}]);
-
- var scope = $rootScope.$new();
- var ctrl = $controller("RcmedSelectionCtrl", {$scope: scope});
- $httpBackend.flush();
-
- // Add the test dataset to our scope
- scope.datasetSelection = {shortname: 'TRMM'}
-
- // Test return with only single parameter
- $httpBackend.expectJSONP($rootScope.baseURL + '/getDatasetParam?dataset=' +
- scope.datasetSelection['shortname'] +
- '&callback=JSON_CALLBACK').
- respond(200, ['pcp']);
- scope.dataSelectUpdated();
- $httpBackend.flush();
-
- expect(scope.parameterSelection).toEqual('pcp');
-
- // Test return with multiple parameters
- $httpBackend.expectJSONP($rootScope.baseURL + '/getDatasetParam?dataset=' +
- scope.datasetSelection['shortname'] +
- '&callback=JSON_CALLBACK').
- respond(200, ['pcp', 'pcp2']);
- scope.dataSelectUpdated();
- $httpBackend.flush();
-
- expect(scope.parameterSelection).toEqual({shortname: 'Please select a parameter'});
- });
- });
-
- it('should initialze the addObservation function', function() {
- inject(function($rootScope, $controller, $httpBackend) {
- $rootScope.baseURL = "http://localhost:8082"
- $httpBackend.expectJSONP($rootScope.baseURL + '/getObsDatasets?callback=JSON_CALLBACK').
- respond(200, [{longname: 1}, {longname: 2}]);
-
- var scope = $rootScope.$new();
- var ctrl = $controller("RcmedSelectionCtrl", {$scope: scope});
- $httpBackend.flush();
-
- scope.datasetSelection = {
- "dataset_id" : "3",
- "shortname" : "TRMM",
- "longname" : "Tropical Rainfall Measuring Mission Dataset",
- "source" : "Readme for the Tropical Rainfall Measuring Mission (TRMM) Data Set"
- };
-
- scope.parameterSelection = {
- "parameter_id":"36",
- "shortname":"pcp",
- "datasetshortname":"TRMM",
- "longname":"TRMM v.6 Monthly Precipitation",
- "units":"mm\/day"
- };
-
- // addObservations does a refresh of the selections with a re-query of the backend
- // so we need to catch that call!
- $httpBackend.expectJSONP($rootScope.baseURL + '/getObsDatasets?callback=JSON_CALLBACK').
- respond(200, [{longname: 1}, {longname: 2}]);
-
- scope.addObservation();
- $httpBackend.flush();
-
- expect(scope.datasetCount.length).toBe(1);
- // The selection observation should be reset so we shouldn't have
- // any selected observation parameters.
- expect(scope.retrievedObsParams).toEqual([]);
- });
- });
- });
-});
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/unit/controllers/SettingsCtrlTest.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/test/unit/controllers/SettingsCtrlTest.js b/ocw-ui/frontend/test/unit/controllers/SettingsCtrlTest.js
deleted file mode 100644
index 12c133d..0000000
--- a/ocw-ui/frontend/test/unit/controllers/SettingsCtrlTest.js
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
-**/
-
-'use strict';
-
-describe('OCW Controllers', function() {
-
- beforeEach(module('ocw.controllers'));
- beforeEach(module('ocw.services'));
-
- describe('SettingsCtrl', function() {
- it('should initialize settings object from evaluationSettings service', function() {
- inject(function($rootScope, $controller) {
- var scope = $rootScope.$new();
- var ctrl = $controller("SettingsCtrl", {$scope: scope});
-
- expect(Object.keys(scope.settings)).toEqual(["metrics", "temporal", "spatialSelect"]);
- });
- });
-
- it('should pull the dataset information', function() {
- inject(function($rootScope, $controller) {
- var scope = $rootScope.$new();
- var ctrl = $controller("SettingsCtrl", {$scope: scope});
-
- expect(typeof scope.datasets).toBe('object');
- expect(Object.keys(scope.datasets).length).toBe(0);
- });
- });
- });
-});
[15/28] CLIMATE-512 - Replace frontend with new Yeoman/Grunt/Bower
frontend
Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/js/lib/angular/angular.min.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/js/lib/angular/angular.min.js b/ocw-ui/frontend/app/js/lib/angular/angular.min.js
deleted file mode 100755
index 07ea01c..0000000
--- a/ocw-ui/frontend/app/js/lib/angular/angular.min.js
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- AngularJS v1.0.5
- (c) 2010-2012 Google, Inc. http://angularjs.org
- License: MIT
-*/
-(function(X,Y,q){'use strict';function n(b,a,c){var d;if(b)if(H(b))for(d in b)d!="prototype"&&d!="length"&&d!="name"&&b.hasOwnProperty(d)&&a.call(c,b[d],d);else if(b.forEach&&b.forEach!==n)b.forEach(a,c);else if(!b||typeof b.length!=="number"?0:typeof b.hasOwnProperty!="function"&&typeof b.constructor!="function"||b instanceof L||ca&&b instanceof ca||xa.call(b)!=="[object Object]"||typeof b.callee==="function")for(d=0;d<b.length;d++)a.call(c,b[d],d);else for(d in b)b.hasOwnProperty(d)&&a.call(c,b[d],
-d);return b}function mb(b){var a=[],c;for(c in b)b.hasOwnProperty(c)&&a.push(c);return a.sort()}function fc(b,a,c){for(var d=mb(b),e=0;e<d.length;e++)a.call(c,b[d[e]],d[e]);return d}function nb(b){return function(a,c){b(c,a)}}function ya(){for(var b=aa.length,a;b;){b--;a=aa[b].charCodeAt(0);if(a==57)return aa[b]="A",aa.join("");if(a==90)aa[b]="0";else return aa[b]=String.fromCharCode(a+1),aa.join("")}aa.unshift("0");return aa.join("")}function v(b){n(arguments,function(a){a!==b&&n(a,function(a,d){b[d]=
-a})});return b}function E(b){return parseInt(b,10)}function za(b,a){return v(new (v(function(){},{prototype:b})),a)}function C(){}function na(b){return b}function I(b){return function(){return b}}function w(b){return typeof b=="undefined"}function x(b){return typeof b!="undefined"}function M(b){return b!=null&&typeof b=="object"}function A(b){return typeof b=="string"}function Ra(b){return typeof b=="number"}function oa(b){return xa.apply(b)=="[object Date]"}function B(b){return xa.apply(b)=="[object Array]"}
-function H(b){return typeof b=="function"}function pa(b){return b&&b.document&&b.location&&b.alert&&b.setInterval}function O(b){return A(b)?b.replace(/^\s*/,"").replace(/\s*$/,""):b}function gc(b){return b&&(b.nodeName||b.bind&&b.find)}function Sa(b,a,c){var d=[];n(b,function(b,g,h){d.push(a.call(c,b,g,h))});return d}function Aa(b,a){if(b.indexOf)return b.indexOf(a);for(var c=0;c<b.length;c++)if(a===b[c])return c;return-1}function Ta(b,a){var c=Aa(b,a);c>=0&&b.splice(c,1);return a}function U(b,a){if(pa(b)||
-b&&b.$evalAsync&&b.$watch)throw Error("Can't copy Window or Scope");if(a){if(b===a)throw Error("Can't copy equivalent objects or arrays");if(B(b))for(var c=a.length=0;c<b.length;c++)a.push(U(b[c]));else for(c in n(a,function(b,c){delete a[c]}),b)a[c]=U(b[c])}else(a=b)&&(B(b)?a=U(b,[]):oa(b)?a=new Date(b.getTime()):M(b)&&(a=U(b,{})));return a}function hc(b,a){var a=a||{},c;for(c in b)b.hasOwnProperty(c)&&c.substr(0,2)!=="$$"&&(a[c]=b[c]);return a}function ga(b,a){if(b===a)return!0;if(b===null||a===
-null)return!1;if(b!==b&&a!==a)return!0;var c=typeof b,d;if(c==typeof a&&c=="object")if(B(b)){if((c=b.length)==a.length){for(d=0;d<c;d++)if(!ga(b[d],a[d]))return!1;return!0}}else if(oa(b))return oa(a)&&b.getTime()==a.getTime();else{if(b&&b.$evalAsync&&b.$watch||a&&a.$evalAsync&&a.$watch||pa(b)||pa(a))return!1;c={};for(d in b)if(!(d.charAt(0)==="$"||H(b[d]))){if(!ga(b[d],a[d]))return!1;c[d]=!0}for(d in a)if(!c[d]&&d.charAt(0)!=="$"&&a[d]!==q&&!H(a[d]))return!1;return!0}return!1}function Ua(b,a){var c=
-arguments.length>2?ha.call(arguments,2):[];return H(a)&&!(a instanceof RegExp)?c.length?function(){return arguments.length?a.apply(b,c.concat(ha.call(arguments,0))):a.apply(b,c)}:function(){return arguments.length?a.apply(b,arguments):a.call(b)}:a}function ic(b,a){var c=a;/^\$+/.test(b)?c=q:pa(a)?c="$WINDOW":a&&Y===a?c="$DOCUMENT":a&&a.$evalAsync&&a.$watch&&(c="$SCOPE");return c}function da(b,a){return JSON.stringify(b,ic,a?" ":null)}function ob(b){return A(b)?JSON.parse(b):b}function Va(b){b&&b.length!==
-0?(b=y(""+b),b=!(b=="f"||b=="0"||b=="false"||b=="no"||b=="n"||b=="[]")):b=!1;return b}function qa(b){b=u(b).clone();try{b.html("")}catch(a){}var c=u("<div>").append(b).html();try{return b[0].nodeType===3?y(c):c.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(a,b){return"<"+y(b)})}catch(d){return y(c)}}function Wa(b){var a={},c,d;n((b||"").split("&"),function(b){b&&(c=b.split("="),d=decodeURIComponent(c[0]),a[d]=x(c[1])?decodeURIComponent(c[1]):!0)});return a}function pb(b){var a=[];n(b,function(b,
-d){a.push(Xa(d,!0)+(b===!0?"":"="+Xa(b,!0)))});return a.length?a.join("&"):""}function Ya(b){return Xa(b,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function Xa(b,a){return encodeURIComponent(b).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(a?null:/%20/g,"+")}function jc(b,a){function c(a){a&&d.push(a)}var d=[b],e,g,h=["ng:app","ng-app","x-ng-app","data-ng-app"],f=/\sng[:\-]app(:\s*([\w\d_]+);?)?\s/;n(h,function(a){h[a]=!0;c(Y.getElementById(a));
-a=a.replace(":","\\:");b.querySelectorAll&&(n(b.querySelectorAll("."+a),c),n(b.querySelectorAll("."+a+"\\:"),c),n(b.querySelectorAll("["+a+"]"),c))});n(d,function(a){if(!e){var b=f.exec(" "+a.className+" ");b?(e=a,g=(b[2]||"").replace(/\s+/g,",")):n(a.attributes,function(b){if(!e&&h[b.name])e=a,g=b.value})}});e&&a(e,g?[g]:[])}function qb(b,a){b=u(b);a=a||[];a.unshift(["$provide",function(a){a.value("$rootElement",b)}]);a.unshift("ng");var c=rb(a);c.invoke(["$rootScope","$rootElement","$compile","$injector",
-function(a,b,c,h){a.$apply(function(){b.data("$injector",h);c(b)(a)})}]);return c}function Za(b,a){a=a||"_";return b.replace(kc,function(b,d){return(d?a:"")+b.toLowerCase()})}function $a(b,a,c){if(!b)throw Error("Argument '"+(a||"?")+"' is "+(c||"required"));return b}function ra(b,a,c){c&&B(b)&&(b=b[b.length-1]);$a(H(b),a,"not a function, got "+(b&&typeof b=="object"?b.constructor.name||"Object":typeof b));return b}function lc(b){function a(a,b,e){return a[b]||(a[b]=e())}return a(a(b,"angular",Object),
-"module",function(){var b={};return function(d,e,g){e&&b.hasOwnProperty(d)&&(b[d]=null);return a(b,d,function(){function a(c,d,e){return function(){b[e||"push"]([c,d,arguments]);return k}}if(!e)throw Error("No module: "+d);var b=[],c=[],i=a("$injector","invoke"),k={_invokeQueue:b,_runBlocks:c,requires:e,name:d,provider:a("$provide","provider"),factory:a("$provide","factory"),service:a("$provide","service"),value:a("$provide","value"),constant:a("$provide","constant","unshift"),filter:a("$filterProvider",
-"register"),controller:a("$controllerProvider","register"),directive:a("$compileProvider","directive"),config:i,run:function(a){c.push(a);return this}};g&&i(g);return k})}})}function sb(b){return b.replace(mc,function(a,b,d,e){return e?d.toUpperCase():d}).replace(nc,"Moz$1")}function ab(b,a){function c(){var e;for(var b=[this],c=a,h,f,j,i,k,m;b.length;){h=b.shift();f=0;for(j=h.length;f<j;f++){i=u(h[f]);c?i.triggerHandler("$destroy"):c=!c;k=0;for(e=(m=i.children()).length,i=e;k<i;k++)b.push(ca(m[k]))}}return d.apply(this,
-arguments)}var d=ca.fn[b],d=d.$original||d;c.$original=d;ca.fn[b]=c}function L(b){if(b instanceof L)return b;if(!(this instanceof L)){if(A(b)&&b.charAt(0)!="<")throw Error("selectors not implemented");return new L(b)}if(A(b)){var a=Y.createElement("div");a.innerHTML="<div> </div>"+b;a.removeChild(a.firstChild);bb(this,a.childNodes);this.remove()}else bb(this,b)}function cb(b){return b.cloneNode(!0)}function sa(b){tb(b);for(var a=0,b=b.childNodes||[];a<b.length;a++)sa(b[a])}function ub(b,a,c){var d=
-ba(b,"events");ba(b,"handle")&&(w(a)?n(d,function(a,c){db(b,c,a);delete d[c]}):w(c)?(db(b,a,d[a]),delete d[a]):Ta(d[a],c))}function tb(b){var a=b[Ba],c=Ca[a];c&&(c.handle&&(c.events.$destroy&&c.handle({},"$destroy"),ub(b)),delete Ca[a],b[Ba]=q)}function ba(b,a,c){var d=b[Ba],d=Ca[d||-1];if(x(c))d||(b[Ba]=d=++oc,d=Ca[d]={}),d[a]=c;else return d&&d[a]}function vb(b,a,c){var d=ba(b,"data"),e=x(c),g=!e&&x(a),h=g&&!M(a);!d&&!h&&ba(b,"data",d={});if(e)d[a]=c;else if(g)if(h)return d&&d[a];else v(d,a);else return d}
-function Da(b,a){return(" "+b.className+" ").replace(/[\n\t]/g," ").indexOf(" "+a+" ")>-1}function wb(b,a){a&&n(a.split(" "),function(a){b.className=O((" "+b.className+" ").replace(/[\n\t]/g," ").replace(" "+O(a)+" "," "))})}function xb(b,a){a&&n(a.split(" "),function(a){if(!Da(b,a))b.className=O(b.className+" "+O(a))})}function bb(b,a){if(a)for(var a=!a.nodeName&&x(a.length)&&!pa(a)?a:[a],c=0;c<a.length;c++)b.push(a[c])}function yb(b,a){return Ea(b,"$"+(a||"ngController")+"Controller")}function Ea(b,
-a,c){b=u(b);for(b[0].nodeType==9&&(b=b.find("html"));b.length;){if(c=b.data(a))return c;b=b.parent()}}function zb(b,a){var c=Fa[a.toLowerCase()];return c&&Ab[b.nodeName]&&c}function pc(b,a){var c=function(c,e){if(!c.preventDefault)c.preventDefault=function(){c.returnValue=!1};if(!c.stopPropagation)c.stopPropagation=function(){c.cancelBubble=!0};if(!c.target)c.target=c.srcElement||Y;if(w(c.defaultPrevented)){var g=c.preventDefault;c.preventDefault=function(){c.defaultPrevented=!0;g.call(c)};c.defaultPrevented=
-!1}c.isDefaultPrevented=function(){return c.defaultPrevented};n(a[e||c.type],function(a){a.call(b,c)});Z<=8?(c.preventDefault=null,c.stopPropagation=null,c.isDefaultPrevented=null):(delete c.preventDefault,delete c.stopPropagation,delete c.isDefaultPrevented)};c.elem=b;return c}function fa(b){var a=typeof b,c;if(a=="object"&&b!==null)if(typeof(c=b.$$hashKey)=="function")c=b.$$hashKey();else{if(c===q)c=b.$$hashKey=ya()}else c=b;return a+":"+c}function Ga(b){n(b,this.put,this)}function eb(){}function Bb(b){var a,
-c;if(typeof b=="function"){if(!(a=b.$inject))a=[],c=b.toString().replace(qc,""),c=c.match(rc),n(c[1].split(sc),function(b){b.replace(tc,function(b,c,d){a.push(d)})}),b.$inject=a}else B(b)?(c=b.length-1,ra(b[c],"fn"),a=b.slice(0,c)):ra(b,"fn",!0);return a}function rb(b){function a(a){return function(b,c){if(M(b))n(b,nb(a));else return a(b,c)}}function c(a,b){if(H(b)||B(b))b=m.instantiate(b);if(!b.$get)throw Error("Provider "+a+" must define $get factory method.");return k[a+f]=b}function d(a,b){return c(a,
-{$get:b})}function e(a){var b=[];n(a,function(a){if(!i.get(a))if(i.put(a,!0),A(a)){var c=ta(a);b=b.concat(e(c.requires)).concat(c._runBlocks);try{for(var d=c._invokeQueue,c=0,f=d.length;c<f;c++){var g=d[c],h=g[0]=="$injector"?m:m.get(g[0]);h[g[1]].apply(h,g[2])}}catch(j){throw j.message&&(j.message+=" from "+a),j;}}else if(H(a))try{b.push(m.invoke(a))}catch(o){throw o.message&&(o.message+=" from "+a),o;}else if(B(a))try{b.push(m.invoke(a))}catch(k){throw k.message&&(k.message+=" from "+String(a[a.length-
-1])),k;}else ra(a,"module")});return b}function g(a,b){function c(d){if(typeof d!=="string")throw Error("Service name expected");if(a.hasOwnProperty(d)){if(a[d]===h)throw Error("Circular dependency: "+j.join(" <- "));return a[d]}else try{return j.unshift(d),a[d]=h,a[d]=b(d)}finally{j.shift()}}function d(a,b,e){var f=[],i=Bb(a),g,h,j;h=0;for(g=i.length;h<g;h++)j=i[h],f.push(e&&e.hasOwnProperty(j)?e[j]:c(j));a.$inject||(a=a[g]);switch(b?-1:f.length){case 0:return a();case 1:return a(f[0]);case 2:return a(f[0],
-f[1]);case 3:return a(f[0],f[1],f[2]);case 4:return a(f[0],f[1],f[2],f[3]);case 5:return a(f[0],f[1],f[2],f[3],f[4]);case 6:return a(f[0],f[1],f[2],f[3],f[4],f[5]);case 7:return a(f[0],f[1],f[2],f[3],f[4],f[5],f[6]);case 8:return a(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7]);case 9:return a(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7],f[8]);case 10:return a(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7],f[8],f[9]);default:return a.apply(b,f)}}return{invoke:d,instantiate:function(a,b){var c=function(){},e;c.prototype=
-(B(a)?a[a.length-1]:a).prototype;c=new c;e=d(a,c,b);return M(e)?e:c},get:c,annotate:Bb}}var h={},f="Provider",j=[],i=new Ga,k={$provide:{provider:a(c),factory:a(d),service:a(function(a,b){return d(a,["$injector",function(a){return a.instantiate(b)}])}),value:a(function(a,b){return d(a,I(b))}),constant:a(function(a,b){k[a]=b;l[a]=b}),decorator:function(a,b){var c=m.get(a+f),d=c.$get;c.$get=function(){var a=t.invoke(d,c);return t.invoke(b,null,{$delegate:a})}}}},m=g(k,function(){throw Error("Unknown provider: "+
-j.join(" <- "));}),l={},t=l.$injector=g(l,function(a){a=m.get(a+f);return t.invoke(a.$get,a)});n(e(b),function(a){t.invoke(a||C)});return t}function uc(){var b=!0;this.disableAutoScrolling=function(){b=!1};this.$get=["$window","$location","$rootScope",function(a,c,d){function e(a){var b=null;n(a,function(a){!b&&y(a.nodeName)==="a"&&(b=a)});return b}function g(){var b=c.hash(),d;b?(d=h.getElementById(b))?d.scrollIntoView():(d=e(h.getElementsByName(b)))?d.scrollIntoView():b==="top"&&a.scrollTo(0,0):
-a.scrollTo(0,0)}var h=a.document;b&&d.$watch(function(){return c.hash()},function(){d.$evalAsync(g)});return g}]}function vc(b,a,c,d){function e(a){try{a.apply(null,ha.call(arguments,1))}finally{if(o--,o===0)for(;p.length;)try{p.pop()()}catch(b){c.error(b)}}}function g(a,b){(function R(){n(s,function(a){a()});J=b(R,a)})()}function h(){F!=f.url()&&(F=f.url(),n(V,function(a){a(f.url())}))}var f=this,j=a[0],i=b.location,k=b.history,m=b.setTimeout,l=b.clearTimeout,t={};f.isMock=!1;var o=0,p=[];f.$$completeOutstandingRequest=
-e;f.$$incOutstandingRequestCount=function(){o++};f.notifyWhenNoOutstandingRequests=function(a){n(s,function(a){a()});o===0?a():p.push(a)};var s=[],J;f.addPollFn=function(a){w(J)&&g(100,m);s.push(a);return a};var F=i.href,z=a.find("base");f.url=function(a,b){if(a){if(F!=a)return F=a,d.history?b?k.replaceState(null,"",a):(k.pushState(null,"",a),z.attr("href",z.attr("href"))):b?i.replace(a):i.href=a,f}else return i.href.replace(/%27/g,"'")};var V=[],K=!1;f.onUrlChange=function(a){K||(d.history&&u(b).bind("popstate",
-h),d.hashchange?u(b).bind("hashchange",h):f.addPollFn(h),K=!0);V.push(a);return a};f.baseHref=function(){var a=z.attr("href");return a?a.replace(/^https?\:\/\/[^\/]*/,""):""};var r={},$="",P=f.baseHref();f.cookies=function(a,b){var d,e,f,i;if(a)if(b===q)j.cookie=escape(a)+"=;path="+P+";expires=Thu, 01 Jan 1970 00:00:00 GMT";else{if(A(b))d=(j.cookie=escape(a)+"="+escape(b)+";path="+P).length+1,d>4096&&c.warn("Cookie '"+a+"' possibly not set or overflowed because it was too large ("+d+" > 4096 bytes)!")}else{if(j.cookie!==
-$){$=j.cookie;d=$.split("; ");r={};for(f=0;f<d.length;f++)e=d[f],i=e.indexOf("="),i>0&&(r[unescape(e.substring(0,i))]=unescape(e.substring(i+1)))}return r}};f.defer=function(a,b){var c;o++;c=m(function(){delete t[c];e(a)},b||0);t[c]=!0;return c};f.defer.cancel=function(a){return t[a]?(delete t[a],l(a),e(C),!0):!1}}function wc(){this.$get=["$window","$log","$sniffer","$document",function(b,a,c,d){return new vc(b,d,a,c)}]}function xc(){this.$get=function(){function b(b,d){function e(a){if(a!=m){if(l){if(l==
-a)l=a.n}else l=a;g(a.n,a.p);g(a,m);m=a;m.n=null}}function g(a,b){if(a!=b){if(a)a.p=b;if(b)b.n=a}}if(b in a)throw Error("cacheId "+b+" taken");var h=0,f=v({},d,{id:b}),j={},i=d&&d.capacity||Number.MAX_VALUE,k={},m=null,l=null;return a[b]={put:function(a,b){var c=k[a]||(k[a]={key:a});e(c);w(b)||(a in j||h++,j[a]=b,h>i&&this.remove(l.key))},get:function(a){var b=k[a];if(b)return e(b),j[a]},remove:function(a){var b=k[a];if(b){if(b==m)m=b.p;if(b==l)l=b.n;g(b.n,b.p);delete k[a];delete j[a];h--}},removeAll:function(){j=
-{};h=0;k={};m=l=null},destroy:function(){k=f=j=null;delete a[b]},info:function(){return v({},f,{size:h})}}}var a={};b.info=function(){var b={};n(a,function(a,e){b[e]=a.info()});return b};b.get=function(b){return a[b]};return b}}function yc(){this.$get=["$cacheFactory",function(b){return b("templates")}]}function Cb(b){var a={},c="Directive",d=/^\s*directive\:\s*([\d\w\-_]+)\s+(.*)$/,e=/(([\d\w\-_]+)(?:\:([^;]+))?;?)/,g="Template must have exactly one root element. was: ",h=/^\s*(https?|ftp|mailto):/;
-this.directive=function j(d,e){A(d)?($a(e,"directive"),a.hasOwnProperty(d)||(a[d]=[],b.factory(d+c,["$injector","$exceptionHandler",function(b,c){var e=[];n(a[d],function(a){try{var g=b.invoke(a);if(H(g))g={compile:I(g)};else if(!g.compile&&g.link)g.compile=I(g.link);g.priority=g.priority||0;g.name=g.name||d;g.require=g.require||g.controller&&g.name;g.restrict=g.restrict||"A";e.push(g)}catch(h){c(h)}});return e}])),a[d].push(e)):n(d,nb(j));return this};this.urlSanitizationWhitelist=function(a){return x(a)?
-(h=a,this):h};this.$get=["$injector","$interpolate","$exceptionHandler","$http","$templateCache","$parse","$controller","$rootScope","$document",function(b,i,k,m,l,t,o,p,s){function J(a,b,c){a instanceof u||(a=u(a));n(a,function(b,c){b.nodeType==3&&b.nodeValue.match(/\S+/)&&(a[c]=u(b).wrap("<span></span>").parent()[0])});var d=z(a,b,a,c);return function(b,c){$a(b,"scope");for(var e=c?va.clone.call(a):a,g=0,i=e.length;g<i;g++){var h=e[g];(h.nodeType==1||h.nodeType==9)&&e.eq(g).data("$scope",b)}F(e,
-"ng-scope");c&&c(e,b);d&&d(b,e,e);return e}}function F(a,b){try{a.addClass(b)}catch(c){}}function z(a,b,c,d){function e(a,c,d,i){var h,j,k,o,l,m,t,s=[];l=0;for(m=c.length;l<m;l++)s.push(c[l]);t=l=0;for(m=g.length;l<m;t++)j=s[t],c=g[l++],h=g[l++],c?(c.scope?(k=a.$new(M(c.scope)),u(j).data("$scope",k)):k=a,(o=c.transclude)||!i&&b?c(h,k,j,d,function(b){return function(c){var d=a.$new();d.$$transcluded=!0;return b(d,c).bind("$destroy",Ua(d,d.$destroy))}}(o||b)):c(h,k,j,q,i)):h&&h(a,j.childNodes,q,i)}
-for(var g=[],i,h,j,k=0;k<a.length;k++)h=new ia,i=V(a[k],[],h,d),h=(i=i.length?K(i,a[k],h,b,c):null)&&i.terminal||!a[k].childNodes.length?null:z(a[k].childNodes,i?i.transclude:b),g.push(i),g.push(h),j=j||i||h;return j?e:null}function V(a,b,c,i){var g=c.$attr,h;switch(a.nodeType){case 1:r(b,ea(fb(a).toLowerCase()),"E",i);var j,k,l;h=a.attributes;for(var o=0,m=h&&h.length;o<m;o++)if(j=h[o],j.specified)k=j.name,l=ea(k.toLowerCase()),g[l]=k,c[l]=j=O(Z&&k=="href"?decodeURIComponent(a.getAttribute(k,2)):
-j.value),zb(a,l)&&(c[l]=!0),R(a,b,j,l),r(b,l,"A",i);a=a.className;if(A(a)&&a!=="")for(;h=e.exec(a);)l=ea(h[2]),r(b,l,"C",i)&&(c[l]=O(h[3])),a=a.substr(h.index+h[0].length);break;case 3:x(b,a.nodeValue);break;case 8:try{if(h=d.exec(a.nodeValue))l=ea(h[1]),r(b,l,"M",i)&&(c[l]=O(h[2]))}catch(t){}}b.sort(G);return b}function K(a,b,c,d,e){function i(a,b){if(a)a.require=r.require,m.push(a);if(b)b.require=r.require,s.push(b)}function h(a,b){var c,d="data",e=!1;if(A(a)){for(;(c=a.charAt(0))=="^"||c=="?";)a=
-a.substr(1),c=="^"&&(d="inheritedData"),e=e||c=="?";c=b[d]("$"+a+"Controller");if(!c&&!e)throw Error("No controller: "+a);}else B(a)&&(c=[],n(a,function(a){c.push(h(a,b))}));return c}function j(a,d,e,i,g){var l,p,r,D,F;l=b===e?c:hc(c,new ia(u(e),c.$attr));p=l.$$element;if(K){var J=/^\s*([@=&])\s*(\w*)\s*$/,ja=d.$parent||d;n(K.scope,function(a,b){var c=a.match(J)||[],e=c[2]||b,c=c[1],i,g,h;d.$$isolateBindings[b]=c+e;switch(c){case "@":l.$observe(e,function(a){d[b]=a});l.$$observers[e].$$scope=ja;break;
-case "=":g=t(l[e]);h=g.assign||function(){i=d[b]=g(ja);throw Error(Db+l[e]+" (directive: "+K.name+")");};i=d[b]=g(ja);d.$watch(function(){var a=g(ja);a!==d[b]&&(a!==i?i=d[b]=a:h(ja,a=i=d[b]));return a});break;case "&":g=t(l[e]);d[b]=function(a){return g(ja,a)};break;default:throw Error("Invalid isolate scope definition for directive "+K.name+": "+a);}})}x&&n(x,function(a){var b={$scope:d,$element:p,$attrs:l,$transclude:g};F=a.controller;F=="@"&&(F=l[a.name]);p.data("$"+a.name+"Controller",o(F,b))});
-i=0;for(r=m.length;i<r;i++)try{D=m[i],D(d,p,l,D.require&&h(D.require,p))}catch(z){k(z,qa(p))}a&&a(d,e.childNodes,q,g);i=0;for(r=s.length;i<r;i++)try{D=s[i],D(d,p,l,D.require&&h(D.require,p))}catch(zc){k(zc,qa(p))}}for(var l=-Number.MAX_VALUE,m=[],s=[],p=null,K=null,z=null,D=c.$$element=u(b),r,G,S,ka,R=d,x,w,W,v=0,y=a.length;v<y;v++){r=a[v];S=q;if(l>r.priority)break;if(W=r.scope)ua("isolated scope",K,r,D),M(W)&&(F(D,"ng-isolate-scope"),K=r),F(D,"ng-scope"),p=p||r;G=r.name;if(W=r.controller)x=x||{},
-ua("'"+G+"' controller",x[G],r,D),x[G]=r;if(W=r.transclude)ua("transclusion",ka,r,D),ka=r,l=r.priority,W=="element"?(S=u(b),D=c.$$element=u(Y.createComment(" "+G+": "+c[G]+" ")),b=D[0],C(e,u(S[0]),b),R=J(S,d,l)):(S=u(cb(b)).contents(),D.html(""),R=J(S,d));if(W=r.template)if(ua("template",z,r,D),z=r,W=Eb(W),r.replace){S=u("<div>"+O(W)+"</div>").contents();b=S[0];if(S.length!=1||b.nodeType!==1)throw Error(g+W);C(e,D,b);G={$attr:{}};a=a.concat(V(b,a.splice(v+1,a.length-(v+1)),G));$(c,G);y=a.length}else D.html(W);
-if(r.templateUrl)ua("template",z,r,D),z=r,j=P(a.splice(v,a.length-v),j,D,c,e,r.replace,R),y=a.length;else if(r.compile)try{w=r.compile(D,c,R),H(w)?i(null,w):w&&i(w.pre,w.post)}catch(E){k(E,qa(D))}if(r.terminal)j.terminal=!0,l=Math.max(l,r.priority)}j.scope=p&&p.scope;j.transclude=ka&&R;return j}function r(d,e,i,g){var h=!1;if(a.hasOwnProperty(e))for(var l,e=b.get(e+c),o=0,m=e.length;o<m;o++)try{if(l=e[o],(g===q||g>l.priority)&&l.restrict.indexOf(i)!=-1)d.push(l),h=!0}catch(t){k(t)}return h}function $(a,
-b){var c=b.$attr,d=a.$attr,e=a.$$element;n(a,function(d,e){e.charAt(0)!="$"&&(b[e]&&(d+=(e==="style"?";":" ")+b[e]),a.$set(e,d,!0,c[e]))});n(b,function(b,i){i=="class"?(F(e,b),a["class"]=(a["class"]?a["class"]+" ":"")+b):i=="style"?e.attr("style",e.attr("style")+";"+b):i.charAt(0)!="$"&&!a.hasOwnProperty(i)&&(a[i]=b,d[i]=c[i])})}function P(a,b,c,d,e,i,h){var j=[],k,o,t=c[0],s=a.shift(),p=v({},s,{controller:null,templateUrl:null,transclude:null,scope:null});c.html("");m.get(s.templateUrl,{cache:l}).success(function(l){var m,
-s,l=Eb(l);if(i){s=u("<div>"+O(l)+"</div>").contents();m=s[0];if(s.length!=1||m.nodeType!==1)throw Error(g+l);l={$attr:{}};C(e,c,m);V(m,a,l);$(d,l)}else m=t,c.html(l);a.unshift(p);k=K(a,m,d,h);for(o=z(c.contents(),h);j.length;){var ia=j.pop(),l=j.pop();s=j.pop();var r=j.pop(),D=m;s!==t&&(D=cb(m),C(l,u(s),D));k(function(){b(o,r,D,e,ia)},r,D,e,ia)}j=null}).error(function(a,b,c,d){throw Error("Failed to load template: "+d.url);});return function(a,c,d,e,i){j?(j.push(c),j.push(d),j.push(e),j.push(i)):
-k(function(){b(o,c,d,e,i)},c,d,e,i)}}function G(a,b){return b.priority-a.priority}function ua(a,b,c,d){if(b)throw Error("Multiple directives ["+b.name+", "+c.name+"] asking for "+a+" on: "+qa(d));}function x(a,b){var c=i(b,!0);c&&a.push({priority:0,compile:I(function(a,b){var d=b.parent(),e=d.data("$binding")||[];e.push(c);F(d.data("$binding",e),"ng-binding");a.$watch(c,function(a){b[0].nodeValue=a})})})}function R(a,b,c,d){var e=i(c,!0);e&&b.push({priority:100,compile:I(function(a,b,c){b=c.$$observers||
-(c.$$observers={});d==="class"&&(e=i(c[d],!0));c[d]=q;(b[d]||(b[d]=[])).$$inter=!0;(c.$$observers&&c.$$observers[d].$$scope||a).$watch(e,function(a){c.$set(d,a)})})})}function C(a,b,c){var d=b[0],e=d.parentNode,i,g;if(a){i=0;for(g=a.length;i<g;i++)if(a[i]==d){a[i]=c;break}}e&&e.replaceChild(c,d);c[u.expando]=d[u.expando];b[0]=c}var ia=function(a,b){this.$$element=a;this.$attr=b||{}};ia.prototype={$normalize:ea,$set:function(a,b,c,d){var e=zb(this.$$element[0],a),i=this.$$observers;e&&(this.$$element.prop(a,
-b),d=e);this[a]=b;d?this.$attr[a]=d:(d=this.$attr[a])||(this.$attr[a]=d=Za(a,"-"));if(fb(this.$$element[0])==="A"&&a==="href")D.setAttribute("href",b),e=D.href,e.match(h)||(this[a]=b="unsafe:"+e);c!==!1&&(b===null||b===q?this.$$element.removeAttr(d):this.$$element.attr(d,b));i&&n(i[a],function(a){try{a(b)}catch(c){k(c)}})},$observe:function(a,b){var c=this,d=c.$$observers||(c.$$observers={}),e=d[a]||(d[a]=[]);e.push(b);p.$evalAsync(function(){e.$$inter||b(c[a])});return b}};var D=s[0].createElement("a"),
-S=i.startSymbol(),ka=i.endSymbol(),Eb=S=="{{"||ka=="}}"?na:function(a){return a.replace(/\{\{/g,S).replace(/}}/g,ka)};return J}]}function ea(b){return sb(b.replace(Ac,""))}function Bc(){var b={};this.register=function(a,c){M(a)?v(b,a):b[a]=c};this.$get=["$injector","$window",function(a,c){return function(d,e){if(A(d)){var g=d,d=b.hasOwnProperty(g)?b[g]:gb(e.$scope,g,!0)||gb(c,g,!0);ra(d,g,!0)}return a.instantiate(d,e)}}]}function Cc(){this.$get=["$window",function(b){return u(b.document)}]}function Dc(){this.$get=
-["$log",function(b){return function(a,c){b.error.apply(b,arguments)}}]}function Ec(){var b="{{",a="}}";this.startSymbol=function(a){return a?(b=a,this):b};this.endSymbol=function(b){return b?(a=b,this):a};this.$get=["$parse",function(c){function d(d,f){for(var j,i,k=0,m=[],l=d.length,t=!1,o=[];k<l;)(j=d.indexOf(b,k))!=-1&&(i=d.indexOf(a,j+e))!=-1?(k!=j&&m.push(d.substring(k,j)),m.push(k=c(t=d.substring(j+e,i))),k.exp=t,k=i+g,t=!0):(k!=l&&m.push(d.substring(k)),k=l);if(!(l=m.length))m.push(""),l=1;
-if(!f||t)return o.length=l,k=function(a){for(var b=0,c=l,d;b<c;b++){if(typeof(d=m[b])=="function")d=d(a),d==null||d==q?d="":typeof d!="string"&&(d=da(d));o[b]=d}return o.join("")},k.exp=d,k.parts=m,k}var e=b.length,g=a.length;d.startSymbol=function(){return b};d.endSymbol=function(){return a};return d}]}function Fb(b){for(var b=b.split("/"),a=b.length;a--;)b[a]=Ya(b[a]);return b.join("/")}function wa(b,a){var c=Gb.exec(b),c={protocol:c[1],host:c[3],port:E(c[5])||Hb[c[1]]||null,path:c[6]||"/",search:c[8],
-hash:c[10]};if(a)a.$$protocol=c.protocol,a.$$host=c.host,a.$$port=c.port;return c}function la(b,a,c){return b+"://"+a+(c==Hb[b]?"":":"+c)}function Fc(b,a,c){var d=wa(b);return decodeURIComponent(d.path)!=a||w(d.hash)||d.hash.indexOf(c)!==0?b:la(d.protocol,d.host,d.port)+a.substr(0,a.lastIndexOf("/"))+d.hash.substr(c.length)}function Gc(b,a,c){var d=wa(b);if(decodeURIComponent(d.path)==a)return b;else{var e=d.search&&"?"+d.search||"",g=d.hash&&"#"+d.hash||"",h=a.substr(0,a.lastIndexOf("/")),f=d.path.substr(h.length);
-if(d.path.indexOf(h)!==0)throw Error('Invalid url "'+b+'", missing path prefix "'+h+'" !');return la(d.protocol,d.host,d.port)+a+"#"+c+f+e+g}}function hb(b,a,c){a=a||"";this.$$parse=function(b){var c=wa(b,this);if(c.path.indexOf(a)!==0)throw Error('Invalid url "'+b+'", missing path prefix "'+a+'" !');this.$$path=decodeURIComponent(c.path.substr(a.length));this.$$search=Wa(c.search);this.$$hash=c.hash&&decodeURIComponent(c.hash)||"";this.$$compose()};this.$$compose=function(){var b=pb(this.$$search),
-c=this.$$hash?"#"+Ya(this.$$hash):"";this.$$url=Fb(this.$$path)+(b?"?"+b:"")+c;this.$$absUrl=la(this.$$protocol,this.$$host,this.$$port)+a+this.$$url};this.$$rewriteAppUrl=function(a){if(a.indexOf(c)==0)return a};this.$$parse(b)}function Ha(b,a,c){var d;this.$$parse=function(b){var c=wa(b,this);if(c.hash&&c.hash.indexOf(a)!==0)throw Error('Invalid url "'+b+'", missing hash prefix "'+a+'" !');d=c.path+(c.search?"?"+c.search:"");c=Hc.exec((c.hash||"").substr(a.length));this.$$path=c[1]?(c[1].charAt(0)==
-"/"?"":"/")+decodeURIComponent(c[1]):"";this.$$search=Wa(c[3]);this.$$hash=c[5]&&decodeURIComponent(c[5])||"";this.$$compose()};this.$$compose=function(){var b=pb(this.$$search),c=this.$$hash?"#"+Ya(this.$$hash):"";this.$$url=Fb(this.$$path)+(b?"?"+b:"")+c;this.$$absUrl=la(this.$$protocol,this.$$host,this.$$port)+d+(this.$$url?"#"+a+this.$$url:"")};this.$$rewriteAppUrl=function(a){if(a.indexOf(c)==0)return a};this.$$parse(b)}function Ib(b,a,c,d){Ha.apply(this,arguments);this.$$rewriteAppUrl=function(b){if(b.indexOf(c)==
-0)return c+d+"#"+a+b.substr(c.length)}}function Ia(b){return function(){return this[b]}}function Jb(b,a){return function(c){if(w(c))return this[b];this[b]=a(c);this.$$compose();return this}}function Ic(){var b="",a=!1;this.hashPrefix=function(a){return x(a)?(b=a,this):b};this.html5Mode=function(b){return x(b)?(a=b,this):a};this.$get=["$rootScope","$browser","$sniffer","$rootElement",function(c,d,e,g){function h(a){c.$broadcast("$locationChangeSuccess",f.absUrl(),a)}var f,j,i,k=d.url(),m=wa(k);a?(j=
-d.baseHref()||"/",i=j.substr(0,j.lastIndexOf("/")),m=la(m.protocol,m.host,m.port)+i+"/",f=e.history?new hb(Fc(k,j,b),i,m):new Ib(Gc(k,j,b),b,m,j.substr(i.length+1))):(m=la(m.protocol,m.host,m.port)+(m.path||"")+(m.search?"?"+m.search:"")+"#"+b+"/",f=new Ha(k,b,m));g.bind("click",function(a){if(!a.ctrlKey&&!(a.metaKey||a.which==2)){for(var b=u(a.target);y(b[0].nodeName)!=="a";)if(b[0]===g[0]||!(b=b.parent())[0])return;var d=b.prop("href"),e=f.$$rewriteAppUrl(d);d&&!b.attr("target")&&e&&(f.$$parse(e),
-c.$apply(),a.preventDefault(),X.angular["ff-684208-preventDefault"]=!0)}});f.absUrl()!=k&&d.url(f.absUrl(),!0);d.onUrlChange(function(a){f.absUrl()!=a&&(c.$evalAsync(function(){var b=f.absUrl();f.$$parse(a);h(b)}),c.$$phase||c.$digest())});var l=0;c.$watch(function(){var a=d.url(),b=f.$$replace;if(!l||a!=f.absUrl())l++,c.$evalAsync(function(){c.$broadcast("$locationChangeStart",f.absUrl(),a).defaultPrevented?f.$$parse(a):(d.url(f.absUrl(),b),h(a))});f.$$replace=!1;return l});return f}]}function Jc(){this.$get=
-["$window",function(b){function a(a){a instanceof Error&&(a.stack?a=a.message&&a.stack.indexOf(a.message)===-1?"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&&(a=a.message+"\n"+a.sourceURL+":"+a.line));return a}function c(c){var e=b.console||{},g=e[c]||e.log||C;return g.apply?function(){var b=[];n(arguments,function(c){b.push(a(c))});return g.apply(e,b)}:function(a,b){g(a,b)}}return{log:c("log"),warn:c("warn"),info:c("info"),error:c("error")}}]}function Kc(b,a){function c(a){return a.indexOf(s)!=
--1}function d(){return o+1<b.length?b.charAt(o+1):!1}function e(a){return"0"<=a&&a<="9"}function g(a){return a==" "||a=="\r"||a=="\t"||a=="\n"||a=="\u000b"||a=="\u00a0"}function h(a){return"a"<=a&&a<="z"||"A"<=a&&a<="Z"||"_"==a||a=="$"}function f(a){return a=="-"||a=="+"||e(a)}function j(a,c,d){d=d||o;throw Error("Lexer Error: "+a+" at column"+(x(c)?"s "+c+"-"+o+" ["+b.substring(c,d)+"]":" "+d)+" in expression ["+b+"].");}function i(){for(var a="",c=o;o<b.length;){var i=y(b.charAt(o));if(i=="."||
-e(i))a+=i;else{var g=d();if(i=="e"&&f(g))a+=i;else if(f(i)&&g&&e(g)&&a.charAt(a.length-1)=="e")a+=i;else if(f(i)&&(!g||!e(g))&&a.charAt(a.length-1)=="e")j("Invalid exponent");else break}o++}a*=1;l.push({index:c,text:a,json:!0,fn:function(){return a}})}function k(){for(var c="",d=o,f,i,j;o<b.length;){var k=b.charAt(o);if(k=="."||h(k)||e(k))k=="."&&(f=o),c+=k;else break;o++}if(f)for(i=o;i<b.length;){k=b.charAt(i);if(k=="("){j=c.substr(f-d+1);c=c.substr(0,f-d);o=i;break}if(g(k))i++;else break}d={index:d,
-text:c};if(Ja.hasOwnProperty(c))d.fn=d.json=Ja[c];else{var m=Kb(c,a);d.fn=v(function(a,b){return m(a,b)},{assign:function(a,b){return Lb(a,c,b)}})}l.push(d);j&&(l.push({index:f,text:".",json:!1}),l.push({index:f+1,text:j,json:!1}))}function m(a){var c=o;o++;for(var d="",e=a,f=!1;o<b.length;){var i=b.charAt(o);e+=i;if(f)i=="u"?(i=b.substring(o+1,o+5),i.match(/[\da-f]{4}/i)||j("Invalid unicode escape [\\u"+i+"]"),o+=4,d+=String.fromCharCode(parseInt(i,16))):(f=Lc[i],d+=f?f:i),f=!1;else if(i=="\\")f=
-!0;else if(i==a){o++;l.push({index:c,text:e,string:d,json:!0,fn:function(){return d}});return}else d+=i;o++}j("Unterminated quote",c)}for(var l=[],t,o=0,p=[],s,J=":";o<b.length;){s=b.charAt(o);if(c("\"'"))m(s);else if(e(s)||c(".")&&e(d()))i();else if(h(s)){if(k(),"{,".indexOf(J)!=-1&&p[0]=="{"&&(t=l[l.length-1]))t.json=t.text.indexOf(".")==-1}else if(c("(){}[].,;:"))l.push({index:o,text:s,json:":[,".indexOf(J)!=-1&&c("{[")||c("}]:,")}),c("{[")&&p.unshift(s),c("}]")&&p.shift(),o++;else if(g(s)){o++;
-continue}else{var n=s+d(),z=Ja[s],V=Ja[n];V?(l.push({index:o,text:n,fn:V}),o+=2):z?(l.push({index:o,text:s,fn:z,json:"[,:".indexOf(J)!=-1&&c("+-")}),o+=1):j("Unexpected next character ",o,o+1)}J=s}return l}function Mc(b,a,c,d){function e(a,c){throw Error("Syntax Error: Token '"+c.text+"' "+a+" at column "+(c.index+1)+" of the expression ["+b+"] starting at ["+b.substring(c.index)+"].");}function g(){if(P.length===0)throw Error("Unexpected end of expression: "+b);return P[0]}function h(a,b,c,d){if(P.length>
-0){var e=P[0],f=e.text;if(f==a||f==b||f==c||f==d||!a&&!b&&!c&&!d)return e}return!1}function f(b,c,d,f){return(b=h(b,c,d,f))?(a&&!b.json&&e("is not valid json",b),P.shift(),b):!1}function j(a){f(a)||e("is unexpected, expecting ["+a+"]",h())}function i(a,b){return function(c,d){return a(c,d,b)}}function k(a,b,c){return function(d,e){return b(d,e,a,c)}}function m(){for(var a=[];;)if(P.length>0&&!h("}",")",";","]")&&a.push(w()),!f(";"))return a.length==1?a[0]:function(b,c){for(var d,e=0;e<a.length;e++){var f=
-a[e];f&&(d=f(b,c))}return d}}function l(){for(var a=f(),b=c(a.text),d=[];;)if(a=f(":"))d.push(G());else{var e=function(a,c,e){for(var e=[e],f=0;f<d.length;f++)e.push(d[f](a,c));return b.apply(a,e)};return function(){return e}}}function t(){for(var a=o(),b;;)if(b=f("||"))a=k(a,b.fn,o());else return a}function o(){var a=p(),b;if(b=f("&&"))a=k(a,b.fn,o());return a}function p(){var a=s(),b;if(b=f("==","!="))a=k(a,b.fn,p());return a}function s(){var a;a=J();for(var b;b=f("+","-");)a=k(a,b.fn,J());if(b=
-f("<",">","<=",">="))a=k(a,b.fn,s());return a}function J(){for(var a=n(),b;b=f("*","/","%");)a=k(a,b.fn,n());return a}function n(){var a;return f("+")?z():(a=f("-"))?k(r,a.fn,n()):(a=f("!"))?i(a.fn,n()):z()}function z(){var a;if(f("("))a=w(),j(")");else if(f("["))a=V();else if(f("{"))a=K();else{var b=f();(a=b.fn)||e("not a primary expression",b)}for(var c;b=f("(","[",".");)b.text==="("?(a=x(a,c),c=null):b.text==="["?(c=a,a=R(a)):b.text==="."?(c=a,a=u(a)):e("IMPOSSIBLE");return a}function V(){var a=
-[];if(g().text!="]"){do a.push(G());while(f(","))}j("]");return function(b,c){for(var d=[],e=0;e<a.length;e++)d.push(a[e](b,c));return d}}function K(){var a=[];if(g().text!="}"){do{var b=f(),b=b.string||b.text;j(":");var c=G();a.push({key:b,value:c})}while(f(","))}j("}");return function(b,c){for(var d={},e=0;e<a.length;e++){var f=a[e],i=f.value(b,c);d[f.key]=i}return d}}var r=I(0),$,P=Kc(b,d),G=function(){var a=t(),c,d;return(d=f("="))?(a.assign||e("implies assignment but ["+b.substring(0,d.index)+
-"] can not be assigned to",d),c=t(),function(b,d){return a.assign(b,c(b,d),d)}):a},x=function(a,b){var c=[];if(g().text!=")"){do c.push(G());while(f(","))}j(")");return function(d,e){for(var f=[],i=b?b(d,e):d,g=0;g<c.length;g++)f.push(c[g](d,e));g=a(d,e)||C;return g.apply?g.apply(i,f):g(f[0],f[1],f[2],f[3],f[4])}},u=function(a){var b=f().text,c=Kb(b,d);return v(function(b,d){return c(a(b,d),d)},{assign:function(c,d,e){return Lb(a(c,e),b,d)}})},R=function(a){var b=G();j("]");return v(function(c,d){var e=
-a(c,d),f=b(c,d),i;if(!e)return q;if((e=e[f])&&e.then){i=e;if(!("$$v"in e))i.$$v=q,i.then(function(a){i.$$v=a});e=e.$$v}return e},{assign:function(c,d,e){return a(c,e)[b(c,e)]=d}})},w=function(){for(var a=G(),b;;)if(b=f("|"))a=k(a,b.fn,l());else return a};a?(G=t,x=u=R=w=function(){e("is not valid json",{text:b,index:0})},$=z()):$=m();P.length!==0&&e("is an unexpected token",P[0]);return $}function Lb(b,a,c){for(var a=a.split("."),d=0;a.length>1;d++){var e=a.shift(),g=b[e];g||(g={},b[e]=g);b=g}return b[a.shift()]=
-c}function gb(b,a,c){if(!a)return b;for(var a=a.split("."),d,e=b,g=a.length,h=0;h<g;h++)d=a[h],b&&(b=(e=b)[d]);return!c&&H(b)?Ua(e,b):b}function Mb(b,a,c,d,e){return function(g,h){var f=h&&h.hasOwnProperty(b)?h:g,j;if(f===null||f===q)return f;if((f=f[b])&&f.then){if(!("$$v"in f))j=f,j.$$v=q,j.then(function(a){j.$$v=a});f=f.$$v}if(!a||f===null||f===q)return f;if((f=f[a])&&f.then){if(!("$$v"in f))j=f,j.$$v=q,j.then(function(a){j.$$v=a});f=f.$$v}if(!c||f===null||f===q)return f;if((f=f[c])&&f.then){if(!("$$v"in
-f))j=f,j.$$v=q,j.then(function(a){j.$$v=a});f=f.$$v}if(!d||f===null||f===q)return f;if((f=f[d])&&f.then){if(!("$$v"in f))j=f,j.$$v=q,j.then(function(a){j.$$v=a});f=f.$$v}if(!e||f===null||f===q)return f;if((f=f[e])&&f.then){if(!("$$v"in f))j=f,j.$$v=q,j.then(function(a){j.$$v=a});f=f.$$v}return f}}function Kb(b,a){if(ib.hasOwnProperty(b))return ib[b];var c=b.split("."),d=c.length,e;if(a)e=d<6?Mb(c[0],c[1],c[2],c[3],c[4]):function(a,b){var e=0,i;do i=Mb(c[e++],c[e++],c[e++],c[e++],c[e++])(a,b),b=q,
-a=i;while(e<d);return i};else{var g="var l, fn, p;\n";n(c,function(a,b){g+="if(s === null || s === undefined) return s;\nl=s;\ns="+(b?"s":'((k&&k.hasOwnProperty("'+a+'"))?k:s)')+'["'+a+'"];\nif (s && s.then) {\n if (!("$$v" in s)) {\n p=s;\n p.$$v = undefined;\n p.then(function(v) {p.$$v=v;});\n}\n s=s.$$v\n}\n'});g+="return s;";e=Function("s","k",g);e.toString=function(){return g}}return ib[b]=e}function Nc(){var b={};this.$get=["$filter","$sniffer",function(a,c){return function(d){switch(typeof d){case "string":return b.hasOwnProperty(d)?
-b[d]:b[d]=Mc(d,!1,a,c.csp);case "function":return d;default:return C}}}]}function Oc(){this.$get=["$rootScope","$exceptionHandler",function(b,a){return Pc(function(a){b.$evalAsync(a)},a)}]}function Pc(b,a){function c(a){return a}function d(a){return h(a)}var e=function(){var f=[],j,i;return i={resolve:function(a){if(f){var c=f;f=q;j=g(a);c.length&&b(function(){for(var a,b=0,d=c.length;b<d;b++)a=c[b],j.then(a[0],a[1])})}},reject:function(a){i.resolve(h(a))},promise:{then:function(b,i){var g=e(),h=
-function(d){try{g.resolve((b||c)(d))}catch(e){a(e),g.reject(e)}},o=function(b){try{g.resolve((i||d)(b))}catch(c){a(c),g.reject(c)}};f?f.push([h,o]):j.then(h,o);return g.promise}}}},g=function(a){return a&&a.then?a:{then:function(c){var d=e();b(function(){d.resolve(c(a))});return d.promise}}},h=function(a){return{then:function(c,i){var g=e();b(function(){g.resolve((i||d)(a))});return g.promise}}};return{defer:e,reject:h,when:function(f,j,i){var k=e(),m,l=function(b){try{return(j||c)(b)}catch(d){return a(d),
-h(d)}},t=function(b){try{return(i||d)(b)}catch(c){return a(c),h(c)}};b(function(){g(f).then(function(a){m||(m=!0,k.resolve(g(a).then(l,t)))},function(a){m||(m=!0,k.resolve(t(a)))})});return k.promise},all:function(a){var b=e(),c=a.length,d=[];c?n(a,function(a,e){g(a).then(function(a){e in d||(d[e]=a,--c||b.resolve(d))},function(a){e in d||b.reject(a)})}):b.resolve(d);return b.promise}}}function Qc(){var b={};this.when=function(a,c){b[a]=v({reloadOnSearch:!0},c);if(a){var d=a[a.length-1]=="/"?a.substr(0,
-a.length-1):a+"/";b[d]={redirectTo:a}}return this};this.otherwise=function(a){this.when(null,a);return this};this.$get=["$rootScope","$location","$routeParams","$q","$injector","$http","$templateCache",function(a,c,d,e,g,h,f){function j(a,b){for(var b="^"+b.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+"$",c="",d=[],e={},f=/:(\w+)/g,i,g=0;(i=f.exec(b))!==null;)c+=b.slice(g,i.index),c+="([^\\/]*)",d.push(i[1]),g=f.lastIndex;c+=b.substr(g);var h=a.match(RegExp(c));h&&n(d,function(a,b){e[a]=h[b+1]});return h?
-e:null}function i(){var b=k(),i=t.current;if(b&&i&&b.$route===i.$route&&ga(b.pathParams,i.pathParams)&&!b.reloadOnSearch&&!l)i.params=b.params,U(i.params,d),a.$broadcast("$routeUpdate",i);else if(b||i)l=!1,a.$broadcast("$routeChangeStart",b,i),(t.current=b)&&b.redirectTo&&(A(b.redirectTo)?c.path(m(b.redirectTo,b.params)).search(b.params).replace():c.url(b.redirectTo(b.pathParams,c.path(),c.search())).replace()),e.when(b).then(function(){if(b){var a=[],c=[],d;n(b.resolve||{},function(b,d){a.push(d);
-c.push(A(b)?g.get(b):g.invoke(b))});if(!x(d=b.template))if(x(d=b.templateUrl))d=h.get(d,{cache:f}).then(function(a){return a.data});x(d)&&(a.push("$template"),c.push(d));return e.all(c).then(function(b){var c={};n(b,function(b,d){c[a[d]]=b});return c})}}).then(function(c){if(b==t.current){if(b)b.locals=c,U(b.params,d);a.$broadcast("$routeChangeSuccess",b,i)}},function(c){b==t.current&&a.$broadcast("$routeChangeError",b,i,c)})}function k(){var a,d;n(b,function(b,e){if(!d&&(a=j(c.path(),e)))d=za(b,
-{params:v({},c.search(),a),pathParams:a}),d.$route=b});return d||b[null]&&za(b[null],{params:{},pathParams:{}})}function m(a,b){var c=[];n((a||"").split(":"),function(a,d){if(d==0)c.push(a);else{var e=a.match(/(\w+)(.*)/),f=e[1];c.push(b[f]);c.push(e[2]||"");delete b[f]}});return c.join("")}var l=!1,t={routes:b,reload:function(){l=!0;a.$evalAsync(i)}};a.$on("$locationChangeSuccess",i);return t}]}function Rc(){this.$get=I({})}function Sc(){var b=10;this.digestTtl=function(a){arguments.length&&(b=a);
-return b};this.$get=["$injector","$exceptionHandler","$parse",function(a,c,d){function e(){this.$id=ya();this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null;this["this"]=this.$root=this;this.$$destroyed=!1;this.$$asyncQueue=[];this.$$listeners={};this.$$isolateBindings={}}function g(a){if(j.$$phase)throw Error(j.$$phase+" already in progress");j.$$phase=a}function h(a,b){var c=d(a);ra(c,b);return c}function f(){}e.prototype={$new:function(a){if(H(a))throw Error("API-CHANGE: Use $controller to instantiate controllers.");
-a?(a=new e,a.$root=this.$root):(a=function(){},a.prototype=this,a=new a,a.$id=ya());a["this"]=a;a.$$listeners={};a.$parent=this;a.$$asyncQueue=[];a.$$watchers=a.$$nextSibling=a.$$childHead=a.$$childTail=null;a.$$prevSibling=this.$$childTail;this.$$childHead?this.$$childTail=this.$$childTail.$$nextSibling=a:this.$$childHead=this.$$childTail=a;return a},$watch:function(a,b,c){var d=h(a,"watch"),e=this.$$watchers,g={fn:b,last:f,get:d,exp:a,eq:!!c};if(!H(b)){var j=h(b||C,"listener");g.fn=function(a,b,
-c){j(c)}}if(!e)e=this.$$watchers=[];e.unshift(g);return function(){Ta(e,g)}},$digest:function(){var a,d,e,h,t,o,p,s=b,n,F=[],z,q;g("$digest");do{p=!1;n=this;do{for(t=n.$$asyncQueue;t.length;)try{n.$eval(t.shift())}catch(K){c(K)}if(h=n.$$watchers)for(o=h.length;o--;)try{if(a=h[o],(d=a.get(n))!==(e=a.last)&&!(a.eq?ga(d,e):typeof d=="number"&&typeof e=="number"&&isNaN(d)&&isNaN(e)))p=!0,a.last=a.eq?U(d):d,a.fn(d,e===f?d:e,n),s<5&&(z=4-s,F[z]||(F[z]=[]),q=H(a.exp)?"fn: "+(a.exp.name||a.exp.toString()):
-a.exp,q+="; newVal: "+da(d)+"; oldVal: "+da(e),F[z].push(q))}catch(r){c(r)}if(!(h=n.$$childHead||n!==this&&n.$$nextSibling))for(;n!==this&&!(h=n.$$nextSibling);)n=n.$parent}while(n=h);if(p&&!s--)throw j.$$phase=null,Error(b+" $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: "+da(F));}while(p||t.length);j.$$phase=null},$destroy:function(){if(!(j==this||this.$$destroyed)){var a=this.$parent;this.$broadcast("$destroy");this.$$destroyed=!0;if(a.$$childHead==this)a.$$childHead=
-this.$$nextSibling;if(a.$$childTail==this)a.$$childTail=this.$$prevSibling;if(this.$$prevSibling)this.$$prevSibling.$$nextSibling=this.$$nextSibling;if(this.$$nextSibling)this.$$nextSibling.$$prevSibling=this.$$prevSibling;this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null}},$eval:function(a,b){return d(a)(this,b)},$evalAsync:function(a){this.$$asyncQueue.push(a)},$apply:function(a){try{return g("$apply"),this.$eval(a)}catch(b){c(b)}finally{j.$$phase=null;try{j.$digest()}catch(d){throw c(d),
-d;}}},$on:function(a,b){var c=this.$$listeners[a];c||(this.$$listeners[a]=c=[]);c.push(b);return function(){c[Aa(c,b)]=null}},$emit:function(a,b){var d=[],e,f=this,g=!1,h={name:a,targetScope:f,stopPropagation:function(){g=!0},preventDefault:function(){h.defaultPrevented=!0},defaultPrevented:!1},j=[h].concat(ha.call(arguments,1)),n,q;do{e=f.$$listeners[a]||d;h.currentScope=f;n=0;for(q=e.length;n<q;n++)if(e[n])try{if(e[n].apply(null,j),g)return h}catch(z){c(z)}else e.splice(n,1),n--,q--;f=f.$parent}while(f);
-return h},$broadcast:function(a,b){var d=this,e=this,f={name:a,targetScope:this,preventDefault:function(){f.defaultPrevented=!0},defaultPrevented:!1},g=[f].concat(ha.call(arguments,1)),h,j;do{d=e;f.currentScope=d;e=d.$$listeners[a]||[];h=0;for(j=e.length;h<j;h++)if(e[h])try{e[h].apply(null,g)}catch(n){c(n)}else e.splice(h,1),h--,j--;if(!(e=d.$$childHead||d!==this&&d.$$nextSibling))for(;d!==this&&!(e=d.$$nextSibling);)d=d.$parent}while(d=e);return f}};var j=new e;return j}]}function Tc(){this.$get=
-["$window",function(b){var a={},c=E((/android (\d+)/.exec(y(b.navigator.userAgent))||[])[1]);return{history:!(!b.history||!b.history.pushState||c<4),hashchange:"onhashchange"in b&&(!b.document.documentMode||b.document.documentMode>7),hasEvent:function(c){if(c=="input"&&Z==9)return!1;if(w(a[c])){var e=b.document.createElement("div");a[c]="on"+c in e}return a[c]},csp:!1}}]}function Uc(){this.$get=I(X)}function Nb(b){var a={},c,d,e;if(!b)return a;n(b.split("\n"),function(b){e=b.indexOf(":");c=y(O(b.substr(0,
-e)));d=O(b.substr(e+1));c&&(a[c]?a[c]+=", "+d:a[c]=d)});return a}function Ob(b){var a=M(b)?b:q;return function(c){a||(a=Nb(b));return c?a[y(c)]||null:a}}function Pb(b,a,c){if(H(c))return c(b,a);n(c,function(c){b=c(b,a)});return b}function Vc(){var b=/^\s*(\[|\{[^\{])/,a=/[\}\]]\s*$/,c=/^\)\]\}',?\n/,d=this.defaults={transformResponse:[function(d){A(d)&&(d=d.replace(c,""),b.test(d)&&a.test(d)&&(d=ob(d,!0)));return d}],transformRequest:[function(a){return M(a)&&xa.apply(a)!=="[object File]"?da(a):a}],
-headers:{common:{Accept:"application/json, text/plain, */*","X-Requested-With":"XMLHttpRequest"},post:{"Content-Type":"application/json;charset=utf-8"},put:{"Content-Type":"application/json;charset=utf-8"}}},e=this.responseInterceptors=[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope","$q","$injector",function(a,b,c,j,i,k){function m(a){function c(a){var b=v({},a,{data:Pb(a.data,a.headers,f)});return 200<=a.status&&a.status<300?b:i.reject(b)}a.method=ma(a.method);var e=a.transformRequest||
-d.transformRequest,f=a.transformResponse||d.transformResponse,g=d.headers,g=v({"X-XSRF-TOKEN":b.cookies()["XSRF-TOKEN"]},g.common,g[y(a.method)],a.headers),e=Pb(a.data,Ob(g),e),j;w(a.data)&&delete g["Content-Type"];j=l(a,e,g);j=j.then(c,c);n(p,function(a){j=a(j)});j.success=function(b){j.then(function(c){b(c.data,c.status,c.headers,a)});return j};j.error=function(b){j.then(null,function(c){b(c.data,c.status,c.headers,a)});return j};return j}function l(b,c,d){function e(a,b,c){n&&(200<=a&&a<300?n.put(q,
-[a,b,Nb(c)]):n.remove(q));f(b,a,c);j.$apply()}function f(a,c,d){c=Math.max(c,0);(200<=c&&c<300?k.resolve:k.reject)({data:a,status:c,headers:Ob(d),config:b})}function h(){var a=Aa(m.pendingRequests,b);a!==-1&&m.pendingRequests.splice(a,1)}var k=i.defer(),l=k.promise,n,p,q=t(b.url,b.params);m.pendingRequests.push(b);l.then(h,h);b.cache&&b.method=="GET"&&(n=M(b.cache)?b.cache:o);if(n)if(p=n.get(q))if(p.then)return p.then(h,h),p;else B(p)?f(p[1],p[0],U(p[2])):f(p,200,{});else n.put(q,l);p||a(b.method,
-q,c,e,d,b.timeout,b.withCredentials);return l}function t(a,b){if(!b)return a;var c=[];fc(b,function(a,b){a==null||a==q||(M(a)&&(a=da(a)),c.push(encodeURIComponent(b)+"="+encodeURIComponent(a)))});return a+(a.indexOf("?")==-1?"?":"&")+c.join("&")}var o=c("$http"),p=[];n(e,function(a){p.push(A(a)?k.get(a):k.invoke(a))});m.pendingRequests=[];(function(a){n(arguments,function(a){m[a]=function(b,c){return m(v(c||{},{method:a,url:b}))}})})("get","delete","head","jsonp");(function(a){n(arguments,function(a){m[a]=
-function(b,c,d){return m(v(d||{},{method:a,url:b,data:c}))}})})("post","put");m.defaults=d;return m}]}function Wc(){this.$get=["$browser","$window","$document",function(b,a,c){return Xc(b,Yc,b.defer,a.angular.callbacks,c[0],a.location.protocol.replace(":",""))}]}function Xc(b,a,c,d,e,g){function h(a,b){var c=e.createElement("script"),d=function(){e.body.removeChild(c);b&&b()};c.type="text/javascript";c.src=a;Z?c.onreadystatechange=function(){/loaded|complete/.test(c.readyState)&&d()}:c.onload=c.onerror=
-d;e.body.appendChild(c)}return function(e,j,i,k,m,l,t){function o(a,c,d,e){c=(j.match(Gb)||["",g])[1]=="file"?d?200:404:c;a(c==1223?204:c,d,e);b.$$completeOutstandingRequest(C)}b.$$incOutstandingRequestCount();j=j||b.url();if(y(e)=="jsonp"){var p="_"+(d.counter++).toString(36);d[p]=function(a){d[p].data=a};h(j.replace("JSON_CALLBACK","angular.callbacks."+p),function(){d[p].data?o(k,200,d[p].data):o(k,-2);delete d[p]})}else{var s=new a;s.open(e,j,!0);n(m,function(a,b){a&&s.setRequestHeader(b,a)});
-var q;s.onreadystatechange=function(){if(s.readyState==4){var a=s.getAllResponseHeaders(),b=["Cache-Control","Content-Language","Content-Type","Expires","Last-Modified","Pragma"];a||(a="",n(b,function(b){var c=s.getResponseHeader(b);c&&(a+=b+": "+c+"\n")}));o(k,q||s.status,s.responseText,a)}};if(t)s.withCredentials=!0;s.send(i||"");l>0&&c(function(){q=-1;s.abort()},l)}}}function Zc(){this.$get=function(){return{id:"en-us",NUMBER_FORMATS:{DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{minInt:1,minFrac:0,
-maxFrac:3,posPre:"",posSuf:"",negPre:"-",negSuf:"",gSize:3,lgSize:3},{minInt:1,minFrac:2,maxFrac:2,posPre:"\u00a4",posSuf:"",negPre:"(\u00a4",negSuf:")",gSize:3,lgSize:3}],CURRENCY_SYM:"$"},DATETIME_FORMATS:{MONTH:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),SHORTMONTH:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),DAY:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),SHORTDAY:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","),
-AMPMS:["AM","PM"],medium:"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a",fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",mediumDate:"MMM d, y",shortDate:"M/d/yy",mediumTime:"h:mm:ss a",shortTime:"h:mm a"},pluralCat:function(b){return b===1?"one":"other"}}}}function $c(){this.$get=["$rootScope","$browser","$q","$exceptionHandler",function(b,a,c,d){function e(e,f,j){var i=c.defer(),k=i.promise,m=x(j)&&!j,f=a.defer(function(){try{i.resolve(e())}catch(a){i.reject(a),d(a)}m||b.$apply()},f),j=function(){delete g[k.$$timeoutId]};
-k.$$timeoutId=f;g[f]=i;k.then(j,j);return k}var g={};e.cancel=function(b){return b&&b.$$timeoutId in g?(g[b.$$timeoutId].reject("canceled"),a.defer.cancel(b.$$timeoutId)):!1};return e}]}function Qb(b){function a(a,e){return b.factory(a+c,e)}var c="Filter";this.register=a;this.$get=["$injector",function(a){return function(b){return a.get(b+c)}}];a("currency",Rb);a("date",Sb);a("filter",ad);a("json",bd);a("limitTo",cd);a("lowercase",dd);a("number",Tb);a("orderBy",Ub);a("uppercase",ed)}function ad(){return function(b,
-a){if(!B(b))return b;var c=[];c.check=function(a){for(var b=0;b<c.length;b++)if(!c[b](a))return!1;return!0};var d=function(a,b){if(b.charAt(0)==="!")return!d(a,b.substr(1));switch(typeof a){case "boolean":case "number":case "string":return(""+a).toLowerCase().indexOf(b)>-1;case "object":for(var c in a)if(c.charAt(0)!=="$"&&d(a[c],b))return!0;return!1;case "array":for(c=0;c<a.length;c++)if(d(a[c],b))return!0;return!1;default:return!1}};switch(typeof a){case "boolean":case "number":case "string":a=
-{$:a};case "object":for(var e in a)e=="$"?function(){var b=(""+a[e]).toLowerCase();b&&c.push(function(a){return d(a,b)})}():function(){var b=e,f=(""+a[e]).toLowerCase();f&&c.push(function(a){return d(gb(a,b),f)})}();break;case "function":c.push(a);break;default:return b}for(var g=[],h=0;h<b.length;h++){var f=b[h];c.check(f)&&g.push(f)}return g}}function Rb(b){var a=b.NUMBER_FORMATS;return function(b,d){if(w(d))d=a.CURRENCY_SYM;return Vb(b,a.PATTERNS[1],a.GROUP_SEP,a.DECIMAL_SEP,2).replace(/\u00A4/g,
-d)}}function Tb(b){var a=b.NUMBER_FORMATS;return function(b,d){return Vb(b,a.PATTERNS[0],a.GROUP_SEP,a.DECIMAL_SEP,d)}}function Vb(b,a,c,d,e){if(isNaN(b)||!isFinite(b))return"";var g=b<0,b=Math.abs(b),h=b+"",f="",j=[],i=!1;if(h.indexOf("e")!==-1){var k=h.match(/([\d\.]+)e(-?)(\d+)/);k&&k[2]=="-"&&k[3]>e+1?h="0":(f=h,i=!0)}if(!i){h=(h.split(Wb)[1]||"").length;w(e)&&(e=Math.min(Math.max(a.minFrac,h),a.maxFrac));var h=Math.pow(10,e),b=Math.round(b*h)/h,b=(""+b).split(Wb),h=b[0],b=b[1]||"",i=0,k=a.lgSize,
-m=a.gSize;if(h.length>=k+m)for(var i=h.length-k,l=0;l<i;l++)(i-l)%m===0&&l!==0&&(f+=c),f+=h.charAt(l);for(l=i;l<h.length;l++)(h.length-l)%k===0&&l!==0&&(f+=c),f+=h.charAt(l);for(;b.length<e;)b+="0";e&&e!=="0"&&(f+=d+b.substr(0,e))}j.push(g?a.negPre:a.posPre);j.push(f);j.push(g?a.negSuf:a.posSuf);return j.join("")}function jb(b,a,c){var d="";b<0&&(d="-",b=-b);for(b=""+b;b.length<a;)b="0"+b;c&&(b=b.substr(b.length-a));return d+b}function N(b,a,c,d){return function(e){e=e["get"+b]();if(c>0||e>-c)e+=
-c;e===0&&c==-12&&(e=12);return jb(e,a,d)}}function Ka(b,a){return function(c,d){var e=c["get"+b](),g=ma(a?"SHORT"+b:b);return d[g][e]}}function Sb(b){function a(a){var b;if(b=a.match(c)){var a=new Date(0),g=0,h=0;b[9]&&(g=E(b[9]+b[10]),h=E(b[9]+b[11]));a.setUTCFullYear(E(b[1]),E(b[2])-1,E(b[3]));a.setUTCHours(E(b[4]||0)-g,E(b[5]||0)-h,E(b[6]||0),E(b[7]||0))}return a}var c=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(c,e){var g=
-"",h=[],f,j,e=e||"mediumDate",e=b.DATETIME_FORMATS[e]||e;A(c)&&(c=fd.test(c)?E(c):a(c));Ra(c)&&(c=new Date(c));if(!oa(c))return c;for(;e;)(j=gd.exec(e))?(h=h.concat(ha.call(j,1)),e=h.pop()):(h.push(e),e=null);n(h,function(a){f=hd[a];g+=f?f(c,b.DATETIME_FORMATS):a.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return g}}function bd(){return function(b){return da(b,!0)}}function cd(){return function(b,a){if(!(b instanceof Array))return b;var a=E(a),c=[],d,e;if(!b||!(b instanceof Array))return c;a>b.length?
-a=b.length:a<-b.length&&(a=-b.length);a>0?(d=0,e=a):(d=b.length+a,e=b.length);for(;d<e;d++)c.push(b[d]);return c}}function Ub(b){return function(a,c,d){function e(a,b){return Va(b)?function(b,c){return a(c,b)}:a}if(!B(a))return a;if(!c)return a;for(var c=B(c)?c:[c],c=Sa(c,function(a){var c=!1,d=a||na;if(A(a)){if(a.charAt(0)=="+"||a.charAt(0)=="-")c=a.charAt(0)=="-",a=a.substring(1);d=b(a)}return e(function(a,b){var c;c=d(a);var e=d(b),f=typeof c,g=typeof e;f==g?(f=="string"&&(c=c.toLowerCase()),f==
-"string"&&(e=e.toLowerCase()),c=c===e?0:c<e?-1:1):c=f<g?-1:1;return c},c)}),g=[],h=0;h<a.length;h++)g.push(a[h]);return g.sort(e(function(a,b){for(var d=0;d<c.length;d++){var e=c[d](a,b);if(e!==0)return e}return 0},d))}}function Q(b){H(b)&&(b={link:b});b.restrict=b.restrict||"AC";return I(b)}function Xb(b,a){function c(a,c){c=c?"-"+Za(c,"-"):"";b.removeClass((a?La:Ma)+c).addClass((a?Ma:La)+c)}var d=this,e=b.parent().controller("form")||Na,g=0,h=d.$error={};d.$name=a.name;d.$dirty=!1;d.$pristine=!0;
-d.$valid=!0;d.$invalid=!1;e.$addControl(d);b.addClass(Oa);c(!0);d.$addControl=function(a){a.$name&&!d.hasOwnProperty(a.$name)&&(d[a.$name]=a)};d.$removeControl=function(a){a.$name&&d[a.$name]===a&&delete d[a.$name];n(h,function(b,c){d.$setValidity(c,!0,a)})};d.$setValidity=function(a,b,i){var k=h[a];if(b){if(k&&(Ta(k,i),!k.length)){g--;if(!g)c(b),d.$valid=!0,d.$invalid=!1;h[a]=!1;c(!0,a);e.$setValidity(a,!0,d)}}else{g||c(b);if(k){if(Aa(k,i)!=-1)return}else h[a]=k=[],g++,c(!1,a),e.$setValidity(a,!1,
-d);k.push(i);d.$valid=!1;d.$invalid=!0}};d.$setDirty=function(){b.removeClass(Oa).addClass(Yb);d.$dirty=!0;d.$pristine=!1;e.$setDirty()}}function T(b){return w(b)||b===""||b===null||b!==b}function Pa(b,a,c,d,e,g){var h=function(){var c=O(a.val());d.$viewValue!==c&&b.$apply(function(){d.$setViewValue(c)})};if(e.hasEvent("input"))a.bind("input",h);else{var f;a.bind("keydown",function(a){a=a.keyCode;a===91||15<a&&a<19||37<=a&&a<=40||f||(f=g.defer(function(){h();f=null}))});a.bind("change",h)}d.$render=
-function(){a.val(T(d.$viewValue)?"":d.$viewValue)};var j=c.ngPattern,i=function(a,b){return T(b)||a.test(b)?(d.$setValidity("pattern",!0),b):(d.$setValidity("pattern",!1),q)};j&&(j.match(/^\/(.*)\/$/)?(j=RegExp(j.substr(1,j.length-2)),e=function(a){return i(j,a)}):e=function(a){var c=b.$eval(j);if(!c||!c.test)throw Error("Expected "+j+" to be a RegExp but was "+c);return i(c,a)},d.$formatters.push(e),d.$parsers.push(e));if(c.ngMinlength){var k=E(c.ngMinlength),e=function(a){return!T(a)&&a.length<
-k?(d.$setValidity("minlength",!1),q):(d.$setValidity("minlength",!0),a)};d.$parsers.push(e);d.$formatters.push(e)}if(c.ngMaxlength){var m=E(c.ngMaxlength),c=function(a){return!T(a)&&a.length>m?(d.$setValidity("maxlength",!1),q):(d.$setValidity("maxlength",!0),a)};d.$parsers.push(c);d.$formatters.push(c)}}function kb(b,a){b="ngClass"+b;return Q(function(c,d,e){function g(b){if(a===!0||c.$index%2===a)j&&b!==j&&h(j),f(b);j=b}function h(a){M(a)&&!B(a)&&(a=Sa(a,function(a,b){if(a)return b}));d.removeClass(B(a)?
-a.join(" "):a)}function f(a){M(a)&&!B(a)&&(a=Sa(a,function(a,b){if(a)return b}));a&&d.addClass(B(a)?a.join(" "):a)}var j=q;c.$watch(e[b],g,!0);e.$observe("class",function(){var a=c.$eval(e[b]);g(a,a)});b!=="ngClass"&&c.$watch("$index",function(d,g){var j=d%2;j!==g%2&&(j==a?f(c.$eval(e[b])):h(c.$eval(e[b])))})})}var y=function(b){return A(b)?b.toLowerCase():b},ma=function(b){return A(b)?b.toUpperCase():b},Z=E((/msie (\d+)/.exec(y(navigator.userAgent))||[])[1]),u,ca,ha=[].slice,Qa=[].push,xa=Object.prototype.toString,
-Zb=X.angular||(X.angular={}),ta,fb,aa=["0","0","0"];C.$inject=[];na.$inject=[];fb=Z<9?function(b){b=b.nodeName?b:b[0];return b.scopeName&&b.scopeName!="HTML"?ma(b.scopeName+":"+b.nodeName):b.nodeName}:function(b){return b.nodeName?b.nodeName:b[0].nodeName};var kc=/[A-Z]/g,id={full:"1.0.5",major:1,minor:0,dot:5,codeName:"flatulent-propulsion"},Ca=L.cache={},Ba=L.expando="ng-"+(new Date).getTime(),oc=1,$b=X.document.addEventListener?function(b,a,c){b.addEventListener(a,c,!1)}:function(b,a,c){b.attachEvent("on"+
-a,c)},db=X.document.removeEventListener?function(b,a,c){b.removeEventListener(a,c,!1)}:function(b,a,c){b.detachEvent("on"+a,c)},mc=/([\:\-\_]+(.))/g,nc=/^moz([A-Z])/,va=L.prototype={ready:function(b){function a(){c||(c=!0,b())}var c=!1;this.bind("DOMContentLoaded",a);L(X).bind("load",a)},toString:function(){var b=[];n(this,function(a){b.push(""+a)});return"["+b.join(", ")+"]"},eq:function(b){return b>=0?u(this[b]):u(this[this.length+b])},length:0,push:Qa,sort:[].sort,splice:[].splice},Fa={};n("multiple,selected,checked,disabled,readOnly,required".split(","),
-function(b){Fa[y(b)]=b});var Ab={};n("input,select,option,textarea,button,form".split(","),function(b){Ab[ma(b)]=!0});n({data:vb,inheritedData:Ea,scope:function(b){return Ea(b,"$scope")},controller:yb,injector:function(b){return Ea(b,"$injector")},removeAttr:function(b,a){b.removeAttribute(a)},hasClass:Da,css:function(b,a,c){a=sb(a);if(x(c))b.style[a]=c;else{var d;Z<=8&&(d=b.currentStyle&&b.currentStyle[a],d===""&&(d="auto"));d=d||b.style[a];Z<=8&&(d=d===""?q:d);return d}},attr:function(b,a,c){var d=
-y(a);if(Fa[d])if(x(c))c?(b[a]=!0,b.setAttribute(a,d)):(b[a]=!1,b.removeAttribute(d));else return b[a]||(b.attributes.getNamedItem(a)||C).specified?d:q;else if(x(c))b.setAttribute(a,c);else if(b.getAttribute)return b=b.getAttribute(a,2),b===null?q:b},prop:function(b,a,c){if(x(c))b[a]=c;else return b[a]},text:v(Z<9?function(b,a){if(b.nodeType==1){if(w(a))return b.innerText;b.innerText=a}else{if(w(a))return b.nodeValue;b.nodeValue=a}}:function(b,a){if(w(a))return b.textContent;b.textContent=a},{$dv:""}),
-val:function(b,a){if(w(a))return b.value;b.value=a},html:function(b,a){if(w(a))return b.innerHTML;for(var c=0,d=b.childNodes;c<d.length;c++)sa(d[c]);b.innerHTML=a}},function(b,a){L.prototype[a]=function(a,d){var e,g;if((b.length==2&&b!==Da&&b!==yb?a:d)===q)if(M(a)){for(e=0;e<this.length;e++)if(b===vb)b(this[e],a);else for(g in a)b(this[e],g,a[g]);return this}else{if(this.length)return b(this[0],a,d)}else{for(e=0;e<this.length;e++)b(this[e],a,d);return this}return b.$dv}});n({removeData:tb,dealoc:sa,
-bind:function a(c,d,e){var g=ba(c,"events"),h=ba(c,"handle");g||ba(c,"events",g={});h||ba(c,"handle",h=pc(c,g));n(d.split(" "),function(d){var j=g[d];if(!j){if(d=="mouseenter"||d=="mouseleave"){var i=0;g.mouseenter=[];g.mouseleave=[];a(c,"mouseover",function(a){i++;i==1&&h(a,"mouseenter")});a(c,"mouseout",function(a){i--;i==0&&h(a,"mouseleave")})}else $b(c,d,h),g[d]=[];j=g[d]}j.push(e)})},unbind:ub,replaceWith:function(a,c){var d,e=a.parentNode;sa(a);n(new L(c),function(c){d?e.insertBefore(c,d.nextSibling):
-e.replaceChild(c,a);d=c})},children:function(a){var c=[];n(a.childNodes,function(a){a.nodeType===1&&c.push(a)});return c},contents:function(a){return a.childNodes||[]},append:function(a,c){n(new L(c),function(c){a.nodeType===1&&a.appendChild(c)})},prepend:function(a,c){if(a.nodeType===1){var d=a.firstChild;n(new L(c),function(c){d?a.insertBefore(c,d):(a.appendChild(c),d=c)})}},wrap:function(a,c){var c=u(c)[0],d=a.parentNode;d&&d.replaceChild(c,a);c.appendChild(a)},remove:function(a){sa(a);var c=a.parentNode;
-c&&c.removeChild(a)},after:function(a,c){var d=a,e=a.parentNode;n(new L(c),function(a){e.insertBefore(a,d.nextSibling);d=a})},addClass:xb,removeClass:wb,toggleClass:function(a,c,d){w(d)&&(d=!Da(a,c));(d?xb:wb)(a,c)},parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},next:function(a){if(a.nextElementSibling)return a.nextElementSibling;for(a=a.nextSibling;a!=null&&a.nodeType!==1;)a=a.nextSibling;return a},find:function(a,c){return a.getElementsByTagName(c)},clone:cb,triggerHandler:function(a,
-c){var d=(ba(a,"events")||{})[c];n(d,function(c){c.call(a,null)})}},function(a,c){L.prototype[c]=function(c,e){for(var g,h=0;h<this.length;h++)g==q?(g=a(this[h],c,e),g!==q&&(g=u(g))):bb(g,a(this[h],c,e));return g==q?this:g}});Ga.prototype={put:function(a,c){this[fa(a)]=c},get:function(a){return this[fa(a)]},remove:function(a){var c=this[a=fa(a)];delete this[a];return c}};eb.prototype={push:function(a,c){var d=this[a=fa(a)];d?d.push(c):this[a]=[c]},shift:function(a){var c=this[a=fa(a)];if(c)return c.length==
-1?(delete this[a],c[0]):c.shift()},peek:function(a){if(a=this[fa(a)])return a[0]}};var rc=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,sc=/,/,tc=/^\s*(_?)(\S+?)\1\s*$/,qc=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,Db="Non-assignable model expression: ";Cb.$inject=["$provide"];var Ac=/^(x[\:\-_]|data[\:\-_])/i,Gb=/^([^:]+):\/\/(\w+:{0,1}\w*@)?([\w\.-]*)(:([0-9]+))?(\/[^\?#]*)?(\?([^#]*))?(#(.*))?$/,ac=/^([^\?#]*)?(\?([^#]*))?(#(.*))?$/,Hc=ac,Hb={http:80,https:443,ftp:21};hb.prototype={$$replace:!1,absUrl:Ia("$$absUrl"),
-url:function(a,c){if(w(a))return this.$$url;var d=ac.exec(a);d[1]&&this.path(decodeURIComponent(d[1]));if(d[2]||d[1])this.search(d[3]||"");this.hash(d[5]||"",c);return this},protocol:Ia("$$protocol"),host:Ia("$$host"),port:Ia("$$port"),path:Jb("$$path",function(a){return a.charAt(0)=="/"?a:"/"+a}),search:function(a,c){if(w(a))return this.$$search;x(c)?c===null?delete this.$$search[a]:this.$$search[a]=c:this.$$search=A(a)?Wa(a):a;this.$$compose();return this},hash:Jb("$$hash",na),replace:function(){this.$$replace=
-!0;return this}};Ha.prototype=za(hb.prototype);Ib.prototype=za(Ha.prototype);var Ja={"null":function(){return null},"true":function(){return!0},"false":function(){return!1},undefined:C,"+":function(a,c,d,e){d=d(a,c);e=e(a,c);return x(d)?x(e)?d+e:d:x(e)?e:q},"-":function(a,c,d,e){d=d(a,c);e=e(a,c);return(x(d)?d:0)-(x(e)?e:0)},"*":function(a,c,d,e){return d(a,c)*e(a,c)},"/":function(a,c,d,e){return d(a,c)/e(a,c)},"%":function(a,c,d,e){return d(a,c)%e(a,c)},"^":function(a,c,d,e){return d(a,c)^e(a,c)},
-"=":C,"==":function(a,c,d,e){return d(a,c)==e(a,c)},"!=":function(a,c,d,e){return d(a,c)!=e(a,c)},"<":function(a,c,d,e){return d(a,c)<e(a,c)},">":function(a,c,d,e){return d(a,c)>e(a,c)},"<=":function(a,c,d,e){return d(a,c)<=e(a,c)},">=":function(a,c,d,e){return d(a,c)>=e(a,c)},"&&":function(a,c,d,e){return d(a,c)&&e(a,c)},"||":function(a,c,d,e){return d(a,c)||e(a,c)},"&":function(a,c,d,e){return d(a,c)&e(a,c)},"|":function(a,c,d,e){return e(a,c)(a,c,d(a,c))},"!":function(a,c,d){return!d(a,c)}},Lc=
-{n:"\n",f:"\u000c",r:"\r",t:"\t",v:"\u000b","'":"'",'"':'"'},ib={},Yc=X.XMLHttpRequest||function(){try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(a){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(c){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(d){}throw Error("This browser does not support XMLHttpRequest.");};Qb.$inject=["$provide"];Rb.$inject=["$locale"];Tb.$inject=["$locale"];var Wb=".",hd={yyyy:N("FullYear",4),yy:N("FullYear",2,0,!0),y:N("FullYear",1),MMMM:Ka("Month"),
-MMM:Ka("Month",!0),MM:N("Month",2,1),M:N("Month",1,1),dd:N("Date",2),d:N("Date",1),HH:N("Hours",2),H:N("Hours",1),hh:N("Hours",2,-12),h:N("Hours",1,-12),mm:N("Minutes",2),m:N("Minutes",1),ss:N("Seconds",2),s:N("Seconds",1),EEEE:Ka("Day"),EEE:Ka("Day",!0),a:function(a,c){return a.getHours()<12?c.AMPMS[0]:c.AMPMS[1]},Z:function(a){var a=-1*a.getTimezoneOffset(),c=a>=0?"+":"";c+=jb(a/60,2)+jb(Math.abs(a%60),2);return c}},gd=/((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z))(.*)/,
-fd=/^\d+$/;Sb.$inject=["$locale"];var dd=I(y),ed=I(ma);Ub.$inject=["$parse"];var jd=I({restrict:"E",compile:function(a,c){Z<=8&&(!c.href&&!c.name&&c.$set("href",""),a.append(Y.createComment("IE fix")));return function(a,c){c.bind("click",function(a){c.attr("href")||a.preventDefault()})}}}),lb={};n(Fa,function(a,c){var d=ea("ng-"+c);lb[d]=function(){return{priority:100,compile:function(){return function(a,g,h){a.$watch(h[d],function(a){h.$set(c,!!a)})}}}}});n(["src","href"],function(a){var c=ea("ng-"+
-a);lb[c]=function(){return{priority:99,link:function(d,e,g){g.$observe(c,function(c){c&&(g.$set(a,c),Z&&e.prop(a,g[a]))})}}}});var Na={$addControl:C,$removeControl:C,$setValidity:C,$setDirty:C};Xb.$inject=["$element","$attrs","$scope"];var Qa=function(a){return["$timeout",function(c){var d={name:"form",restrict:"E",controller:Xb,compile:function(){return{pre:function(a,d,h,f){if(!h.action){var j=function(a){a.preventDefault?a.preventDefault():a.returnValue=!1};$b(d[0],"submit",j);d.bind("$destroy",
-function(){c(function(){db(d[0],"submit",j)},0,!1)})}var i=d.parent().controller("form"),k=h.name||h.ngForm;k&&(a[k]=f);i&&d.bind("$destroy",function(){i.$removeControl(f);k&&(a[k]=q);v(f,Na)})}}}};return a?v(U(d),{restrict:"EAC"}):d}]},kd=Qa(),ld=Qa(!0),md=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,nd=/^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/,od=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,bc={text:Pa,number:function(a,c,d,e,g,h){Pa(a,c,d,e,g,h);e.$parsers.push(function(a){var c=
-T(a);return c||od.test(a)?(e.$setValidity("number",!0),a===""?null:c?a:parseFloat(a)):(e.$setValidity("number",!1),q)});e.$formatters.push(function(a){return T(a)?"":""+a});if(d.min){var f=parseFloat(d.min),a=function(a){return!T(a)&&a<f?(e.$setValidity("min",!1),q):(e.$setValidity("min",!0),a)};e.$parsers.push(a);e.$formatters.push(a)}if(d.max){var j=parseFloat(d.max),d=function(a){return!T(a)&&a>j?(e.$setValidity("max",!1),q):(e.$setValidity("max",!0),a)};e.$parsers.push(d);e.$formatters.push(d)}e.$formatters.push(function(a){return T(a)||
-Ra(a)?(e.$setValidity("number",!0),a):(e.$setValidity("number",!1),q)})},url:function(a,c,d,e,g,h){Pa(a,c,d,e,g,h);a=function(a){return T(a)||md.test(a)?(e.$setValidity("url",!0),a):(e.$setValidity("url",!1),q)};e.$formatters.push(a);e.$parsers.push(a)},email:function(a,c,d,e,g,h){Pa(a,c,d,e,g,h);a=function(a){return T(a)||nd.test(a)?(e.$setValidity("email",!0),a):(e.$setValidity("email",!1),q)};e.$formatters.push(a);e.$parsers.push(a)},radio:function(a,c,d,e){w(d.name)&&c.attr("name",ya());c.bind("click",
-function(){c[0].checked&&a.$apply(function(){e.$setViewValue(d.value)})});e.$render=function(){c[0].checked=d.value==e.$viewValue};d.$observe("value",e.$render)},checkbox:function(a,c,d,e){var g=d.ngTrueValue,h=d.ngFalseValue;A(g)||(g=!0);A(h)||(h=!1);c.bind("click",function(){a.$apply(function(){e.$setViewValue(c[0].checked)})});e.$render=function(){c[0].checked=e.$viewValue};e.$formatters.push(function(a){return a===g});e.$parsers.push(function(a){return a?g:h})},hidden:C,button:C,submit:C,reset:C},
-cc=["$browser","$sniffer",function(a,c){return{restrict:"E",require:"?ngModel",link:function(d,e,g,h){h&&(bc[y(g.type)]||bc.text)(d,e,g,h,c,a)}}}],Ma="ng-valid",La="ng-invalid",Oa="ng-pristine",Yb="ng-dirty",pd=["$scope","$exceptionHandler","$attrs","$element","$parse",function(a,c,d,e,g){function h(a,c){c=c?"-"+Za(c,"-"):"";e.removeClass((a?La:Ma)+c).addClass((a?Ma:La)+c)}this.$modelValue=this.$viewValue=Number.NaN;this.$parsers=[];this.$formatters=[];this.$viewChangeListeners=[];this.$pristine=
-!0;this.$dirty=!1;this.$valid=!0;this.$invalid=!1;this.$name=d.name;var f=g(d.ngModel),j=f.assign;if(!j)throw Error(Db+d.ngModel+" ("+qa(e)+")");this.$render=C;var i=e.inheritedData("$formController")||Na,k=0,m=this.$error={};e.addClass(Oa);h(!0);this.$setValidity=function(a,c){if(m[a]!==!c){if(c){if(m[a]&&k--,!k)h(!0),this.$valid=!0,this.$invalid=!1}else h(!1),this.$invalid=!0,this.$valid=!1,k++;m[a]=!c;h(c,a);i.$setValidity(a,c,this)}};this.$setViewValue=function(d){this.$viewValue=d;if(this.$pristine)this.$dirty=
-!0,this.$pristine=!1,e.removeClass(Oa).addClass(Yb),i.$setDirty();n(this.$parsers,function(a){d=a(d)});if(this.$modelValue!==d)this.$modelValue=d,j(a,d),n(this.$viewChangeListeners,function(a){try{a()}catch(d){c(d)}})};var l=this;a.$watch(function(){var c=f(a);if(l.$modelValue!==c){var d=l.$formatters,e=d.length;for(l.$modelValue=c;e--;)c=d[e](c);if(l.$viewValue!==c)l.$viewValue=c,l.$render()}})}],qd=function(){return{require:["ngModel","^?form"],controller:pd,link:function(a,c,d,e){var g=e[0],h=
-e[1]||Na;h.$addControl(g);c.bind("$destroy",function(){h.$removeControl(g)})}}},rd=I({require:"ngModel",link:function(a,c,d,e){e.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}),dc=function(){return{require:"?ngModel",link:function(a,c,d,e){if(e){d.required=!0;var g=function(a){if(d.required&&(T(a)||a===!1))e.$setValidity("required",!1);else return e.$setValidity("required",!0),a};e.$formatters.push(g);e.$parsers.unshift(g);d.$observe("required",function(){g(e.$viewValue)})}}}},sd=function(){return{require:"ngModel",
-link:function(a,c,d,e){var g=(a=/\/(.*)\//.exec(d.ngList))&&RegExp(a[1])||d.ngList||",";e.$parsers.push(function(a){var c=[];a&&n(a.split(g),function(a){a&&c.push(O(a))});return c});e.$formatters.push(function(a){return B(a)?a.join(", "):q})}}},td=/^(true|false|\d+)$/,ud=function(){return{priority:100,compile:function(a,c){return td.test(c.ngValue)?function(a,c,g){g.$set("value",a.$eval(g.ngValue))}:function(a,c,g){a.$watch(g.ngValue,function(a){g.$set("value",a,!1)})}}}},vd=Q(function(a,c,d){c.addClass("ng-binding").data("$binding",
-d.ngBind);a.$watch(d.ngBind,function(a){c.text(a==q?"":a)})}),wd=["$interpolate",function(a){return function(c,d,e){c=a(d.attr(e.$attr.ngBindTemplate));d.addClass("ng-binding").data("$binding",c);e.$observe("ngBindTemplate",function(a){d.text(a)})}}],xd=[function(){return function(a,c,d){c.addClass("ng-binding").data("$binding",d.ngBindHtmlUnsafe);a.$watch(d.ngBindHtmlUnsafe,function(a){c.html(a||"")})}}],yd=kb("",!0),zd=kb("Odd",0),Ad=kb("Even",1),Bd=Q({compile:function(a,c){c.$set("ngCloak",q);
-a.removeClass("ng-cloak")}}),Cd=[function(){return{scope:!0,controller:"@"}}],Dd=["$sniffer",function(a){return{priority:1E3,compile:function(){a.csp=!0}}}],ec={};n("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave".split(" "),function(a){var c=ea("ng-"+a);ec[c]=["$parse",function(d){return function(e,g,h){var f=d(h[c]);g.bind(y(a),function(a){e.$apply(function(){f(e,{$event:a})})})}}]});var Ed=Q(function(a,c,d){c.bind("submit",function(){a.$apply(d.ngSubmit)})}),
-Fd=["$http","$templateCache","$anchorScroll","$compile",function(a,c,d,e){return{restrict:"ECA",terminal:!0,compile:function(g,h){var f=h.ngInclude||h.src,j=h.onload||"",i=h.autoscroll;return function(g,h){var l=0,n,o=function(){n&&(n.$destroy(),n=null);h.html("")};g.$watch(f,function(f){var s=++l;f?a.get(f,{cache:c}).success(function(a){s===l&&(n&&n.$destroy(),n=g.$new(),h.html(a),e(h.contents())(n),x(i)&&(!i||g.$eval(i))&&d(),n.$emit("$includeContentLoaded"),g.$eval(j))}).error(function(){s===l&&
-o()}):o()})}}}}],Gd=Q({compile:function(){return{pre:function(a,c,d){a.$eval(d.ngInit)}}}}),Hd=Q({terminal:!0,priority:1E3}),Id=["$locale","$interpolate",function(a,c){var d=/{}/g;return{restrict:"EA",link:function(e,g,h){var f=h.count,j=g.attr(h.$attr.when),i=h.offset||0,k=e.$eval(j),m={},l=c.startSymbol(),t=c.endSymbol();n(k,function(a,e){m[e]=c(a.replace(d,l+f+"-"+i+t))});e.$watch(function(){var c=parseFloat(e.$eval(f));return isNaN(c)?"":(k[c]||(c=a.pluralCat(c-i)),m[c](e,g,!0))},function(a){g.text(a)})}}}],
-Jd=Q({transclude:"element",priority:1E3,terminal:!0,compile:function(a,c,d){return function(a,c,h){var f=h.ngRepeat,h=f.match(/^\s*(.+)\s+in\s+(.*)\s*$/),j,i,k;if(!h)throw Error("Expected ngRepeat in form of '_item_ in _collection_' but got '"+f+"'.");f=h[1];j=h[2];h=f.match(/^(?:([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\))$/);if(!h)throw Error("'item' in 'item in collection' should be identifier or (key, value) but got '"+f+"'.");i=h[3]||h[1];k=h[2];var m=new eb;a.$watch(function(a){var e,f,h=a.$eval(j),
-n=c,q=new eb,x,z,u,w,r,v;if(B(h))r=h||[];else{r=[];for(u in h)h.hasOwnProperty(u)&&u.charAt(0)!="$"&&r.push(u);r.sort()}x=r.length;e=0;for(f=r.length;e<f;e++){u=h===r?e:r[e];w=h[u];if(v=m.shift(w)){z=v.scope;q.push(w,v);if(e!==v.index)v.index=e,n.after(v.element);n=v.element}else z=a.$new();z[i]=w;k&&(z[k]=u);z.$index=e;z.$first=e===0;z.$last=e===x-1;z.$middle=!(z.$first||z.$last);v||d(z,function(a){n.after(a);v={scope:z,element:n=a,index:e};q.push(w,v)})}for(u in m)if(m.hasOwnProperty(u))for(r=m[u];r.length;)w=
-r.pop(),w.element.remove(),w.scope.$destroy();m=q})}}}),Kd=Q(function(a,c,d){a.$watch(d.ngShow,function(a){c.css("display",Va(a)?"":"none")})}),Ld=Q(function(a,c,d){a.$watch(d.ngHide,function(a){c.css("display",Va(a)?"none":"")})}),Md=Q(function(a,c,d){a.$watch(d.ngStyle,function(a,d){d&&a!==d&&n(d,function(a,d){c.css(d,"")});a&&c.css(a)},!0)}),Nd=I({restrict:"EA",require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(a,c,d,e){var g,h,f;a.$watch(d.ngSwitch||d.on,function(j){h&&
-(f.$destroy(),h.remove(),h=f=null);if(g=e.cases["!"+j]||e.cases["?"])a.$eval(d.change),f=a.$new(),g(f,function(a){h=a;c.append(a)})})}}),Od=Q({transclude:"element",priority:500,require:"^ngSwitch",compile:function(a,c,d){return function(a,g,h,f){f.cases["!"+c.ngSwitchWhen]=d}}}),Pd=Q({transclude:"element",priority:500,require:"^ngSwitch",compile:function(a,c,d){return function(a,c,h,f){f.cases["?"]=d}}}),Qd=Q({controller:["$transclude","$element",function(a,c){a(function(a){c.append(a)})}]}),Rd=["$http",
-"$templateCache","$route","$anchorScroll","$compile","$controller",function(a,c,d,e,g,h){return{restrict:"ECA",terminal:!0,link:function(a,c,i){function k(){var i=d.current&&d.current.locals,k=i&&i.$template;if(k){c.html(k);m&&(m.$destroy(),m=null);var k=g(c.contents()),n=d.current;m=n.scope=a.$new();if(n.controller)i.$scope=m,i=h(n.controller,i),c.children().data("$ngControllerController",i);k(m);m.$emit("$viewContentLoaded");m.$eval(l);e()}else c.html(""),m&&(m.$destroy(),m=null)}var m,l=i.onload||
-"";a.$on("$routeChangeSuccess",k);k()}}}],Sd=["$templateCache",function(a){return{restrict:"E",terminal:!0,compile:function(c,d){d.type=="text/ng-template"&&a.put(d.id,c[0].text)}}}],Td=I({terminal:!0}),Ud=["$compile","$parse",function(a,c){var d=/^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w\d]*)|(?:\(\s*([\$\w][\$\w\d]*)\s*,\s*([\$\w][\$\w\d]*)\s*\)))\s+in\s+(.*)$/,e={$setViewValue:C};return{restrict:"E",require:["select","?ngModel"],controller:["$element","$scope",
-"$attrs",function(a,c,d){var j=this,i={},k=e,m;j.databound=d.ngModel;j.init=function(a,c,d){k=a;m=d};j.addOption=function(c){i[c]=!0;k.$viewValue==c&&(a.val(c),m.parent()&&m.remove())};j.removeOption=function(a){this.hasOption(a)&&(delete i[a],k.$viewValue==a&&this.renderUnknownOption(a))};j.renderUnknownOption=function(c){c="? "+fa(c)+" ?";m.val(c);a.prepend(m);a.val(c);m.prop("selected",!0)};j.hasOption=function(a){return i.hasOwnProperty(a)};c.$on("$destroy",function(){j.renderUnknownOption=C})}],
-link:function(e,h,f,j){function i(a,c,d,e){d.$render=function(){var a=d.$viewValue;e.hasOption(a)?(y.parent()&&y.remove(),c.val(a),a===""&&v.prop("selected",!0)):w(a)&&v?c.val(""):e.renderUnknownOption(a)};c.bind("change",function(){a.$apply(function(){y.parent()&&y.remove();d.$setViewValue(c.val())})})}function k(a,c,d){var e;d.$render=function(){var a=new Ga(d.$viewValue);n(c.find("option"),function(c){c.selected=x(a.get(c.value))})};a.$watch(function(){ga(e,d.$viewValue)||(e=U(d.$viewValue),d.$render())});
-c.bind("change",function(){a.$apply(function(){var a=[];n(c.find("option"),function(c){c.selected&&a.push(c.value)});d.$setViewValue(a)})})}function m(e,f,g){function h(){var a={"":[]},c=[""],d,i,p,u,v;p=g.$modelValue;u=t(e)||[];var w=l?mb(u):u,x,y,A;y={};v=!1;var B,E;if(o)v=new Ga(p);else if(p===null||s)a[""].push({selected:p===null,id:"",label:""}),v=!0;for(A=0;x=w.length,A<x;A++){y[k]=u[l?y[l]=w[A]:A];d=m(e,y)||"";if(!(i=a[d]))i=a[d]=[],c.push(d);o?d=v.remove(n(e,y))!=q:(d=p===n(e,y),v=v||d);B=
-j(e,y);B=B===q?"":B;i.push({id:l?w[A]:A,label:B,selected:d})}!o&&!v&&a[""].unshift({id:"?",label:"",selected:!0});y=0;for(w=c.length;y<w;y++){d=c[y];i=a[d];if(r.length<=y)p={element:z.clone().attr("label",d),label:i.label},u=[p],r.push(u),f.append(p.element);else if(u=r[y],p=u[0],p.label!=d)p.element.attr("label",p.label=d);B=null;A=0;for(x=i.length;A<x;A++)if(d=i[A],v=u[A+1]){B=v.element;if(v.label!==d.label)B.text(v.label=d.label);if(v.id!==d.id)B.val(v.id=d.id);if(v.element.selected!==d.selected)B.prop("selected",
-v.selected=d.selected)}else d.id===""&&s?E=s:(E=C.clone()).val(d.id).attr("selected",d.selected).text(d.label),u.push({element:E,label:d.label,id:d.id,selected:d.selected}),B?B.after(E):p.element.append(E),B=E;for(A++;u.length>A;)u.pop().element.remove()}for(;r.length>y;)r.pop()[0].element.remove()}var i;if(!(i=p.match(d)))throw Error("Expected ngOptions in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '"+p+"'.");var j=c(i[2]||i[1]),k=i[4]||i[6],l=i[5],m=c(i[3]||""),
-n=c(i[2]?i[1]:k),t=c(i[7]),r=[[{element:f,label:""}]];s&&(a(s)(e),s.removeClass("ng-scope"),s.remove());f.html("");f.bind("change",function(){e.$apply(function(){var a,c=t(e)||[],d={},h,i,j,m,p,s;if(o){i=[];m=0;for(s=r.length;m<s;m++){a=r[m];j=1;for(p=a.length;j<p;j++)if((h=a[j].element)[0].selected)h=h.val(),l&&(d[l]=h),d[k]=c[h],i.push(n(e,d))}}else h=f.val(),h=="?"?i=q:h==""?i=null:(d[k]=c[h],l&&(d[l]=h),i=n(e,d));g.$setViewValue(i)})});g.$render=h;e.$watch(h)}if(j[1]){for(var l=j[0],t=j[1],o=
-f.multiple,p=f.ngOptions,s=!1,v,C=u(Y.createElement("option")),z=u(Y.createElement("optgroup")),y=C.clone(),j=0,A=h.children(),r=A.length;j<r;j++)if(A[j].value==""){v=s=A.eq(j);break}l.init(t,s,y);if(o&&(f.required||f.ngRequired)){var B=function(a){t.$setValidity("required",!f.required||a&&a.length);return a};t.$parsers.push(B);t.$formatters.unshift(B);f.$observe("required",function(){B(t.$viewValue)})}p?m(e,h,t):o?k(e,h,t):i(e,h,t,l)}}}}],Vd=["$interpolate",function(a){var c={addOption:C,removeOption:C};
-return{restrict:"E",priority:100,compile:function(d,e){if(w(e.value)){var g=a(d.text(),!0);g||e.$set("value",d.text())}return function(a,d,e){var i=d.parent(),k=i.data("$selectController")||i.parent().data("$selectController");k&&k.databound?d.prop("selected",!1):k=c;g?a.$watch(g,function(a,c){e.$set("value",a);a!==c&&k.removeOption(c);k.addOption(a)}):k.addOption(e.value);d.bind("$destroy",function(){k.removeOption(e.value)})}}}}],Wd=I({restrict:"E",terminal:!0});(ca=X.jQuery)?(u=ca,v(ca.fn,{scope:va.scope,
-controller:va.controller,injector:va.injector,inheritedData:va.inheritedData}),ab("remove",!0),ab("empty"),ab("html")):u=L;Zb.element=u;(function(a){v(a,{bootstrap:qb,copy:U,extend:v,equals:ga,element:u,forEach:n,injector:rb,noop:C,bind:Ua,toJson:da,fromJson:ob,identity:na,isUndefined:w,isDefined:x,isString:A,isFunction:H,isObject:M,isNumber:Ra,isElement:gc,isArray:B,version:id,isDate:oa,lowercase:y,uppercase:ma,callbacks:{counter:0}});ta=lc(X);try{ta("ngLocale")}catch(c){ta("ngLocale",[]).provider("$locale",
-Zc)}ta("ng",["ngLocale"],["$provide",function(a){a.provider("$compile",Cb).directive({a:jd,input:cc,textarea:cc,form:kd,script:Sd,select:Ud,style:Wd,option:Vd,ngBind:vd,ngBindHtmlUnsafe:xd,ngBindTemplate:wd,ngClass:yd,ngClassEven:Ad,ngClassOdd:zd,ngCsp:Dd,ngCloak:Bd,ngController:Cd,ngForm:ld,ngHide:Ld,ngInclude:Fd,ngInit:Gd,ngNonBindable:Hd,ngPluralize:Id,ngRepeat:Jd,ngShow:Kd,ngSubmit:Ed,ngStyle:Md,ngSwitch:Nd,ngSwitchWhen:Od,ngSwitchDefault:Pd,ngOptions:Td,ngView:Rd,ngTransclude:Qd,ngModel:qd,ngList:sd,
-ngChange:rd,required:dc,ngRequired:dc,ngValue:ud}).directive(lb).directive(ec);a.provider({$anchorScroll:uc,$browser:wc,$cacheFactory:xc,$controller:Bc,$document:Cc,$exceptionHandler:Dc,$filter:Qb,$interpolate:Ec,$http:Vc,$httpBackend:Wc,$location:Ic,$log:Jc,$parse:Nc,$route:Qc,$routeParams:Rc,$rootScope:Sc,$q:Oc,$sniffer:Tc,$templateCache:yc,$timeout:$c,$window:Uc})}])})(Zb);u(Y).ready(function(){jc(Y,qb)})})(window,document);angular.element(document).find("head").append('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak{display:none;}ng\\:form{display:block;}</style>');
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/js/lib/angular/version.txt
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/js/lib/angular/version.txt b/ocw-ui/frontend/app/js/lib/angular/version.txt
deleted file mode 100755
index 90a27f9..0000000
--- a/ocw-ui/frontend/app/js/lib/angular/version.txt
+++ /dev/null
@@ -1 +0,0 @@
-1.0.5
[08/28] CLIMATE-512 - Replace frontend with new Yeoman/Grunt/Bower
frontend
Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/js/lib/timeline/timeline-locales.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/js/lib/timeline/timeline-locales.js b/ocw-ui/frontend/app/js/lib/timeline/timeline-locales.js
deleted file mode 100644
index 0127a07..0000000
--- a/ocw-ui/frontend/app/js/lib/timeline/timeline-locales.js
+++ /dev/null
@@ -1,101 +0,0 @@
-if (typeof links === 'undefined') {
- links = {};
- links.locales = {};
-} else if (typeof links.locales === 'undefined') {
- links.locales = {};
-}
-
-// English ===================================================
-links.locales['en'] = {
- 'MONTHS': new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"),
- 'MONTHS_SHORT': new Array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"),
- 'DAYS': new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"),
- 'DAYS_SHORT': new Array("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"),
- 'ZOOM_IN': "Zoom in",
- 'ZOOM_OUT': "Zoom out",
- 'MOVE_LEFT': "Move left",
- 'MOVE_RIGHT': "Move right",
- 'NEW': "New",
- 'CREATE_NEW_EVENT': "Create new event"
-};
-
-links.locales['en_US'] = links.locales['en'];
-links.locales['en_UK'] = links.locales['en'];
-
-// Catalan ===================================================
-links.locales['ca'] = {
- 'MONTHS': new Array("Gener", "Febrer", "Març", "Abril", "Maig", "Juny", "Juliol", "Setembre", "Octubre", "Novembre", "Desembre"),
- 'MONTHS_SHORT': new Array("Gen", "Feb", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Oct", "Nov", "Des"),
- 'DAYS': new Array("Diumenge", "Dilluns", "Dimarts", "Dimecres", "Dijous", "Divendres", "Dissabte"),
- 'DAYS_SHORT': new Array("Dm.", "Dl.", "Dm.", "Dc.", "Dj.", "Dv.", "Ds."),
- 'ZOOM_IN': "Augmentar zoom",
- 'ZOOM_OUT': "Disminuir zoom",
- 'MOVE_LEFT': "Moure esquerra",
- 'MOVE_RIGHT': "Moure dreta",
- 'NEW': "Nou",
- 'CREATE_NEW_EVENT': "Crear nou event"
-};
-links.locales['ca-ES'] = links.locales['ca'];
-
-// German ===================================================
-links.locales['de'] = {
- 'MONTHS': new Array("Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"),
- 'MONTHS_SHORT': new Array("Jan", "Feb", "Mär", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"),
- 'DAYS': new Array("Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"),
- 'DAYS_SHORT': new Array("Son", "Mon", "Die", "Mit", "Don", "Fre", "Sam"),
- 'ZOOM_IN': "Vergrößern",
- 'ZOOM_OUT': "Verkleinern",
- 'MOVE_LEFT': "Nach links verschieben",
- 'MOVE_RIGHT': "Nach rechts verschieben",
- 'NEW': "Neu",
- 'CREATE_NEW_EVENT': "Neues Ereignis erzeugen"
-};
-
-links.locales['de_DE'] = links.locales['de'];
-links.locales['de_CH'] = links.locales['de'];
-
-// Danish ===================================================
-links.locales['da'] = {
- 'MONTHS': new Array("januar", "februar", "marts", "april", "maj", "juni", "juli", "august", "september", "oktober", "november", "december"),
- 'MONTHS_SHORT': new Array("jan", "feb", "mar", "apr", "maj", "jun", "jul", "aug", "sep", "okt", "nov", "dec"),
- 'DAYS': new Array("søndag", "mandag", "tirsdag", "onsdag", "torsdag", "fredag", "lørdag"),
- 'DAYS_SHORT': new Array("søn", "man", "tir", "ons", "tor", "fre", "lør"),
- 'ZOOM_IN': "Zoom in",
- 'ZOOM_OUT': "Zoom out",
- 'MOVE_LEFT': "Move left",
- 'MOVE_RIGHT': "Move right",
- 'NEW': "New",
- 'CREATE_NEW_EVENT': "Create new event"
-};
-links.locales['da_DK'] = links.locales['da'];
-
-// Russian ===================================================
-links.locales['ru'] = {
- 'MONTHS': new Array("Январь", "Февраль", "Март", "Апрель", "Май", "Июнь", "Июль", "Август", "Сентябрь", "Октябрь", "Ноябрь", "Декабрь"),
- 'MONTHS_SHORT': new Array("Янв", "Фев", "Мар", "Апр", "Май", "Июн", "Июл", "Авг", "Сен", "Окт", "Ноя", "Дек"),
- 'DAYS': new Array("Воскресенье", "Понедельник", "Вторник", "Среда", "Четверг", "Пятница", "Суббота"),
- 'DAYS_SHORT': new Array("Вос", "Пон", "Втo", "Срe", "Чет", "Пят", "Суб"),
- 'ZOOM_IN': "Увeличить",
- 'ZOOM_OUT': "Умeньшить",
- 'MOVE_LEFT': "Сдвинуть налeво",
- 'MOVE_RIGHT': "Сдвинуть направо",
- 'NEW': "Новый",
- 'CREATE_NEW_EVENT': "Создать новоe событиe"
-};
-links.locales['ru_RU'] = links.locales['ru'];
-
-// Spanish ===================================================
-links.locales['es'] = {
- 'MONTHS': new Array("Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"),
- 'MONTHS_SHORT': new Array("Ene", "Feb", "Mar", "Abr", "May", "Jun", "Jul", "Ago", "Sep", "Oct", "Nov", "Dic"),
- 'DAYS': new Array("Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado"),
- 'DAYS_SHORT': new Array("Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sáb"),
- 'ZOOM_IN': "Aumentar zoom",
- 'ZOOM_OUT': "Disminuir zoom",
- 'MOVE_LEFT': "Mover izquierda",
- 'MOVE_RIGHT': "Mover derecha",
- 'NEW': "Nuevo",
- 'CREATE_NEW_EVENT': "Crear nuevo evento"
-};
-
-links.locales['es_ES'] = links.locales['es'];
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/js/lib/timeline/timeline-min.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/js/lib/timeline/timeline-min.js b/ocw-ui/frontend/app/js/lib/timeline/timeline-min.js
deleted file mode 100644
index 72c26b5..0000000
--- a/ocw-ui/frontend/app/js/lib/timeline/timeline-min.js
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
-
- Licensed under the Apache License, Version 2.0 (the "License"); you may not
- use this file except in compliance with the License. You may obtain a copy
- of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- License for the specific language governing permissions and limitations under
- the License.
-
- Copyright (c) 2011-2013 Almende B.V.
-
- @author Jos de Jong, <jo...@almende.org>
- @date 2013-04-18
- @version 2.4.2
-*/
-typeof links==="undefined"&&(links={});typeof google==="undefined"&&(google=void 0);if(!Array.prototype.indexOf)Array.prototype.indexOf=function(a){for(var b=0;b<this.length;b++)if(this[b]==a)return b;return-1};if(!Array.prototype.forEach)Array.prototype.forEach=function(a,b){for(var c=0,d=this.length;c<d;++c)a.call(b||this,this[c],c,this)};
-links.Timeline=function(a){if(a){this.dom={};this.conversion={};this.eventParams={};this.groups=[];this.groupIndexes={};this.items=[];this.renderQueue={show:[],hide:[],update:[]};this.renderedItems=[];this.clusterGenerator=new links.Timeline.ClusterGenerator(this);this.currentClusters=[];this.selection=void 0;this.listeners={};this.size={actualHeight:0,axis:{characterMajorHeight:0,characterMajorWidth:0,characterMinorHeight:0,characterMinorWidth:0,height:0,labelMajorTop:0,labelMinorTop:0,line:0,lineMajorWidth:0,
-lineMinorHeight:0,lineMinorTop:0,lineMinorWidth:0,top:0},contentHeight:0,contentLeft:0,contentWidth:0,frameHeight:0,frameWidth:0,groupsLeft:0,groupsWidth:0,items:{top:0}};this.dom.container=a;this.options={width:"100%",height:"auto",minHeight:0,autoHeight:!0,eventMargin:10,eventMarginAxis:20,dragAreaWidth:10,min:void 0,max:void 0,zoomMin:10,zoomMax:31536E10,moveable:!0,zoomable:!0,selectable:!0,editable:!1,snapEvents:!0,groupChangeable:!0,showCurrentTime:!0,showCustomTime:!1,showMajorLabels:!0,showMinorLabels:!0,
-showNavigation:!1,showButtonNew:!1,groupsOnRight:!1,axisOnTop:!1,stackEvents:!0,animate:!0,animateZoom:!0,cluster:!1,style:"box",customStackOrder:!1,locale:"en",MONTHS:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),MONTHS_SHORT:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),DAYS:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),DAYS_SHORT:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","),ZOOM_IN:"Zoom in",ZOOM_OUT:"Zoom out",
-MOVE_LEFT:"Move left",MOVE_RIGHT:"Move right",NEW:"New",CREATE_NEW_EVENT:"Create new event"};this.clientTimeOffset=0;for(a=this.dom;a.container.hasChildNodes();)a.container.removeChild(a.container.firstChild);this.step=new links.Timeline.StepDate;this.itemTypes={box:links.Timeline.ItemBox,range:links.Timeline.ItemRange,dot:links.Timeline.ItemDot};this.data=[];this.firstDraw=!0;this.setVisibleChartRange(void 0,void 0,!1);this.render();var b=this;setTimeout(function(){b.trigger("ready")},0)}};
-links.Timeline.prototype.draw=function(a,b){this.setOptions(b);this.setData(a);b&&(b.start||b.end)?this.setVisibleChartRange(b.start,b.end):this.firstDraw&&this.setVisibleChartRangeAuto();this.firstDraw=!1};
-links.Timeline.prototype.setOptions=function(a){if(a){for(var b in a)a.hasOwnProperty(b)&&(this.options[b]=a[b]);if(typeof links.locales!=="undefined"&&this.options.locale!=="en"&&(b=links.locales[this.options.locale]))for(var c in b)b.hasOwnProperty(c)&&(this.options[c]=b[c]);if(a.showButtonAdd!=void 0)this.options.showButtonNew=a.showButtonAdd,console.log("WARNING: Option showButtonAdd is deprecated. Use showButtonNew instead");if(a.intervalMin!=void 0)this.options.zoomMin=a.intervalMin,console.log("WARNING: Option intervalMin is deprecated. Use zoomMin instead");
-if(a.intervalMax!=void 0)this.options.zoomMax=a.intervalMax,console.log("WARNING: Option intervalMax is deprecated. Use zoomMax instead");a.scale&&a.step&&this.step.setScale(a.scale,a.step)}this.options.autoHeight=this.options.height==="auto"};links.Timeline.prototype.addItemType=function(a,b){this.itemTypes[a]=b};
-links.Timeline.mapColumnIds=function(a){for(var b={},c=a.getNumberOfColumns(),d=!0,e=0;e<c;e++){var f=a.getColumnId(e)||a.getColumnLabel(e);b[f]=e;if(f=="start"||f=="end"||f=="content"||f=="group"||f=="className"||f=="editable")d=!1}if(d)b.start=0,b.end=1,b.content=2;return b};
-links.Timeline.prototype.setData=function(a){this.unselectItem();a||(a=[]);this.stackCancelAnimation();this.clearItems();this.data=a;var b=this.items;this.deleteGroups();if(google&&google.visualization&&a instanceof google.visualization.DataTable)for(var c=links.Timeline.mapColumnIds(a),d=0,e=a.getNumberOfRows();d<e;d++)b.push(this.createItem({start:c.start!=void 0?a.getValue(d,c.start):void 0,end:c.end!=void 0?a.getValue(d,c.end):void 0,content:c.content!=void 0?a.getValue(d,c.content):void 0,group:c.group!=
-void 0?a.getValue(d,c.group):void 0,className:c.className!=void 0?a.getValue(d,c.className):void 0,editable:c.editable!=void 0?a.getValue(d,c.editable):void 0}));else if(links.Timeline.isArray(a)){d=0;for(e=a.length;d<e;d++)c=this.createItem(a[d]),b.push(c)}else throw"Unknown data type. DataTable or Array expected.";this.options.cluster&&this.clusterGenerator.setData(this.items);this.render({animate:!1})};links.Timeline.prototype.getData=function(){return this.data};
-links.Timeline.prototype.updateData=function(a,b){var c=this.data,d;if(google&&google.visualization&&c instanceof google.visualization.DataTable){var e=a+1-c.getNumberOfRows();e>0&&c.addRows(e);e=links.Timeline.mapColumnIds(c);for(d in b)if(b.hasOwnProperty(d)){var f=e[d];if(f==void 0){var f=b[d],g="string";typeof f=="number"?g="number":typeof f=="boolean"?g="boolean":f instanceof Date&&(g="datetime");f=c.addColumn(g,d)}c.setValue(a,f,b[d])}}else if(links.Timeline.isArray(c))for(d in e=c[a],e==void 0&&
-(e={},c[a]=e),b)b.hasOwnProperty(d)&&(e[d]=b[d]);else throw"Cannot update data, unknown type of data";};links.Timeline.prototype.getItemIndex=function(a){for(var b=this.dom.items.frame,c=this.items,d=void 0;a.parentNode&&a.parentNode!==b;)a=a.parentNode;if(a.parentNode===b)for(var b=0,e=c.length;b<e;b++)if(c[b].dom===a){d=b;break}return d};
-links.Timeline.prototype.setSize=function(a,b){if(a)this.options.width=a,this.dom.frame.style.width=a;if(b&&(this.options.height=b,this.options.autoHeight=this.options.height==="auto",b!=="auto"))this.dom.frame.style.height=b;this.render({animate:!1})};
-links.Timeline.prototype.setVisibleChartRange=function(a,b,c){var d={};if(!a||!b)d=this.getDataRange(!0);if(!a)b?d.min&&d.min.valueOf()<b.valueOf()?a=d.min:(a=new Date(b.valueOf()),a.setDate(a.getDate()-7)):(a=new Date,a.setDate(a.getDate()-3));if(!b)d.max?b=d.max:(b=new Date(a.valueOf()),b.setDate(b.getDate()+7));b<=a&&(b=new Date(a.valueOf()),b.setDate(b.getDate()+7));d=this.options.min?this.options.min:void 0;d!=void 0&&a.valueOf()<d.valueOf()&&(a=new Date(d.valueOf()));d=this.options.max?this.options.max:
-void 0;d!=void 0&&b.valueOf()>d.valueOf()&&(b=new Date(d.valueOf()));this.applyRange(a,b);c==void 0||c==!0?this.render({animate:!1}):this.recalcConversion()};links.Timeline.prototype.setVisibleChartRangeAuto=function(){var a=this.getDataRange(!0);this.setVisibleChartRange(a.min,a.max)};links.Timeline.prototype.setVisibleChartRangeNow=function(){var a=this.end.valueOf()-this.start.valueOf(),b=new Date((new Date).valueOf()-a/2);this.setVisibleChartRange(b,new Date(b.valueOf()+a))};
-links.Timeline.prototype.getVisibleChartRange=function(){return{start:new Date(this.start.valueOf()),end:new Date(this.end.valueOf())}};
-links.Timeline.prototype.getDataRange=function(a){var b=this.items,c=void 0,d=void 0;if(b)for(var e=0,f=b.length;e<f;e++)var g=b[e],h=g.start!=void 0?g.start.valueOf():void 0,g=g.end!=void 0?g.end.valueOf():h,c=c!=void 0&&h!=void 0?Math.min(c.valueOf(),h.valueOf()):h,d=d!=void 0&&g!=void 0?Math.max(d,g):g;c&&d&&a&&(a=d-c,c-=a*0.05,d+=a*0.05);return{min:c!=void 0?new Date(c):void 0,max:d!=void 0?new Date(d):void 0}};
-links.Timeline.prototype.render=function(a){this.reflowFrame();this.reflowAxis();this.reflowGroups();this.reflowItems();var b=this.options.animate;if(a&&a.animate!=void 0)b=a.animate;this.recalcConversion();this.clusterItems();this.filterItems();this.stackItems(b);this.recalcItems();this.repaint()&&(b=a?a.renderTimesLeft:void 0,b==void 0&&(b=5),b>0&&this.render({animate:a?a.animate:void 0,renderTimesLeft:b-1}))};
-links.Timeline.prototype.repaint=function(){var a=this.repaintFrame(),b=this.repaintAxis(),c=this.repaintGroups(),d=this.repaintItems();this.repaintCurrentTime();this.repaintCustomTime();return a||b||c||d};links.Timeline.prototype.reflowFrame=function(){var a=this.dom,b=this.size,c=a.frame?a.frame.offsetWidth:0,d=a.frame?a.frame.clientHeight:0,a=(a=b.frameWidth!==c)||b.frameHeight!==d;b.frameWidth=c;b.frameHeight=d;return a};
-links.Timeline.prototype.repaintFrame=function(){var a=!1,b=this.dom,c=this.options,d=this.size;if(!b.frame)b.frame=document.createElement("DIV"),b.frame.className="timeline-frame",b.frame.style.position="relative",b.frame.style.overflow="hidden",b.container.appendChild(b.frame),a=!0;var e=c.autoHeight?d.actualHeight+"px":c.height||"100%",c=c.width||"100%",a=(a=a||b.frame.style.height!=e)||b.frame.style.width!=c;b.frame.style.height=e;b.frame.style.width=c;if(!b.content){b.content=document.createElement("DIV");
-b.content.style.position="relative";b.content.style.overflow="hidden";b.frame.appendChild(b.content);a=document.createElement("DIV");a.style.position="absolute";a.style.left="0px";a.style.top="0px";a.style.height="100%";a.style.width="0px";b.content.appendChild(a);b.contentTimelines=a;var a=this.eventParams,f=this;if(!a.onMouseDown)a.onMouseDown=function(a){f.onMouseDown(a)},links.Timeline.addEventListener(b.content,"mousedown",a.onMouseDown);if(!a.onTouchStart)a.onTouchStart=function(a){f.onTouchStart(a)},
-links.Timeline.addEventListener(b.content,"touchstart",a.onTouchStart);if(!a.onMouseWheel)a.onMouseWheel=function(a){f.onMouseWheel(a)},links.Timeline.addEventListener(b.content,"mousewheel",a.onMouseWheel);if(!a.onDblClick)a.onDblClick=function(a){f.onDblClick(a)},links.Timeline.addEventListener(b.content,"dblclick",a.onDblClick);a=!0}b.content.style.left=d.contentLeft+"px";b.content.style.top="0px";b.content.style.width=d.contentWidth+"px";b.content.style.height=d.frameHeight+"px";this.repaintNavigation();
-return a};
-links.Timeline.prototype.reflowAxis=function(){var a,b=this.options,c=this.size,d=this.dom.axis,e=d&&d.characterMinor?d.characterMinor.clientWidth:0,f=d&&d.characterMinor?d.characterMinor.clientHeight:0,g=d&&d.characterMajor?d.characterMajor.clientWidth:0,h=d&&d.characterMajor?d.characterMajor.clientHeight:0,j=(b.showMinorLabels?f:0)+(b.showMajorLabels?h:0),k=b.axisOnTop?0:c.frameHeight-j,l=b.axisOnTop?j:k;a=(a=(a=c.axis.top!==k)||c.axis.line!==l)||c.axis.height!==j;c.axis.top=k;c.axis.line=l;c.axis.height=
-j;c.axis.labelMajorTop=b.axisOnTop?0:l+(b.showMinorLabels?f:0);c.axis.labelMinorTop=b.axisOnTop?b.showMajorLabels?h:0:l;c.axis.lineMinorTop=b.axisOnTop?c.axis.labelMinorTop:0;c.axis.lineMinorHeight=b.showMajorLabels?c.frameHeight-h:c.frameHeight;c.axis.lineMinorWidth=d&&d.minorLines&&d.minorLines.length?d.minorLines[0].offsetWidth:1;c.axis.lineMajorWidth=d&&d.majorLines&&d.majorLines.length?d.majorLines[0].offsetWidth:1;a=(a=(a=(a=a||c.axis.characterMinorWidth!==e)||c.axis.characterMinorHeight!==
-f)||c.axis.characterMajorWidth!==g)||c.axis.characterMajorHeight!==h;c.axis.characterMinorWidth=e;c.axis.characterMinorHeight=f;c.axis.characterMajorWidth=g;c.axis.characterMajorHeight=h;d=Math.max(c.frameHeight-j,0);c.contentLeft=b.groupsOnRight?0:c.groupsWidth;c.contentWidth=Math.max(c.frameWidth-c.groupsWidth,0);c.contentHeight=d;return a};
-links.Timeline.prototype.repaintAxis=function(){var a=!1,b=this.dom,c=this.options,d=this.size,e=this.step,f=b.axis;if(!f)f={},b.axis=f;if(!d.axis.properties)d.axis.properties={};if(!f.minorTexts)f.minorTexts=[];if(!f.minorLines)f.minorLines=[];if(!f.majorTexts)f.majorTexts=[];if(!f.majorLines)f.majorLines=[];if(!f.frame)f.frame=document.createElement("DIV"),f.frame.style.position="absolute",f.frame.style.left="0px",f.frame.style.top="0px",b.content.appendChild(f.frame);b.content.removeChild(f.frame);
-f.frame.style.width=d.contentWidth+"px";f.frame.style.height=d.axis.height+"px";var g=this.screenToTime(0),h=this.screenToTime(d.contentWidth);if(d.axis.characterMinorWidth)this.minimumStep=this.screenToTime(d.axis.characterMinorWidth*6)-this.screenToTime(0),e.setRange(g,h,this.minimumStep);g=this.repaintAxisCharacters();a=a||g;this.repaintAxisStartOverwriting();e.start();g=void 0;for(h=0;!e.end()&&h<1E3;){h++;var j=this.timeToScreen(e.getCurrent()),k=e.isMajor();c.showMinorLabels&&this.repaintAxisMinorText(j,
-e.getLabelMinor(c));k&&c.showMajorLabels?(j>0&&(g==void 0&&(g=j),this.repaintAxisMajorText(j,e.getLabelMajor(c))),this.repaintAxisMajorLine(j)):this.repaintAxisMinorLine(j);e.next()}c.showMajorLabels&&(e=this.screenToTime(0),c=this.step.getLabelMajor(c,e),d=c.length*d.axis.characterMajorWidth+10,(g==void 0||d<g)&&this.repaintAxisMajorText(0,c,e));this.repaintAxisEndOverwriting();this.repaintAxisHorizontal();b.content.insertBefore(f.frame,b.content.firstChild);return a};
-links.Timeline.prototype.repaintAxisCharacters=function(){var a=!1,b=this.dom.axis;if(!b.characterMinor){var a=document.createTextNode("0"),c=document.createElement("DIV");c.className="timeline-axis-text timeline-axis-text-minor";c.appendChild(a);c.style.position="absolute";c.style.visibility="hidden";c.style.paddingLeft="0px";c.style.paddingRight="0px";b.frame.appendChild(c);b.characterMinor=c;a=!0}if(!b.characterMajor)a=document.createTextNode("0"),c=document.createElement("DIV"),c.className="timeline-axis-text timeline-axis-text-major",
-c.appendChild(a),c.style.position="absolute",c.style.visibility="hidden",c.style.paddingLeft="0px",c.style.paddingRight="0px",b.frame.appendChild(c),b.characterMajor=c,a=!0;return a};links.Timeline.prototype.repaintAxisStartOverwriting=function(){var a=this.size.axis.properties;a.minorTextNum=0;a.minorLineNum=0;a.majorTextNum=0;a.majorLineNum=0};
-links.Timeline.prototype.repaintAxisEndOverwriting=function(){var a=this.dom,b=this.size.axis.properties,c=this.dom.axis.frame,d,e=a.axis.minorTexts;for(d=b.minorTextNum;e.length>d;)c.removeChild(e[d]),e.splice(d,1);e=a.axis.minorLines;for(d=b.minorLineNum;e.length>d;)c.removeChild(e[d]),e.splice(d,1);e=a.axis.majorTexts;for(d=b.majorTextNum;e.length>d;)c.removeChild(e[d]),e.splice(d,1);a=a.axis.majorLines;for(d=b.majorLineNum;a.length>d;)c.removeChild(a[d]),a.splice(d,1)};
-links.Timeline.prototype.repaintAxisHorizontal=function(){var a=this.dom.axis,b=this.size,c=this.options;if(c=c.showMinorLabels||c.showMajorLabels){if(!a.backgroundLine){var d=document.createElement("DIV");d.className="timeline-axis";d.style.position="absolute";d.style.left="0px";d.style.width="100%";d.style.border="none";a.frame.insertBefore(d,a.frame.firstChild);a.backgroundLine=d}if(a.backgroundLine)a.backgroundLine.style.top=b.axis.top+"px",a.backgroundLine.style.height=b.axis.height+"px"}else a.backgroundLine&&
-(a.frame.removeChild(a.backgroundLine),delete a.backgroundLine);c?(a.line?(c=a.frame.removeChild(a.line),a.frame.appendChild(c)):(c=document.createElement("DIV"),c.className="timeline-axis",c.style.position="absolute",c.style.left="0px",c.style.width="100%",c.style.height="0px",a.frame.appendChild(c),a.line=c),a.line.style.top=b.axis.line+"px"):a.line&&a.line.parentElement&&(a.frame.removeChild(a.line),delete a.line)};
-links.Timeline.prototype.repaintAxisMinorText=function(a,b){var c=this.size,d=this.dom,e=c.axis.properties,f=d.axis.frame,d=d.axis.minorTexts,g=e.minorTextNum;if(g<d.length)g=d[g];else{var h=document.createTextNode(""),g=document.createElement("DIV");g.appendChild(h);g.className="timeline-axis-text timeline-axis-text-minor";g.style.position="absolute";f.appendChild(g);d.push(g)}g.childNodes[0].nodeValue=b;g.style.left=a+"px";g.style.top=c.axis.labelMinorTop+"px";e.minorTextNum++};
-links.Timeline.prototype.repaintAxisMinorLine=function(a){var b=this.size.axis,c=this.dom,d=b.properties,e=c.axis.frame,c=c.axis.minorLines,f=d.minorLineNum;f<c.length?f=c[f]:(f=document.createElement("DIV"),f.className="timeline-axis-grid timeline-axis-grid-minor",f.style.position="absolute",f.style.width="0px",e.appendChild(f),c.push(f));f.style.top=b.lineMinorTop+"px";f.style.height=b.lineMinorHeight+"px";f.style.left=a-b.lineMinorWidth/2+"px";d.minorLineNum++};
-links.Timeline.prototype.repaintAxisMajorText=function(a,b){var c=this.size,d=c.axis.properties,e=this.dom.axis.frame,f=this.dom.axis.majorTexts,g=d.majorTextNum;if(g<f.length)g=f[g];else{var h=document.createTextNode(b),g=document.createElement("DIV");g.className="timeline-axis-text timeline-axis-text-major";g.appendChild(h);g.style.position="absolute";g.style.top="0px";e.appendChild(g);f.push(g)}g.childNodes[0].nodeValue=b;g.style.top=c.axis.labelMajorTop+"px";g.style.left=a+"px";d.majorTextNum++};
-links.Timeline.prototype.repaintAxisMajorLine=function(a){var b=this.size,c=b.axis.properties,d=this.size.axis,e=this.dom.axis.frame,f=this.dom.axis.majorLines,g=c.majorLineNum;g<f.length?g=f[g]:(g=document.createElement("DIV"),g.className="timeline-axis-grid timeline-axis-grid-major",g.style.position="absolute",g.style.top="0px",g.style.width="0px",e.appendChild(g),f.push(g));g.style.left=a-d.lineMajorWidth/2+"px";g.style.height=b.frameHeight+"px";c.majorLineNum++};
-links.Timeline.prototype.reflowItems=function(){var a=!1,b,c,d;b=this.groups;var e=this.renderedItems;b&&b.forEach(function(a){a.itemsHeight=0});for(b=0,c=e.length;b<c;b++){var f=e[b],g=f.dom;d=f.group;if(g){var h=g?g.clientWidth:0,g=g?g.clientHeight:0,a=(a=a||f.width!=h)||f.height!=g;f.width=h;f.height=g;f.reflow()}if(d)d.itemsHeight=d.itemsHeight?Math.max(d.itemsHeight,f.height):f.height}return a};
-links.Timeline.prototype.recalcItems=function(){var a=!1,b,c,d,e;d=this.groups;var f=this.size,g=this.options,h=this.renderedItems,j=0;if(d.length==0){if(g.autoHeight||g.cluster){var k=j=0;if(this.stack&&this.stack.finalItems){e=this.stack.finalItems;if((d=e[0])&&d.top)j=d.top,k=d.top+d.height;for(b=1,c=e.length;b<c;b++)d=e[b],j=Math.min(j,d.top),k=Math.max(k,d.top+d.height)}else{if((d=h[0])&&d.top)j=d.top,k=d.top+d.height;for(b=1,c=h.length;b<c;b++)d=h[b],d.top&&(j=Math.min(j,d.top),k=Math.max(k,
-d.top+d.height))}j=k-j+2*g.eventMarginAxis+f.axis.height;if(j<g.minHeight)j=g.minHeight;if(f.actualHeight!=j&&g.autoHeight&&!g.axisOnTop)if(d=j-f.actualHeight,this.stack&&this.stack.finalItems){e=this.stack.finalItems;for(b=0,c=e.length;b<c;b++)e[b].top+=d,e[b].item.top+=d}else for(b=0,c=h.length;b<c;b++)h[b].top+=d}}else{j=f.axis.height+2*g.eventMarginAxis;for(b=0,c=d.length;b<c;b++)e=d[b],k=Math.max(e.labelHeight||0,e.itemsHeight||0),a=a||k!=e.height,e.height=k,j+=d[b].height+g.eventMargin;var a=
-g.eventMargin,k=g.axisOnTop?g.eventMarginAxis+a/2:f.contentHeight-g.eventMarginAxis+a/2,l=f.axis.height;for(b=0,c=d.length;b<c;b++)e=d[b],g.axisOnTop?(e.top=k+l,e.labelTop=k+l+(e.height-e.labelHeight)/2,e.lineTop=k+l+e.height+a/2,k+=e.height+a):(k-=e.height+a,e.top=k,e.labelTop=k+(e.height-e.labelHeight)/2,e.lineTop=k-a/2);for(b=0,c=h.length;b<c;b++)if(d=h[b],e=d.group)d.top=e.top;a=!0}if(j<g.minHeight)j=g.minHeight;a=a||j!=f.actualHeight;f.actualHeight=j;return a};
-links.Timeline.prototype.clearItems=function(){var a=this.renderQueue.hide;this.renderedItems.forEach(function(b){a.push(b)});this.clusterGenerator.clear();this.items=[]};
-links.Timeline.prototype.repaintItems=function(){var a,b,c=!1,d=this.dom;a=this.size;var e=this,f=this.renderedItems;if(!d.items)d.items={};var g=d.items.frame;if(!g)g=document.createElement("DIV"),g.style.position="relative",d.content.appendChild(g),d.items.frame=g;g.style.left="0px";g.style.top=a.items.top+"px";g.style.height="0px";d.content.removeChild(g);for(var h=this.renderQueue,j=[],c=c||h.show.length>0||h.update.length>0||h.hide.length>0;a=h.show.shift();)a.showDOM(g),a.getImageUrls(j),f.push(a);
-for(;a=h.update.shift();)a.updateDOM(g),a.getImageUrls(j),b=this.renderedItems.indexOf(a),b==-1&&f.push(a);for(;a=h.hide.shift();)a.hideDOM(g),b=this.renderedItems.indexOf(a),b!=-1&&f.splice(b,1);f.forEach(function(a){a.updatePosition(e)});this.repaintDeleteButton();this.repaintDragAreas();d.content.appendChild(g);j.length&&links.imageloader.loadAll(j,function(){e.render()},!1);return c};
-links.Timeline.prototype.reflowGroups=function(){for(var a=!1,b=this.options,c=this.size,d=this.dom,e=0,f=this.groups,g=this.dom.groups?this.dom.groups.labels:[],h=0,j=f.length;h<j;h++){var k=f[h],l=g[h];k.labelWidth=l?l.clientWidth:0;k.labelHeight=l?l.clientHeight:0;k.width=k.labelWidth;e=Math.max(e,k.width)}b.groupsWidth!==void 0&&(e=d.groups.frame?d.groups.frame.clientWidth:0);e+=1;b=b.groupsOnRight?c.frameWidth-e:0;a=(a=a||c.groupsWidth!==e)||c.groupsLeft!==b;c.groupsWidth=e;c.groupsLeft=b;return a};
-links.Timeline.prototype.repaintGroups=function(){var a=this.dom,b=this,c=this.options,d=this.size,e=this.groups;if(a.groups===void 0)a.groups={};var f=a.groups.labels;if(!f)f=[],a.groups.labels=f;var g=a.groups.labelLines;if(!g)g=[],a.groups.labelLines=g;var h=a.groups.itemLines;if(!h)h=[],a.groups.itemLines=h;var j=a.groups.frame;if(!j)j=document.createElement("DIV"),j.className="timeline-groups-axis",j.style.position="absolute",j.style.overflow="hidden",j.style.top="0px",j.style.height="100%",
-a.frame.appendChild(j),a.groups.frame=j;j.style.left=d.groupsLeft+"px";j.style.width=c.groupsWidth!==void 0?c.groupsWidth:d.groupsWidth+"px";j.style.display=e.length==0?"none":"";for(var k=f.length,l=e.length,m=0,r=Math.min(k,l);m<r;m++){var q=e[m],n=f[m];n.innerHTML=this.getGroupName(q);n.style.display=""}for(m=k;m<l;m++){q=e[m];n=document.createElement("DIV");n.className="timeline-groups-text";n.style.position="absolute";if(c.groupsWidth===void 0)n.style.whiteSpace="nowrap";n.innerHTML=this.getGroupName(q);
-j.appendChild(n);f[m]=n;var p=document.createElement("DIV");p.className="timeline-axis-grid timeline-axis-grid-minor";p.style.position="absolute";p.style.left="0px";p.style.width="100%";p.style.height="0px";p.style.borderTopStyle="solid";j.appendChild(p);g[m]=p;var o=document.createElement("DIV");o.className="timeline-axis-grid timeline-axis-grid-minor";o.style.position="absolute";o.style.left="0px";o.style.width="100%";o.style.height="0px";o.style.borderTopStyle="solid";a.content.insertBefore(o,
-a.content.firstChild);h[m]=o}for(m=l;m<k;m++)n=f[m],p=g[m],o=h[m],j.removeChild(n),j.removeChild(p),a.content.removeChild(o);f.splice(l,k-l);g.splice(l,k-l);h.splice(l,k-l);j.style.borderStyle=c.groupsOnRight?"none none none solid":"none solid none none";m=0;for(r=e.length;m<r;m++)q=e[m],n=f[m],p=g[m],o=h[m],n.style.top=q.labelTop+"px",p.style.top=q.lineTop+"px",o.style.top=q.lineTop+"px",o.style.width=d.contentWidth+"px";if(!a.groups.background)c=document.createElement("DIV"),c.className="timeline-axis",
-c.style.position="absolute",c.style.left="0px",c.style.width="100%",c.style.border="none",j.appendChild(c),a.groups.background=c;a.groups.background.style.top=d.axis.top+"px";a.groups.background.style.height=d.axis.height+"px";if(!a.groups.line)c=document.createElement("DIV"),c.className="timeline-axis",c.style.position="absolute",c.style.left="0px",c.style.width="100%",c.style.height="0px",j.appendChild(c),a.groups.line=c;a.groups.line.style.top=d.axis.line+"px";a.groups.frame&&e.length&&(d=[],links.imageloader.filterImageUrls(a.groups.frame,
-d),d.length&&links.imageloader.loadAll(d,function(){b.render()},!1))};
-links.Timeline.prototype.repaintCurrentTime=function(){var a=this.dom,b=this.size;if(this.options.showCurrentTime){if(!a.currentTime){var c=document.createElement("DIV");c.className="timeline-currenttime";c.style.position="absolute";c.style.top="0px";c.style.height="100%";a.contentTimelines.appendChild(c);a.currentTime=c}var c=new Date((new Date).valueOf()+this.clientTimeOffset),d=this.timeToScreen(c);a.currentTime.style.display=d>-b.contentWidth&&d<2*b.contentWidth?"":"none";a.currentTime.style.left=
-d+"px";a.currentTime.title="Current time: "+c;this.currentTimeTimer!=void 0&&(clearTimeout(this.currentTimeTimer),delete this.currentTimeTimer);var e=this,a=1/this.conversion.factor/2;a<30&&(a=30);this.currentTimeTimer=setTimeout(function(){e.repaintCurrentTime()},a)}else a.currentTime&&(a.contentTimelines.removeChild(a.currentTime),delete a.currentTime)};
-links.Timeline.prototype.repaintCustomTime=function(){var a=this.dom,b=this.size;if(this.options.showCustomTime){if(!a.customTime){var c=document.createElement("DIV");c.className="timeline-customtime";c.style.position="absolute";c.style.top="0px";c.style.height="100%";var d=document.createElement("DIV");d.style.position="relative";d.style.top="0px";d.style.left="-10px";d.style.height="100%";d.style.width="20px";c.appendChild(d);a.contentTimelines.appendChild(c);a.customTime=c;this.customTime=new Date}c=
-this.timeToScreen(this.customTime);a.customTime.style.display=c>-b.contentWidth&&c<2*b.contentWidth?"":"none";a.customTime.style.left=c+"px";a.customTime.title="Time: "+this.customTime}else a.customTime&&(a.contentTimelines.removeChild(a.customTime),delete a.customTime)};
-links.Timeline.prototype.repaintDeleteButton=function(){var a=this.dom,b=a.items.frame,c=a.items.deleteButton;if(!c)c=document.createElement("DIV"),c.className="timeline-navigation-delete",c.style.position="absolute",b.appendChild(c),a.items.deleteButton=c;var a=this.selection?this.selection.index:-1,d=this.selection?this.items[a]:void 0;d&&d.rendered&&this.isEditable(d)?(a=d.getRight(this),d=d.top,c.style.left=a+"px",c.style.top=d+"px",c.style.display="",b.removeChild(c),b.appendChild(c)):c.style.display=
-"none"};
-links.Timeline.prototype.repaintDragAreas=function(){var a=this.options,b=this.dom,c=this.dom.items.frame,d=b.items.dragLeft;if(!d)d=document.createElement("DIV"),d.className="timeline-event-range-drag-left",d.style.position="absolute",c.appendChild(d),b.items.dragLeft=d;var e=b.items.dragRight;if(!e)e=document.createElement("DIV"),e.className="timeline-event-range-drag-right",e.style.position="absolute",c.appendChild(e),b.items.dragRight=e;var b=this.selection?this.selection.index:-1,f=this.selection?this.items[b]:
-void 0;if(f&&f.rendered&&this.isEditable(f)&&f instanceof links.Timeline.ItemRange){var b=this.timeToScreen(f.start),g=this.timeToScreen(f.end),h=f.top,f=f.height;d.style.left=b+"px";d.style.top=h+"px";d.style.width=a.dragAreaWidth+"px";d.style.height=f+"px";d.style.display="";c.removeChild(d);c.appendChild(d);e.style.left=g-a.dragAreaWidth+"px";e.style.top=h+"px";e.style.width=a.dragAreaWidth+"px";e.style.height=f+"px";e.style.display="";c.removeChild(e);c.appendChild(e)}else d.style.display="none",
-e.style.display="none"};
-links.Timeline.prototype.repaintNavigation=function(){var a=this,b=this.options,c=this.dom,d=c.frame,e=c.navBar;if(!e){var f=b.showButtonNew&&b.editable,g=b.showNavigation&&(b.zoomable||b.moveable);if(g||f)e=document.createElement("DIV"),e.style.position="absolute",e.className="timeline-navigation",b.groupsOnRight?e.style.left="10px":e.style.right="10px",b.axisOnTop?e.style.bottom="10px":e.style.top="10px",c.navBar=e,d.appendChild(e);if(f)e.addButton=document.createElement("DIV"),e.addButton.className=
-"timeline-navigation-new",e.addButton.title=b.CREATE_NEW_EVENT,links.Timeline.addEventListener(e.addButton,"mousedown",function(c){links.Timeline.preventDefault(c);links.Timeline.stopPropagation(c);var d=a.size.contentWidth,e=d/2,c=a.screenToTime(e-d/10),d=a.screenToTime(e+d/10);b.snapEvents&&(a.step.snap(c),a.step.snap(d));a.addItem({start:c,end:d,content:b.NEW,group:a.groups.length?a.groups[0].content:void 0},!0);c=a.items.length-1;a.selectItem(c);a.applyAdd=!0;a.trigger("add");a.applyAdd?(a.render({animate:!1}),
-a.selectItem(c)):a.deleteItem(c)}),e.appendChild(e.addButton);if(f&&g)e.addButton.style.borderRightWidth="1px",e.addButton.style.borderRightStyle="solid";if(g){if(b.zoomable)e.zoomInButton=document.createElement("DIV"),e.zoomInButton.className="timeline-navigation-zoom-in",e.zoomInButton.title=this.options.ZOOM_IN,links.Timeline.addEventListener(e.zoomInButton,"mousedown",function(b){links.Timeline.preventDefault(b);links.Timeline.stopPropagation(b);a.zoom(0.4);a.trigger("rangechange");a.trigger("rangechanged")}),
-e.appendChild(e.zoomInButton),e.zoomOutButton=document.createElement("DIV"),e.zoomOutButton.className="timeline-navigation-zoom-out",e.zoomOutButton.title=this.options.ZOOM_OUT,links.Timeline.addEventListener(e.zoomOutButton,"mousedown",function(b){links.Timeline.preventDefault(b);links.Timeline.stopPropagation(b);a.zoom(-0.4);a.trigger("rangechange");a.trigger("rangechanged")}),e.appendChild(e.zoomOutButton);if(b.moveable)e.moveLeftButton=document.createElement("DIV"),e.moveLeftButton.className=
-"timeline-navigation-move-left",e.moveLeftButton.title=this.options.MOVE_LEFT,links.Timeline.addEventListener(e.moveLeftButton,"mousedown",function(b){links.Timeline.preventDefault(b);links.Timeline.stopPropagation(b);a.move(-0.2);a.trigger("rangechange");a.trigger("rangechanged")}),e.appendChild(e.moveLeftButton),e.moveRightButton=document.createElement("DIV"),e.moveRightButton.className="timeline-navigation-move-right",e.moveRightButton.title=this.options.MOVE_RIGHT,links.Timeline.addEventListener(e.moveRightButton,
-"mousedown",function(b){links.Timeline.preventDefault(b);links.Timeline.stopPropagation(b);a.move(0.2);a.trigger("rangechange");a.trigger("rangechanged")}),e.appendChild(e.moveRightButton)}}};links.Timeline.prototype.setCurrentTime=function(a){this.clientTimeOffset=a.valueOf()-(new Date).valueOf();this.repaintCurrentTime()};links.Timeline.prototype.getCurrentTime=function(){return new Date((new Date).valueOf()+this.clientTimeOffset)};
-links.Timeline.prototype.setCustomTime=function(a){this.customTime=new Date(a.valueOf());this.repaintCustomTime()};links.Timeline.prototype.getCustomTime=function(){return new Date(this.customTime.valueOf())};links.Timeline.prototype.setScale=function(a,b){this.step.setScale(a,b);this.render()};links.Timeline.prototype.setAutoScale=function(a){this.step.setAutoScale(a);this.render()};links.Timeline.prototype.redraw=function(){this.setData(this.data)};links.Timeline.prototype.checkResize=function(){this.render()};
-links.Timeline.prototype.isEditable=function(a){return a?a.editable!=void 0?a.editable:this.options.editable:!1};links.Timeline.prototype.recalcConversion=function(){this.conversion.offset=this.start.valueOf();this.conversion.factor=this.size.contentWidth/(this.end.valueOf()-this.start.valueOf())};links.Timeline.prototype.screenToTime=function(a){var b=this.conversion;return new Date(a/b.factor+b.offset)};
-links.Timeline.prototype.timeToScreen=function(a){var b=this.conversion;return(a.valueOf()-b.offset)*b.factor};
-links.Timeline.prototype.onTouchStart=function(a){var b=this.eventParams,c=this;if(!b.touchDown){b.touchDown=!0;b.zoomed=!1;this.onMouseDown(a);if(!b.onTouchMove)b.onTouchMove=function(a){c.onTouchMove(a)},links.Timeline.addEventListener(document,"touchmove",b.onTouchMove);if(!b.onTouchEnd)b.onTouchEnd=function(a){c.onTouchEnd(a)},links.Timeline.addEventListener(document,"touchend",b.onTouchEnd);var d=this.getItemIndex(links.Timeline.getTarget(a));b.doubleTapStartPrev=b.doubleTapStart;b.doubleTapStart=
-(new Date).valueOf();b.doubleTapItemPrev=b.doubleTapItem;b.doubleTapItem=d;links.Timeline.preventDefault(a)}};links.Timeline.prototype.onTouchMove=function(a){var b=this.eventParams;if(a.scale&&a.scale!==1)b.zoomed=!0;if(b.zoomed){if(this.options.zoomable){b.zoomed=!0;var c=b.end.valueOf()-b.start.valueOf(),d=c/a.scale-c,c=new Date(parseInt(b.start.valueOf()-d/2)),b=new Date(parseInt(b.end.valueOf()+d/2));this.setVisibleChartRange(c,b);this.trigger("rangechange")}}else this.onMouseMove(a);links.Timeline.preventDefault(a)};
-links.Timeline.prototype.onTouchEnd=function(a){var b=this.eventParams;b.touchDown=!1;b.zoomed&&this.trigger("rangechanged");b.onTouchMove&&(links.Timeline.removeEventListener(document,"touchmove",b.onTouchMove),delete b.onTouchMove);b.onTouchEnd&&(links.Timeline.removeEventListener(document,"touchend",b.onTouchEnd),delete b.onTouchEnd);this.onMouseUp(a);var c=(new Date).valueOf();this.getItemIndex(links.Timeline.getTarget(a));if(b.doubleTapStartPrev&&c-b.doubleTapStartPrev<500&&b.doubleTapItem==
-b.doubleTapItemPrev)b.touchDown=!0,this.onDblClick(a),b.touchDown=!1;links.Timeline.preventDefault(a)};
-links.Timeline.prototype.onMouseDown=function(a){var a=a||window.event,b=this.eventParams,c=this.options,d=this.dom;if((a.which?a.which==1:a.button==1)||b.touchDown){b.mouseX=links.Timeline.getPageX(a);b.mouseY=links.Timeline.getPageY(a);b.frameLeft=links.Timeline.getAbsoluteLeft(this.dom.content);b.frameTop=links.Timeline.getAbsoluteTop(this.dom.content);b.previousLeft=0;b.previousOffset=0;b.moved=!1;b.start=new Date(this.start.valueOf());b.end=new Date(this.end.valueOf());b.target=links.Timeline.getTarget(a);
-var e=d.items&&d.items.dragRight?d.items.dragRight:void 0;b.itemDragLeft=b.target===(d.items&&d.items.dragLeft?d.items.dragLeft:void 0);b.itemDragRight=b.target===e;b.itemIndex=b.itemDragLeft||b.itemDragRight?this.selection?this.selection.index:void 0:this.getItemIndex(b.target);b.customTime=b.target===d.customTime||b.target.parentNode===d.customTime?this.customTime:void 0;b.addItem=c.editable&&a.ctrlKey;if(b.addItem){var f=b.mouseY-b.frameTop,d=this.screenToTime(b.mouseX-b.frameLeft);c.snapEvents&&
-this.step.snap(d);e=new Date(d.valueOf());c=c.NEW;f=this.getGroupFromHeight(f);this.addItem({start:d,end:e,content:c,group:this.getGroupName(f)});b.itemIndex=this.items.length-1;this.selectItem(b.itemIndex);b.itemDragRight=!0}c=this.items[b.itemIndex];d=this.isSelected(b.itemIndex);b.editItem=d&&this.isEditable(c);b.editItem?(b.itemStart=c.start,b.itemEnd=c.end,b.itemGroup=c.group,b.itemLeft=c.start?this.timeToScreen(c.start):void 0,b.itemRight=c.end?this.timeToScreen(c.end):void 0):this.dom.frame.style.cursor=
-"move";if(!b.touchDown){var g=this;if(!b.onMouseMove)b.onMouseMove=function(a){g.onMouseMove(a)},links.Timeline.addEventListener(document,"mousemove",b.onMouseMove);if(!b.onMouseUp)b.onMouseUp=function(a){g.onMouseUp(a)},links.Timeline.addEventListener(document,"mouseup",b.onMouseUp);links.Timeline.preventDefault(a)}}};
-links.Timeline.prototype.onMouseMove=function(a){var a=a||window.event,b=this.eventParams,c=this.size,d=this.dom,e=this.options,f=links.Timeline.getPageX(a),g=links.Timeline.getPageY(a);if(b.mouseX==void 0)b.mouseX=f;if(b.mouseY==void 0)b.mouseY=g;f-=b.mouseX;if(Math.abs(f)>=1)b.moved=!0;if(b.customTime)this.customTime=this.screenToTime(this.timeToScreen(b.customTime)+f),this.repaintCustomTime(),this.trigger("timechange");else if(b.editItem){var d=this.items[b.itemIndex],h;if(b.itemDragLeft){if(c=
-b.itemLeft+f,h=b.itemRight,d.start=this.screenToTime(c),e.snapEvents&&(this.step.snap(d.start),c=this.timeToScreen(d.start)),c>h)c=h,d.start=this.screenToTime(c)}else if(b.itemDragRight){if(c=b.itemLeft,h=b.itemRight+f,d.end=this.screenToTime(h),e.snapEvents&&(this.step.snap(d.end),h=this.timeToScreen(d.end)),h<c)h=c,d.end=this.screenToTime(h)}else if(c=b.itemLeft+f,d.start=this.screenToTime(c),e.snapEvents&&(this.step.snap(d.start),c=this.timeToScreen(d.start)),d.end)h=c+(b.itemRight-b.itemLeft),
-d.end=this.screenToTime(h);d.setPosition(c,h);c=b.itemDragLeft||b.itemDragRight;this.groups.length&&!c?(b=this.getGroupFromHeight(g-b.frameTop),e.groupsChangeable&&d.group!==b?this.changeItem(this.items.indexOf(d),{group:this.getGroupName(b)}):(this.repaintDeleteButton(),this.repaintDragAreas())):this.render()}else if(e.moveable)e=b.end.valueOf()-b.start.valueOf(),g=Math.round(-f/c.contentWidth*e),f=new Date(b.start.valueOf()+g),this.applyRange(f,new Date(b.end.valueOf()+g)),(f=this.start.valueOf()-
-f.valueOf())&&(g+=f),this.recalcConversion(),f=b.previousLeft||0,h=parseFloat(d.items.frame.style.left)||0,f=(b.previousOffset||0)+(h-f),c=-g/e*c.contentWidth+f,d.items.frame.style.left=c+"px",b.previousOffset=f,b.previousLeft=parseFloat(d.items.frame.style.left)||c,this.repaintCurrentTime(),this.repaintCustomTime(),this.repaintAxis(),this.trigger("rangechange");links.Timeline.preventDefault(a)};
-links.Timeline.prototype.onMouseUp=function(){var a=this.eventParams,b=this.options;this.dom.frame.style.cursor="auto";a.onMouseMove&&(links.Timeline.removeEventListener(document,"mousemove",a.onMouseMove),delete a.onMouseMove);a.onMouseUp&&(links.Timeline.removeEventListener(document,"mouseup",a.onMouseUp),delete a.onMouseUp);if(a.customTime)this.trigger("timechanged");else if(a.editItem){if(b=this.items[a.itemIndex],a.moved||a.addItem)this.applyAdd=this.applyChange=!0,this.updateData(a.itemIndex,
-{start:b.start,end:b.end}),this.trigger(a.addItem?"add":"change"),a.addItem?this.applyAdd?this.updateData(a.itemIndex,{start:b.start,end:b.end,content:b.content,group:this.getGroupName(b.group)}):this.deleteItem(a.itemIndex):this.applyChange?this.updateData(a.itemIndex,{start:b.start,end:b.end}):(delete this.applyChange,delete this.applyAdd,b=this.items[a.itemIndex],b.start=a.itemStart,b.end=a.itemEnd,b.group=a.itemGroup,b.setPosition(a.itemLeft,a.itemRight)),this.options.cluster&&this.clusterGenerator.updateData(),
-this.render()}else!a.moved&&!a.zoomed?a.target===this.dom.items.deleteButton?this.selection&&this.confirmDeleteItem(this.selection.index):b.selectable&&(a.itemIndex!=void 0?this.isSelected(a.itemIndex)||(this.selectItem(a.itemIndex),this.trigger("select")):(this.unselectItem(),this.trigger("select"))):(this.render(),(a.moved&&b.moveable||a.zoomed&&b.zoomable)&&this.trigger("rangechanged"))};
-links.Timeline.prototype.onDblClick=function(a){var b=this.eventParams,c=this.options,d=this.dom,e=this.size,a=a||window.event;if(b.itemIndex!=void 0)(b=this.items[b.itemIndex])&&this.isEditable(b)&&this.trigger("edit");else if(c.editable){b.mouseX=links.Timeline.getPageX(a);b.mouseY=links.Timeline.getPageY(a);var f=b.mouseX-links.Timeline.getAbsoluteLeft(d.content),g=b.mouseY-links.Timeline.getAbsoluteTop(d.content),d=this.screenToTime(f),e=this.screenToTime(f+e.frameWidth/10);c.snapEvents&&(this.step.snap(d),
-this.step.snap(e));c=c.NEW;g=this.getGroupFromHeight(g);this.addItem({start:d,end:e,content:c,group:this.getGroupName(g)},!0);b.itemIndex=this.items.length-1;this.selectItem(b.itemIndex);this.applyAdd=!0;this.trigger("add");this.applyAdd?(this.render({animate:!1}),this.selectItem(b.itemIndex)):this.deleteItem(b.itemIndex)}links.Timeline.preventDefault(a)};
-links.Timeline.prototype.onMouseWheel=function(a){if(this.options.zoomable){if(!a)a=window.event;var b=0;a.wheelDelta?b=a.wheelDelta/120:a.detail&&(b=-a.detail/3);if(b){var c=this;(function(){var d=b/5,e=links.Timeline.getAbsoluteLeft(c.dom.content),f=links.Timeline.getPageX(a),e=f!=void 0&&e!=void 0?c.screenToTime(f-e):void 0;c.zoom(d,e);c.trigger("rangechange");c.trigger("rangechanged")})()}links.Timeline.preventDefault(a)}};
-links.Timeline.prototype.zoom=function(a,b){b==void 0&&(b=new Date((this.start.valueOf()+this.end.valueOf())/2));a>=1&&(a=0.9);a<=-1&&(a=-0.9);a<0&&(a/=1+a);var c=new Date(this.start.valueOf()-(this.start.valueOf()-b)*a),d=new Date(this.end.valueOf()-(this.end.valueOf()-b)*a),e=d.valueOf()-c.valueOf(),f=Number(this.options.zoomMin)||10;f<10&&(f=10);e>=f&&(this.applyRange(c,d,b),this.render({animate:this.options.animate&&this.options.animateZoom}))};
-links.Timeline.prototype.move=function(a){var b=this.end.valueOf()-this.start.valueOf();this.applyRange(new Date(this.start.valueOf()+b*a),new Date(this.end.valueOf()+b*a));this.render()};
-links.Timeline.prototype.applyRange=function(a,b,c){var a=a.valueOf(),b=b.valueOf(),d=b-a,e=this.options,f=Number(e.zoomMin)||10;f<10&&(f=10);var g=Number(e.zoomMax)||31536E10;g>31536E10&&(g=31536E10);g<f&&(g=f);var h=e.min?e.min.valueOf():void 0,e=e.max?e.max.valueOf():void 0;h!=void 0&&e!=void 0&&(h>=e&&(e=h+864E5),g>e-h&&(g=e-h),f>e-h&&(f=e-h));a>=b&&(b+=864E5);if(d<f){f-=d;var j=c?(c.valueOf()-a)/d:0.5;a-=Math.round(f*j);b+=Math.round(f*(1-j))}d>g&&(f=d-g,j=c?(c.valueOf()-a)/d:0.5,a+=Math.round(f*
-j),b-=Math.round(f*(1-j)));h!=void 0&&(f=a-h,f<0&&(a-=f,b-=f));e!=void 0&&(f=e-b,f<0&&(a+=f,b+=f));this.start=new Date(a);this.end=new Date(b)};links.Timeline.prototype.confirmDeleteItem=function(a){this.applyDelete=!0;this.isSelected(a)||this.selectItem(a);this.trigger("delete");this.applyDelete&&this.deleteItem(a);delete this.applyDelete};
-links.Timeline.prototype.deleteItem=function(a,b){if(a>=this.items.length)throw"Cannot delete row, index out of range";this.selection&&(this.selection.index==a?this.unselectItem():this.selection.index>a&&this.selection.index--);this.renderQueue.hide.push(this.items.splice(a,1)[0]);if(this.data)if(google&&google.visualization&&this.data instanceof google.visualization.DataTable)this.data.removeRow(a);else if(links.Timeline.isArray(this.data))this.data.splice(a,1);else throw"Cannot delete row from data, unknown data type";
-this.options.cluster&&this.clusterGenerator.updateData();b||this.render()};
-links.Timeline.prototype.deleteAllItems=function(){this.unselectItem();this.clearItems();this.deleteGroups();if(this.data)if(google&&google.visualization&&this.data instanceof google.visualization.DataTable)this.data.removeRows(0,this.data.getNumberOfRows());else if(links.Timeline.isArray(this.data))this.data.splice(0,this.data.length);else throw"Cannot delete row from data, unknown data type";this.options.cluster&&this.clusterGenerator.updateData();this.render()};
-links.Timeline.prototype.getGroupFromHeight=function(a){var b,c,d=this.groups;if(d.length){if(this.options.axisOnTop)for(b=d.length-1;b>=0;b--){if(c=d[b],a>c.top)break}else for(b=0;b<d.length;b++)if(c=d[b],a>c.top)break;return c}};
-links.Timeline.Item=function(a,b){if(a)this.start=a.start,this.end=a.end,this.content=a.content,this.className=a.className,this.editable=a.editable,this.group=a.group;this.dotHeight=this.dotWidth=this.lineWidth=this.height=this.width=this.left=this.top=0;this.rendered=!1;if(b)for(var c in b)b.hasOwnProperty(c)&&(this[c]=b[c])};links.Timeline.Item.prototype.reflow=function(){return!1};links.Timeline.Item.prototype.getImageUrls=function(a){this.dom&&links.imageloader.filterImageUrls(this.dom,a)};
-links.Timeline.Item.prototype.select=function(){};links.Timeline.Item.prototype.unselect=function(){};links.Timeline.Item.prototype.createDOM=function(){};links.Timeline.Item.prototype.showDOM=function(){};links.Timeline.Item.prototype.hideDOM=function(){};links.Timeline.Item.prototype.updateDOM=function(){};links.Timeline.Item.prototype.updatePosition=function(){};links.Timeline.Item.prototype.isRendered=function(){return this.rendered};links.Timeline.Item.prototype.isVisible=function(){return!1};
-links.Timeline.Item.prototype.setPosition=function(){};links.Timeline.Item.prototype.getRight=function(){return 0};links.Timeline.Item.prototype.getWidth=function(){return this.width||0};links.Timeline.ItemBox=function(a,b){links.Timeline.Item.call(this,a,b)};links.Timeline.ItemBox.prototype=new links.Timeline.Item;
-links.Timeline.ItemBox.prototype.reflow=function(){var a=this.dom,b=a.dot.offsetHeight,c=a.dot.offsetWidth,a=a.line.offsetWidth,d=this.dotHeight!=b||this.dotWidth!=c||this.lineWidth!=a;this.dotHeight=b;this.dotWidth=c;this.lineWidth=a;return d};links.Timeline.ItemBox.prototype.select=function(){var a=this.dom;links.Timeline.addClassName(a,"timeline-event-selected");links.Timeline.addClassName(a.line,"timeline-event-selected");links.Timeline.addClassName(a.dot,"timeline-event-selected")};
-links.Timeline.ItemBox.prototype.unselect=function(){var a=this.dom;links.Timeline.removeClassName(a,"timeline-event-selected");links.Timeline.removeClassName(a.line,"timeline-event-selected");links.Timeline.removeClassName(a.dot,"timeline-event-selected")};
-links.Timeline.ItemBox.prototype.createDOM=function(){var a=document.createElement("DIV");a.style.position="absolute";a.style.left=this.left+"px";a.style.top=this.top+"px";var b=document.createElement("DIV");b.className="timeline-event-content";b.innerHTML=this.content;a.appendChild(b);b=document.createElement("DIV");b.style.position="absolute";b.style.width="0px";a.line=b;b=document.createElement("DIV");b.style.position="absolute";b.style.width="0px";b.style.height="0px";a.dot=b;this.dom=a;this.updateDOM();
-return a};links.Timeline.ItemBox.prototype.showDOM=function(a){var b=this.dom;b||(b=this.createDOM());if(b.parentNode!=a)b.parentNode&&this.hideDOM(),a.appendChild(b),a.insertBefore(b.line,a.firstChild),a.appendChild(b.dot),this.rendered=!0};links.Timeline.ItemBox.prototype.hideDOM=function(){var a=this.dom;if(a)a.parentNode&&a.parentNode.removeChild(a),a.line&&a.line.parentNode&&a.line.parentNode.removeChild(a.line),a.dot&&a.dot.parentNode&&a.dot.parentNode.removeChild(a.dot),this.rendered=!1};
-links.Timeline.ItemBox.prototype.updateDOM=function(){var a=this.dom;if(a){var b=a.line,c=a.dot;a.firstChild.innerHTML=this.content;a.className="timeline-event timeline-event-box";b.className="timeline-event timeline-event-line";c.className="timeline-event timeline-event-dot";this.isCluster&&(links.Timeline.addClassName(a,"timeline-event-cluster"),links.Timeline.addClassName(b,"timeline-event-cluster"),links.Timeline.addClassName(c,"timeline-event-cluster"));this.className&&(links.Timeline.addClassName(a,
-this.className),links.Timeline.addClassName(b,this.className),links.Timeline.addClassName(c,this.className))}};
-links.Timeline.ItemBox.prototype.updatePosition=function(a){var b=this.dom;if(b){var c=a.timeToScreen(this.start),d=a.options.axisOnTop,e=a.size.axis.top,f=a.size.axis.height,a=a.options.box&&a.options.box.align?a.options.box.align:void 0;b.style.top=this.top+"px";b.style.left=a=="right"?c-this.width+"px":a=="left"?c+"px":c-this.width/2+"px";a=b.line;b=b.dot;a.style.left=c-this.lineWidth/2+"px";b.style.left=c-this.dotWidth/2+"px";d?(a.style.top=f+"px",a.style.height=Math.max(this.top-f,0)+"px",b.style.top=
-f-this.dotHeight/2+"px"):(a.style.top=this.top+this.height+"px",a.style.height=Math.max(e-this.top-this.height,0)+"px",b.style.top=e-this.dotHeight/2+"px")}};links.Timeline.ItemBox.prototype.isVisible=function(a,b){return this.cluster?!1:this.start>a&&this.start<b};
-links.Timeline.ItemBox.prototype.setPosition=function(a){var b=this.dom;b.style.left=a-this.width/2+"px";b.line.style.left=a-this.lineWidth/2+"px";b.dot.style.left=a-this.dotWidth/2+"px";if(this.group)this.top=this.group.top,b.style.top=this.top+"px"};links.Timeline.ItemBox.prototype.getRight=function(a){var b=a.options.box&&a.options.box.align?a.options.box.align:void 0,a=a.timeToScreen(this.start);return b=="right"?a:b=="left"?a+this.width:a+this.width/2};
-links.Timeline.ItemRange=function(a,b){links.Timeline.Item.call(this,a,b)};links.Timeline.ItemRange.prototype=new links.Timeline.Item;links.Timeline.ItemRange.prototype.select=function(){links.Timeline.addClassName(this.dom,"timeline-event-selected")};links.Timeline.ItemRange.prototype.unselect=function(){links.Timeline.removeClassName(this.dom,"timeline-event-selected")};
-links.Timeline.ItemRange.prototype.createDOM=function(){var a=document.createElement("DIV");a.style.position="absolute";var b=document.createElement("DIV");b.className="timeline-event-content";a.appendChild(b);this.dom=a;this.updateDOM();return a};links.Timeline.ItemRange.prototype.showDOM=function(a){var b=this.dom;b||(b=this.createDOM());if(b.parentNode!=a)b.parentNode&&this.hideDOM(),a.appendChild(b),this.rendered=!0};
-links.Timeline.ItemRange.prototype.hideDOM=function(){var a=this.dom;if(a)a.parentNode&&a.parentNode.removeChild(a),this.rendered=!1};links.Timeline.ItemRange.prototype.updateDOM=function(){var a=this.dom;if(a)a.firstChild.innerHTML=this.content,a.className="timeline-event timeline-event-range",this.isCluster&&links.Timeline.addClassName(a,"timeline-event-cluster"),this.className&&links.Timeline.addClassName(a,this.className)};
-links.Timeline.ItemRange.prototype.updatePosition=function(a){var b=this.dom;if(b){var c=a.size.contentWidth,d=a.timeToScreen(this.start),a=a.timeToScreen(this.end);d<-c&&(d=-c);a>2*c&&(a=2*c);b.style.top=this.top+"px";b.style.left=d+"px";b.style.width=Math.max(a-d,1)+"px"}};links.Timeline.ItemRange.prototype.isVisible=function(a,b){return this.cluster?!1:this.end>a&&this.start<b};
-links.Timeline.ItemRange.prototype.setPosition=function(a,b){var c=this.dom;c.style.left=a+"px";c.style.width=b-a+"px";if(this.group)this.top=this.group.top,c.style.top=this.top+"px"};links.Timeline.ItemRange.prototype.getRight=function(a){return a.timeToScreen(this.end)};links.Timeline.ItemRange.prototype.getWidth=function(a){return a.timeToScreen(this.end)-a.timeToScreen(this.start)};links.Timeline.ItemDot=function(a,b){links.Timeline.Item.call(this,a,b)};links.Timeline.ItemDot.prototype=new links.Timeline.Item;
-links.Timeline.ItemDot.prototype.reflow=function(){var a=this.dom,b=a.dot.offsetHeight,c=a.dot.offsetWidth,a=a.content.offsetHeight,d=this.dotHeight!=b||this.dotWidth!=c||this.contentHeight!=a;this.dotHeight=b;this.dotWidth=c;this.contentHeight=a;return d};links.Timeline.ItemDot.prototype.select=function(){links.Timeline.addClassName(this.dom,"timeline-event-selected")};links.Timeline.ItemDot.prototype.unselect=function(){links.Timeline.removeClassName(this.dom,"timeline-event-selected")};
-links.Timeline.ItemDot.prototype.createDOM=function(){var a=document.createElement("DIV");a.style.position="absolute";var b=document.createElement("DIV");b.className="timeline-event-content";a.appendChild(b);var c=document.createElement("DIV");c.style.position="absolute";c.style.width="0px";c.style.height="0px";a.appendChild(c);a.content=b;a.dot=c;this.dom=a;this.updateDOM();return a};
-links.Timeline.ItemDot.prototype.showDOM=function(a){var b=this.dom;b||(b=this.createDOM());if(b.parentNode!=a)b.parentNode&&this.hideDOM(),a.appendChild(b),this.rendered=!0};links.Timeline.ItemDot.prototype.hideDOM=function(){var a=this.dom;if(a)a.parentNode&&a.parentNode.removeChild(a),this.rendered=!1};
-links.Timeline.ItemDot.prototype.updateDOM=function(){if(this.dom){var a=this.dom,b=a.dot;a.firstChild.innerHTML=this.content;b.className="timeline-event timeline-event-dot";this.isCluster&&(links.Timeline.addClassName(a,"timeline-event-cluster"),links.Timeline.addClassName(b,"timeline-event-cluster"));this.className&&(links.Timeline.addClassName(a,this.className),links.Timeline.addClassName(b,this.className))}};
-links.Timeline.ItemDot.prototype.updatePosition=function(a){var b=this.dom;if(b)a=a.timeToScreen(this.start),b.style.top=this.top+"px",b.style.left=a-this.dotWidth/2+"px",b.content.style.marginLeft=1.5*this.dotWidth+"px",b.dot.style.top=(this.height-this.dotHeight)/2+"px"};links.Timeline.ItemDot.prototype.isVisible=function(a,b){return this.cluster?!1:this.start>a&&this.start<b};
-links.Timeline.ItemDot.prototype.setPosition=function(a){var b=this.dom;b.style.left=a-this.dotWidth/2+"px";if(this.group)this.top=this.group.top,b.style.top=this.top+"px"};links.Timeline.ItemDot.prototype.getRight=function(a){return a.timeToScreen(this.start)+this.width};
-links.Timeline.prototype.getItem=function(a){if(a>=this.items.length)throw"Cannot get item, index out of range";var a=this.items[a],b={};b.start=new Date(a.start.valueOf());if(a.end)b.end=new Date(a.end.valueOf());b.content=a.content;if(a.group)b.group=this.getGroupName(a.group);if("className"in a)b.className=this.getGroupName(a.className);if(a.hasOwnProperty("editable")&&typeof a.editable!="undefined")b.editable=a.editable;return b};
-links.Timeline.prototype.addItem=function(a,b){this.addItems([a],b)};links.Timeline.prototype.addItems=function(a,b){var c=this,d=this.items;a.forEach(function(a){var b=d.length;d.push(c.createItem(a));c.updateData(b,a)});this.options.cluster&&this.clusterGenerator.updateData();b||this.render({animate:!1})};
-links.Timeline.prototype.createItem=function(a){var b=a.end?"range":this.options.style,a={start:a.start,end:a.end,content:a.content,className:a.className,editable:a.editable,group:this.getGroup(a.group)},c;c=this.options;c=c.axisOnTop?this.size.axis.height+c.eventMarginAxis+c.eventMargin/2:this.size.contentHeight-c.eventMarginAxis-c.eventMargin/2;if(b in this.itemTypes)return new this.itemTypes[b](a,{top:c});console.log('ERROR: Unknown event style "'+b+'"');return new links.Timeline.Item(a,{top:c})};
-links.Timeline.prototype.changeItem=function(a,b,c){var d=this.items[a];if(!d)throw"Cannot change item, index out of range";var e=this.createItem({start:b.hasOwnProperty("start")?b.start:d.start,end:b.hasOwnProperty("end")?b.end:d.end,content:b.hasOwnProperty("content")?b.content:d.content,group:b.hasOwnProperty("group")?b.group:this.getGroupName(d.group),className:b.hasOwnProperty("className")?b.className:d.className,editable:b.hasOwnProperty("editable")?b.editable:d.editable});this.items[a]=e;this.renderQueue.hide.push(d);
-this.renderQueue.show.push(e);this.updateData(a,b);this.options.cluster&&this.clusterGenerator.updateData();c||(this.render({animate:!1}),e.select())};links.Timeline.prototype.deleteGroups=function(){this.groups=[];this.groupIndexes={}};
-links.Timeline.prototype.getGroup=function(a){var b=this.groups,c=this.groupIndexes,d=void 0,d=c[a];if(d==void 0&&a!=void 0){d={content:a,labelTop:0,lineTop:0};b.push(d);for(var b=b.sort(function(a,b){return a.content>b.content?1:a.content<b.content?-1:0}),a=0,e=b.length;a<e;a++)c[b[a].content]=a}else d=b[d];return d};links.Timeline.prototype.getGroupName=function(a){return a?a.content:void 0};links.Timeline.prototype.cancelChange=function(){this.applyChange=!1};
-links.Timeline.prototype.cancelDelete=function(){this.applyDelete=!1};links.Timeline.prototype.cancelAdd=function(){this.applyAdd=!1};
-links.Timeline.prototype.setSelection=function(a){if(a!=void 0&&a.length>0){if(a[0].row!=void 0){var b=a[0].row;if(this.items[b])return a=this.items[b],this.selectItem(b),b=a.start,a=a.end,a=a!=void 0?(a.valueOf()+b.valueOf())/2:b.valueOf(),b=this.end.valueOf()-this.start.valueOf(),this.setVisibleChartRange(new Date(a-b/2),new Date(a+b/2)),!0}}else this.unselectItem();return!1};links.Timeline.prototype.getSelection=function(){var a=[];this.selection&&a.push({row:this.selection.index});return a};
-links.Timeline.prototype.selectItem=function(a){this.unselectItem();this.selection=void 0;if(this.items[a]!=void 0){var b=this.items[a];this.selection={index:a};if(b&&b.dom){if(this.isEditable(b))b.dom.style.cursor="move";b.select()}this.repaintDeleteButton();this.repaintDragAreas()}};links.Timeline.prototype.isSelected=function(a){return this.selection&&this.selection.index==a};
-links.Timeline.prototype.unselectItem=function(){if(this.selection){var a=this.items[this.selection.index];if(a&&a.dom)a.dom.style.cursor="",a.unselect();this.selection=void 0;this.repaintDeleteButton();this.repaintDragAreas()}};
-links.Timeline.prototype.stackItems=function(a){if(!(this.groups.length>0)){a==void 0&&(a=!1);var b=this.stack;if(!b)this.stack=b={};b.sortedItems=this.stackOrder(this.renderedItems);b.finalItems=this.stackCalculateFinal(b.sortedItems);if(a||b.timer){var c=this,d=function(){var a=c.stackMoveOneStep(b.sortedItems,b.finalItems);c.repaint();a?delete b.timer:b.timer=setTimeout(d,30)};if(!b.timer)b.timer=setTimeout(d,30)}else this.stackMoveToFinal(b.sortedItems,b.finalItems)}};
-links.Timeline.prototype.stackCancelAnimation=function(){this.stack&&this.stack.timer&&(clearTimeout(this.stack.timer),delete this.stack.timer)};
-links.Timeline.prototype.stackOrder=function(a){a=a.concat([]);a.sort(this.options.customStackOrder&&typeof this.options.customStackOrder==="function"?this.options.customStackOrder:function(a,c){return a instanceof links.Timeline.ItemRange&&!(c instanceof links.Timeline.ItemRange)?-1:!(a instanceof links.Timeline.ItemRange)&&c instanceof links.Timeline.ItemRange?1:a.left-c.left});return a};
-links.Timeline.prototype.stackCalculateFinal=function(a){var b,c,d=this.size,e=d.axis.top,f=d.axis.height;b=this.options;var d=b.axisOnTop,g=b.eventMargin,h=b.eventMarginAxis,j=[];for(b=0,c=a.length;b<c;b++){var k=a[b],l,m=k.height;l=k.getWidth(this);var r=k.getRight(this),q=r-l;l=d?f+h+g/2:e-m-h-g/2;j[b]={left:q,top:l,right:r,bottom:l+m,height:m,item:k}}if(this.options.stackEvents)for(b=0,c=j.length;b<c;b++){a=j[b];e=null;do if(e=this.stackItemsCheckOverlap(j,b,0,b-1),e!=null)a.top=d?e.top+e.height+
-g:e.top-a.height-g,a.bottom=a.top+a.height;while(e)}return j};links.Timeline.prototype.stackMoveOneStep=function(a,b){var c=!0;for(i=0,iMax=b.length;i<iMax;i++){var d=b[i],e=d.item,f=parseInt(e.top),g=parseInt(d.top),h=g-f;if(h){var j=g==f?0:g>f?1:-1;Math.abs(h)>4&&(j=h/4);f=parseInt(f+j);f!=g&&(c=!1);e.top=f;e.bottom=e.top+e.height}else e.top=d.top,e.bottom=d.bottom;e.left=d.left;e.right=d.right}return c};
-links.Timeline.prototype.stackMoveToFinal=function(a,b){for(i=0,iMax=b.length;i<iMax;i++){var c=b[i],d=c.item;d.left=c.left;d.top=c.top;d.right=c.right;d.bottom=c.bottom}};links.Timeline.prototype.stackItemsCheckOverlap=function(a,b,c,d){for(var e=this.options.eventMargin,f=this.collision,g=a[b];d>=c;d--){var h=a[d];if(f(g,h,e)&&d!=b)return h}};links.Timeline.prototype.collision=function(a,b,c){c==void 0&&(c=0);return a.left-c<b.right&&a.right+c>b.left&&a.top-c<b.bottom&&a.bottom+c>b.top};
-links.Timeline.prototype.trigger=function(a){var b=null;switch(a){case "rangechange":case "rangechanged":b={start:new Date(this.start.valueOf()),end:new Date(this.end.valueOf())};break;case "timechange":case "timechanged":b={time:new Date(this.customTime.valueOf())}}links.events.trigger(this,a,b);google&&google.visualization&&google.visualization.events.trigger(this,a,b)};
-links.Timeline.prototype.clusterItems=function(){if(this.options.cluster){var a=this.clusterGenerator.getClusters(this.conversion.factor);if(this.clusters!=a){var b=this.renderQueue;this.clusters&&this.clusters.forEach(function(a){b.hide.push(a);a.items.forEach(function(a){a.cluster=void 0})});a.forEach(function(a){a.items.forEach(function(b){b.cluster=a})});this.clusters=a}}};
-links.Timeline.prototype.filterItems=function(){function a(a){a.forEach(function(a){var c=a.rendered,f=a.isVisible(d,e);c!=f&&(c&&b.hide.push(a),f&&b.show.indexOf(a)==-1&&b.show.push(a))})}var b=this.renderQueue,c=this.end-this.start,d=new Date(this.start.valueOf()-c),e=new Date(this.end.valueOf()+c);a(this.items);this.clusters&&a(this.clusters)};links.Timeline.ClusterGenerator=function(a){this.timeline=a;this.clear()};
-links.Timeline.ClusterGenerator.prototype.clear=function(){this.items=[];this.groups={};this.clearCache()};links.Timeline.ClusterGenerator.prototype.clearCache=function(){this.cache={};this.cacheLevel=-1;this.cache[this.cacheLevel]=[]};links.Timeline.ClusterGenerator.prototype.setData=function(a,b){this.items=a||[];this.applyOnChangedLevel=this.dataChanged=!0;if(b&&b.applyOnChangedLevel)this.applyOnChangedLevel=b.applyOnChangedLevel};
-links.Timeline.ClusterGenerator.prototype.updateData=function(){this.dataChanged=!0;this.applyOnChangedLevel=!1};links.Timeline.ClusterGenerator.prototype.filterData=function(){var a=this.items||[],b={};this.groups=b;a.forEach(function(a){var c=a.group?a.group.content:"",f=b[c];f||(f=[],b[c]=f);f.push(a);if(a.start)a.center=a.end?(a.start.valueOf()+a.end.valueOf())/2:a.start.valueOf()});for(var c in b)b.hasOwnProperty(c)&&b[c].sort(function(a,b){return a.center-b.center});this.dataChanged=!1};
-links.Timeline.ClusterGenerator.prototype.getClusters=function(a){var b=-1,c=0;a>0&&(b=Math.round(Math.log(100/a)/Math.log(2)),c=Math.pow(2,b),this.timeline.groups&&this.timeline.groups.length&&(c*=4));if(this.dataChanged&&(a=b!=this.cacheLevel,this.applyOnChangedLevel?a:1))this.clearCache(),this.filterData();this.cacheLevel=b;a=this.cache[b];if(!a){var a=[],d;for(d in this.groups)if(this.groups.hasOwnProperty(d))for(var e=this.groups[d],f=e.length,g=0;g<f;){for(var h=e[g],j=1,k=g-1;k>=0&&h.center-
-e[k].center<c/2;)e[k].cluster||j++,k--;for(k=g+1;k<e.length&&e[k].center-h.center<c/2;)j++,k++;for(k=a.length-1;k>=0&&h.center-a[k].center<c/2;)h.group==a[k].group&&j++,k--;if(j>5){for(var j=j-5+1,k=[],l=void 0,m=void 0,r=void 0,q=!1,n=0,p=g;k.length<j&&p<e.length;){var o=e[p],t=o.start.valueOf(),u=o.end?o.end.valueOf():o.start.valueOf();k.push(o);l=n?n/(n+1)*l+1/(n+1)*o.center:o.center;m=m!=void 0?Math.min(m,t):t;r=r!=void 0?Math.max(r,u):u;q=q||o instanceof links.Timeline.ItemRange;n++;p++}var s,
-n='<div title="'+("Cluster containing "+n+" events. Zoom in to see the individual events.")+'">'+n+" events</div>",h=h.group?h.group.content:void 0;s=q?this.timeline.createItem({start:new Date(m),end:new Date(r),content:n,group:h}):this.timeline.createItem({start:new Date(l),content:n,group:h});s.isCluster=!0;s.items=k;s.items.forEach(function(a){a.cluster=s});a.push(s);g+=j}else delete h.cluster,g+=1}this.cache[b]=a}return a};
-links.events=links.events||{listeners:[],indexOf:function(a){for(var b=this.listeners,c=0,d=this.listeners.length;c<d;c++){var e=b[c];if(e&&e.object==a)return c}return-1},addListener:function(a,b,c){var d=this.listeners[this.indexOf(a)];d||(d={object:a,events:{}},this.listeners.push(d));a=d.events[b];a||(a=[],d.events[b]=a);a.indexOf(c)==-1&&a.push(c)},removeListener:function(a,b,c){var a=this.indexOf(a),d=this.listeners[a];if(d){var e=d.events[b];e&&(a=e.indexOf(c),a!=-1&&e.splice(a,1),e.length==
-0&&delete d.events[b]);var b=0,c=d.events,f;for(f in c)c.hasOwnProperty(f)&&b++;b==0&&delete this.listeners[a]}},removeAllListeners:function(){this.listeners=[]},trigger:function(a,b,c){if(a=this.listeners[this.indexOf(a)])if(b=a.events[b])for(var a=0,d=b.length;a<d;a++)b[a](c)}};links.Timeline.StepDate=function(a,b,c){this.current=new Date;this._start=new Date;this._end=new Date;this.autoScale=!0;this.scale=links.Timeline.StepDate.SCALE.DAY;this.step=1;this.setRange(a,b,c)};
-links.Timeline.StepDate.SCALE={MILLISECOND:1,SECOND:2,MINUTE:3,HOUR:4,DAY:5,WEEKDAY:6,MONTH:7,YEAR:8};links.Timeline.StepDate.prototype.setRange=function(a,b,c){if(a instanceof Date&&b instanceof Date)this._start=a!=void 0?new Date(a.valueOf()):new Date,this._end=b!=void 0?new Date(b.valueOf()):new Date,this.autoScale&&this.setMinimumStep(c)};links.Timeline.StepDate.prototype.start=function(){this.current=new Date(this._start.valueOf());this.roundToMinor()};
-links.Timeline.StepDate.prototype.roundToMinor=function(){switch(this.scale){case links.Timeline.StepDate.SCALE.YEAR:this.current.setFullYear(this.step*Math.floor(this.current.getFullYear()/this.step)),this.current.setMonth(0);case links.Timeline.StepDate.SCALE.MONTH:this.current.setDate(1);case links.Timeline.StepDate.SCALE.DAY:case links.Timeline.StepDate.SCALE.WEEKDAY:this.current.setHours(0);case links.Timeline.StepDate.SCALE.HOUR:this.current.setMinutes(0);case links.Timeline.StepDate.SCALE.MINUTE:this.current.setSeconds(0);
-case links.Timeline.StepDate.SCALE.SECOND:this.current.setMilliseconds(0)}if(this.step!=1)switch(this.scale){case links.Timeline.StepDate.SCALE.MILLISECOND:this.current.setMilliseconds(this.current.getMilliseconds()-this.current.getMilliseconds()%this.step);break;case links.Timeline.StepDate.SCALE.SECOND:this.current.setSeconds(this.current.getSeconds()-this.current.getSeconds()%this.step);break;case links.Timeline.StepDate.SCALE.MINUTE:this.current.setMinutes(this.current.getMinutes()-this.current.getMinutes()%
-this.step);break;case links.Timeline.StepDate.SCALE.HOUR:this.current.setHours(this.current.getHours()-this.current.getHours()%this.step);break;case links.Timeline.StepDate.SCALE.WEEKDAY:case links.Timeline.StepDate.SCALE.DAY:this.current.setDate(this.current.getDate()-1-(this.current.getDate()-1)%this.step+1);break;case links.Timeline.StepDate.SCALE.MONTH:this.current.setMonth(this.current.getMonth()-this.current.getMonth()%this.step);break;case links.Timeline.StepDate.SCALE.YEAR:this.current.setFullYear(this.current.getFullYear()-
-this.current.getFullYear()%this.step)}};links.Timeline.StepDate.prototype.end=function(){return this.current.valueOf()>this._end.valueOf()};
-links.Timeline.StepDate.prototype.next=function(){var a=this.current.valueOf();if(this.current.getMonth()<6)switch(this.scale){case links.Timeline.StepDate.SCALE.MILLISECOND:this.current=new Date(this.current.valueOf()+this.step);break;case links.Timeline.StepDate.SCALE.SECOND:this.current=new Date(this.current.valueOf()+this.step*1E3);break;case links.Timeline.StepDate.SCALE.MINUTE:this.current=new Date(this.current.valueOf()+this.step*6E4);break;case links.Timeline.StepDate.SCALE.HOUR:this.current=
-new Date(this.current.valueOf()+this.step*36E5);var b=this.current.getHours();this.current.setHours(b-b%this.step);break;case links.Timeline.StepDate.SCALE.WEEKDAY:case links.Timeline.StepDate.SCALE.DAY:this.current.setDate(this.current.getDate()+this.step);break;case links.Timeline.StepDate.SCALE.MONTH:this.current.setMonth(this.current.getMonth()+this.step);break;case links.Timeline.StepDate.SCALE.YEAR:this.current.setFullYear(this.current.getFullYear()+this.step)}else switch(this.scale){case links.Timeline.StepDate.SCALE.MILLISECOND:this.current=
-new Date(this.current.valueOf()+this.step);break;case links.Timeline.StepDate.SCALE.SECOND:this.current.setSeconds(this.current.getSeconds()+this.step);break;case links.Timeline.StepDate.SCALE.MINUTE:this.current.setMinutes(this.current.getMinutes()+this.step);break;case links.Timeline.StepDate.SCALE.HOUR:this.current.setHours(this.current.getHours()+this.step);break;case links.Timeline.StepDate.SCALE.WEEKDAY:case links.Timeline.StepDate.SCALE.DAY:this.current.setDate(this.current.getDate()+this.step);
-break;case links.Timeline.StepDate.SCALE.MONTH:this.current.setMonth(this.current.getMonth()+this.step);break;case links.Timeline.StepDate.SCALE.YEAR:this.current.setFullYear(this.current.getFullYear()+this.step)}if(this.step!=1)switch(this.scale){case links.Timeline.StepDate.SCALE.MILLISECOND:this.current.getMilliseconds()<this.step&&this.current.setMilliseconds(0);break;case links.Timeline.StepDate.SCALE.SECOND:this.current.getSeconds()<this.step&&this.current.setSeconds(0);break;case links.Timeline.StepDate.SCALE.MINUTE:this.current.getMinutes()<
-this.step&&this.current.setMinutes(0);break;case links.Timeline.StepDate.SCALE.HOUR:this.current.getHours()<this.step&&this.current.setHours(0);break;case links.Timeline.StepDate.SCALE.WEEKDAY:case links.Timeline.StepDate.SCALE.DAY:this.current.getDate()<this.step+1&&this.current.setDate(1);break;case links.Timeline.StepDate.SCALE.MONTH:this.current.getMonth()<this.step&&this.current.setMonth(0)}if(this.current.valueOf()==a)this.current=new Date(this._end.valueOf())};
-links.Timeline.StepDate.prototype.getCurrent=function(){return this.current};links.Timeline.StepDate.prototype.setScale=function(a,b){this.scale=a;if(b>0)this.step=b;this.autoScale=!1};links.Timeline.StepDate.prototype.setAutoScale=function(a){this.autoScale=a};
-links.Timeline.StepDate.prototype.setMinimumStep=function(a){if(a!=void 0){if(31104E9>a)this.scale=links.Timeline.StepDate.SCALE.YEAR,this.step=1E3;if(15552E9>a)this.scale=links.Timeline.StepDate.SCALE.YEAR,this.step=500;if(31104E8>a)this.scale=links.Timeline.StepDate.SCALE.YEAR,this.step=100;if(15552E8>a)this.scale=links.Timeline.StepDate.SCALE.YEAR,this.step=50;if(31104E7>a)this.scale=links.Timeline.StepDate.SCALE.YEAR,this.step=10;if(15552E7>a)this.scale=links.Timeline.StepDate.SCALE.YEAR,this.step=
-5;if(31104E6>a)this.scale=links.Timeline.StepDate.SCALE.YEAR,this.step=1;if(7776E6>a)this.scale=links.Timeline.StepDate.SCALE.MONTH,this.step=3;if(2592E6>a)this.scale=links.Timeline.StepDate.SCALE.MONTH,this.step=1;if(432E6>a)this.scale=links.Timeline.StepDate.SCALE.DAY,this.step=5;if(1728E5>a)this.scale=links.Timeline.StepDate.SCALE.DAY,this.step=2;if(864E5>a)this.scale=links.Timeline.StepDate.SCALE.DAY,this.step=1;if(432E5>a)this.scale=links.Timeline.StepDate.SCALE.WEEKDAY,this.step=1;if(144E5>
-a)this.scale=links.Timeline.StepDate.SCALE.HOUR,this.step=4;if(36E5>a)this.scale=links.Timeline.StepDate.SCALE.HOUR,this.step=1;if(9E5>a)this.scale=links.Timeline.StepDate.SCALE.MINUTE,this.step=15;if(6E5>a)this.scale=links.Timeline.StepDate.SCALE.MINUTE,this.step=10;if(3E5>a)this.scale=links.Timeline.StepDate.SCALE.MINUTE,this.step=5;if(6E4>a)this.scale=links.Timeline.StepDate.SCALE.MINUTE,this.step=1;if(15E3>a)this.scale=links.Timeline.StepDate.SCALE.SECOND,this.step=15;if(1E4>a)this.scale=links.Timeline.StepDate.SCALE.SECOND,
-this.step=10;if(5E3>a)this.scale=links.Timeline.StepDate.SCALE.SECOND,this.step=5;if(1E3>a)this.scale=links.Timeline.StepDate.SCALE.SECOND,this.step=1;if(200>a)this.scale=links.Timeline.StepDate.SCALE.MILLISECOND,this.step=200;if(100>a)this.scale=links.Timeline.StepDate.SCALE.MILLISECOND,this.step=100;if(50>a)this.scale=links.Timeline.StepDate.SCALE.MILLISECOND,this.step=50;if(10>a)this.scale=links.Timeline.StepDate.SCALE.MILLISECOND,this.step=10;if(5>a)this.scale=links.Timeline.StepDate.SCALE.MILLISECOND,
-this.step=5;if(1>a)this.scale=links.Timeline.StepDate.SCALE.MILLISECOND,this.step=1}};
-links.Timeline.StepDate.prototype.snap=function(a){if(this.scale==links.Timeline.StepDate.SCALE.YEAR){var b=a.getFullYear()+Math.round(a.getMonth()/12);a.setFullYear(Math.round(b/this.step)*this.step);a.setMonth(0);a.setDate(0);a.setHours(0);a.setMinutes(0);a.setSeconds(0);a.setMilliseconds(0)}else if(this.scale==links.Timeline.StepDate.SCALE.MONTH)a.getDate()>15?(a.setDate(1),a.setMonth(a.getMonth()+1)):a.setDate(1),a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0);else if(this.scale==
-links.Timeline.StepDate.SCALE.DAY||this.scale==links.Timeline.StepDate.SCALE.WEEKDAY){switch(this.step){case 5:case 2:a.setHours(Math.round(a.getHours()/24)*24);break;default:a.setHours(Math.round(a.getHours()/12)*12)}a.setMinutes(0);a.setSeconds(0);a.setMilliseconds(0)}else if(this.scale==links.Timeline.StepDate.SCALE.HOUR){switch(this.step){case 4:a.setMinutes(Math.round(a.getMinutes()/60)*60);break;default:a.setMinutes(Math.round(a.getMinutes()/30)*30)}a.setSeconds(0);a.setMilliseconds(0)}else if(this.scale==
-links.Timeline.StepDate.SCALE.MINUTE){switch(this.step){case 15:case 10:a.setMinutes(Math.round(a.getMinutes()/5)*5);a.setSeconds(0);break;case 5:a.setSeconds(Math.round(a.getSeconds()/60)*60);break;default:a.setSeconds(Math.round(a.getSeconds()/30)*30)}a.setMilliseconds(0)}else if(this.scale==links.Timeline.StepDate.SCALE.SECOND)switch(this.step){case 15:case 10:a.setSeconds(Math.round(a.getSeconds()/5)*5);a.setMilliseconds(0);break;case 5:a.setMilliseconds(Math.round(a.getMilliseconds()/1E3)*1E3);
-break;default:a.setMilliseconds(Math.round(a.getMilliseconds()/500)*500)}else this.scale==links.Timeline.StepDate.SCALE.MILLISECOND&&(b=this.step>5?this.step/2:1,a.setMilliseconds(Math.round(a.getMilliseconds()/b)*b))};
-links.Timeline.StepDate.prototype.isMajor=function(){switch(this.scale){case links.Timeline.StepDate.SCALE.MILLISECOND:return this.current.getMilliseconds()==0;case links.Timeline.StepDate.SCALE.SECOND:return this.current.getSeconds()==0;case links.Timeline.StepDate.SCALE.MINUTE:return this.current.getHours()==0&&this.current.getMinutes()==0;case links.Timeline.StepDate.SCALE.HOUR:return this.current.getHours()==0;case links.Timeline.StepDate.SCALE.WEEKDAY:case links.Timeline.StepDate.SCALE.DAY:return this.current.getDate()==
-1;case links.Timeline.StepDate.SCALE.MONTH:return this.current.getMonth()==0;case links.Timeline.StepDate.SCALE.YEAR:return!1;default:return!1}};
-links.Timeline.StepDate.prototype.getLabelMinor=function(a,b){if(b==void 0)b=this.current;switch(this.scale){case links.Timeline.StepDate.SCALE.MILLISECOND:return String(b.getMilliseconds());case links.Timeline.StepDate.SCALE.SECOND:return String(b.getSeconds());case links.Timeline.StepDate.SCALE.MINUTE:return this.addZeros(b.getHours(),2)+":"+this.addZeros(b.getMinutes(),2);case links.Timeline.StepDate.SCALE.HOUR:return this.addZeros(b.getHours(),2)+":"+this.addZeros(b.getMinutes(),2);case links.Timeline.StepDate.SCALE.WEEKDAY:return a.DAYS_SHORT[b.getDay()]+
-" "+b.getDate();case links.Timeline.StepDate.SCALE.DAY:return String(b.getDate());case links.Timeline.StepDate.SCALE.MONTH:return a.MONTHS_SHORT[b.getMonth()];case links.Timeline.StepDate.SCALE.YEAR:return String(b.getFullYear());default:return""}};
-links.Timeline.StepDate.prototype.getLabelMajor=function(a,b){if(b==void 0)b=this.current;switch(this.scale){case links.Timeline.StepDate.SCALE.MILLISECOND:return this.addZeros(b.getHours(),2)+":"+this.addZeros(b.getMinutes(),2)+":"+this.addZeros(b.getSeconds(),2);case links.Timeline.StepDate.SCALE.SECOND:return b.getDate()+" "+a.MONTHS[b.getMonth()]+" "+this.addZeros(b.getHours(),2)+":"+this.addZeros(b.getMinutes(),2);case links.Timeline.StepDate.SCALE.MINUTE:return a.DAYS[b.getDay()]+" "+b.getDate()+
-" "+a.MONTHS[b.getMonth()]+" "+b.getFullYear();case links.Timeline.StepDate.SCALE.HOUR:return a.DAYS[b.getDay()]+" "+b.getDate()+" "+a.MONTHS[b.getMonth()]+" "+b.getFullYear();case links.Timeline.StepDate.SCALE.WEEKDAY:case links.Timeline.StepDate.SCALE.DAY:return a.MONTHS[b.getMonth()]+" "+b.getFullYear();case links.Timeline.StepDate.SCALE.MONTH:return String(b.getFullYear());default:return""}};links.Timeline.StepDate.prototype.addZeros=function(a,b){for(var c=""+a;c.length<b;)c="0"+c;return c};
-links.imageloader=function(){function a(a){if(e[a]==!0)return!0;var b=new Image;b.src=a;return b.complete?!0:!1}function b(a){return f[a]!=void 0}function c(c,d,j){j==void 0&&(j=!0);if(a(c))j&&d(c);else if(!b(c)||j){var k=f[c];if(!k)j=new Image,j.src=c,k=[],f[c]=k,j.onload=function(){e[c]=!0;delete f[c];for(var a=0;a<k.length;a++)k[a](c)};k.indexOf(d)==-1&&k.push(d)}}function d(a,b){for(var c=a.firstChild;c;){if(c.tagName=="IMG"){var e=c.src;b.indexOf(e)==-1&&b.push(e)}d(c,b);c=c.nextSibling}}var e=
-{},f={};return{isLoaded:a,isLoading:b,load:c,loadAll:function(b,d,e){var f=[];b.forEach(function(b){a(b)||f.push(b)});if(f.length){var l=f.length;f.forEach(function(a){c(a,function(){l--;l==0&&d()},e)})}else e&&d()},filterImageUrls:d}}();links.Timeline.addEventListener=function(a,b,c,d){a.addEventListener?(d===void 0&&(d=!1),b==="mousewheel"&&navigator.userAgent.indexOf("Firefox")>=0&&(b="DOMMouseScroll"),a.addEventListener(b,c,d)):a.attachEvent("on"+b,c)};
-links.Timeline.removeEventListener=function(a,b,c,d){a.removeEventListener?(d===void 0&&(d=!1),b==="mousewheel"&&navigator.userAgent.indexOf("Firefox")>=0&&(b="DOMMouseScroll"),a.removeEventListener(b,c,d)):a.detachEvent("on"+b,c)};links.Timeline.getTarget=function(a){if(!a)a=window.event;var b;if(a.target)b=a.target;else if(a.srcElement)b=a.srcElement;if(b.nodeType!=void 0&&b.nodeType==3)b=b.parentNode;return b};
-links.Timeline.stopPropagation=function(a){if(!a)a=window.event;a.stopPropagation?a.stopPropagation():a.cancelBubble=!0};links.Timeline.preventDefault=function(a){if(!a)a=window.event;a.preventDefault?a.preventDefault():a.returnValue=!1};links.Timeline.getAbsoluteLeft=function(a){for(var b=document.documentElement,c=document.body,d=a.offsetLeft,a=a.offsetParent;a!=null&&a!=c&&a!=b;)d+=a.offsetLeft,d-=a.scrollLeft,a=a.offsetParent;return d};
-links.Timeline.getAbsoluteTop=function(a){for(var b=document.documentElement,c=document.body,d=a.offsetTop,a=a.offsetParent;a!=null&&a!=c&&a!=b;)d+=a.offsetTop,d-=a.scrollTop,a=a.offsetParent;return d};links.Timeline.getPageY=function(a){if("pageY"in a)return a.pageY;else{var b=document.documentElement,c=document.body;return("targetTouches"in a&&a.targetTouches.length?a.targetTouches[0].clientY:a.clientY)+(b&&b.scrollTop||c&&c.scrollTop||0)-(b&&b.clientTop||c&&c.clientTop||0)}};
-links.Timeline.getPageX=function(a){if("pageY"in a)return a.pageX;else{var b=document.documentElement,c=document.body;return("targetTouches"in a&&a.targetTouches.length?a.targetTouches[0].clientX:a.clientX)+(b&&b.scrollLeft||c&&c.scrollLeft||0)-(b&&b.clientLeft||c&&c.clientLeft||0)}};links.Timeline.addClassName=function(a,b){var c=a.className.split(" ");if(c.indexOf(b)==-1)c.push(b),a.className=c.join(" ")};
-links.Timeline.removeClassName=function(a,b){var c=a.className.split(" "),d=c.indexOf(b);if(d!=-1)c.splice(d,1),a.className=c.join(" ")};links.Timeline.isArray=function(a){return a instanceof Array?!0:Object.prototype.toString.call(a)==="[object Array]"};links.Timeline.parseJSONDate=function(a){if(a!=void 0){if(a instanceof Date)return a;var b=a.match(/\/Date\((-?\d+)([-\+]?\d{2})?(\d{2})?\)\//i);return b?(a=b[2]?36E5*b[2]+6E4*b[3]*(b[2]/Math.abs(b[2])):0,new Date(1*b[1]+a)):Date.parse(a)}};
[27/28] git commit: CLIMATE-512 - Replace frontend with new
Yeoman/Grunt/Bower frontend
Posted by jo...@apache.org.
CLIMATE-512 - Replace frontend with new Yeoman/Grunt/Bower frontend
Project: http://git-wip-us.apache.org/repos/asf/climate/repo
Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/652ea657
Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/652ea657
Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/652ea657
Branch: refs/heads/master
Commit: 652ea6576b850bb8882482752085c77195ff6fb8
Parents: fb37845
Author: Michael Joyce <jo...@apache.org>
Authored: Wed Aug 27 10:07:58 2014 -0700
Committer: Michael Joyce <jo...@apache.org>
Committed: Wed Aug 27 10:07:58 2014 -0700
----------------------------------------------------------------------
ocw-ui/frontend-new/.bowerrc | 3 -
ocw-ui/frontend-new/.editorconfig | 21 -
ocw-ui/frontend-new/.gitattributes | 1 -
ocw-ui/frontend-new/.gitignore | 5 -
ocw-ui/frontend-new/.jshintrc | 24 -
ocw-ui/frontend-new/.travis.yml | 6 -
ocw-ui/frontend-new/Gruntfile.js | 412 -
ocw-ui/frontend-new/app/.buildignore | 1 -
ocw-ui/frontend-new/app/.htaccess | 543 -
ocw-ui/frontend-new/app/404.html | 175 -
ocw-ui/frontend-new/app/favicon.ico | Bin 4286 -> 0 bytes
ocw-ui/frontend-new/app/index.html | 148 -
ocw-ui/frontend-new/app/robots.txt | 3 -
ocw-ui/frontend-new/app/scripts/app.js | 96 -
.../app/scripts/controllers/datasetdisplay.js | 43 -
.../app/scripts/controllers/datasetselect.js | 64 -
.../app/scripts/controllers/main.js | 36 -
.../scripts/controllers/observationselect.js | 203 -
.../app/scripts/controllers/parameterselect.js | 275 -
.../app/scripts/controllers/rcmedselection.js | 144 -
.../app/scripts/controllers/result.js | 47 -
.../app/scripts/controllers/resultdetail.js | 46 -
.../app/scripts/controllers/settings.js | 34 -
.../app/scripts/controllers/timeline.js | 103 -
.../app/scripts/controllers/worldmap.js | 104 -
.../app/scripts/directives/bootstrapmodal.js | 79 -
.../scripts/directives/bootstrapmodalopen.js | 43 -
.../app/scripts/directives/leafletmap.js | 46 -
.../app/scripts/directives/onblur.js | 38 -
.../directives/predictivefilebrowserinput.js | 316 -
.../app/scripts/directives/previewmap.js | 76 -
.../app/scripts/directives/timeline.js | 54 -
.../scripts/filters/isodatetomiddleendian.js | 55 -
.../app/scripts/services/evaluationsettings.js | 56 -
.../app/scripts/services/regionselectparams.js | 46 -
.../services/selecteddatasetinformation.js | 57 -
ocw-ui/frontend-new/app/styles/main.css | 120 -
ocw-ui/frontend-new/app/views/main.html | 274 -
ocw-ui/frontend-new/app/views/modelselect.html | 87 -
ocw-ui/frontend-new/app/views/results.html | 34 -
.../frontend-new/app/views/resultsdetail.html | 30 -
ocw-ui/frontend-new/app/views/resultslist.html | 21 -
.../app/views/selectobservation.html | 80 -
ocw-ui/frontend-new/app/views/selectrcmed.html | 40 -
ocw-ui/frontend-new/bower.json | 25 -
ocw-ui/frontend-new/package.json | 40 -
ocw-ui/frontend-new/test/.jshintrc | 36 -
ocw-ui/frontend-new/test/karma.conf.js | 86 -
.../test/spec/controllers/datasetdisplay.js | 59 -
.../test/spec/controllers/datasetselect.js | 54 -
.../frontend-new/test/spec/controllers/main.js | 41 -
.../test/spec/controllers/observationselect.js | 122 -
.../test/spec/controllers/parameterselect.js | 136 -
.../test/spec/controllers/rcmedselection.js | 145 -
.../test/spec/controllers/result.js | 37 -
.../test/spec/controllers/resultdetail.js | 37 -
.../test/spec/controllers/settings.js | 37 -
.../test/spec/controllers/timeline.js | 37 -
.../test/spec/controllers/worldmap.js | 57 -
.../test/spec/directives/bootstrapmodal.js | 33 -
.../test/spec/directives/bootstrapmodalopen.js | 33 -
.../test/spec/directives/leafletmap.js | 33 -
.../frontend-new/test/spec/directives/onblur.js | 50 -
.../directives/predictivefilebrowserinput.js | 33 -
.../test/spec/directives/previewmap.js | 53 -
.../test/spec/directives/timeline.js | 33 -
.../test/spec/filters/isodatetomiddleendian.js | 76 -
.../test/spec/services/evaluationsettings.js | 44 -
.../test/spec/services/regionselectparams.js | 44 -
.../spec/services/selecteddatasetinformation.js | 92 -
ocw-ui/frontend/.bowerrc | 3 +
ocw-ui/frontend/.editorconfig | 21 +
ocw-ui/frontend/.gitattributes | 1 +
ocw-ui/frontend/.gitignore | 5 +
ocw-ui/frontend/.jshintrc | 24 +
ocw-ui/frontend/.travis.yml | 6 +
ocw-ui/frontend/Gruntfile.js | 412 +
ocw-ui/frontend/app/.buildignore | 1 +
ocw-ui/frontend/app/.htaccess | 543 +
ocw-ui/frontend/app/404.html | 175 +
ocw-ui/frontend/app/css/app.css | 108 -
.../app/css/lib/bootstrap-responsive.min.css | 9 -
ocw-ui/frontend/app/css/lib/bootstrap.min.css | 9 -
.../frontend/app/css/lib/font-awesome.min.css | 403 -
ocw-ui/frontend/app/css/lib/timeline.css | 193 -
ocw-ui/frontend/app/favicon.ico | Bin 0 -> 4286 bytes
ocw-ui/frontend/app/font/FontAwesome.otf | Bin 61896 -> 0 bytes
.../frontend/app/font/fontawesome-webfont.eot | Bin 37405 -> 0 bytes
.../frontend/app/font/fontawesome-webfont.svg | 399 -
.../frontend/app/font/fontawesome-webfont.ttf | Bin 79076 -> 0 bytes
.../frontend/app/font/fontawesome-webfont.woff | Bin 43572 -> 0 bytes
ocw-ui/frontend/app/img/globe.png | Bin 25857 -> 0 bytes
.../app/img/glyphicons-halflings-white.png | Bin 8777 -> 0 bytes
.../frontend/app/img/glyphicons-halflings.png | Bin 12799 -> 0 bytes
ocw-ui/frontend/app/index.html | 213 +-
ocw-ui/frontend/app/js/app.js | 91 -
.../app/js/controllers/DatasetDisplayCtrl.js | 34 -
.../app/js/controllers/DatasetSelectCtrl.js | 55 -
.../app/js/controllers/ObservationSelectCtrl.js | 194 -
.../app/js/controllers/ParameterSelectCtrl.js | 296 -
.../app/js/controllers/RcmedSelectionCtrl.js | 133 -
.../frontend/app/js/controllers/ResultCtrl.js | 38 -
.../app/js/controllers/ResultDetailCtrl.js | 38 -
.../frontend/app/js/controllers/SettingsCtrl.js | 24 -
.../frontend/app/js/controllers/TimelineCtrl.js | 92 -
.../frontend/app/js/controllers/WorldMapCtrl.js | 95 -
.../app/js/directives/BootstrapModal.js | 71 -
.../app/js/directives/BootstrapModalOpen.js | 39 -
ocw-ui/frontend/app/js/directives/LeafletMap.js | 38 -
ocw-ui/frontend/app/js/directives/OnBlur.js | 36 -
.../js/directives/PredictiveFileBrowserInput.js | 308 -
ocw-ui/frontend/app/js/directives/PreviewMap.js | 68 -
ocw-ui/frontend/app/js/directives/Timeline.js | 44 -
.../app/js/filters/ISODateToMiddleEndian.js | 48 -
.../js/lib/angular-ui/angular-ui-0.4-tpls.js | 2 -
.../js/lib/angular-ui/angular-ui-router.min.js | 7 -
.../angular-ui/ui-bootstrap-tpls-0.5.0.min.js | 2 -
.../app/js/lib/angular/angular-cookies.js | 183 -
.../app/js/lib/angular/angular-cookies.min.js | 7 -
.../app/js/lib/angular/angular-loader.js | 276 -
.../app/js/lib/angular/angular-loader.min.js | 7 -
.../app/js/lib/angular/angular-resource.js | 445 -
.../app/js/lib/angular/angular-resource.min.js | 10 -
.../app/js/lib/angular/angular-sanitize.js | 535 -
.../app/js/lib/angular/angular-sanitize.min.js | 13 -
ocw-ui/frontend/app/js/lib/angular/angular.js | 14733 ---------
.../frontend/app/js/lib/angular/angular.min.js | 161 -
ocw-ui/frontend/app/js/lib/angular/version.txt | 1 -
.../frontend/app/js/lib/bootstrap/bootstrap.js | 2276 --
.../app/js/lib/bootstrap/bootstrap.min.js | 6 -
.../frontend/app/js/lib/jquery/jquery-1.10.1.js | 9807 ------
.../jquery/jquery-ui/datepicker-wrapper/date.js | 125 -
.../jquery/jquery-ui/jquery-ui-1.10.3.min.js | 12 -
.../frontend/app/js/lib/leaflet/leaflet-0.5.js | 8 -
.../app/js/lib/timeline/timeline-locales.js | 101 -
.../app/js/lib/timeline/timeline-min.js | 199 -
ocw-ui/frontend/app/js/lib/timeline/timeline.js | 6381 ----
.../app/js/services/EvaluationSettings.js | 47 -
.../app/js/services/RegionSelectParams.js | 37 -
.../js/services/SelectedDatasetInformation.js | 49 -
ocw-ui/frontend/app/partials/main.html | 261 -
ocw-ui/frontend/app/partials/modelSelect.html | 86 -
.../frontend/app/partials/results.detail.html | 30 -
ocw-ui/frontend/app/partials/results.html | 34 -
ocw-ui/frontend/app/partials/results.list.html | 22 -
.../app/partials/selectObservation.html | 58 -
ocw-ui/frontend/app/partials/selectRcmed.html | 44 -
ocw-ui/frontend/app/robots.txt | 3 +
ocw-ui/frontend/app/scripts/app.js | 96 +
.../app/scripts/controllers/datasetdisplay.js | 43 +
.../app/scripts/controllers/datasetselect.js | 64 +
ocw-ui/frontend/app/scripts/controllers/main.js | 36 +
.../scripts/controllers/observationselect.js | 203 +
.../app/scripts/controllers/parameterselect.js | 275 +
.../app/scripts/controllers/rcmedselection.js | 144 +
.../frontend/app/scripts/controllers/result.js | 47 +
.../app/scripts/controllers/resultdetail.js | 46 +
.../app/scripts/controllers/settings.js | 34 +
.../app/scripts/controllers/timeline.js | 103 +
.../app/scripts/controllers/worldmap.js | 104 +
.../app/scripts/directives/bootstrapmodal.js | 79 +
.../scripts/directives/bootstrapmodalopen.js | 43 +
.../app/scripts/directives/leafletmap.js | 46 +
.../frontend/app/scripts/directives/onblur.js | 38 +
.../directives/predictivefilebrowserinput.js | 316 +
.../app/scripts/directives/previewmap.js | 76 +
.../frontend/app/scripts/directives/timeline.js | 54 +
.../scripts/filters/isodatetomiddleendian.js | 55 +
.../app/scripts/services/evaluationsettings.js | 56 +
.../app/scripts/services/regionselectparams.js | 46 +
.../services/selecteddatasetinformation.js | 57 +
ocw-ui/frontend/app/styles/main.css | 120 +
ocw-ui/frontend/app/views/main.html | 274 +
ocw-ui/frontend/app/views/modelselect.html | 87 +
ocw-ui/frontend/app/views/results.html | 34 +
ocw-ui/frontend/app/views/resultsdetail.html | 30 +
ocw-ui/frontend/app/views/resultslist.html | 21 +
.../frontend/app/views/selectobservation.html | 80 +
ocw-ui/frontend/app/views/selectrcmed.html | 40 +
ocw-ui/frontend/bower.json | 25 +
ocw-ui/frontend/config/karma-e2e.conf.js | 40 -
ocw-ui/frontend/config/karma.conf.js | 48 -
ocw-ui/frontend/package.json | 40 +
ocw-ui/frontend/scripts/e2e-test.sh | 27 -
ocw-ui/frontend/scripts/test.sh | 27 -
ocw-ui/frontend/scripts/web-server.js | 313 -
ocw-ui/frontend/test/.jshintrc | 36 +
ocw-ui/frontend/test/e2e/runner.html | 28 -
ocw-ui/frontend/test/e2e/scenarios.js | 63 -
ocw-ui/frontend/test/karma.conf.js | 86 +
.../frontend/test/lib/angular/angular-mocks.js | 1764 --
.../test/lib/angular/angular-scenario.js | 26195 -----------------
ocw-ui/frontend/test/lib/angular/version.txt | 1 -
.../test/spec/controllers/datasetdisplay.js | 59 +
.../test/spec/controllers/datasetselect.js | 54 +
ocw-ui/frontend/test/spec/controllers/main.js | 41 +
.../test/spec/controllers/observationselect.js | 122 +
.../test/spec/controllers/parameterselect.js | 136 +
.../test/spec/controllers/rcmedselection.js | 145 +
ocw-ui/frontend/test/spec/controllers/result.js | 37 +
.../test/spec/controllers/resultdetail.js | 37 +
.../frontend/test/spec/controllers/settings.js | 37 +
.../frontend/test/spec/controllers/timeline.js | 37 +
.../frontend/test/spec/controllers/worldmap.js | 57 +
.../test/spec/directives/bootstrapmodal.js | 33 +
.../test/spec/directives/bootstrapmodalopen.js | 33 +
.../frontend/test/spec/directives/leafletmap.js | 33 +
ocw-ui/frontend/test/spec/directives/onblur.js | 50 +
.../directives/predictivefilebrowserinput.js | 33 +
.../frontend/test/spec/directives/previewmap.js | 53 +
.../frontend/test/spec/directives/timeline.js | 33 +
.../test/spec/filters/isodatetomiddleendian.js | 76 +
.../test/spec/services/evaluationsettings.js | 44 +
.../test/spec/services/regionselectparams.js | 44 +
.../spec/services/selecteddatasetinformation.js | 92 +
.../unit/controllers/DatasetDisplayCtrlTest.js | 65 -
.../unit/controllers/DatasetSelectCtrlTest.js | 51 -
.../controllers/ObservationSelectCtrlTest.js | 151 -
.../unit/controllers/ParameterSelectCtrlTest.js | 269 -
.../unit/controllers/RcmedSelectionCtrlTest.js | 161 -
.../test/unit/controllers/SettingsCtrlTest.js | 47 -
.../test/unit/controllers/WorldMapCtrlTest.js | 48 -
.../test/unit/directives/BootstrapModalTest.js | 41 -
.../frontend/test/unit/directives/OnBlurTest.js | 42 -
.../test/unit/directives/PreviewMapTest.js | 46 -
.../unit/filters/ISODateToMiddleEndianTest.js | 67 -
.../unit/services/EvaluationSettingsTest.js | 40 -
.../unit/services/RegionSelectParamsTest.js | 41 -
.../services/SelectedDatasetInfomationTest.js | 90 -
229 files changed, 5532 insertions(+), 74150 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/.bowerrc
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/.bowerrc b/ocw-ui/frontend-new/.bowerrc
deleted file mode 100644
index 69fad35..0000000
--- a/ocw-ui/frontend-new/.bowerrc
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "directory": "bower_components"
-}
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/.editorconfig
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/.editorconfig b/ocw-ui/frontend-new/.editorconfig
deleted file mode 100644
index c2cdfb8..0000000
--- a/ocw-ui/frontend-new/.editorconfig
+++ /dev/null
@@ -1,21 +0,0 @@
-# EditorConfig helps developers define and maintain consistent
-# coding styles between different editors and IDEs
-# editorconfig.org
-
-root = true
-
-
-[*]
-
-# Change these settings to your own preference
-indent_style = space
-indent_size = 2
-
-# We recommend you to keep these unchanged
-end_of_line = lf
-charset = utf-8
-trim_trailing_whitespace = true
-insert_final_newline = true
-
-[*.md]
-trim_trailing_whitespace = false
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/.gitattributes
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/.gitattributes b/ocw-ui/frontend-new/.gitattributes
deleted file mode 100644
index 2125666..0000000
--- a/ocw-ui/frontend-new/.gitattributes
+++ /dev/null
@@ -1 +0,0 @@
-* text=auto
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/.gitignore
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/.gitignore b/ocw-ui/frontend-new/.gitignore
deleted file mode 100644
index a22a458..0000000
--- a/ocw-ui/frontend-new/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-node_modules
-dist
-.tmp
-.sass-cache
-bower_components
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/.jshintrc
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/.jshintrc b/ocw-ui/frontend-new/.jshintrc
deleted file mode 100644
index 40377ba..0000000
--- a/ocw-ui/frontend-new/.jshintrc
+++ /dev/null
@@ -1,24 +0,0 @@
-{
- "node": true,
- "browser": true,
- "esnext": true,
- "bitwise": true,
- "camelcase": true,
- "curly": true,
- "eqeqeq": true,
- "immed": true,
- "indent": 2,
- "latedef": true,
- "newcap": true,
- "noarg": true,
- "quotmark": "single",
- "regexp": true,
- "undef": true,
- "unused": true,
- "strict": true,
- "trailing": true,
- "smarttabs": true,
- "globals": {
- "angular": false
- }
-}
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/.travis.yml
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/.travis.yml b/ocw-ui/frontend-new/.travis.yml
deleted file mode 100644
index a80b6e0..0000000
--- a/ocw-ui/frontend-new/.travis.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-language: node_js
-node_js:
- - '0.10'
-before_script:
- - 'npm install -g bower grunt-cli'
- - 'bower install'
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/Gruntfile.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/Gruntfile.js b/ocw-ui/frontend-new/Gruntfile.js
deleted file mode 100644
index 0efb4ae..0000000
--- a/ocw-ui/frontend-new/Gruntfile.js
+++ /dev/null
@@ -1,412 +0,0 @@
-// Generated on 2014-07-15 using generator-angular 0.9.5
-'use strict';
-
-// # Globbing
-// for performance reasons we're only matching one level down:
-// 'test/spec/{,*/}*.js'
-// use this if you want to recursively match all subfolders:
-// 'test/spec/**/*.js'
-
-module.exports = function (grunt) {
-
- // Load grunt tasks automatically
- require('load-grunt-tasks')(grunt);
-
- // Time how long tasks take. Can help when optimizing build times
- require('time-grunt')(grunt);
-
- // Configurable paths for the application
- var appConfig = {
- app: require('./bower.json').appPath || 'app',
- dist: 'dist'
- };
-
- // Define the configuration for all the tasks
- grunt.initConfig({
-
- // Project settings
- yeoman: appConfig,
-
- // Watches files for changes and runs tasks based on the changed files
- watch: {
- bower: {
- files: ['bower.json'],
- tasks: ['wiredep']
- },
- js: {
- files: ['<%= yeoman.app %>/scripts/{,*/}*.js'],
- tasks: ['newer:jshint:all'],
- options: {
- livereload: '<%= connect.options.livereload %>'
- }
- },
- jsTest: {
- files: ['test/spec/{,*/}*.js'],
- tasks: ['newer:jshint:test', 'karma']
- },
- styles: {
- files: ['<%= yeoman.app %>/styles/{,*/}*.css'],
- tasks: ['newer:copy:styles', 'autoprefixer']
- },
- gruntfile: {
- files: ['Gruntfile.js']
- },
- livereload: {
- options: {
- livereload: '<%= connect.options.livereload %>'
- },
- files: [
- '<%= yeoman.app %>/{,*/}*.html',
- '.tmp/styles/{,*/}*.css',
- '<%= yeoman.app %>/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}'
- ]
- }
- },
-
- // The actual grunt server settings
- connect: {
- options: {
- port: 9000,
- // Change this to '0.0.0.0' to access the server from outside.
- hostname: 'localhost',
- livereload: 35729
- },
- livereload: {
- options: {
- open: true,
- middleware: function (connect) {
- return [
- connect.static('.tmp'),
- connect().use(
- '/bower_components',
- connect.static('./bower_components')
- ),
- connect.static(appConfig.app)
- ];
- }
- }
- },
- test: {
- options: {
- port: 9001,
- middleware: function (connect) {
- return [
- connect.static('.tmp'),
- connect.static('test'),
- connect().use(
- '/bower_components',
- connect.static('./bower_components')
- ),
- connect.static(appConfig.app)
- ];
- }
- }
- },
- dist: {
- options: {
- open: true,
- base: '<%= yeoman.dist %>'
- }
- }
- },
-
- // Make sure code styles are up to par and there are no obvious mistakes
- jshint: {
- options: {
- jshintrc: '.jshintrc',
- reporter: require('jshint-stylish')
- },
- all: {
- src: [
- 'Gruntfile.js',
- '<%= yeoman.app %>/scripts/{,*/}*.js'
- ]
- },
- test: {
- options: {
- jshintrc: 'test/.jshintrc'
- },
- src: ['test/spec/{,*/}*.js']
- }
- },
-
- // Empties folders to start fresh
- clean: {
- dist: {
- files: [{
- dot: true,
- src: [
- '.tmp',
- '<%= yeoman.dist %>/{,*/}*',
- '!<%= yeoman.dist %>/.git*'
- ]
- }]
- },
- server: '.tmp'
- },
-
- // Add vendor prefixed styles
- autoprefixer: {
- options: {
- browsers: ['last 1 version']
- },
- dist: {
- files: [{
- expand: true,
- cwd: '.tmp/styles/',
- src: '{,*/}*.css',
- dest: '.tmp/styles/'
- }]
- }
- },
-
- // Automatically inject Bower components into the app
- wiredep: {
- options: {
- cwd: '<%= yeoman.app %>'
- },
- app: {
- src: ['<%= yeoman.app %>/index.html'],
- ignorePath: /\.\.\//
- }
- },
-
- // Renames files for browser caching purposes
- filerev: {
- dist: {
- src: [
- '<%= yeoman.dist %>/scripts/{,*/}*.js',
- '<%= yeoman.dist %>/styles/{,*/}*.css',
- '<%= yeoman.dist %>/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}',
- '<%= yeoman.dist %>/styles/fonts/*'
- ]
- }
- },
-
- // Reads HTML for usemin blocks to enable smart builds that automatically
- // concat, minify and revision files. Creates configurations in memory so
- // additional tasks can operate on them
- useminPrepare: {
- html: '<%= yeoman.app %>/index.html',
- options: {
- dest: '<%= yeoman.dist %>',
- flow: {
- html: {
- steps: {
- js: ['concat', 'uglifyjs'],
- css: ['cssmin']
- },
- post: {}
- }
- }
- }
- },
-
- // Performs rewrites based on filerev and the useminPrepare configuration
- usemin: {
- html: ['<%= yeoman.dist %>/{,*/}*.html'],
- css: ['<%= yeoman.dist %>/styles/{,*/}*.css'],
- options: {
- assetsDirs: ['<%= yeoman.dist %>','<%= yeoman.dist %>/images']
- }
- },
-
- // The following *-min tasks will produce minified files in the dist folder
- // By default, your `index.html`'s <!-- Usemin block --> will take care of
- // minification. These next options are pre-configured if you do not wish
- // to use the Usemin blocks.
- // cssmin: {
- // dist: {
- // files: {
- // '<%= yeoman.dist %>/styles/main.css': [
- // '.tmp/styles/{,*/}*.css'
- // ]
- // }
- // }
- // },
- // uglify: {
- // dist: {
- // files: {
- // '<%= yeoman.dist %>/scripts/scripts.js': [
- // '<%= yeoman.dist %>/scripts/scripts.js'
- // ]
- // }
- // }
- // },
- // concat: {
- // dist: {}
- // },
-
- imagemin: {
- dist: {
- files: [{
- expand: true,
- cwd: '<%= yeoman.app %>/images',
- src: '{,*/}*.{png,jpg,jpeg,gif}',
- dest: '<%= yeoman.dist %>/images'
- }]
- }
- },
-
- svgmin: {
- dist: {
- files: [{
- expand: true,
- cwd: '<%= yeoman.app %>/images',
- src: '{,*/}*.svg',
- dest: '<%= yeoman.dist %>/images'
- }]
- }
- },
-
- htmlmin: {
- dist: {
- options: {
- collapseWhitespace: true,
- conservativeCollapse: true,
- collapseBooleanAttributes: true,
- removeCommentsFromCDATA: true,
- removeOptionalTags: true
- },
- files: [{
- expand: true,
- cwd: '<%= yeoman.dist %>',
- src: ['*.html', 'views/{,*/}*.html'],
- dest: '<%= yeoman.dist %>'
- }]
- }
- },
-
- // ngmin tries to make the code safe for minification automatically by
- // using the Angular long form for dependency injection. It doesn't work on
- // things like resolve or inject so those have to be done manually.
- ngmin: {
- dist: {
- files: [{
- expand: true,
- cwd: '.tmp/concat/scripts',
- src: '*.js',
- dest: '.tmp/concat/scripts'
- }]
- }
- },
-
- // Replace Google CDN references
- cdnify: {
- dist: {
- html: ['<%= yeoman.dist %>/*.html']
- }
- },
-
- // Copies remaining files to places other tasks can use
- copy: {
- dist: {
- files: [{
- expand: true,
- dot: true,
- cwd: '<%= yeoman.app %>',
- dest: '<%= yeoman.dist %>',
- src: [
- '*.{ico,png,txt}',
- '.htaccess',
- '*.html',
- 'views/{,*/}*.html',
- 'images/{,*/}*.{webp}',
- 'fonts/*'
- ]
- }, {
- expand: true,
- cwd: '.tmp/images',
- dest: '<%= yeoman.dist %>/images',
- src: ['generated/*']
- }, {
- expand: true,
- cwd: 'bower_components/bootstrap/dist',
- src: 'fonts/*',
- dest: '<%= yeoman.dist %>'
- }]
- },
- styles: {
- expand: true,
- cwd: '<%= yeoman.app %>/styles',
- dest: '.tmp/styles/',
- src: '{,*/}*.css'
- }
- },
-
- // Run some tasks in parallel to speed up the build process
- concurrent: {
- server: [
- 'copy:styles'
- ],
- test: [
- 'copy:styles'
- ],
- dist: [
- 'copy:styles',
- 'imagemin',
- 'svgmin'
- ]
- },
-
- // Test settings
- karma: {
- unit: {
- configFile: 'test/karma.conf.js',
- singleRun: true
- }
- }
- });
-
-
- grunt.registerTask('serve', 'Compile then start a connect web server', function (target) {
- if (target === 'dist') {
- return grunt.task.run(['build', 'connect:dist:keepalive']);
- }
-
- grunt.task.run([
- 'clean:server',
- 'wiredep',
- 'concurrent:server',
- 'autoprefixer',
- 'connect:livereload',
- 'watch'
- ]);
- });
-
- grunt.registerTask('server', 'DEPRECATED TASK. Use the "serve" task instead', function (target) {
- grunt.log.warn('The `server` task has been deprecated. Use `grunt serve` to start a server.');
- grunt.task.run(['serve:' + target]);
- });
-
- grunt.registerTask('test', [
- 'clean:server',
- 'concurrent:test',
- 'autoprefixer',
- 'connect:test',
- 'karma'
- ]);
-
- grunt.registerTask('build', [
- 'clean:dist',
- 'wiredep',
- 'useminPrepare',
- 'concurrent:dist',
- 'autoprefixer',
- 'concat',
- 'ngmin',
- 'copy:dist',
- 'cdnify',
- 'cssmin',
- 'uglify',
- 'filerev',
- 'usemin',
- 'htmlmin'
- ]);
-
- grunt.registerTask('default', [
- 'newer:jshint',
- 'test',
- 'build'
- ]);
-};
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/app/.buildignore
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/app/.buildignore b/ocw-ui/frontend-new/app/.buildignore
deleted file mode 100644
index fc98b8e..0000000
--- a/ocw-ui/frontend-new/app/.buildignore
+++ /dev/null
@@ -1 +0,0 @@
-*.coffee
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/app/.htaccess
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/app/.htaccess b/ocw-ui/frontend-new/app/.htaccess
deleted file mode 100644
index cb84cb9..0000000
--- a/ocw-ui/frontend-new/app/.htaccess
+++ /dev/null
@@ -1,543 +0,0 @@
-# Apache Configuration File
-
-# (!) Using `.htaccess` files slows down Apache, therefore, if you have access
-# to the main server config file (usually called `httpd.conf`), you should add
-# this logic there: http://httpd.apache.org/docs/current/howto/htaccess.html.
-
-# ##############################################################################
-# # CROSS-ORIGIN RESOURCE SHARING (CORS) #
-# ##############################################################################
-
-# ------------------------------------------------------------------------------
-# | Cross-domain AJAX requests |
-# ------------------------------------------------------------------------------
-
-# Enable cross-origin AJAX requests.
-# http://code.google.com/p/html5security/wiki/CrossOriginRequestSecurity
-# http://enable-cors.org/
-
-# <IfModule mod_headers.c>
-# Header set Access-Control-Allow-Origin "*"
-# </IfModule>
-
-# ------------------------------------------------------------------------------
-# | CORS-enabled images |
-# ------------------------------------------------------------------------------
-
-# Send the CORS header for images when browsers request it.
-# https://developer.mozilla.org/en/CORS_Enabled_Image
-# http://blog.chromium.org/2011/07/using-cross-domain-images-in-webgl-and.html
-# http://hacks.mozilla.org/2011/11/using-cors-to-load-webgl-textures-from-cross-domain-images/
-
-<IfModule mod_setenvif.c>
- <IfModule mod_headers.c>
- <FilesMatch "\.(gif|ico|jpe?g|png|svg|svgz|webp)$">
- SetEnvIf Origin ":" IS_CORS
- Header set Access-Control-Allow-Origin "*" env=IS_CORS
- </FilesMatch>
- </IfModule>
-</IfModule>
-
-# ------------------------------------------------------------------------------
-# | Web fonts access |
-# ------------------------------------------------------------------------------
-
-# Allow access from all domains for web fonts
-
-<IfModule mod_headers.c>
- <FilesMatch "\.(eot|font.css|otf|ttc|ttf|woff)$">
- Header set Access-Control-Allow-Origin "*"
- </FilesMatch>
-</IfModule>
-
-
-# ##############################################################################
-# # ERRORS #
-# ##############################################################################
-
-# ------------------------------------------------------------------------------
-# | 404 error prevention for non-existing redirected folders |
-# ------------------------------------------------------------------------------
-
-# Prevent Apache from returning a 404 error for a rewrite if a directory
-# with the same name does not exist.
-# http://httpd.apache.org/docs/current/content-negotiation.html#multiviews
-# http://www.webmasterworld.com/apache/3808792.htm
-
-Options -MultiViews
-
-# ------------------------------------------------------------------------------
-# | Custom error messages / pages |
-# ------------------------------------------------------------------------------
-
-# You can customize what Apache returns to the client in case of an error (see
-# http://httpd.apache.org/docs/current/mod/core.html#errordocument), e.g.:
-
-ErrorDocument 404 /404.html
-
-
-# ##############################################################################
-# # INTERNET EXPLORER #
-# ##############################################################################
-
-# ------------------------------------------------------------------------------
-# | Better website experience |
-# ------------------------------------------------------------------------------
-
-# Force IE to render pages in the highest available mode in the various
-# cases when it may not: http://hsivonen.iki.fi/doctype/ie-mode.pdf.
-
-<IfModule mod_headers.c>
- Header set X-UA-Compatible "IE=edge"
- # `mod_headers` can't match based on the content-type, however, we only
- # want to send this header for HTML pages and not for the other resources
- <FilesMatch "\.(appcache|crx|css|eot|gif|htc|ico|jpe?g|js|m4a|m4v|manifest|mp4|oex|oga|ogg|ogv|otf|pdf|png|safariextz|svg|svgz|ttf|vcf|webapp|webm|webp|woff|xml|xpi)$">
- Header unset X-UA-Compatible
- </FilesMatch>
-</IfModule>
-
-# ------------------------------------------------------------------------------
-# | Cookie setting from iframes |
-# ------------------------------------------------------------------------------
-
-# Allow cookies to be set from iframes in IE.
-
-# <IfModule mod_headers.c>
-# Header set P3P "policyref=\"/w3c/p3p.xml\", CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\""
-# </IfModule>
-
-# ------------------------------------------------------------------------------
-# | Screen flicker |
-# ------------------------------------------------------------------------------
-
-# Stop screen flicker in IE on CSS rollovers (this only works in
-# combination with the `ExpiresByType` directives for images from below).
-
-# BrowserMatch "MSIE" brokenvary=1
-# BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1
-# BrowserMatch "Opera" !brokenvary
-# SetEnvIf brokenvary 1 force-no-vary
-
-
-# ##############################################################################
-# # MIME TYPES AND ENCODING #
-# ##############################################################################
-
-# ------------------------------------------------------------------------------
-# | Proper MIME types for all files |
-# ------------------------------------------------------------------------------
-
-<IfModule mod_mime.c>
-
- # Audio
- AddType audio/mp4 m4a f4a f4b
- AddType audio/ogg oga ogg
-
- # JavaScript
- # Normalize to standard type (it's sniffed in IE anyways):
- # http://tools.ietf.org/html/rfc4329#section-7.2
- AddType application/javascript js jsonp
- AddType application/json json
-
- # Video
- AddType video/mp4 mp4 m4v f4v f4p
- AddType video/ogg ogv
- AddType video/webm webm
- AddType video/x-flv flv
-
- # Web fonts
- AddType application/font-woff woff
- AddType application/vnd.ms-fontobject eot
-
- # Browsers usually ignore the font MIME types and sniff the content,
- # however, Chrome shows a warning if other MIME types are used for the
- # following fonts.
- AddType application/x-font-ttf ttc ttf
- AddType font/opentype otf
-
- # Make SVGZ fonts work on iPad:
- # https://twitter.com/FontSquirrel/status/14855840545
- AddType image/svg+xml svg svgz
- AddEncoding gzip svgz
-
- # Other
- AddType application/octet-stream safariextz
- AddType application/x-chrome-extension crx
- AddType application/x-opera-extension oex
- AddType application/x-shockwave-flash swf
- AddType application/x-web-app-manifest+json webapp
- AddType application/x-xpinstall xpi
- AddType application/xml atom rdf rss xml
- AddType image/webp webp
- AddType image/x-icon ico
- AddType text/cache-manifest appcache manifest
- AddType text/vtt vtt
- AddType text/x-component htc
- AddType text/x-vcard vcf
-
-</IfModule>
-
-# ------------------------------------------------------------------------------
-# | UTF-8 encoding |
-# ------------------------------------------------------------------------------
-
-# Use UTF-8 encoding for anything served as `text/html` or `text/plain`.
-AddDefaultCharset utf-8
-
-# Force UTF-8 for certain file formats.
-<IfModule mod_mime.c>
- AddCharset utf-8 .atom .css .js .json .rss .vtt .webapp .xml
-</IfModule>
-
-
-# ##############################################################################
-# # URL REWRITES #
-# ##############################################################################
-
-# ------------------------------------------------------------------------------
-# | Rewrite engine |
-# ------------------------------------------------------------------------------
-
-# Turning on the rewrite engine and enabling the `FollowSymLinks` option is
-# necessary for the following directives to work.
-
-# If your web host doesn't allow the `FollowSymlinks` option, you may need to
-# comment it out and use `Options +SymLinksIfOwnerMatch` but, be aware of the
-# performance impact: http://httpd.apache.org/docs/current/misc/perf-tuning.html#symlinks
-
-# Also, some cloud hosting services require `RewriteBase` to be set:
-# http://www.rackspace.com/knowledge_center/frequently-asked-question/why-is-mod-rewrite-not-working-on-my-site
-
-<IfModule mod_rewrite.c>
- Options +FollowSymlinks
- # Options +SymLinksIfOwnerMatch
- RewriteEngine On
- # RewriteBase /
-</IfModule>
-
-# ------------------------------------------------------------------------------
-# | Suppressing / Forcing the "www." at the beginning of URLs |
-# ------------------------------------------------------------------------------
-
-# The same content should never be available under two different URLs especially
-# not with and without "www." at the beginning. This can cause SEO problems
-# (duplicate content), therefore, you should choose one of the alternatives and
-# redirect the other one.
-
-# By default option 1 (no "www.") is activated:
-# http://no-www.org/faq.php?q=class_b
-
-# If you'd prefer to use option 2, just comment out all the lines from option 1
-# and uncomment the ones from option 2.
-
-# IMPORTANT: NEVER USE BOTH RULES AT THE SAME TIME!
-
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-# Option 1: rewrite www.example.com → example.com
-
-<IfModule mod_rewrite.c>
- RewriteCond %{HTTPS} !=on
- RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
- RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]
-</IfModule>
-
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-# Option 2: rewrite example.com → www.example.com
-
-# Be aware that the following might not be a good idea if you use "real"
-# subdomains for certain parts of your website.
-
-# <IfModule mod_rewrite.c>
-# RewriteCond %{HTTPS} !=on
-# RewriteCond %{HTTP_HOST} !^www\..+$ [NC]
-# RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
-# </IfModule>
-
-
-# ##############################################################################
-# # SECURITY #
-# ##############################################################################
-
-# ------------------------------------------------------------------------------
-# | Content Security Policy (CSP) |
-# ------------------------------------------------------------------------------
-
-# You can mitigate the risk of cross-site scripting and other content-injection
-# attacks by setting a Content Security Policy which whitelists trusted sources
-# of content for your site.
-
-# The example header below allows ONLY scripts that are loaded from the current
-# site's origin (no inline scripts, no CDN, etc). This almost certainly won't
-# work as-is for your site!
-
-# To get all the details you'll need to craft a reasonable policy for your site,
-# read: http://html5rocks.com/en/tutorials/security/content-security-policy (or
-# see the specification: http://w3.org/TR/CSP).
-
-# <IfModule mod_headers.c>
-# Header set Content-Security-Policy "script-src 'self'; object-src 'self'"
-# <FilesMatch "\.(appcache|crx|css|eot|gif|htc|ico|jpe?g|js|m4a|m4v|manifest|mp4|oex|oga|ogg|ogv|otf|pdf|png|safariextz|svg|svgz|ttf|vcf|webapp|webm|webp|woff|xml|xpi)$">
-# Header unset Content-Security-Policy
-# </FilesMatch>
-# </IfModule>
-
-# ------------------------------------------------------------------------------
-# | File access |
-# ------------------------------------------------------------------------------
-
-# Block access to directories without a default document.
-# Usually you should leave this uncommented because you shouldn't allow anyone
-# to surf through every directory on your server (which may includes rather
-# private places like the CMS's directories).
-
-<IfModule mod_autoindex.c>
- Options -Indexes
-</IfModule>
-
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-# Block access to hidden files and directories.
-# This includes directories used by version control systems such as Git and SVN.
-
-<IfModule mod_rewrite.c>
- RewriteCond %{SCRIPT_FILENAME} -d [OR]
- RewriteCond %{SCRIPT_FILENAME} -f
- RewriteRule "(^|/)\." - [F]
-</IfModule>
-
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-# Block access to backup and source files.
-# These files may be left by some text editors and can pose a great security
-# danger when anyone has access to them.
-
-<FilesMatch "(^#.*#|\.(bak|config|dist|fla|inc|ini|log|psd|sh|sql|sw[op])|~)$">
- Order allow,deny
- Deny from all
- Satisfy All
-</FilesMatch>
-
-# ------------------------------------------------------------------------------
-# | Secure Sockets Layer (SSL) |
-# ------------------------------------------------------------------------------
-
-# Rewrite secure requests properly to prevent SSL certificate warnings, e.g.:
-# prevent `https://www.example.com` when your certificate only allows
-# `https://secure.example.com`.
-
-# <IfModule mod_rewrite.c>
-# RewriteCond %{SERVER_PORT} !^443
-# RewriteRule ^ https://example-domain-please-change-me.com%{REQUEST_URI} [R=301,L]
-# </IfModule>
-
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-# Force client-side SSL redirection.
-
-# If a user types "example.com" in his browser, the above rule will redirect him
-# to the secure version of the site. That still leaves a window of opportunity
-# (the initial HTTP connection) for an attacker to downgrade or redirect the
-# request. The following header ensures that browser will ONLY connect to your
-# server via HTTPS, regardless of what the users type in the address bar.
-# http://www.html5rocks.com/en/tutorials/security/transport-layer-security/
-
-# <IfModule mod_headers.c>
-# Header set Strict-Transport-Security max-age=16070400;
-# </IfModule>
-
-# ------------------------------------------------------------------------------
-# | Server software information |
-# ------------------------------------------------------------------------------
-
-# Avoid displaying the exact Apache version number, the description of the
-# generic OS-type and the information about Apache's compiled-in modules.
-
-# ADD THIS DIRECTIVE IN THE `httpd.conf` AS IT WILL NOT WORK IN THE `.htaccess`!
-
-# ServerTokens Prod
-
-
-# ##############################################################################
-# # WEB PERFORMANCE #
-# ##############################################################################
-
-# ------------------------------------------------------------------------------
-# | Compression |
-# ------------------------------------------------------------------------------
-
-<IfModule mod_deflate.c>
-
- # Force compression for mangled headers.
- # http://developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping
- <IfModule mod_setenvif.c>
- <IfModule mod_headers.c>
- SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
- RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
- </IfModule>
- </IfModule>
-
- # Compress all output labeled with one of the following MIME-types
- # (for Apache versions below 2.3.7, you don't need to enable `mod_filter`
- # and can remove the `<IfModule mod_filter.c>` and `</IfModule>` lines
- # as `AddOutputFilterByType` is still in the core directives).
- <IfModule mod_filter.c>
- AddOutputFilterByType DEFLATE application/atom+xml \
- application/javascript \
- application/json \
- application/rss+xml \
- application/vnd.ms-fontobject \
- application/x-font-ttf \
- application/x-web-app-manifest+json \
- application/xhtml+xml \
- application/xml \
- font/opentype \
- image/svg+xml \
- image/x-icon \
- text/css \
- text/html \
- text/plain \
- text/x-component \
- text/xml
- </IfModule>
-
-</IfModule>
-
-# ------------------------------------------------------------------------------
-# | Content transformations |
-# ------------------------------------------------------------------------------
-
-# Prevent some of the mobile network providers from modifying the content of
-# your site: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.5.
-
-# <IfModule mod_headers.c>
-# Header set Cache-Control "no-transform"
-# </IfModule>
-
-# ------------------------------------------------------------------------------
-# | ETag removal |
-# ------------------------------------------------------------------------------
-
-# Since we're sending far-future expires headers (see below), ETags can
-# be removed: http://developer.yahoo.com/performance/rules.html#etags.
-
-# `FileETag None` is not enough for every server.
-<IfModule mod_headers.c>
- Header unset ETag
-</IfModule>
-
-FileETag None
-
-# ------------------------------------------------------------------------------
-# | Expires headers (for better cache control) |
-# ------------------------------------------------------------------------------
-
-# The following expires headers are set pretty far in the future. If you don't
-# control versioning with filename-based cache busting, consider lowering the
-# cache time for resources like CSS and JS to something like 1 week.
-
-<IfModule mod_expires.c>
-
- ExpiresActive on
- ExpiresDefault "access plus 1 month"
-
- # CSS
- ExpiresByType text/css "access plus 1 year"
-
- # Data interchange
- ExpiresByType application/json "access plus 0 seconds"
- ExpiresByType application/xml "access plus 0 seconds"
- ExpiresByType text/xml "access plus 0 seconds"
-
- # Favicon (cannot be renamed!)
- ExpiresByType image/x-icon "access plus 1 week"
-
- # HTML components (HTCs)
- ExpiresByType text/x-component "access plus 1 month"
-
- # HTML
- ExpiresByType text/html "access plus 0 seconds"
-
- # JavaScript
- ExpiresByType application/javascript "access plus 1 year"
-
- # Manifest files
- ExpiresByType application/x-web-app-manifest+json "access plus 0 seconds"
- ExpiresByType text/cache-manifest "access plus 0 seconds"
-
- # Media
- ExpiresByType audio/ogg "access plus 1 month"
- ExpiresByType image/gif "access plus 1 month"
- ExpiresByType image/jpeg "access plus 1 month"
- ExpiresByType image/png "access plus 1 month"
- ExpiresByType video/mp4 "access plus 1 month"
- ExpiresByType video/ogg "access plus 1 month"
- ExpiresByType video/webm "access plus 1 month"
-
- # Web feeds
- ExpiresByType application/atom+xml "access plus 1 hour"
- ExpiresByType application/rss+xml "access plus 1 hour"
-
- # Web fonts
- ExpiresByType application/font-woff "access plus 1 month"
- ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
- ExpiresByType application/x-font-ttf "access plus 1 month"
- ExpiresByType font/opentype "access plus 1 month"
- ExpiresByType image/svg+xml "access plus 1 month"
-
-</IfModule>
-
-# ------------------------------------------------------------------------------
-# | Filename-based cache busting |
-# ------------------------------------------------------------------------------
-
-# If you're not using a build process to manage your filename version revving,
-# you might want to consider enabling the following directives to route all
-# requests such as `/css/style.12345.css` to `/css/style.css`.
-
-# To understand why this is important and a better idea than `*.css?v231`, read:
-# http://stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring
-
-# <IfModule mod_rewrite.c>
-# RewriteCond %{REQUEST_FILENAME} !-f
-# RewriteCond %{REQUEST_FILENAME} !-d
-# RewriteRule ^(.+)\.(\d+)\.(js|css|png|jpg|gif)$ $1.$3 [L]
-# </IfModule>
-
-# ------------------------------------------------------------------------------
-# | File concatenation |
-# ------------------------------------------------------------------------------
-
-# Allow concatenation from within specific CSS and JS files, e.g.:
-# Inside of `script.combined.js` you could have
-# <!--#include file="libs/jquery.js" -->
-# <!--#include file="plugins/jquery.idletimer.js" -->
-# and they would be included into this single file.
-
-# <IfModule mod_include.c>
-# <FilesMatch "\.combined\.js$">
-# Options +Includes
-# AddOutputFilterByType INCLUDES application/javascript application/json
-# SetOutputFilter INCLUDES
-# </FilesMatch>
-# <FilesMatch "\.combined\.css$">
-# Options +Includes
-# AddOutputFilterByType INCLUDES text/css
-# SetOutputFilter INCLUDES
-# </FilesMatch>
-# </IfModule>
-
-# ------------------------------------------------------------------------------
-# | Persistent connections |
-# ------------------------------------------------------------------------------
-
-# Allow multiple requests to be sent over the same TCP connection:
-# http://httpd.apache.org/docs/current/en/mod/core.html#keepalive.
-
-# Enable if you serve a lot of static content but, be aware of the
-# possible disadvantages!
-
-# <IfModule mod_headers.c>
-# Header set Connection Keep-Alive
-# </IfModule>
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/app/404.html
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/app/404.html b/ocw-ui/frontend-new/app/404.html
deleted file mode 100644
index b530975..0000000
--- a/ocw-ui/frontend-new/app/404.html
+++ /dev/null
@@ -1,175 +0,0 @@
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<!DOCTYPE html>
-<html lang="en">
- <head>
- <meta charset="utf-8">
- <title>Page Not Found :(</title>
- <style>
- ::-moz-selection {
- background: #b3d4fc;
- text-shadow: none;
- }
-
- ::selection {
- background: #b3d4fc;
- text-shadow: none;
- }
-
- html {
- padding: 30px 10px;
- font-size: 20px;
- line-height: 1.4;
- color: #737373;
- background: #f0f0f0;
- -webkit-text-size-adjust: 100%;
- -ms-text-size-adjust: 100%;
- }
-
- html,
- input {
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
- }
-
- body {
- max-width: 500px;
- _width: 500px;
- padding: 30px 20px 50px;
- border: 1px solid #b3b3b3;
- border-radius: 4px;
- margin: 0 auto;
- box-shadow: 0 1px 10px #a7a7a7, inset 0 1px 0 #fff;
- background: #fcfcfc;
- }
-
- h1 {
- margin: 0 10px;
- font-size: 50px;
- text-align: center;
- }
-
- h1 span {
- color: #bbb;
- }
-
- h3 {
- margin: 1.5em 0 0.5em;
- }
-
- p {
- margin: 1em 0;
- }
-
- ul {
- padding: 0 0 0 40px;
- margin: 1em 0;
- }
-
- .container {
- max-width: 380px;
- _width: 380px;
- margin: 0 auto;
- }
-
- /* google search */
-
- #goog-fixurl ul {
- list-style: none;
- padding: 0;
- margin: 0;
- }
-
- #goog-fixurl form {
- margin: 0;
- }
-
- #goog-wm-qt,
- #goog-wm-sb {
- border: 1px solid #bbb;
- font-size: 16px;
- line-height: normal;
- vertical-align: top;
- color: #444;
- border-radius: 2px;
- }
-
- #goog-wm-qt {
- width: 220px;
- height: 20px;
- padding: 5px;
- margin: 5px 10px 0 0;
- box-shadow: inset 0 1px 1px #ccc;
- }
-
- #goog-wm-sb {
- display: inline-block;
- height: 32px;
- padding: 0 10px;
- margin: 5px 0 0;
- white-space: nowrap;
- cursor: pointer;
- background-color: #f5f5f5;
- background-image: -webkit-linear-gradient(rgba(255,255,255,0), #f1f1f1);
- background-image: -moz-linear-gradient(rgba(255,255,255,0), #f1f1f1);
- background-image: -ms-linear-gradient(rgba(255,255,255,0), #f1f1f1);
- background-image: -o-linear-gradient(rgba(255,255,255,0), #f1f1f1);
- -webkit-appearance: none;
- -moz-appearance: none;
- appearance: none;
- *overflow: visible;
- *display: inline;
- *zoom: 1;
- }
-
- #goog-wm-sb:hover,
- #goog-wm-sb:focus {
- border-color: #aaa;
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
- background-color: #f8f8f8;
- }
-
- #goog-wm-qt:hover,
- #goog-wm-qt:focus {
- border-color: #105cb6;
- outline: 0;
- color: #222;
- }
-
- input::-moz-focus-inner {
- padding: 0;
- border: 0;
- }
- </style>
- </head>
- <body>
- <div class="container">
- <h1>Not found <span>:(</span></h1>
- <p>Sorry, but the page you were trying to view does not exist.</p>
- <p>It looks like this was the result of either:</p>
- <ul>
- <li>a mistyped address</li>
- <li>an out-of-date link</li>
- </ul>
- <script>
- var GOOG_FIXURL_LANG = (navigator.language || '').slice(0,2),GOOG_FIXURL_SITE = location.host;
- </script>
- <script src="//linkhelp.clients.google.com/tbproxy/lh/wm/fixurl.js"></script>
- </div>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/app/favicon.ico
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/app/favicon.ico b/ocw-ui/frontend-new/app/favicon.ico
deleted file mode 100644
index 6527905..0000000
Binary files a/ocw-ui/frontend-new/app/favicon.ico and /dev/null differ
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/app/index.html
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/app/index.html b/ocw-ui/frontend-new/app/index.html
deleted file mode 100644
index 01a6e89..0000000
--- a/ocw-ui/frontend-new/app/index.html
+++ /dev/null
@@ -1,148 +0,0 @@
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<!doctype html>
-<html class="no-js">
- <head>
- <meta charset="utf-8">
- <title></title>
- <meta name="description" content="">
- <meta name="viewport" content="width=device-width">
- <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
- <!-- build:css(.) styles/vendor.css -->
- <!-- bower:css -->
- <link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css" />
- <link rel="stylesheet" href="bower_components/leaflet/dist/leaflet.css" />
- <link rel="stylesheet" href="bower_components/chap-links-timeline/timeline.css" />
- <link rel="stylesheet" href="bower_components/components-font-awesome/css/font-awesome.css" />
- <!-- endbower -->
- <!-- endbuild -->
- <!-- build:css(.tmp) styles/main.css -->
- <link rel="stylesheet" href="styles/main.css">
- <!-- endbuild -->
- <link rel="stylesheet" href="bower_components/jquery-ui/themes/smoothness/jquery-ui.css" />
- </head>
- <body ng-app="ocwUiApp">
- <!--[if lt IE 7]>
- <p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
- <![endif]-->
-
- <div class="container">
- <div class="row">
- <div class="navbar navbar-default" id="ocw-navbar" role="navigation">
- <div class="container">
- <div class="navbar-header">
- <a class="navbar-brand brand" href="#">OCW UI</a>
- </div>
- <div class="navbar-collapse">
- <ul class="nav navbar-nav">
- <li ng-class="{ active: $state.includes('main') }"><a href="#/evalute">Evaluate</a></li>
- <li ng-class="{ active: $state.includes('results') }"><a href="#/results">Results</a></li>
- </ul>
- </div>
- </div>
- </div>
- <div class="row">
- <div class="col-md-12">
- <div id="header">
- <img id="header-img" src=""/>
- <h3 id="header-title">Project Name</h3>
- <h5 id="OCW-powered">Powered by Apache Open Climate Workbench</h5>
- </div>
- </div>
- </div>
- </div>
- <!-- Main Content -->
- <div id="main-container" class="container" ui-view></div>
- </div>
-
- <!-- Google Analytics: change UA-XXXXX-X to be your site's ID -->
- <script>
- (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
- (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
- m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
- })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
- ga('create', 'UA-XXXXX-X');
- ga('send', 'pageview');
- </script>
-
- <!-- build:js(.) scripts/oldieshim.js -->
- <!--[if lt IE 9]>
- <script src="bower_components/es5-shim/es5-shim.js"></script>
- <script src="bower_components/json3/lib/json3.min.js"></script>
- <![endif]-->
- <!-- endbuild -->
-
- <!-- Google visualization library needs to be initialized for the timeline -->
- <!-- Note that the terms of use forbid having a local copy of the code, so we're -->
- <!-- stuck downloading it this way unfortunately. -->
- <script type="text/javascript" src="http://www.google.com/jsapi"></script>
- <script type="text/javascript">google.load("visualization", "1");</script>
-
- <!-- build:js(.) scripts/vendor.js -->
- <!-- bower:js -->
- <script src="bower_components/jquery/dist/jquery.js"></script>
- <script src="bower_components/angular/angular.js"></script>
- <script src="bower_components/json3/lib/json3.js"></script>
- <script src="bower_components/bootstrap/dist/js/bootstrap.js"></script>
- <script src="bower_components/angular-resource/angular-resource.js"></script>
- <script src="bower_components/angular-cookies/angular-cookies.js"></script>
- <script src="bower_components/angular-animate/angular-animate.js"></script>
- <script src="bower_components/angular-route/angular-route.js"></script>
- <script src="bower_components/angular-ui-router/release/angular-ui-router.js"></script>
- <script src="bower_components/leaflet/dist/leaflet.js"></script>
- <script src="bower_components/leaflet/dist/leaflet-src.js"></script>
- <script src="bower_components/chap-links-timeline/timeline-min.js"></script>
- <script src="bower_components/angular-bootstrap/ui-bootstrap-tpls.js"></script>
- <script src="bower_components/jquery-ui/jquery-ui.js"></script>
- <script src="bower_components/angular-ui-date/ui-date.js"></script>
- <!-- endbower -->
- <!-- endbuild -->
-
- <!-- build:js({.tmp,app}) scripts/scripts.js -->
- <script src="scripts/app.js"></script>
- <script src="scripts/controllers/main.js"></script>
- <script src="scripts/controllers/about.js"></script>
- <script src="scripts/controllers/datasetdisplay.js"></script>
- <script src="scripts/controllers/datasetselect.js"></script>
- <script src="scripts/controllers/observationselect.js"></script>
- <script src="scripts/controllers/parameterselect.js"></script>
- <script src="scripts/controllers/rcmedselection.js"></script>
- <script src="scripts/controllers/result.js"></script>
- <script src="scripts/controllers/resultdetail.js"></script>
- <script src="scripts/controllers/settings.js"></script>
- <script src="scripts/controllers/timeline.js"></script>
- <script src="scripts/controllers/worldmap.js"></script>
- <script src="scripts/directives/bootstrapmodal.js"></script>
- <script src="scripts/directives/bootstrapmodalopen.js"></script>
- <script src="scripts/directives/leafletmap.js"></script>
- <script src="scripts/directives/onblur.js"></script>
- <script src="scripts/directives/predictivefilebrowserinput.js"></script>
- <script src="scripts/directives/previewmap.js"></script>
- <script src="scripts/directives/timeline.js"></script>
- <script src="scripts/filters/isodatetomiddleendian.js"></script>
- <script src="scripts/services/evaluationsettings.js"></script>
- <script src="scripts/services/regionselectparams.js"></script>
- <script src="scripts/services/selecteddatasetinformation.js"></script>
- <!-- endbuild -->
-
- <!-- grunt wiredep wasn't properly linking this. Had to add manually -->
- <script src="bower_components/angular-ui-date/src/date.js"></script>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/app/robots.txt
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/app/robots.txt b/ocw-ui/frontend-new/app/robots.txt
deleted file mode 100644
index 9417495..0000000
--- a/ocw-ui/frontend-new/app/robots.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-# robotstxt.org
-
-User-agent: *
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/app/scripts/app.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/app/scripts/app.js b/ocw-ui/frontend-new/app/scripts/app.js
deleted file mode 100644
index 8dca2dc..0000000
--- a/ocw-ui/frontend-new/app/scripts/app.js
+++ /dev/null
@@ -1,96 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict';
-
-/**
- * @ngdoc overview
- * @name ocwUiApp
- * @description
- * # ocwUiApp
- *
- * Main module of the application.
- */
-angular
- .module('ocwUiApp', [
- 'ngAnimate',
- 'ngCookies',
- 'ngResource',
- 'ngRoute',
- 'ui.router',
- 'ui.bootstrap',
- 'ui.date',
- ])
- .config(['$stateProvider', '$routeProvider', '$urlRouterProvider',
- function ($stateProvider, $routeProvider, $urlRouterProvider) {
- $urlRouterProvider
- .when('/r?id', '/results/:id')
- .otherwise('/evaluate');
-
- $routeProvider
- .when('/evaluation/:id', {
- redirectTo: '/results/:id',
- })
- .when('/', {
- redirectTo: '/evaluate',
- });
-
- $stateProvider
- .state('main',{
- url: '/evaluate',
- templateUrl: 'views/main.html',
- })
- .state('results', {
- url: '/results',
- abstract: true,
- templateUrl: 'views/results.html',
- controller: 'ResultCtrl'
- })
- .state('results.list', {
- // parent: 'results',
- url: '',
- templateUrl: 'views/resultslist.html',
- })
- .state('results.detail', {
- // parent: 'results',
- url: '/{resultId}',
- views: {
- '': {
- templateUrl: 'views/resultsdetail.html',
- controller: 'ResultDetailCtrl'
- },
- 'menu': {
- templateProvider:
- [ '$stateParams',
- function ($stateParams){
- return '<hr><small class="muted">result ID: ' + $stateParams.resultId + '</small>';
- }],
- },
- },
- });
- }])
- .run(['$rootScope', '$state', '$stateParams',
- function ($rootScope, $state, $stateParams) {
- $rootScope.$state = $state;
- $rootScope.$stateParams = $stateParams;
- $rootScope.evalResults = '';
- $rootScope.fillColors = ['#ff0000', '#00c90d', '#cd0074', '#f3fd00'];
- $rootScope.surroundColors = ['#a60000', '#008209', '#8f004b', '#93a400'];
- $rootScope.baseURL = 'http://localhost:8082';
- }]);
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/app/scripts/controllers/datasetdisplay.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/app/scripts/controllers/datasetdisplay.js b/ocw-ui/frontend-new/app/scripts/controllers/datasetdisplay.js
deleted file mode 100644
index f7d2a77..0000000
--- a/ocw-ui/frontend-new/app/scripts/controllers/datasetdisplay.js
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict';
-
-/**
- * @ngdoc function
- * @name ocwUiApp.controller:DatasetDisplayCtrl
- * @description
- * # DatasetDisplayCtrl
- * Controller of the ocwUiApp
- */
-angular.module('ocwUiApp')
- .controller('DatasetDisplayCtrl', ['$rootScope', '$scope', 'selectedDatasetInformation',
- function($rootScope, $scope, selectedDatasetInformation) {
- $scope.datasets = selectedDatasetInformation.getDatasets();
-
- $scope.removeDataset = function($index) {
- selectedDatasetInformation.removeDataset($index);
- };
-
- $scope.setRegridBase = function(index) {
- for (var i = 0; i < $scope.datasets.length; i++) {
- $scope.datasets[i].regrid = ((i === index) ? $scope.datasets[i].regrid : false);
- }
- };
-}]);
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/app/scripts/controllers/datasetselect.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/app/scripts/controllers/datasetselect.js b/ocw-ui/frontend-new/app/scripts/controllers/datasetselect.js
deleted file mode 100644
index b6b52ef..0000000
--- a/ocw-ui/frontend-new/app/scripts/controllers/datasetselect.js
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict';
-
-/**
- * @ngdoc function
- * @name ocwUiApp.controller:DatasetSelectCtrl
- * @description
- * # DatasetSelectCtrl
- * Controller of the ocwUiApp
- */
-angular.module('ocwUiApp')
- .controller('DatasetSelectCtrl', ['$scope', 'selectedDatasetInformation',
- function($scope, selectedDatasetInformation) {
- // Grab a copy of the datasets so we can display a count to the user!
- $scope.datasetCount = selectedDatasetInformation.getDatasets();
-
- $scope.shouldDisableClearButton = function() {
- return (selectedDatasetInformation.getDatasetCount() === 0);
- };
-
- $scope.clearDatasets = function() {
- selectedDatasetInformation.clearDatasets();
- };
-
- $scope.open = function () {
- $scope.datasetSelect = true;
- };
-
- $scope.close = function () {
- $scope.datasetSelect = false;
- };
-
- $scope.opts = {
- backdropFade: true,
- dialogFade: true,
- };
-
- $scope.templates = [
- {title:'Local File', url: 'views/selectobservation.html'},
- {title:'RCMED', url: 'views/selectrcmed.html'},
- {title:'ESG', disabled: true}
- ];
-
- $scope.template = $scope.templates[0];
- }
- ]);
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/app/scripts/controllers/main.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/app/scripts/controllers/main.js b/ocw-ui/frontend-new/app/scripts/controllers/main.js
deleted file mode 100644
index 16008c0..0000000
--- a/ocw-ui/frontend-new/app/scripts/controllers/main.js
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict';
-
-/**
- * @ngdoc function
- * @name ocwUiApp.controller:MainCtrl
- * @description
- * # MainCtrl
- * Controller of the ocwUiApp
- */
-angular.module('ocwUiApp')
- .controller('MainCtrl', function ($scope) {
- $scope.awesomeThings = [
- 'HTML5 Boilerplate',
- 'AngularJS',
- 'Karma'
- ];
- });
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend-new/app/scripts/controllers/observationselect.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/app/scripts/controllers/observationselect.js b/ocw-ui/frontend-new/app/scripts/controllers/observationselect.js
deleted file mode 100644
index 6dfbb57..0000000
--- a/ocw-ui/frontend-new/app/scripts/controllers/observationselect.js
+++ /dev/null
@@ -1,203 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict';
-
-/**
- * @ngdoc function
- * @name ocwUiApp.controller:ObservationSelectCtrl
- * @description
- * # ObservationSelectCtrl
- * Controller of the ocwUiApp
- */
-angular.module('ocwUiApp')
- .controller('ObservationSelectCtrl', ['$rootScope', '$scope', '$http', '$q', '$timeout', 'selectedDatasetInformation',
- function($rootScope, $scope, $http, $q, $timeout, selectedDatasetInformation) {
- // Grab a copy of the datasets so we can display a count to the user!
- $scope.datasetCount = selectedDatasetInformation.getDatasets();
-
- // Initalize the option arrays and default to the first element
- $scope.params = ['Please select a file above'];
- $scope.paramSelect = $scope.params[0];
- $scope.lats = ['Please select a file above'];
- $scope.latsSelect = $scope.lats[0];
- $scope.lons = ['Please select a file above'];
- $scope.lonsSelect = $scope.lons[0];
- $scope.times = ['Please select a file above'];
- $scope.timeSelect = $scope.times[0];
-
- // Grab the path leader information that the webserver is using to limit directory access.
- $scope.pathLeader = false;
- $http.jsonp($rootScope.baseURL + '/dir/path_leader/?callback=JSON_CALLBACK').
- success(function(data) {
- $scope.pathLeader = data.leader;
- });
-
- // Toggle load button view depending on upload state of selected files
- $scope.loadingFile = false;
-
- // Toggle display of a confirmation when loading a dataset
- $scope.fileAdded = false;
-
- $scope.latLonVals = [];
- $scope.timeVals = [];
- $scope.localSelectForm = {};
-
- $scope.uploadLocalFile = function() {
- $scope.loadingFile = true;
-
- // TODO: Need to try to validate the input a bit. At least make sure we're not
- // pointing at a directory perhaps?
-
- // TODO: Two-way binding with ng-model isn't being used here because it fails to update
- // properly with the auto-complete that we're using on the input box. So we're doing
- // it the wrong way temporarily...
- var input = $('#observationFileInput').val();
-
- // If the backend is limiting directory access we need to add that leader to our path
- // so it remains valid!
- if ($scope.pathLeader) {
- input = $scope.pathLeader + input
- }
-
- // TODO: We're not really handling the case where there is a failure here at all.
- // Should check for fails and allow the user to make changes.
- //
- // Get model variables
- var varsPromise = $http.jsonp($rootScope.baseURL + '/lfme/list_vars/' + input + '?callback=JSON_CALLBACK');
- // Get Lat and Lon variables
- var latlonPromise = $http.jsonp($rootScope.baseURL + '/lfme/list_latlon/' + input + '?callback=JSON_CALLBACK');
- // Get Time variables
- var timesPromise = $http.jsonp($rootScope.baseURL + '/lfme/list_time/' + input + '?callback=JSON_CALLBACK');
-
- $q.all([varsPromise, latlonPromise, timesPromise]).then(
- // Handle success fetches!
- function(arrayOfResults) {
- $scope.loadingFile = false;
-
- // Handle lat/lon results
- var data = arrayOfResults[1].data;
- $scope.lats = [data.lat_name];
- $scope.lons = [data.lon_name];
- $scope.latLonVals = [data.lat_min, data.lat_max, data.lon_min, data.lon_max];
-
- // If there is more than one option for the user, tell them they need to pick one!
- if ($scope.lats.length > 1) $scope.lats.splice(0, 0, 'Please select an option');
- if ($scope.lons.length > 1) $scope.lons.splice(0, 0, 'Please select an option');
- // Default the display to the first available option.
- $scope.latsSelect = $scope.lats[0];
- $scope.lonsSelect = $scope.lons[0];
-
- // Handle time results
- var data = arrayOfResults[2].data
- $scope.times = [data.time_name];
- $scope.timeVals = [data.start_time, data.end_time];
-
- if ($scope.times.length > 1) $scope.times.splice(0, 0, 'Please select an option');
- $scope.timeSelect = $scope.times[0];
-
- // Handle parameter results
- var data = arrayOfResults[0].data.variables;
- $scope.params = (data instanceof Array) ? data : [data];
- $scope.params = $.grep($scope.params,
- function(val) {
- return ($.inArray(val, $scope.lats) != 0 &&
- $.inArray(val, $scope.lons) != 0 &&
- $.inArray(val, $scope.times) != 0);
- });
-
- if ($scope.params.length > 1) $scope.params.splice(0, 0, 'Please select an option');
- $scope.paramSelect = $scope.params[0];
- },
- // Uh oh! AT LEAST on of our fetches failed
- function(arrayOfFailure) {
- $scope.loadingFile = false;
-
- $scope.params = ['Unable to load variable(s)'];
- $scope.paramSelect = $scope.params[0];
- $scope.lats = ['Unable to load variable(s)'];
- $scope.latsSelect = $scope.lats[0];
- $scope.lons = ['Unable to load variable(s)'];
- $scope.lonsSelect = $scope.lons[0];
- $scope.times = ['Unable to load variable(s)'];
- $scope.timeSelect = $scope.times[0];
- }
- );
- };
-
- $scope.addDataSet = function() {
- // TODO: Need to verify that all the variables selected are correct!!!
- // TODO: We shouldn't allow different parameters to match the same variables!!
-
- var newDataset = {};
- var input = $('#observationFileInput').val();
-
- // If the backend is limiting directory access we need to add that leader to our path
- // so it remains valid!
- if ($scope.pathLeader != 'False') {
- input = $scope.pathLeader + input
- }
-
- newDataset['isObs'] = 0;
- // Save the model path. Note that the path is effectively the "id" for the model.
- newDataset['id'] = input;
- // Grab the file name later for display purposes.
- var splitFilePath = input.split('/');
- newDataset['name'] = splitFilePath[splitFilePath.length - 1];
- // Save the model parameter variable. We save it twice for consistency and display convenience.
- newDataset['param'] = $scope.paramSelect;
- newDataset['paramName'] = newDataset['param'];
- // Save the lat/lon information
- newDataset['lat'] = $scope.latsSelect;
- newDataset['lon'] = $scope.lonsSelect;
-
- newDataset['latlonVals'] = {'latMin': $scope.latLonVals[0], 'latMax': $scope.latLonVals[1],
- 'lonMin': $scope.latLonVals[2], 'lonMax': $scope.latLonVals[3]};
- // Get the time information
- newDataset['time'] = $scope.timeSelect;
- newDataset['timeVals'] = {'start': $scope.timeVals[0], 'end': $scope.timeVals[1]};
-
- selectedDatasetInformation.addDataset(newDataset);
-
- // Reset all the fields!!
- $scope.params = ['Please select a file above'];
- $scope.paramSelect = $scope.params[0];
- $scope.lats = ['Please select a file above'];
- $scope.latsSelect = $scope.lats[0];
- $scope.lons = ['Please select a file above'];
- $scope.lonsSelect = $scope.lons[0];
- $scope.times = ['Please select a file above'];
- $scope.timeSelect = $scope.times[0];
- $scope.latLonVals = [];
- $scope.timeVals = [];
-
- // Clear the input box
- $('#observationFileInput').val('');
-
- // Display a confirmation message for a little bit
- $scope.fileAdded = true;
- $timeout(function() {
- $scope.fileAdded = false;
- }, 2000);
- }
-
- $scope.shouldDisableLoadButton = function() {
- return $scope.loadingFile;
- }
- }]);
[13/28] CLIMATE-512 - Replace frontend with new Yeoman/Grunt/Bower
frontend
Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/app/js/lib/bootstrap/bootstrap.min.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/js/lib/bootstrap/bootstrap.min.js b/ocw-ui/frontend/app/js/lib/bootstrap/bootstrap.min.js
deleted file mode 100755
index 95c5ac5..0000000
--- a/ocw-ui/frontend/app/js/lib/bootstrap/bootstrap.min.js
+++ /dev/null
@@ -1,6 +0,0 @@
-/*!
-* Bootstrap.js by @fat & @mdo
-* Copyright 2012 Twitter, Inc.
-* http://www.apache.org/licenses/LICENSE-2.0.txt
-*/
-!function(e){"use strict";e(function(){e.support.transition=function(){var e=function(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},n;for(n in t)if(e.style[n]!==undefined)return t[n]}();return e&&{end:e}}()})}(window.jQuery),!function(e){"use strict";var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function s(){i.trigger("closed").remove()}var n=e(this),r=n.attr("data-target"),i;r||(r=n.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,"")),i=e(r),t&&t.preventDefault(),i.length||(i=n.hasClass("alert")?n:n.parent()),i.trigger(t=e.Event("close"));if(t.isDefaultPrevented())return;i.removeClass("in"),e.support.transition&&i.hasClass("fade")?i.on(e.support.transition.end,s):s()};var r=e.fn.alert;e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("alert");i||r.data("alert",i=
new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=r,this},e(document).on("click.alert.data-api",t,n.prototype.close)}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.button.defaults,n)};t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.data(),i=n.is("input")?"val":"html";e+="Text",r.resetText||n.data("resetText",n[i]()),n[i](r[e]||this.options[e]),setTimeout(function(){e=="loadingText"?n.addClass(t).attr(t,t):n.removeClass(t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="buttons-radio"]');e&&e.find(".active").removeClass("active"),this.$element.toggleClass("active")};var n=e.fn.button;e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("button"),s=typeof n=="object"&&n;i||r.data("button",i=new t(this,s)),n=="toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.de
faults={loadingText:"loading..."},e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=n,this},e(document).on("click.button.data-api","[data-toggle^=button]",function(t){var n=e(t.target);n.hasClass("btn")||(n=n.closest(".btn")),n.button("toggle")})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.options.pause=="hover"&&this.$element.on("mouseenter",e.proxy(this.pause,this)).on("mouseleave",e.proxy(this.cycle,this))};t.prototype={cycle:function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},getActiveIndex:function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},to:function(t){var n=this.getActiveIndex(),r=this;if(t>thi
s.$items.length-1||t<0)return;return this.sliding?this.$element.one("slid",function(){r.to(t)}):n==t?this.pause().cycle():this.slide(t>n?"next":"prev",e(this.$items[t]))},pause:function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition.end&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),clearInterval(this.interval),this.interval=null,this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(t,n){var r=this.$element.find(".item.active"),i=n||r[t](),s=this.interval,o=t=="next"?"left":"right",u=t=="next"?"first":"last",a=this,f;this.sliding=!0,s&&this.pause(),i=i.length?i:this.$element.find(".item")[u](),f=e.Event("slide",{relatedTarget:i[0],direction:o});if(i.hasClass("active"))return;this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var t=e(a.$indicators.children(
)[a.getActiveIndex()]);t&&t.addClass("active")}));if(e.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(f);if(f.isDefaultPrevented())return;i.addClass(t),i[0].offsetWidth,r.addClass(o),i.addClass(o),this.$element.one(e.support.transition.end,function(){i.removeClass([t,o].join(" ")).addClass("active"),r.removeClass(["active",o].join(" ")),a.sliding=!1,setTimeout(function(){a.$element.trigger("slid")},0)})}else{this.$element.trigger(f);if(f.isDefaultPrevented())return;r.removeClass("active"),i.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return s&&this.cycle(),this}};var n=e.fn.carousel;e.fn.carousel=function(n){return this.each(function(){var r=e(this),i=r.data("carousel"),s=e.extend({},e.fn.carousel.defaults,typeof n=="object"&&n),o=typeof n=="string"?n:s.slide;i||r.data("carousel",i=new t(this,s)),typeof n=="number"?i.to(n):o?i[o]():s.interval&&i.pause().cycle()})},e.fn.carousel.defaults={interval:5e3,pause:"hover"},e.fn.carousel.Const
ructor=t,e.fn.carousel.noConflict=function(){return e.fn.carousel=n,this},e(document).on("click.carousel.data-api","[data-slide], [data-slide-to]",function(t){var n=e(this),r,i=e(n.attr("data-target")||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,"")),s=e.extend({},i.data(),n.data()),o;i.carousel(s),(o=n.attr("data-slide-to"))&&i.data("carousel").pause().to(o).cycle(),t.preventDefault()})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.collapse.defaults,n),this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.prototype={constructor:t,dimension:function(){var e=this.$element.hasClass("width");return e?"width":"height"},show:function(){var t,n,r,i;if(this.transitioning||this.$element.hasClass("in"))return;t=this.dimension(),n=e.camelCase(["scroll",t].join("-")),r=this.$parent&&this.$parent.find("> .accordion-group > .in");if(r&&r.length){i=r.data("collapse");if(i&&i.transitionin
g)return;r.collapse("hide"),i||r.data("collapse",null)}this.$element[t](0),this.transition("addClass",e.Event("show"),"shown"),e.support.transition&&this.$element[t](this.$element[0][n])},hide:function(){var t;if(this.transitioning||!this.$element.hasClass("in"))return;t=this.dimension(),this.reset(this.$element[t]()),this.transition("removeClass",e.Event("hide"),"hidden"),this.$element[t](0)},reset:function(e){var t=this.dimension();return this.$element.removeClass("collapse")[t](e||"auto")[0].offsetWidth,this.$element[e!==null?"addClass":"removeClass"]("collapse"),this},transition:function(t,n,r){var i=this,s=function(){n.type=="show"&&i.reset(),i.transitioning=0,i.$element.trigger(r)};this.$element.trigger(n);if(n.isDefaultPrevented())return;this.transitioning=1,this.$element[t]("in"),e.support.transition&&this.$element.hasClass("collapse")?this.$element.one(e.support.transition.end,s):s()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}};var n=e.fn.collapse
;e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("collapse"),s=e.extend({},e.fn.collapse.defaults,r.data(),typeof n=="object"&&n);i||r.data("collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.defaults={toggle:!0},e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=n,this},e(document).on("click.collapse.data-api","[data-toggle=collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i).data("collapse")?"toggle":n.data();n[e(i).hasClass("in")?"addClass":"removeClass"]("collapsed"),e(i).collapse(s)})}(window.jQuery),!function(e){"use strict";function r(){e(t).each(function(){i(e(this)).removeClass("open")})}function i(t){var n=t.attr("data-target"),r;n||(n=t.attr("href"),n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,"")),r=n&&e(n);if(!r||!r.length)r=t.parent();return r}var t="[data-toggle=dropdown]",n=function(t){var n=e(t).o
n("click.dropdown.data-api",this.toggle);e("html").on("click.dropdown.data-api",function(){n.parent().removeClass("open")})};n.prototype={constructor:n,toggle:function(t){var n=e(this),s,o;if(n.is(".disabled, :disabled"))return;return s=i(n),o=s.hasClass("open"),r(),o||s.toggleClass("open"),n.focus(),!1},keydown:function(n){var r,s,o,u,a,f;if(!/(38|40|27)/.test(n.keyCode))return;r=e(this),n.preventDefault(),n.stopPropagation();if(r.is(".disabled, :disabled"))return;u=i(r),a=u.hasClass("open");if(!a||a&&n.keyCode==27)return n.which==27&&u.find(t).focus(),r.click();s=e("[role=menu] li:not(.divider):visible a",u);if(!s.length)return;f=s.index(s.filter(":focus")),n.keyCode==38&&f>0&&f--,n.keyCode==40&&f<s.length-1&&f++,~f||(f=0),s.eq(f).focus()}};var s=e.fn.dropdown;e.fn.dropdown=function(t){return this.each(function(){var r=e(this),i=r.data("dropdown");i||r.data("dropdown",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.dropdown.Constructor=n,e.fn.dropdown.noConflict=function()
{return e.fn.dropdown=s,this},e(document).on("click.dropdown.data-api",r).on("click.dropdown.data-api",".dropdown form",function(e){e.stopPropagation()}).on("click.dropdown-menu",function(e){e.stopPropagation()}).on("click.dropdown.data-api",t,n.prototype.toggle).on("keydown.dropdown.data-api",t+", [role=menu]",n.prototype.keydown)}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.options=n,this.$element=e(t).delegate('[data-dismiss="modal"]',"click.dismiss.modal",e.proxy(this.hide,this)),this.options.remote&&this.$element.find(".modal-body").load(this.options.remote)};t.prototype={constructor:t,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var t=this,n=e.Event("show");this.$element.trigger(n);if(this.isShown||n.isDefaultPrevented())return;this.isShown=!0,this.escape(),this.backdrop(function(){var n=e.support.transition&&t.$element.hasClass("fade");t.$element.parent().length||t.$element.appendTo(document.body),t.$element.show(),n&&t.$e
lement[0].offsetWidth,t.$element.addClass("in").attr("aria-hidden",!1),t.enforceFocus(),n?t.$element.one(e.support.transition.end,function(){t.$element.focus().trigger("shown")}):t.$element.focus().trigger("shown")})},hide:function(t){t&&t.preventDefault();var n=this;t=e.Event("hide"),this.$element.trigger(t);if(!this.isShown||t.isDefaultPrevented())return;this.isShown=!1,this.escape(),e(document).off("focusin.modal"),this.$element.removeClass("in").attr("aria-hidden",!0),e.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal()},enforceFocus:function(){var t=this;e(document).on("focusin.modal",function(e){t.$element[0]!==e.target&&!t.$element.has(e.target).length&&t.$element.focus()})},escape:function(){var e=this;this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.modal",function(t){t.which==27&&e.hide()}):this.isShown||this.$element.off("keyup.dismiss.modal")},hideWithTransition:function(){var t=this,n=setTimeout(function(){t.
$element.off(e.support.transition.end),t.hideModal()},500);this.$element.one(e.support.transition.end,function(){clearTimeout(n),t.hideModal()})},hideModal:function(){var e=this;this.$element.hide(),this.backdrop(function(){e.removeBackdrop(),e.$element.trigger("hidden")})},removeBackdrop:function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},backdrop:function(t){var n=this,r=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var i=e.support.transition&&r;this.$backdrop=e('<div class="modal-backdrop '+r+'" />').appendTo(document.body),this.$backdrop.click(this.options.backdrop=="static"?e.proxy(this.$element[0].focus,this.$element[0]):e.proxy(this.hide,this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in");if(!t)return;i?this.$backdrop.one(e.support.transition.end,t):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(e.support.tra
nsition.end,t):t()):t&&t()}};var n=e.fn.modal;e.fn.modal=function(n){return this.each(function(){var r=e(this),i=r.data("modal"),s=e.extend({},e.fn.modal.defaults,r.data(),typeof n=="object"&&n);i||r.data("modal",i=new t(this,s)),typeof n=="string"?i[n]():s.show&&i.show()})},e.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},e.fn.modal.Constructor=t,e.fn.modal.noConflict=function(){return e.fn.modal=n,this},e(document).on("click.modal.data-api",'[data-toggle="modal"]',function(t){var n=e(this),r=n.attr("href"),i=e(n.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),s=i.data("modal")?"toggle":e.extend({remote:!/#/.test(r)&&r},i.data(),n.data());t.preventDefault(),i.modal(s).one("hide",function(){n.focus()})})}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("tooltip",e,t)};t.prototype={constructor:t,init:function(t,n,r){var i,s,o,u,a;this.type=t,this.$element=e(n),this.options=this.getOptions(r),this.enabled=!0,o=this.options.trigger.split(" ");for(a=o
.length;a--;)u=o[a],u=="click"?this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this)):u!="manual"&&(i=u=="hover"?"mouseenter":"focus",s=u=="hover"?"mouseleave":"blur",this.$element.on(i+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,e.proxy(this.leave,this)));this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(t){return t=e.extend({},e.fn[this.type].defaults,this.$element.data(),t),t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),t},enter:function(t){var n=e.fn[this.type].defaults,r={},i;this._options&&e.each(this._options,function(e,t){n[e]!=t&&(r[e]=t)},this),i=e(t.currentTarget)[this.type](r).data(this.type);if(!i.options.delay||!i.options.delay.show)return i.show();clearTimeout(this.timeout),i.hoverState="in",this.timeout=setTimeout(function(){i.hoverState=="in"&&i.show()},i.optio
ns.delay.show)},leave:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);this.timeout&&clearTimeout(this.timeout);if(!n.options.delay||!n.options.delay.hide)return n.hide();n.hoverState="out",this.timeout=setTimeout(function(){n.hoverState=="out"&&n.hide()},n.options.delay.hide)},show:function(){var t,n,r,i,s,o,u=e.Event("show");if(this.hasContent()&&this.enabled){this.$element.trigger(u);if(u.isDefaultPrevented())return;t=this.tip(),this.setContent(),this.options.animation&&t.addClass("fade"),s=typeof this.options.placement=="function"?this.options.placement.call(this,t[0],this.$element[0]):this.options.placement,t.detach().css({top:0,left:0,display:"block"}),this.options.container?t.appendTo(this.options.container):t.insertAfter(this.$element),n=this.getPosition(),r=t[0].offsetWidth,i=t[0].offsetHeight;switch(s){case"bottom":o={top:n.top+n.height,left:n.left+n.width/2-r/2};break;case"top":o={top:n.top-i,left:n.left+n.width/2-r/2};break;case"left":o={top
:n.top+n.height/2-i/2,left:n.left-r};break;case"right":o={top:n.top+n.height/2-i/2,left:n.left+n.width}}this.applyPlacement(o,s),this.$element.trigger("shown")}},applyPlacement:function(e,t){var n=this.tip(),r=n[0].offsetWidth,i=n[0].offsetHeight,s,o,u,a;n.offset(e).addClass(t).addClass("in"),s=n[0].offsetWidth,o=n[0].offsetHeight,t=="top"&&o!=i&&(e.top=e.top+i-o,a=!0),t=="bottom"||t=="top"?(u=0,e.left<0&&(u=e.left*-2,e.left=0,n.offset(e),s=n[0].offsetWidth,o=n[0].offsetHeight),this.replaceArrow(u-r+s,s,"left")):this.replaceArrow(o-i,o,"top"),a&&n.offset(e)},replaceArrow:function(e,t,n){this.arrow().css(n,e?50*(1-e/t)+"%":"")},setContent:function(){var e=this.tip(),t=this.getTitle();e.find(".tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("fade in top bottom left right")},hide:function(){function i(){var t=setTimeout(function(){n.off(e.support.transition.end).detach()},500);n.one(e.support.transition.end,function(){clearTimeout(t),n.detach()})}var t=this,n=this.tip
(),r=e.Event("hide");this.$element.trigger(r);if(r.isDefaultPrevented())return;return n.removeClass("in"),e.support.transition&&this.$tip.hasClass("fade")?i():n.detach(),this.$element.trigger("hidden"),this},fixTitle:function(){var e=this.$element;(e.attr("title")||typeof e.attr("data-original-title")!="string")&&e.attr("data-original-title",e.attr("title")||"").attr("title","")},hasContent:function(){return this.getTitle()},getPosition:function(){var t=this.$element[0];return e.extend({},typeof t.getBoundingClientRect=="function"?t.getBoundingClientRect():{width:t.offsetWidth,height:t.offsetHeight},this.$element.offset())},getTitle:function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title),e},tip:function(){return this.$tip=this.$tip||e(this.options.template)},arrow:function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},validate:function(){this.$element[0].parentNode||(this.h
ide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(t){var n=t?e(t.currentTarget)[this.type](this._options).data(this.type):this;n.tip().hasClass("in")?n.hide():n.show()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};var n=e.fn.tooltip;e.fn.tooltip=function(n){return this.each(function(){var r=e(this),i=r.data("tooltip"),s=typeof n=="object"&&n;i||r.data("tooltip",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},e.fn.tooltip.noConflict=function(){return e.fn.tooltip=n,this}}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("popover",e,t)};t.pro
totype=e.extend({},e.fn.tooltip.Constructor.prototype,{constructor:t,setContent:function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t),e.find(".popover-content")[this.options.html?"html":"text"](n),e.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var e,t=this.$element,n=this.options;return e=(typeof n.content=="function"?n.content.call(t[0]):n.content)||t.attr("data-content"),e},tip:function(){return this.$tip||(this.$tip=e(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}});var n=e.fn.popover;e.fn.popover=function(n){return this.each(function(){var r=e(this),i=r.data("popover"),s=typeof n=="object"&&n;i||r.data("popover",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.popover.Constructor=t,e.fn.popover.defaults=e.extend({},e.fn.tooltip.defaults,{placement:"
right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),e.fn.popover.noConflict=function(){return e.fn.popover=n,this}}(window.jQuery),!function(e){"use strict";function t(t,n){var r=e.proxy(this.process,this),i=e(t).is("body")?e(window):e(t),s;this.options=e.extend({},e.fn.scrollspy.defaults,n),this.$scrollElement=i.on("scroll.scroll-spy.data-api",r),this.selector=(this.options.target||(s=e(t).attr("href"))&&s.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=e("body"),this.refresh(),this.process()}t.prototype={constructor:t,refresh:function(){var t=this,n;this.offsets=e([]),this.targets=e([]),n=this.$body.find(this.selector).map(function(){var n=e(this),r=n.data("target")||n.attr("href"),i=/^#\w/.test(r)&&e(r);return i&&i.length&&[[i.position().top+(!e.isWindow(t.$scrollElement.get(0))&&t.$scrollElement.scrollTop()),r]]||null}).sort(function(e,t){return e[0]-t[0]
}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},process:function(){var e=this.$scrollElement.scrollTop()+this.options.offset,t=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,n=t-this.$scrollElement.height(),r=this.offsets,i=this.targets,s=this.activeTarget,o;if(e>=n)return s!=(o=i.last()[0])&&this.activate(o);for(o=r.length;o--;)s!=i[o]&&e>=r[o]&&(!r[o+1]||e<=r[o+1])&&this.activate(i[o])},activate:function(t){var n,r;this.activeTarget=t,e(this.selector).parent(".active").removeClass("active"),r=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',n=e(r).parent("li").addClass("active"),n.parent(".dropdown-menu").length&&(n=n.closest("li.dropdown").addClass("active")),n.trigger("activate")}};var n=e.fn.scrollspy;e.fn.scrollspy=function(n){return this.each(function(){var r=e(this),i=r.data("scrollspy"),s=typeof n=="object"&&n;i||r.data("scrollspy",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.scrollspy.Constructor=t,e.fn.scr
ollspy.defaults={offset:10},e.fn.scrollspy.noConflict=function(){return e.fn.scrollspy=n,this},e(window).on("load",function(){e('[data-spy="scroll"]').each(function(){var t=e(this);t.scrollspy(t.data())})})}(window.jQuery),!function(e){"use strict";var t=function(t){this.element=e(t)};t.prototype={constructor:t,show:function(){var t=this.element,n=t.closest("ul:not(.dropdown-menu)"),r=t.attr("data-target"),i,s,o;r||(r=t.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));if(t.parent("li").hasClass("active"))return;i=n.find(".active:last a")[0],o=e.Event("show",{relatedTarget:i}),t.trigger(o);if(o.isDefaultPrevented())return;s=e(r),this.activate(t.parent("li"),n),this.activate(s,s.parent(),function(){t.trigger({type:"shown",relatedTarget:i})})},activate:function(t,n,r){function o(){i.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),t.addClass("active"),s?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu")&&t.closest("li.dro
pdown").addClass("active"),r&&r()}var i=n.find("> .active"),s=r&&e.support.transition&&i.hasClass("fade");s?i.one(e.support.transition.end,o):o(),i.removeClass("in")}};var n=e.fn.tab;e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("tab");i||r.data("tab",i=new t(this)),typeof n=="string"&&i[n]()})},e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=n,this},e(document).on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault(),e(this).tab("show")})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.typeahead.defaults,n),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.source=this.options.source,this.$menu=e(this.options.menu),this.shown=!1,this.listen()};t.prototype={constructor:t,select:fu
nction(){var e=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(e)).change(),this.hide()},updater:function(e){return e},show:function(){var t=e.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:t.top+t.height,left:t.left}).show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(t){var n;return this.query=this.$element.val(),!this.query||this.query.length<this.options.minLength?this.shown?this.hide():this:(n=e.isFunction(this.source)?this.source(this.query,e.proxy(this.process,this)):this.source,n?this.process(n):this)},process:function(t){var n=this;return t=e.grep(t,function(e){return n.matcher(e)}),t=this.sorter(t),t.length?this.render(t.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(e){return~e.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(e){var t=[],n=[],r=[],i;whil
e(i=e.shift())i.toLowerCase().indexOf(this.query.toLowerCase())?~i.indexOf(this.query)?n.push(i):r.push(i):t.push(i);return t.concat(n,r)},highlighter:function(e){var t=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return e.replace(new RegExp("("+t+")","ig"),function(e,t){return"<strong>"+t+"</strong>"})},render:function(t){var n=this;return t=e(t).map(function(t,r){return t=e(n.options.item).attr("data-value",r),t.find("a").html(n.highlighter(r)),t[0]}),t.first().addClass("active"),this.$menu.html(t),this},next:function(t){var n=this.$menu.find(".active").removeClass("active"),r=n.next();r.length||(r=e(this.$menu.find("li")[0])),r.addClass("active")},prev:function(e){var t=this.$menu.find(".active").removeClass("active"),n=t.prev();n.length||(n=this.$menu.find("li").last()),n.addClass("active")},listen:function(){this.$element.on("focus",e.proxy(this.focus,this)).on("blur",e.proxy(this.blur,this)).on("keypress",e.proxy(this.keypress,this)).on("keyup",e.proxy(this.keyup,t
his)),this.eventSupported("keydown")&&this.$element.on("keydown",e.proxy(this.keydown,this)),this.$menu.on("click",e.proxy(this.click,this)).on("mouseenter","li",e.proxy(this.mouseenter,this)).on("mouseleave","li",e.proxy(this.mouseleave,this))},eventSupported:function(e){var t=e in this.$element;return t||(this.$element.setAttribute(e,"return;"),t=typeof this.$element[e]=="function"),t},move:function(e){if(!this.shown)return;switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:e.preventDefault(),this.prev();break;case 40:e.preventDefault(),this.next()}e.stopPropagation()},keydown:function(t){this.suppressKeyPressRepeat=~e.inArray(t.keyCode,[40,38,9,13,27]),this.move(t)},keypress:function(e){if(this.suppressKeyPressRepeat)return;this.move(e)},keyup:function(e){switch(e.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}e.stopPropagat
ion(),e.preventDefault()},focus:function(e){this.focused=!0},blur:function(e){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(e){e.stopPropagation(),e.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(t){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),e(t.currentTarget).addClass("active")},mouseleave:function(e){this.mousedover=!1,!this.focused&&this.shown&&this.hide()}};var n=e.fn.typeahead;e.fn.typeahead=function(n){return this.each(function(){var r=e(this),i=r.data("typeahead"),s=typeof n=="object"&&n;i||r.data("typeahead",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>',minLength:1},e.fn.typeahead.Constructor=t,e.fn.typeahead.noConflict=function(){return e.fn.typeahead=n,this},e(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(t){var n=e(this);if(n.data("typeah
ead"))return;n.typeahead(n.data())})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.options=e.extend({},e.fn.affix.defaults,n),this.$window=e(window).on("scroll.affix.data-api",e.proxy(this.checkPosition,this)).on("click.affix.data-api",e.proxy(function(){setTimeout(e.proxy(this.checkPosition,this),1)},this)),this.$element=e(t),this.checkPosition()};t.prototype.checkPosition=function(){if(!this.$element.is(":visible"))return;var t=e(document).height(),n=this.$window.scrollTop(),r=this.$element.offset(),i=this.options.offset,s=i.bottom,o=i.top,u="affix affix-top affix-bottom",a;typeof i!="object"&&(s=o=i),typeof o=="function"&&(o=i.top()),typeof s=="function"&&(s=i.bottom()),a=this.unpin!=null&&n+this.unpin<=r.top?!1:s!=null&&r.top+this.$element.height()>=t-s?"bottom":o!=null&&n<=o?"top":!1;if(this.affixed===a)return;this.affixed=a,this.unpin=a=="bottom"?r.top-n:null,this.$element.removeClass(u).addClass("affix"+(a?"-"+a:""))};var n=e.fn.affix;e.fn.affix=function(
n){return this.each(function(){var r=e(this),i=r.data("affix"),s=typeof n=="object"&&n;i||r.data("affix",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.affix.Constructor=t,e.fn.affix.defaults={offset:0},e.fn.affix.noConflict=function(){return e.fn.affix=n,this},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var t=e(this),n=t.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),t.affix(n)})})}(window.jQuery);
\ No newline at end of file